diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 1cb86bb90e4..821a66a5c5f 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -41,6 +41,7 @@ Provide any additional context that may be helpful in understanding and/or resol Please add X in at least one of the boxes as appropriate. In order for an issue to be accepted, a developer needs to be able to reproduce the issue on a currently supported version. If you are looking for a workaround for an issue with an older version, please visit the forums at https://dnncommunity.org/forums --> * [ ] 10.00.00 alpha build +* [ ] 09.08.00 release candidate * [ ] 09.07.02 release candidate * [ ] 09.07.01 latest supported release diff --git a/.github/PULL_REQUEST_PROCESS.md b/.github/PULL_REQUEST_PROCESS.md index 49a17b124c8..c2fbed66e7b 100644 --- a/.github/PULL_REQUEST_PROCESS.md +++ b/.github/PULL_REQUEST_PROCESS.md @@ -25,18 +25,11 @@ Community review of submitted pull requests is encouraged, and all pull requests At the current time the following community members are designated approvers. * Mitchel Sellers ([mitchelsellers](https://github.com/mitchelsellers)) - Community Technology Advisory Group Lead -* Oliver Hine ([ohine](https://github.com/ohine)) * Brian Dukes ([bdukes](https://github.com/bdukes)) * Peter Donker ([donker](https://github.com/donker)) - Community Developer Advisory Group Lead * Daniel Valadas ([valadas](https://github.com/valadas)) * Matt Rutledge ([mtrutledge](https://github.com/mtrutledge)) -* Vicenç Masanas ([vmasanas](https://github.com/vmasanas)) -* Erik van Ballegoij ([erikvb](https://github.com/erikvb)) - -Additionally, the following individuals from ESW/DNN Corp are approved reviewers. - -* Daniel Aguilera ([daguiler](https://github.com/daguiler)) - CTO -* Ash Prasad ([ashishpd](https://github.com/ashishpd)) - VP of Engineering +* David Poindexter ([david-poindexter](https://github.com/david-poindexter)) - Community Strategy Advisory Group Lead ### Review Minimums An individual performing the code review should validate at a minimum the following. @@ -50,6 +43,14 @@ If a reviewer has suggestions for improvement, those should be noted in the pull *If you have questions about a pull request or an idea for a pull request, please reach out to one of the approvers before submitting to ensure a streamlined process.* +### Draft PR's +For proper management of pull requests the team will utilize the "Draft" option within a pull request to identify something that is being submitted for consideration and in need of review/comment or other special review from the team. Individuals should coordinate with the Approvers group prior to submitting any Draft pull requests as they are special cases. + +### On-Hold Tag +The Approvers group will add the "On-Hold" tag to any pull request that is targeting a major or minor release until it is ready for merging. This is done as an administrative process to prevent accidental merging and is not a reflection of rejection of the submitted code. The associated milestone will be updated when the "On-Hold" tag has been added for clear communication regarding expectations. + +Examples of requests of this nature include technology or dependency changes that could introduce major/minor breaking changes. + ## Merging & Closing of Requests Once a pull request has been reviewed by two designated approvers it may be merged and the pull request closed. @@ -67,11 +68,4 @@ We follow the process outlined in the [Versioning Policy](VERSIONING_POLICY.md) The review team will work to respond to all pull requests in a timely fashion. If changes or additional information is requested a pull request will remain open allowing the submitter to update their contribution accordingly. If a request for additional information or changes is not completed with 90 days of request the Pull Request will be closed to keep the pipeline clear. Once the needed information has been gathered the information can be re-submitted via a new Pull Request. -For expedited processing you may reference the prior Pull Request. - -### Items for Future Releases -If an item was submitted that will be integrated into a future release that is not currently in the development pipeline it is possible that the Pull Request will remain open. - -In this situation the reviewing team will approve the request, tag the request with a specific version milestone and add a comment noting when and why it will be included in the particularly identified release. - -This most often will apply to technology or dependency changes that require alignment with Major, Minor, Revision build inclusion. +For expedited processing you may reference the prior Pull Request. \ No newline at end of file diff --git a/.github/RELEASE_SCHEDULE.md b/.github/RELEASE_SCHEDULE.md index 45e85715a45..74a2324d2ea 100644 --- a/.github/RELEASE_SCHEDULE.md +++ b/.github/RELEASE_SCHEDULE.md @@ -1,16 +1,29 @@ # DNN Platform Release Schedule -To ensure adequate time for release planning by the community, partners, and vendors a specific release process will be followed for all releases. +To ensure adequate time for release planning by the community, partners, and vendors, a specific release process will be followed for all releases. ## Release Candidates -For a period of one week (Revision), two weeks (Minor) or four-weeks (Major) before any release, a Release Candidate (RC) version will be made available to the public. At present these release candidates will be for testing only. After version 10.x efforts will be made to support upgrading from RC to Production releases. +A Release Candidate (RC) is designed to give the community time to adjust their existing environments for any breaking changes and identify any unintended changes. Strong community participation during the RC process will result in more stable releases. -The goal of these release candidates is to give the community time to adjust their existing environments for any breaking changes, as well as to identify any issues with the changes. If necessary, changes will be incorporated an additional RC release could be made if significant problems are identified. If a revised Release Candidate is necessary the Production Release schedule will be impacted. The exact impact will vary on a case-by-case basis depending on the nature of the issue(s) identified during RC review, however, will be clearly communicated during the release. +### Major Releases (`MAJOR.Minor.Patch`) +Major releases will have an initial RC cycle with a minimum duration of three weeks between the date of the RC release and the date of the final release. -## Production Releases -Production releases will only be completed after a successful RC phase, except in the case of a significant security release that was included as part of a revision release. +### Minor Releases (`Major.MINOR.Patch`) +Minor releases will have an initial RC cycle with a minimum duration of two weeks between the date of the RC release and the date of the final release. -The release date will be communicated to the community at the time of the RC. And each release will take the following considerations into mind for all releases. +### Patch Releases (`Major.Minor.PATCH`) +Patch releases will have an initial RC cycle with a minimum duration of one week from the RC release and final release. -* Releases must allow for at least two additional business days after the release for regular Monday - Friday office situations (Releases only on Monday, Tuesday or Wednesday) +### Changes During RC Cycle +If necessary, changes will be incorporated during an RC; if the changes resolve significant issues or introduce risk, an additional RC may be created at the discretion of the Approvers group. If a revised RC is necessary, the Production Release schedule will be impacted; the exact impact will vary on a case-by-case basis depending on the nature of the issue(s) identified during the RC review. However, it will be communicated as part of the updated RC release notes. + +## Final Releases +Production Releases will only be completed after a successful Release Candidate cycle, except in the case of a significant security release included as part of a Patch release. + +The anticipated release date will be communicated to the community at the time of the RC. And each release will take the following considerations into mind for all releases. + +* Releases must allow for at least two business days following the release (based on standard business operations of Monday - Friday). Thus, releases should only be made on Mondays, Tuesdays, or Wednesdays. * Releases will not be completed during weeks of major US holidays, specifically New Years, Memorial Day, Independence Day, Labor Day, Thanksgiving Day, or Christmas. * Best efforts shall be made to avoid other significant holidays in other countries. + +## Release Notifications +You can utilize the "Watch" functionality within GitHub to receive notifications for new Release Candidates and Production Releases using the "Releases Only" notification option. diff --git a/.github/VERSIONING_POLICY.md b/.github/VERSIONING_POLICY.md index 4f4cb2ef8f2..bb2dab1b4b5 100644 --- a/.github/VERSIONING_POLICY.md +++ b/.github/VERSIONING_POLICY.md @@ -1,29 +1,33 @@ # DNN Platform Versioning and Deprecation Policies The DNN Platform follows a semantic versioning process for releases, in a manner to better communicate expectations of releases and their potential impacts to users of the platform. -##Semantic Versioning +## Semantic Versioning The DNN Community adopted the current semantic version policy in July of 2018. Releases before this date may follow different standards. ### Major Releases (Ex 10.0.0) A major release is as the name implies, a release with major changes. These changes might include new features, breaking changes, or other larger changes. Each major release will come with release notes that outline the nature of any known breaking changes. -Major releases are also the time that platform requirements might be changed, such as requiring a new edition of SQL Server or otherwise. +Major releases are also the time that platform requirements might be changed, such as requiring a new edition of SQL Server, .NET Framework, or otherwise. ### Minor Releases (Ex 10.1, 10.2, 10.x) -A minor might contain smaller new features and enhancements, but will not introduce any breaking API changes, nor will it change the requirements of the hosting environment or platform to run the application. +A minor release might contain smaller new features and enhancements, but will not introduce any known breaking API changes, nor will it change the requirements of the hosting environment or platform to run the application. + +It is possible that minor breaking changes and Javascript library updates are included in minor releases. ### Revision Releases (Ex 10.1.1, 10.1.2, 10.1.x) -These releases are created primarily to contain hot-fix style improvements from prior releases. Any bugs or security issues identified, or missing UI/UX features from a Minor/Major release might be added to a revision release. Similar to a Minor release a Revision release will not contain any known breaking changes. +These releases are created primarily to contain hot-fix style improvements from prior releases. Any bugs or security issues identified, or missing UI/UX features from a Minor/Major release might be added to a revision release. Similar to a Minor release a Revision release will not contain any known breaking changes API. + +## API Deprecation Policy (Updated September 2020) +The DNN Platform project is in a state of transition, continuing to modernize the API and remove existing technology debt. To this point, it will be necessary for the project to remove/restructuree many public API's. This will be done methodically, allowing developers to transition away from the older code with time to properly respond to change. -## API Deprecation Policy -The DNN Platform project is in a state of transition, continuing to modernize the API and work towards a transition to .NET Core. To this point, it will be necessary for the project to remove public API's. This will be done methodically, allowing developers to transition away from the older code with time to properly respond to change. -Any API method to be removed will be flagged as deprecated in a release, major, minor or revision, and will be identified to be removed by a specific version. This will be done using a C# annotation with a comment similar to the following "Deprecated in x.x.x. Scheduled for removal in vy.0.0, use ____ instead". The version number of "y" in this example must be 2 major versions ahead. -Therefore, an API marked as Deprecated in 9.2.1 can only be removed in version 11.0. Additionally, methods marked for removal in a version will GUARANTEED be removed in that revision. +Any API method to be removed will be flagged as deprecated in a release, major, minor or revision, and will be identified to be removed by a specific version. This will be done using a C# `[Obsolete]` attribute with a comment similar to the following "Deprecated in x.x.x. Scheduled for removal in vy.0.0, use ____ instead". The version number of "y" in this example must be 1 major versions ahead of the version in which the notice was added. + +Therefore, an API marked as Deprecated in 9.2.1 can only be removed in version 10.0. Additionally, methods marked for removal in a version will GUARANTEED be removed in that revision. > Example: [Obsolete("Deprecated in DotNetNuke 7.0. This function has been replaced by AddUserRole with additional params. Scheduled removal in v10.0.0.")] +### Testing Recommendations +It is suggested that all extension developers recompile their projects on the latest API versions on a regular basis to identify removed elements as the compiler warnings will be the primary communication method for these changes. + ### Special DNN 10.x Cleanup A number of legacy APIs have been marked as deprecated for more than 7 years and not yet removed. To continue to clean the API structure a final cleanup is being completed as part of the 10.x release. All of these API's are more than 2 major revisions older, however, have non-standard indicators for the Obsolete attribute. These will be removed in 10.x along with other expected removals. Lastly, each Major release will contain release notes outlining every API method removed. More information can be found [in this blog post](https://www.dnnsoftware.com/community-blog/cid/156712/moving-forward-dnn-platform-100-growing-pains-lead-to-improvement) - - - diff --git a/.github/mergeable.yml b/.github/mergeable.yml index 0785e3f3d76..ec08e17fdf3 100644 --- a/.github/mergeable.yml +++ b/.github/mergeable.yml @@ -6,6 +6,10 @@ mergeable: no_empty: enabled: true # Cannot be empty when true. message: 'A milestone must be assigned to this pull request' + must_exclude: + regex: 'Future:' + regex_flag: 'none' + message: 'A milestone that does not contain `Future:` must be assigned to this pull request' - do: label begins_with: match: 'Type:' # or array of strings diff --git a/.gitignore b/.gitignore index 6b1120c3d94..53bf4e1b808 100644 --- a/.gitignore +++ b/.gitignore @@ -114,6 +114,8 @@ DNN [Pp]latform/Syndication/[Bb]in/* DNN [Pp]latform/[Cc]onnectors/*/[Bb]in/* DNN [Pp]latform/[Pp]roviders/*/[Bb]in/* +DNN [Pp]latform/Modules/ResourceManager/**/scripts/*-bundle.* + # ignore all other language resx files *.de-DE.resx *.es-ES.resx @@ -130,3 +132,5 @@ DNN [Pp]latform/[Pp]roviders/*/[Bb]in/* # Add fips back !DNN Platform/[Ww]ebsite/App_Data/FipsCompilanceAssemblies/Lucene.Net.dll + +yarn-error.log diff --git a/Build/BuildScripts/AEModule.build b/Build/BuildScripts/AEModule.build index dba95345f07..92699faf715 100644 --- a/Build/BuildScripts/AEModule.build +++ b/Build/BuildScripts/AEModule.build @@ -1,7 +1,7 @@  - - + + $(MSBuildProjectDirectory)\Package\Resources\admin\personaBar @@ -11,13 +11,13 @@ - - - - - - - + + + + + + + @@ -27,12 +27,12 @@ - - - - - - + + + + + + diff --git a/Build/Cake/devsite.cake b/Build/Cake/devsite.cake index 83d2a8941be..e83b92f9e49 100644 --- a/Build/Cake/devsite.cake +++ b/Build/Cake/devsite.cake @@ -7,7 +7,6 @@ Task("BuildToTempFolder") .IsDependentOn("ResetDatabase") .IsDependentOn("PreparePackaging") .IsDependentOn("OtherPackages") - .IsDependentOn("ExternalExtensions") .Does(() => { }); diff --git a/Build/Cake/external.cake b/Build/Cake/external.cake deleted file mode 100644 index 5189aaa5dbd..00000000000 --- a/Build/Cake/external.cake +++ /dev/null @@ -1,44 +0,0 @@ -// Packaging of 3rd party stuff that is not in our repository - -Task("ExternalExtensions") -.IsDependentOn("CleanTemp") -.IsDependentOn("CKEP") - .Does(() => - { - }); - -Task("CKEP") - .Does(() => - { - var ckepFolder = tempFolder + "CKEP/"; - var ckepPackageFolder = "./Website/Install/Provider/"; - var buildDir = Directory(ckepFolder); - var buildDirFullPath = System.IO.Path.GetFullPath(ckepFolder) + "\\"; - CreateDirectory(buildDir); - CreateDirectory(ckepPackageFolder); - Information("CK:'{0}'", targetBranchCk); - Information("Downloading External Extensions to {0}", buildDirFullPath); - - //ck - DownloadFile("https://github.com/DNN-Connect/CKEditorProvider/archive/" + targetBranchCk + ".zip", buildDirFullPath + "ckeditor.zip"); - Information("Decompressing: {0}", "CK Editor"); - Unzip(buildDirFullPath + "ckeditor.zip", buildDirFullPath + "Providers/"); - - //look for solutions and start building them - var externalSolutions = GetFiles(ckepFolder + "**/*.sln"); - Information("Found {0} solutions.", externalSolutions.Count); - foreach (var solution in externalSolutions){ - var solutionPath = solution.ToString(); - Information("Processing Solution File: {0}", solutionPath); - Information("Starting NuGetRestore: {0}", solutionPath); - NuGetRestore(solutionPath); - Information("Starting to Build: {0}", solutionPath); - MSBuild(solutionPath, settings => settings.SetConfiguration(configuration)); - } - - //grab all install zips and copy to staging directory - var fileCounter = 0; - fileCounter = GetFiles(ckepFolder + "**/*_Install.zip").Count; - Information("Copying {1} Artifacts from {0}", "CK Editor Provider", fileCounter); - CopyFiles(ckepFolder + "**/*_Install.zip", ckepPackageFolder); - }); diff --git a/Build/Cake/packaging.cake b/Build/Cake/packaging.cake index b4008172a15..a5507222a5c 100644 --- a/Build/Cake/packaging.cake +++ b/Build/Cake/packaging.cake @@ -51,7 +51,6 @@ Task("CopyWebConfig") Task("CreateInstall") .IsDependentOn("PreparePackaging") .IsDependentOn("OtherPackages") - .IsDependentOn("ExternalExtensions") .Does(() => { CreateDirectory(artifactsFolder); @@ -65,7 +64,6 @@ Task("CreateInstall") Task("CreateUpgrade") .IsDependentOn("PreparePackaging") .IsDependentOn("OtherPackages") - .IsDependentOn("ExternalExtensions") .Does(() => { CreateDirectory(artifactsFolder); @@ -82,7 +80,6 @@ Task("CreateUpgrade") Task("CreateDeploy") .IsDependentOn("PreparePackaging") .IsDependentOn("OtherPackages") - .IsDependentOn("ExternalExtensions") .Does(() => { CreateDirectory(artifactsFolder); @@ -100,7 +97,6 @@ Task("CreateDeploy") Task("CreateSymbols") .IsDependentOn("PreparePackaging") .IsDependentOn("OtherPackages") - .IsDependentOn("ExternalExtensions") .Does(() => { CreateDirectory(artifactsFolder); diff --git a/Build/Cake/version.cake b/Build/Cake/version.cake index 00827bd4a84..05c99883a16 100644 --- a/Build/Cake/version.cake +++ b/Build/Cake/version.cake @@ -66,6 +66,7 @@ Task("SetPackageVersions") var packages = GetFiles("./Dnn.AdminExperience/ClientSide/*.Web/package.json"); packages.Add(GetFiles("./Dnn.AdminExperience/ClientSide/Dnn.React.Common/package.json")); packages.Add(GetFiles("./Dnn.AdminExperience/ClientSide/*.Web/**/_exportables/package.json")); + packages.Add(GetFiles("./DNN Platform/Modules/ResourceManager/ResourceManager.Web/package.json")); // Set all package.json in Admin Experience to the current version and to consume the current (local) version of dnn-react-common. foreach(var file in packages){ diff --git a/Build/Symbols/DotNetNuke_Symbols.dnn b/Build/Symbols/DotNetNuke_Symbols.dnn index ea0facaa22f..011b97d067a 100644 --- a/Build/Symbols/DotNetNuke_Symbols.dnn +++ b/Build/Symbols/DotNetNuke_Symbols.dnn @@ -1,6 +1,6 @@  - + DNN Platform Symbols This package contains Debug Symbols and Intellisense files for DNN Platform. diff --git a/DNN Platform/Admin Modules/Dnn.Modules.Console/dnn_Console.dnn b/DNN Platform/Admin Modules/Dnn.Modules.Console/dnn_Console.dnn index 7483f1c9c49..5a45f5cb1f8 100644 --- a/DNN Platform/Admin Modules/Dnn.Modules.Console/dnn_Console.dnn +++ b/DNN Platform/Admin Modules/Dnn.Modules.Console/dnn_Console.dnn @@ -1,6 +1,6 @@  - + Console Display children pages as icon links for navigation. ~/DesktopModules/Admin/Console/console.png diff --git a/DNN Platform/Admin Modules/Dnn.Modules.ModuleCreator/Dnn.Modules.ModuleCreator.csproj b/DNN Platform/Admin Modules/Dnn.Modules.ModuleCreator/Dnn.Modules.ModuleCreator.csproj index e91f53017e1..6d94c1368af 100644 --- a/DNN Platform/Admin Modules/Dnn.Modules.ModuleCreator/Dnn.Modules.ModuleCreator.csproj +++ b/DNN Platform/Admin Modules/Dnn.Modules.ModuleCreator/Dnn.Modules.ModuleCreator.csproj @@ -73,9 +73,6 @@ - - ..\..\Components\Telerik\bin\Telerik.Web.UI.dll - diff --git a/DNN Platform/Admin Modules/Dnn.Modules.ModuleCreator/dnn_ModuleCreator.dnn b/DNN Platform/Admin Modules/Dnn.Modules.ModuleCreator/dnn_ModuleCreator.dnn index d8b71cb3d3e..f62618b5a46 100644 --- a/DNN Platform/Admin Modules/Dnn.Modules.ModuleCreator/dnn_ModuleCreator.dnn +++ b/DNN Platform/Admin Modules/Dnn.Modules.ModuleCreator/dnn_ModuleCreator.dnn @@ -1,6 +1,6 @@  - + Module Creator Development of modules. ~/Icons/Sigma/ModuleCreator_32x32.png diff --git a/DNN Platform/Components/Telerik/DotNetNuke.Telerik.Web.dnn b/DNN Platform/Components/Telerik/DotNetNuke.Telerik.Web.dnn index 8e429e98829..5aa1bd8a0f2 100644 --- a/DNN Platform/Components/Telerik/DotNetNuke.Telerik.Web.dnn +++ b/DNN Platform/Components/Telerik/DotNetNuke.Telerik.Web.dnn @@ -1,6 +1,6 @@ - + DotNetNuke Telerik Web Components Provides Telerik Components for DotNetNuke. diff --git a/DNN Platform/Connectors/Azure/AzureConnector.dnn b/DNN Platform/Connectors/Azure/AzureConnector.dnn index cfebf442baa..6264662391c 100644 --- a/DNN Platform/Connectors/Azure/AzureConnector.dnn +++ b/DNN Platform/Connectors/Azure/AzureConnector.dnn @@ -1,6 +1,6 @@  - + Dnn Azure Connector The Azure Connector allows you to integrate Azure as your commenting solution with the Publisher module. ~/DesktopModules/Connectors/Azure/Images/icon-azure-32px.png diff --git a/DNN Platform/Connectors/GoogleAnalytics/GoogleAnalyticsConnector.dnn b/DNN Platform/Connectors/GoogleAnalytics/GoogleAnalyticsConnector.dnn index 41eb928738c..daa6d252bdc 100644 --- a/DNN Platform/Connectors/GoogleAnalytics/GoogleAnalyticsConnector.dnn +++ b/DNN Platform/Connectors/GoogleAnalytics/GoogleAnalyticsConnector.dnn @@ -1,6 +1,6 @@ - + Google Analytics Connector Configure your sites Google Analytics settings. ~/DesktopModules/Connectors/GoogleAnalytics/Images/GoogleAnalytics_32X32_Standard.png diff --git a/DNN Platform/Dnn.AuthServices.Jwt/Auth/JwtAuthMessageHandler.cs b/DNN Platform/Dnn.AuthServices.Jwt/Auth/JwtAuthMessageHandler.cs index 9cb16b9dc78..f729218712f 100644 --- a/DNN Platform/Dnn.AuthServices.Jwt/Auth/JwtAuthMessageHandler.cs +++ b/DNN Platform/Dnn.AuthServices.Jwt/Auth/JwtAuthMessageHandler.cs @@ -2,74 +2,85 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace Dnn.AuthServices.Jwt.Auth -{ - using System; - using System.Net.Http; - using System.Security.Principal; - using System.Threading; +namespace Dnn.AuthServices.Jwt.Auth +{ + using System; + using System.Net.Http; + using System.Security.Principal; + using System.Threading; - using Dnn.AuthServices.Jwt.Components.Common.Controllers; - using DotNetNuke.Instrumentation; - using DotNetNuke.Web.Api.Auth; - using DotNetNuke.Web.ConfigSection; + using Dnn.AuthServices.Jwt.Components.Common.Controllers; + using DotNetNuke.Instrumentation; + using DotNetNuke.Web.Api.Auth; + using DotNetNuke.Web.ConfigSection; - /// - /// This class implements Json Web Token (JWT) authentication scheme. - /// For detailed description of JWT refer to: - /// - JTW standard https://tools.ietf.org/html/rfc7519. - /// - Introduction to JSON Web Tokens http://jwt.io/introduction/. - /// - public class JwtAuthMessageHandler : AuthMessageHandlerBase - { - private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(JwtAuthMessageHandler)); - - private readonly IJwtController _jwtController = JwtController.Instance; - - public JwtAuthMessageHandler(bool includeByDefault, bool forceSsl) - : base(includeByDefault, forceSsl) - { - // Once an instance is enabled and gets registered in - // ServicesRoutingManager.RegisterAuthenticationHandlers() - // this scheme gets marked as enabled. - IsEnabled = true; - } - - public override string AuthScheme => this._jwtController.SchemeType; - - public override bool BypassAntiForgeryToken => true; - - internal static bool IsEnabled { get; set; } - - public override HttpResponseMessage OnInboundRequest(HttpRequestMessage request, CancellationToken cancellationToken) - { - if (this.NeedsAuthentication(request)) - { - this.TryToAuthenticate(request); - } - - return base.OnInboundRequest(request, cancellationToken); - } - - private void TryToAuthenticate(HttpRequestMessage request) - { - try - { - var username = this._jwtController.ValidateToken(request); - if (!string.IsNullOrEmpty(username)) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace($"Authenticated user '{username}'"); - } - - SetCurrentPrincipal(new GenericPrincipal(new GenericIdentity(username, this.AuthScheme), null), request); - } - } - catch (Exception ex) - { - Logger.Error("Unexpected error in authenticating the user. " + ex); - } - } - } -} + /// + /// This class implements Json Web Token (JWT) authentication scheme. + /// For detailed description of JWT refer to: + /// - JTW standard https://tools.ietf.org/html/rfc7519. + /// - Introduction to JSON Web Tokens http://jwt.io/introduction/. + /// + public class JwtAuthMessageHandler : AuthMessageHandlerBase + { + private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(JwtAuthMessageHandler)); + + private readonly IJwtController jwtController = JwtController.Instance; + + /// + /// Initializes a new instance of the class. + /// + /// A value indicating whether this handler should be inlcuded by default on all API endpoints. + /// A value indicating whether this handler should enforce SSL usage. + public JwtAuthMessageHandler(bool includeByDefault, bool forceSsl) + : base(includeByDefault, forceSsl) + { + // Once an instance is enabled and gets registered in + // ServicesRoutingManager.RegisterAuthenticationHandlers() + // this scheme gets marked as enabled. + IsEnabled = true; + } + + /// + public override string AuthScheme => this.jwtController.SchemeType; + + /// + public override bool BypassAntiForgeryToken => true; + + /// + /// Gets or sets a value indicating whether this handler is enabled. + /// + internal static bool IsEnabled { get; set; } + + /// + public override HttpResponseMessage OnInboundRequest(HttpRequestMessage request, CancellationToken cancellationToken) + { + if (this.NeedsAuthentication(request)) + { + this.TryToAuthenticate(request); + } + + return base.OnInboundRequest(request, cancellationToken); + } + + private void TryToAuthenticate(HttpRequestMessage request) + { + try + { + var username = this.jwtController.ValidateToken(request); + if (!string.IsNullOrEmpty(username)) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace($"Authenticated user '{username}'"); + } + + SetCurrentPrincipal(new GenericPrincipal(new GenericIdentity(username, this.AuthScheme), null), request); + } + } + catch (Exception ex) + { + Logger.Error("Unexpected error in authenticating the user. " + ex); + } + } + } +} diff --git a/DNN Platform/Dnn.AuthServices.Jwt/Components/Common/Controllers/IJwtController.cs b/DNN Platform/Dnn.AuthServices.Jwt/Components/Common/Controllers/IJwtController.cs index cb7dcefed46..9c99f797b55 100644 --- a/DNN Platform/Dnn.AuthServices.Jwt/Components/Common/Controllers/IJwtController.cs +++ b/DNN Platform/Dnn.AuthServices.Jwt/Components/Common/Controllers/IJwtController.cs @@ -2,22 +2,50 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace Dnn.AuthServices.Jwt.Components.Common.Controllers -{ - using System.Net.Http; +namespace Dnn.AuthServices.Jwt.Components.Common.Controllers +{ + using System.Net.Http; - using Dnn.AuthServices.Jwt.Components.Entity; + using Dnn.AuthServices.Jwt.Components.Entity; - public interface IJwtController - { - string SchemeType { get; } - - string ValidateToken(HttpRequestMessage request); - - bool LogoutUser(HttpRequestMessage request); - - LoginResultData LoginUser(HttpRequestMessage request, LoginData loginData); - - LoginResultData RenewToken(HttpRequestMessage request, string renewalToken); - } -} + /// + /// Controls JWT features. + /// + public interface IJwtController + { + /// + /// Gets the name of the authentication Scheme Type. + /// + string SchemeType { get; } + + /// + /// Validates the JWT token for the request. + /// + /// The current HTTP request. + /// Returns the UserName if the token is valid or null if not. + string ValidateToken(HttpRequestMessage request); + + /// + /// Logs the user out. + /// + /// The current HTTP request. + /// A value indicating whether the logout attempt succeeded. + bool LogoutUser(HttpRequestMessage request); + + /// + /// Logs the user in. + /// + /// The current HTTP request. + /// The login information, . + /// . + LoginResultData LoginUser(HttpRequestMessage request, LoginData loginData); + + /// + /// Attempts to renew a JWT token. + /// + /// The current HTTP request. + /// The JWT renewal token. + /// . + LoginResultData RenewToken(HttpRequestMessage request, string renewalToken); + } +} diff --git a/DNN Platform/Dnn.AuthServices.Jwt/Components/Common/Controllers/JwtController.cs b/DNN Platform/Dnn.AuthServices.Jwt/Components/Common/Controllers/JwtController.cs index 52f03ba7ed4..30d81f039fe 100644 --- a/DNN Platform/Dnn.AuthServices.Jwt/Components/Common/Controllers/JwtController.cs +++ b/DNN Platform/Dnn.AuthServices.Jwt/Components/Common/Controllers/JwtController.cs @@ -2,558 +2,602 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace Dnn.AuthServices.Jwt.Components.Common.Controllers -{ - using System; - using System.Collections.Generic; - using System.IdentityModel.Tokens; - using System.Linq; - using System.Net.Http; - using System.Net.Http.Headers; - using System.Security.Claims; - using System.Security.Cryptography; - using System.Text; - - using Dnn.AuthServices.Jwt.Auth; - using Dnn.AuthServices.Jwt.Components.Entity; - using Dnn.AuthServices.Jwt.Data; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Entities.Users; - using DotNetNuke.Framework; - using DotNetNuke.Instrumentation; - using DotNetNuke.Security.Membership; - using DotNetNuke.Web.Api; - using Newtonsoft.Json; - - internal class JwtController : ServiceLocator, IJwtController - { - public const string AuthScheme = "Bearer"; - public readonly IDataService DataProvider = DataService.Instance; - - private const int ClockSkew = 5; // in minutes; default for clock skew - private const int SessionTokenTtl = 60; // in minutes = 1 hour - - private const int RenewalTokenTtl = 14; // in days = 2 weeks - private const string SessionClaimType = "sid"; - - private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(JwtController)); - private static readonly HashAlgorithm Hasher = SHA384.Create(); - private static readonly Encoding TextEncoder = Encoding.UTF8; - - public string SchemeType => "JWT"; - - private static string NewSessionId => DateTime.UtcNow.Ticks.ToString("x16") + Guid.NewGuid().ToString("N").Substring(16); - - /// - /// Validates the received JWT against the databas eand returns username when successful. - /// - /// - public string ValidateToken(HttpRequestMessage request) - { - if (!JwtAuthMessageHandler.IsEnabled) - { - Logger.Trace(this.SchemeType + " is not registered/enabled in web.config file"); - return null; - } - - var authorization = this.ValidateAuthHeader(request?.Headers.Authorization); - return string.IsNullOrEmpty(authorization) ? null : this.ValidateAuthorizationValue(authorization); - } - - public bool LogoutUser(HttpRequestMessage request) - { - if (!JwtAuthMessageHandler.IsEnabled) - { - Logger.Trace(this.SchemeType + " is not registered/enabled in web.config file"); - return false; - } - - var rawToken = this.ValidateAuthHeader(request?.Headers.Authorization); - if (string.IsNullOrEmpty(rawToken)) - { - return false; - } - - var jwt = new JwtSecurityToken(rawToken); - var sessionId = GetJwtSessionValue(jwt); - if (string.IsNullOrEmpty(sessionId)) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("Session ID not found in the claim"); - } - - return false; - } - - this.DataProvider.DeleteToken(sessionId); - return true; - } - - /// - /// Validates user login credentials and returns result when successful. - /// - /// - public LoginResultData LoginUser(HttpRequestMessage request, LoginData loginData) - { - if (!JwtAuthMessageHandler.IsEnabled) - { - Logger.Trace(this.SchemeType + " is not registered/enabled in web.config file"); - return EmptyWithError("disabled"); - } - - var portalSettings = PortalController.Instance.GetCurrentPortalSettings(); - if (portalSettings == null) - { - Logger.Trace("portalSettings = null"); - return EmptyWithError("no-portal"); - } - - var status = UserLoginStatus.LOGIN_FAILURE; - var ipAddress = request.GetIPAddress() ?? string.Empty; - var userInfo = UserController.ValidateUser( - portalSettings.PortalId, - loginData.Username, loginData.Password, "DNN", string.Empty, AuthScheme, ipAddress, ref status); - - if (userInfo == null) - { - Logger.Trace("user = null"); - return EmptyWithError("bad-credentials"); - } - - var valid = - status == UserLoginStatus.LOGIN_SUCCESS || - status == UserLoginStatus.LOGIN_SUPERUSER || - status == UserLoginStatus.LOGIN_INSECUREADMINPASSWORD || - status == UserLoginStatus.LOGIN_INSECUREHOSTPASSWORD; - - if (!valid) - { - Logger.Trace("login status = " + status); - return EmptyWithError("bad-credentials"); - } - - // save hash values in DB so no one with access can create JWT header from existing data - var sessionId = NewSessionId; - var now = DateTime.UtcNow; - var renewalToken = EncodeBase64(Hasher.ComputeHash(Guid.NewGuid().ToByteArray())); - var ptoken = new PersistedToken - { - TokenId = sessionId, - UserId = userInfo.UserID, - TokenExpiry = now.AddMinutes(SessionTokenTtl), - RenewalExpiry = now.AddDays(RenewalTokenTtl), - RenewalHash = GetHashedStr(renewalToken), - }; - - var secret = ObtainSecret(sessionId, portalSettings.GUID, userInfo.Membership.LastPasswordChangeDate); - var jwt = CreateJwtToken(secret, portalSettings.PortalAlias.HTTPAlias, ptoken, userInfo.Roles); - var accessToken = jwt.RawData; - - ptoken.TokenHash = GetHashedStr(accessToken); - this.DataProvider.AddToken(ptoken); - - return new LoginResultData - { - UserId = userInfo.UserID, - DisplayName = userInfo.DisplayName, - AccessToken = accessToken, - RenewalToken = renewalToken, - }; - } - - public LoginResultData RenewToken(HttpRequestMessage request, string renewalToken) - { - if (!JwtAuthMessageHandler.IsEnabled) - { - Logger.Trace(this.SchemeType + " is not registered/enabled in web.config file"); - return EmptyWithError("disabled"); - } - - var rawToken = this.ValidateAuthHeader(request?.Headers.Authorization); - if (string.IsNullOrEmpty(rawToken)) - { - return EmptyWithError("bad-credentials"); - } - - var jwt = GetAndValidateJwt(rawToken, false); - if (jwt == null) - { - return EmptyWithError("bad-jwt"); - } - - var sessionId = GetJwtSessionValue(jwt); - if (string.IsNullOrEmpty(sessionId)) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("Session ID not found in the claim"); - } - - return EmptyWithError("bad-claims"); - } - - var ptoken = this.DataProvider.GetTokenById(sessionId); - if (ptoken == null) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("Token not found in DB"); - } - - return EmptyWithError("not-found"); - } - - if (ptoken.RenewalExpiry <= DateTime.UtcNow) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("Token can't bwe renewed anymore"); - } - - return EmptyWithError("not-more-renewal"); - } - - if (ptoken.RenewalHash != GetHashedStr(renewalToken)) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("Invalid renewal token"); - } - - return EmptyWithError("bad-token"); - } - - if (ptoken.TokenHash != GetHashedStr(rawToken)) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("Invalid access token"); - } - - return EmptyWithError("bad-token"); - } - - var userInfo = this.TryGetUser(jwt, false); - if (userInfo == null) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("User not found in DB"); - } - - return EmptyWithError("not-found"); - } - - if (ptoken.UserId != userInfo.UserID) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("Mismatch token and user"); - } - - return EmptyWithError("bad-token"); - } - - return this.UpdateToken(renewalToken, ptoken, userInfo); - } - - protected override Func GetFactory() - { - return () => new JwtController(); - } - - private static LoginResultData EmptyWithError(string error) - { - return new LoginResultData { Error = error }; - } - - private static JwtSecurityToken CreateJwtToken(byte[] symmetricKey, string issuer, PersistedToken ptoken, IEnumerable roles) - { - // var key = Convert.FromBase64String(symmetricKey); - var credentials = new SigningCredentials( - new InMemorySymmetricSecurityKey(symmetricKey), - "http://www.w3.org/2001/04/xmldsig-more#hmac-sha256", - "http://www.w3.org/2001/04/xmlenc#sha256"); - - var claimsIdentity = new ClaimsIdentity(); - claimsIdentity.AddClaim(new Claim(SessionClaimType, ptoken.TokenId)); - claimsIdentity.AddClaims(roles.Select(r => new Claim(ClaimTypes.Role, r))); - - var notBefore = DateTime.UtcNow.AddMinutes(-ClockSkew); - var notAfter = ptoken.TokenExpiry; - var tokenHandler = new JwtSecurityTokenHandler(); - var token = tokenHandler.CreateToken(issuer, null, claimsIdentity, notBefore, notAfter, credentials); - return token; - } - - private static JwtSecurityToken GetAndValidateJwt(string rawToken, bool checkExpiry) - { - JwtSecurityToken jwt; - try - { - jwt = new JwtSecurityToken(rawToken); - } - catch (Exception ex) - { - Logger.Error("Unable to construct JWT object from authorization value. " + ex.Message); - return null; - } - - if (checkExpiry) - { - var now = DateTime.UtcNow; - if (now < jwt.ValidFrom || now > jwt.ValidTo) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("Token is expired"); - } - - return null; - } - } - - var sessionId = GetJwtSessionValue(jwt); - if (string.IsNullOrEmpty(sessionId)) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("Invaid session ID claim"); - } - - return null; - } - - return jwt; - } - - private static string GetJwtSessionValue(JwtSecurityToken jwt) - { - var sessionClaim = jwt?.Claims?.FirstOrDefault(claim => SessionClaimType.Equals(claim.Type)); - return sessionClaim?.Value; - } - - private static byte[] ObtainSecret(string sessionId, Guid portalGuid, DateTime userCreationDate) - { - // The secret should contain unpredictable components that can't be inferred from the JWT string. - var stext = string.Join(".", sessionId, portalGuid.ToString("N"), userCreationDate.ToUniversalTime().ToString("O")); - return TextEncoder.GetBytes(stext); - } - - private static string DecodeBase64(string b64Str) - { - // fix Base64 string padding - var mod = b64Str.Length % 4; - if (mod != 0) - { - b64Str += new string('=', 4 - mod); - } - - return TextEncoder.GetString(Convert.FromBase64String(b64Str)); - } - - private static string EncodeBase64(byte[] data) - { - return Convert.ToBase64String(data).TrimEnd('='); - } - - private static string GetHashedStr(string data) - { - return EncodeBase64(Hasher.ComputeHash(TextEncoder.GetBytes(data))); - } - - private LoginResultData UpdateToken(string renewalToken, PersistedToken ptoken, UserInfo userInfo) - { - var expiry = DateTime.UtcNow.AddMinutes(SessionTokenTtl); - if (expiry > ptoken.RenewalExpiry) - { - // don't extend beyond renewal expiry and make sure it is marked in UTC - expiry = new DateTime(ptoken.RenewalExpiry.Ticks, DateTimeKind.Utc); - } - - ptoken.TokenExpiry = expiry; - - var portalSettings = PortalController.Instance.GetCurrentPortalSettings(); - var secret = ObtainSecret(ptoken.TokenId, portalSettings.GUID, userInfo.Membership.LastPasswordChangeDate); - var jwt = CreateJwtToken(secret, portalSettings.PortalAlias.HTTPAlias, ptoken, userInfo.Roles); - var accessToken = jwt.RawData; - - // save hash values in DB so no one with access can create JWT header from existing data - ptoken.TokenHash = GetHashedStr(accessToken); - this.DataProvider.UpdateToken(ptoken); - - return new LoginResultData - { - UserId = userInfo.UserID, - DisplayName = userInfo.DisplayName, - AccessToken = accessToken, - RenewalToken = renewalToken, - }; - } - - /// - /// Checks for Authorization header and validates it is JWT scheme. If successful, it returns the token string. - /// - /// The request auhorization header. - /// The JWT passed in the request; otherwise, it returns null. - private string ValidateAuthHeader(AuthenticationHeaderValue authHdr) - { - if (authHdr == null) - { - // if (Logger.IsTraceEnabled) Logger.Trace("Authorization header not present in the request"); // too verbose; shows in all web requests - return null; - } - - if (!string.Equals(authHdr.Scheme, AuthScheme, StringComparison.CurrentCultureIgnoreCase)) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("Authorization header scheme in the request is not equal to " + this.SchemeType); - } - - return null; - } - - var authorization = authHdr.Parameter; - if (string.IsNullOrEmpty(authorization)) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("Missing authorization header value in the request"); - } - - return null; - } - - return authorization; - } - - private string ValidateAuthorizationValue(string authorization) - { - var parts = authorization.Split('.'); - if (parts.Length < 3) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("Token must have [header:claims:signature] parts at least"); - } - - return null; - } - - var decoded = DecodeBase64(parts[0]); - if (decoded.IndexOf("\"" + this.SchemeType + "\"", StringComparison.InvariantCultureIgnoreCase) < 0) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace($"This is not a {this.SchemeType} autentication scheme."); - } - - return null; - } - - var header = JsonConvert.DeserializeObject(decoded); - if (!this.IsValidSchemeType(header)) - { - return null; - } - - var jwt = GetAndValidateJwt(authorization, true); - if (jwt == null) - { - return null; - } - - var userInfo = this.TryGetUser(jwt, true); - return userInfo?.Username; - } - - private bool IsValidSchemeType(JwtHeader header) - { - if (!this.SchemeType.Equals(header["typ"] as string, StringComparison.OrdinalIgnoreCase)) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("Unsupported authentication scheme type " + header.Typ); - } - - return false; - } - - return true; - } - - private UserInfo TryGetUser(JwtSecurityToken jwt, bool checkExpiry) - { - // validate against DB saved data - var sessionId = GetJwtSessionValue(jwt); - var ptoken = this.DataProvider.GetTokenById(sessionId); - if (ptoken == null) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("Token not found in DB"); - } - - return null; - } - - if (checkExpiry) - { - var now = DateTime.UtcNow; - if (now > ptoken.TokenExpiry || now > ptoken.RenewalExpiry) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("DB Token is expired"); - } - - return null; - } - } - - if (ptoken.TokenHash != GetHashedStr(jwt.RawData)) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("Mismatch data in received token"); - } - - return null; - } - - var portalSettings = PortalController.Instance.GetCurrentPortalSettings(); - if (portalSettings == null) - { - Logger.Trace("Unable to retrieve portal settings"); - return null; - } - - var userInfo = UserController.GetUserById(portalSettings.PortalId, ptoken.UserId); - if (userInfo == null) - { - if (Logger.IsTraceEnabled) - { - Logger.Trace("Invalid user"); - } - - return null; - } - - var status = UserController.ValidateUser(userInfo, portalSettings.PortalId, false); - var valid = - status == UserValidStatus.VALID || - status == UserValidStatus.UPDATEPROFILE || - status == UserValidStatus.UPDATEPASSWORD; - - if (!valid && Logger.IsTraceEnabled) - { - Logger.Trace("Inactive user status: " + status); - return null; - } - - return userInfo; - } - } -} +namespace Dnn.AuthServices.Jwt.Components.Common.Controllers +{ + using System; + using System.Collections.Generic; + using System.IdentityModel.Tokens; + using System.Linq; + using System.Net.Http; + using System.Net.Http.Headers; + using System.Security.Claims; + using System.Security.Cryptography; + using System.Text; + + using Dnn.AuthServices.Jwt.Auth; + using Dnn.AuthServices.Jwt.Components.Entity; + using Dnn.AuthServices.Jwt.Data; + using DotNetNuke.Abstractions.Portals; + using DotNetNuke.Common; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Users; + using DotNetNuke.Framework; + using DotNetNuke.Instrumentation; + using DotNetNuke.Security.Membership; + using DotNetNuke.Web.Api; + using Newtonsoft.Json; + + /// + /// Controls JWT features. + /// + internal class JwtController : ServiceLocator, IJwtController + { + /// + /// The name of the authentication scheme header. + /// + public const string AuthScheme = "Bearer"; + + /// + /// A reference to the Dnn data provider. + /// + public readonly IDataService DataProvider = DataService.Instance; + + private const int ClockSkew = 5; // in minutes; default for clock skew + private const int SessionTokenTtl = 60; // in minutes = 1 hour + + private const int RenewalTokenTtl = 14; // in days = 2 weeks + private const string SessionClaimType = "sid"; + + private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(JwtController)); + private static readonly HashAlgorithm Hasher = SHA384.Create(); + private static readonly Encoding TextEncoder = Encoding.UTF8; + + /// + public string SchemeType => "JWT"; + + private static string NewSessionId => DateTime.UtcNow.Ticks.ToString("x16") + Guid.NewGuid().ToString("N").Substring(16); + + /// + public string ValidateToken(HttpRequestMessage request) + { + if (!JwtAuthMessageHandler.IsEnabled) + { + Logger.Trace(this.SchemeType + " is not registered/enabled in web.config file"); + return null; + } + + var authorization = this.ValidateAuthHeader(request?.Headers.Authorization); + return string.IsNullOrEmpty(authorization) ? null : this.ValidateAuthorizationValue(authorization); + } + + /// + public bool LogoutUser(HttpRequestMessage request) + { + if (!JwtAuthMessageHandler.IsEnabled) + { + Logger.Trace(this.SchemeType + " is not registered/enabled in web.config file"); + return false; + } + + var rawToken = this.ValidateAuthHeader(request?.Headers.Authorization); + if (string.IsNullOrEmpty(rawToken)) + { + return false; + } + + var jwt = new JwtSecurityToken(rawToken); + var sessionId = GetJwtSessionValue(jwt); + if (string.IsNullOrEmpty(sessionId)) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Session ID not found in the claim"); + } + + return false; + } + + this.DataProvider.DeleteToken(sessionId); + return true; + } + + /// + public LoginResultData LoginUser(HttpRequestMessage request, LoginData loginData) + { + if (!JwtAuthMessageHandler.IsEnabled) + { + Logger.Trace(this.SchemeType + " is not registered/enabled in web.config file"); + return EmptyWithError("disabled"); + } + + var portalSettings = PortalController.Instance.GetCurrentPortalSettings(); + if (portalSettings == null) + { + Logger.Trace("portalSettings = null"); + return EmptyWithError("no-portal"); + } + + var status = UserLoginStatus.LOGIN_FAILURE; + var ipAddress = request.GetIPAddress() ?? string.Empty; + var userInfo = UserController.ValidateUser( + portalSettings.PortalId, + loginData.Username, + loginData.Password, + "DNN", + string.Empty, + AuthScheme, + ipAddress, + ref status); + + if (userInfo == null) + { + Logger.Trace("user = null"); + return EmptyWithError("bad-credentials"); + } + + var valid = + status == UserLoginStatus.LOGIN_SUCCESS || + status == UserLoginStatus.LOGIN_SUPERUSER || + status == UserLoginStatus.LOGIN_INSECUREADMINPASSWORD || + status == UserLoginStatus.LOGIN_INSECUREHOSTPASSWORD; + + if (!valid) + { + Logger.Trace("login status = " + status); + return EmptyWithError("bad-credentials"); + } + + // save hash values in DB so no one with access can create JWT header from existing data + var sessionId = NewSessionId; + var now = DateTime.UtcNow; + var renewalToken = EncodeBase64(Hasher.ComputeHash(Guid.NewGuid().ToByteArray())); + var ptoken = new PersistedToken + { + TokenId = sessionId, + UserId = userInfo.UserID, + TokenExpiry = now.AddMinutes(SessionTokenTtl), + RenewalExpiry = now.AddDays(RenewalTokenTtl), + RenewalHash = GetHashedStr(renewalToken), + }; + + var secret = ObtainSecret(sessionId, portalSettings.GUID, userInfo.Membership.LastPasswordChangeDate); + var jwt = CreateJwtToken( + secret, + portalSettings.PortalAlias.HTTPAlias, + ptoken, + userInfo.Roles); + var accessToken = jwt.RawData; + + ptoken.TokenHash = GetHashedStr(accessToken); + this.DataProvider.AddToken(ptoken); + + return new LoginResultData + { + UserId = userInfo.UserID, + DisplayName = userInfo.DisplayName, + AccessToken = accessToken, + RenewalToken = renewalToken, + }; + } + + /// + public LoginResultData RenewToken(HttpRequestMessage request, string renewalToken) + { + if (!JwtAuthMessageHandler.IsEnabled) + { + Logger.Trace(this.SchemeType + " is not registered/enabled in web.config file"); + return EmptyWithError("disabled"); + } + + var rawToken = this.ValidateAuthHeader(request?.Headers.Authorization); + if (string.IsNullOrEmpty(rawToken)) + { + return EmptyWithError("bad-credentials"); + } + + var jwt = GetAndValidateJwt(rawToken, false); + if (jwt == null) + { + return EmptyWithError("bad-jwt"); + } + + var sessionId = GetJwtSessionValue(jwt); + if (string.IsNullOrEmpty(sessionId)) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Session ID not found in the claim"); + } + + return EmptyWithError("bad-claims"); + } + + var ptoken = this.DataProvider.GetTokenById(sessionId); + if (ptoken == null) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Token not found in DB"); + } + + return EmptyWithError("not-found"); + } + + if (ptoken.RenewalExpiry <= DateTime.UtcNow) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Token can't bwe renewed anymore"); + } + + return EmptyWithError("not-more-renewal"); + } + + if (ptoken.RenewalHash != GetHashedStr(renewalToken)) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Invalid renewal token"); + } + + return EmptyWithError("bad-token"); + } + + if (ptoken.TokenHash != GetHashedStr(rawToken)) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Invalid access token"); + } + + return EmptyWithError("bad-token"); + } + + var userInfo = this.TryGetUser(jwt, false); + if (userInfo == null) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("User not found in DB"); + } + + return EmptyWithError("not-found"); + } + + if (ptoken.UserId != userInfo.UserID) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Mismatch token and user"); + } + + return EmptyWithError("bad-token"); + } + + return this.UpdateToken(renewalToken, ptoken, userInfo); + } + + /// + protected override Func GetFactory() + { + return () => new JwtController(); + } + + private static LoginResultData EmptyWithError(string error) + { + return new LoginResultData { Error = error }; + } + + private static JwtSecurityToken CreateJwtToken(byte[] symmetricKey, string issuer, PersistedToken ptoken, IEnumerable roles) + { + // var key = Convert.FromBase64String(symmetricKey); + var credentials = new SigningCredentials( + new InMemorySymmetricSecurityKey(symmetricKey), + "http://www.w3.org/2001/04/xmldsig-more#hmac-sha256", + "http://www.w3.org/2001/04/xmlenc#sha256"); + + var claimsIdentity = new ClaimsIdentity(); + claimsIdentity.AddClaim(new Claim(SessionClaimType, ptoken.TokenId)); + claimsIdentity.AddClaims(roles.Select(r => new Claim(ClaimTypes.Role, r))); + + var notBefore = DateTime.UtcNow.AddMinutes(-ClockSkew); + var notAfter = ptoken.TokenExpiry; + var tokenHandler = new JwtSecurityTokenHandler(); + var token = tokenHandler.CreateToken(issuer, null, claimsIdentity, notBefore, notAfter, credentials); + return token; + } + + private static JwtSecurityToken GetAndValidateJwt(string rawToken, bool checkExpiry) + { + JwtSecurityToken jwt; + try + { + jwt = new JwtSecurityToken(rawToken); + } + catch (Exception ex) + { + Logger.Error("Unable to construct JWT object from authorization value. " + ex.Message); + return null; + } + + if (checkExpiry) + { + var now = DateTime.UtcNow; + if (now < jwt.ValidFrom || now > jwt.ValidTo) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Token is expired"); + } + + return null; + } + } + + var sessionId = GetJwtSessionValue(jwt); + if (string.IsNullOrEmpty(sessionId)) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Invaid session ID claim"); + } + + return null; + } + + return jwt; + } + + private static string GetJwtSessionValue(JwtSecurityToken jwt) + { + var sessionClaim = jwt?.Claims?.FirstOrDefault(claim => SessionClaimType.Equals(claim.Type)); + return sessionClaim?.Value; + } + + private static byte[] ObtainSecret(string sessionId, Guid portalGuid, DateTime userCreationDate) + { + // The secret should contain unpredictable components that can't be inferred from the JWT string. + var stext = string.Join(".", sessionId, portalGuid.ToString("N"), userCreationDate.ToUniversalTime().ToString("O")); + return TextEncoder.GetBytes(stext); + } + + private static string DecodeBase64(string b64Str) + { + // fix Base64 string padding + var mod = b64Str.Length % 4; + if (mod != 0) + { + b64Str += new string('=', 4 - mod); + } + + return TextEncoder.GetString(Convert.FromBase64String(b64Str)); + } + + private static string EncodeBase64(byte[] data) + { + return Convert.ToBase64String(data).TrimEnd('='); + } + + private static string GetHashedStr(string data) + { + return EncodeBase64(Hasher.ComputeHash(TextEncoder.GetBytes(data))); + } + + private LoginResultData UpdateToken(string renewalToken, PersistedToken ptoken, UserInfo userInfo) + { + var expiry = DateTime.UtcNow.AddMinutes(SessionTokenTtl); + if (expiry > ptoken.RenewalExpiry) + { + // don't extend beyond renewal expiry and make sure it is marked in UTC + expiry = new DateTime(ptoken.RenewalExpiry.Ticks, DateTimeKind.Utc); + } + + ptoken.TokenExpiry = expiry; + + var portalSettings = PortalController.Instance.GetCurrentPortalSettings(); + var secret = ObtainSecret(ptoken.TokenId, portalSettings.GUID, userInfo.Membership.LastPasswordChangeDate); + var jwt = CreateJwtToken(secret, portalSettings.PortalAlias.HTTPAlias, ptoken, userInfo.Roles); + var accessToken = jwt.RawData; + + // save hash values in DB so no one with access can create JWT header from existing data + ptoken.TokenHash = GetHashedStr(accessToken); + this.DataProvider.UpdateToken(ptoken); + + return new LoginResultData + { + UserId = userInfo.UserID, + DisplayName = userInfo.DisplayName, + AccessToken = accessToken, + RenewalToken = renewalToken, + }; + } + + /// + /// Checks for Authorization header and validates it is JWT scheme. If successful, it returns the token string. + /// + /// The request auhorization header. + /// The JWT passed in the request; otherwise, it returns null. + private string ValidateAuthHeader(AuthenticationHeaderValue authHdr) + { + if (authHdr == null) + { + // if (Logger.IsTraceEnabled) Logger.Trace("Authorization header not present in the request"); // too verbose; shows in all web requests + return null; + } + + if (!string.Equals(authHdr.Scheme, AuthScheme, StringComparison.CurrentCultureIgnoreCase)) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Authorization header scheme in the request is not equal to " + this.SchemeType); + } + + return null; + } + + var authorization = authHdr.Parameter; + if (string.IsNullOrEmpty(authorization)) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Missing authorization header value in the request"); + } + + return null; + } + + return authorization; + } + + private string ValidateAuthorizationValue(string authorization) + { + var parts = authorization.Split('.'); + if (parts.Length < 3) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Token must have [header:claims:signature] parts at least"); + } + + return null; + } + + var decoded = DecodeBase64(parts[0]); + if (decoded.IndexOf("\"" + this.SchemeType + "\"", StringComparison.InvariantCultureIgnoreCase) < 0) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace($"This is not a {this.SchemeType} autentication scheme."); + } + + return null; + } + + var header = JsonConvert.DeserializeObject(decoded); + if (!this.IsValidSchemeType(header)) + { + return null; + } + + var jwt = GetAndValidateJwt(authorization, true); + if (jwt == null) + { + return null; + } + + var userInfo = this.TryGetUser(jwt, true); + return userInfo?.Username; + } + + private bool IsValidSchemeType(JwtHeader header) + { + if (!this.SchemeType.Equals(header["typ"] as string, StringComparison.OrdinalIgnoreCase)) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Unsupported authentication scheme type " + header.Typ); + } + + return false; + } + + return true; + } + + private UserInfo TryGetUser(JwtSecurityToken jwt, bool checkExpiry) + { + // validate against DB saved data + var sessionId = GetJwtSessionValue(jwt); + var ptoken = this.DataProvider.GetTokenById(sessionId); + if (ptoken == null) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Token not found in DB"); + } + + return null; + } + + if (checkExpiry) + { + var now = DateTime.UtcNow; + if (now > ptoken.TokenExpiry || now > ptoken.RenewalExpiry) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("DB Token is expired"); + } + + return null; + } + } + + if (ptoken.TokenHash != GetHashedStr(jwt.RawData)) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Mismatch data in received token"); + } + + return null; + } + + var portalSettings = PortalController.Instance.GetCurrentSettings(); + if (portalSettings == null) + { + Logger.Trace("Unable to retrieve portal settings"); + return null; + } + + var userInfo = UserController.GetUserById(portalSettings.PortalId, ptoken.UserId); + if (userInfo == null) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Invalid user"); + } + + return null; + } + + var status = UserController.ValidateUser(userInfo, portalSettings.PortalId, false); + var valid = + status == UserValidStatus.VALID || + status == UserValidStatus.UPDATEPROFILE || + status == UserValidStatus.UPDATEPASSWORD; + + if (!valid) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Inactive user status: " + status); + } + + return null; + } + + if (!userInfo.Membership.Approved) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Non Approved user id: " + userInfo.UserID + " UserName: " + userInfo.Username); + } + + return null; + } + + if (userInfo.IsDeleted) + { + if (Logger.IsTraceEnabled) + { + Logger.Trace("Deleted user id: " + userInfo.UserID + " UserName: " + userInfo.Username); + } + + return null; + } + + return userInfo; + } + } +} diff --git a/DNN Platform/Dnn.AuthServices.Jwt/Components/Entity/LoginData.cs b/DNN Platform/Dnn.AuthServices.Jwt/Components/Entity/LoginData.cs index 61bb48f3d24..a40bb397b38 100644 --- a/DNN Platform/Dnn.AuthServices.Jwt/Components/Entity/LoginData.cs +++ b/DNN Platform/Dnn.AuthServices.Jwt/Components/Entity/LoginData.cs @@ -2,20 +2,26 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace Dnn.AuthServices.Jwt.Components.Entity -{ - using Newtonsoft.Json; +namespace Dnn.AuthServices.Jwt.Components.Entity +{ + using Newtonsoft.Json; - /// - /// Structure used for the Login to obtain a Json Web Token (JWT). - /// - [JsonObject] - public struct LoginData - { - [JsonProperty("u")] - public string Username; - - [JsonProperty("p")] - public string Password; - } -} + /// + /// Structure used for the Login to obtain a Json Web Token (JWT). + /// + [JsonObject] + public struct LoginData + { + /// + /// The authentication username. + /// + [JsonProperty("u")] + public string Username; + + /// + /// The authentication password. + /// + [JsonProperty("p")] + public string Password; + } +} diff --git a/DNN Platform/Dnn.AuthServices.Jwt/Components/Entity/LoginResultData.cs b/DNN Platform/Dnn.AuthServices.Jwt/Components/Entity/LoginResultData.cs index 4a5a8353431..6d097e95dd7 100644 --- a/DNN Platform/Dnn.AuthServices.Jwt/Components/Entity/LoginResultData.cs +++ b/DNN Platform/Dnn.AuthServices.Jwt/Components/Entity/LoginResultData.cs @@ -2,26 +2,44 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace Dnn.AuthServices.Jwt.Components.Entity -{ - using Newtonsoft.Json; +namespace Dnn.AuthServices.Jwt.Components.Entity +{ + using Newtonsoft.Json; - [JsonObject] - public class LoginResultData - { - [JsonProperty("userId")] - public int UserId { get; set; } - - [JsonProperty("displayName")] - public string DisplayName { get; set; } - - [JsonProperty("accessToken")] - public string AccessToken { get; set; } - - [JsonProperty("renewalToken")] - public string RenewalToken { get; set; } - - [JsonIgnore] - public string Error { get; set; } - } -} + /// + /// Represents information about a login result. + /// + [JsonObject] + public class LoginResultData + { + /// + /// Gets or sets the id of the user. + /// + [JsonProperty("userId")] + public int UserId { get; set; } + + /// + /// Gets or sets the user display name. + /// + [JsonProperty("displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets the access token. + /// + [JsonProperty("accessToken")] + public string AccessToken { get; set; } + + /// + /// Gets or sets the renewal token. + /// + [JsonProperty("renewalToken")] + public string RenewalToken { get; set; } + + /// + /// Gets or sets any error message. + /// + [JsonIgnore] + public string Error { get; set; } + } +} diff --git a/DNN Platform/Dnn.AuthServices.Jwt/Components/Entity/PersistedToken.cs b/DNN Platform/Dnn.AuthServices.Jwt/Components/Entity/PersistedToken.cs index a2f14d5eec7..73f025904eb 100644 --- a/DNN Platform/Dnn.AuthServices.Jwt/Components/Entity/PersistedToken.cs +++ b/DNN Platform/Dnn.AuthServices.Jwt/Components/Entity/PersistedToken.cs @@ -2,25 +2,49 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace Dnn.AuthServices.Jwt.Components.Entity -{ - using System; - - [Serializable] - public class PersistedToken - { - public string TokenId { get; set; } - - public int UserId { get; set; } - - public int RenewCount { get; set; } - - public DateTime TokenExpiry { get; set; } - - public DateTime RenewalExpiry { get; set; } - - public string TokenHash { get; set; } - - public string RenewalHash { get; set; } - } -} +namespace Dnn.AuthServices.Jwt.Components.Entity +{ + using System; + + /// + /// Represents a persisted token. + /// + [Serializable] + public class PersistedToken + { + /// + /// Gets or sets the ID for the token. + /// + public string TokenId { get; set; } + + /// + /// Gets or sets the id of the user. + /// + public int UserId { get; set; } + + /// + /// Gets or sets the renewal count. + /// + public int RenewCount { get; set; } + + /// + /// Gets or sets a value indicating when the token expires. + /// + public DateTime TokenExpiry { get; set; } + + /// + /// Gets or sets when the renewal token expires. + /// + public DateTime RenewalExpiry { get; set; } + + /// + /// Gets or sets the token hash value. + /// + public string TokenHash { get; set; } + + /// + /// Gets or sets the renewal token hash value. + /// + public string RenewalHash { get; set; } + } +} diff --git a/DNN Platform/Dnn.AuthServices.Jwt/Components/Entity/RenewalDto.cs b/DNN Platform/Dnn.AuthServices.Jwt/Components/Entity/RenewalDto.cs index 5c64b7a6a57..cecd322ccd5 100644 --- a/DNN Platform/Dnn.AuthServices.Jwt/Components/Entity/RenewalDto.cs +++ b/DNN Platform/Dnn.AuthServices.Jwt/Components/Entity/RenewalDto.cs @@ -2,14 +2,20 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace Dnn.AuthServices.Jwt.Components.Entity -{ - using Newtonsoft.Json; +namespace Dnn.AuthServices.Jwt.Components.Entity +{ + using Newtonsoft.Json; - [JsonObject] - public class RenewalDto - { - [JsonProperty("rtoken")] - public string RenewalToken; - } -} + /// + /// Renewal token data transfer object. + /// + [JsonObject] + public class RenewalDto + { + /// + /// A string representing the renewal token. + /// + [JsonProperty("rtoken")] + public string RenewalToken; + } +} diff --git a/DNN Platform/Dnn.AuthServices.Jwt/Components/Schedule/PurgeExpiredTokensTask.cs b/DNN Platform/Dnn.AuthServices.Jwt/Components/Schedule/PurgeExpiredTokensTask.cs new file mode 100644 index 00000000000..6640ec9c073 --- /dev/null +++ b/DNN Platform/Dnn.AuthServices.Jwt/Components/Schedule/PurgeExpiredTokensTask.cs @@ -0,0 +1,52 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + +namespace Dnn.AuthServices.Jwt.Components.Schedule +{ + using System; + + using Dnn.AuthServices.Jwt.Data; + using DotNetNuke.Instrumentation; + using DotNetNuke.Services.Exceptions; + using DotNetNuke.Services.Scheduling; + + /// + /// Scheduled task to delete tokens that linger in the database after having expired. + /// + public class PurgeExpiredTokensTask : SchedulerClient + { + private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(PurgeExpiredTokensTask)); + + /// + /// Initializes a new instance of the class. + /// + /// The object used to record the results from this task. + public PurgeExpiredTokensTask(ScheduleHistoryItem objScheduleHistoryItem) + { + this.ScheduleHistoryItem = objScheduleHistoryItem; + } + + /// + /// Runs when the task is triggered by DNN. + /// + public override void DoWork() + { + try + { + Logger.Info("Starting PurgeExpiredTokensTask"); + DataService.Instance.DeleteExpiredTokens(); + Logger.Info("Finished PurgeExpiredTokensTask"); + this.ScheduleHistoryItem.Succeeded = true; + } + catch (Exception exc) + { + this.ScheduleHistoryItem.Succeeded = false; + this.ScheduleHistoryItem.AddLogNote(string.Format("Purging expired tokens task failed: {0}.", exc.ToString())); + this.Errored(ref exc); + Logger.ErrorFormat("Error in PurgeExpiredTokensTask: {0}. {1}", exc.Message, exc.StackTrace); + Exceptions.LogException(exc); + } + } + } +} diff --git a/DNN Platform/Dnn.AuthServices.Jwt/Data/DataService.cs b/DNN Platform/Dnn.AuthServices.Jwt/Data/DataService.cs index fd919cd91e0..27ea2c4a515 100644 --- a/DNN Platform/Dnn.AuthServices.Jwt/Data/DataService.cs +++ b/DNN Platform/Dnn.AuthServices.Jwt/Data/DataService.cs @@ -2,83 +2,95 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace Dnn.AuthServices.Jwt.Data -{ - using System; - using System.Collections.Generic; - using System.Web.Caching; +namespace Dnn.AuthServices.Jwt.Data +{ + using System; + using System.Collections.Generic; + using System.Web.Caching; - using Dnn.AuthServices.Jwt.Components.Entity; - using DotNetNuke.Common.Utilities; - using DotNetNuke.ComponentModel; - using DotNetNuke.Data; + using Dnn.AuthServices.Jwt.Components.Entity; + using DotNetNuke.Common.Utilities; + using DotNetNuke.ComponentModel; + using DotNetNuke.Data; - /// ----------------------------------------------------------------------------- - /// - /// This class provides the Data Access Layer for the JWT Authentication library. - /// - public class DataService : ComponentBase, IDataService - { - private readonly DataProvider _dataProvider = DataProvider.Instance(); - - public virtual PersistedToken GetTokenById(string tokenId) - { - try - { - return CBO.GetCachedObject( - new CacheItemArgs(GetCacheKey(tokenId), 60, CacheItemPriority.Default), - _ => CBO.FillObject(this._dataProvider.ExecuteReader("JsonWebTokens_GetById", tokenId))); - } - catch (InvalidCastException) - { - // occurs when no record found in th DB - return null; - } - } - - public virtual IList GetUserTokens(int userId) - { - return CBO.FillCollection(this._dataProvider.ExecuteReader("JsonWebTokens_GetByUserId", userId)); - } - - public virtual void AddToken(PersistedToken token) - { - this._dataProvider.ExecuteNonQuery("JsonWebTokens_Add", token.TokenId, token.UserId, - token.TokenExpiry, token.RenewalExpiry, token.TokenHash, token.RenewalHash); - DataCache.SetCache(GetCacheKey(token.TokenId), token, token.TokenExpiry.ToLocalTime()); - } - - public virtual void UpdateToken(PersistedToken token) - { - this._dataProvider.ExecuteNonQuery("JsonWebTokens_Update", token.TokenId, token.TokenExpiry, token.TokenHash); - token.RenewCount += 1; - DataCache.SetCache(GetCacheKey(token.TokenId), token, token.TokenExpiry.ToLocalTime()); - } - - public virtual void DeleteToken(string tokenId) - { - this._dataProvider.ExecuteNonQuery("JsonWebTokens_DeleteById", tokenId); - DataCache.RemoveCache(GetCacheKey(tokenId)); - } - - public virtual void DeleteUserTokens(int userId) - { - this._dataProvider.ExecuteNonQuery("JsonWebTokens_DeleteByUser", userId); - foreach (var token in this.GetUserTokens(userId)) - { - DataCache.RemoveCache(GetCacheKey(token.TokenId)); - } - } - - public virtual void DeleteExpiredTokens() - { - // don't worry aabout caching; these will already be invalidated by cache manager - this._dataProvider.ExecuteNonQuery("JsonWebTokens_DeleteExpired"); - } - - private static string GetCacheKey(string tokenId) - { - return string.Join(":", "JsonWebTokens", tokenId); - } - } -} + /// + /// This class provides the Data Access Layer for the JWT Authentication library. + /// + public class DataService : ComponentBase, IDataService + { + private readonly DataProvider dataProvider = DataProvider.Instance(); + + /// + public virtual PersistedToken GetTokenById(string tokenId) + { + try + { + return CBO.GetCachedObject( + new CacheItemArgs(GetCacheKey(tokenId), 60, CacheItemPriority.Default), + _ => CBO.FillObject(this.dataProvider.ExecuteReader("JsonWebTokens_GetById", tokenId))); + } + catch (InvalidCastException) + { + // occurs when no record found in th DB + return null; + } + } + + /// + public virtual IList GetUserTokens(int userId) + { + return CBO.FillCollection(this.dataProvider.ExecuteReader("JsonWebTokens_GetByUserId", userId)); + } + + /// + public virtual void AddToken(PersistedToken token) + { + this.dataProvider.ExecuteNonQuery( + "JsonWebTokens_Add", + token.TokenId, + token.UserId, + token.TokenExpiry, + token.RenewalExpiry, + token.TokenHash, + token.RenewalHash); + DataCache.SetCache(GetCacheKey(token.TokenId), token, token.TokenExpiry.ToLocalTime()); + } + + /// + public virtual void UpdateToken(PersistedToken token) + { + this.dataProvider.ExecuteNonQuery("JsonWebTokens_Update", token.TokenId, token.TokenExpiry, token.TokenHash); + token.RenewCount += 1; + DataCache.SetCache(GetCacheKey(token.TokenId), token, token.TokenExpiry.ToLocalTime()); + } + + /// + public virtual void DeleteToken(string tokenId) + { + this.dataProvider.ExecuteNonQuery("JsonWebTokens_DeleteById", tokenId); + DataCache.RemoveCache(GetCacheKey(tokenId)); + } + + /// + public virtual void DeleteUserTokens(int userId) + { + this.dataProvider.ExecuteNonQuery("JsonWebTokens_DeleteByUser", userId); + foreach (var token in this.GetUserTokens(userId)) + { + DataCache.RemoveCache(GetCacheKey(token.TokenId)); + } + } + + /// + public virtual void DeleteExpiredTokens() + { + // don't worry about caching; these will already be invalidated by cache manager + this.dataProvider.ExecuteNonQuery("JsonWebTokens_DeleteExpired"); + } + + private static string GetCacheKey(string tokenId) + { + return string.Join(":", "JsonWebTokens", tokenId); + } + } +} diff --git a/DNN Platform/Dnn.AuthServices.Jwt/Data/IDataService.cs b/DNN Platform/Dnn.AuthServices.Jwt/Data/IDataService.cs index 440ea428650..8bdd7b7e109 100644 --- a/DNN Platform/Dnn.AuthServices.Jwt/Data/IDataService.cs +++ b/DNN Platform/Dnn.AuthServices.Jwt/Data/IDataService.cs @@ -8,20 +8,52 @@ namespace Dnn.AuthServices.Jwt.Data using Dnn.AuthServices.Jwt.Components.Entity; + /// + /// Provides data access services. + /// public interface IDataService - { + { + /// + /// Gets a token by a given token id. + /// + /// The token id. + /// . PersistedToken GetTokenById(string tokenId); - + + /// + /// Gets a user token by the user id. + /// + /// The id of the user. + /// A list of tokens. IList GetUserTokens(int userId); - + + /// + /// Adds (persists) a token. + /// + /// The token to persist. void AddToken(PersistedToken token); - + + /// + /// Updates an existing token. + /// + /// The token to persist. void UpdateToken(PersistedToken token); - + + /// + /// Deletes an existing token. + /// + /// The id of the token to delete. void DeleteToken(string tokenId); - + + /// + /// Deletes all tokens for a user. + /// + /// The id of user for which to delete the tokens. void DeleteUserTokens(int userId); - + + /// + /// Deletes the expired tokens. + /// void DeleteExpiredTokens(); } } diff --git a/DNN Platform/Dnn.AuthServices.Jwt/Data/Scripts/09.08.00.SqlDataProvider b/DNN Platform/Dnn.AuthServices.Jwt/Data/Scripts/09.08.00.SqlDataProvider new file mode 100644 index 00000000000..210651c1184 --- /dev/null +++ b/DNN Platform/Dnn.AuthServices.Jwt/Data/Scripts/09.08.00.SqlDataProvider @@ -0,0 +1,42 @@ +/* Add Schedule Job */ +/*************************************/ +IF NOT EXISTS(SELECT 1 FROM {databaseOwner}{objectQualifier}Schedule WHERE TypeFullName = 'Dnn.AuthServices.Jwt.Components.Schedule.PurgeExpiredTokensTask, Dnn.AuthServices.Jwt') +BEGIN + INSERT INTO {databaseOwner}{objectQualifier}Schedule + ( [TypeFullName] + ,[TimeLapse] + ,[TimeLapseMeasurement] + ,[RetryTimeLapse] + ,[RetryTimeLapseMeasurement] + ,[RetainHistoryNum] + ,[AttachToEvent] + ,[CatchUpEnabled] + ,[Enabled] + ,[ObjectDependencies] + ,[Servers] + ,[CreatedByUserID] + ,[CreatedOnDate] + ,[LastModifiedByUserID] + ,[LastModifiedOnDate] + ,[FriendlyName] + ) VALUES + ( 'Dnn.AuthServices.Jwt.Components.Schedule.PurgeExpiredTokensTask, Dnn.AuthServices.Jwt' + ,1 + ,N'd' + ,6 + ,N'h' + ,10 + ,N'' + ,0 + ,1 + ,N'' + ,NULL + ,NULL + ,NULL + ,NULL + ,NULL + ,N'Purge Expired JWT Tokens' + ) +END +GO + diff --git a/DNN Platform/Dnn.AuthServices.Jwt/Data/Scripts/Uninstall.SqlDataProvider b/DNN Platform/Dnn.AuthServices.Jwt/Data/Scripts/Uninstall.SqlDataProvider index f3cb2eed269..7ee08a2def9 100644 --- a/DNN Platform/Dnn.AuthServices.Jwt/Data/Scripts/Uninstall.SqlDataProvider +++ b/DNN Platform/Dnn.AuthServices.Jwt/Data/Scripts/Uninstall.SqlDataProvider @@ -42,6 +42,9 @@ IF OBJECT_ID(N'{databaseOwner}{objectQualifier}JsonWebTokens', N'U') IS NOT NULL DROP TABLE {databaseOwner}[{objectQualifier}JsonWebTokens] GO +DELETE FROM {databaseOwner}{objectQualifier}Schedule WHERE TypeFullName = 'Dnn.AuthServices.Jwt.Components.Schedule.PurgeExpiredTokensTask, Dnn.AuthServices.Jwt' +GO + /************************************************************/ /***** SqlDataProvider *****/ /************************************************************/ \ No newline at end of file diff --git a/DNN Platform/Dnn.AuthServices.Jwt/Dnn.AuthServices.Jwt.csproj b/DNN Platform/Dnn.AuthServices.Jwt/Dnn.AuthServices.Jwt.csproj index f048833cd07..c67c94d060b 100644 --- a/DNN Platform/Dnn.AuthServices.Jwt/Dnn.AuthServices.Jwt.csproj +++ b/DNN Platform/Dnn.AuthServices.Jwt/Dnn.AuthServices.Jwt.csproj @@ -73,6 +73,7 @@ + @@ -84,6 +85,7 @@ stylecop.json + Designer @@ -97,6 +99,10 @@ + + {6928A9B1-F88A-4581-A132-D3EB38669BB0} + DotNetNuke.Abstractions + {3cd5f6b8-8360-4862-80b6-f402892db7dd} DotNetNuke.Instrumentation diff --git a/DNN Platform/Dnn.AuthServices.Jwt/Dnn.Jwt.dnn b/DNN Platform/Dnn.AuthServices.Jwt/Dnn.Jwt.dnn index 3cb0a361cf6..ba1e276c62f 100644 --- a/DNN Platform/Dnn.AuthServices.Jwt/Dnn.Jwt.dnn +++ b/DNN Platform/Dnn.AuthServices.Jwt/Dnn.Jwt.dnn @@ -1,6 +1,6 @@ - + DNN JWT Auth Handler DNN Json Web Token Authentication (JWT) library for cookie-less Mobile authentication clients @@ -37,6 +37,11 @@ 01.00.00.SqlDataProvider 01.00.00 + "; - this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "DnnFormNumericTextBoxItem", initalizeScript); - - return this._textBox; - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - this.FormMode = DnnFormMode.Short; - } - - private void TextChanged(object sender, EventArgs e) - { - this.UpdateDataSource(this.Value, this._textBox.Text, this.DataField); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnFormNumericTextBoxItem : DnnFormItemBase + { + // private DnnNumericTextBox _textBox; + private TextBox _textBox; + + public DnnFormNumericTextBoxItem() + { + this.TextBoxWidth = new Unit(100); + this.ShowSpinButtons = true; + this.Type = NumericType.Number; + this.DecimalDigits = 0; + } + + public int DecimalDigits { get; set; } + + public bool ShowSpinButtons { get; set; } + + public Unit TextBoxWidth { get; set; } + + public NumericType Type { get; set; } + + protected override WebControl CreateControlInternal(Control container) + { + // _textBox = new DnnNumericTextBox {EmptyMessage = LocalizeString(ResourceKey + ".Hint"), ID = ID + "_TextBox", Width = TextBoxWidth }; + this._textBox = new TextBox(); + this._textBox.CssClass = "DnnNumericTextBox"; + + // _textBox.Style.Add("float", "none"); + // _textBox.EmptyMessageStyle.CssClass += "dnnformHint"; + // _textBox.Type = Type; + // _textBox.NumberFormat.DecimalDigits = DecimalDigits; + // _textBox.ShowSpinButtons = ShowSpinButtons; + this._textBox.TextChanged += this.TextChanged; + + // Load from ControlState + this._textBox.Text = Convert.ToString(this.Value); + + container.Controls.Add(this._textBox); + JavaScript.RequestRegistration(CommonJs.DnnPlugins); + + var initalizeScript = ""; + this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "DnnFormNumericTextBoxItem", initalizeScript); + + return this._textBox; + } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + + this.FormMode = DnnFormMode.Short; + } + + private void TextChanged(object sender, EventArgs e) + { + this.UpdateDataSource(this.Value, this._textBox.Text, this.DataField); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormPagesItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormPagesItem.cs index 7f48243edff..a6e49ca7a35 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormPagesItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormPagesItem.cs @@ -2,19 +2,22 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Tabs; - using DotNetNuke.Services.Localization; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; - public class DnnFormPagesItem : DnnFormComboBoxItem - { - public DnnFormPagesItem() - { - this.ListSource = TabController.GetPortalTabs(this.PortalSettings.PortalId, Null.NullInteger, true, "<" + Localization.GetString("None_Specified") + ">", true, false, true, true, false); - this.ListTextField = "TabName"; - this.ListValueField = "TabID"; - } - } -} + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Tabs; + using DotNetNuke.Services.Localization; + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnFormPagesItem : DnnFormComboBoxItem + { + public DnnFormPagesItem() + { + this.ListSource = TabController.GetPortalTabs(this.PortalSettings.PortalId, Null.NullInteger, true, "<" + Localization.GetString("None_Specified") + ">", true, false, true, true, false); + this.ListTextField = "TabName"; + this.ListValueField = "TabID"; + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormSkinsItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormSkinsItem.cs index 2e9c5582bda..5493942ad0e 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormSkinsItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormSkinsItem.cs @@ -1,115 +1,116 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Web.UI; - using System.Web.UI.WebControls; - - using DotNetNuke.Entities.Portals; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Web.UI; + using System.Web.UI.WebControls; + + using DotNetNuke.Entities.Portals; using DotNetNuke.UI.Skins; - public class DnnFormSkinsItem : DnnFormItemBase - { - // private DropDownList _containerCombo; - private DnnComboBox _containerCombo; - private object _containerValue; - - // private DropDownList _skinCombo; - private DnnComboBox _skinCombo; - private object _skinValue; - - public string ContainerDataField { get; set; } - - public bool IncludePortalSkins { get; set; } - - public int PortalId { get; set; } - - public string SkinDataField { get; set; } - - protected override WebControl CreateControlInternal(Control container) - { - var panel = new Panel(); - - container.Controls.Add(panel); - - var skinLabel = new Label { Text = this.LocalizeString("Skin") }; - skinLabel.CssClass += "dnnFormSkinLabel"; - panel.Controls.Add(skinLabel); - - // _skinCombo = new DropDownList { ID = ID + "_SkinComboBox" }; - this._skinCombo = new DnnComboBox { ID = this.ID + "_SkinComboBox" }; - this._skinCombo.CssClass += "dnnFormSkinInput"; - this._skinCombo.SelectedIndexChanged += this.SkinIndexChanged; - panel.Controls.Add(this._skinCombo); - - DnnFormComboBoxItem.BindListInternal(this._skinCombo, this._skinValue, this.GetSkins(SkinController.RootSkin), "Key", "Value"); - - var containerLabel = new Label { Text = this.LocalizeString("Container") }; - containerLabel.CssClass += "dnnFormSkinLabel"; - panel.Controls.Add(containerLabel); - - // _containerCombo = new DropDownList { ID = ID + "_ContainerComboBox" }; - this._containerCombo = new DnnComboBox { ID = this.ID + "_ContainerComboBox" }; - this._containerCombo.CssClass += "dnnFormSkinInput"; - this._containerCombo.SelectedIndexChanged += this.ContainerIndexChanged; - panel.Controls.Add(this._containerCombo); - - DnnFormComboBoxItem.BindListInternal(this._containerCombo, this._containerValue, this.GetSkins(SkinController.RootContainer), "Key", "Value"); - - return panel; - } - - protected override void DataBindInternal() - { - this.DataBindInternal(this.SkinDataField, ref this._skinValue); - - this.DataBindInternal(this.ContainerDataField, ref this._containerValue); - - this.Value = new Pair { First = this._skinValue, Second = this._containerValue }; - } - - protected override void LoadControlState(object state) - { - base.LoadControlState(state); - var pair = this.Value as Pair; - if (pair != null) - { - this._skinValue = pair.First; - this._containerValue = pair.Second; - } - } - - private void ContainerIndexChanged(object sender, EventArgs e) - { - this.UpdateDataSource(this._containerValue, this._containerCombo.SelectedValue, this.ContainerDataField); - } - - private void SkinIndexChanged(object sender, EventArgs e) - { - this.UpdateDataSource(this._skinValue, this._skinCombo.SelectedValue, this.SkinDataField); - } - - private Dictionary GetSkins(string skinRoot) - { - // load host skins - var skins = SkinController.GetSkins(null, skinRoot, SkinScope.Host).ToDictionary(skin => skin.Key, skin => skin.Value); - - if (this.IncludePortalSkins) - { - // load portal skins - var portal = PortalController.Instance.GetPortal(this.PortalId); - - foreach (var skin in SkinController.GetSkins(portal, skinRoot, SkinScope.Site)) - { - skins.Add(skin.Key, skin.Value); - } - } - - return skins; - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnFormSkinsItem : DnnFormItemBase + { + // private DropDownList _containerCombo; + private DnnComboBox _containerCombo; + private object _containerValue; + + // private DropDownList _skinCombo; + private DnnComboBox _skinCombo; + private object _skinValue; + + public string ContainerDataField { get; set; } + + public bool IncludePortalSkins { get; set; } + + public int PortalId { get; set; } + + public string SkinDataField { get; set; } + + protected override WebControl CreateControlInternal(Control container) + { + var panel = new Panel(); + + container.Controls.Add(panel); + + var skinLabel = new Label { Text = this.LocalizeString("Skin") }; + skinLabel.CssClass += "dnnFormSkinLabel"; + panel.Controls.Add(skinLabel); + + // _skinCombo = new DropDownList { ID = ID + "_SkinComboBox" }; + this._skinCombo = new DnnComboBox { ID = this.ID + "_SkinComboBox" }; + this._skinCombo.CssClass += "dnnFormSkinInput"; + this._skinCombo.SelectedIndexChanged += this.SkinIndexChanged; + panel.Controls.Add(this._skinCombo); + + DnnFormComboBoxItem.BindListInternal(this._skinCombo, this._skinValue, this.GetSkins(SkinController.RootSkin), "Key", "Value"); + + var containerLabel = new Label { Text = this.LocalizeString("Container") }; + containerLabel.CssClass += "dnnFormSkinLabel"; + panel.Controls.Add(containerLabel); + + // _containerCombo = new DropDownList { ID = ID + "_ContainerComboBox" }; + this._containerCombo = new DnnComboBox { ID = this.ID + "_ContainerComboBox" }; + this._containerCombo.CssClass += "dnnFormSkinInput"; + this._containerCombo.SelectedIndexChanged += this.ContainerIndexChanged; + panel.Controls.Add(this._containerCombo); + + DnnFormComboBoxItem.BindListInternal(this._containerCombo, this._containerValue, this.GetSkins(SkinController.RootContainer), "Key", "Value"); + + return panel; + } + + protected override void DataBindInternal() + { + this.DataBindInternal(this.SkinDataField, ref this._skinValue); + + this.DataBindInternal(this.ContainerDataField, ref this._containerValue); + + this.Value = new Pair { First = this._skinValue, Second = this._containerValue }; + } + + protected override void LoadControlState(object state) + { + base.LoadControlState(state); + var pair = this.Value as Pair; + if (pair != null) + { + this._skinValue = pair.First; + this._containerValue = pair.Second; + } + } + + private void ContainerIndexChanged(object sender, EventArgs e) + { + this.UpdateDataSource(this._containerValue, this._containerCombo.SelectedValue, this.ContainerDataField); + } + + private void SkinIndexChanged(object sender, EventArgs e) + { + this.UpdateDataSource(this._skinValue, this._skinCombo.SelectedValue, this.SkinDataField); + } + + private Dictionary GetSkins(string skinRoot) + { + // load host skins + var skins = SkinController.GetSkins(null, skinRoot, SkinScope.Host).ToDictionary(skin => skin.Key, skin => skin.Value); + + if (this.IncludePortalSkins) + { + // load portal skins + var portal = PortalController.Instance.GetPortal(this.PortalId); + + foreach (var skin in SkinController.GetSkins(portal, skinRoot, SkinScope.Site)) + { + skins.Add(skin.Key, skin.Value); + } + } + + return skins; + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormToggleButtonItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormToggleButtonItem.cs index a656e1f869b..290c57b7cd6 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormToggleButtonItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormToggleButtonItem.cs @@ -1,89 +1,88 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI; + using System.Web.UI.WebControls; - using Telerik.Web.UI; + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnFormToggleButtonItem : DnnFormItemBase + { + // private DnnRadButton _checkBox; + private CheckBox _checkBox; - public class DnnFormToggleButtonItem : DnnFormItemBase - { - // private DnnRadButton _checkBox; - private CheckBox _checkBox; - - public DnnFormToggleButtonItem() - { - this.Mode = CheckBoxMode.TrueFalse; - } - - public enum CheckBoxMode - { - TrueFalse = 0, - YN = 1, - YesNo = 2, - } - - public CheckBoxMode Mode { get; set; } - - protected override WebControl CreateControlInternal(Control container) - { - // _checkBox = new DnnRadButton {ID = ID + "_CheckBox", ButtonType = RadButtonType.ToggleButton, ToggleType = ButtonToggleType.CheckBox, AutoPostBack = false}; - this._checkBox = new CheckBox { ID = this.ID + "_CheckBox", AutoPostBack = false }; - - this._checkBox.CheckedChanged += this.CheckedChanged; - container.Controls.Add(this._checkBox); - - // Load from ControlState - if (!this._checkBox.Page.IsPostBack) - { - } - - switch (this.Mode) - { - case CheckBoxMode.YN: - case CheckBoxMode.YesNo: - var stringValue = this.Value as string; - if (stringValue != null) - { - this._checkBox.Checked = stringValue.StartsWith("Y", StringComparison.InvariantCultureIgnoreCase); - } - - break; - default: - this._checkBox.Checked = Convert.ToBoolean(this.Value); - break; - } - - return this._checkBox; - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - this.FormMode = DnnFormMode.Short; - } - - private void CheckedChanged(object sender, EventArgs e) - { - string newValue; - switch (this.Mode) - { - case CheckBoxMode.YN: - newValue = this._checkBox.Checked ? "Y" : "N"; - break; - case CheckBoxMode.YesNo: - newValue = this._checkBox.Checked ? "Yes" : "No"; - break; - default: - newValue = this._checkBox.Checked ? "true" : "false"; - break; - } - - this.UpdateDataSource(this.Value, newValue, this.DataField); - } - } -} + public DnnFormToggleButtonItem() + { + this.Mode = CheckBoxMode.TrueFalse; + } + + public enum CheckBoxMode + { + TrueFalse = 0, + YN = 1, + YesNo = 2, + } + + public CheckBoxMode Mode { get; set; } + + protected override WebControl CreateControlInternal(Control container) + { + // _checkBox = new DnnRadButton {ID = ID + "_CheckBox", ButtonType = RadButtonType.ToggleButton, ToggleType = ButtonToggleType.CheckBox, AutoPostBack = false}; + this._checkBox = new CheckBox { ID = this.ID + "_CheckBox", AutoPostBack = false }; + + this._checkBox.CheckedChanged += this.CheckedChanged; + container.Controls.Add(this._checkBox); + + // Load from ControlState + if (!this._checkBox.Page.IsPostBack) + { + } + + switch (this.Mode) + { + case CheckBoxMode.YN: + case CheckBoxMode.YesNo: + var stringValue = this.Value as string; + if (stringValue != null) + { + this._checkBox.Checked = stringValue.StartsWith("Y", StringComparison.InvariantCultureIgnoreCase); + } + + break; + default: + this._checkBox.Checked = Convert.ToBoolean(this.Value); + break; + } + + return this._checkBox; + } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + + this.FormMode = DnnFormMode.Short; + } + + private void CheckedChanged(object sender, EventArgs e) + { + string newValue; + switch (this.Mode) + { + case CheckBoxMode.YN: + newValue = this._checkBox.Checked ? "Y" : "N"; + break; + case CheckBoxMode.YesNo: + newValue = this._checkBox.Checked ? "Yes" : "No"; + break; + default: + newValue = this._checkBox.Checked ? "true" : "false"; + break; + } + + this.UpdateDataSource(this.Value, newValue, this.DataField); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGrid.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGrid.cs index add61de6228..c2a3c2875ea 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGrid.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGrid.cs @@ -1,62 +1,63 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using DotNetNuke.Framework; - using DotNetNuke.Framework.JavaScriptLibraries; + using DotNetNuke.Framework.JavaScriptLibraries; using DotNetNuke.Services.Localization; - using Telerik.Web.UI; - - public class DnnGrid : RadGrid - { - public int ScreenRowNumber { get; set; } - - public int RowHeight { get; set; } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - this.EnableEmbeddedBaseStylesheet = false; - Utilities.ApplySkin(this); - JavaScript.RequestRegistration(CommonJs.DnnPlugins); - if (string.IsNullOrEmpty(this.ClientSettings.ClientEvents.OnGridCreated)) - { - this.ClientSettings.ClientEvents.OnGridCreated = "$.dnnGridCreated"; - } - - this.PreRender += new EventHandler(this.DnnGrid_PreRender); - - this.MasterTableView.NoMasterRecordsText = Localization.GetString("NoRecords", Localization.SharedResourceFile); - } - - private void DnnGrid_PreRender(object sender, EventArgs e) - { - var items = this.MasterTableView.Items; - if (this.ScreenRowNumber == 0) - { - this.ScreenRowNumber = 15; - } - - if (items.Count > this.ScreenRowNumber) - { - // need scroll - this.ClientSettings.Scrolling.AllowScroll = true; - this.ClientSettings.Scrolling.UseStaticHeaders = true; - - if (this.RowHeight == 0) - { - this.RowHeight = 25; - } - - this.ClientSettings.Scrolling.ScrollHeight = this.RowHeight * this.ScreenRowNumber; - } - else - { - this.ClientSettings.Scrolling.AllowScroll = false; - } - } - } -} + using Telerik.Web.UI; + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGrid : RadGrid + { + public int ScreenRowNumber { get; set; } + + public int RowHeight { get; set; } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + this.EnableEmbeddedBaseStylesheet = false; + Utilities.ApplySkin(this); + JavaScript.RequestRegistration(CommonJs.DnnPlugins); + if (string.IsNullOrEmpty(this.ClientSettings.ClientEvents.OnGridCreated)) + { + this.ClientSettings.ClientEvents.OnGridCreated = "$.dnnGridCreated"; + } + + this.PreRender += new EventHandler(this.DnnGrid_PreRender); + + this.MasterTableView.NoMasterRecordsText = Localization.GetString("NoRecords", Localization.SharedResourceFile); + } + + private void DnnGrid_PreRender(object sender, EventArgs e) + { + var items = this.MasterTableView.Items; + if (this.ScreenRowNumber == 0) + { + this.ScreenRowNumber = 15; + } + + if (items.Count > this.ScreenRowNumber) + { + // need scroll + this.ClientSettings.Scrolling.AllowScroll = true; + this.ClientSettings.Scrolling.UseStaticHeaders = true; + + if (this.RowHeight == 0) + { + this.RowHeight = 25; + } + + this.ClientSettings.Scrolling.ScrollHeight = this.RowHeight * this.ScreenRowNumber; + } + else + { + this.ClientSettings.Scrolling.AllowScroll = false; + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridAttachmentColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridAttachmentColumn.cs index 7f31c0475e0..36948e98f56 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridAttachmentColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridAttachmentColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridGroupSplitterColumn : GridGroupSplitterColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridGroupSplitterColumn dnnGridColumn = new DnnGridGroupSplitterColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridGroupSplitterColumn : GridGroupSplitterColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridGroupSplitterColumn dnnGridColumn = new DnnGridGroupSplitterColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridBinaryImageColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridBinaryImageColumn.cs index 9dcf81572ba..3b68dcfd40d 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridBinaryImageColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridBinaryImageColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridBinaryImageColumn : GridBinaryImageColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridBinaryImageColumn dnnGridColumn = new DnnGridBinaryImageColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridBinaryImageColumn : GridBinaryImageColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridBinaryImageColumn dnnGridColumn = new DnnGridBinaryImageColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridBoundColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridBoundColumn.cs index 69d7de4aee8..e0dda976097 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridBoundColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridBoundColumn.cs @@ -1,51 +1,52 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridBoundColumn : GridBoundColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridBoundColumn dnnGridColumn = new DnnGridBoundColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - GridHeaderItem headerItem = inItem as GridHeaderItem; - string columnName = this.DataField; - if (!this.Owner.AllowSorting) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - else - { - LinkButton button = (LinkButton)headerItem[columnName].Controls[0]; - button.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridBoundColumn : GridBoundColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridBoundColumn dnnGridColumn = new DnnGridBoundColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + GridHeaderItem headerItem = inItem as GridHeaderItem; + string columnName = this.DataField; + if (!this.Owner.AllowSorting) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + else + { + LinkButton button = (LinkButton)headerItem[columnName].Controls[0]; + button.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridButtonColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridButtonColumn.cs index 93169d67d32..953f97084c3 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridButtonColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridButtonColumn.cs @@ -1,83 +1,84 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridButtonColumn : GridButtonColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets or sets the Icon Key to obtain ImageURL. - /// - /// A String. - /// ----------------------------------------------------------------------------- - public string IconKey { get; set; } - - /// ----------------------------------------------------------------------------- - /// - /// Gets or sets the Icon Siz to obtain ImageURL. - /// - /// A String. - /// ----------------------------------------------------------------------------- - public string IconSize { get; set; } - - /// ----------------------------------------------------------------------------- - /// - /// Gets or sets the Icon Style to obtain ImageURL. - /// - /// A String. - /// ----------------------------------------------------------------------------- - public string IconStyle { get; set; } - - public override string ImageUrl - { - get - { - if (string.IsNullOrEmpty(base.ImageUrl)) - { - base.ImageUrl = Entities.Icons.IconController.IconURL(this.IconKey, this.IconSize, this.IconStyle); - } - - return base.ImageUrl; - } - - set - { - base.ImageUrl = value; - } - } - - public override GridColumn Clone() - { - DnnGridButtonColumn dnnGridColumn = new DnnGridButtonColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridButtonColumn : GridButtonColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets or sets the Icon Key to obtain ImageURL. + /// + /// A String. + /// ----------------------------------------------------------------------------- + public string IconKey { get; set; } + + /// ----------------------------------------------------------------------------- + /// + /// Gets or sets the Icon Siz to obtain ImageURL. + /// + /// A String. + /// ----------------------------------------------------------------------------- + public string IconSize { get; set; } + + /// ----------------------------------------------------------------------------- + /// + /// Gets or sets the Icon Style to obtain ImageURL. + /// + /// A String. + /// ----------------------------------------------------------------------------- + public string IconStyle { get; set; } + + public override string ImageUrl + { + get + { + if (string.IsNullOrEmpty(base.ImageUrl)) + { + base.ImageUrl = Entities.Icons.IconController.IconURL(this.IconKey, this.IconSize, this.IconStyle); + } + + return base.ImageUrl; + } + + set + { + base.ImageUrl = value; + } + } + + public override GridColumn Clone() + { + DnnGridButtonColumn dnnGridColumn = new DnnGridButtonColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridCalculatedColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridCalculatedColumn.cs index 81353f03d21..1a5abeb8170 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridCalculatedColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridCalculatedColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridCalculatedColumn : GridCalculatedColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridCalculatedColumn dnnGridColumn = new DnnGridCalculatedColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridCalculatedColumn : GridCalculatedColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridCalculatedColumn dnnGridColumn = new DnnGridCalculatedColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridCheckBoxColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridCheckBoxColumn.cs index 6429d70fdbc..12386fb09f1 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridCheckBoxColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridCheckBoxColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridCheckBoxColumn : GridCheckBoxColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridCheckBoxColumn dnnGridColumn = new DnnGridCheckBoxColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridCheckBoxColumn : GridCheckBoxColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridCheckBoxColumn dnnGridColumn = new DnnGridCheckBoxColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridClientSelectColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridClientSelectColumn.cs index 53364b4ca8e..98c430e05cd 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridClientSelectColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridClientSelectColumn.cs @@ -1,44 +1,45 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridClientSelectColumn : GridClientSelectColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - var dnnGridColumn = new DnnGridClientSelectColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - if (!inItem.OwnerTableView.OwnerGrid.AllowMultiRowSelection) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridClientSelectColumn : GridClientSelectColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + var dnnGridColumn = new DnnGridClientSelectColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + if (!inItem.OwnerTableView.OwnerGrid.AllowMultiRowSelection) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridColumn.cs index f18783aab64..c83fa709db8 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridColumn.cs @@ -1,59 +1,60 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridColumn : GridColumn - { - private string _HeaderText; - - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override string HeaderText - { - get - { - if (string.IsNullOrEmpty(base.HeaderText)) - { - base.HeaderText = Localization.GetString(string.Format("{0}.Header", this._HeaderText), DotNetNuke.Web.UI.Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent)); - } - - return base.HeaderText; - } - - set - { - this._HeaderText = value; - base.HeaderText = string.Empty; - } - } - - public string setHeaderText - { - set - { - base.HeaderText = value; - } - } - - public override GridColumn Clone() - { - var dnnGridColumn = new DnnGridColumn(); - dnnGridColumn.CopyBaseProperties(this); - dnnGridColumn.setHeaderText = this.HeaderText; - return dnnGridColumn; - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridColumn : GridColumn + { + private string _HeaderText; + + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override string HeaderText + { + get + { + if (string.IsNullOrEmpty(base.HeaderText)) + { + base.HeaderText = Localization.GetString(string.Format("{0}.Header", this._HeaderText), DotNetNuke.Web.UI.Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent)); + } + + return base.HeaderText; + } + + set + { + this._HeaderText = value; + base.HeaderText = string.Empty; + } + } + + public string setHeaderText + { + set + { + base.HeaderText = value; + } + } + + public override GridColumn Clone() + { + var dnnGridColumn = new DnnGridColumn(); + dnnGridColumn.CopyBaseProperties(this); + dnnGridColumn.setHeaderText = this.HeaderText; + return dnnGridColumn; + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDataItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDataItem.cs index 926e853e134..21d631d138f 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDataItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDataItem.cs @@ -1,20 +1,24 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ + +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnGridDataItem : GridDataItem - { - public DnnGridDataItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex) - : base(ownerTableView, itemIndex, dataSetIndex) - { - } - - public DnnGridDataItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex, GridItemType itemType) - : base(ownerTableView, itemIndex, dataSetIndex, itemType) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridDataItem : GridDataItem + { + public DnnGridDataItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex) + : base(ownerTableView, itemIndex, dataSetIndex) + { + } + + public DnnGridDataItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex, GridItemType itemType) + : base(ownerTableView, itemIndex, dataSetIndex, itemType) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDateTimeColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDateTimeColumn.cs index 1055ec44882..d75905167d3 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDateTimeColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDateTimeColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridDateTimeColumn : GridDateTimeColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridDateTimeColumn dnnGridColumn = new DnnGridDateTimeColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridDateTimeColumn : GridDateTimeColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridDateTimeColumn dnnGridColumn = new DnnGridDateTimeColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDropDownColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDropDownColumn.cs index 59bd6ac59be..0f27f92a3e0 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDropDownColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDropDownColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridDropDownColumn : GridDropDownColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridDropDownColumn dnnGridColumn = new DnnGridDropDownColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridDropDownColumn : GridDropDownColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridDropDownColumn dnnGridColumn = new DnnGridDropDownColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridEditColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridEditColumn.cs index 3f32e90dbec..c7d200d0098 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridEditColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridEditColumn.cs @@ -1,28 +1,31 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnGridEditColumn : GridEditCommandColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridEditColumn dnnGridColumn = new DnnGridEditColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridEditColumn : GridEditCommandColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridEditColumn dnnGridColumn = new DnnGridEditColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridEditFormSettings.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridEditFormSettings.cs index fd2f5868a4f..6a623ae8812 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridEditFormSettings.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridEditFormSettings.cs @@ -1,15 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnGridEditFormSettings : GridEditFormSettings - { - public DnnGridEditFormSettings(DnnGridTableView owner) - : base(owner) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridEditFormSettings : GridEditFormSettings + { + public DnnGridEditFormSettings(DnnGridTableView owner) + : base(owner) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridExpandColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridExpandColumn.cs index 8a1ee51e863..3932e372d61 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridExpandColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridExpandColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridExpandColumn : GridColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridExpandColumn dnnGridColumn = new DnnGridExpandColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridExpandColumn : GridColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridExpandColumn dnnGridColumn = new DnnGridExpandColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridFooterItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridFooterItem.cs index 7627b7b80d4..ac62e80b830 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridFooterItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridFooterItem.cs @@ -1,15 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnGridFooterItem : GridFooterItem - { - public DnnGridFooterItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex) - : base(ownerTableView, itemIndex, dataSetIndex) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridFooterItem : GridFooterItem + { + public DnnGridFooterItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex) + : base(ownerTableView, itemIndex, dataSetIndex) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridGroupSplitterColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridGroupSplitterColumn.cs index 3bb5725316c..13746509d4e 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridGroupSplitterColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridGroupSplitterColumn.cs @@ -5,10 +5,11 @@ namespace DotNetNuke.Web.UI.WebControls { using System; using System.Web.UI.WebControls; - + using DotNetNuke.Services.Localization; - using Telerik.Web.UI; - + using Telerik.Web.UI; + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] public class DnnGridAttachmentColumn : GridAttachmentColumn { public string LocalResourceFile diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHTMLEditorColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHTMLEditorColumn.cs index ec8e9b392a5..dbd15ca6bde 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHTMLEditorColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHTMLEditorColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridHTMLEditorColumn : GridHTMLEditorColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridHTMLEditorColumn dnnGridColumn = new DnnGridHTMLEditorColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridHTMLEditorColumn : GridHTMLEditorColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridHTMLEditorColumn dnnGridColumn = new DnnGridHTMLEditorColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHeaderItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHeaderItem.cs index f6a3e590c0f..e3bbfb6368f 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHeaderItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHeaderItem.cs @@ -1,15 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnGridHeaderItem : GridHeaderItem - { - public DnnGridHeaderItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex) - : base(ownerTableView, itemIndex, dataSetIndex) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridHeaderItem : GridHeaderItem + { + public DnnGridHeaderItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex) + : base(ownerTableView, itemIndex, dataSetIndex) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHyperlinkColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHyperlinkColumn.cs index 38fec61d694..3ee33515743 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHyperlinkColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHyperlinkColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridHyperLinkColumn : GridHyperLinkColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridHyperLinkColumn dnnGridColumn = new DnnGridHyperLinkColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridHyperLinkColumn : GridHyperLinkColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridHyperLinkColumn dnnGridColumn = new DnnGridHyperLinkColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageColumn.cs index 4d93a507ac8..cc2f2aef131 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridImageColumn : GridImageColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridImageColumn dnnGridColumn = new DnnGridImageColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridImageColumn : GridImageColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridImageColumn dnnGridColumn = new DnnGridImageColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageCommandColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageCommandColumn.cs index d7c772030de..f1fce956949 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageCommandColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageCommandColumn.cs @@ -2,174 +2,176 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System.Web; - using System.Web.UI.WebControls; - - using DotNetNuke.Entities.Icons; - using DotNetNuke.UI.WebControls; - using Telerik.Web.UI; - - public class DnnGridImageCommandColumn : DnnGridTemplateColumn - { - private ImageCommandColumnEditMode _editMode = ImageCommandColumnEditMode.Command; - private bool _showImage = true; - - private string _imageURL = string.Empty; - - /// - /// Gets or sets the CommandName for the Column. - /// - /// A String. - public string CommandName { get; set; } - - /// - /// Gets or sets editMode for the Column. - /// - /// A String. - public ImageCommandColumnEditMode EditMode - { - get { return this._editMode; } - set { this._editMode = value; } - } - - /// - /// Gets or sets the URL of the Image. - /// - /// A String. - public string ImageURL - { - get - { - if (!string.IsNullOrEmpty(this._imageURL)) - { - return this._imageURL; - } - - return IconController.IconURL(this.IconKey, this.IconSize, this.IconStyle); - } - - set { this._imageURL = value; } - } - - /// - /// Gets or sets the Icon Key to obtain ImageURL. - /// - /// A String. - public string IconKey { get; set; } - - /// - /// Gets or sets the Icon Siz to obtain ImageURL. - /// - /// A String. - public string IconSize { get; set; } - - /// - /// Gets or sets the Icon Style to obtain ImageURL. - /// - /// A String. - public string IconStyle { get; set; } - - /// - /// Gets or sets the Key Field that provides a Unique key to the data Item. - /// - /// A String. - public string KeyField { get; set; } - - /// - /// Gets or sets the URL of the Link (unless DataBinding through KeyField). - /// - /// A String. - public string NavigateURL { get; set; } - - /// - /// Gets or sets the URL Formatting string. - /// - /// A String. - public string NavigateURLFormatString { get; set; } - - /// - /// Gets or sets javascript text to attach to the OnClick Event. - /// - /// A String. - public string OnClickJs { get; set; } - - /// - /// Gets or sets a value indicating whether gets or sets whether an Image is displayed. - /// - /// Defaults to True. - /// A Boolean. - public bool ShowImage - { - get { return this._showImage; } - set { this._showImage = value; } - } - - /// - /// Gets or sets the Text (for Header/Footer Templates). - /// - /// A String. - public string Text { get; set; } - - /// - /// Gets or sets an flag that indicates whether the buttons are visible. - /// - /// A Boolean. - public string VisibleField { get; set; } - - /// - /// Initialises the Column. - /// - public override void Initialize() - { - this.ItemTemplate = this.CreateTemplate(GridItemType.Item); - this.EditItemTemplate = this.CreateTemplate(GridItemType.EditItem); - this.HeaderTemplate = this.CreateTemplate(GridItemType.Header); - - if (HttpContext.Current == null) - { - this.HeaderStyle.Font.Names = new[] { "Tahoma, Verdana, Arial" }; - this.HeaderStyle.Font.Size = new FontUnit("10pt"); - this.HeaderStyle.Font.Bold = true; - } - - this.ItemStyle.HorizontalAlign = HorizontalAlign.Center; - this.HeaderStyle.HorizontalAlign = HorizontalAlign.Center; - } - - /// - /// Creates a ImageCommandColumnTemplate. - /// - /// A ImageCommandColumnTemplate. - private DnnGridImageCommandColumnTemplate CreateTemplate(GridItemType type) - { - bool isDesignMode = HttpContext.Current == null; - var template = new DnnGridImageCommandColumnTemplate(type); - if (type != GridItemType.Header) - { - template.ImageURL = this.ImageURL; - if (!isDesignMode) - { - template.CommandName = this.CommandName; - template.VisibleField = this.VisibleField; - template.KeyField = this.KeyField; - } - } - - template.EditMode = this.EditMode; - template.NavigateURL = this.NavigateURL; - template.NavigateURLFormatString = this.NavigateURLFormatString; - template.OnClickJs = this.OnClickJs; - template.ShowImage = this.ShowImage; - template.Visible = this.Visible; - - template.Text = type == GridItemType.Header ? this.HeaderText : this.Text; - - // Set Design Mode to True - template.DesignMode = isDesignMode; - - return template; - } - } -} +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web; + using System.Web.UI.WebControls; + + using DotNetNuke.Entities.Icons; + using DotNetNuke.UI.WebControls; + using Telerik.Web.UI; + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridImageCommandColumn : DnnGridTemplateColumn + { + private ImageCommandColumnEditMode _editMode = ImageCommandColumnEditMode.Command; + private bool _showImage = true; + + private string _imageURL = string.Empty; + + /// + /// Gets or sets the CommandName for the Column. + /// + /// A String. + public string CommandName { get; set; } + + /// + /// Gets or sets editMode for the Column. + /// + /// A String. + public ImageCommandColumnEditMode EditMode + { + get { return this._editMode; } + set { this._editMode = value; } + } + + /// + /// Gets or sets the URL of the Image. + /// + /// A String. + public string ImageURL + { + get + { + if (!string.IsNullOrEmpty(this._imageURL)) + { + return this._imageURL; + } + + return IconController.IconURL(this.IconKey, this.IconSize, this.IconStyle); + } + + set { this._imageURL = value; } + } + + /// + /// Gets or sets the Icon Key to obtain ImageURL. + /// + /// A String. + public string IconKey { get; set; } + + /// + /// Gets or sets the Icon Siz to obtain ImageURL. + /// + /// A String. + public string IconSize { get; set; } + + /// + /// Gets or sets the Icon Style to obtain ImageURL. + /// + /// A String. + public string IconStyle { get; set; } + + /// + /// Gets or sets the Key Field that provides a Unique key to the data Item. + /// + /// A String. + public string KeyField { get; set; } + + /// + /// Gets or sets the URL of the Link (unless DataBinding through KeyField). + /// + /// A String. + public string NavigateURL { get; set; } + + /// + /// Gets or sets the URL Formatting string. + /// + /// A String. + public string NavigateURLFormatString { get; set; } + + /// + /// Gets or sets javascript text to attach to the OnClick Event. + /// + /// A String. + public string OnClickJs { get; set; } + + /// + /// Gets or sets a value indicating whether gets or sets whether an Image is displayed. + /// + /// Defaults to True. + /// A Boolean. + public bool ShowImage + { + get { return this._showImage; } + set { this._showImage = value; } + } + + /// + /// Gets or sets the Text (for Header/Footer Templates). + /// + /// A String. + public string Text { get; set; } + + /// + /// Gets or sets an flag that indicates whether the buttons are visible. + /// + /// A Boolean. + public string VisibleField { get; set; } + + /// + /// Initialises the Column. + /// + public override void Initialize() + { + this.ItemTemplate = this.CreateTemplate(GridItemType.Item); + this.EditItemTemplate = this.CreateTemplate(GridItemType.EditItem); + this.HeaderTemplate = this.CreateTemplate(GridItemType.Header); + + if (HttpContext.Current == null) + { + this.HeaderStyle.Font.Names = new[] { "Tahoma, Verdana, Arial" }; + this.HeaderStyle.Font.Size = new FontUnit("10pt"); + this.HeaderStyle.Font.Bold = true; + } + + this.ItemStyle.HorizontalAlign = HorizontalAlign.Center; + this.HeaderStyle.HorizontalAlign = HorizontalAlign.Center; + } + + /// + /// Creates a ImageCommandColumnTemplate. + /// + /// A ImageCommandColumnTemplate. + private DnnGridImageCommandColumnTemplate CreateTemplate(GridItemType type) + { + bool isDesignMode = HttpContext.Current == null; + var template = new DnnGridImageCommandColumnTemplate(type); + if (type != GridItemType.Header) + { + template.ImageURL = this.ImageURL; + if (!isDesignMode) + { + template.CommandName = this.CommandName; + template.VisibleField = this.VisibleField; + template.KeyField = this.KeyField; + } + } + + template.EditMode = this.EditMode; + template.NavigateURL = this.NavigateURL; + template.NavigateURLFormatString = this.NavigateURLFormatString; + template.OnClickJs = this.OnClickJs; + template.ShowImage = this.ShowImage; + template.Visible = this.Visible; + + template.Text = type == GridItemType.Header ? this.HeaderText : this.Text; + + // Set Design Mode to True + template.DesignMode = isDesignMode; + + return template; + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageCommandColumnTemplate.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageCommandColumnTemplate.cs index 48b4b8abde3..e0ebb27497d 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageCommandColumnTemplate.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageCommandColumnTemplate.cs @@ -2,286 +2,287 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Collections.Specialized; - using System.Globalization; - using System.Web.UI; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Collections.Specialized; + using System.Globalization; + using System.Web.UI; + using System.Web.UI.WebControls; - using DotNetNuke.Common.Utilities; - using DotNetNuke.UI.Utilities; - using DotNetNuke.UI.WebControls; - using Telerik.Web.UI; + using DotNetNuke.Common.Utilities; + using DotNetNuke.UI.Utilities; + using DotNetNuke.UI.WebControls; + using Telerik.Web.UI; - public class DnnGridImageCommandColumnTemplate : IBindableTemplate - { - private ImageCommandColumnEditMode _editMode = ImageCommandColumnEditMode.Command; - private GridItemType _itemType = GridItemType.Item; - private bool _showImage = true; - private bool _visible = true; - - public DnnGridImageCommandColumnTemplate() - : this(GridItemType.Item) - { - } - - public DnnGridImageCommandColumnTemplate(GridItemType itemType) - { - this.ItemType = itemType; - } - - /// - /// Gets or sets the CommandName for the Column. - /// - /// A String. - public string CommandName { get; set; } - - /// - /// Gets or sets a value indicating whether gets or sets the Design Mode of the Column. - /// - /// A Boolean. - public bool DesignMode { get; set; } - - /// - /// Gets or sets the CommandName for the Column. - /// - /// A String. - public ImageCommandColumnEditMode EditMode - { - get { return this._editMode; } - set { this._editMode = value; } - } - - /// - /// Gets or sets the URL of the Image. - /// - /// A String. - public string ImageURL { get; set; } - - /// - /// Gets or sets the type of Template to Create. - /// - /// A String. - public GridItemType ItemType - { - get { return this._itemType; } - set { this._itemType = value; } - } - - /// - /// Gets or sets the Key Field that provides a Unique key to the data Item. - /// - /// A String. - public string KeyField { get; set; } - - /// - /// Gets or sets the URL of the Link (unless DataBinding through KeyField). - /// - /// A String. - public string NavigateURL { get; set; } - - /// - /// Gets or sets the URL Formatting string. - /// - /// A String. - public string NavigateURLFormatString { get; set; } - - /// - /// Gets or sets javascript text to attach to the OnClick Event. - /// - /// A String. - public string OnClickJs { get; set; } - - /// - /// Gets or sets a value indicating whether gets or sets whether an Image is displayed. - /// - /// Defaults to True. - /// A Boolean. - public bool ShowImage - { - get { return this._showImage; } - set { this._showImage = value; } - } - - /// - /// Gets or sets the Text (for Header/Footer Templates). - /// - /// A String. - public string Text { get; set; } - - /// - /// Gets or sets a value indicating whether an flag that indicates whether the buttons are visible (this is overridden if - /// the VisibleField is set) - /// changed. - /// - /// A Boolean. - public bool Visible - { - get { return this._visible; } - set { this._visible = value; } - } - - /// - /// Gets or sets an flag that indicates whether the buttons are visible. - /// - /// A Boolean. - public string VisibleField { get; set; } - - /// - /// InstantiateIn instantiates the template (implementation of ITemplate). - /// - /// - /// - /// The parent container (DataGridItem). - public void InstantiateIn(Control container) - { - switch (this.ItemType) - { - case GridItemType.Item: - case GridItemType.AlternatingItem: - case GridItemType.SelectedItem: - case GridItemType.EditItem: - if (this.EditMode == ImageCommandColumnEditMode.URL) - { - var hypLink = new HyperLink { ToolTip = this.Text }; - if (!string.IsNullOrEmpty(this.ImageURL) && this.ShowImage) - { - var img = new Image { ImageUrl = this.DesignMode ? this.ImageURL.Replace("~/", "../../") : this.ImageURL }; - hypLink.Controls.Add(img); - img.ToolTip = this.Text; - } - else - { - hypLink.Text = this.Text; - } - - hypLink.DataBinding += this.ItemDataBinding; - container.Controls.Add(hypLink); - } - else - { - if (!string.IsNullOrEmpty(this.ImageURL) && this.ShowImage) - { - var colIcon = new ImageButton - { ImageUrl = this.DesignMode ? this.ImageURL.Replace("~/", "../../") : this.ImageURL, ToolTip = this.Text }; - if (!string.IsNullOrEmpty(this.OnClickJs)) - { - ClientAPI.AddButtonConfirm(colIcon, this.OnClickJs); - } - - colIcon.CommandName = this.CommandName; - colIcon.DataBinding += this.ItemDataBinding; - container.Controls.Add(colIcon); - } - - if (!string.IsNullOrEmpty(this.Text) && !this.ShowImage) - { - var colLink = new LinkButton { ToolTip = this.Text }; - if (!string.IsNullOrEmpty(this.OnClickJs)) - { - ClientAPI.AddButtonConfirm(colLink, this.OnClickJs); - } - - colLink.CommandName = this.CommandName; - colLink.Text = this.Text; - colLink.DataBinding += this.ItemDataBinding; - container.Controls.Add(colLink); - } - } - - break; - case GridItemType.Footer: - case GridItemType.Header: - container.Controls.Add(new LiteralControl(this.Text)); - break; - } - } - - public IOrderedDictionary ExtractValues(Control container) - { - // do nothing we don't really support databinding - // but the telerik grid trys to databind to all template columns regardless - return new OrderedDictionary(); - } - - /// - /// Gets whether theButton is visible. - /// - /// The parent container (DataGridItem). - private bool GetIsVisible(GridItem container) - { - if (!string.IsNullOrEmpty(this.VisibleField)) - { - return Convert.ToBoolean(DataBinder.Eval(container.DataItem, this.VisibleField)); - } - - return this.Visible; - } - - /// - /// Gets the value of the key. - /// - /// The parent container (DataGridItem). - private int GetValue(GridItem container) - { - int keyValue = Null.NullInteger; - if (!string.IsNullOrEmpty(this.KeyField)) - { - keyValue = Convert.ToInt32(DataBinder.Eval(container.DataItem, this.KeyField)); - } - - return keyValue; - } - - /// - /// Item_DataBinding runs when an Item of type GridItemType.Item is being data-bound. - /// - /// - /// - /// The object that triggers the event. - /// An EventArgs object. - private void ItemDataBinding(object sender, EventArgs e) - { - GridItem container; - int keyValue; - if (this.EditMode == ImageCommandColumnEditMode.URL) - { - var hypLink = (HyperLink)sender; - container = (GridItem)hypLink.NamingContainer; - keyValue = this.GetValue(container); - if (!string.IsNullOrEmpty(this.NavigateURLFormatString)) - { - hypLink.NavigateUrl = string.Format(this.NavigateURLFormatString, keyValue); - } - else - { - hypLink.NavigateUrl = keyValue.ToString(CultureInfo.InvariantCulture); - } - } - else - { - // Bind Image Button - if (!string.IsNullOrEmpty(this.ImageURL) && this.ShowImage) - { - var colIcon = (ImageButton)sender; - container = (GridItem)colIcon.NamingContainer; - keyValue = this.GetValue(container); - colIcon.CommandArgument = keyValue.ToString(CultureInfo.InvariantCulture); - colIcon.Visible = this.GetIsVisible(container); - } - - if (!string.IsNullOrEmpty(this.Text) && !this.ShowImage) - { - // Bind Link Button - var colLink = (LinkButton)sender; - container = (GridItem)colLink.NamingContainer; - keyValue = this.GetValue(container); - colLink.CommandArgument = keyValue.ToString(CultureInfo.InvariantCulture); - colLink.Visible = this.GetIsVisible(container); - } - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridImageCommandColumnTemplate : IBindableTemplate + { + private ImageCommandColumnEditMode _editMode = ImageCommandColumnEditMode.Command; + private GridItemType _itemType = GridItemType.Item; + private bool _showImage = true; + private bool _visible = true; + + public DnnGridImageCommandColumnTemplate() + : this(GridItemType.Item) + { + } + + public DnnGridImageCommandColumnTemplate(GridItemType itemType) + { + this.ItemType = itemType; + } + + /// + /// Gets or sets the CommandName for the Column. + /// + /// A String. + public string CommandName { get; set; } + + /// + /// Gets or sets a value indicating whether gets or sets the Design Mode of the Column. + /// + /// A Boolean. + public bool DesignMode { get; set; } + + /// + /// Gets or sets the CommandName for the Column. + /// + /// A String. + public ImageCommandColumnEditMode EditMode + { + get { return this._editMode; } + set { this._editMode = value; } + } + + /// + /// Gets or sets the URL of the Image. + /// + /// A String. + public string ImageURL { get; set; } + + /// + /// Gets or sets the type of Template to Create. + /// + /// A String. + public GridItemType ItemType + { + get { return this._itemType; } + set { this._itemType = value; } + } + + /// + /// Gets or sets the Key Field that provides a Unique key to the data Item. + /// + /// A String. + public string KeyField { get; set; } + + /// + /// Gets or sets the URL of the Link (unless DataBinding through KeyField). + /// + /// A String. + public string NavigateURL { get; set; } + + /// + /// Gets or sets the URL Formatting string. + /// + /// A String. + public string NavigateURLFormatString { get; set; } + + /// + /// Gets or sets javascript text to attach to the OnClick Event. + /// + /// A String. + public string OnClickJs { get; set; } + + /// + /// Gets or sets a value indicating whether gets or sets whether an Image is displayed. + /// + /// Defaults to True. + /// A Boolean. + public bool ShowImage + { + get { return this._showImage; } + set { this._showImage = value; } + } + + /// + /// Gets or sets the Text (for Header/Footer Templates). + /// + /// A String. + public string Text { get; set; } + + /// + /// Gets or sets a value indicating whether an flag that indicates whether the buttons are visible (this is overridden if + /// the VisibleField is set) + /// changed. + /// + /// A Boolean. + public bool Visible + { + get { return this._visible; } + set { this._visible = value; } + } + + /// + /// Gets or sets an flag that indicates whether the buttons are visible. + /// + /// A Boolean. + public string VisibleField { get; set; } + + /// + /// InstantiateIn instantiates the template (implementation of ITemplate). + /// + /// + /// + /// The parent container (DataGridItem). + public void InstantiateIn(Control container) + { + switch (this.ItemType) + { + case GridItemType.Item: + case GridItemType.AlternatingItem: + case GridItemType.SelectedItem: + case GridItemType.EditItem: + if (this.EditMode == ImageCommandColumnEditMode.URL) + { + var hypLink = new HyperLink { ToolTip = this.Text }; + if (!string.IsNullOrEmpty(this.ImageURL) && this.ShowImage) + { + var img = new Image { ImageUrl = this.DesignMode ? this.ImageURL.Replace("~/", "../../") : this.ImageURL }; + hypLink.Controls.Add(img); + img.ToolTip = this.Text; + } + else + { + hypLink.Text = this.Text; + } + + hypLink.DataBinding += this.ItemDataBinding; + container.Controls.Add(hypLink); + } + else + { + if (!string.IsNullOrEmpty(this.ImageURL) && this.ShowImage) + { + var colIcon = new ImageButton + { ImageUrl = this.DesignMode ? this.ImageURL.Replace("~/", "../../") : this.ImageURL, ToolTip = this.Text }; + if (!string.IsNullOrEmpty(this.OnClickJs)) + { + ClientAPI.AddButtonConfirm(colIcon, this.OnClickJs); + } + + colIcon.CommandName = this.CommandName; + colIcon.DataBinding += this.ItemDataBinding; + container.Controls.Add(colIcon); + } + + if (!string.IsNullOrEmpty(this.Text) && !this.ShowImage) + { + var colLink = new LinkButton { ToolTip = this.Text }; + if (!string.IsNullOrEmpty(this.OnClickJs)) + { + ClientAPI.AddButtonConfirm(colLink, this.OnClickJs); + } + + colLink.CommandName = this.CommandName; + colLink.Text = this.Text; + colLink.DataBinding += this.ItemDataBinding; + container.Controls.Add(colLink); + } + } + + break; + case GridItemType.Footer: + case GridItemType.Header: + container.Controls.Add(new LiteralControl(this.Text)); + break; + } + } + + public IOrderedDictionary ExtractValues(Control container) + { + // do nothing we don't really support databinding + // but the telerik grid trys to databind to all template columns regardless + return new OrderedDictionary(); + } + + /// + /// Gets whether theButton is visible. + /// + /// The parent container (DataGridItem). + private bool GetIsVisible(GridItem container) + { + if (!string.IsNullOrEmpty(this.VisibleField)) + { + return Convert.ToBoolean(DataBinder.Eval(container.DataItem, this.VisibleField)); + } + + return this.Visible; + } + + /// + /// Gets the value of the key. + /// + /// The parent container (DataGridItem). + private int GetValue(GridItem container) + { + int keyValue = Null.NullInteger; + if (!string.IsNullOrEmpty(this.KeyField)) + { + keyValue = Convert.ToInt32(DataBinder.Eval(container.DataItem, this.KeyField)); + } + + return keyValue; + } + + /// + /// Item_DataBinding runs when an Item of type GridItemType.Item is being data-bound. + /// + /// + /// + /// The object that triggers the event. + /// An EventArgs object. + private void ItemDataBinding(object sender, EventArgs e) + { + GridItem container; + int keyValue; + if (this.EditMode == ImageCommandColumnEditMode.URL) + { + var hypLink = (HyperLink)sender; + container = (GridItem)hypLink.NamingContainer; + keyValue = this.GetValue(container); + if (!string.IsNullOrEmpty(this.NavigateURLFormatString)) + { + hypLink.NavigateUrl = string.Format(this.NavigateURLFormatString, keyValue); + } + else + { + hypLink.NavigateUrl = keyValue.ToString(CultureInfo.InvariantCulture); + } + } + else + { + // Bind Image Button + if (!string.IsNullOrEmpty(this.ImageURL) && this.ShowImage) + { + var colIcon = (ImageButton)sender; + container = (GridItem)colIcon.NamingContainer; + keyValue = this.GetValue(container); + colIcon.CommandArgument = keyValue.ToString(CultureInfo.InvariantCulture); + colIcon.Visible = this.GetIsVisible(container); + } + + if (!string.IsNullOrEmpty(this.Text) && !this.ShowImage) + { + // Bind Link Button + var colLink = (LinkButton)sender; + container = (GridItem)colLink.NamingContainer; + keyValue = this.GetValue(container); + colLink.CommandArgument = keyValue.ToString(CultureInfo.InvariantCulture); + colLink.Visible = this.GetIsVisible(container); + } + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItem.cs index 30407cebb4d..26287487705 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItem.cs @@ -1,15 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnGridItem : GridItem - { - public DnnGridItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex, GridItemType itemType) - : base(ownerTableView, itemIndex, dataSetIndex, itemType) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridItem : GridItem + { + public DnnGridItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex, GridItemType itemType) + : base(ownerTableView, itemIndex, dataSetIndex, itemType) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItemSelectedEventArgs.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItemSelectedEventArgs.cs index 2a11751fe05..3b9f6ded992 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItemSelectedEventArgs.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItemSelectedEventArgs.cs @@ -1,27 +1,28 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnGridItemSelectedEventArgs : EventArgs - { - private readonly GridItemCollection _SelectedItems; - - public DnnGridItemSelectedEventArgs(GridItemCollection selectedItems) - { - this._SelectedItems = selectedItems; - } - - public GridItemCollection SelectedItems - { - get - { - return this._SelectedItems; - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridItemSelectedEventArgs : EventArgs + { + private readonly GridItemCollection _SelectedItems; + + public DnnGridItemSelectedEventArgs(GridItemCollection selectedItems) + { + this._SelectedItems = selectedItems; + } + + public GridItemCollection SelectedItems + { + get + { + return this._SelectedItems; + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItemSelectedEventHandler.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItemSelectedEventHandler.cs index bbe84fb9859..9fac43f8a53 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItemSelectedEventHandler.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItemSelectedEventHandler.cs @@ -2,7 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - public delegate void DnnGridItemSelectedEventHandler(object sender, DnnGridItemSelectedEventArgs e); -} +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public delegate void DnnGridItemSelectedEventHandler(object sender, DnnGridItemSelectedEventArgs e); +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridMaskedColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridMaskedColumn.cs index 5696b44a7f6..0f6537f0f80 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridMaskedColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridMaskedColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridMaskedColumn : GridMaskedColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridMaskedColumn dnnGridColumn = new DnnGridMaskedColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridMaskedColumn : GridMaskedColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridMaskedColumn dnnGridColumn = new DnnGridMaskedColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridNumericColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridNumericColumn.cs index 1bcb89075e4..d856210057f 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridNumericColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridNumericColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridNumericColumn : GridNumericColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridNumericColumn dnnGridColumn = new DnnGridNumericColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridNumericColumn : GridNumericColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridNumericColumn dnnGridColumn = new DnnGridNumericColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridRatingColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridRatingColumn.cs index df154e8d529..7539fa58362 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridRatingColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridRatingColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridRatingColumn : GridRatingColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridRatingColumn dnnGridColumn = new DnnGridRatingColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridRatingColumn : GridRatingColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridRatingColumn dnnGridColumn = new DnnGridRatingColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridRowIndicatorColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridRowIndicatorColumn.cs index f9b0b1ed25c..5ba536bad89 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridRowIndicatorColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridRowIndicatorColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridRowIndicatorColumn : GridRowIndicatorColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridRowIndicatorColumn dnnGridColumn = new DnnGridRowIndicatorColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridRowIndicatorColumn : GridRowIndicatorColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridRowIndicatorColumn dnnGridColumn = new DnnGridRowIndicatorColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridTableView.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridTableView.cs index dd6a8a1bece..70c8204caa0 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridTableView.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridTableView.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnGridTableView : GridTableView - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridTableView : GridTableView + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridTemplateColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridTemplateColumn.cs index 5d8fbbf33d1..e3abc556a60 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridTemplateColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridTemplateColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridTemplateColumn : GridTemplateColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridTemplateColumn dnnGridColumn = new DnnGridTemplateColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && this.HeaderTemplate == null && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridTemplateColumn : GridTemplateColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridTemplateColumn dnnGridColumn = new DnnGridTemplateColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && this.HeaderTemplate == null && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnInputManager.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnInputManager.cs index d46f2889cd4..091a678abfe 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnInputManager.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnInputManager.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnInputManager : RadInputManager - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnInputManager : RadInputManager + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnLanguageComboBox.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnLanguageComboBox.cs index 520fc001e74..e4ed736069e 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnLanguageComboBox.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnLanguageComboBox.cs @@ -1,281 +1,282 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Collections.Generic; - using System.Globalization; - using System.Linq; - using System.Web.UI; - using System.Web.UI.WebControls; - - using DotNetNuke.Common.Utilities; - using DotNetNuke.Services.Localization; - using DotNetNuke.Services.Personalization; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Collections.Generic; + using System.Globalization; + using System.Linq; + using System.Web.UI; + using System.Web.UI.WebControls; + + using DotNetNuke.Common.Utilities; + using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Personalization; using Telerik.Web.UI; - public class DnnLanguageComboBox : WebControl - { - private readonly string _viewTypePersonalizationKey; - private DnnComboBox _englishCombo; - private LanguagesListType _languagesListType = LanguagesListType.Enabled; - private RadioButtonList _modeRadioButtonList; - private DnnComboBox _nativeCombo; - - private string _originalValue; - - public DnnLanguageComboBox() - { - this.AutoPostBack = Null.NullBoolean; - this.CausesValidation = Null.NullBoolean; - this.ShowFlag = true; - this.ShowModeButtons = true; - this.HideLanguagesList = new Dictionary(); - this.FlagImageUrlFormatString = "~/images/Flags/{0}.gif"; - this._viewTypePersonalizationKey = "ViewType" + this.PortalId; - } - - public event EventHandler ItemChanged; - - public event EventHandler ModeChanged; - - public string SelectedValue - { - get - { - string selectedValue = this.DisplayMode.Equals("NATIVE", StringComparison.InvariantCultureIgnoreCase) ? this._nativeCombo.SelectedValue : this._englishCombo.SelectedValue; - if (selectedValue == "None") - { - selectedValue = Null.NullString; - } - - return selectedValue; - } - } - - public string FlagImageUrlFormatString { get; set; } - - public Dictionary HideLanguagesList { get; set; } - - public bool IncludeNoneSpecified { get; set; } - - public LanguagesListType LanguagesListType - { - get - { - return this._languagesListType; - } - - set - { - this._languagesListType = value; - } - } - - public int PortalId { get; set; } - - public bool ShowFlag { get; set; } - - public bool ShowModeButtons { get; set; } - - /// ----------------------------------------------------------------------------- - /// - /// Gets or sets a value indicating whether determines whether the List Auto Posts Back. - /// - /// ----------------------------------------------------------------------------- - public bool AutoPostBack { get; set; } - - public bool CausesValidation { get; set; } - - protected override HtmlTextWriterTag TagKey - { - get - { - return HtmlTextWriterTag.Div; - } - } - - private string DisplayMode - { - get - { - string displayMode = Convert.ToString(Personalization.GetProfile("LanguageDisplayMode", this._viewTypePersonalizationKey)); - if (string.IsNullOrEmpty(displayMode)) - { - displayMode = "NATIVE"; - } - - return displayMode; - } - } - - public void BindData(bool refresh) - { - if (refresh) - { - List cultures; - switch (this.LanguagesListType) - { - case LanguagesListType.Supported: - cultures = LocaleController.Instance.GetCultures(LocaleController.Instance.GetLocales(Null.NullInteger)); - break; - case LanguagesListType.Enabled: - cultures = LocaleController.Instance.GetCultures(LocaleController.Instance.GetLocales(this.PortalId)); - break; - default: - cultures = new List(CultureInfo.GetCultures(CultureTypes.SpecificCultures)); - break; - } - - foreach (KeyValuePair lang in this.HideLanguagesList) - { - string cultureCode = lang.Value.Code; - CultureInfo culture = cultures.Where(c => c.Name == cultureCode).SingleOrDefault(); - if (culture != null) - { - cultures.Remove(culture); - } - } - - this._nativeCombo.DataSource = cultures.OrderBy(c => c.NativeName); - this._englishCombo.DataSource = cultures.OrderBy(c => c.EnglishName); - } - - this._nativeCombo.DataBind(); - this._englishCombo.DataBind(); - - if (this.IncludeNoneSpecified && refresh) - { - this._englishCombo.Items.Insert(0, new RadComboBoxItem(Localization.GetString("System_Default", Localization.SharedResourceFile), "None")); - this._nativeCombo.Items.Insert(0, new RadComboBoxItem(Localization.GetString("System_Default", Localization.SharedResourceFile), "None")); - } - } - - public void SetLanguage(string code) - { - if (string.IsNullOrEmpty(code)) - { - this._nativeCombo.SelectedIndex = this._nativeCombo.FindItemIndexByValue("None"); - this._englishCombo.SelectedIndex = this._englishCombo.FindItemIndexByValue("None"); - } - else - { - this._nativeCombo.SelectedIndex = this._nativeCombo.FindItemIndexByValue(code); - this._englishCombo.SelectedIndex = this._englishCombo.FindItemIndexByValue(code); - } - } - - public override void DataBind() - { - this.BindData(!this.Page.IsPostBack); - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - this._nativeCombo = new DnnComboBox(); - this._nativeCombo.DataValueField = "Name"; - this._nativeCombo.DataTextField = "NativeName"; - this._nativeCombo.SelectedIndexChanged += this.ItemChangedInternal; - this.Controls.Add(this._nativeCombo); - - this._englishCombo = new DnnComboBox(); - this._englishCombo.DataValueField = "Name"; - this._englishCombo.DataTextField = "EnglishName"; - this._englishCombo.SelectedIndexChanged += this.ItemChangedInternal; - this.Controls.Add(this._englishCombo); - - this._modeRadioButtonList = new RadioButtonList(); - this._modeRadioButtonList.AutoPostBack = true; - this._modeRadioButtonList.RepeatDirection = RepeatDirection.Horizontal; - this._modeRadioButtonList.Items.Add(new ListItem(Localization.GetString("NativeName", Localization.GlobalResourceFile), "NATIVE")); - this._modeRadioButtonList.Items.Add(new ListItem(Localization.GetString("EnglishName", Localization.GlobalResourceFile), "ENGLISH")); - this._modeRadioButtonList.SelectedIndexChanged += this.ModeChangedInternal; - this.Controls.Add(this._modeRadioButtonList); - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - this._originalValue = this.SelectedValue; - } - - protected virtual void OnItemChanged() - { - if (this.ItemChanged != null) - { - this.ItemChanged(this, new EventArgs()); - } - } - - protected void OnModeChanged(EventArgs e) - { - if (this.ModeChanged != null) - { - this.ModeChanged(this, e); - } - } - - protected override void OnPreRender(EventArgs e) - { - if (this.DisplayMode.Equals("ENGLISH", StringComparison.InvariantCultureIgnoreCase)) - { - if (this._englishCombo.Items.FindItemByValue(this._originalValue) != null) - { - this._englishCombo.Items.FindItemByValue(this._originalValue).Selected = true; - } - } - else - { - if (this._nativeCombo.Items.FindItemByValue(this._originalValue) != null) - { - this._nativeCombo.Items.FindItemByValue(this._originalValue).Selected = true; - } - } - - this._modeRadioButtonList.Items.FindByValue(this.DisplayMode).Selected = true; - - foreach (RadComboBoxItem item in this._englishCombo.Items) - { - item.ImageUrl = string.Format(this.FlagImageUrlFormatString, item.Value); - } - - foreach (RadComboBoxItem item in this._nativeCombo.Items) - { - item.ImageUrl = string.Format(this.FlagImageUrlFormatString, item.Value); - } - - this._englishCombo.AutoPostBack = this.AutoPostBack; - this._englishCombo.CausesValidation = this.CausesValidation; - this._englishCombo.Visible = this.DisplayMode.Equals("ENGLISH", StringComparison.InvariantCultureIgnoreCase); - - this._nativeCombo.AutoPostBack = this.AutoPostBack; - this._nativeCombo.CausesValidation = this.CausesValidation; - this._nativeCombo.Visible = this.DisplayMode.Equals("NATIVE", StringComparison.InvariantCultureIgnoreCase); - - this._modeRadioButtonList.Visible = this.ShowModeButtons; - - this._englishCombo.Width = this.Width; - this._nativeCombo.Width = this.Width; - - base.OnPreRender(e); - } - - private void ModeChangedInternal(object sender, EventArgs e) - { - Personalization.SetProfile("LanguageDisplayMode", this._viewTypePersonalizationKey, this._modeRadioButtonList.SelectedValue); - - // Resort - this.BindData(true); - - this.OnModeChanged(EventArgs.Empty); - } - - private void ItemChangedInternal(object sender, EventArgs e) - { - this.OnItemChanged(); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnLanguageComboBox : WebControl + { + private readonly string _viewTypePersonalizationKey; + private DnnComboBox _englishCombo; + private LanguagesListType _languagesListType = LanguagesListType.Enabled; + private RadioButtonList _modeRadioButtonList; + private DnnComboBox _nativeCombo; + + private string _originalValue; + + public DnnLanguageComboBox() + { + this.AutoPostBack = Null.NullBoolean; + this.CausesValidation = Null.NullBoolean; + this.ShowFlag = true; + this.ShowModeButtons = true; + this.HideLanguagesList = new Dictionary(); + this.FlagImageUrlFormatString = "~/images/Flags/{0}.gif"; + this._viewTypePersonalizationKey = "ViewType" + this.PortalId; + } + + public event EventHandler ItemChanged; + + public event EventHandler ModeChanged; + + public string SelectedValue + { + get + { + string selectedValue = this.DisplayMode.Equals("NATIVE", StringComparison.InvariantCultureIgnoreCase) ? this._nativeCombo.SelectedValue : this._englishCombo.SelectedValue; + if (selectedValue == "None") + { + selectedValue = Null.NullString; + } + + return selectedValue; + } + } + + public string FlagImageUrlFormatString { get; set; } + + public Dictionary HideLanguagesList { get; set; } + + public bool IncludeNoneSpecified { get; set; } + + public LanguagesListType LanguagesListType + { + get + { + return this._languagesListType; + } + + set + { + this._languagesListType = value; + } + } + + public int PortalId { get; set; } + + public bool ShowFlag { get; set; } + + public bool ShowModeButtons { get; set; } + + /// ----------------------------------------------------------------------------- + /// + /// Gets or sets a value indicating whether determines whether the List Auto Posts Back. + /// + /// ----------------------------------------------------------------------------- + public bool AutoPostBack { get; set; } + + public bool CausesValidation { get; set; } + + protected override HtmlTextWriterTag TagKey + { + get + { + return HtmlTextWriterTag.Div; + } + } + + private string DisplayMode + { + get + { + string displayMode = Convert.ToString(Personalization.GetProfile("LanguageDisplayMode", this._viewTypePersonalizationKey)); + if (string.IsNullOrEmpty(displayMode)) + { + displayMode = "NATIVE"; + } + + return displayMode; + } + } + + public void BindData(bool refresh) + { + if (refresh) + { + List cultures; + switch (this.LanguagesListType) + { + case LanguagesListType.Supported: + cultures = LocaleController.Instance.GetCultures(LocaleController.Instance.GetLocales(Null.NullInteger)); + break; + case LanguagesListType.Enabled: + cultures = LocaleController.Instance.GetCultures(LocaleController.Instance.GetLocales(this.PortalId)); + break; + default: + cultures = new List(CultureInfo.GetCultures(CultureTypes.SpecificCultures)); + break; + } + + foreach (KeyValuePair lang in this.HideLanguagesList) + { + string cultureCode = lang.Value.Code; + CultureInfo culture = cultures.Where(c => c.Name == cultureCode).SingleOrDefault(); + if (culture != null) + { + cultures.Remove(culture); + } + } + + this._nativeCombo.DataSource = cultures.OrderBy(c => c.NativeName); + this._englishCombo.DataSource = cultures.OrderBy(c => c.EnglishName); + } + + this._nativeCombo.DataBind(); + this._englishCombo.DataBind(); + + if (this.IncludeNoneSpecified && refresh) + { + this._englishCombo.Items.Insert(0, new RadComboBoxItem(Localization.GetString("System_Default", Localization.SharedResourceFile), "None")); + this._nativeCombo.Items.Insert(0, new RadComboBoxItem(Localization.GetString("System_Default", Localization.SharedResourceFile), "None")); + } + } + + public void SetLanguage(string code) + { + if (string.IsNullOrEmpty(code)) + { + this._nativeCombo.SelectedIndex = this._nativeCombo.FindItemIndexByValue("None"); + this._englishCombo.SelectedIndex = this._englishCombo.FindItemIndexByValue("None"); + } + else + { + this._nativeCombo.SelectedIndex = this._nativeCombo.FindItemIndexByValue(code); + this._englishCombo.SelectedIndex = this._englishCombo.FindItemIndexByValue(code); + } + } + + public override void DataBind() + { + this.BindData(!this.Page.IsPostBack); + } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + this._nativeCombo = new DnnComboBox(); + this._nativeCombo.DataValueField = "Name"; + this._nativeCombo.DataTextField = "NativeName"; + this._nativeCombo.SelectedIndexChanged += this.ItemChangedInternal; + this.Controls.Add(this._nativeCombo); + + this._englishCombo = new DnnComboBox(); + this._englishCombo.DataValueField = "Name"; + this._englishCombo.DataTextField = "EnglishName"; + this._englishCombo.SelectedIndexChanged += this.ItemChangedInternal; + this.Controls.Add(this._englishCombo); + + this._modeRadioButtonList = new RadioButtonList(); + this._modeRadioButtonList.AutoPostBack = true; + this._modeRadioButtonList.RepeatDirection = RepeatDirection.Horizontal; + this._modeRadioButtonList.Items.Add(new ListItem(Localization.GetString("NativeName", Localization.GlobalResourceFile), "NATIVE")); + this._modeRadioButtonList.Items.Add(new ListItem(Localization.GetString("EnglishName", Localization.GlobalResourceFile), "ENGLISH")); + this._modeRadioButtonList.SelectedIndexChanged += this.ModeChangedInternal; + this.Controls.Add(this._modeRadioButtonList); + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + + this._originalValue = this.SelectedValue; + } + + protected virtual void OnItemChanged() + { + if (this.ItemChanged != null) + { + this.ItemChanged(this, new EventArgs()); + } + } + + protected void OnModeChanged(EventArgs e) + { + if (this.ModeChanged != null) + { + this.ModeChanged(this, e); + } + } + + protected override void OnPreRender(EventArgs e) + { + if (this.DisplayMode.Equals("ENGLISH", StringComparison.InvariantCultureIgnoreCase)) + { + if (this._englishCombo.Items.FindItemByValue(this._originalValue) != null) + { + this._englishCombo.Items.FindItemByValue(this._originalValue).Selected = true; + } + } + else + { + if (this._nativeCombo.Items.FindItemByValue(this._originalValue) != null) + { + this._nativeCombo.Items.FindItemByValue(this._originalValue).Selected = true; + } + } + + this._modeRadioButtonList.Items.FindByValue(this.DisplayMode).Selected = true; + + foreach (RadComboBoxItem item in this._englishCombo.Items) + { + item.ImageUrl = string.Format(this.FlagImageUrlFormatString, item.Value); + } + + foreach (RadComboBoxItem item in this._nativeCombo.Items) + { + item.ImageUrl = string.Format(this.FlagImageUrlFormatString, item.Value); + } + + this._englishCombo.AutoPostBack = this.AutoPostBack; + this._englishCombo.CausesValidation = this.CausesValidation; + this._englishCombo.Visible = this.DisplayMode.Equals("ENGLISH", StringComparison.InvariantCultureIgnoreCase); + + this._nativeCombo.AutoPostBack = this.AutoPostBack; + this._nativeCombo.CausesValidation = this.CausesValidation; + this._nativeCombo.Visible = this.DisplayMode.Equals("NATIVE", StringComparison.InvariantCultureIgnoreCase); + + this._modeRadioButtonList.Visible = this.ShowModeButtons; + + this._englishCombo.Width = this.Width; + this._nativeCombo.Width = this.Width; + + base.OnPreRender(e); + } + + private void ModeChangedInternal(object sender, EventArgs e) + { + Personalization.SetProfile("LanguageDisplayMode", this._viewTypePersonalizationKey, this._modeRadioButtonList.SelectedValue); + + // Resort + this.BindData(true); + + this.OnModeChanged(EventArgs.Empty); + } + + private void ItemChangedInternal(object sender, EventArgs e) + { + this.OnItemChanged(); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListBox.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListBox.cs index eedbcb289ba..07ff5cbdf4b 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListBox.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListBox.cs @@ -1,17 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnListBox : RadListBox - { - // public DnnListBox() - // { - // Utilities.ApplySkin(this); - // } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnListBox : RadListBox + { + // public DnnListBox() + // { + // Utilities.ApplySkin(this); + // } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListBoxItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListBoxItem.cs index 050e02e916a..b6a7e1ebcb6 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListBoxItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListBoxItem.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnListBoxItem : RadListBoxItem - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnListBoxItem : RadListBoxItem + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListView.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListView.cs index 174aabf9a91..c5b0cf6c577 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListView.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListView.cs @@ -1,10 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnListView : RadListView - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnListView : RadListView + {} +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListViewItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListViewItem.cs index 01808baba44..d2c43488f62 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListViewItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListViewItem.cs @@ -1,15 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnListViewItem : RadListViewItem - { - public DnnListViewItem(RadListViewItemType itemType, RadListView ownerView) - : base(itemType, ownerView) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnListViewItem : RadListViewItem + { + public DnnListViewItem(RadListViewItemType itemType, RadListView ownerView) + : base(itemType, ownerView) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListViewItemDragHandle.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListViewItemDragHandle.cs index 5056d9f6440..da1ad5d8632 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListViewItemDragHandle.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListViewItemDragHandle.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnListViewItemDragHandle : RadListViewItemDragHandle - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnListViewItemDragHandle : RadListViewItemDragHandle + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMaskedTextBox.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMaskedTextBox.cs index 23abdaa3329..db373ebb3db 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMaskedTextBox.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMaskedTextBox.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnMaskedTextBox : RadMaskedTextBox - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnMaskedTextBox : RadMaskedTextBox + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenu.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenu.cs index 49565bc2246..b527e8d12af 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenu.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenu.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnMenu : RadMenu - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnMenu : RadMenu + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenuItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenuItem.cs index d2f77890228..6d2ed2cbf92 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenuItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenuItem.cs @@ -1,24 +1,27 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnMenuItem : RadMenuItem - { - public DnnMenuItem() - { - } - - public DnnMenuItem(string text) - : base(text) - { - } - - public DnnMenuItem(string text, string navigateUrl) - : base(text, navigateUrl) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnMenuItem : RadMenuItem + { + public DnnMenuItem() + { + } + + public DnnMenuItem(string text) + : base(text) + { + } + + public DnnMenuItem(string text, string navigateUrl) + : base(text, navigateUrl) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenuItemBinding.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenuItemBinding.cs index b502420a80d..1f24d59b4f7 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenuItemBinding.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenuItemBinding.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnMenuItemBinding : RadMenuItemBinding - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnMenuItemBinding : RadMenuItemBinding + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnModuleComboBox.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnModuleComboBox.cs index bd02285bf03..b83ef1eb503 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnModuleComboBox.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnModuleComboBox.cs @@ -1,206 +1,207 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Web.UI.WebControls; - - using DotNetNuke.Common; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Modules; - using DotNetNuke.Entities.Modules.Definitions; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Entities.Tabs; - using DotNetNuke.Security.Permissions; - using DotNetNuke.Services.Installer.Packages; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Web.UI.WebControls; + + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Modules; + using DotNetNuke.Entities.Modules.Definitions; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Tabs; + using DotNetNuke.Security.Permissions; + using DotNetNuke.Services.Installer.Packages; using Telerik.Web.UI; - public class DnnModuleComboBox : WebControl - { - private const string DefaultExtensionImage = "icon_extensions_32px.png"; - - private DnnComboBox _moduleCombo; - private string _originalValue; - - public event EventHandler ItemChanged; - - public int ItemCount - { - get - { - return this._moduleCombo.Items.Count; - } - } - - public string SelectedValue - { - get - { - return this._moduleCombo.SelectedValue; - } - } - - public string RadComboBoxClientId - { - get - { - return this._moduleCombo.ClientID; - } - } - - public Func, bool> Filter { get; set; } - - public override bool Enabled - { - get - { - return this._moduleCombo.Enabled; - } - - set - { - this._moduleCombo.Enabled = value; - } - } - - public void BindAllPortalDesktopModules() - { - this._moduleCombo.SelectedValue = null; - this._moduleCombo.DataSource = this.GetPortalDesktopModules(); - this._moduleCombo.DataBind(); - this.BindPortalDesktopModuleImages(); - } - - public void BindTabModulesByTabID(int tabID) - { - this._moduleCombo.SelectedValue = null; - this._moduleCombo.DataSource = GetTabModules(tabID); - this._moduleCombo.DataBind(); - this.BindTabModuleImages(tabID); - } - - public void SetModule(string code) - { - this._moduleCombo.SelectedIndex = this._moduleCombo.FindItemIndexByValue(code); - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - this._moduleCombo = new DnnComboBox(); - this._moduleCombo.DataValueField = "key"; - this._moduleCombo.DataTextField = "value"; - this.Controls.Add(this._moduleCombo); - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - this._originalValue = this.SelectedValue; - } - - protected virtual void OnItemChanged() - { - if (this.ItemChanged != null) - { - this.ItemChanged(this, new EventArgs()); - } - } - - protected override void OnPreRender(EventArgs e) - { - if (this._moduleCombo.Items.FindItemByValue(this._originalValue) != null) - { - this._moduleCombo.Items.FindItemByValue(this._originalValue).Selected = true; - } - - this._moduleCombo.Width = this.Width; - base.OnPreRender(e); - } - - private static Dictionary GetTabModules(int tabID) - { - var tabModules = ModuleController.Instance.GetTabModules(tabID); - - // Is this tab from another site? - var isRemote = TabController.Instance.GetTab(tabID, Null.NullInteger, false).PortalID != PortalSettings.Current.PortalId; - - var pageModules = tabModules.Values.Where(m => !isRemote || ModuleSuportsSharing(m)).Where(m => ModulePermissionController.CanAdminModule(m) && m.IsDeleted == false).ToList(); - - return pageModules.ToDictionary(module => module.ModuleID, module => module.ModuleTitle); - } - - private static bool ModuleSuportsSharing(ModuleInfo moduleInfo) - { - switch (moduleInfo.DesktopModule.Shareable) - { - case ModuleSharing.Supported: - case ModuleSharing.Unknown: - return moduleInfo.IsShareable; - default: - return false; - } - } - - private Dictionary GetPortalDesktopModules() - { - IOrderedEnumerable> portalModulesList; - if (this.Filter == null) - { - portalModulesList = DesktopModuleController.GetPortalDesktopModules(PortalSettings.Current.PortalId) - .Where((kvp) => kvp.Value.DesktopModule.Category == "Uncategorised" || string.IsNullOrEmpty(kvp.Value.DesktopModule.Category)) - .OrderBy(c => c.Key); - } - else - { - portalModulesList = DesktopModuleController.GetPortalDesktopModules(PortalSettings.Current.PortalId) - .Where(this.Filter) - .OrderBy(c => c.Key); - } - - return portalModulesList.ToDictionary( - portalModule => portalModule.Value.DesktopModuleID, - portalModule => portalModule.Key); - } - - private void BindPortalDesktopModuleImages() - { - var portalDesktopModules = DesktopModuleController.GetDesktopModules(PortalSettings.Current.PortalId); - var packages = PackageController.Instance.GetExtensionPackages(PortalSettings.Current.PortalId); - - foreach (RadComboBoxItem item in this._moduleCombo.Items) - { - string imageUrl = - (from pkgs in packages - join portMods in portalDesktopModules on pkgs.PackageID equals portMods.Value.PackageID - where portMods.Value.DesktopModuleID.ToString() == item.Value - select pkgs.IconFile).FirstOrDefault(); - - item.ImageUrl = string.IsNullOrEmpty(imageUrl) ? Globals.ImagePath + DefaultExtensionImage : imageUrl; - } - } - - private void BindTabModuleImages(int tabID) - { - var tabModules = ModuleController.Instance.GetTabModules(tabID); - var portalDesktopModules = DesktopModuleController.GetDesktopModules(PortalSettings.Current.PortalId); - var moduleDefnitions = ModuleDefinitionController.GetModuleDefinitions(); - var packages = PackageController.Instance.GetExtensionPackages(PortalSettings.Current.PortalId); - - foreach (RadComboBoxItem item in this._moduleCombo.Items) - { - string imageUrl = (from pkgs in packages - join portMods in portalDesktopModules on pkgs.PackageID equals portMods.Value.PackageID - join modDefs in moduleDefnitions on portMods.Value.DesktopModuleID equals modDefs.Value.DesktopModuleID - join tabMods in tabModules on modDefs.Value.DesktopModuleID equals tabMods.Value.DesktopModuleID - where tabMods.Value.ModuleID.ToString() == item.Value - select pkgs.IconFile).FirstOrDefault(); - - item.ImageUrl = string.IsNullOrEmpty(imageUrl) ? Globals.ImagePath + DefaultExtensionImage : imageUrl; - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnModuleComboBox : WebControl + { + private const string DefaultExtensionImage = "icon_extensions_32px.png"; + + private DnnComboBox _moduleCombo; + private string _originalValue; + + public event EventHandler ItemChanged; + + public int ItemCount + { + get + { + return this._moduleCombo.Items.Count; + } + } + + public string SelectedValue + { + get + { + return this._moduleCombo.SelectedValue; + } + } + + public string RadComboBoxClientId + { + get + { + return this._moduleCombo.ClientID; + } + } + + public Func, bool> Filter { get; set; } + + public override bool Enabled + { + get + { + return this._moduleCombo.Enabled; + } + + set + { + this._moduleCombo.Enabled = value; + } + } + + public void BindAllPortalDesktopModules() + { + this._moduleCombo.SelectedValue = null; + this._moduleCombo.DataSource = this.GetPortalDesktopModules(); + this._moduleCombo.DataBind(); + this.BindPortalDesktopModuleImages(); + } + + public void BindTabModulesByTabID(int tabID) + { + this._moduleCombo.SelectedValue = null; + this._moduleCombo.DataSource = GetTabModules(tabID); + this._moduleCombo.DataBind(); + this.BindTabModuleImages(tabID); + } + + public void SetModule(string code) + { + this._moduleCombo.SelectedIndex = this._moduleCombo.FindItemIndexByValue(code); + } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + this._moduleCombo = new DnnComboBox(); + this._moduleCombo.DataValueField = "key"; + this._moduleCombo.DataTextField = "value"; + this.Controls.Add(this._moduleCombo); + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + this._originalValue = this.SelectedValue; + } + + protected virtual void OnItemChanged() + { + if (this.ItemChanged != null) + { + this.ItemChanged(this, new EventArgs()); + } + } + + protected override void OnPreRender(EventArgs e) + { + if (this._moduleCombo.Items.FindItemByValue(this._originalValue) != null) + { + this._moduleCombo.Items.FindItemByValue(this._originalValue).Selected = true; + } + + this._moduleCombo.Width = this.Width; + base.OnPreRender(e); + } + + private static Dictionary GetTabModules(int tabID) + { + var tabModules = ModuleController.Instance.GetTabModules(tabID); + + // Is this tab from another site? + var isRemote = TabController.Instance.GetTab(tabID, Null.NullInteger, false).PortalID != PortalSettings.Current.PortalId; + + var pageModules = tabModules.Values.Where(m => !isRemote || ModuleSuportsSharing(m)).Where(m => ModulePermissionController.CanAdminModule(m) && m.IsDeleted == false).ToList(); + + return pageModules.ToDictionary(module => module.ModuleID, module => module.ModuleTitle); + } + + private static bool ModuleSuportsSharing(ModuleInfo moduleInfo) + { + switch (moduleInfo.DesktopModule.Shareable) + { + case ModuleSharing.Supported: + case ModuleSharing.Unknown: + return moduleInfo.IsShareable; + default: + return false; + } + } + + private Dictionary GetPortalDesktopModules() + { + IOrderedEnumerable> portalModulesList; + if (this.Filter == null) + { + portalModulesList = DesktopModuleController.GetPortalDesktopModules(PortalSettings.Current.PortalId) + .Where((kvp) => kvp.Value.DesktopModule.Category == "Uncategorised" || string.IsNullOrEmpty(kvp.Value.DesktopModule.Category)) + .OrderBy(c => c.Key); + } + else + { + portalModulesList = DesktopModuleController.GetPortalDesktopModules(PortalSettings.Current.PortalId) + .Where(this.Filter) + .OrderBy(c => c.Key); + } + + return portalModulesList.ToDictionary( + portalModule => portalModule.Value.DesktopModuleID, + portalModule => portalModule.Key); + } + + private void BindPortalDesktopModuleImages() + { + var portalDesktopModules = DesktopModuleController.GetDesktopModules(PortalSettings.Current.PortalId); + var packages = PackageController.Instance.GetExtensionPackages(PortalSettings.Current.PortalId); + + foreach (RadComboBoxItem item in this._moduleCombo.Items) + { + string imageUrl = + (from pkgs in packages + join portMods in portalDesktopModules on pkgs.PackageID equals portMods.Value.PackageID + where portMods.Value.DesktopModuleID.ToString() == item.Value + select pkgs.IconFile).FirstOrDefault(); + + item.ImageUrl = string.IsNullOrEmpty(imageUrl) ? Globals.ImagePath + DefaultExtensionImage : imageUrl; + } + } + + private void BindTabModuleImages(int tabID) + { + var tabModules = ModuleController.Instance.GetTabModules(tabID); + var portalDesktopModules = DesktopModuleController.GetDesktopModules(PortalSettings.Current.PortalId); + var moduleDefnitions = ModuleDefinitionController.GetModuleDefinitions(); + var packages = PackageController.Instance.GetExtensionPackages(PortalSettings.Current.PortalId); + + foreach (RadComboBoxItem item in this._moduleCombo.Items) + { + string imageUrl = (from pkgs in packages + join portMods in portalDesktopModules on pkgs.PackageID equals portMods.Value.PackageID + join modDefs in moduleDefnitions on portMods.Value.DesktopModuleID equals modDefs.Value.DesktopModuleID + join tabMods in tabModules on modDefs.Value.DesktopModuleID equals tabMods.Value.DesktopModuleID + where tabMods.Value.ModuleID.ToString() == item.Value + select pkgs.IconFile).FirstOrDefault(); + + item.ImageUrl = string.IsNullOrEmpty(imageUrl) ? Globals.ImagePath + DefaultExtensionImage : imageUrl; + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMonthYearPicker.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMonthYearPicker.cs index 4e308afecdf..bac8c1c8120 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMonthYearPicker.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMonthYearPicker.cs @@ -2,12 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; - using Telerik.Web.UI; + using Telerik.Web.UI; - internal class DnnMonthYearPicker : RadMonthYearPicker - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + internal class DnnMonthYearPicker : RadMonthYearPicker + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMultiPage.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMultiPage.cs index 79045731ef1..99c3d24bc5c 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMultiPage.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMultiPage.cs @@ -1,12 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnMultiPage : RadMultiPage - { - // TODO: Hide properties that we don't want to expose - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnMultiPage : RadMultiPage + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnNumericTextBox.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnNumericTextBox.cs index 4d0391c6190..d7a1486adb2 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnNumericTextBox.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnNumericTextBox.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnNumericTextBox : RadNumericTextBox - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnNumericTextBox : RadNumericTextBox + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPageView.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPageView.cs index 3a787a9c9b6..d78b9205c80 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPageView.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPageView.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnPageView : RadPageView - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnPageView : RadPageView + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelBar.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelBar.cs index f4d29186ab6..10ddcd80d5f 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelBar.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelBar.cs @@ -1,18 +1,19 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnPanelBar : RadPanelBar - { - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - Utilities.ApplySkin(this); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnPanelBar : RadPanelBar + { + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + Utilities.ApplySkin(this); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelItem.cs index 89a63a43b20..de44f1fc967 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelItem.cs @@ -1,24 +1,27 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnPanelItem : RadPanelItem - { - public DnnPanelItem() - { - } - - public DnnPanelItem(string text) - : base(text) - { - } - - public DnnPanelItem(string text, string navigateUrl) - : base(text, navigateUrl) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnPanelItem : RadPanelItem + { + public DnnPanelItem() + { + } + + public DnnPanelItem(string text) + : base(text) + { + } + + public DnnPanelItem(string text, string navigateUrl) + : base(text, navigateUrl) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelItemBinding.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelItemBinding.cs index ebbf6742c16..a24904301a9 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelItemBinding.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelItemBinding.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnPanelItemBinding : RadPanelItemBinding - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnPanelItemBinding : RadPanelItemBinding + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnProgressArea.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnProgressArea.cs index bde0f6e5c6e..b1ecdaf64a0 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnProgressArea.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnProgressArea.cs @@ -1,17 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnProgressArea : RadProgressArea - { - // public DnnProgressArea() - // { - // Utilities.ApplySkin(this); - // } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnProgressArea : RadProgressArea + { + // public DnnProgressArea() + // { + // Utilities.ApplySkin(this); + // } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnProgressManager.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnProgressManager.cs index 8f664c7c1c7..11b65ecd2c8 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnProgressManager.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnProgressManager.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnProgressManager : RadProgressManager - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnProgressManager : RadProgressManager + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadButton.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadButton.cs index 67ea398b49c..2072996e4a5 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadButton.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadButton.cs @@ -1,69 +1,70 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnRadButton : RadButton - { - private bool _Localize = true; - - public bool Localize - { - get - { - if (this.DesignMode) - { - return false; - } - - return this._Localize; - } - - set - { - this._Localize = value; - } - } - - public string LocalResourceFile { get; set; } - - public virtual void LocalizeStrings() - { - if (this.Localize) - { - if (!string.IsNullOrEmpty(this.ToolTip)) - { - this.ToolTip = Localization.GetString(this.ToolTip, this.LocalResourceFile); - } - - if (!string.IsNullOrEmpty(this.Text)) - { - this.Text = Localization.GetString(this.Text, this.LocalResourceFile); - - if (string.IsNullOrEmpty(this.ToolTip)) - { - this.ToolTip = Localization.GetString(string.Format("{0}.ToolTip", this.Text), this.LocalResourceFile); - } - } - } - } - - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - this.LocalResourceFile = Utilities.GetLocalResourceFile(this); - } - - protected override void Render(HtmlTextWriter writer) - { - this.LocalizeStrings(); - base.Render(writer); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnRadButton : RadButton + { + private bool _Localize = true; + + public bool Localize + { + get + { + if (this.DesignMode) + { + return false; + } + + return this._Localize; + } + + set + { + this._Localize = value; + } + } + + public string LocalResourceFile { get; set; } + + public virtual void LocalizeStrings() + { + if (this.Localize) + { + if (!string.IsNullOrEmpty(this.ToolTip)) + { + this.ToolTip = Localization.GetString(this.ToolTip, this.LocalResourceFile); + } + + if (!string.IsNullOrEmpty(this.Text)) + { + this.Text = Localization.GetString(this.Text, this.LocalResourceFile); + + if (string.IsNullOrEmpty(this.ToolTip)) + { + this.ToolTip = Localization.GetString(string.Format("{0}.ToolTip", this.Text), this.LocalResourceFile); + } + } + } + } + + protected override void OnPreRender(EventArgs e) + { + base.OnPreRender(e); + this.LocalResourceFile = Utilities.GetLocalResourceFile(this); + } + + protected override void Render(HtmlTextWriter writer) + { + this.LocalizeStrings(); + base.Render(writer); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadRibbonBar.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadRibbonBar.cs index 786eceacb9d..5119444da06 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadRibbonBar.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadRibbonBar.cs @@ -2,12 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; - using Telerik.Web.UI; + using Telerik.Web.UI; - public class DnnRadRibbonBar : RadRibbonBar - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnRadRibbonBar : RadRibbonBar + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/Core Wrappers/DnnRadTab.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadTab.cs similarity index 67% rename from DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/Core Wrappers/DnnRadTab.cs rename to DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadTab.cs index 1a367e47ebf..c56b7388042 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/Core Wrappers/DnnRadTab.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadTab.cs @@ -1,10 +1,15 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information namespace DotNetNuke.Web.UI.WebControls { - using Telerik.Web.UI; - + using System; + + using Telerik.Web.UI; + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] public class DnnRadTab : RadTab - {} + { + + } } diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRating.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRating.cs index 3bcb34b88f5..178df963425 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRating.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRating.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnRating : RadRating - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnRating : RadRating + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRatingItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRatingItem.cs index 6b63156a7e7..633daa806a8 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRatingItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRatingItem.cs @@ -1,34 +1,37 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnRatingItem : RadRatingItem - { - public DnnRatingItem() - { - } - - public DnnRatingItem(string imageUrl) - : base(imageUrl) - { - } - - public DnnRatingItem(string imageUrl, string selectedImageUrl) - : base(imageUrl, selectedImageUrl) - { - } - - public DnnRatingItem(string imageUrl, string selectedImageUrl, string hoveredImageUrl) - : base(imageUrl, selectedImageUrl, hoveredImageUrl) - { - } - - public DnnRatingItem(string imageUrl, string selectedImageUrl, string hoveredImageUrl, string hoveredSelectedImageUrl) - : base(imageUrl, selectedImageUrl, hoveredImageUrl, hoveredSelectedImageUrl) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnRatingItem : RadRatingItem + { + public DnnRatingItem() + { + } + + public DnnRatingItem(string imageUrl) + : base(imageUrl) + { + } + + public DnnRatingItem(string imageUrl, string selectedImageUrl) + : base(imageUrl, selectedImageUrl) + { + } + + public DnnRatingItem(string imageUrl, string selectedImageUrl, string hoveredImageUrl) + : base(imageUrl, selectedImageUrl, hoveredImageUrl) + { + } + + public DnnRatingItem(string imageUrl, string selectedImageUrl, string hoveredImageUrl, string hoveredSelectedImageUrl) + : base(imageUrl, selectedImageUrl, hoveredImageUrl, hoveredSelectedImageUrl) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRotator.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRotator.cs index d852486d132..26256c06830 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRotator.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRotator.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnRotator : RadRotator - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnRotator : RadRotator + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRotatorItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRotatorItem.cs index 8e90b369e17..a6df57849fe 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRotatorItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRotatorItem.cs @@ -1,19 +1,22 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnRotatorItem : RadRotatorItem - { - public DnnRotatorItem() - { - } - - public DnnRotatorItem(object dataItem) - : base(dataItem) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnRotatorItem : RadRotatorItem + { + public DnnRotatorItem() + { + } + + public DnnRotatorItem(object dataItem) + : base(dataItem) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScheduler.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScheduler.cs index 76dfd34390b..31a5b48bd4c 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScheduler.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScheduler.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnScheduler : RadScheduler - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnScheduler : RadScheduler + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerContextMenu.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerContextMenu.cs index 655843388ea..ec924bb847a 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerContextMenu.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerContextMenu.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSchedulerContextMenu : RadSchedulerContextMenu - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSchedulerContextMenu : RadSchedulerContextMenu + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerResourceStyleMapping.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerResourceStyleMapping.cs index c8b2e0fb5aa..c6db11cc5e5 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerResourceStyleMapping.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerResourceStyleMapping.cs @@ -1,24 +1,27 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSchedulerResourceStyleMapping : ResourceStyleMapping - { - public DnnSchedulerResourceStyleMapping() - { - } - - public DnnSchedulerResourceStyleMapping(string type, string key, string applyCssClass) - : base(type, key, applyCssClass) - { - } - - public DnnSchedulerResourceStyleMapping(string type, string key, string text, string applyCssClass) - : base(type, key, text, applyCssClass) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSchedulerResourceStyleMapping : ResourceStyleMapping + { + public DnnSchedulerResourceStyleMapping() + { + } + + public DnnSchedulerResourceStyleMapping(string type, string key, string applyCssClass) + : base(type, key, applyCssClass) + { + } + + public DnnSchedulerResourceStyleMapping(string type, string key, string text, string applyCssClass) + : base(type, key, text, applyCssClass) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerResourceType.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerResourceType.cs index 32d87c37b81..b531e740080 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerResourceType.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerResourceType.cs @@ -1,24 +1,27 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSchedulerResourceType : ResourceType - { - public DnnSchedulerResourceType() - { - } - - public DnnSchedulerResourceType(string resourceTypeName) - : base(resourceTypeName) - { - } - - public DnnSchedulerResourceType(string resourceTypeName, bool allowMultipleResourceValues) - : base(resourceTypeName, allowMultipleResourceValues) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSchedulerResourceType : ResourceType + { + public DnnSchedulerResourceType() + { + } + + public DnnSchedulerResourceType(string resourceTypeName) + : base(resourceTypeName) + { + } + + public DnnSchedulerResourceType(string resourceTypeName, bool allowMultipleResourceValues) + : base(resourceTypeName, allowMultipleResourceValues) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScriptBlock.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScriptBlock.cs index 6ef688d3ecd..3f34f6c836c 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScriptBlock.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScriptBlock.cs @@ -2,12 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; - using Telerik.Web.UI; + using Telerik.Web.UI; - public class DnnScriptBlock : RadScriptBlock - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnScriptBlock : RadScriptBlock + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScriptManager.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScriptManager.cs index 8c66b6d5e02..b59baab72a0 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScriptManager.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScriptManager.cs @@ -2,12 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; - using Telerik.Web.UI; + using Telerik.Web.UI; - internal class DnnScriptManager : RadScriptManager - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + internal class DnnScriptManager : RadScriptManager + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMap.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMap.cs index cba7a519547..179f6e797b0 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMap.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMap.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSiteMap : RadSiteMap - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSiteMap : RadSiteMap + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapLevelSetting.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapLevelSetting.cs index c89dc2520cf..9fc08552217 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapLevelSetting.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapLevelSetting.cs @@ -1,29 +1,32 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSiteMapLevelSetting : SiteMapLevelSetting - { - public DnnSiteMapLevelSetting() - { - } - - public DnnSiteMapLevelSetting(int level) - : base(level) - { - } - - public DnnSiteMapLevelSetting(int level, SiteMapLayout layout) - : base(level, layout) - { - } - - public DnnSiteMapLevelSetting(SiteMapLayout layout) - : base(layout) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSiteMapLevelSetting : SiteMapLevelSetting + { + public DnnSiteMapLevelSetting() + { + } + + public DnnSiteMapLevelSetting(int level) + : base(level) + { + } + + public DnnSiteMapLevelSetting(int level, SiteMapLayout layout) + : base(level, layout) + { + } + + public DnnSiteMapLevelSetting(SiteMapLayout layout) + : base(layout) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapNode.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapNode.cs index 1ee6cf6e75d..16f740c5bd5 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapNode.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapNode.cs @@ -1,19 +1,22 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSiteMapNode : RadSiteMapNode - { - public DnnSiteMapNode() - { - } - - public DnnSiteMapNode(string text, string navigateUrl) - : base(text, navigateUrl) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSiteMapNode : RadSiteMapNode + { + public DnnSiteMapNode() + { + } + + public DnnSiteMapNode(string text, string navigateUrl) + : base(text, navigateUrl) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapNodeBinding.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapNodeBinding.cs index 9209e0d7ead..4c258ac2bca 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapNodeBinding.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapNodeBinding.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSiteMapNodeBinding : RadSiteMapNodeBinding - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSiteMapNodeBinding : RadSiteMapNodeBinding + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSkinComboBox.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSkinComboBox.cs index 32eb6103a1b..bc4dcc7c028 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSkinComboBox.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSkinComboBox.cs @@ -2,117 +2,118 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.ComponentModel; - using System.Linq; - using System.Text; - using System.Web.UI; - - using DotNetNuke.Common; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Entities.Users; - using DotNetNuke.UI.Skins; - using Telerik.Web.UI; - - [ToolboxData("<{0}:DnnSkinComboBox runat='server'>")] - public class DnnSkinComboBox : DnnComboBox - { - public DnnSkinComboBox() - { - this.PortalId = Null.NullInteger; - } - - public int PortalId { get; set; } - - public string RootPath { get; set; } - - public SkinScope Scope { get; set; } - - public bool IncludeNoneSpecificItem { get; set; } - - public string NoneSpecificText { get; set; } - - private PortalInfo Portal - { - get { return this.PortalId == Null.NullInteger ? null : PortalController.Instance.GetPortal(this.PortalId); } - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - this.DataTextField = "Key"; - this.DataValueField = "Value"; - - if (!this.Page.IsPostBack && !string.IsNullOrEmpty(this.RootPath)) - { - this.DataSource = SkinController.GetSkins(this.Portal, this.RootPath, this.Scope) - .ToDictionary(skin => skin.Key, skin => skin.Value); - this.DataBind(this.SelectedValue); - - if (this.IncludeNoneSpecificItem) - { - this.InsertItem(0, this.NoneSpecificText, string.Empty); - } - } - - this.AttachEvents(); - } - - protected override void PerformDataBinding(IEnumerable dataSource) - { - // do not select item during data binding, item will select later - var selectedValue = this.SelectedValue; - this.SelectedValue = string.Empty; - - base.PerformDataBinding(dataSource); - - this.SelectedValue = selectedValue; - } - - private void AttachEvents() - { - if (!UserController.Instance.GetCurrentUserInfo().IsSuperUser) - { - return; - } - - this.Attributes.Add("PortalPath", this.Portal != null ? this.Portal.HomeDirectory : string.Empty); - this.Attributes.Add("HostPath", Globals.HostPath); - - this.OnClientSelectedIndexChanged = "selectedIndexChangedMethod"; - var indexChangedMethod = @"function selectedIndexChangedMethod(sender, eventArgs){ - var value = eventArgs.get_item().get_value(); - value = value.replace('[L]', sender.get_attributes().getAttribute('PortalPath')); - value = value.replace('[G]', sender.get_attributes().getAttribute('HostPath')); - sender.get_inputDomElement().title = value; -}"; - this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "OnClientSelectedIndexChanged", indexChangedMethod, true); - - foreach (RadComboBoxItem item in this.Items) - { - if (string.IsNullOrEmpty(item.Value)) - { - continue; - } - - var tooltip = item.Value.Replace("[G]", Globals.HostPath); - if (this.Portal != null) - { - tooltip = tooltip.Replace("[L]", this.Portal.HomeDirectory); - } - - item.ToolTip = tooltip; - if (item.Value.Equals(this.SelectedValue)) - { - this.ToolTip = tooltip; - } - } - } - } -} +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.ComponentModel; + using System.Linq; + using System.Text; + using System.Web.UI; + + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Users; + using DotNetNuke.UI.Skins; + using Telerik.Web.UI; + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + [ToolboxData("<{0}:DnnSkinComboBox runat='server'>")] + public class DnnSkinComboBox : DnnComboBox + { + public DnnSkinComboBox() + { + this.PortalId = Null.NullInteger; + } + + public int PortalId { get; set; } + + public string RootPath { get; set; } + + public SkinScope Scope { get; set; } + + public bool IncludeNoneSpecificItem { get; set; } + + public string NoneSpecificText { get; set; } + + private PortalInfo Portal + { + get { return this.PortalId == Null.NullInteger ? null : PortalController.Instance.GetPortal(this.PortalId); } + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + + this.DataTextField = "Key"; + this.DataValueField = "Value"; + + if (!this.Page.IsPostBack && !string.IsNullOrEmpty(this.RootPath)) + { + this.DataSource = SkinController.GetSkins(this.Portal, this.RootPath, this.Scope) + .ToDictionary(skin => skin.Key, skin => skin.Value); + this.DataBind(this.SelectedValue); + + if (this.IncludeNoneSpecificItem) + { + this.InsertItem(0, this.NoneSpecificText, string.Empty); + } + } + + this.AttachEvents(); + } + + protected override void PerformDataBinding(IEnumerable dataSource) + { + // do not select item during data binding, item will select later + var selectedValue = this.SelectedValue; + this.SelectedValue = string.Empty; + + base.PerformDataBinding(dataSource); + + this.SelectedValue = selectedValue; + } + + private void AttachEvents() + { + if (!UserController.Instance.GetCurrentUserInfo().IsSuperUser) + { + return; + } + + this.Attributes.Add("PortalPath", this.Portal != null ? this.Portal.HomeDirectory : string.Empty); + this.Attributes.Add("HostPath", Globals.HostPath); + + this.OnClientSelectedIndexChanged = "selectedIndexChangedMethod"; + var indexChangedMethod = @"function selectedIndexChangedMethod(sender, eventArgs){ + var value = eventArgs.get_item().get_value(); + value = value.replace('[L]', sender.get_attributes().getAttribute('PortalPath')); + value = value.replace('[G]', sender.get_attributes().getAttribute('HostPath')); + sender.get_inputDomElement().title = value; +}"; + this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "OnClientSelectedIndexChanged", indexChangedMethod, true); + + foreach (RadComboBoxItem item in this.Items) + { + if (string.IsNullOrEmpty(item.Value)) + { + continue; + } + + var tooltip = item.Value.Replace("[G]", Globals.HostPath); + if (this.Portal != null) + { + tooltip = tooltip.Replace("[L]", this.Portal.HomeDirectory); + } + + item.ToolTip = tooltip; + if (item.Value.Equals(this.SelectedValue)) + { + this.ToolTip = tooltip; + } + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSlider.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSlider.cs index b6f6e8b50a5..d8dcb4dd0d8 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSlider.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSlider.cs @@ -1,17 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnSlider : RadSlider - { - // public DnnSlider() - // { - // Utilities.ApplySkin(this); - // } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSlider : RadSlider + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSliderItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSliderItem.cs index d971b9b7f6c..cf8422819d9 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSliderItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSliderItem.cs @@ -1,24 +1,27 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSliderItem : RadSliderItem - { - public DnnSliderItem() - { - } - - public DnnSliderItem(string text) - : base(text) - { - } - - public DnnSliderItem(string text, string value) - : base(text, value) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSliderItem : RadSliderItem + { + public DnnSliderItem() + { + } + + public DnnSliderItem(string text) + : base(text) + { + } + + public DnnSliderItem(string text, string value) + : base(text, value) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSpell.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSpell.cs index bf98d73ee2a..b1dd21faf15 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSpell.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSpell.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSpell : RadSpell - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSpell : RadSpell + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitBar.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitBar.cs index 1451f65609b..a05b73c7562 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitBar.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitBar.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSplitBar : RadSplitBar - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSplitBar : RadSplitBar + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitPane.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitPane.cs index e338c263ed3..85b3ddff0f7 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitPane.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitPane.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSplitPane : RadPane - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSplitPane : RadPane + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitSlidingPane.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitSlidingPane.cs index 2e5b161f045..5d260c41689 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitSlidingPane.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitSlidingPane.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSplitSlidingPane : RadSlidingPane - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSplitSlidingPane : RadSlidingPane + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitSlidingZone.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitSlidingZone.cs index 4b7da72df31..16a96ea7408 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitSlidingZone.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitSlidingZone.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSplitSlidingZone : RadSlidingZone - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSplitSlidingZone : RadSlidingZone + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitter.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitter.cs index 9fbd0eb311d..ce5dc524d82 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitter.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitter.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSplitter : RadSplitter - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSplitter : RadSplitter + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTabPanel.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTabPanel.cs index 047fd8f225d..03cabdfeda5 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTabPanel.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTabPanel.cs @@ -1,113 +1,114 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI; + using System.Web.UI.WebControls; using Telerik.Web.UI; - [ParseChildrenAttribute(true)] - public class DnnTabPanel : WebControl - { - private DnnTabCollection _Tabs; - private RadMultiPage _TelerikPages; - private RadTabStrip _TelerikTabs; - - public DnnTabCollection Tabs - { - get - { - if (this._Tabs == null) - { - this._Tabs = new DnnTabCollection(this); - } - - return this._Tabs; - } - } - - private RadTabStrip TelerikTabs - { - get - { - if (this._TelerikTabs == null) - { - this._TelerikTabs = new RadTabStrip(); - } - - return this._TelerikTabs; - } - } - - private RadMultiPage TelerikPages - { - get - { - if (this._TelerikPages == null) - { - this._TelerikPages = new RadMultiPage(); - } - - return this._TelerikPages; - } - } - - protected override void OnLoad(EventArgs e) - { - this.EnsureChildControls(); - } - - protected override void CreateChildControls() - { - this.Controls.Clear(); - - this.TelerikTabs.ID = this.ID + "_Tabs"; - this.TelerikTabs.Skin = "Office2007"; - this.TelerikTabs.EnableEmbeddedSkins = true; - - this.TelerikPages.ID = this.ID + "_Pages"; - - this.TelerikTabs.MultiPageID = this.TelerikPages.ID; - - this.Controls.Add(this.TelerikTabs); - this.Controls.Add(this.TelerikPages); - } - - protected override void OnPreRender(EventArgs e) - { - if (!this.Page.IsPostBack) - { - this.TelerikTabs.SelectedIndex = 0; - this.TelerikPages.SelectedIndex = 0; - - int idIndex = 0; - - foreach (DnnTab t in this.Tabs) - { - RadTab tab = new RadTab(); - tab.TabTemplate = t.Header; - RadPageView pageView = new RadPageView(); - pageView.Controls.Add(t); - - tab.PageViewID = "PV_" + idIndex; - pageView.ID = "PV_" + idIndex; - - this.TelerikTabs.Tabs.Add(tab); - this.TelerikPages.PageViews.Add(pageView); - - idIndex = idIndex + 1; - } - } - - base.OnPreRender(e); - } - - protected override void Render(HtmlTextWriter writer) - { - base.Render(writer); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + [ParseChildrenAttribute(true)] + public class DnnTabPanel : WebControl + { + private DnnTabCollection _Tabs; + private RadMultiPage _TelerikPages; + private RadTabStrip _TelerikTabs; + + public DnnTabCollection Tabs + { + get + { + if (this._Tabs == null) + { + this._Tabs = new DnnTabCollection(this); + } + + return this._Tabs; + } + } + + private RadTabStrip TelerikTabs + { + get + { + if (this._TelerikTabs == null) + { + this._TelerikTabs = new RadTabStrip(); + } + + return this._TelerikTabs; + } + } + + private RadMultiPage TelerikPages + { + get + { + if (this._TelerikPages == null) + { + this._TelerikPages = new RadMultiPage(); + } + + return this._TelerikPages; + } + } + + protected override void OnLoad(EventArgs e) + { + this.EnsureChildControls(); + } + + protected override void CreateChildControls() + { + this.Controls.Clear(); + + this.TelerikTabs.ID = this.ID + "_Tabs"; + this.TelerikTabs.Skin = "Office2007"; + this.TelerikTabs.EnableEmbeddedSkins = true; + + this.TelerikPages.ID = this.ID + "_Pages"; + + this.TelerikTabs.MultiPageID = this.TelerikPages.ID; + + this.Controls.Add(this.TelerikTabs); + this.Controls.Add(this.TelerikPages); + } + + protected override void OnPreRender(EventArgs e) + { + if (!this.Page.IsPostBack) + { + this.TelerikTabs.SelectedIndex = 0; + this.TelerikPages.SelectedIndex = 0; + + int idIndex = 0; + + foreach (DnnTab t in this.Tabs) + { + RadTab tab = new RadTab(); + tab.TabTemplate = t.Header; + RadPageView pageView = new RadPageView(); + pageView.Controls.Add(t); + + tab.PageViewID = "PV_" + idIndex; + pageView.ID = "PV_" + idIndex; + + this.TelerikTabs.Tabs.Add(tab); + this.TelerikPages.PageViews.Add(pageView); + + idIndex = idIndex + 1; + } + } + + base.OnPreRender(e); + } + + protected override void Render(HtmlTextWriter writer) + { + base.Render(writer); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTabStrip.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTabStrip.cs index 26929df2991..943595d0337 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTabStrip.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTabStrip.cs @@ -1,18 +1,19 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnTabStrip : RadTabStrip - { - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - Utilities.ApplySkin(this); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTabStrip : RadTabStrip + { + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + Utilities.ApplySkin(this); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTagCloud.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTagCloud.cs index a82b812bbdf..9980c4d8d77 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTagCloud.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTagCloud.cs @@ -1,15 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnTagCloud : RadTagCloud - { - protected void OnItemDataBound(DnnTagCloudItem item) - { - base.OnItemDataBound(item); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTagCloud : RadTagCloud + { + protected void OnItemDataBound(DnnTagCloudItem item) + { + base.OnItemDataBound(item); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTagCloudItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTagCloudItem.cs index bc4b0c7c9d8..7caa158a977 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTagCloudItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTagCloudItem.cs @@ -1,19 +1,22 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnTagCloudItem : RadTagCloudItem - { - public DnnTagCloudItem() - { - } - - public DnnTagCloudItem(string text) - : base(text) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTagCloudItem : RadTagCloudItem + { + public DnnTagCloudItem() + { + } + + public DnnTagCloudItem(string text) + : base(text) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTextBox.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTextBox.cs index 8dcb73c8dd3..34ed12b5fe6 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTextBox.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTextBox.cs @@ -1,17 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnTextBox : RadTextBox - { - // public DnnTextBox() - // { - // Utilities.ApplySkin(this); - // } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTextBox : RadTextBox + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTicker.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTicker.cs index 75e4096cd4b..101ef6e2506 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTicker.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTicker.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnTicker : RadTicker - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTicker : RadTicker + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTickerItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTickerItem.cs index 46d3b343346..f9040fb720a 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTickerItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTickerItem.cs @@ -1,24 +1,27 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnTickerItem : RadTickerItem - { - public DnnTickerItem() - { - } - - public DnnTickerItem(string text) - : base(text) - { - } - - public DnnTickerItem(string text, string navigateUrl) - : base(text, navigateUrl) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTickerItem : RadTickerItem + { + public DnnTickerItem() + { + } + + public DnnTickerItem(string text) + : base(text) + { + } + + public DnnTickerItem(string text, string navigateUrl) + : base(text, navigateUrl) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTimePicker.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTimePicker.cs index dc45cc088b0..3a7d3dfe69a 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTimePicker.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTimePicker.cs @@ -1,19 +1,20 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnTimePicker : RadTimePicker - { - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - this.EnableEmbeddedBaseStylesheet = true; - Utilities.ApplySkin(this, string.Empty, "DatePicker"); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTimePicker : RadTimePicker + { + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + this.EnableEmbeddedBaseStylesheet = true; + Utilities.ApplySkin(this, string.Empty, "DatePicker"); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTimeView.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTimeView.cs index 6088ddd8d79..e96c112f3f6 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTimeView.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTimeView.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnTimeView : RadTimeView - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTimeView : RadTimeView + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBar.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBar.cs index 639c9b4af95..89a1e68cba7 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBar.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBar.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnToolBar : RadToolBar - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnToolBar : RadToolBar + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarButton.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarButton.cs index 543307bedbf..85d41628510 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarButton.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarButton.cs @@ -1,24 +1,27 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnToolBarButton : RadToolBarButton - { - public DnnToolBarButton() - { - } - - public DnnToolBarButton(string text) - : base(text) - { - } - - public DnnToolBarButton(string text, bool isChecked, string @group) - : base(text, isChecked, @group) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnToolBarButton : RadToolBarButton + { + public DnnToolBarButton() + { + } + + public DnnToolBarButton(string text) + : base(text) + { + } + + public DnnToolBarButton(string text, bool isChecked, string @group) + : base(text, isChecked, @group) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarDropDown.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarDropDown.cs index 5bc6bd7bffb..7602e0b2b48 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarDropDown.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarDropDown.cs @@ -1,19 +1,23 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ + +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnToolBarDropDown : RadToolBarDropDown - { - public DnnToolBarDropDown() - { - } - - public DnnToolBarDropDown(string text) - : base(text) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnToolBarDropDown : RadToolBarDropDown + { + public DnnToolBarDropDown() + { + } + + public DnnToolBarDropDown(string text) + : base(text) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarSplitButton.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarSplitButton.cs index 5297f958494..fd1e4270614 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarSplitButton.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarSplitButton.cs @@ -1,19 +1,22 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnToolBarSplitButton : RadToolBarSplitButton - { - public DnnToolBarSplitButton() - { - } - - public DnnToolBarSplitButton(string text) - : base(text) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnToolBarSplitButton : RadToolBarSplitButton + { + public DnnToolBarSplitButton() + { + } + + public DnnToolBarSplitButton(string text) + : base(text) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolTip.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolTip.cs index c73f2352935..8e1176b2533 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolTip.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolTip.cs @@ -1,14 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI; - using DotNetNuke.Web.UI; + using DotNetNuke.Web.UI; using Telerik.Web.UI; + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] public class DnnToolTip : RadToolTip, ILocalizable { private bool _localize = true; @@ -61,5 +62,5 @@ protected override void Render(HtmlTextWriter writer) this.LocalizeStrings(); base.Render(writer); } - } -} + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolTipManager.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolTipManager.cs index c7e5bec5745..bc0622179cb 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolTipManager.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolTipManager.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnToolTipManager : RadToolTipManager - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnToolTipManager : RadToolTipManager + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeList.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeList.cs index 132e3ae5b00..49e6d6fdd61 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeList.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeList.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnTreeList : RadTreeList - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTreeList : RadTreeList + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeNode.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeNode.cs index 106989776dc..0c0652dc493 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeNode.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeNode.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnTreeNode : RadTreeNode - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTreeNode : RadTreeNode + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeView.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeView.cs index 676d0ec4e4f..82e2bcb8381 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeView.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeView.cs @@ -1,17 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnTreeView : RadTreeView - { - // public DnnTreeView() - // { - // Utilities.ApplySkin(this); - // } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTreeView : RadTreeView + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeViewContextMenu.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeViewContextMenu.cs index c06604cdb90..18d2a35d078 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeViewContextMenu.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeViewContextMenu.cs @@ -1,17 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnTreeViewContextMenu : RadTreeViewContextMenu - { - // public DnnTreeViewContextMenu() - // { - // Utilities.ApplySkin(this); - // } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTreeViewContextMenu : RadTreeViewContextMenu + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnUpload.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnUpload.cs index 4be5ea9c44f..9c1ade96566 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnUpload.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnUpload.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnUpload : RadUpload - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnUpload : RadUpload + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnWindow.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnWindow.cs index afab5c19831..4a286639fb6 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnWindow.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnWindow.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnWindow : RadWindow - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnWindow : RadWindow + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnWindowManager.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnWindowManager.cs index 922e0edfa58..86200738448 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnWindowManager.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnWindowManager.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnWindowManager : RadWindowManager - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnWindowManager : RadWindowManager + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/PropertyEditorControls/DateEditControl.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/PropertyEditorControls/DateEditControl.cs index 82ed0d856ba..77bc6cbb772 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/PropertyEditorControls/DateEditControl.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/PropertyEditorControls/DateEditControl.cs @@ -1,282 +1,279 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls.PropertyEditorControls -{ - using System; - using System.Collections.Specialized; - using System.Data.SqlTypes; - using System.Globalization; - using System.Web.UI; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls.PropertyEditorControls +{ + using System; + using System.Collections.Specialized; + using System.Data.SqlTypes; + using System.Globalization; + using System.Web.UI; - using DotNetNuke.Common; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Instrumentation; - using DotNetNuke.Services.Localization; - using DotNetNuke.UI.WebControls; - using Telerik.Web.UI; + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Instrumentation; + using DotNetNuke.UI.WebControls; - using Calendar = DotNetNuke.Common.Utilities.Calendar; - /// ----------------------------------------------------------------------------- - /// - /// The DateEditControl control provides a standard UI component for editing - /// date properties. - /// - /// - /// - /// ----------------------------------------------------------------------------- - [ToolboxData("<{0}:DateEditControl runat=server>")] - public class DateEditControl : EditControl - { - private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(DateEditControl)); - private DnnDatePicker _dateControl; - - public override string EditControlClientId - { - get - { - this.EnsureChildControls(); - return this.DateControl.DateInput.ClientID; - } - } - - public override string ID - { - get - { - return base.ID + "_control"; - } - - set - { - base.ID = value; - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets dateValue returns the Date representation of the Value. - /// - /// A Date representing the Value. - /// ----------------------------------------------------------------------------- - protected DateTime DateValue - { - get - { - DateTime dteValue = Null.NullDate; - try - { - var dteString = Convert.ToString(this.Value); - DateTime.TryParse(dteString, CultureInfo.InvariantCulture, DateTimeStyles.None, out dteValue); - } - catch (Exception exc) - { - Logger.Error(exc); - } - - return dteValue; - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets defaultDateFormat is a string that will be used to format the date in the absence of a - /// FormatAttribute. - /// - /// A String representing the default format to use to render the date. - /// A Format String. - /// ----------------------------------------------------------------------------- - protected virtual string DefaultFormat - { - get - { - return "d"; - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets format is a string that will be used to format the date in View mode. - /// - /// A String representing the format to use to render the date. - /// A Format String. - /// ----------------------------------------------------------------------------- - protected virtual string Format - { - get - { - string _Format = this.DefaultFormat; - if (this.CustomAttributes != null) - { - foreach (Attribute attribute in this.CustomAttributes) - { - if (attribute is FormatAttribute) - { - var formatAtt = (FormatAttribute)attribute; - _Format = formatAtt.Format; - break; - } - } - } - - return _Format; - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets oldDateValue returns the Date representation of the OldValue. - /// - /// A Date representing the OldValue. - /// ----------------------------------------------------------------------------- - protected DateTime OldDateValue - { - get - { - DateTime dteValue = Null.NullDate; - try - { - // Try and cast the value to an DateTime - var dteString = this.OldValue as string; - if (!string.IsNullOrEmpty(dteString)) - { - dteValue = DateTime.Parse(dteString, CultureInfo.InvariantCulture); - } - } - catch (Exception exc) - { - Logger.Error(exc); - } - - return dteValue; - } - } - - /// - /// Gets or sets the Value expressed as a String. - /// - protected override string StringValue - { - get - { - string _StringValue = Null.NullString; - if (this.DateValue.ToUniversalTime().Date != (DateTime)SqlDateTime.MinValue && this.DateValue != Null.NullDate) - { - _StringValue = this.DateValue.ToString(this.Format); - } - - return _StringValue; - } - - set - { - this.Value = DateTime.Parse(value); - } - } - - private DnnDatePicker DateControl - { - get - { - if (this._dateControl == null) - { - this._dateControl = new DnnDatePicker(); - } - - return this._dateControl; - } - } - - public override bool LoadPostData(string postDataKey, NameValueCollection postCollection) - { - this.EnsureChildControls(); - bool dataChanged = false; - string presentValue = this.StringValue; - string postedValue = postCollection[postDataKey + "_control"]; - if (!presentValue.Equals(postedValue)) - { - if (string.IsNullOrEmpty(postedValue)) - { - this.Value = Null.NullDate; - dataChanged = true; - } - else - { - this.Value = DateTime.Parse(postedValue).ToString(CultureInfo.InvariantCulture); - dataChanged = true; - } - } - - this.LoadDateControls(); - return dataChanged; - } - - protected override void CreateChildControls() - { - base.CreateChildControls(); - - this.DateControl.ControlStyle.CopyFrom(this.ControlStyle); - this.DateControl.ID = base.ID + "_control"; - - this.Controls.Add(this.DateControl); - } - - protected virtual void LoadDateControls() - { - if (this.DateValue != Null.NullDate) - { - this.DateControl.SelectedDate = this.DateValue.Date; - } - } - - /// - /// OnDataChanged is called by the PostBack Handler when the Data has changed. - /// - /// An EventArgs object. - protected override void OnDataChanged(EventArgs e) - { - var args = new PropertyEditorEventArgs(this.Name); - args.Value = this.DateValue; - args.OldValue = this.OldDateValue; - args.StringValue = this.DateValue.ToString(CultureInfo.InvariantCulture); - this.OnValueChanged(args); - } - - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - - this.LoadDateControls(); - - if (this.Page != null && this.EditMode == PropertyEditorMode.Edit) - { - this.Page.RegisterRequiresPostBack(this); - } - } - - /// - /// RenderEditMode is called by the base control to render the control in Edit Mode. - /// - /// - protected override void RenderEditMode(HtmlTextWriter writer) - { - this.RenderChildren(writer); - } - - /// ----------------------------------------------------------------------------- - /// - /// RenderViewMode renders the View (readonly) mode of the control. - /// - /// A HtmlTextWriter. - /// ----------------------------------------------------------------------------- - protected override void RenderViewMode(HtmlTextWriter writer) - { - this.ControlStyle.AddAttributesToRender(writer); - writer.RenderBeginTag(HtmlTextWriterTag.Span); - writer.Write(this.StringValue); - writer.RenderEndTag(); - } - } -} + /// ----------------------------------------------------------------------------- + /// + /// The DateEditControl control provides a standard UI component for editing + /// date properties. + /// + /// + /// + /// ----------------------------------------------------------------------------- + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + [ToolboxData("<{0}:DateEditControl runat=server>")] + public class DateEditControl : EditControl + { + private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(DateEditControl)); + private DnnDatePicker _dateControl; + + public override string EditControlClientId + { + get + { + this.EnsureChildControls(); + return this.DateControl.DateInput.ClientID; + } + } + + public override string ID + { + get + { + return base.ID + "_control"; + } + + set + { + base.ID = value; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets dateValue returns the Date representation of the Value. + /// + /// A Date representing the Value. + /// ----------------------------------------------------------------------------- + protected DateTime DateValue + { + get + { + DateTime dteValue = Null.NullDate; + try + { + var dteString = Convert.ToString(this.Value); + DateTime.TryParse(dteString, CultureInfo.InvariantCulture, DateTimeStyles.None, out dteValue); + } + catch (Exception exc) + { + Logger.Error(exc); + } + + return dteValue; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets defaultDateFormat is a string that will be used to format the date in the absence of a + /// FormatAttribute. + /// + /// A String representing the default format to use to render the date. + /// A Format String. + /// ----------------------------------------------------------------------------- + protected virtual string DefaultFormat + { + get + { + return "d"; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets format is a string that will be used to format the date in View mode. + /// + /// A String representing the format to use to render the date. + /// A Format String. + /// ----------------------------------------------------------------------------- + protected virtual string Format + { + get + { + string _Format = this.DefaultFormat; + if (this.CustomAttributes != null) + { + foreach (Attribute attribute in this.CustomAttributes) + { + if (attribute is FormatAttribute) + { + var formatAtt = (FormatAttribute)attribute; + _Format = formatAtt.Format; + break; + } + } + } + + return _Format; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets oldDateValue returns the Date representation of the OldValue. + /// + /// A Date representing the OldValue. + /// ----------------------------------------------------------------------------- + protected DateTime OldDateValue + { + get + { + DateTime dteValue = Null.NullDate; + try + { + // Try and cast the value to an DateTime + var dteString = this.OldValue as string; + if (!string.IsNullOrEmpty(dteString)) + { + dteValue = DateTime.Parse(dteString, CultureInfo.InvariantCulture); + } + } + catch (Exception exc) + { + Logger.Error(exc); + } + + return dteValue; + } + } + + /// + /// Gets or sets the Value expressed as a String. + /// + protected override string StringValue + { + get + { + string _StringValue = Null.NullString; + if (this.DateValue.ToUniversalTime().Date != (DateTime)SqlDateTime.MinValue && this.DateValue != Null.NullDate) + { + _StringValue = this.DateValue.ToString(this.Format); + } + + return _StringValue; + } + + set + { + this.Value = DateTime.Parse(value); + } + } + + private DnnDatePicker DateControl + { + get + { + if (this._dateControl == null) + { + this._dateControl = new DnnDatePicker(); + } + + return this._dateControl; + } + } + + public override bool LoadPostData(string postDataKey, NameValueCollection postCollection) + { + this.EnsureChildControls(); + bool dataChanged = false; + string presentValue = this.StringValue; + string postedValue = postCollection[postDataKey + "_control"]; + if (!presentValue.Equals(postedValue)) + { + if (string.IsNullOrEmpty(postedValue)) + { + this.Value = Null.NullDate; + dataChanged = true; + } + else + { + this.Value = DateTime.Parse(postedValue).ToString(CultureInfo.InvariantCulture); + dataChanged = true; + } + } + + this.LoadDateControls(); + return dataChanged; + } + + protected override void CreateChildControls() + { + base.CreateChildControls(); + + this.DateControl.ControlStyle.CopyFrom(this.ControlStyle); + this.DateControl.ID = base.ID + "_control"; + + this.Controls.Add(this.DateControl); + } + + protected virtual void LoadDateControls() + { + if (this.DateValue != Null.NullDate) + { + this.DateControl.SelectedDate = this.DateValue.Date; + } + } + + /// + /// OnDataChanged is called by the PostBack Handler when the Data has changed. + /// + /// An EventArgs object. + protected override void OnDataChanged(EventArgs e) + { + var args = new PropertyEditorEventArgs(this.Name); + args.Value = this.DateValue; + args.OldValue = this.OldDateValue; + args.StringValue = this.DateValue.ToString(CultureInfo.InvariantCulture); + this.OnValueChanged(args); + } + + protected override void OnPreRender(EventArgs e) + { + base.OnPreRender(e); + + this.LoadDateControls(); + + if (this.Page != null && this.EditMode == PropertyEditorMode.Edit) + { + this.Page.RegisterRequiresPostBack(this); + } + } + + /// + /// RenderEditMode is called by the base control to render the control in Edit Mode. + /// + /// + protected override void RenderEditMode(HtmlTextWriter writer) + { + this.RenderChildren(writer); + } + + /// ----------------------------------------------------------------------------- + /// + /// RenderViewMode renders the View (readonly) mode of the control. + /// + /// A HtmlTextWriter. + /// ----------------------------------------------------------------------------- + protected override void RenderViewMode(HtmlTextWriter writer) + { + this.ControlStyle.AddAttributesToRender(writer); + writer.RenderBeginTag(HtmlTextWriterTag.Span); + writer.Write(this.StringValue); + writer.RenderEndTag(); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/PropertyEditorControls/DateTimeEditControl.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/PropertyEditorControls/DateTimeEditControl.cs index f519a8d6d04..40784b0be57 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/PropertyEditorControls/DateTimeEditControl.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/PropertyEditorControls/DateTimeEditControl.cs @@ -1,282 +1,282 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls.PropertyEditorControls -{ - using System; - using System.Collections.Specialized; - using System.Data.SqlTypes; - using System.Globalization; - using System.Web.UI; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls.PropertyEditorControls +{ + using System; + using System.Collections.Specialized; + using System.Data.SqlTypes; + using System.Globalization; + using System.Web.UI; + using System.Web.UI.WebControls; - using DotNetNuke.Common; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Instrumentation; - using DotNetNuke.Services.Localization; - using DotNetNuke.UI.WebControls; - using Telerik.Web.UI; + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Instrumentation; + using DotNetNuke.Services.Localization; + using DotNetNuke.UI.WebControls; using Calendar = DotNetNuke.Common.Utilities.Calendar; - /// ----------------------------------------------------------------------------- - /// Project: DotNetNuke - /// Namespace: DotNetNuke.UI.WebControls - /// Class: DateEditControl - /// ----------------------------------------------------------------------------- - /// - /// The DateEditControl control provides a standard UI component for editing - /// date properties. - /// - /// - /// - /// ----------------------------------------------------------------------------- - [ToolboxData("<{0}:DateTimeEditControl runat=server>")] - public class DateTimeEditControl : EditControl - { - private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(DateTimeEditControl)); - private DnnDateTimePicker _dateControl; - - public override string ID - { - get - { - return base.ID + "_control"; - } - - set - { - base.ID = value; - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets dateValue returns the Date representation of the Value. - /// - /// A Date representing the Value. - /// ----------------------------------------------------------------------------- - protected DateTime DateValue - { - get - { - DateTime dteValue = Null.NullDate; - try - { - var dteString = Convert.ToString(this.Value); - DateTime.TryParse(dteString, CultureInfo.InvariantCulture, DateTimeStyles.None, out dteValue); - } - catch (Exception exc) - { - Logger.Error(exc); - } - - return dteValue; - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets defaultDateFormat is a string that will be used to format the date in the absence of a - /// FormatAttribute. - /// - /// A String representing the default format to use to render the date. - /// A Format String. - /// ----------------------------------------------------------------------------- - protected virtual string DefaultFormat - { - get - { - return "g"; - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets format is a string that will be used to format the date in View mode. - /// - /// A String representing the format to use to render the date. - /// A Format String. - /// ----------------------------------------------------------------------------- - protected virtual string Format - { - get - { - string _Format = this.DefaultFormat; - if (this.CustomAttributes != null) - { - foreach (Attribute attribute in this.CustomAttributes) - { - if (attribute is FormatAttribute) - { - var formatAtt = (FormatAttribute)attribute; - _Format = formatAtt.Format; - break; - } - } - } - - return _Format; - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets oldDateValue returns the Date representation of the OldValue. - /// - /// A Date representing the OldValue. - /// ----------------------------------------------------------------------------- - protected DateTime OldDateValue - { - get - { - DateTime dteValue = Null.NullDate; - try - { - // Try and cast the value to an DateTime - var dteString = this.OldValue as string; - if (!string.IsNullOrEmpty(dteString)) - { - dteValue = DateTime.Parse(dteString, CultureInfo.InvariantCulture); - } - } - catch (Exception exc) - { - Logger.Error(exc); - } - - return dteValue; - } - } - - /// - /// Gets or sets the Value expressed as a String. - /// - protected override string StringValue - { - get - { - string _StringValue = Null.NullString; - if (this.DateValue.ToUniversalTime().Date != (DateTime)SqlDateTime.MinValue && this.DateValue != Null.NullDate) - { - _StringValue = this.DateValue.ToString(this.Format); - } - - return _StringValue; - } - - set - { - this.Value = DateTime.Parse(value); - } - } - - private DnnDateTimePicker DateControl - { - get - { - if (this._dateControl == null) - { - this._dateControl = new DnnDateTimePicker(); - } - - return this._dateControl; - } - } - - public override bool LoadPostData(string postDataKey, NameValueCollection postCollection) - { - this.EnsureChildControls(); - bool dataChanged = false; - string presentValue = this.StringValue; - string postedValue = postCollection[postDataKey + "_control"]; - if (!presentValue.Equals(postedValue)) - { - if (string.IsNullOrEmpty(postedValue)) - { - this.Value = Null.NullDate; - dataChanged = true; - } - else - { - DateTime value; - if (DateTime.TryParseExact(postedValue, "yyyy-MM-dd-HH-mm-ss", CultureInfo.InvariantCulture, - DateTimeStyles.None, out value)) - { - this.Value = value; - dataChanged = true; - } - } - } - - this.LoadDateControls(); - return dataChanged; - } - - protected override void CreateChildControls() - { - base.CreateChildControls(); - - this.DateControl.ControlStyle.CopyFrom(this.ControlStyle); - this.DateControl.ID = base.ID + "_control"; - - this.Controls.Add(this.DateControl); - } - - protected virtual void LoadDateControls() - { - if (this.DateValue != Null.NullDate) - { - this.DateControl.SelectedDate = this.DateValue; - } - } - - /// - /// OnDataChanged is called by the PostBack Handler when the Data has changed. - /// - /// An EventArgs object. - protected override void OnDataChanged(EventArgs e) - { - var args = new PropertyEditorEventArgs(this.Name); - args.Value = this.DateValue; - args.OldValue = this.OldDateValue; - args.StringValue = this.DateValue.ToString(CultureInfo.InvariantCulture); - this.OnValueChanged(args); - } - - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - - this.LoadDateControls(); - - if (this.Page != null && this.EditMode == PropertyEditorMode.Edit) - { - this.Page.RegisterRequiresPostBack(this); - } - } - - /// - /// RenderEditMode is called by the base control to render the control in Edit Mode. - /// - /// - protected override void RenderEditMode(HtmlTextWriter writer) - { - this.RenderChildren(writer); - } - - /// ----------------------------------------------------------------------------- - /// - /// RenderViewMode renders the View (readonly) mode of the control. - /// - /// A HtmlTextWriter. - /// ----------------------------------------------------------------------------- - protected override void RenderViewMode(HtmlTextWriter writer) - { - this.ControlStyle.AddAttributesToRender(writer); - writer.RenderBeginTag(HtmlTextWriterTag.Span); - writer.Write(this.StringValue); - writer.RenderEndTag(); - } - } -} + /// ----------------------------------------------------------------------------- + /// Project: DotNetNuke + /// Namespace: DotNetNuke.UI.WebControls + /// Class: DateEditControl + /// ----------------------------------------------------------------------------- + /// + /// The DateEditControl control provides a standard UI component for editing + /// date properties. + /// + /// + /// + /// ----------------------------------------------------------------------------- + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + [ToolboxData("<{0}:DateTimeEditControl runat=server>")] + public class DateTimeEditControl : EditControl + { + private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(DateTimeEditControl)); + private DnnDateTimePicker _dateControl; + + public override string ID + { + get + { + return base.ID + "_control"; + } + + set + { + base.ID = value; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets dateValue returns the Date representation of the Value. + /// + /// A Date representing the Value. + /// ----------------------------------------------------------------------------- + protected DateTime DateValue + { + get + { + DateTime dteValue = Null.NullDate; + try + { + var dteString = Convert.ToString(this.Value); + DateTime.TryParse(dteString, CultureInfo.InvariantCulture, DateTimeStyles.None, out dteValue); + } + catch (Exception exc) + { + Logger.Error(exc); + } + + return dteValue; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets defaultDateFormat is a string that will be used to format the date in the absence of a + /// FormatAttribute. + /// + /// A String representing the default format to use to render the date. + /// A Format String. + /// ----------------------------------------------------------------------------- + protected virtual string DefaultFormat + { + get + { + return "g"; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets format is a string that will be used to format the date in View mode. + /// + /// A String representing the format to use to render the date. + /// A Format String. + /// ----------------------------------------------------------------------------- + protected virtual string Format + { + get + { + string _Format = this.DefaultFormat; + if (this.CustomAttributes != null) + { + foreach (Attribute attribute in this.CustomAttributes) + { + if (attribute is FormatAttribute) + { + var formatAtt = (FormatAttribute)attribute; + _Format = formatAtt.Format; + break; + } + } + } + + return _Format; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets oldDateValue returns the Date representation of the OldValue. + /// + /// A Date representing the OldValue. + /// ----------------------------------------------------------------------------- + protected DateTime OldDateValue + { + get + { + DateTime dteValue = Null.NullDate; + try + { + // Try and cast the value to an DateTime + var dteString = this.OldValue as string; + if (!string.IsNullOrEmpty(dteString)) + { + dteValue = DateTime.Parse(dteString, CultureInfo.InvariantCulture); + } + } + catch (Exception exc) + { + Logger.Error(exc); + } + + return dteValue; + } + } + + /// + /// Gets or sets the Value expressed as a String. + /// + protected override string StringValue + { + get + { + string _StringValue = Null.NullString; + if (this.DateValue.ToUniversalTime().Date != (DateTime)SqlDateTime.MinValue && this.DateValue != Null.NullDate) + { + _StringValue = this.DateValue.ToString(this.Format); + } + + return _StringValue; + } + + set + { + this.Value = DateTime.Parse(value); + } + } + + private DnnDateTimePicker DateControl + { + get + { + if (this._dateControl == null) + { + this._dateControl = new DnnDateTimePicker(); + } + + return this._dateControl; + } + } + + public override bool LoadPostData(string postDataKey, NameValueCollection postCollection) + { + this.EnsureChildControls(); + bool dataChanged = false; + string presentValue = this.StringValue; + string postedValue = postCollection[postDataKey + "_control"]; + if (!presentValue.Equals(postedValue)) + { + if (string.IsNullOrEmpty(postedValue)) + { + this.Value = Null.NullDate; + dataChanged = true; + } + else + { + DateTime value; + if (DateTime.TryParseExact(postedValue, "yyyy-MM-dd-HH-mm-ss", CultureInfo.InvariantCulture, + DateTimeStyles.None, out value)) + { + this.Value = value; + dataChanged = true; + } + } + } + + this.LoadDateControls(); + return dataChanged; + } + + protected override void CreateChildControls() + { + base.CreateChildControls(); + + this.DateControl.ControlStyle.CopyFrom(this.ControlStyle); + this.DateControl.ID = base.ID + "_control"; + + this.Controls.Add(this.DateControl); + } + + protected virtual void LoadDateControls() + { + if (this.DateValue != Null.NullDate) + { + this.DateControl.SelectedDate = this.DateValue; + } + } + + /// + /// OnDataChanged is called by the PostBack Handler when the Data has changed. + /// + /// An EventArgs object. + protected override void OnDataChanged(EventArgs e) + { + var args = new PropertyEditorEventArgs(this.Name); + args.Value = this.DateValue; + args.OldValue = this.OldDateValue; + args.StringValue = this.DateValue.ToString(CultureInfo.InvariantCulture); + this.OnValueChanged(args); + } + + protected override void OnPreRender(EventArgs e) + { + base.OnPreRender(e); + + this.LoadDateControls(); + + if (this.Page != null && this.EditMode == PropertyEditorMode.Edit) + { + this.Page.RegisterRequiresPostBack(this); + } + } + + /// + /// RenderEditMode is called by the base control to render the control in Edit Mode. + /// + /// + protected override void RenderEditMode(HtmlTextWriter writer) + { + this.RenderChildren(writer); + } + + /// ----------------------------------------------------------------------------- + /// + /// RenderViewMode renders the View (readonly) mode of the control. + /// + /// A HtmlTextWriter. + /// ----------------------------------------------------------------------------- + protected override void RenderViewMode(HtmlTextWriter writer) + { + this.ControlStyle.AddAttributesToRender(writer); + writer.RenderBeginTag(HtmlTextWriterTag.Span); + writer.Write(this.StringValue); + writer.RenderEndTag(); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/TermsList.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/TermsList.cs index 11fdf385f23..8cfabe8d000 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/TermsList.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/TermsList.cs @@ -1,173 +1,174 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Collections.Generic; - using System.Web.UI.WebControls; - - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Content.Taxonomy; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Collections.Generic; + using System.Web.UI.WebControls; + + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Content.Taxonomy; using Telerik.Web.UI; - public class TermsList : WebControl - { - private bool _IsHeirarchical; - private DnnListBox _ListBox; - - private DnnTreeView _TreeView; - - public event EventHandler SelectedTermChanged; - - public bool IsHeirarchical - { - get - { - return this._IsHeirarchical; - } - } - - public Term SelectedTerm - { - get - { - Term _SelectedTerm = null; - if (!string.IsNullOrEmpty(this.SelectedValue)) - { - int _TermId = int.Parse(this.SelectedValue); - foreach (Term term in this.Terms) - { - if (term.TermId == _TermId) - { - _SelectedTerm = term; - break; - } - } - } - - return _SelectedTerm; - } - } - - public string SelectedValue - { - get - { - string _SelectedValue = Null.NullString; - if (this.IsHeirarchical) - { - _SelectedValue = this._TreeView.SelectedValue; - } - else - { - _SelectedValue = this._ListBox.SelectedValue; - } - - return _SelectedValue; - } - } - - public List Terms - { - get - { - object _DataSource = null; - if (this.IsHeirarchical) - { - _DataSource = this._TreeView.DataSource; - } - else - { - _DataSource = this._ListBox.DataSource; - } - - return _DataSource as List; - } - } - - public void BindTerms(List terms, bool isHeirarchical, bool dataBind) - { - this._IsHeirarchical = isHeirarchical; - - this._ListBox.DataSource = terms; - this._TreeView.DataSource = terms; - - if (dataBind) - { - this._ListBox.DataBind(); - this._TreeView.DataBind(); - } - } - - public void ClearSelectedTerm() - { - this._ListBox.SelectedIndex = Null.NullInteger; - this._TreeView.UnselectAllNodes(); - } - - protected override void CreateChildControls() - { - this.Controls.Clear(); - - this._ListBox = new DnnListBox(); - this._ListBox.ID = string.Concat(this.ID, "_List"); - this._ListBox.DataTextField = "Name"; - this._ListBox.DataValueField = "TermId"; - this._ListBox.AutoPostBack = true; - this._ListBox.SelectedIndexChanged += this.ListBoxSelectedIndexChanged; - - this._TreeView = new DnnTreeView(); - this._TreeView.ID = string.Concat(this.ID, "_Tree"); - this._TreeView.DataTextField = "Name"; - this._TreeView.DataValueField = "TermId"; - this._TreeView.DataFieldID = "TermId"; - this._TreeView.DataFieldParentID = "ParentTermId"; - this._TreeView.NodeClick += this.TreeViewNodeClick; - - this.Controls.Add(this._ListBox); - this.Controls.Add(this._TreeView); - } - - protected override void OnInit(EventArgs e) - { - this.EnsureChildControls(); - } - - protected override void OnPreRender(EventArgs e) - { - this._ListBox.Visible = !this.IsHeirarchical; - this._TreeView.Visible = this.IsHeirarchical; - - this._ListBox.Height = this.Height; - this._ListBox.Width = this.Width; - this._TreeView.Height = this.Height; - this._TreeView.Width = this.Width; - - this._TreeView.ExpandAllNodes(); - - base.OnPreRender(e); - } - - protected virtual void OnSelectedTermChanged(TermsEventArgs e) - { - // Raise the SelectedTermChanged Event - if (this.SelectedTermChanged != null) - { - this.SelectedTermChanged(this, e); - } - } - - private void ListBoxSelectedIndexChanged(object sender, EventArgs e) - { - // Raise the SelectedTermChanged Event - this.OnSelectedTermChanged(new TermsEventArgs(this.SelectedTerm)); - } - - private void TreeViewNodeClick(object sender, RadTreeNodeEventArgs e) - { - // Raise the SelectedTermChanged Event - this.OnSelectedTermChanged(new TermsEventArgs(this.SelectedTerm)); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class TermsList : WebControl + { + private bool _IsHeirarchical; + private DnnListBox _ListBox; + + private DnnTreeView _TreeView; + + public event EventHandler SelectedTermChanged; + + public bool IsHeirarchical + { + get + { + return this._IsHeirarchical; + } + } + + public Term SelectedTerm + { + get + { + Term _SelectedTerm = null; + if (!string.IsNullOrEmpty(this.SelectedValue)) + { + int _TermId = int.Parse(this.SelectedValue); + foreach (Term term in this.Terms) + { + if (term.TermId == _TermId) + { + _SelectedTerm = term; + break; + } + } + } + + return _SelectedTerm; + } + } + + public string SelectedValue + { + get + { + string _SelectedValue = Null.NullString; + if (this.IsHeirarchical) + { + _SelectedValue = this._TreeView.SelectedValue; + } + else + { + _SelectedValue = this._ListBox.SelectedValue; + } + + return _SelectedValue; + } + } + + public List Terms + { + get + { + object _DataSource = null; + if (this.IsHeirarchical) + { + _DataSource = this._TreeView.DataSource; + } + else + { + _DataSource = this._ListBox.DataSource; + } + + return _DataSource as List; + } + } + + public void BindTerms(List terms, bool isHeirarchical, bool dataBind) + { + this._IsHeirarchical = isHeirarchical; + + this._ListBox.DataSource = terms; + this._TreeView.DataSource = terms; + + if (dataBind) + { + this._ListBox.DataBind(); + this._TreeView.DataBind(); + } + } + + public void ClearSelectedTerm() + { + this._ListBox.SelectedIndex = Null.NullInteger; + this._TreeView.UnselectAllNodes(); + } + + protected override void CreateChildControls() + { + this.Controls.Clear(); + + this._ListBox = new DnnListBox(); + this._ListBox.ID = string.Concat(this.ID, "_List"); + this._ListBox.DataTextField = "Name"; + this._ListBox.DataValueField = "TermId"; + this._ListBox.AutoPostBack = true; + this._ListBox.SelectedIndexChanged += this.ListBoxSelectedIndexChanged; + + this._TreeView = new DnnTreeView(); + this._TreeView.ID = string.Concat(this.ID, "_Tree"); + this._TreeView.DataTextField = "Name"; + this._TreeView.DataValueField = "TermId"; + this._TreeView.DataFieldID = "TermId"; + this._TreeView.DataFieldParentID = "ParentTermId"; + this._TreeView.NodeClick += this.TreeViewNodeClick; + + this.Controls.Add(this._ListBox); + this.Controls.Add(this._TreeView); + } + + protected override void OnInit(EventArgs e) + { + this.EnsureChildControls(); + } + + protected override void OnPreRender(EventArgs e) + { + this._ListBox.Visible = !this.IsHeirarchical; + this._TreeView.Visible = this.IsHeirarchical; + + this._ListBox.Height = this.Height; + this._ListBox.Width = this.Width; + this._TreeView.Height = this.Height; + this._TreeView.Width = this.Width; + + this._TreeView.ExpandAllNodes(); + + base.OnPreRender(e); + } + + protected virtual void OnSelectedTermChanged(TermsEventArgs e) + { + // Raise the SelectedTermChanged Event + if (this.SelectedTermChanged != null) + { + this.SelectedTermChanged(this, e); + } + } + + private void ListBoxSelectedIndexChanged(object sender, EventArgs e) + { + // Raise the SelectedTermChanged Event + this.OnSelectedTermChanged(new TermsEventArgs(this.SelectedTerm)); + } + + private void TreeViewNodeClick(object sender, RadTreeNodeEventArgs e) + { + // Raise the SelectedTermChanged Event + this.OnSelectedTermChanged(new TermsEventArgs(this.SelectedTerm)); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/TermsSelector.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/TermsSelector.cs index 701efa3e5f2..c20658adb30 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/TermsSelector.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/TermsSelector.cs @@ -1,202 +1,203 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Web.Script.Serialization; - using System.Web.UI; - using System.Web.UI.WebControls; - - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Content.Common; - using DotNetNuke.Entities.Content.Taxonomy; - using DotNetNuke.Framework; - using DotNetNuke.Framework.JavaScriptLibraries; - using DotNetNuke.UI.Utilities; - using DotNetNuke.Web.Client.ClientResourceManagement; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Web.Script.Serialization; + using System.Web.UI; + using System.Web.UI.WebControls; + + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Content.Common; + using DotNetNuke.Entities.Content.Taxonomy; + using DotNetNuke.Framework; + using DotNetNuke.Framework.JavaScriptLibraries; + using DotNetNuke.UI.Utilities; + using DotNetNuke.Web.Client.ClientResourceManagement; using Telerik.Web.UI; - public class TermsSelector : DnnComboBox, IClientAPICallbackEventHandler - { - public TermsSelector() - { - this.IncludeSystemVocabularies = false; - this.IncludeTags = true; - this.EnableViewState = false; - } - - public int PortalId { get; set; } - - public bool IncludeSystemVocabularies { get; set; } - - public bool IncludeTags { get; set; } - - public List Terms { get; set; } - - public string RaiseClientAPICallbackEvent(string eventArgument) - { - var parameters = eventArgument.Split('-'); - this.PortalId = Convert.ToInt32(parameters[1]); - this.IncludeTags = Convert.ToBoolean(parameters[2]); - this.IncludeSystemVocabularies = Convert.ToBoolean(parameters[3]); - var terms = this.GetTerms(); - terms.Insert(0, new { clientId = parameters[0] }); - var serializer = new JavaScriptSerializer(); - return serializer.Serialize(terms); - } - - protected override void OnInit(EventArgs e) - { - this.ItemTemplate = new TreeViewTemplate(); - this.Items.Add(new RadComboBoxItem()); - base.OnInit(e); - - JavaScript.RequestRegistration(CommonJs.jQueryMigrate); - - this.OnClientDropDownOpened = "webcontrols.termsSelector.OnClientDropDownOpened"; - if (!string.IsNullOrEmpty(this.CssClass)) - { - this.CssClass = string.Format("{0} TermsSelector", this.CssClass); - } - else - { - this.CssClass = "TermsSelector"; - } - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - if (this.Page.IsPostBack) - { - if (this.Terms == null) - { - this.Terms = new List(); - } - else - { - this.Terms.Clear(); - } - - if (!string.IsNullOrEmpty(this.SelectedValue)) - { - foreach (var id in this.SelectedValue.Split(',')) - { - var termId = Convert.ToInt32(id.Trim()); - var term = Util.GetTermController().GetTerm(termId); - if (term != null) - { - this.Terms.Add(term); - } - } - - // clear the append item by client side - if (this.Items.Count > 1) - { - this.Items.Remove(1); - } - } - } - - if (!this.Page.IsPostBack) - { - this.Page.ClientScript.RegisterClientScriptResource(this.GetType(), "DotNetNuke.Web.UI.WebControls.Resources.TermsSelector.js"); - - ClientResourceManager.RegisterStyleSheet( - this.Page, - this.Page.ClientScript.GetWebResourceUrl(this.GetType(), "DotNetNuke.Web.UI.WebControls.Resources.TermsSelector.css")); - - ClientAPI.RegisterClientVariable(this.Page, "TermsSelectorCallback", - ClientAPI.GetCallbackEventReference(this, "'[PARAMS]'", "webcontrols.termsSelector.itemDataLoaded", "this", - "webcontrols.termsSelector.itemDataLoadError"), true); - } - } - - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - if (this.Terms != null) - { - this.Attributes.Add("SelectedTerms", string.Join(",", this.Terms.Select(t => t.TermId.ToString()).ToArray())); - } - - this.Attributes.Add("IncludeSystemVocabularies", this.IncludeSystemVocabularies.ToString().ToLowerInvariant()); - this.Attributes.Add("IncludeTags", this.IncludeTags.ToString().ToLowerInvariant()); - this.Attributes.Add("PortalId", this.PortalId.ToString()); - } - - private ArrayList GetTerms() - { - var vocabRep = Util.GetVocabularyController(); - var terms = new ArrayList(); - var vocabularies = from v in vocabRep.GetVocabularies() where v.ScopeType.ScopeType == "Application" || (v.ScopeType.ScopeType == "Portal" && v.ScopeId == this.PortalId) select v; - - foreach (Vocabulary v in vocabularies) - { - if (v.IsSystem) - { - if (this.IncludeSystemVocabularies || (this.IncludeTags && v.Name == "Tags")) - { - this.AddTerms(v, terms); - } - } - else - { - this.AddTerms(v, terms); - } - } - - return terms; - } - - private void AddTerms(Vocabulary v, ArrayList terms) - { - ITermController termRep = Util.GetTermController(); - - // Add a dummy parent term if simple vocabulary - if (v.Type == VocabularyType.Simple) - { - terms.Add(new { termId = -v.VocabularyId, name = v.Name, parentTermId = Null.NullInteger }); - } - - foreach (Term t in termRep.GetTermsByVocabulary(v.VocabularyId)) - { - if (v.Type == VocabularyType.Simple) - { - t.ParentTermId = -v.VocabularyId; - } - - terms.Add(new { termId = t.TermId, name = t.Name, parentTermId = t.ParentTermId }); - } - } - - public class TreeViewTemplate : ITemplate - { - private RadComboBoxItem _container; - private TermsSelector _termsSelector; - - private DnnTreeView _tree; - - public void InstantiateIn(Control container) - { - this._container = (RadComboBoxItem)container; - this._termsSelector = (TermsSelector)container.Parent; - - this._tree = new DnnTreeView(); - this._tree.ID = string.Format("{0}_TreeView", this._termsSelector.ID); - this._tree.CheckBoxes = true; - this._tree.EnableViewState = false; - - // bind client-side events - this._tree.OnClientNodeChecked = "webcontrols.termsSelector.OnClientNodeChecked"; - - this._container.Controls.Add(this._tree); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class TermsSelector : DnnComboBox, IClientAPICallbackEventHandler + { + public TermsSelector() + { + this.IncludeSystemVocabularies = false; + this.IncludeTags = true; + this.EnableViewState = false; + } + + public int PortalId { get; set; } + + public bool IncludeSystemVocabularies { get; set; } + + public bool IncludeTags { get; set; } + + public List Terms { get; set; } + + public string RaiseClientAPICallbackEvent(string eventArgument) + { + var parameters = eventArgument.Split('-'); + this.PortalId = Convert.ToInt32(parameters[1]); + this.IncludeTags = Convert.ToBoolean(parameters[2]); + this.IncludeSystemVocabularies = Convert.ToBoolean(parameters[3]); + var terms = this.GetTerms(); + terms.Insert(0, new { clientId = parameters[0] }); + var serializer = new JavaScriptSerializer(); + return serializer.Serialize(terms); + } + + protected override void OnInit(EventArgs e) + { + this.ItemTemplate = new TreeViewTemplate(); + this.Items.Add(new RadComboBoxItem()); + base.OnInit(e); + + JavaScript.RequestRegistration(CommonJs.jQueryMigrate); + + this.OnClientDropDownOpened = "webcontrols.termsSelector.OnClientDropDownOpened"; + if (!string.IsNullOrEmpty(this.CssClass)) + { + this.CssClass = string.Format("{0} TermsSelector", this.CssClass); + } + else + { + this.CssClass = "TermsSelector"; + } + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + + if (this.Page.IsPostBack) + { + if (this.Terms == null) + { + this.Terms = new List(); + } + else + { + this.Terms.Clear(); + } + + if (!string.IsNullOrEmpty(this.SelectedValue)) + { + foreach (var id in this.SelectedValue.Split(',')) + { + var termId = Convert.ToInt32(id.Trim()); + var term = Util.GetTermController().GetTerm(termId); + if (term != null) + { + this.Terms.Add(term); + } + } + + // clear the append item by client side + if (this.Items.Count > 1) + { + this.Items.Remove(1); + } + } + } + + if (!this.Page.IsPostBack) + { + this.Page.ClientScript.RegisterClientScriptResource(this.GetType(), "DotNetNuke.Web.UI.WebControls.Resources.TermsSelector.js"); + + ClientResourceManager.RegisterStyleSheet( + this.Page, + this.Page.ClientScript.GetWebResourceUrl(this.GetType(), "DotNetNuke.Web.UI.WebControls.Resources.TermsSelector.css")); + + ClientAPI.RegisterClientVariable(this.Page, "TermsSelectorCallback", + ClientAPI.GetCallbackEventReference(this, "'[PARAMS]'", "webcontrols.termsSelector.itemDataLoaded", "this", + "webcontrols.termsSelector.itemDataLoadError"), true); + } + } + + protected override void OnPreRender(EventArgs e) + { + base.OnPreRender(e); + if (this.Terms != null) + { + this.Attributes.Add("SelectedTerms", string.Join(",", this.Terms.Select(t => t.TermId.ToString()).ToArray())); + } + + this.Attributes.Add("IncludeSystemVocabularies", this.IncludeSystemVocabularies.ToString().ToLowerInvariant()); + this.Attributes.Add("IncludeTags", this.IncludeTags.ToString().ToLowerInvariant()); + this.Attributes.Add("PortalId", this.PortalId.ToString()); + } + + private ArrayList GetTerms() + { + var vocabRep = Util.GetVocabularyController(); + var terms = new ArrayList(); + var vocabularies = from v in vocabRep.GetVocabularies() where v.ScopeType.ScopeType == "Application" || (v.ScopeType.ScopeType == "Portal" && v.ScopeId == this.PortalId) select v; + + foreach (Vocabulary v in vocabularies) + { + if (v.IsSystem) + { + if (this.IncludeSystemVocabularies || (this.IncludeTags && v.Name == "Tags")) + { + this.AddTerms(v, terms); + } + } + else + { + this.AddTerms(v, terms); + } + } + + return terms; + } + + private void AddTerms(Vocabulary v, ArrayList terms) + { + ITermController termRep = Util.GetTermController(); + + // Add a dummy parent term if simple vocabulary + if (v.Type == VocabularyType.Simple) + { + terms.Add(new { termId = -v.VocabularyId, name = v.Name, parentTermId = Null.NullInteger }); + } + + foreach (Term t in termRep.GetTermsByVocabulary(v.VocabularyId)) + { + if (v.Type == VocabularyType.Simple) + { + t.ParentTermId = -v.VocabularyId; + } + + terms.Add(new { termId = t.TermId, name = t.Name, parentTermId = t.ParentTermId }); + } + } + + public class TreeViewTemplate : ITemplate + { + private RadComboBoxItem _container; + private TermsSelector _termsSelector; + + private DnnTreeView _tree; + + public void InstantiateIn(Control container) + { + this._container = (RadComboBoxItem)container; + this._termsSelector = (TermsSelector)container.Parent; + + this._tree = new DnnTreeView(); + this._tree.ID = string.Format("{0}_TreeView", this._termsSelector.ID); + this._tree.CheckBoxes = true; + this._tree.EnableViewState = false; + + // bind client-side events + this._tree.OnClientNodeChecked = "webcontrols.termsSelector.OnClientNodeChecked"; + + this._container.Controls.Add(this._tree); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/dnn_Web_Deprecated.dnn b/DNN Platform/DotNetNuke.Web.Deprecated/dnn_Web_Deprecated.dnn index d92f7989281..86b38d07046 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/dnn_Web_Deprecated.dnn +++ b/DNN Platform/DotNetNuke.Web.Deprecated/dnn_Web_Deprecated.dnn @@ -1,6 +1,6 @@  - + DNN Deprecated Web Controls Library DNN Deprecated Web Controls library for legacy Telerik depepndency diff --git a/DNN Platform/DotNetNuke.Web/Api/Auth/AuthMessageHandlerBase.cs b/DNN Platform/DotNetNuke.Web/Api/Auth/AuthMessageHandlerBase.cs index 4abc246d033..c942c2e5c42 100644 --- a/DNN Platform/DotNetNuke.Web/Api/Auth/AuthMessageHandlerBase.cs +++ b/DNN Platform/DotNetNuke.Web/Api/Auth/AuthMessageHandlerBase.cs @@ -14,29 +14,49 @@ namespace DotNetNuke.Web.Api.Auth using DotNetNuke.Instrumentation; + /// + /// Base class for authentication providers message handlers. + /// public abstract class AuthMessageHandlerBase : DelegatingHandler { - private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(AuthMessageHandlerBase)); - + private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(AuthMessageHandlerBase)); + + /// + /// Initializes a new instance of the class. + /// + /// A value indicating whether this handler should be included by default in all API endpoints. + /// A value indicating whether this handler should enforce SSL usage. protected AuthMessageHandlerBase(bool includeByDefault, bool forceSsl) { this.DefaultInclude = includeByDefault; this.ForceSsl = forceSsl; } - + + /// + /// Gets the name of the authentication scheme. + /// public abstract string AuthScheme { get; } - + + /// + /// Gets a value indicating whether this handler should bypass the anti-forgery token check. + /// public virtual bool BypassAntiForgeryToken => false; - + + /// + /// Gets a value indicating whether this handler should be included by default on all API endpoints. + /// public bool DefaultInclude { get; } - + + /// + /// Gets a value indicating whether this handler should enforce SSL usage on it's endpoints. + /// public bool ForceSsl { get; } /// /// A chance to process inbound requests. /// - /// the request message. - /// a cancellationtoken. + /// The request message. + /// A cancellationtoken. /// null normally, if a response is returned all inbound processing is terminated and the resposne is returned. public virtual HttpResponseMessage OnInboundRequest(HttpRequestMessage request, CancellationToken cancellationToken) { @@ -47,13 +67,18 @@ public virtual HttpResponseMessage OnInboundRequest(HttpRequestMessage request, /// A change to process outbound responses. /// /// The response message. - /// a cancellationtoken. - /// the responsemessage. + /// A cancellationtoken. + /// The responsemessage. public virtual HttpResponseMessage OnOutboundResponse(HttpResponseMessage response, CancellationToken cancellationToken) { return response; } - + + /// + /// Checks if the current request is an XmlHttpRequest. + /// + /// The HTTP Request. + /// A value indicating whether the request is an XmlHttpRequest. protected static bool IsXmlHttpRequest(HttpRequestMessage request) { string value = null; @@ -66,13 +91,24 @@ protected static bool IsXmlHttpRequest(HttpRequestMessage request) return !string.IsNullOrEmpty(value) && value.Equals("XmlHttpRequest", StringComparison.InvariantCultureIgnoreCase); } - + + /// + /// Sets the current principal for the request. + /// + /// The principal to set. + /// The current request. protected static void SetCurrentPrincipal(IPrincipal principal, HttpRequestMessage request) { Thread.CurrentPrincipal = principal; request.GetHttpContext().User = principal; } - + + /// + /// Asynchronously sends a response. + /// + /// The current request. + /// A cancellation token. + /// An HttpResponseMessage Task. protected override Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { var response = this.OnInboundRequest(request, cancellationToken); @@ -84,7 +120,12 @@ protected override Task SendAsync(HttpRequestMessage reques return base.SendAsync(request, cancellationToken).ContinueWith(x => this.OnOutboundResponse(x.Result, cancellationToken), cancellationToken); } - + + /// + /// Checks if the current request requires authentication. + /// + /// The current request. + /// A value indication whether the current request needs authentication. protected bool NeedsAuthentication(HttpRequestMessage request) { if (this.MustEnforceSslInRequest(request)) diff --git a/DNN Platform/DotNetNuke.Web/Api/Internal/ServicesRoutingManager.cs b/DNN Platform/DotNetNuke.Web/Api/Internal/ServicesRoutingManager.cs index 0b5c7fe9295..18669d80064 100644 --- a/DNN Platform/DotNetNuke.Web/Api/Internal/ServicesRoutingManager.cs +++ b/DNN Platform/DotNetNuke.Web/Api/Internal/ServicesRoutingManager.cs @@ -1,7 +1,6 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information - +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information namespace DotNetNuke.Web.Api.Internal { using System; @@ -23,6 +22,8 @@ namespace DotNetNuke.Web.Api.Internal using DotNetNuke.Web.Api.Internal.Auth; using DotNetNuke.Web.ConfigSection; + using Microsoft.Extensions.DependencyInjection; + public sealed class ServicesRoutingManager : IMapRoute { private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(ServicesRoutingManager)); @@ -225,16 +226,18 @@ private void LocateServicesAndMapRoutes() this.ClearCachedRouteData(); this._moduleUsage.Clear(); - foreach (IServiceRouteMapper routeMapper in this.GetServiceRouteMappers()) + using (var serviceScope = Globals.DependencyProvider.CreateScope()) { - try - { - routeMapper.RegisterRoutes(this); - } - catch (Exception e) + foreach (IServiceRouteMapper routeMapper in this.GetServiceRouteMappers(serviceScope.ServiceProvider)) { - Logger.ErrorFormat("{0}.RegisterRoutes threw an exception. {1}\r\n{2}", routeMapper.GetType().FullName, - e.Message, e.StackTrace); + try + { + routeMapper.RegisterRoutes(this); + } + catch (Exception e) + { + Logger.ErrorFormat("{0}.RegisterRoutes threw an exception. {1}\r\n{2}", routeMapper.GetType().FullName, e.Message, e.StackTrace); + } } } } @@ -249,7 +252,7 @@ private void RegisterSystemRoutes() // _routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); } - private IEnumerable GetServiceRouteMappers() + private IEnumerable GetServiceRouteMappers(IServiceProvider serviceProvider) { IEnumerable types = this.GetAllServiceRouteMapperTypes(); @@ -258,12 +261,11 @@ private IEnumerable GetServiceRouteMappers() IServiceRouteMapper routeMapper; try { - routeMapper = Activator.CreateInstance(routeMapperType) as IServiceRouteMapper; + routeMapper = ActivatorUtilities.CreateInstance(serviceProvider, routeMapperType) as IServiceRouteMapper; } catch (Exception e) { - Logger.ErrorFormat("Unable to create {0} while registering service routes. {1}", routeMapperType.FullName, - e.Message); + Logger.ErrorFormat("Unable to create {0} while registering service routes. {1}", routeMapperType.FullName, e.Message); routeMapper = null; } diff --git a/DNN Platform/DotNetNuke.Web/Common/DotNetNukeHttpApplication.cs b/DNN Platform/DotNetNuke.Web/Common/DotNetNukeHttpApplication.cs index 69c618a6c8b..9debd7b6834 100644 --- a/DNN Platform/DotNetNuke.Web/Common/DotNetNukeHttpApplication.cs +++ b/DNN Platform/DotNetNuke.Web/Common/DotNetNukeHttpApplication.cs @@ -35,14 +35,15 @@ namespace DotNetNuke.Web.Common.Internal using DotNetNuke.Services.Search.Internals; using DotNetNuke.Services.Sitemap; using DotNetNuke.Services.Tokens; + using DotNetNuke.Services.Mail; using DotNetNuke.Services.Url.FriendlyUrl; /// /// DotNetNuke Http Application. It will handle Start, End, BeginRequest, Error event for whole application. /// public class DotNetNukeHttpApplication : HttpApplication - { - private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof (DotNetNukeHttpApplication)); + { + private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(DotNetNukeHttpApplication)); private static readonly string[] Endings = { @@ -162,8 +163,9 @@ private void Application_Start(object sender, EventArgs eventArgs) ComponentFactory.InstallComponents(new ProviderInstaller("htmlEditor", typeof(HtmlEditorProvider), ComponentLifeStyleType.Transient)); ComponentFactory.InstallComponents(new ProviderInstaller("navigationControl", typeof(NavigationProvider), ComponentLifeStyleType.Transient)); ComponentFactory.InstallComponents(new ProviderInstaller("clientcapability", typeof(ClientCapabilityProvider))); - ComponentFactory.InstallComponents(new ProviderInstaller("cryptography", typeof(CryptographyProvider), typeof(FipsCompilanceCryptographyProvider))); - ComponentFactory.InstallComponents(new ProviderInstaller("tokens", typeof(TokenProvider))); + ComponentFactory.InstallComponents(new ProviderInstaller("cryptography", typeof(CryptographyProvider), typeof(FipsCompilanceCryptographyProvider))); + ComponentFactory.InstallComponents(new ProviderInstaller("tokens", typeof(TokenProvider))); + ComponentFactory.InstallComponents(new ProviderInstaller("mail", typeof(MailProvider))); Logger.InfoFormat("Application Started ({0})", Globals.ElapsedSinceAppStart); // just to start the timer DotNetNukeShutdownOverload.InitializeFcnSettings(); @@ -229,17 +231,17 @@ private void Application_BeginRequest(object sender, EventArgs e) Initialize.Init(app); Initialize.RunSchedule(app.Request); + } + + private void Application_PreSendRequestHeaders(object sender, EventArgs e) + { + if (HttpContext.Current != null && HttpContext.Current.Handler is PageBase) + { + var page = HttpContext.Current.Handler as PageBase; + page.HeaderIsWritten = true; + } } - private void Application_PreSendRequestHeaders(object sender, EventArgs e) - { - if (HttpContext.Current != null && HttpContext.Current.Handler is PageBase) - { - var page = HttpContext.Current.Handler as PageBase; - page.HeaderIsWritten = true; - } - } - private bool IsInstallInProgress(HttpApplication app) { return InstallBlocker.Instance.IsInstallInProgress(); diff --git a/DNN Platform/DotNetNuke.Web/InternalServices/ControlBarController.cs b/DNN Platform/DotNetNuke.Web/InternalServices/ControlBarController.cs index 799e50a0562..fd2519cba1b 100644 --- a/DNN Platform/DotNetNuke.Web/InternalServices/ControlBarController.cs +++ b/DNN Platform/DotNetNuke.Web/InternalServices/ControlBarController.cs @@ -567,7 +567,7 @@ private int DoAddExistingModule(int moduleId, int tabId, string paneName, int po userID = user.UserID; } - if (moduleInfo != null) + if (moduleInfo != null && !moduleInfo.IsDeleted) { // Is this from a site other than our own? (i.e., is the user requesting "module sharing"?) var remote = moduleInfo.PortalID != PortalSettings.Current.PortalId; @@ -587,6 +587,11 @@ private int DoAddExistingModule(int moduleId, int tabId, string paneName, int po } } + if (!ModulePermissionController.HasModuleAccess(SecurityAccessLevel.Edit, "MANAGE", moduleInfo)) + { + throw new SecurityException($"Module '{moduleInfo.ModuleID}' is not available in current context."); + } + // clone the module object ( to avoid creating an object reference to the data cache ) ModuleInfo newModule = moduleInfo.Clone(); diff --git a/DNN Platform/DotNetNuke.Web/InternalServices/EventLogServiceController.cs b/DNN Platform/DotNetNuke.Web/InternalServices/EventLogServiceController.cs index 0805dbe6806..4d1e53c7a89 100644 --- a/DNN Platform/DotNetNuke.Web/InternalServices/EventLogServiceController.cs +++ b/DNN Platform/DotNetNuke.Web/InternalServices/EventLogServiceController.cs @@ -9,12 +9,12 @@ namespace DotNetNuke.Web.InternalServices using System.Net.Http; using System.Text; using System.Web; - using System.Web.Http; + using System.Web.Http; using DotNetNuke.Instrumentation; using DotNetNuke.Services.Localization; using DotNetNuke.Services.Log.EventLog; - using DotNetNuke.Web.Api; + using DotNetNuke.Web.Api; [DnnAuthorize] public class EventLogServiceController : DnnApiController @@ -33,9 +33,7 @@ public HttpResponseMessage GetLogDetails(string guid) try { - var logInfo = new LogInfo { LogGUID = guid }; - logInfo = EventLogController.Instance.GetSingleLog(logInfo, LoggingProvider.ReturnType.LogInfoObjects) as LogInfo; - if (logInfo == null) + if (!(EventLogController.Instance.GetLog(guid) is LogInfo logInfo)) { return this.Request.CreateResponse(HttpStatusCode.BadRequest); } diff --git a/DNN Platform/DotNetNuke.Web/InternalServices/FileUploadController.cs b/DNN Platform/DotNetNuke.Web/InternalServices/FileUploadController.cs index 153a82eef58..6fe9fdf083e 100644 --- a/DNN Platform/DotNetNuke.Web/InternalServices/FileUploadController.cs +++ b/DNN Platform/DotNetNuke.Web/InternalServices/FileUploadController.cs @@ -4,41 +4,38 @@ namespace DotNetNuke.Web.InternalServices { - using System; - using System.Collections.Generic; - using System.Drawing; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Net.Http.Formatting; - using System.Net.Http.Headers; - using System.Runtime.Serialization; - using System.Text.RegularExpressions; - using System.Threading; - using System.Threading.Tasks; - using System.Web; - using System.Web.Http; - using System.Web.UI.WebControls; - - using DotNetNuke.Common; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Common.Utils; - using DotNetNuke.Entities.Icons; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Entities.Users; - using DotNetNuke.Instrumentation; - using DotNetNuke.Security; - using DotNetNuke.Security.Permissions; - using DotNetNuke.Services.FileSystem; - using DotNetNuke.Services.Localization; - using DotNetNuke.Web.Api; - using DotNetNuke.Web.Api.Internal; - - using ContentDisposition = System.Net.Mime.ContentDisposition; - using FileInfo = DotNetNuke.Services.FileSystem.FileInfo; - +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Net.Http.Formatting; +using System.Net.Http.Headers; +using System.Runtime.Serialization; +using System.Text.RegularExpressions; +using System.Threading; +using System.Threading.Tasks; +using System.Web; +using System.Web.Http; +using System.Web.UI.WebControls; +using DotNetNuke.Common; +using DotNetNuke.Common.Utilities; +using DotNetNuke.Common.Utils; +using DotNetNuke.Entities.Icons; +using DotNetNuke.Entities.Portals; +using DotNetNuke.Entities.Users; +using DotNetNuke.Instrumentation; +using DotNetNuke.Security; +using DotNetNuke.Security.Permissions; +using DotNetNuke.Services.FileSystem; +using DotNetNuke.Services.Localization; +using DotNetNuke.Web.Api; +using DotNetNuke.Web.Api.Internal; +using ContentDisposition = System.Net.Mime.ContentDisposition; +using FileInfo = DotNetNuke.Services.FileSystem.FileInfo; [DnnAuthorize] public class FileUploadController : DnnApiController { @@ -47,12 +44,6 @@ public class FileUploadController : DnnApiController private static readonly List ImageExtensions = Globals.glbImageFileTypes.Split(',').ToList(); - public static string GetUrl(int fileId) - { - var file = FileManager.Instance.GetFile(fileId, true); - return FileManager.Instance.GetUrl(file); - } - [HttpPost] public HttpResponseMessage LoadFiles(FolderItemDTO folderItem) { @@ -90,6 +81,12 @@ public HttpResponseMessage LoadFiles(FolderItemDTO folderItem) return this.Request.CreateResponse(HttpStatusCode.OK, fileItems); } + public static string GetUrl(int fileId) + { + var file = FileManager.Instance.GetFile(fileId, true); + return FileManager.Instance.GetUrl(file); + } + [HttpGet] public HttpResponseMessage LoadImage(string fileId) { @@ -210,6 +207,87 @@ public Task PostFile() return task; } + private static SavedFileDTO SaveFile( + Stream stream, + PortalSettings portalSettings, + UserInfo userInfo, + string folder, + string filter, + string fileName, + bool overwrite, + bool isHostMenu, + bool extract, + out bool alreadyExists, + out string errorMessage) + { + alreadyExists = false; + var savedFileDto = new SavedFileDTO(); + try + { + var extension = Path.GetExtension(fileName).ValueOrEmpty().Replace(".", string.Empty); + if (!string.IsNullOrEmpty(filter) && !filter.ToLowerInvariant().Contains(extension.ToLowerInvariant())) + { + errorMessage = GetLocalizedString("ExtensionNotAllowed"); + return savedFileDto; + } + + var folderManager = FolderManager.Instance; + + // Check if this is a User Folder + var effectivePortalId = isHostMenu ? Null.NullInteger : PortalController.GetEffectivePortalId(portalSettings.PortalId); + int userId; + var folderInfo = folderManager.GetFolder(effectivePortalId, folder); + if (IsUserFolder(folder, out userId)) + { + var user = UserController.GetUserById(effectivePortalId, userId); + if (user != null) + { + folderInfo = folderManager.GetUserFolder(user); + } + } + + if (!PortalSecurity.IsInRoles(userInfo, portalSettings, folderInfo.FolderPermissions.ToString("WRITE")) + && !PortalSecurity.IsInRoles(userInfo, portalSettings, folderInfo.FolderPermissions.ToString("ADD"))) + { + errorMessage = GetLocalizedString("NoPermission"); + return savedFileDto; + } + + if (!overwrite && FileManager.Instance.FileExists(folderInfo, fileName, true)) + { + errorMessage = GetLocalizedString("AlreadyExists"); + alreadyExists = true; + savedFileDto.FilePath = Path.Combine(folderInfo.PhysicalPath, fileName); + return savedFileDto; + } + + var contentType = FileContentTypeManager.Instance.GetContentType(Path.GetExtension(fileName)); + var file = FileManager.Instance.AddFile(folderInfo, fileName, stream, true, false, contentType, userInfo.UserID); + + if (extract && extension.ToLowerInvariant() == "zip") + { + FileManager.Instance.UnzipFile(file); + FileManager.Instance.DeleteFile(file); + } + + errorMessage = string.Empty; + savedFileDto.FileId = file.FileId.ToString(CultureInfo.InvariantCulture); + savedFileDto.FilePath = FileManager.Instance.GetUrl(file); + return savedFileDto; + } + catch (InvalidFileExtensionException) + { + errorMessage = GetLocalizedString("ExtensionNotAllowed"); + return savedFileDto; + } + catch (Exception ex) + { + Logger.Error(ex); + errorMessage = ex.Message; + return savedFileDto; + } + } + [HttpPost] [IFrameSupportedValidateAntiForgeryToken] [AllowAnonymous] @@ -423,87 +501,6 @@ public HttpResponseMessage UploadFromUrl(UploadByUrlDto dto) } } - private static SavedFileDTO SaveFile( - Stream stream, - PortalSettings portalSettings, - UserInfo userInfo, - string folder, - string filter, - string fileName, - bool overwrite, - bool isHostMenu, - bool extract, - out bool alreadyExists, - out string errorMessage) - { - alreadyExists = false; - var savedFileDto = new SavedFileDTO(); - try - { - var extension = Path.GetExtension(fileName).ValueOrEmpty().Replace(".", string.Empty); - if (!string.IsNullOrEmpty(filter) && !filter.ToLowerInvariant().Contains(extension.ToLowerInvariant())) - { - errorMessage = GetLocalizedString("ExtensionNotAllowed"); - return savedFileDto; - } - - var folderManager = FolderManager.Instance; - - // Check if this is a User Folder - var effectivePortalId = isHostMenu ? Null.NullInteger : PortalController.GetEffectivePortalId(portalSettings.PortalId); - int userId; - var folderInfo = folderManager.GetFolder(effectivePortalId, folder); - if (IsUserFolder(folder, out userId)) - { - var user = UserController.GetUserById(effectivePortalId, userId); - if (user != null) - { - folderInfo = folderManager.GetUserFolder(user); - } - } - - if (!PortalSecurity.IsInRoles(userInfo, portalSettings, folderInfo.FolderPermissions.ToString("WRITE")) - && !PortalSecurity.IsInRoles(userInfo, portalSettings, folderInfo.FolderPermissions.ToString("ADD"))) - { - errorMessage = GetLocalizedString("NoPermission"); - return savedFileDto; - } - - if (!overwrite && FileManager.Instance.FileExists(folderInfo, fileName, true)) - { - errorMessage = GetLocalizedString("AlreadyExists"); - alreadyExists = true; - savedFileDto.FilePath = Path.Combine(folderInfo.PhysicalPath, fileName); - return savedFileDto; - } - - var contentType = FileContentTypeManager.Instance.GetContentType(Path.GetExtension(fileName)); - var file = FileManager.Instance.AddFile(folderInfo, fileName, stream, true, false, contentType, userInfo.UserID); - - if (extract && extension.ToLowerInvariant() == "zip") - { - FileManager.Instance.UnzipFile(file); - FileManager.Instance.DeleteFile(file); - } - - errorMessage = string.Empty; - savedFileDto.FileId = file.FileId.ToString(CultureInfo.InvariantCulture); - savedFileDto.FilePath = FileManager.Instance.GetUrl(file); - return savedFileDto; - } - catch (InvalidFileExtensionException) - { - errorMessage = GetLocalizedString("ExtensionNotAllowed"); - return savedFileDto; - } - catch (Exception ex) - { - Logger.Error(ex); - errorMessage = ex.Message; - return savedFileDto; - } - } - private static string GetLocalizedString(string key) { const string resourceFile = "/App_GlobalResources/FileUpload.resx"; @@ -542,16 +539,16 @@ private static bool IsImage(string fileName) } private static FileUploadDto UploadFile( - Stream stream, - int portalId, - UserInfo userInfo, - string folder, - string filter, - string fileName, - bool overwrite, - bool isHostPortal, - bool extract, - string validationCode) + Stream stream, + int portalId, + UserInfo userInfo, + string folder, + string filter, + string fileName, + bool overwrite, + bool isHostPortal, + bool extract, + string validationCode) { var result = new FileUploadDto(); BinaryReader reader = null; @@ -569,7 +566,7 @@ private static FileUploadDto UploadFile( { validateParams.Add(portalId); } - + if (!ValidationUtils.ValidationCodeMatched(validateParams, validationCode)) { throw new InvalidOperationException("Bad Request"); @@ -618,8 +615,8 @@ private static FileUploadDto UploadFile( else { file = FileManager.Instance.AddFile(folderInfo, fileName, stream, true, false, - FileContentTypeManager.Instance.GetContentType(Path.GetExtension(fileName)), - userInfo.UserID); + FileContentTypeManager.Instance.GetContentType(Path.GetExtension(fileName)), + userInfo.UserID); if (extract && extension.ToLowerInvariant() == "zip") { var destinationFolder = FolderManager.Instance.GetFolder(file.FolderId); @@ -702,10 +699,10 @@ private static IEnumerable GetMyPortalGroup() { var groups = PortalGroupController.Instance.GetPortalGroups().ToArray(); var mygroup = (from @group in groups - select PortalGroupController.Instance.GetPortalsByGroup(@group.PortalGroupId) - into portals - where portals.Any(x => x.PortalID == PortalSettings.Current.PortalId) - select portals.ToArray()).FirstOrDefault(); + select PortalGroupController.Instance.GetPortalsByGroup(@group.PortalGroupId) + into portals + where portals.Any(x => x.PortalID == PortalSettings.Current.PortalId) + select portals.ToArray()).FirstOrDefault(); return mygroup; } @@ -720,6 +717,13 @@ private string GetFileName(WebResponse response) return new ContentDisposition(contentDisposition).FileName; } + public class FolderItemDTO + { + public int FolderId { get; set; } + public string FileFilter { get; set; } + public bool Required { get; set; } + } + private bool VerifySafeUrl(string url) { Uri uri = new Uri(url); @@ -757,6 +761,24 @@ private bool VerifySafeUrl(string url) return false; } + public class SavedFileDTO + { + public string FileId { get; set; } + public string FilePath { get; set; } + } + + public class UploadByUrlDto + { + public string Url { get; set; } + public string Folder { get; set; } + public bool Overwrite { get; set; } + public bool Unzip { get; set; } + public string Filter { get; set; } + public bool IsHostMenu { get; set; } + public int PortalId { get; set; } = -1; + public string ValidationCode { get; set; } + } + private bool IsPortalIdValid(int portalId) { if (this.UserInfo.IsSuperUser) @@ -779,41 +801,6 @@ private bool IsPortalIdValid(int portalId) return mygroup != null && mygroup.Any(p => p.PortalID == portalId); } - public class FolderItemDTO - { - public int FolderId { get; set; } - - public string FileFilter { get; set; } - - public bool Required { get; set; } - } - - public class SavedFileDTO - { - public string FileId { get; set; } - - public string FilePath { get; set; } - } - - public class UploadByUrlDto - { - public string Url { get; set; } - - public string Folder { get; set; } - - public bool Overwrite { get; set; } - - public bool Unzip { get; set; } - - public string Filter { get; set; } - - public bool IsHostMenu { get; set; } - - public int PortalId { get; set; } = -1; - - public string ValidationCode { get; set; } - } - [DataContract] public class FileUploadDto { diff --git a/DNN Platform/DotNetNuke.Web/InternalServices/MessagingServiceController.cs b/DNN Platform/DotNetNuke.Web/InternalServices/MessagingServiceController.cs index 790d6f6216e..a1ca97129de 100644 --- a/DNN Platform/DotNetNuke.Web/InternalServices/MessagingServiceController.cs +++ b/DNN Platform/DotNetNuke.Web/InternalServices/MessagingServiceController.cs @@ -1,7 +1,9 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information - +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + +using DotNetNuke.Security; + namespace DotNetNuke.Web.InternalServices { using System; @@ -64,7 +66,9 @@ public HttpResponseMessage Create(CreateDTO postData) users = userIdsList.Select(id => UserController.Instance.GetUser(portalId, id)).Where(user => user != null).ToList(); } - var message = new Message { Subject = HttpUtility.UrlDecode(postData.Subject), Body = HttpUtility.UrlDecode(postData.Body) }; + var body = HttpUtility.UrlDecode(postData.Body); + body = PortalSecurity.Instance.InputFilter(body, PortalSecurity.FilterFlag.NoMarkup); + var message = new Message { Subject = HttpUtility.UrlDecode(postData.Subject), Body = body }; MessagingController.Instance.SendMessage(message, roles, users, fileIdsList); return this.Request.CreateResponse(HttpStatusCode.OK, new { Result = "success", Value = message.MessageID }); } diff --git a/DNN Platform/DotNetNuke.Web/UI/Utilities.cs b/DNN Platform/DotNetNuke.Web/UI/Utilities.cs index 74f936ca721..7d7d6c79f6b 100644 --- a/DNN Platform/DotNetNuke.Web/UI/Utilities.cs +++ b/DNN Platform/DotNetNuke.Web/UI/Utilities.cs @@ -1,288 +1,303 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI -{ - using System; - using System.IO; - using System.Reflection; - using System.Web; - using System.Web.UI; - using System.Web.UI.WebControls; - - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Services.Exceptions; - using DotNetNuke.Services.Localization; - using DotNetNuke.UI; - using DotNetNuke.UI.ControlPanels; - using DotNetNuke.UI.Modules; - using DotNetNuke.Web.Client; - using DotNetNuke.Web.Client.ClientResourceManagement; +namespace DotNetNuke.Web.UI +{ + using System; + using System.IO; + using System.Reflection; + using System.Web; + using System.Web.UI; + using System.Web.UI.WebControls; + + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Services.Exceptions; + using DotNetNuke.Services.Localization; + using DotNetNuke.UI; + using DotNetNuke.UI.ControlPanels; + using DotNetNuke.UI.Modules; + using DotNetNuke.Web.Client; + using DotNetNuke.Web.Client.ClientResourceManagement; using FileInfo = DotNetNuke.Services.FileSystem.FileInfo; - public class Utilities - { - public static void ApplySkin(Control telerikControl) - { - ApplySkin(telerikControl, string.Empty, string.Empty, string.Empty); - } - - public static void ApplySkin(Control telerikControl, string fallBackEmbeddedSkinName) - { - ApplySkin(telerikControl, string.Empty, string.Empty, fallBackEmbeddedSkinName); - } - - public static void ApplySkin(Control telerikControl, string fallBackEmbeddedSkinName, string controlName) - { - ApplySkin(telerikControl, string.Empty, controlName, fallBackEmbeddedSkinName); - } - - // Use selected skin's webcontrol skin if one exists - // or use _default skin's webcontrol skin if one exists - // or use embedded skin - public static void ApplySkin(Control telerikControl, string fallBackEmbeddedSkinName, string controlName, string webControlSkinSubFolderName) - { - PropertyInfo skinProperty = null; - PropertyInfo enableEmbeddedSkinsProperty = null; - bool skinApplied = false; - - try - { - skinProperty = telerikControl.GetType().GetProperty("Skin"); - enableEmbeddedSkinsProperty = telerikControl.GetType().GetProperty("EnableEmbeddedSkins"); - - if (string.IsNullOrEmpty(controlName)) - { - controlName = telerikControl.GetType().BaseType.Name; - if (controlName.StartsWith("Rad") || controlName.StartsWith("Dnn")) - { - controlName = controlName.Substring(3); - } - } - - string skinVirtualFolder = string.Empty; - if (PortalSettings.Current != null) - { - skinVirtualFolder = PortalSettings.Current.ActiveTab.SkinPath.Replace('\\', '/').Replace("//", "/"); - } - else - { - skinVirtualFolder = telerikControl.ResolveUrl("~/Portals/_default/skins/_default/Aphelia"); // developer skin Aphelia - } - - string skinName = string.Empty; - string webControlSkinName = string.Empty; - if (skinProperty != null) - { - var v = skinProperty.GetValue(telerikControl, null); - if (v != null) - { - webControlSkinName = v.ToString(); - } - } - - if (string.IsNullOrEmpty(webControlSkinName)) - { - webControlSkinName = "default"; - } - - if (skinVirtualFolder.EndsWith("/")) - { - skinVirtualFolder = skinVirtualFolder.Substring(0, skinVirtualFolder.Length - 1); - } - - int lastIndex = skinVirtualFolder.LastIndexOf("/"); - if (lastIndex > -1 && skinVirtualFolder.Length > lastIndex) - { - skinName = skinVirtualFolder.Substring(skinVirtualFolder.LastIndexOf("/") + 1); - } - - string systemWebControlSkin = string.Empty; - if (!string.IsNullOrEmpty(skinName) && !string.IsNullOrEmpty(skinVirtualFolder)) - { - systemWebControlSkin = HttpContext.Current.Server.MapPath(skinVirtualFolder); - systemWebControlSkin = Path.Combine(systemWebControlSkin, "WebControlSkin"); - systemWebControlSkin = Path.Combine(systemWebControlSkin, skinName); - systemWebControlSkin = Path.Combine(systemWebControlSkin, webControlSkinSubFolderName); - systemWebControlSkin = Path.Combine(systemWebControlSkin, string.Format("{0}.{1}.css", controlName, webControlSkinName)); - - // Check if the selected skin has the webcontrol skin - if (!File.Exists(systemWebControlSkin)) - { - systemWebControlSkin = string.Empty; - } - - // No skin, try default folder - if (string.IsNullOrEmpty(systemWebControlSkin)) - { - skinVirtualFolder = telerikControl.ResolveUrl("~/Portals/_default/Skins/_default"); - skinName = "Default"; - - if (skinVirtualFolder.EndsWith("/")) - { - skinVirtualFolder = skinVirtualFolder.Substring(0, skinVirtualFolder.Length - 1); - } - - if (!string.IsNullOrEmpty(skinName) && !string.IsNullOrEmpty(skinVirtualFolder)) - { - systemWebControlSkin = HttpContext.Current.Server.MapPath(skinVirtualFolder); - systemWebControlSkin = Path.Combine(systemWebControlSkin, "WebControlSkin"); - systemWebControlSkin = Path.Combine(systemWebControlSkin, skinName); - systemWebControlSkin = Path.Combine(systemWebControlSkin, webControlSkinSubFolderName); - systemWebControlSkin = Path.Combine(systemWebControlSkin, string.Format("{0}.{1}.css", controlName, webControlSkinName)); - - if (!File.Exists(systemWebControlSkin)) - { - systemWebControlSkin = string.Empty; - } - } - } - } - - if (!string.IsNullOrEmpty(systemWebControlSkin)) - { - string filePath = Path.Combine(skinVirtualFolder, "WebControlSkin"); - filePath = Path.Combine(filePath, skinName); - filePath = Path.Combine(filePath, webControlSkinSubFolderName); - filePath = Path.Combine(filePath, string.Format("{0}.{1}.css", controlName, webControlSkinName)); - filePath = filePath.Replace('\\', '/').Replace("//", "/").TrimEnd('/'); - - if (HttpContext.Current != null && HttpContext.Current.Handler is Page) - { - ClientResourceManager.RegisterStyleSheet(HttpContext.Current.Handler as Page, filePath, FileOrder.Css.ResourceCss); - } - - if ((skinProperty != null) && (enableEmbeddedSkinsProperty != null)) - { - skinApplied = true; - skinProperty.SetValue(telerikControl, webControlSkinName, null); - enableEmbeddedSkinsProperty.SetValue(telerikControl, false, null); - } - } - } - catch (Exception ex) - { - Exceptions.LogException(ex); - } - - if (skinProperty != null && enableEmbeddedSkinsProperty != null && !skinApplied) - { - if (string.IsNullOrEmpty(fallBackEmbeddedSkinName)) - { - fallBackEmbeddedSkinName = "Simple"; - } - - // Set fall back skin Embedded Skin - skinProperty.SetValue(telerikControl, fallBackEmbeddedSkinName, null); - enableEmbeddedSkinsProperty.SetValue(telerikControl, true, null); - } - } - - public static void CreateThumbnail(FileInfo image, Image img, int maxWidth, int maxHeight) - { - if (image.Width > image.Height) - { - // Landscape - if (image.Width > maxWidth) - { - img.Width = maxWidth; - img.Height = Convert.ToInt32((image.Height * maxWidth) / (float)image.Width); - } - else - { - img.Width = image.Width; - img.Height = image.Height; - } - } - else - { - // Portrait - if (image.Height > maxHeight) - { - img.Width = Convert.ToInt32((image.Width * maxHeight) / (float)image.Height); - img.Height = maxHeight; - } - else - { - img.Width = image.Width; - img.Height = image.Height; - } - } - } - - public static string GetClientAlert(Control ctrl, string message) - { - return GetClientAlert(ctrl, new MessageWindowParameters(message)); - } - - public static string GetClientAlert(Control ctrl, MessageWindowParameters message) - { - return "jQuery(document).ready(function($){$.dnnAlert({ okText: '" + GetLocalizedString("Ok.Text") + "', text: '" + message.Message + "', title: '" + message.Title + "'});});"; - } - - public static string GetLocalizedString(string key) - { - string resourceFile = "/App_GlobalResources/WebControls.resx"; - return Localization.GetString(key, resourceFile); - } - - public static string GetLocalResourceFile(Control ctrl) - { - return UIUtilities.GetLocalResourceFile(ctrl); - } - - public static string GetLocalizedStringFromParent(string key, Control control) - { - string returnValue = key; - string resourceFileName = GetLocalResourceFile(control.Parent); - - if (!string.IsNullOrEmpty(resourceFileName)) - { - returnValue = Localization.GetString(key, resourceFileName); - } - - return returnValue; - } - - public static string GetOnClientClickConfirm(Control ctrl, string message) - { - return GetOnClientClickConfirm(ctrl, new MessageWindowParameters(message)); - } - - public static string GetOnClientClickConfirm(Control ctrl, MessageWindowParameters message) - { - AddMessageWindow(ctrl); - - // function(text, mozEvent, oWidth, oHeight, callerObj, oTitle) - return string.Format("return postBackConfirm('{0}', event, '{1}', '{2}', '', '{3}');", message.Message, message.WindowWidth, message.WindowHeight, message.Title); - } - - public static string GetViewStateAsString(object value, string defaultValue) - { - string _Value = defaultValue; - if (value != null) - { - _Value = Convert.ToString(value); - } - - return _Value; - } - - public static void RegisterAlertOnPageLoad(Control ctrl, string message) - { - RegisterAlertOnPageLoad(ctrl, new MessageWindowParameters(message)); - } - - public static void RegisterAlertOnPageLoad(Control ctrl, MessageWindowParameters message) - { - ctrl.Page.ClientScript.RegisterClientScriptBlock(ctrl.GetType(), ctrl.ID + "_AlertOnPageLoad", GetClientAlert(ctrl, message), true); - } - - private static void AddMessageWindow(Control ctrl) - { - ClientResourceManager.RegisterScript(ctrl.Page, ctrl.ResolveUrl("~/js/dnn.postbackconfirm.js")); - } - } -} + public class Utilities + { + /// + /// Applies a custom CSS file for a control using a consistent naming pattern. + /// + /// The control that should have a skin injected. + /// An optional sub-skin. + /// An optional control name that might differ from the type. + public static void ApplyControlSkin(Control targetControl, string controlSubSkinName = "", string controlName = "") + { + ApplySkin(targetControl, string.Empty, controlName, controlSubSkinName); + } + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. Please use one of the ApplyControlSkin overloads if applicable to your implementation.")] + public static void ApplySkin(Control targetControl) + { + ApplySkin(targetControl, string.Empty, string.Empty, string.Empty); + } + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. Please use one of the ApplyControlSkin overloads if applicable to your implementation.")] + public static void ApplySkin(Control targetControl, string fallBackEmbeddedSkinName) + { + ApplySkin(targetControl, string.Empty, string.Empty, fallBackEmbeddedSkinName); + } + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. Please use one of the ApplyControlSkin overloads if applicable to your implementation.")] + public static void ApplySkin(Control targetControl, string fallBackEmbeddedSkinName, string controlName) + { + ApplySkin(targetControl, string.Empty, controlName, fallBackEmbeddedSkinName); + } + + // Use selected skin's webcontrol skin if one exists + // or use _default skin's webcontrol skin if one exists + // or use embedded skin + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. Please use one of the ApplyControlSkin overloads if applicable to your implementation.")] + public static void ApplySkin(Control targetControl, string fallBackEmbeddedSkinName, string controlName, string webControlSkinSubFolderName) + { + PropertyInfo skinProperty = null; + PropertyInfo enableEmbeddedSkinsProperty = null; + bool skinApplied = false; + + try + { + skinProperty = targetControl.GetType().GetProperty("Skin"); + enableEmbeddedSkinsProperty = targetControl.GetType().GetProperty("EnableEmbeddedSkins"); + + if (string.IsNullOrEmpty(controlName)) + { + controlName = targetControl.GetType().BaseType.Name; + if (controlName.StartsWith("Rad") || controlName.StartsWith("Dnn")) + { + controlName = controlName.Substring(3); + } + } + + string skinVirtualFolder = string.Empty; + if (PortalSettings.Current != null) + { + skinVirtualFolder = PortalSettings.Current.ActiveTab.SkinPath.Replace('\\', '/').Replace("//", "/"); + } + else + { + skinVirtualFolder = targetControl.ResolveUrl("~/Portals/_default/skins/_default/Aphelia"); // developer skin Aphelia + } + + string skinName = string.Empty; + string webControlSkinName = string.Empty; + if (skinProperty != null) + { + var v = skinProperty.GetValue(targetControl, null); + if (v != null) + { + webControlSkinName = v.ToString(); + } + } + + if (string.IsNullOrEmpty(webControlSkinName)) + { + webControlSkinName = "default"; + } + + if (skinVirtualFolder.EndsWith("/")) + { + skinVirtualFolder = skinVirtualFolder.Substring(0, skinVirtualFolder.Length - 1); + } + + int lastIndex = skinVirtualFolder.LastIndexOf("/"); + if (lastIndex > -1 && skinVirtualFolder.Length > lastIndex) + { + skinName = skinVirtualFolder.Substring(skinVirtualFolder.LastIndexOf("/") + 1); + } + + string systemWebControlSkin = string.Empty; + if (!string.IsNullOrEmpty(skinName) && !string.IsNullOrEmpty(skinVirtualFolder)) + { + systemWebControlSkin = HttpContext.Current.Server.MapPath(skinVirtualFolder); + systemWebControlSkin = Path.Combine(systemWebControlSkin, "WebControlSkin"); + systemWebControlSkin = Path.Combine(systemWebControlSkin, skinName); + systemWebControlSkin = Path.Combine(systemWebControlSkin, webControlSkinSubFolderName); + systemWebControlSkin = Path.Combine(systemWebControlSkin, string.Format("{0}.{1}.css", controlName, webControlSkinName)); + + // Check if the selected skin has the webcontrol skin + if (!File.Exists(systemWebControlSkin)) + { + systemWebControlSkin = string.Empty; + } + + // No skin, try default folder + if (string.IsNullOrEmpty(systemWebControlSkin)) + { + skinVirtualFolder = targetControl.ResolveUrl("~/Portals/_default/Skins/_default"); + skinName = "Default"; + + if (skinVirtualFolder.EndsWith("/")) + { + skinVirtualFolder = skinVirtualFolder.Substring(0, skinVirtualFolder.Length - 1); + } + + if (!string.IsNullOrEmpty(skinName) && !string.IsNullOrEmpty(skinVirtualFolder)) + { + systemWebControlSkin = HttpContext.Current.Server.MapPath(skinVirtualFolder); + systemWebControlSkin = Path.Combine(systemWebControlSkin, "WebControlSkin"); + systemWebControlSkin = Path.Combine(systemWebControlSkin, skinName); + systemWebControlSkin = Path.Combine(systemWebControlSkin, webControlSkinSubFolderName); + systemWebControlSkin = Path.Combine(systemWebControlSkin, string.Format("{0}.{1}.css", controlName, webControlSkinName)); + + if (!File.Exists(systemWebControlSkin)) + { + systemWebControlSkin = string.Empty; + } + } + } + } + + if (!string.IsNullOrEmpty(systemWebControlSkin)) + { + string filePath = Path.Combine(skinVirtualFolder, "WebControlSkin"); + filePath = Path.Combine(filePath, skinName); + filePath = Path.Combine(filePath, webControlSkinSubFolderName); + filePath = Path.Combine(filePath, string.Format("{0}.{1}.css", controlName, webControlSkinName)); + filePath = filePath.Replace('\\', '/').Replace("//", "/").TrimEnd('/'); + + if (HttpContext.Current != null && HttpContext.Current.Handler is Page) + { + ClientResourceManager.RegisterStyleSheet(HttpContext.Current.Handler as Page, filePath, FileOrder.Css.ResourceCss); + } + + if ((skinProperty != null) && (enableEmbeddedSkinsProperty != null)) + { + skinApplied = true; + skinProperty.SetValue(targetControl, webControlSkinName, null); + enableEmbeddedSkinsProperty.SetValue(targetControl, false, null); + } + } + } + catch (Exception ex) + { + Exceptions.LogException(ex); + } + + if (skinProperty != null && enableEmbeddedSkinsProperty != null && !skinApplied) + { + if (string.IsNullOrEmpty(fallBackEmbeddedSkinName)) + { + fallBackEmbeddedSkinName = "Simple"; + } + + // Set fall back skin Embedded Skin + skinProperty.SetValue(targetControl, fallBackEmbeddedSkinName, null); + enableEmbeddedSkinsProperty.SetValue(targetControl, true, null); + } + } + + public static void CreateThumbnail(FileInfo image, Image img, int maxWidth, int maxHeight) + { + if (image.Width > image.Height) + { + // Landscape + if (image.Width > maxWidth) + { + img.Width = maxWidth; + img.Height = Convert.ToInt32((image.Height * maxWidth) / (float)image.Width); + } + else + { + img.Width = image.Width; + img.Height = image.Height; + } + } + else + { + // Portrait + if (image.Height > maxHeight) + { + img.Width = Convert.ToInt32((image.Width * maxHeight) / (float)image.Height); + img.Height = maxHeight; + } + else + { + img.Width = image.Width; + img.Height = image.Height; + } + } + } + + public static string GetClientAlert(Control ctrl, string message) + { + return GetClientAlert(ctrl, new MessageWindowParameters(message)); + } + + public static string GetClientAlert(Control ctrl, MessageWindowParameters message) + { + return "jQuery(document).ready(function($){$.dnnAlert({ okText: '" + GetLocalizedString("Ok.Text") + "', text: '" + message.Message + "', title: '" + message.Title + "'});});"; + } + + public static string GetLocalizedString(string key) + { + string resourceFile = "/App_GlobalResources/WebControls.resx"; + return Localization.GetString(key, resourceFile); + } + + public static string GetLocalResourceFile(Control ctrl) + { + return UIUtilities.GetLocalResourceFile(ctrl); + } + + public static string GetLocalizedStringFromParent(string key, Control control) + { + string returnValue = key; + string resourceFileName = GetLocalResourceFile(control.Parent); + + if (!string.IsNullOrEmpty(resourceFileName)) + { + returnValue = Localization.GetString(key, resourceFileName); + } + + return returnValue; + } + + public static string GetOnClientClickConfirm(Control ctrl, string message) + { + return GetOnClientClickConfirm(ctrl, new MessageWindowParameters(message)); + } + + public static string GetOnClientClickConfirm(Control ctrl, MessageWindowParameters message) + { + AddMessageWindow(ctrl); + + // function(text, mozEvent, oWidth, oHeight, callerObj, oTitle) + return string.Format("return postBackConfirm('{0}', event, '{1}', '{2}', '', '{3}');", message.Message, message.WindowWidth, message.WindowHeight, message.Title); + } + + public static string GetViewStateAsString(object value, string defaultValue) + { + string _Value = defaultValue; + if (value != null) + { + _Value = Convert.ToString(value); + } + + return _Value; + } + + public static void RegisterAlertOnPageLoad(Control ctrl, string message) + { + RegisterAlertOnPageLoad(ctrl, new MessageWindowParameters(message)); + } + + public static void RegisterAlertOnPageLoad(Control ctrl, MessageWindowParameters message) + { + ctrl.Page.ClientScript.RegisterClientScriptBlock(ctrl.GetType(), ctrl.ID + "_AlertOnPageLoad", GetClientAlert(ctrl, message), true); + } + + private static void AddMessageWindow(Control ctrl) + { + ClientResourceManager.RegisterScript(ctrl.Page, ctrl.ResolveUrl("~/js/dnn.postbackconfirm.js")); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web/UI/WebControls/DnnFileUploadOptions.cs b/DNN Platform/DotNetNuke.Web/UI/WebControls/DnnFileUploadOptions.cs index f619ed65e82..d4ff5103a3a 100644 --- a/DNN Platform/DotNetNuke.Web/UI/WebControls/DnnFileUploadOptions.cs +++ b/DNN Platform/DotNetNuke.Web/UI/WebControls/DnnFileUploadOptions.cs @@ -1,14 +1,13 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information namespace DotNetNuke.Web.UI.WebControls { - using System.Collections.Generic; - using System.Globalization; - using System.Runtime.Serialization; - - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Portals; +using System.Collections.Generic; +using System.Globalization; +using System.Runtime.Serialization; +using DotNetNuke.Common.Utilities; +using DotNetNuke.Entities.Portals; [DataContract] public class DnnFileUploadOptions @@ -46,13 +45,21 @@ public class DnnFileUploadOptions [DataMember(Name = "height")] public int Height; - [DataMember(Name = "folderPath")] - public string FolderPath; + private Dictionary _parameters; + [DataMember(Name = "parameters")] + public Dictionary Parameters + { + get + { + return this._parameters ?? (this._parameters = new Dictionary()); + } + } private const int DefaultWidth = 780; private const int DefaultHeight = 630; - private Dictionary _parameters; + [DataMember(Name = "folderPath")] + public string FolderPath; public DnnFileUploadOptions() { @@ -91,15 +98,6 @@ public DnnFileUploadOptions() }; } - [DataMember(Name = "parameters")] - public Dictionary Parameters - { - get - { - return this._parameters ?? (this._parameters = new Dictionary()); - } - } - [DataMember(Name = "validationCode")] public string ValidationCode { @@ -112,8 +110,8 @@ public string ValidationCode parameters.Add(portalSettings.UserInfo.UserID); if (!portalSettings.UserInfo.IsSuperUser) { - parameters.Add(portalSettings.PortalId); - } + parameters.Add(portalSettings.PortalId); + } } return ValidationUtils.ComputeValidationCode(parameters); diff --git a/DNN Platform/DotNetNuke.WebUtility/DotNetNuke.ClientAPI.dnn b/DNN Platform/DotNetNuke.WebUtility/DotNetNuke.ClientAPI.dnn index 4307f0f6b01..eb5fcba8164 100644 --- a/DNN Platform/DotNetNuke.WebUtility/DotNetNuke.ClientAPI.dnn +++ b/DNN Platform/DotNetNuke.WebUtility/DotNetNuke.ClientAPI.dnn @@ -1,6 +1,6 @@  - + DotNetNuke ClientAPI The DotNetNuke Client API is composed of both server-side and client-side code that works together to enable a simple and reliable interface for the developer to provide a rich client-side experience. diff --git a/DNN Platform/DotNetNuke.Website.Deprecated/DotNetNuke.Website.Deprecated.csproj b/DNN Platform/DotNetNuke.Website.Deprecated/DotNetNuke.Website.Deprecated.csproj index 9f01bc47c74..ddb5430b400 100644 --- a/DNN Platform/DotNetNuke.Website.Deprecated/DotNetNuke.Website.Deprecated.csproj +++ b/DNN Platform/DotNetNuke.Website.Deprecated/DotNetNuke.Website.Deprecated.csproj @@ -92,13 +92,6 @@ - - ..\Components\Telerik\bin\Telerik.Web.UI.dll - True - - - ..\Components\Telerik\bin\Telerik.Web.UI.Skins.dll - diff --git a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/AddModule.ascx.cs b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/AddModule.ascx.cs index 855440db9a7..8617687b535 100644 --- a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/AddModule.ascx.cs +++ b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/AddModule.ascx.cs @@ -1,912 +1,912 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.UI.ControlPanel -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Threading; - using System.Web; - using System.Web.UI.WebControls; - - using DotNetNuke.Abstractions; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Content.Common; - using DotNetNuke.Entities.Content.Taxonomy; - using DotNetNuke.Entities.Modules; - using DotNetNuke.Entities.Modules.Definitions; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Entities.Tabs; - using DotNetNuke.Entities.Users; - using DotNetNuke.Framework; - using DotNetNuke.Instrumentation; - using DotNetNuke.Security.Permissions; - using DotNetNuke.Services.Exceptions; - using DotNetNuke.Services.Localization; - using DotNetNuke.Services.Log.EventLog; - using DotNetNuke.Services.Personalization; - using DotNetNuke.UI.Utilities; - using DotNetNuke.Web.UI; - using DotNetNuke.Web.UI.WebControls; - using DotNetNuke.Web.UI.WebControls.Extensions; - using Microsoft.Extensions.DependencyInjection; - - using Globals = DotNetNuke.Common.Globals; - using PortalInfo = DotNetNuke.Entities.Portals.PortalInfo; +namespace DotNetNuke.UI.ControlPanel +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Threading; + using System.Web; + using System.Web.UI.WebControls; + + using DotNetNuke.Abstractions; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Content.Common; + using DotNetNuke.Entities.Content.Taxonomy; + using DotNetNuke.Entities.Modules; + using DotNetNuke.Entities.Modules.Definitions; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Tabs; + using DotNetNuke.Entities.Users; + using DotNetNuke.Framework; + using DotNetNuke.Instrumentation; + using DotNetNuke.Security.Permissions; + using DotNetNuke.Services.Exceptions; + using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Log.EventLog; + using DotNetNuke.Services.Personalization; + using DotNetNuke.UI.Utilities; + using DotNetNuke.Web.UI; + using DotNetNuke.Web.UI.WebControls; + using DotNetNuke.Web.UI.WebControls.Extensions; + using Microsoft.Extensions.DependencyInjection; + + using Globals = DotNetNuke.Common.Globals; + using PortalInfo = DotNetNuke.Entities.Portals.PortalInfo; using Reflection = DotNetNuke.Framework.Reflection; - public partial class AddModule : UserControlBase, IDnnRibbonBarTool - { - private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(AddModule)); - private readonly INavigationManager _navigationManager; - private bool _enabled = true; - - public AddModule() - { - this._navigationManager = Globals.DependencyProvider.GetRequiredService(); - } - - public override bool Visible - { - get - { - return base.Visible && TabPermissionController.CanAddContentToPage(); - } - - set - { - base.Visible = value; - } - } - - public bool Enabled - { - get - { - return this._enabled && this.CanAddModuleToPage(); - } - - set - { - this._enabled = value; - } - } - - public string ToolName - { - get - { - return "QuickAddModule"; - } - - set - { - throw new NotSupportedException("Set ToolName not supported"); - } - } - - /// Gets the currently-selected module. - protected DesktopModuleInfo SelectedModule - { - get - { - if (this.AddExistingModule.Checked) - { - var tabId = -1; - if (!string.IsNullOrEmpty(this.PageLst.SelectedValue)) - { - tabId = int.Parse(this.PageLst.SelectedValue); - } - - if (tabId < 0) - { - tabId = PortalSettings.Current.ActiveTab.TabID; - } - - if (!string.IsNullOrEmpty(this.ModuleLst.SelectedValue)) - { - var moduleId = int.Parse(this.ModuleLst.SelectedValue); - if (moduleId >= 0) - { - return ModuleController.Instance.GetModule(moduleId, tabId, false).DesktopModule; - } - } - } - else - { - var portalId = -1; - - if (this.SiteListPanel.Visible) - { - portalId = int.Parse(this.SiteList.SelectedValue); - } - - if (portalId < 0) - { - portalId = PortalSettings.Current.PortalId; - } - - if (!string.IsNullOrEmpty(this.ModuleLst.SelectedValue)) - { - var moduleId = int.Parse(this.ModuleLst.SelectedValue); - if (moduleId >= 0) - { - return DesktopModuleController.GetDesktopModule(moduleId, portalId); - } - } - } - - return null; - } - } - - /// - /// Gets return the for the selected portal (from the Site list), unless - /// the site list is not visible or there are no other sites in our site group, in which case - /// it returns the PortalSettings for the current portal. - /// - private PortalSettings SelectedPortalSettings - { - get - { - var portalSettings = PortalSettings.Current; - - try - { - if (this.SiteListPanel.Visible && this.SiteList.SelectedItem != null) - { - if (!string.IsNullOrEmpty(this.SiteList.SelectedItem.Value)) - { - var selectedPortalId = int.Parse(this.SiteList.SelectedItem.Value); - if (this.PortalSettings.PortalId != selectedPortalId) - { - portalSettings = new PortalSettings(int.Parse(this.SiteList.SelectedItem.Value)); - } - } - } - } - catch (Exception) - { - portalSettings = PortalSettings.Current; - } - - return portalSettings; - } - } - - private string LocalResourceFile - { - get - { - return string.Format("{0}/{1}/{2}.ascx.resx", this.TemplateSourceDirectory, Localization.LocalResourceDirectory, this.GetType().BaseType.Name); - } - } - - public bool CanAddModuleToPage() - { - if (HttpContext.Current == null) - { - return false; - } - - // If we are not in an edit page - return string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["mid"]) && string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["ctl"]); - } - - protected void AddNewOrExisting_OnClick(object sender, EventArgs e) - { - this.LoadAllLists(); - } - - protected void PaneLstSelectedIndexChanged(object sender, EventArgs e) - { - this.LoadPositionList(); - this.LoadPaneModulesList(); - } - - protected void PageLstSelectedIndexChanged(object sender, EventArgs e) - { - this.LoadModuleList(); - } - - protected void PositionLstSelectedIndexChanged(object sender, EventArgs e) - { - this.PaneModulesLst.Enabled = this.PositionLst.SelectedValue == "ABOVE" || this.PositionLst.SelectedValue == "BELOW"; - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - // Is there more than one site in this group? - var multipleSites = this.GetCurrentPortalsGroup().Count() > 1; - ClientAPI.RegisterClientVariable(this.Page, "moduleSharing", multipleSites.ToString().ToLowerInvariant(), true); - - ServicesFramework.Instance.RequestAjaxAntiForgerySupport(); - - this.cmdAddModule.Click += this.CmdAddModuleClick; - this.AddNewModule.CheckedChanged += this.AddNewOrExisting_OnClick; - this.AddExistingModule.CheckedChanged += this.AddNewOrExisting_OnClick; - this.SiteList.SelectedIndexChanged += this.SiteList_SelectedIndexChanged; - this.CategoryList.SelectedIndexChanged += this.CategoryListSelectedIndexChanged; - this.PageLst.SelectedIndexChanged += this.PageLstSelectedIndexChanged; - this.PaneLst.SelectedIndexChanged += this.PaneLstSelectedIndexChanged; - this.PositionLst.SelectedIndexChanged += this.PositionLstSelectedIndexChanged; - - try - { - if (this.Visible) - { - this.cmdAddModule.Enabled = this.Enabled; - this.AddExistingModule.Enabled = this.Enabled; - this.AddNewModule.Enabled = this.Enabled; - this.Title.Enabled = this.Enabled; - this.PageLst.Enabled = this.Enabled; - this.ModuleLst.Enabled = this.Enabled; - this.VisibilityLst.Enabled = this.Enabled; - this.PaneLst.Enabled = this.Enabled; - this.PositionLst.Enabled = this.Enabled; - this.PaneModulesLst.Enabled = this.Enabled; - - UserInfo objUser = UserController.Instance.GetCurrentUserInfo(); - if (objUser != null) - { - if (objUser.IsSuperUser) - { - var objModule = ModuleController.Instance.GetModuleByDefinition(-1, "Extensions"); - if (objModule != null) - { - var strURL = this._navigationManager.NavigateURL(objModule.TabID, true); - this.hlMoreExtensions.NavigateUrl = strURL + "#moreExtensions"; - } - else - { - this.hlMoreExtensions.Enabled = false; - } - - this.hlMoreExtensions.Text = this.GetString("hlMoreExtensions"); - this.hlMoreExtensions.Visible = true; - } - } - } - - if (!this.IsPostBack && this.Visible && this.Enabled) - { - this.AddNewModule.Checked = true; - this.LoadAllLists(); - } - } - catch (Exception exc) - { - Exceptions.ProcessModuleLoadException(this, exc); - } - } - - protected void CmdAddModuleClick(object sender, EventArgs e) - { - if (TabPermissionController.CanAddContentToPage() && this.CanAddModuleToPage()) - { - int permissionType; - try - { - permissionType = int.Parse(this.VisibilityLst.SelectedValue); - } - catch (Exception exc) - { - Logger.Error(exc); - - permissionType = 0; - } - - int position = -1; - switch (this.PositionLst.SelectedValue) - { - case "TOP": - position = 0; - break; - case "ABOVE": - if (!string.IsNullOrEmpty(this.PaneModulesLst.SelectedValue)) - { - try - { - position = int.Parse(this.PaneModulesLst.SelectedValue) - 1; - } - catch (Exception exc) - { - Logger.Error(exc); - - position = -1; - } - } - else - { - position = 0; - } - - break; - case "BELOW": - if (!string.IsNullOrEmpty(this.PaneModulesLst.SelectedValue)) - { - try - { - position = int.Parse(this.PaneModulesLst.SelectedValue) + 1; - } - catch (Exception exc) - { - Logger.Error(exc); - - position = -1; - } - } - else - { - position = -1; - } - - break; - case "BOTTOM": - position = -1; - break; - } - - int moduleLstID; - try - { - moduleLstID = int.Parse(this.ModuleLst.SelectedValue); - } - catch (Exception exc) - { - Logger.Error(exc); - - moduleLstID = -1; - } - - if (moduleLstID > -1) - { - if (this.AddExistingModule.Checked) - { - int pageID; - try - { - pageID = int.Parse(this.PageLst.SelectedValue); - } - catch (Exception exc) - { - Logger.Error(exc); - - pageID = -1; - } - - if (pageID > -1) - { - this.DoAddExistingModule(moduleLstID, pageID, this.PaneLst.SelectedValue, position, string.Empty, this.chkCopyModule.Checked); - } - } - else - { - DoAddNewModule(this.Title.Text, moduleLstID, this.PaneLst.SelectedValue, position, permissionType, string.Empty); - } - } - - // set view mode to edit after add module. - if (this.PortalSettings.UserMode != PortalSettings.Mode.Edit) - { - Personalization.SetProfile("Usability", "UserMode" + this.PortalSettings.PortalId, "EDIT"); - } - - this.Response.Redirect(this.Request.RawUrl, true); - } - } - - protected string GetString(string key) - { - return Localization.GetString(key, this.LocalResourceFile); - } - - private static ModulePermissionInfo AddModulePermission(ModuleInfo objModule, PermissionInfo permission, int roleId, int userId, bool allowAccess) - { - var objModulePermission = new ModulePermissionInfo - { - ModuleID = objModule.ModuleID, - PermissionID = permission.PermissionID, - RoleID = roleId, - UserID = userId, - PermissionKey = permission.PermissionKey, - AllowAccess = allowAccess, - }; - - // add the permission to the collection - if (!objModule.ModulePermissions.Contains(objModulePermission)) - { - objModule.ModulePermissions.Add(objModulePermission); - } - - return objModulePermission; - } - - private static void SetCloneModuleContext(bool cloneModuleContext) - { - Thread.SetData( - Thread.GetNamedDataSlot("CloneModuleContext"), - cloneModuleContext ? bool.TrueString : bool.FalseString); - } - - private static void DoAddNewModule(string title, int desktopModuleId, string paneName, int position, int permissionType, string align) - { - try - { - DesktopModuleInfo desktopModule; - if (!DesktopModuleController.GetDesktopModules(PortalSettings.Current.PortalId).TryGetValue(desktopModuleId, out desktopModule)) - { - throw new ArgumentException("desktopModuleId"); - } - } - catch (Exception ex) - { - Exceptions.LogException(ex); - } - - foreach (ModuleDefinitionInfo objModuleDefinition in - ModuleDefinitionController.GetModuleDefinitionsByDesktopModuleID(desktopModuleId).Values) - { - var objModule = new ModuleInfo(); - objModule.Initialize(PortalSettings.Current.ActiveTab.PortalID); - - objModule.PortalID = PortalSettings.Current.ActiveTab.PortalID; - objModule.TabID = PortalSettings.Current.ActiveTab.TabID; - objModule.ModuleOrder = position; - objModule.ModuleTitle = string.IsNullOrEmpty(title) ? objModuleDefinition.FriendlyName : title; - objModule.PaneName = paneName; - objModule.ModuleDefID = objModuleDefinition.ModuleDefID; - if (objModuleDefinition.DefaultCacheTime > 0) - { - objModule.CacheTime = objModuleDefinition.DefaultCacheTime; - if (PortalSettings.Current.DefaultModuleId > Null.NullInteger && PortalSettings.Current.DefaultTabId > Null.NullInteger) - { - ModuleInfo defaultModule = ModuleController.Instance.GetModule(PortalSettings.Current.DefaultModuleId, PortalSettings.Current.DefaultTabId, true); - if (defaultModule != null) - { - objModule.CacheTime = defaultModule.CacheTime; - } - } - } - - ModuleController.Instance.InitialModulePermission(objModule, objModule.TabID, permissionType); - - if (PortalSettings.Current.ContentLocalizationEnabled) - { - Locale defaultLocale = LocaleController.Instance.GetDefaultLocale(PortalSettings.Current.PortalId); - - // check whether original tab is exists, if true then set culture code to default language, - // otherwise set culture code to current. - if (TabController.Instance.GetTabByCulture(objModule.TabID, PortalSettings.Current.PortalId, defaultLocale) != null) - { - objModule.CultureCode = defaultLocale.Code; - } - else - { - objModule.CultureCode = PortalSettings.Current.CultureCode; - } - } - else - { - objModule.CultureCode = Null.NullString; - } - - objModule.AllTabs = false; - objModule.Alignment = align; - - ModuleController.Instance.AddModule(objModule); - } - } - - private static bool GetIsPortable(string moduleID, string tabID) - { - bool isPortable = false; - int parsedModuleID; - int parsedTabID; - - bool validModuleID = int.TryParse(moduleID, out parsedModuleID); - bool validTabID = int.TryParse(tabID, out parsedTabID); - - if (validModuleID && validTabID) - { - ModuleInfo moduleInfo = ModuleController.Instance.GetModule(parsedModuleID, parsedTabID, false); - if (moduleInfo != null) - { - DesktopModuleInfo moduleDesktopInfo = moduleInfo.DesktopModule; - if (moduleDesktopInfo != null) - { - isPortable = moduleDesktopInfo.IsPortable; - } - } - } - - return isPortable; - } - - private void CmdConfirmAddModuleClick(object sender, EventArgs e) - { - this.CmdAddModuleClick(sender, e); - } - - private void SiteList_SelectedIndexChanged(object sender, EventArgs e) - { - this.LoadModuleList(); - this.LoadPageList(); - } - - private void CategoryListSelectedIndexChanged(object sender, EventArgs e) - { - this.LoadModuleList(); - } - - private void DoAddExistingModule(int moduleId, int tabId, string paneName, int position, string align, bool cloneModule) - { - ModuleInfo moduleInfo = ModuleController.Instance.GetModule(moduleId, tabId, false); - - int userID = -1; - if (this.Request.IsAuthenticated) - { - UserInfo user = UserController.Instance.GetCurrentUserInfo(); - if (user != null) - { - userID = user.UserID; - } - } - - if (moduleInfo != null) - { - // Is this from a site other than our own? (i.e., is the user requesting "module sharing"?) - var remote = moduleInfo.PortalID != PortalSettings.Current.PortalId; - if (remote) - { - switch (moduleInfo.DesktopModule.Shareable) - { - case ModuleSharing.Unsupported: - // Should never happen since the module should not be listed in the first place. - throw new ApplicationException(string.Format( - "Module '{0}' does not support Shareable and should not be listed in Add Existing Module from a different source site", - moduleInfo.DesktopModule.FriendlyName)); - case ModuleSharing.Supported: - break; - default: - case ModuleSharing.Unknown: - break; - } - } - - // clone the module object ( to avoid creating an object reference to the data cache ) - ModuleInfo newModule = moduleInfo.Clone(); - - newModule.UniqueId = Guid.NewGuid(); // Cloned Module requires a different uniqueID - newModule.TabModuleID = Null.NullInteger; - newModule.TabID = PortalSettings.Current.ActiveTab.TabID; - newModule.ModuleOrder = position; - newModule.PaneName = paneName; - newModule.Alignment = align; - - if (cloneModule) - { - newModule.ModuleID = Null.NullInteger; - - // copy module settings and tab module settings - newModule.ModuleSettings.Clear(); - foreach (var key in moduleInfo.ModuleSettings.Keys) - { - newModule.ModuleSettings.Add(key, moduleInfo.ModuleSettings[key]); - } - - newModule.TabModuleSettings.Clear(); - foreach (var key in moduleInfo.TabModuleSettings.Keys) - { - newModule.TabModuleSettings.Add(key, moduleInfo.TabModuleSettings[key]); - } - - // reset the module id - newModule.ModuleID = ModuleController.Instance.AddModule(newModule); - - if (!string.IsNullOrEmpty(newModule.DesktopModule.BusinessControllerClass)) - { - object objObject = Reflection.CreateObject(newModule.DesktopModule.BusinessControllerClass, newModule.DesktopModule.BusinessControllerClass); - if (objObject is IPortable) - { - try - { - SetCloneModuleContext(true); - string content = Convert.ToString(((IPortable)objObject).ExportModule(moduleId)); - if (!string.IsNullOrEmpty(content)) - { - ((IPortable)objObject).ImportModule(newModule.ModuleID, content, newModule.DesktopModule.Version, userID); - } - } - finally - { - SetCloneModuleContext(false); - } - } - } - } - else - { - // copy tab module settings - newModule.TabModuleSettings.Clear(); - foreach (var key in moduleInfo.TabModuleSettings.Keys) - { - newModule.TabModuleSettings.Add(key, moduleInfo.TabModuleSettings[key]); - } - - ModuleController.Instance.AddModule(newModule); - } - - if (remote) - { - // Ensure the Portal Admin has View rights - var permissionController = new PermissionController(); - ArrayList arrSystemModuleViewPermissions = permissionController.GetPermissionByCodeAndKey("SYSTEM_MODULE_DEFINITION", "VIEW"); - AddModulePermission( - newModule, - (PermissionInfo)arrSystemModuleViewPermissions[0], - PortalSettings.Current.AdministratorRoleId, - Null.NullInteger, - true); - - // Set PortalID correctly - newModule.OwnerPortalID = newModule.PortalID; - newModule.PortalID = PortalSettings.Current.PortalId; - ModulePermissionController.SaveModulePermissions(newModule); - } - - // Add Event Log - EventLogController.Instance.AddLog(newModule, PortalSettings.Current, userID, string.Empty, EventLogController.EventLogType.MODULE_CREATED); - } - } - - private IEnumerable GetCurrentPortalsGroup() - { - var groups = PortalGroupController.Instance.GetPortalGroups().ToArray(); - - var result = (from @group in groups - select PortalGroupController.Instance.GetPortalsByGroup(@group.PortalGroupId) - into portals - where portals.Any(x => x.PortalID == PortalSettings.Current.PortalId) - select portals.ToArray()).FirstOrDefault(); - - // Are we in a group of one? - if (result == null || result.Length == 0) - { - result = new[] { PortalController.Instance.GetPortal(PortalSettings.Current.PortalId) }; - } - - return result; - } - - private void LoadAllLists() - { - this.LoadSiteList(); - this.LoadCategoryList(); - this.LoadPageList(); - this.LoadModuleList(); - this.LoadVisibilityList(); - this.LoadPaneList(); - this.LoadPositionList(); - this.LoadPaneModulesList(); - } - - private void LoadCategoryList() - { - this.CategoryListPanel.Visible = !this.AddExistingModule.Checked; - - ITermController termController = Util.GetTermController(); - this.CategoryList.DataSource = termController.GetTermsByVocabulary("Module_Categories").OrderBy(t => t.Weight).Where(t => t.Name != "< None >").ToList(); - this.CategoryList.DataBind(); - - // CategoryList.Items.Add(new ListItem(Localization.GetString("AllCategories", LocalResourceFile), "All")); - this.CategoryList.AddItem(Localization.GetString("AllCategories", this.LocalResourceFile), "All"); - if (!this.IsPostBack) - { - this.CategoryList.Select("Common", false); - } - } - - private void LoadModuleList() - { - if (this.AddExistingModule.Checked) - { - // Get list of modules for the selected tab - if (!string.IsNullOrEmpty(this.PageLst.SelectedValue)) - { - var tabId = int.Parse(this.PageLst.SelectedValue); - if (tabId >= 0) - { - this.ModuleLst.BindTabModulesByTabID(tabId); - } - - if (this.ModuleLst.ItemCount > 0) - { - this.chkCopyModule.Visible = true; - this.SetCopyModuleMessage(GetIsPortable(this.ModuleLst.SelectedValue, this.PageLst.SelectedValue)); - } - } - } - else - { - this.ModuleLst.Filter = this.CategoryList.SelectedValue == "All" - ? (kvp => true) - : (Func, bool>)(kvp => kvp.Value.DesktopModule.Category == this.CategoryList.SelectedValue); - this.ModuleLst.BindAllPortalDesktopModules(); - } - - this.ModuleLst.Enabled = this.ModuleLst.ItemCount > 0; - } - - private void LoadPageList() - { - this.PageListPanel.Visible = this.AddExistingModule.Checked; - this.TitlePanel.Enabled = !this.AddExistingModule.Checked; - this.chkCopyModule.Visible = this.AddExistingModule.Checked; - - if (this.AddExistingModule.Checked) - { - this.chkCopyModule.Text = Localization.GetString("CopyModuleDefault.Text", this.LocalResourceFile); - } - - var portalSettings = this.SelectedPortalSettings; - - this.PageLst.Items.Clear(); - - if (this.PageListPanel.Visible) - { - this.PageLst.DataValueField = "TabID"; - this.PageLst.DataTextField = "IndentedTabName"; - if (this.PortalSettings.PortalId == this.SelectedPortalSettings.PortalId) - { - this.PageLst.DataSource = TabController.GetPortalTabs(portalSettings.PortalId, portalSettings.ActiveTab.TabID, true, string.Empty, true, false, false, false, true); - } - else - { - this.PageLst.DataSource = TabController.GetPortalTabs(portalSettings.PortalId, Null.NullInteger, true, string.Empty, true, false, false, false, true); - } - - this.PageLst.DataBind(); - } - } - - private void LoadPaneList() - { - this.PaneLst.Items.Clear(); - this.PaneLst.DataSource = PortalSettings.Current.ActiveTab.Panes; - this.PaneLst.DataBind(); - if (PortalSettings.Current.ActiveTab.Panes.Contains(Globals.glbDefaultPane)) - { - this.PaneLst.SelectedValue = Globals.glbDefaultPane; - } - } - - private void LoadPaneModulesList() - { - var items = new Dictionary { { string.Empty, string.Empty } }; - - foreach (ModuleInfo m in PortalSettings.Current.ActiveTab.Modules) - { - // if user is allowed to view module and module is not deleted - if (ModulePermissionController.CanViewModule(m) && !m.IsDeleted) - { - // modules which are displayed on all tabs should not be displayed on the Admin or Super tabs - if (!m.AllTabs || !PortalSettings.Current.ActiveTab.IsSuperTab) - { - if (m.PaneName == this.PaneLst.SelectedValue) - { - int moduleOrder = m.ModuleOrder; - - while (items.ContainsKey(moduleOrder.ToString()) || moduleOrder == 0) - { - moduleOrder++; - } - - items.Add(moduleOrder.ToString(), m.ModuleTitle); - } - } - } - } - - this.PaneModulesLst.Enabled = true; - this.PaneModulesLst.Items.Clear(); - this.PaneModulesLst.DataValueField = "key"; - this.PaneModulesLst.DataTextField = "value"; - this.PaneModulesLst.DataSource = items; - this.PaneModulesLst.DataBind(); - - if (this.PaneModulesLst.Items.Count <= 1) - { - var listItem = this.PositionLst.FindItemByValue("ABOVE"); - if (listItem != null) - { - this.PositionLst.Items.Remove(listItem); - } - - listItem = this.PositionLst.FindItemByValue("BELOW"); - if (listItem != null) - { - this.PositionLst.Items.Remove(listItem); - } - - this.PaneModulesLst.Enabled = false; - } - - if (this.PositionLst.SelectedValue == "TOP" || this.PositionLst.SelectedValue == "BOTTOM") - { - this.PaneModulesLst.Enabled = false; - } - } - - private void LoadPositionList() - { - var items = new Dictionary - { - { "TOP", this.GetString("Top") }, - { "ABOVE", this.GetString("Above") }, - { "BELOW", this.GetString("Below") }, - { "BOTTOM", this.GetString("Bottom") }, - }; - - this.PositionLst.Items.Clear(); - this.PositionLst.DataValueField = "key"; - this.PositionLst.DataTextField = "value"; - this.PositionLst.DataSource = items; - this.PositionLst.DataBind(); - this.PositionLst.SelectedValue = "BOTTOM"; - } - - private void LoadSiteList() - { - // Is there more than one site in this group? - var multipleSites = this.GetCurrentPortalsGroup().Count() > 1; - - this.SiteListPanel.Visible = multipleSites && this.AddExistingModule.Checked; - - if (this.SiteListPanel.Visible) - { - // Get a list of portals in this SiteGroup. - var portals = PortalController.Instance.GetPortals().Cast().ToArray(); - - this.SiteList.DataSource = portals.Select( - x => new { Value = x.PortalID, Name = x.PortalName, GroupID = x.PortalGroupID }).ToList(); - this.SiteList.DataTextField = "Name"; - this.SiteList.DataValueField = "Value"; - this.SiteList.DataBind(); - } - } - - private void LoadVisibilityList() - { - this.VisibilityLst.Enabled = !this.AddExistingModule.Checked; - if (this.VisibilityLst.Enabled) - { - var items = new Dictionary { { "0", this.GetString("PermissionView") }, { "1", this.GetString("PermissionEdit") } }; - - this.VisibilityLst.Items.Clear(); - this.VisibilityLst.DataValueField = "key"; - this.VisibilityLst.DataTextField = "value"; - this.VisibilityLst.DataSource = items; - this.VisibilityLst.DataBind(); - } - } - - private void SetCopyModuleMessage(bool isPortable) - { - if (isPortable) - { - this.chkCopyModule.Text = Localization.GetString("CopyModuleWcontent", this.LocalResourceFile); - this.chkCopyModule.ToolTip = Localization.GetString("CopyModuleWcontent.ToolTip", this.LocalResourceFile); - } - else - { - this.chkCopyModule.Text = Localization.GetString("CopyModuleWOcontent", this.LocalResourceFile); - this.chkCopyModule.ToolTip = Localization.GetString("CopyModuleWOcontent.ToolTip", this.LocalResourceFile); - } - } - } -} + public partial class AddModule : UserControlBase, IDnnRibbonBarTool + { + private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(AddModule)); + private readonly INavigationManager _navigationManager; + private bool _enabled = true; + + public AddModule() + { + this._navigationManager = Globals.DependencyProvider.GetRequiredService(); + } + + public override bool Visible + { + get + { + return base.Visible && TabPermissionController.CanAddContentToPage(); + } + + set + { + base.Visible = value; + } + } + + public bool Enabled + { + get + { + return this._enabled && this.CanAddModuleToPage(); + } + + set + { + this._enabled = value; + } + } + + public string ToolName + { + get + { + return "QuickAddModule"; + } + + set + { + throw new NotSupportedException("Set ToolName not supported"); + } + } + + /// Gets the currently-selected module. + protected DesktopModuleInfo SelectedModule + { + get + { + if (this.AddExistingModule.Checked) + { + var tabId = -1; + if (!string.IsNullOrEmpty(this.PageLst.SelectedValue)) + { + tabId = int.Parse(this.PageLst.SelectedValue); + } + + if (tabId < 0) + { + tabId = PortalSettings.Current.ActiveTab.TabID; + } + + if (!string.IsNullOrEmpty(this.ModuleLst.SelectedValue)) + { + var moduleId = int.Parse(this.ModuleLst.SelectedValue); + if (moduleId >= 0) + { + return ModuleController.Instance.GetModule(moduleId, tabId, false).DesktopModule; + } + } + } + else + { + var portalId = -1; + + if (this.SiteListPanel.Visible) + { + portalId = int.Parse(this.SiteList.SelectedValue); + } + + if (portalId < 0) + { + portalId = PortalSettings.Current.PortalId; + } + + if (!string.IsNullOrEmpty(this.ModuleLst.SelectedValue)) + { + var moduleId = int.Parse(this.ModuleLst.SelectedValue); + if (moduleId >= 0) + { + return DesktopModuleController.GetDesktopModule(moduleId, portalId); + } + } + } + + return null; + } + } + + /// + /// Gets return the for the selected portal (from the Site list), unless + /// the site list is not visible or there are no other sites in our site group, in which case + /// it returns the PortalSettings for the current portal. + /// + private PortalSettings SelectedPortalSettings + { + get + { + var portalSettings = PortalSettings.Current; + + try + { + if (this.SiteListPanel.Visible && this.SiteList.SelectedItem != null) + { + if (!string.IsNullOrEmpty(this.SiteList.SelectedItem.Value)) + { + var selectedPortalId = int.Parse(this.SiteList.SelectedItem.Value); + if (this.PortalSettings.PortalId != selectedPortalId) + { + portalSettings = new PortalSettings(int.Parse(this.SiteList.SelectedItem.Value)); + } + } + } + } + catch (Exception) + { + portalSettings = PortalSettings.Current; + } + + return portalSettings; + } + } + + private string LocalResourceFile + { + get + { + return string.Format("{0}/{1}/{2}.ascx.resx", this.TemplateSourceDirectory, Localization.LocalResourceDirectory, this.GetType().BaseType.Name); + } + } + + public bool CanAddModuleToPage() + { + if (HttpContext.Current == null) + { + return false; + } + + // If we are not in an edit page + return string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["mid"]) && string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["ctl"]); + } + + protected void AddNewOrExisting_OnClick(object sender, EventArgs e) + { + this.LoadAllLists(); + } + + protected void PaneLstSelectedIndexChanged(object sender, EventArgs e) + { + this.LoadPositionList(); + this.LoadPaneModulesList(); + } + + protected void PageLstSelectedIndexChanged(object sender, EventArgs e) + { + this.LoadModuleList(); + } + + protected void PositionLstSelectedIndexChanged(object sender, EventArgs e) + { + this.PaneModulesLst.Enabled = this.PositionLst.SelectedValue == "ABOVE" || this.PositionLst.SelectedValue == "BELOW"; + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + + // Is there more than one site in this group? + var multipleSites = this.GetCurrentPortalsGroup().Count() > 1; + ClientAPI.RegisterClientVariable(this.Page, "moduleSharing", multipleSites.ToString().ToLowerInvariant(), true); + + ServicesFramework.Instance.RequestAjaxAntiForgerySupport(); + + this.cmdAddModule.Click += this.CmdAddModuleClick; + this.AddNewModule.CheckedChanged += this.AddNewOrExisting_OnClick; + this.AddExistingModule.CheckedChanged += this.AddNewOrExisting_OnClick; + this.SiteList.SelectedIndexChanged += this.SiteList_SelectedIndexChanged; + this.CategoryList.SelectedIndexChanged += this.CategoryListSelectedIndexChanged; + this.PageLst.SelectedIndexChanged += this.PageLstSelectedIndexChanged; + this.PaneLst.SelectedIndexChanged += this.PaneLstSelectedIndexChanged; + this.PositionLst.SelectedIndexChanged += this.PositionLstSelectedIndexChanged; + + try + { + if (this.Visible) + { + this.cmdAddModule.Enabled = this.Enabled; + this.AddExistingModule.Enabled = this.Enabled; + this.AddNewModule.Enabled = this.Enabled; + this.Title.Enabled = this.Enabled; + this.PageLst.Enabled = this.Enabled; + this.ModuleLst.Enabled = this.Enabled; + this.VisibilityLst.Enabled = this.Enabled; + this.PaneLst.Enabled = this.Enabled; + this.PositionLst.Enabled = this.Enabled; + this.PaneModulesLst.Enabled = this.Enabled; + + UserInfo objUser = UserController.Instance.GetCurrentUserInfo(); + if (objUser != null) + { + if (objUser.IsSuperUser) + { + var objModule = ModuleController.Instance.GetModuleByDefinition(-1, "Extensions"); + if (objModule != null) + { + var strURL = this._navigationManager.NavigateURL(objModule.TabID, true); + this.hlMoreExtensions.NavigateUrl = strURL + "#moreExtensions"; + } + else + { + this.hlMoreExtensions.Enabled = false; + } + + this.hlMoreExtensions.Text = this.GetString("hlMoreExtensions"); + this.hlMoreExtensions.Visible = true; + } + } + } + + if (!this.IsPostBack && this.Visible && this.Enabled) + { + this.AddNewModule.Checked = true; + this.LoadAllLists(); + } + } + catch (Exception exc) + { + Exceptions.ProcessModuleLoadException(this, exc); + } + } + + protected void CmdAddModuleClick(object sender, EventArgs e) + { + if (TabPermissionController.CanAddContentToPage() && this.CanAddModuleToPage()) + { + int permissionType; + try + { + permissionType = int.Parse(this.VisibilityLst.SelectedValue); + } + catch (Exception exc) + { + Logger.Error(exc); + + permissionType = 0; + } + + int position = -1; + switch (this.PositionLst.SelectedValue) + { + case "TOP": + position = 0; + break; + case "ABOVE": + if (!string.IsNullOrEmpty(this.PaneModulesLst.SelectedValue)) + { + try + { + position = int.Parse(this.PaneModulesLst.SelectedValue) - 1; + } + catch (Exception exc) + { + Logger.Error(exc); + + position = -1; + } + } + else + { + position = 0; + } + + break; + case "BELOW": + if (!string.IsNullOrEmpty(this.PaneModulesLst.SelectedValue)) + { + try + { + position = int.Parse(this.PaneModulesLst.SelectedValue) + 1; + } + catch (Exception exc) + { + Logger.Error(exc); + + position = -1; + } + } + else + { + position = -1; + } + + break; + case "BOTTOM": + position = -1; + break; + } + + int moduleLstID; + try + { + moduleLstID = int.Parse(this.ModuleLst.SelectedValue); + } + catch (Exception exc) + { + Logger.Error(exc); + + moduleLstID = -1; + } + + if (moduleLstID > -1) + { + if (this.AddExistingModule.Checked) + { + int pageID; + try + { + pageID = int.Parse(this.PageLst.SelectedValue); + } + catch (Exception exc) + { + Logger.Error(exc); + + pageID = -1; + } + + if (pageID > -1) + { + this.DoAddExistingModule(moduleLstID, pageID, this.PaneLst.SelectedValue, position, string.Empty, this.chkCopyModule.Checked); + } + } + else + { + DoAddNewModule(this.Title.Text, moduleLstID, this.PaneLst.SelectedValue, position, permissionType, string.Empty); + } + } + + // set view mode to edit after add module. + if (this.PortalSettings.UserMode != PortalSettings.Mode.Edit) + { + Personalization.SetProfile("Usability", "UserMode" + this.PortalSettings.PortalId, "EDIT"); + } + + this.Response.Redirect(this.Request.RawUrl, true); + } + } + + protected string GetString(string key) + { + return Localization.GetString(key, this.LocalResourceFile); + } + + private static ModulePermissionInfo AddModulePermission(ModuleInfo objModule, PermissionInfo permission, int roleId, int userId, bool allowAccess) + { + var objModulePermission = new ModulePermissionInfo + { + ModuleID = objModule.ModuleID, + PermissionID = permission.PermissionID, + RoleID = roleId, + UserID = userId, + PermissionKey = permission.PermissionKey, + AllowAccess = allowAccess, + }; + + // add the permission to the collection + if (!objModule.ModulePermissions.Contains(objModulePermission)) + { + objModule.ModulePermissions.Add(objModulePermission); + } + + return objModulePermission; + } + + private static void SetCloneModuleContext(bool cloneModuleContext) + { + Thread.SetData( + Thread.GetNamedDataSlot("CloneModuleContext"), + cloneModuleContext ? bool.TrueString : bool.FalseString); + } + + private static void DoAddNewModule(string title, int desktopModuleId, string paneName, int position, int permissionType, string align) + { + try + { + DesktopModuleInfo desktopModule; + if (!DesktopModuleController.GetDesktopModules(PortalSettings.Current.PortalId).TryGetValue(desktopModuleId, out desktopModule)) + { + throw new ArgumentException("desktopModuleId"); + } + } + catch (Exception ex) + { + Exceptions.LogException(ex); + } + + foreach (ModuleDefinitionInfo objModuleDefinition in + ModuleDefinitionController.GetModuleDefinitionsByDesktopModuleID(desktopModuleId).Values) + { + var objModule = new ModuleInfo(); + objModule.Initialize(PortalSettings.Current.ActiveTab.PortalID); + + objModule.PortalID = PortalSettings.Current.ActiveTab.PortalID; + objModule.TabID = PortalSettings.Current.ActiveTab.TabID; + objModule.ModuleOrder = position; + objModule.ModuleTitle = string.IsNullOrEmpty(title) ? objModuleDefinition.FriendlyName : title; + objModule.PaneName = paneName; + objModule.ModuleDefID = objModuleDefinition.ModuleDefID; + if (objModuleDefinition.DefaultCacheTime > 0) + { + objModule.CacheTime = objModuleDefinition.DefaultCacheTime; + if (PortalSettings.Current.DefaultModuleId > Null.NullInteger && PortalSettings.Current.DefaultTabId > Null.NullInteger) + { + ModuleInfo defaultModule = ModuleController.Instance.GetModule(PortalSettings.Current.DefaultModuleId, PortalSettings.Current.DefaultTabId, true); + if (defaultModule != null) + { + objModule.CacheTime = defaultModule.CacheTime; + } + } + } + + ModuleController.Instance.InitialModulePermission(objModule, objModule.TabID, permissionType); + + if (PortalSettings.Current.ContentLocalizationEnabled) + { + Locale defaultLocale = LocaleController.Instance.GetDefaultLocale(PortalSettings.Current.PortalId); + + // check whether original tab is exists, if true then set culture code to default language, + // otherwise set culture code to current. + if (TabController.Instance.GetTabByCulture(objModule.TabID, PortalSettings.Current.PortalId, defaultLocale) != null) + { + objModule.CultureCode = defaultLocale.Code; + } + else + { + objModule.CultureCode = PortalSettings.Current.CultureCode; + } + } + else + { + objModule.CultureCode = Null.NullString; + } + + objModule.AllTabs = false; + objModule.Alignment = align; + + ModuleController.Instance.AddModule(objModule); + } + } + + private static bool GetIsPortable(string moduleID, string tabID) + { + bool isPortable = false; + int parsedModuleID; + int parsedTabID; + + bool validModuleID = int.TryParse(moduleID, out parsedModuleID); + bool validTabID = int.TryParse(tabID, out parsedTabID); + + if (validModuleID && validTabID) + { + ModuleInfo moduleInfo = ModuleController.Instance.GetModule(parsedModuleID, parsedTabID, false); + if (moduleInfo != null) + { + DesktopModuleInfo moduleDesktopInfo = moduleInfo.DesktopModule; + if (moduleDesktopInfo != null) + { + isPortable = moduleDesktopInfo.IsPortable; + } + } + } + + return isPortable; + } + + private void CmdConfirmAddModuleClick(object sender, EventArgs e) + { + this.CmdAddModuleClick(sender, e); + } + + private void SiteList_SelectedIndexChanged(object sender, EventArgs e) + { + this.LoadModuleList(); + this.LoadPageList(); + } + + private void CategoryListSelectedIndexChanged(object sender, EventArgs e) + { + this.LoadModuleList(); + } + + private void DoAddExistingModule(int moduleId, int tabId, string paneName, int position, string align, bool cloneModule) + { + ModuleInfo moduleInfo = ModuleController.Instance.GetModule(moduleId, tabId, false); + + int userID = -1; + if (this.Request.IsAuthenticated) + { + UserInfo user = UserController.Instance.GetCurrentUserInfo(); + if (user != null) + { + userID = user.UserID; + } + } + + if (moduleInfo != null) + { + // Is this from a site other than our own? (i.e., is the user requesting "module sharing"?) + var remote = moduleInfo.PortalID != PortalSettings.Current.PortalId; + if (remote) + { + switch (moduleInfo.DesktopModule.Shareable) + { + case ModuleSharing.Unsupported: + // Should never happen since the module should not be listed in the first place. + throw new ApplicationException(string.Format( + "Module '{0}' does not support Shareable and should not be listed in Add Existing Module from a different source site", + moduleInfo.DesktopModule.FriendlyName)); + case ModuleSharing.Supported: + break; + default: + case ModuleSharing.Unknown: + break; + } + } + + // clone the module object ( to avoid creating an object reference to the data cache ) + ModuleInfo newModule = moduleInfo.Clone(); + + newModule.UniqueId = Guid.NewGuid(); // Cloned Module requires a different uniqueID + newModule.TabModuleID = Null.NullInteger; + newModule.TabID = PortalSettings.Current.ActiveTab.TabID; + newModule.ModuleOrder = position; + newModule.PaneName = paneName; + newModule.Alignment = align; + + if (cloneModule) + { + newModule.ModuleID = Null.NullInteger; + + // copy module settings and tab module settings + newModule.ModuleSettings.Clear(); + foreach (var key in moduleInfo.ModuleSettings.Keys) + { + newModule.ModuleSettings.Add(key, moduleInfo.ModuleSettings[key]); + } + + newModule.TabModuleSettings.Clear(); + foreach (var key in moduleInfo.TabModuleSettings.Keys) + { + newModule.TabModuleSettings.Add(key, moduleInfo.TabModuleSettings[key]); + } + + // reset the module id + newModule.ModuleID = ModuleController.Instance.AddModule(newModule); + + if (!string.IsNullOrEmpty(newModule.DesktopModule.BusinessControllerClass)) + { + object objObject = Reflection.CreateObject(newModule.DesktopModule.BusinessControllerClass, newModule.DesktopModule.BusinessControllerClass); + if (objObject is IPortable) + { + try + { + SetCloneModuleContext(true); + string content = Convert.ToString(((IPortable)objObject).ExportModule(moduleId)); + if (!string.IsNullOrEmpty(content)) + { + ((IPortable)objObject).ImportModule(newModule.ModuleID, content, newModule.DesktopModule.Version, userID); + } + } + finally + { + SetCloneModuleContext(false); + } + } + } + } + else + { + // copy tab module settings + newModule.TabModuleSettings.Clear(); + foreach (var key in moduleInfo.TabModuleSettings.Keys) + { + newModule.TabModuleSettings.Add(key, moduleInfo.TabModuleSettings[key]); + } + + ModuleController.Instance.AddModule(newModule); + } + + if (remote) + { + // Ensure the Portal Admin has View rights + var permissionController = new PermissionController(); + ArrayList arrSystemModuleViewPermissions = permissionController.GetPermissionByCodeAndKey("SYSTEM_MODULE_DEFINITION", "VIEW"); + AddModulePermission( + newModule, + (PermissionInfo)arrSystemModuleViewPermissions[0], + PortalSettings.Current.AdministratorRoleId, + Null.NullInteger, + true); + + // Set PortalID correctly + newModule.OwnerPortalID = newModule.PortalID; + newModule.PortalID = PortalSettings.Current.PortalId; + ModulePermissionController.SaveModulePermissions(newModule); + } + + // Add Event Log + EventLogController.Instance.AddLog(newModule, PortalSettings.Current, userID, string.Empty, EventLogController.EventLogType.MODULE_CREATED); + } + } + + private IEnumerable GetCurrentPortalsGroup() + { + var groups = PortalGroupController.Instance.GetPortalGroups().ToArray(); + + var result = (from @group in groups + select PortalGroupController.Instance.GetPortalsByGroup(@group.PortalGroupId) + into portals + where portals.Any(x => x.PortalID == PortalSettings.Current.PortalId) + select portals.ToArray()).FirstOrDefault(); + + // Are we in a group of one? + if (result == null || result.Length == 0) + { + result = new[] { PortalController.Instance.GetPortal(PortalSettings.Current.PortalId) }; + } + + return result; + } + + private void LoadAllLists() + { + this.LoadSiteList(); + this.LoadCategoryList(); + this.LoadPageList(); + this.LoadModuleList(); + this.LoadVisibilityList(); + this.LoadPaneList(); + this.LoadPositionList(); + this.LoadPaneModulesList(); + } + + private void LoadCategoryList() + { + this.CategoryListPanel.Visible = !this.AddExistingModule.Checked; + + ITermController termController = Util.GetTermController(); + this.CategoryList.DataSource = termController.GetTermsByVocabulary("Module_Categories").OrderBy(t => t.Weight).Where(t => t.Name != "< None >").ToList(); + this.CategoryList.DataBind(); + + // CategoryList.Items.Add(new ListItem(Localization.GetString("AllCategories", LocalResourceFile), "All")); + this.CategoryList.AddItem(Localization.GetString("AllCategories", this.LocalResourceFile), "All"); + if (!this.IsPostBack) + { + this.CategoryList.Select("Common", false); + } + } + + private void LoadModuleList() + { + if (this.AddExistingModule.Checked) + { + // Get list of modules for the selected tab + if (!string.IsNullOrEmpty(this.PageLst.SelectedValue)) + { + var tabId = int.Parse(this.PageLst.SelectedValue); + if (tabId >= 0) + { + this.ModuleLst.BindTabModulesByTabID(tabId); + } + + if (this.ModuleLst.ItemCount > 0) + { + this.chkCopyModule.Visible = true; + this.SetCopyModuleMessage(GetIsPortable(this.ModuleLst.SelectedValue, this.PageLst.SelectedValue)); + } + } + } + else + { + this.ModuleLst.Filter = this.CategoryList.SelectedValue == "All" + ? (kvp => true) + : (Func, bool>)(kvp => kvp.Value.DesktopModule.Category == this.CategoryList.SelectedValue); + this.ModuleLst.BindAllPortalDesktopModules(); + } + + this.ModuleLst.Enabled = this.ModuleLst.ItemCount > 0; + } + + private void LoadPageList() + { + this.PageListPanel.Visible = this.AddExistingModule.Checked; + this.TitlePanel.Enabled = !this.AddExistingModule.Checked; + this.chkCopyModule.Visible = this.AddExistingModule.Checked; + + if (this.AddExistingModule.Checked) + { + this.chkCopyModule.Text = Localization.GetString("CopyModuleDefault.Text", this.LocalResourceFile); + } + + var portalSettings = this.SelectedPortalSettings; + + this.PageLst.Items.Clear(); + + if (this.PageListPanel.Visible) + { + this.PageLst.DataValueField = "TabID"; + this.PageLst.DataTextField = "IndentedTabName"; + if (this.PortalSettings.PortalId == this.SelectedPortalSettings.PortalId) + { + this.PageLst.DataSource = TabController.GetPortalTabs(portalSettings.PortalId, portalSettings.ActiveTab.TabID, true, string.Empty, true, false, false, false, true); + } + else + { + this.PageLst.DataSource = TabController.GetPortalTabs(portalSettings.PortalId, Null.NullInteger, true, string.Empty, true, false, false, false, true); + } + + this.PageLst.DataBind(); + } + } + + private void LoadPaneList() + { + this.PaneLst.Items.Clear(); + this.PaneLst.DataSource = PortalSettings.Current.ActiveTab.Panes; + this.PaneLst.DataBind(); + if (PortalSettings.Current.ActiveTab.Panes.Contains(Globals.glbDefaultPane)) + { + this.PaneLst.SelectedValue = Globals.glbDefaultPane; + } + } + + private void LoadPaneModulesList() + { + var items = new Dictionary { { string.Empty, string.Empty } }; + + foreach (ModuleInfo m in PortalSettings.Current.ActiveTab.Modules) + { + // if user is allowed to view module and module is not deleted + if (ModulePermissionController.CanViewModule(m) && !m.IsDeleted) + { + // modules which are displayed on all tabs should not be displayed on the Admin or Super tabs + if (!m.AllTabs || !PortalSettings.Current.ActiveTab.IsSuperTab) + { + if (m.PaneName == this.PaneLst.SelectedValue) + { + int moduleOrder = m.ModuleOrder; + + while (items.ContainsKey(moduleOrder.ToString()) || moduleOrder == 0) + { + moduleOrder++; + } + + items.Add(moduleOrder.ToString(), m.ModuleTitle); + } + } + } + } + + this.PaneModulesLst.Enabled = true; + this.PaneModulesLst.Items.Clear(); + this.PaneModulesLst.DataValueField = "key"; + this.PaneModulesLst.DataTextField = "value"; + this.PaneModulesLst.DataSource = items; + this.PaneModulesLst.DataBind(); + + if (this.PaneModulesLst.Items.Count <= 1) + { + var listItem = this.PositionLst.Items.FindByValue("ABOVE"); + if (listItem != null) + { + this.PositionLst.Items.Remove(listItem); + } + + listItem = this.PositionLst.Items.FindByValue("BELOW"); + if (listItem != null) + { + this.PositionLst.Items.Remove(listItem); + } + + this.PaneModulesLst.Enabled = false; + } + + if (this.PositionLst.SelectedValue == "TOP" || this.PositionLst.SelectedValue == "BOTTOM") + { + this.PaneModulesLst.Enabled = false; + } + } + + private void LoadPositionList() + { + var items = new Dictionary + { + { "TOP", this.GetString("Top") }, + { "ABOVE", this.GetString("Above") }, + { "BELOW", this.GetString("Below") }, + { "BOTTOM", this.GetString("Bottom") }, + }; + + this.PositionLst.Items.Clear(); + this.PositionLst.DataValueField = "key"; + this.PositionLst.DataTextField = "value"; + this.PositionLst.DataSource = items; + this.PositionLst.DataBind(); + this.PositionLst.SelectedValue = "BOTTOM"; + } + + private void LoadSiteList() + { + // Is there more than one site in this group? + var multipleSites = this.GetCurrentPortalsGroup().Count() > 1; + + this.SiteListPanel.Visible = multipleSites && this.AddExistingModule.Checked; + + if (this.SiteListPanel.Visible) + { + // Get a list of portals in this SiteGroup. + var portals = PortalController.Instance.GetPortals().Cast().ToArray(); + + this.SiteList.DataSource = portals.Select( + x => new { Value = x.PortalID, Name = x.PortalName, GroupID = x.PortalGroupID }).ToList(); + this.SiteList.DataTextField = "Name"; + this.SiteList.DataValueField = "Value"; + this.SiteList.DataBind(); + } + } + + private void LoadVisibilityList() + { + this.VisibilityLst.Enabled = !this.AddExistingModule.Checked; + if (this.VisibilityLst.Enabled) + { + var items = new Dictionary { { "0", this.GetString("PermissionView") }, { "1", this.GetString("PermissionEdit") } }; + + this.VisibilityLst.Items.Clear(); + this.VisibilityLst.DataValueField = "key"; + this.VisibilityLst.DataTextField = "value"; + this.VisibilityLst.DataSource = items; + this.VisibilityLst.DataBind(); + } + } + + private void SetCopyModuleMessage(bool isPortable) + { + if (isPortable) + { + this.chkCopyModule.Text = Localization.GetString("CopyModuleWcontent", this.LocalResourceFile); + this.chkCopyModule.ToolTip = Localization.GetString("CopyModuleWcontent.ToolTip", this.LocalResourceFile); + } + else + { + this.chkCopyModule.Text = Localization.GetString("CopyModuleWOcontent", this.LocalResourceFile); + this.chkCopyModule.ToolTip = Localization.GetString("CopyModuleWOcontent.ToolTip", this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/AddModule.ascx.designer.cs b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/AddModule.ascx.designer.cs index 853033ba767..10fdc722053 100644 --- a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/AddModule.ascx.designer.cs +++ b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/AddModule.ascx.designer.cs @@ -1,289 +1,289 @@ -// -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the MIT License. See LICENSE file in the project root for full license information. -// -//------------------------------------------------------------------------------ -// -// 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 DotNetNuke.UI.ControlPanel { - - - public partial class AddModule { - - /// - /// UpdateAddModule control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.UpdatePanel UpdateAddModule; - - /// - /// AddNewModule control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RadioButton AddNewModule; - - /// - /// AddExistingModule control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RadioButton AddExistingModule; - - /// - /// hlMoreExtensions control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.HyperLink hlMoreExtensions; - - /// - /// Label1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label Label1; - - /// - /// SiteListPanel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel SiteListPanel; - - /// - /// SiteLbl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label SiteLbl; - - /// - /// SiteList control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox SiteList; - - /// - /// CategoryListPanel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel CategoryListPanel; - - /// - /// CategoryListLbl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label CategoryListLbl; - - /// - /// CategoryList control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox CategoryList; - - /// - /// PageListPanel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel PageListPanel; - - /// - /// PageListLbl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label PageListLbl; - - /// - /// PageLst control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox PageLst; - - /// - /// ModuleLstLbl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label ModuleLstLbl; - - /// - /// ModuleLst control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnModuleComboBox ModuleLst; - - /// - /// TitlePanel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel TitlePanel; - - /// - /// TitleLbl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label TitleLbl; - - /// - /// Title control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox Title; - - /// - /// VisibilityLstLbl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label VisibilityLstLbl; - - /// - /// VisibilityLst control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox VisibilityLst; - - /// - /// Label2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label Label2; - - /// - /// PaneLstLbl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label PaneLstLbl; - - /// - /// PaneLst control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox PaneLst; - - /// - /// PositionLstLbl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label PositionLstLbl; - - /// - /// PositionLst control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox PositionLst; - - /// - /// PaneModulesLstLbl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label PaneModulesLstLbl; - - /// - /// PaneModulesLst control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox PaneModulesLst; - - /// - /// chkCopyModule control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox chkCopyModule; - - /// - /// cmdAddModule control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.LinkButton cmdAddModule; - } -} +// +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the MIT License. See LICENSE file in the project root for full license information. +// +//------------------------------------------------------------------------------ +// +// 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 DotNetNuke.UI.ControlPanel { + + + public partial class AddModule { + + /// + /// UpdateAddModule control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.UpdatePanel UpdateAddModule; + + /// + /// AddNewModule control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RadioButton AddNewModule; + + /// + /// AddExistingModule control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RadioButton AddExistingModule; + + /// + /// hlMoreExtensions control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HyperLink hlMoreExtensions; + + /// + /// Label1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// SiteListPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel SiteListPanel; + + /// + /// SiteLbl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label SiteLbl; + + /// + /// SiteList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList SiteList; + + /// + /// CategoryListPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel CategoryListPanel; + + /// + /// CategoryListLbl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label CategoryListLbl; + + /// + /// CategoryList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList CategoryList; + + /// + /// PageListPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel PageListPanel; + + /// + /// PageListLbl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label PageListLbl; + + /// + /// PageLst control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList PageLst; + + /// + /// ModuleLstLbl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label ModuleLstLbl; + + /// + /// ModuleLst control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnModuleComboBox ModuleLst; + + /// + /// TitlePanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel TitlePanel; + + /// + /// TitleLbl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label TitleLbl; + + /// + /// Title control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox Title; + + /// + /// VisibilityLstLbl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label VisibilityLstLbl; + + /// + /// VisibilityLst control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList VisibilityLst; + + /// + /// Label2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// PaneLstLbl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label PaneLstLbl; + + /// + /// PaneLst control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList PaneLst; + + /// + /// PositionLstLbl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label PositionLstLbl; + + /// + /// PositionLst control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList PositionLst; + + /// + /// PaneModulesLstLbl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label PaneModulesLstLbl; + + /// + /// PaneModulesLst control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList PaneModulesLst; + + /// + /// chkCopyModule control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkCopyModule; + + /// + /// cmdAddModule control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton cmdAddModule; + } +} diff --git a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/AddPage.ascx.cs b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/AddPage.ascx.cs index 70fce6625c3..f14ca575580 100644 --- a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/AddPage.ascx.cs +++ b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/AddPage.ascx.cs @@ -1,235 +1,232 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.UI.ControlPanel -{ - using System; - using System.Collections; - using System.IO; - using System.Web.UI; - using System.Web.UI.WebControls; - - using DotNetNuke.Abstractions; - using DotNetNuke.Common; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Entities.Tabs; - using DotNetNuke.Entities.Users; - using DotNetNuke.Security; - using DotNetNuke.Security.Permissions; - using DotNetNuke.Services.Exceptions; - using DotNetNuke.Services.Localization; - using DotNetNuke.Web.UI; +namespace DotNetNuke.UI.ControlPanel +{ + using System; + using System.Collections; + using System.IO; + using System.Web.UI; + using System.Web.UI.WebControls; + + using DotNetNuke.Abstractions; + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Tabs; + using DotNetNuke.Entities.Users; + using DotNetNuke.Security; + using DotNetNuke.Security.Permissions; + using DotNetNuke.Services.Exceptions; + using DotNetNuke.Services.Localization; + using DotNetNuke.Web.UI; using DotNetNuke.Web.UI.WebControls; - using Microsoft.Extensions.DependencyInjection; - - public partial class AddPage : UserControl, IDnnRibbonBarTool - { - private readonly INavigationManager _navigationManager; - - private TabInfo _newTabObject; - - public AddPage() - { - this._navigationManager = Globals.DependencyProvider.GetRequiredService(); - } - - public override bool Visible - { - get - { - return base.Visible && TabPermissionController.CanAddPage(); - } - - set - { - base.Visible = value; - } - } - - public string ToolName - { - get - { - return "QuickAddPage"; - } - - set - { - throw new NotSupportedException("Set ToolName not supported"); - } - } - - protected TabInfo NewTabObject - { - get - { - if (this._newTabObject == null) - { - this._newTabObject = RibbonBarManager.InitTabInfoObject(PortalSettings.ActiveTab); - } - - return this._newTabObject; - } - } - - private static PortalSettings PortalSettings - { - get - { - return PortalSettings.Current; - } - } - - private string LocalResourceFile - { - get - { - return string.Format("{0}/{1}/{2}.ascx.resx", this.TemplateSourceDirectory, Localization.LocalResourceDirectory, this.GetType().BaseType.Name); - } - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - this.cmdAddPage.Click += this.CmdAddPageClick; - - try - { - if (PortalSettings.Pages < PortalSettings.PageQuota || UserController.Instance.GetCurrentUserInfo().IsSuperUser || PortalSettings.PageQuota == 0) - { - this.cmdAddPage.Enabled = true; - } - else - { - this.cmdAddPage.Enabled = false; - this.cmdAddPage.ToolTip = Localization.GetString("ExceededQuota", this.LocalResourceFile); - } - - if (!this.IsPostBack) - { - if (this.Visible) - { - this.LoadAllLists(); - } - } - } - catch (Exception exc) - { - Exceptions.ProcessModuleLoadException(this, exc); - } - } - - protected void CmdAddPageClick(object sender, EventArgs e) - { - int selectedTabID = int.Parse(this.PageLst.SelectedValue); - TabInfo selectedTab = TabController.Instance.GetTab(selectedTabID, PortalSettings.ActiveTab.PortalID, false); - var tabLocation = (TabRelativeLocation)Enum.Parse(typeof(TabRelativeLocation), this.LocationLst.SelectedValue); - TabInfo newTab = RibbonBarManager.InitTabInfoObject(selectedTab, tabLocation); - - newTab.TabName = this.Name.Text; - newTab.IsVisible = this.IncludeInMenu.Checked; - - string errMsg = string.Empty; - try - { - RibbonBarManager.SaveTabInfoObject(newTab, selectedTab, tabLocation, this.TemplateLst.SelectedValue); - } - catch (DotNetNukeException ex) - { - Exceptions.LogException(ex); - errMsg = (ex.ErrorCode != DotNetNukeErrorCode.NotSet) ? this.GetString("Err." + ex.ErrorCode) : ex.Message; - } - catch (Exception ex) - { - Exceptions.LogException(ex); - errMsg = ex.Message; - } - - // Clear the Tab's Cached modules - DataCache.ClearModuleCache(PortalSettings.ActiveTab.TabID); - - // Update Cached Tabs as TabPath may be needed before cache is cleared - TabInfo tempTab; - if (TabController.Instance.GetTabsByPortal(PortalSettings.ActiveTab.PortalID).TryGetValue(newTab.TabID, out tempTab)) - { - tempTab.TabPath = newTab.TabPath; - } - - if (string.IsNullOrEmpty(errMsg)) - { - this.Response.Redirect(this._navigationManager.NavigateURL(newTab.TabID)); - } - else - { - errMsg = string.Format("

{0}

{1}

", this.GetString("Err.Header"), errMsg); - Web.UI.Utilities.RegisterAlertOnPageLoad(this, new MessageWindowParameters(errMsg) { Title = this.GetString("Err.Title") }); - } - } - - private void LoadAllLists() - { - this.LoadLocationList(); - this.LoadTemplateList(); - this.LoadPageList(); - } - - private void LoadTemplateList() - { - this.TemplateLst.ClearSelection(); - this.TemplateLst.Items.Clear(); - - // Get Templates Folder - ArrayList templateFiles = Globals.GetFileList(PortalSettings.PortalId, "page.template", false, "Templates/"); - foreach (FileItem dnnFile in templateFiles) - { - var item = new DnnComboBoxItem(dnnFile.Text.Replace(".page.template", string.Empty), dnnFile.Value); - this.TemplateLst.Items.Add(item); - if (item.Text == "Default") - { - item.Selected = true; - } - } - - this.TemplateLst.InsertItem(0, this.GetString("NoTemplate"), string.Empty); - } - - private void LoadLocationList() - { - this.LocationLst.ClearSelection(); - this.LocationLst.Items.Clear(); - - // LocationLst.Items.Add(new ListItem(GetString("Before"), "BEFORE")); - // LocationLst.Items.Add(new ListItem(GetString("After"), "AFTER")); - // LocationLst.Items.Add(new ListItem(GetString("Child"), "CHILD")); - this.LocationLst.AddItem(this.GetString("Before"), "BEFORE"); - this.LocationLst.AddItem(this.GetString("After"), "AFTER"); - this.LocationLst.AddItem(this.GetString("Child"), "CHILD"); - - this.LocationLst.SelectedIndex = (!PortalSecurity.IsInRole("Administrators")) ? 2 : 1; - } - - private void LoadPageList() - { - this.PageLst.ClearSelection(); - this.PageLst.Items.Clear(); - - this.PageLst.DataTextField = "IndentedTabName"; - this.PageLst.DataValueField = "TabID"; - this.PageLst.DataSource = RibbonBarManager.GetPagesList(); - this.PageLst.DataBind(); - - var item = this.PageLst.FindItemByValue(PortalSettings.ActiveTab.TabID.ToString()); - if (item != null) - { - item.Selected = true; - } - } - - private string GetString(string key) - { - return Localization.GetString(key, this.LocalResourceFile); - } - } -} + using Microsoft.Extensions.DependencyInjection; + + public partial class AddPage : UserControl, IDnnRibbonBarTool + { + private readonly INavigationManager _navigationManager; + + private TabInfo _newTabObject; + + public AddPage() + { + this._navigationManager = Globals.DependencyProvider.GetRequiredService(); + } + + public override bool Visible + { + get + { + return base.Visible && TabPermissionController.CanAddPage(); + } + + set + { + base.Visible = value; + } + } + + public string ToolName + { + get + { + return "QuickAddPage"; + } + + set + { + throw new NotSupportedException("Set ToolName not supported"); + } + } + + protected TabInfo NewTabObject + { + get + { + if (this._newTabObject == null) + { + this._newTabObject = RibbonBarManager.InitTabInfoObject(PortalSettings.ActiveTab); + } + + return this._newTabObject; + } + } + + private static PortalSettings PortalSettings + { + get + { + return PortalSettings.Current; + } + } + + private string LocalResourceFile + { + get + { + return string.Format("{0}/{1}/{2}.ascx.resx", this.TemplateSourceDirectory, Localization.LocalResourceDirectory, this.GetType().BaseType.Name); + } + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + + this.cmdAddPage.Click += this.CmdAddPageClick; + + try + { + if (PortalSettings.Pages < PortalSettings.PageQuota || UserController.Instance.GetCurrentUserInfo().IsSuperUser || PortalSettings.PageQuota == 0) + { + this.cmdAddPage.Enabled = true; + } + else + { + this.cmdAddPage.Enabled = false; + this.cmdAddPage.ToolTip = Localization.GetString("ExceededQuota", this.LocalResourceFile); + } + + if (!this.IsPostBack) + { + if (this.Visible) + { + this.LoadAllLists(); + } + } + } + catch (Exception exc) + { + Exceptions.ProcessModuleLoadException(this, exc); + } + } + + protected void CmdAddPageClick(object sender, EventArgs e) + { + int selectedTabID = int.Parse(this.PageLst.SelectedValue); + TabInfo selectedTab = TabController.Instance.GetTab(selectedTabID, PortalSettings.ActiveTab.PortalID, false); + var tabLocation = (TabRelativeLocation)Enum.Parse(typeof(TabRelativeLocation), this.LocationLst.SelectedValue); + TabInfo newTab = RibbonBarManager.InitTabInfoObject(selectedTab, tabLocation); + + newTab.TabName = this.Name.Text; + newTab.IsVisible = this.IncludeInMenu.Checked; + + string errMsg = string.Empty; + try + { + RibbonBarManager.SaveTabInfoObject(newTab, selectedTab, tabLocation, this.TemplateLst.SelectedValue); + } + catch (DotNetNukeException ex) + { + Exceptions.LogException(ex); + errMsg = (ex.ErrorCode != DotNetNukeErrorCode.NotSet) ? this.GetString("Err." + ex.ErrorCode) : ex.Message; + } + catch (Exception ex) + { + Exceptions.LogException(ex); + errMsg = ex.Message; + } + + // Clear the Tab's Cached modules + DataCache.ClearModuleCache(PortalSettings.ActiveTab.TabID); + + // Update Cached Tabs as TabPath may be needed before cache is cleared + TabInfo tempTab; + if (TabController.Instance.GetTabsByPortal(PortalSettings.ActiveTab.PortalID).TryGetValue(newTab.TabID, out tempTab)) + { + tempTab.TabPath = newTab.TabPath; + } + + if (string.IsNullOrEmpty(errMsg)) + { + this.Response.Redirect(this._navigationManager.NavigateURL(newTab.TabID)); + } + else + { + errMsg = string.Format("

{0}

{1}

", this.GetString("Err.Header"), errMsg); + Web.UI.Utilities.RegisterAlertOnPageLoad(this, new MessageWindowParameters(errMsg) { Title = this.GetString("Err.Title") }); + } + } + + private void LoadAllLists() + { + this.LoadLocationList(); + this.LoadTemplateList(); + this.LoadPageList(); + } + + private void LoadTemplateList() + { + this.TemplateLst.ClearSelection(); + this.TemplateLst.Items.Clear(); + + // Get Templates Folder + ArrayList templateFiles = Globals.GetFileList(PortalSettings.PortalId, "page.template", false, "Templates/"); + foreach (FileItem dnnFile in templateFiles) + { + var item = new ListItem(dnnFile.Text.Replace(".page.template", string.Empty), dnnFile.Value); + this.TemplateLst.Items.Add(item); + if (item.Text == "Default") + { + item.Selected = true; + } + } + + this.TemplateLst.Items.Insert(0, new ListItem(this.GetString("NoTemplate"), string.Empty)); + } + + private void LoadLocationList() + { + this.LocationLst.ClearSelection(); + this.LocationLst.Items.Clear(); + + this.LocationLst.Items.Add(new ListItem(this.GetString("Before"), "BEFORE")); + this.LocationLst.Items.Add(new ListItem(this.GetString("After"), "AFTER")); + this.LocationLst.Items.Add(new ListItem(this.GetString("Child"), "CHILD")); + + this.LocationLst.SelectedIndex = (!PortalSecurity.IsInRole("Administrators")) ? 2 : 1; + } + + private void LoadPageList() + { + this.PageLst.ClearSelection(); + this.PageLst.Items.Clear(); + + this.PageLst.DataTextField = "IndentedTabName"; + this.PageLst.DataValueField = "TabID"; + this.PageLst.DataSource = RibbonBarManager.GetPagesList(); + this.PageLst.DataBind(); + + var item = this.PageLst.Items.FindByValue(PortalSettings.ActiveTab.TabID.ToString()); + if (item != null) + { + item.Selected = true; + } + } + + private string GetString(string key) + { + return Localization.GetString(key, this.LocalResourceFile); + } + } +} diff --git a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/AddPage.ascx.designer.cs b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/AddPage.ascx.designer.cs index 0983fbf7e35..f313bf94e2e 100644 --- a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/AddPage.ascx.designer.cs +++ b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/AddPage.ascx.designer.cs @@ -1,82 +1,82 @@ -// -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the MIT License. See LICENSE file in the project root for full license information. -// -//------------------------------------------------------------------------------ -// -// 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 DotNetNuke.UI.ControlPanel { - - - public partial class AddPage { - - /// - /// NameLbl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label NameLbl; - - /// - /// Name control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox Name; - - /// - /// TemplateLst control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox TemplateLst; - - /// - /// LocationLst control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox LocationLst; - - /// - /// PageLst control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox PageLst; - - /// - /// IncludeInMenu control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox IncludeInMenu; - - /// - /// cmdAddPage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.LinkButton cmdAddPage; - } -} +// +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the MIT License. See LICENSE file in the project root for full license information. +// +//------------------------------------------------------------------------------ +// +// 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 DotNetNuke.UI.ControlPanel { + + + public partial class AddPage { + + /// + /// NameLbl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label NameLbl; + + /// + /// Name control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox Name; + + /// + /// TemplateLst control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList TemplateLst; + + /// + /// LocationLst control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList LocationLst; + + /// + /// PageLst control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList PageLst; + + /// + /// IncludeInMenu control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox IncludeInMenu; + + /// + /// cmdAddPage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton cmdAddPage; + } +} diff --git a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/ControlBar.ascx.cs b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/ControlBar.ascx.cs index 46eddbdc013..5104ebafd2d 100644 --- a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/ControlBar.ascx.cs +++ b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/ControlBar.ascx.cs @@ -2,1146 +2,1129 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information // ReSharper disable CheckNamespace -namespace DotNetNuke.UI.ControlPanels - -// ReSharper restore CheckNamespace -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using System.Web; - using System.Web.UI.HtmlControls; - using System.Web.UI.WebControls; +namespace DotNetNuke.UI.ControlPanels + +// ReSharper restore CheckNamespace +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Text; + using System.Web; + using System.Web.UI.HtmlControls; + using System.Web.UI.WebControls; using DotNetNuke.Abstractions; - using DotNetNuke.Application; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Content.Common; - using DotNetNuke.Entities.Content.Taxonomy; - using DotNetNuke.Entities.Host; - using DotNetNuke.Entities.Modules; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Entities.Tabs; - using DotNetNuke.Entities.Users; - using DotNetNuke.Framework; - using DotNetNuke.Framework.JavaScriptLibraries; - using DotNetNuke.Security.Permissions; - using DotNetNuke.Services.ImprovementsProgram; - using DotNetNuke.Services.Localization; - using DotNetNuke.Services.Personalization; - using DotNetNuke.UI.Utilities; - using DotNetNuke.Web.Client; - using DotNetNuke.Web.Client.ClientResourceManagement; - using DotNetNuke.Web.Common; - using DotNetNuke.Web.Components.Controllers; - using DotNetNuke.Web.Components.Controllers.Models; - using DotNetNuke.Web.UI.WebControls; - using Microsoft.Extensions.DependencyInjection; - - using Globals = DotNetNuke.Common.Globals; - - public partial class ControlBar : ControlPanelBase - { - protected DnnFileUpload FileUploader; - - private readonly INavigationManager _navigationManager; - - private readonly IList _adminCommonTabs = new List - { - "Site Settings", - "Security Roles", - "User Accounts", - "File Management", - }; - - private readonly IList _hostCommonTabs = new List - { - "Host Settings", - "Site Management", - "File Management", - "Extensions", - "Dashboard", - "Health Monitoring", - "Technical Support", - "Knowledge Base", - "Software and Documentation", - }; - - private List _adminBookmarkItems; - - private List _hostBookmarkItems; - - private List _adminTabs; - private List _adminBaseTabs; - private List _adminAdvancedTabs; - private List _hostTabs; - private List _hostBaseTabs; - private List _hostAdvancedTabs; - - public ControlBar() - { - this._navigationManager = Globals.DependencyProvider.GetRequiredService(); - } - - public override bool IncludeInControlHierarchy - { - get - { - return base.IncludeInControlHierarchy && (this.IsPageAdmin() || this.IsModuleAdmin()); - } - } - - public override bool IsDockable { get; set; } - - protected string BookmarkModuleCategory - { - get - { - return ControlBarController.Instance.GetBookmarkCategory(this.PortalSettings.PortalId); - } - } - - protected string BookmarkedModuleKeys - { - get - { - var bookmarkModules = Personalization.GetProfile("ControlBar", "module" + this.PortalSettings.PortalId); - if (bookmarkModules == null) - { - return string.Empty; - } - - return bookmarkModules.ToString(); - } - } - - protected List AdminBookmarkItems - { - get - { - if (this._adminBookmarkItems == null) - { - var bookmarkItems = Personalization.GetProfile("ControlBar", "admin" + this.PortalSettings.PortalId); - - this._adminBookmarkItems = bookmarkItems != null - ? bookmarkItems.ToString().Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList() - : new List(); - } - - return this._adminBookmarkItems; - } - } - - protected List HostBookmarkItems - { - get - { - if (this._hostBookmarkItems == null) - { - var bookmarkItems = Personalization.GetProfile("ControlBar", "host" + this.PortalSettings.PortalId); - - this._hostBookmarkItems = bookmarkItems != null - ? bookmarkItems.ToString().Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList() - : new List(); - } - - return this._hostBookmarkItems; - } - } - - protected List AdminBaseTabs - { - get - { - if (this._adminBaseTabs == null) - { - this.GetAdminTabs(); - } - - return this._adminBaseTabs; - } - } - - protected List AdminAdvancedTabs - { - get - { - if (this._adminAdvancedTabs == null) - { - this.GetAdminTabs(); - } - - return this._adminAdvancedTabs; - } - } - - protected List HostBaseTabs - { - get - { - if (this._hostBaseTabs == null) - { - this.GetHostTabs(); - } - - return this._hostBaseTabs; - } - } - - protected List HostAdvancedTabs - { - get - { - if (this._hostAdvancedTabs == null) - { - this.GetHostTabs(); - } - - return this._hostAdvancedTabs; - } - } - - protected bool IsBeaconEnabled - { - get - { - var user = UserController.Instance.GetCurrentUserInfo(); - return BeaconService.Instance.IsBeaconEnabledForControlBar(user); - } - } - - protected string CurrentUICulture { get; set; } - - protected string LoginUrl { get; set; } - - protected string LoadTabModuleMessage { get; set; } - - private new string LocalResourceFile - { - get - { - return string.Format("{0}/{1}/{2}.ascx.resx", this.TemplateSourceDirectory, Localization.LocalResourceDirectory, this.GetType().BaseType?.Name); - } - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - // page will be null if the control panel initial twice, it will be removed in the second time. - if (this.Page != null) - { - this.ID = "ControlBar"; - - this.FileUploader = new DnnFileUpload { ID = "fileUploader", SupportHost = false }; - this.Page.Form.Controls.Add(this.FileUploader); - - this.LoadCustomMenuItems(); - } - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - if (this.PortalSettings.EnablePopUps && Host.EnableModuleOnLineHelp) - { - this.helpLink.Text = string.Format(@"
  • {1}
  • ", UrlUtils.PopUpUrl(Host.HelpURL, this, this.PortalSettings, false, false), this.GetString("Tool.Help.ToolTip")); - } - else if (Host.EnableModuleOnLineHelp) - { - this.helpLink.Text = string.Format(@"
  • {1}
  • ", Host.HelpURL, this.GetString("Tool.Help.ToolTip")); - } - - this.LoginUrl = this.ResolveClientUrl(@"~/Login.aspx"); - - if (this.ControlPanel.Visible && this.IncludeInControlHierarchy) - { - ClientResourceManager.RegisterStyleSheet(this.Page, "~/admin/ControlPanel/ControlBar.css", FileOrder.Css.ResourceCss); - JavaScript.RequestRegistration(CommonJs.DnnPlugins); - ClientResourceManager.RegisterScript(this.Page, "~/resources/shared/scripts/dnn.controlBar.js"); - - // Is there more than one site in this group? - var multipleSites = GetCurrentPortalsGroup().Count() > 1; - ClientAPI.RegisterClientVariable(this.Page, "moduleSharing", multipleSites.ToString().ToLowerInvariant(), true); - } - - ServicesFramework.Instance.RequestAjaxAntiForgerySupport(); - var multipleSite = false; - - this.conrolbar_logo.ImageUrl = ControlBarController.Instance.GetControlBarLogoURL(); - if (!this.IsPostBack) - { - this.LoadCategoryList(); - multipleSite = this.LoadSiteList(); - this.LoadVisibilityList(); - this.AutoSetUserMode(); - this.BindPortalsList(); - this.BindLanguagesList(); - } - - this.LoadTabModuleMessage = multipleSite ? this.GetString("LoadingTabModuleCE.Text") : this.GetString("LoadingTabModule.Text"); - } - - protected bool CheckPageQuota() - { - UserInfo objUser = UserController.Instance.GetCurrentUserInfo(); - return (objUser != null && objUser.IsSuperUser) || this.PortalSettings.PageQuota == 0 || this.PortalSettings.Pages < this.PortalSettings.PageQuota; - } - - protected string GetUpgradeIndicator() - { - UserInfo objUser = UserController.Instance.GetCurrentUserInfo(); - - if (objUser != null && objUser.IsSuperUser) - { - var upgradeIndicator = ControlBarController.Instance.GetUpgradeIndicator( - DotNetNukeContext.Current.Application.Version, - this.Request.IsLocal, this.Request.IsSecureConnection); - if (upgradeIndicator == null) - { - return string.Empty; - } - - return this.GetUpgradeIndicatorButton(upgradeIndicator); - } - - return string.Empty; - } - - protected string PreviewPopup() - { - var previewUrl = string.Format( - "{0}/Default.aspx?ctl={1}&previewTab={2}&TabID={2}", - Globals.AddHTTP(this.PortalSettings.PortalAlias.HTTPAlias), - "MobilePreview", - this.PortalSettings.ActiveTab.TabID); - - if (this.PortalSettings.EnablePopUps) - { - return UrlUtils.PopUpUrl(previewUrl, this, this.PortalSettings, true, false, 660, 800); - } - - return string.Format("location.href = \"{0}\"", previewUrl); - } - - protected IEnumerable LoadPaneList() - { - ArrayList panes = PortalSettings.Current.ActiveTab.Panes; - var resultPanes = new List(); - - if (panes.Count < 4) - { - foreach (var p in panes) - { - var topPane = new[] - { - string.Format(this.GetString("Pane.AddTop.Text"), p), - p.ToString(), - "TOP", - }; - - var botPane = new[] - { - string.Format(this.GetString("Pane.AddBottom.Text"), p), - p.ToString(), - "BOTTOM", - }; - - resultPanes.Add(topPane); - resultPanes.Add(botPane); - } - } - else - { - foreach (var p in panes) - { - var botPane = new[] - { - string.Format(this.GetString("Pane.Add.Text"), p), - p.ToString(), - "BOTTOM", - }; - - resultPanes.Add(botPane); - } - } - - return resultPanes; - } - - protected string GetString(string key) - { - return Localization.GetString(key, this.LocalResourceFile); - } - - protected string BuildToolUrl(string toolName, bool isHostTool, string moduleFriendlyName, - string controlKey, string navigateUrl, bool showAsPopUp) - { - if (isHostTool && !UserController.Instance.GetCurrentUserInfo().IsSuperUser) - { - return "javascript:void(0);"; - } - - if (!string.IsNullOrEmpty(navigateUrl)) - { - return navigateUrl; - } - - string returnValue = "javascript:void(0);"; - switch (toolName) - { - case "PageSettings": - if (TabPermissionController.CanManagePage()) - { - returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Tab", "action=edit&activeTab=settingTab"); - } - - break; - case "CopyPage": - if (TabPermissionController.CanCopyPage()) - { - returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Tab", "action=copy&activeTab=copyTab"); - } - - break; - case "DeletePage": - if (TabPermissionController.CanDeletePage()) - { - returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Tab", "action=delete"); - } - - break; - case "PageTemplate": - if (TabPermissionController.CanManagePage()) - { - returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Tab", "action=edit&activeTab=advancedTab"); - } - - break; - case "PageLocalization": - if (TabPermissionController.CanManagePage()) - { - returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Tab", "action=edit&activeTab=localizationTab"); - } - - break; - case "PagePermission": - if (TabPermissionController.CanAdminPage()) - { - returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Tab", "action=edit&activeTab=permissionsTab"); - } - - break; - case "ImportPage": - if (TabPermissionController.CanImportPage()) - { - returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "ImportTab"); - } - - break; - case "ExportPage": - if (TabPermissionController.CanExportPage()) - { - returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "ExportTab"); - } - - break; - case "NewPage": - if (TabPermissionController.CanAddPage()) - { - returnValue = this._navigationManager.NavigateURL("Tab", "activeTab=settingTab"); - } - - break; - case "PublishPage": - if (TabPermissionController.CanAdminPage()) - { - returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID); - } - - break; - default: - if (!string.IsNullOrEmpty(moduleFriendlyName)) - { - var additionalParams = new List(); - returnValue = this.GetTabURL(additionalParams, toolName, isHostTool, - moduleFriendlyName, controlKey, showAsPopUp); - } - - break; - } - - return returnValue; - } - - protected string GetTabURL(List additionalParams, string toolName, bool isHostTool, - string moduleFriendlyName, string controlKey, bool showAsPopUp) - { - int portalId = isHostTool ? Null.NullInteger : this.PortalSettings.PortalId; - - string strURL = string.Empty; - - if (additionalParams == null) - { - additionalParams = new List(); - } - - var moduleInfo = ModuleController.Instance.GetModuleByDefinition(portalId, moduleFriendlyName); - - if (moduleInfo != null) - { - bool isHostPage = portalId == Null.NullInteger; - if (!string.IsNullOrEmpty(controlKey)) - { - additionalParams.Insert(0, "mid=" + moduleInfo.ModuleID); - if (showAsPopUp && this.PortalSettings.EnablePopUps) - { - additionalParams.Add("popUp=true"); - } - } - - string currentCulture = System.Threading.Thread.CurrentThread.CurrentCulture.Name; - strURL = this._navigationManager.NavigateURL(moduleInfo.TabID, isHostPage, this.PortalSettings, controlKey, currentCulture, additionalParams.ToArray()); - } - - return strURL; - } - - protected string GetTabURL(string tabName, bool isHostTool) - { - return this.GetTabURL(tabName, isHostTool, null); - } - - protected string GetTabURL(string tabName, bool isHostTool, int? parentId) - { - if (isHostTool && !UserController.Instance.GetCurrentUserInfo().IsSuperUser) - { - return "javascript:void(0);"; - } - - int portalId = isHostTool ? Null.NullInteger : this.PortalSettings.PortalId; - return this.GetTabURL(tabName, portalId, parentId); - } - - protected string GetTabURL(string tabName, int portalId, int? parentId) - { - var tab = parentId.HasValue ? TabController.Instance.GetTabByName(tabName, portalId, parentId.Value) : TabController.Instance.GetTabByName(tabName, portalId); - - if (tab != null) - { - return tab.FullUrl; - } - - return string.Empty; - } - - protected string GetTabPublishing() - { - return TabPublishingController.Instance.IsTabPublished(TabController.CurrentPage.TabID, this.PortalSettings.PortalId) ? "true" : "false"; - } - - protected string GetPublishActionText() - { - return TabPublishingController.Instance.IsTabPublished(TabController.CurrentPage.TabID, this.PortalSettings.PortalId) - ? ClientAPI.GetSafeJSString(this.GetString("Tool.UnpublishPage.Text")) - : ClientAPI.GetSafeJSString(this.GetString("Tool.PublishPage.Text")); - } - - protected string GetPublishConfirmText() - { - return TabPublishingController.Instance.IsTabPublished(TabController.CurrentPage.TabID, this.PortalSettings.PortalId) - ? this.GetButtonConfirmMessage("UnpublishPage") - : this.GetButtonConfirmMessage("PublishPage"); - } - - protected string GetPublishConfirmHeader() - { - return TabPublishingController.Instance.IsTabPublished(TabController.CurrentPage.TabID, this.PortalSettings.PortalId) - ? this.GetButtonConfirmHeader("UnpublishPage") - : this.GetButtonConfirmHeader("PublishPage"); - } - - protected string GetMenuItem(string tabName, bool isHostTool) - { - if (isHostTool && !UserController.Instance.GetCurrentUserInfo().IsSuperUser) - { - return string.Empty; - } - - List tabList; - if (isHostTool) - { - if (this._hostTabs == null) - { - this.GetHostTabs(); - } - - tabList = this._hostTabs; - } - else - { - if (this._adminTabs == null) - { - this.GetAdminTabs(); - } - - tabList = this._adminTabs; - } - - var tab = tabList?.SingleOrDefault(t => t.TabName == tabName); - return this.GetMenuItem(tab); - } - - protected string GetMenuItem(string tabName, bool isHostTool, bool isRemoveBookmark, bool isHideBookmark = false) - { - if (isHostTool && !UserController.Instance.GetCurrentUserInfo().IsSuperUser) - { - return string.Empty; - } - - List tabList; - if (isHostTool) - { - if (this._hostTabs == null) - { - this.GetHostTabs(); - } - - tabList = this._hostTabs; - } - else - { - if (this._adminTabs == null) - { - this.GetAdminTabs(); - } - - tabList = this._adminTabs; - } - - var tab = tabList?.SingleOrDefault(t => t.TabName == tabName); - return this.GetMenuItem(tab, isRemoveBookmark, isHideBookmark); - } - - protected string GetMenuItem(TabInfo tab, bool isRemoveBookmark = false, bool isHideBookmark = false) - { - if (tab == null) - { - return string.Empty; - } - - if (tab.IsVisible && !tab.IsDeleted && !tab.DisableLink) - { - string name = !string.IsNullOrEmpty(tab.LocalizedTabName) ? tab.LocalizedTabName : tab.Title; - var linkClass = DotNetNukeContext.Current.Application.Name == "DNNCORP.CE" && tab.FullUrl.Contains("ProfessionalFeatures") ? "class=\"PE\"" : string.Empty; - if (!isRemoveBookmark) - { - if (!isHideBookmark) - { - return string.Format( - "
  • {1}
  • ", - tab.FullUrl, - name, - ClientAPI.GetSafeJSString(this.GetString("Tool.AddToBookmarks.ToolTip")), - ClientAPI.GetSafeJSString(tab.TabName), - linkClass); - } - else - { - return string.Format( - "
  • {1}
  • ", - tab.FullUrl, - name, - ClientAPI.GetSafeJSString(this.GetString("Tool.AddToBookmarks.ToolTip")), - ClientAPI.GetSafeJSString(tab.TabName), - linkClass); - } - } - - return string.Format( - "
  • {1}
  • ", - tab.FullUrl, - name, - ClientAPI.GetSafeJSString(this.GetString("Tool.RemoveFromBookmarks.ToolTip")), - ClientAPI.GetSafeJSString(tab.TabName), - linkClass); - } - - return string.Empty; - } - - protected string GetAdminBaseMenu() - { - var tabs = this.AdminBaseTabs; - var sb = new StringBuilder(); - foreach (var tab in tabs) - { - var hideBookmark = this.AdminBookmarkItems.Contains(tab.TabName); - sb.Append(this.GetMenuItem(tab, false, hideBookmark)); - } - - return sb.ToString(); - } - - protected string GetAdminAdvancedMenu() - { - var tabs = this.AdminAdvancedTabs; - var sb = new StringBuilder(); - foreach (var tab in tabs) - { - var hideBookmark = this.AdminBookmarkItems.Contains(tab.TabName); - sb.Append(this.GetMenuItem(tab, false, hideBookmark)); - } - - return sb.ToString(); - } - - protected string GetHostBaseMenu() - { - var tabs = this.HostBaseTabs; - - var sb = new StringBuilder(); - foreach (var tab in tabs) - { - var hideBookmark = this.HostBookmarkItems.Contains(tab.TabName); - sb.Append(this.GetMenuItem(tab, false, hideBookmark)); - } - - return sb.ToString(); - } - - protected string GetHostAdvancedMenu() - { - var tabs = this.HostAdvancedTabs; - var sb = new StringBuilder(); - foreach (var tab in tabs) - { - var hideBookmark = this.HostBookmarkItems.Contains(tab.TabName); - sb.Append(this.GetMenuItem(tab, false, hideBookmark)); - } - - return sb.ToString(); - } - - protected string GetBookmarkItems(string title) - { - var isHostTool = title == "host"; - var bookmarkItems = isHostTool ? this.HostBookmarkItems : this.AdminBookmarkItems; - - if (bookmarkItems != null && bookmarkItems.Any()) - { - var sb = new StringBuilder(); - foreach (var itemKey in bookmarkItems) - { - sb.Append(this.GetMenuItem(itemKey, isHostTool, true)); - } - - return sb.ToString(); - } - - return string.Empty; - } - - protected string GetButtonConfirmMessage(string toolName) - { - return ClientAPI.GetSafeJSString(Localization.GetString("Tool." + toolName + ".ConfirmText", this.LocalResourceFile)); - } - - protected string GetButtonConfirmHeader(string toolName) - { - return ClientAPI.GetSafeJSString(Localization.GetString("Tool." + toolName + ".ConfirmHeader", this.LocalResourceFile)); - } - - protected IEnumerable LoadPortalsList() - { - var portals = PortalController.Instance.GetPortals(); - - var result = new List(); - foreach (var portal in portals) - { - var pi = portal as PortalInfo; - - if (pi != null) - { - string[] p = - { - pi.PortalName, - pi.PortalID.ToString("D"), - }; - - result.Add(p); - } - } - - return result; - } - - protected IEnumerable LoadLanguagesList() - { - var result = new List(); - - if (this.PortalSettings.AllowUserUICulture) - { - if (this.CurrentUICulture == null) - { - object oCulture = Personalization.GetProfile("Usability", "UICulture"); - - if (oCulture != null) - { - this.CurrentUICulture = oCulture.ToString(); - } - else - { - var l = new Localization(); - this.CurrentUICulture = l.CurrentUICulture; - this.SetLanguage(true, this.CurrentUICulture); - } - } - - IEnumerable cultureListItems = Localization.LoadCultureInListItems(CultureDropDownTypes.NativeName, this.CurrentUICulture, string.Empty, false); - foreach (var cultureItem in cultureListItems) - { - var selected = cultureItem.Value == this.CurrentUICulture ? "true" : "false"; - string[] p = new string[] - { - cultureItem.Text, - cultureItem.Value, - selected, - }; - result.Add(p); - } - } - - return result; - } - - protected bool ShowSwitchLanguagesPanel() - { - if (this.PortalSettings.AllowUserUICulture && this.PortalSettings.ContentLocalizationEnabled) - { - if (this.CurrentUICulture == null) - { - object oCulture = Personalization.GetProfile("Usability", "UICulture"); - - if (oCulture != null) - { - this.CurrentUICulture = oCulture.ToString(); - } - else - { - var l = new Localization(); - this.CurrentUICulture = l.CurrentUICulture; - } - } - - IEnumerable cultureListItems = Localization.LoadCultureInListItems(CultureDropDownTypes.NativeName, this.CurrentUICulture, string.Empty, false); - return cultureListItems.Count() > 1; - } - - return false; - } - - protected string CheckedWhenInLayoutMode() - { - return this.UserMode == PortalSettings.Mode.Layout ? "checked='checked'" : string.Empty; - } - - protected string CheckedWhenStayInEditMode() - { - string checkboxState = string.Empty; - var cookie = this.Request.Cookies["StayInEditMode"]; - if (cookie != null && cookie.Value == "YES") - { - checkboxState = "checked='checked'"; - } - - if (this.UserMode == PortalSettings.Mode.Layout) - { - checkboxState += " disabled='disabled'"; - } - - return checkboxState; - } - - protected string SpecialClassWhenNotInViewMode() - { - return this.UserMode == PortalSettings.Mode.View ? string.Empty : "controlBar_editPageInEditMode"; - } - - protected string GetModeForAttribute() - { - return this.UserMode.ToString().ToUpperInvariant(); - } - - protected string GetEditButtonLabel() - { - return this.UserMode == PortalSettings.Mode.Edit ? this.GetString("Tool.CloseEditMode.Text") : this.GetString("Tool.EditThisPage.Text"); - } - - protected virtual bool ActiveTabHasChildren() - { - var children = TabController.GetTabsByParent(this.PortalSettings.ActiveTab.TabID, this.PortalSettings.ActiveTab.PortalID); - - if ((children == null) || children.Count < 1) - { - return false; - } - - return true; - } - - protected bool IsLanguageModuleInstalled() - { - return DesktopModuleController.GetDesktopModuleByFriendlyName("Languages") != null; - } - - protected string GetBeaconUrl() - { - var beaconService = BeaconService.Instance; - var user = UserController.Instance.GetCurrentUserInfo(); - var path = this.PortalSettings.ActiveTab.TabPath; - return beaconService.GetBeaconUrl(user, path); - } - - private static IEnumerable GetCurrentPortalsGroup() - { - var groups = PortalGroupController.Instance.GetPortalGroups().ToArray(); - - var result = (from @group in groups - select PortalGroupController.Instance.GetPortalsByGroup(@group.PortalGroupId) - into portals - where portals.Any(x => x.PortalID == PortalSettings.Current.PortalId) - select portals.ToArray()).FirstOrDefault(); - - // Are we in a group of one? - if (result == null || result.Length == 0) - { - result = new[] { PortalController.Instance.GetPortal(PortalSettings.Current.PortalId) }; - } - - return result; - } - - private void LoadCustomMenuItems() - { - foreach (var menuItem in ControlBarController.Instance.GetCustomMenuItems()) - { - var liElement = new HtmlGenericControl("li"); - liElement.Attributes.Add("id", menuItem.ID + "_tab"); - - var control = this.Page.LoadControl(menuItem.Source); - control.ID = menuItem.ID; - - liElement.Controls.Add(control); - - this.CustomMenuItems.Controls.Add(liElement); - } - } - - private string GetUpgradeIndicatorButton(UpgradeIndicatorViewModel upgradeIndicator) - { - return string.Format( - "\"{4}\"", - upgradeIndicator.ID, upgradeIndicator.WebAction, upgradeIndicator.CssClass, this.ResolveClientUrl(upgradeIndicator.ImageUrl), upgradeIndicator.AltText, upgradeIndicator.ToolTip); - } - - private void LoadCategoryList() - { - ITermController termController = Util.GetTermController(); - var terms = termController.GetTermsByVocabulary("Module_Categories").OrderBy(t => t.Weight).Where(t => t.Name != "< None >").ToList(); - var allTerm = new Term("All", Localization.GetString("AllCategories", this.LocalResourceFile)); - terms.Add(allTerm); - this.CategoryList.DataSource = terms; - this.CategoryList.DataBind(); - if (!this.IsPostBack) - { - this.CategoryList.Select(!string.IsNullOrEmpty(this.BookmarkedModuleKeys) ? this.BookmarkModuleCategory : "All", false); - } - } - - private bool LoadSiteList() - { - // Is there more than one site in this group? - var multipleSites = GetCurrentPortalsGroup().Count() > 1; - if (multipleSites) - { - this.PageList.Services.GetTreeMethod = "ItemListService/GetPagesInPortalGroup"; - this.PageList.Services.GetNodeDescendantsMethod = "ItemListService/GetPageDescendantsInPortalGroup"; - this.PageList.Services.SearchTreeMethod = "ItemListService/SearchPagesInPortalGroup"; - this.PageList.Services.GetTreeWithNodeMethod = "ItemListService/GetTreePathForPageInPortalGroup"; - this.PageList.Services.SortTreeMethod = "ItemListService/SortPagesInPortalGroup"; - } - - this.PageList.UndefinedItem = new ListItem(DynamicSharedConstants.Unspecified, string.Empty); - this.PageList.OnClientSelectionChanged.Add("dnn.controlBar.ControlBar_Module_PageList_Changed"); - return multipleSites; - } - - private void LoadVisibilityList() - { - var items = new Dictionary { { "0", this.GetString("PermissionView") }, { "1", this.GetString("PermissionEdit") } }; - - this.VisibilityLst.Items.Clear(); - this.VisibilityLst.DataValueField = "key"; - this.VisibilityLst.DataTextField = "value"; - this.VisibilityLst.DataSource = items; - this.VisibilityLst.DataBind(); - } - - private void AutoSetUserMode() - { - int tabId = this.PortalSettings.ActiveTab.TabID; - int portalId = PortalSettings.Current.PortalId; - string pageId = string.Format("{0}:{1}", portalId, tabId); - - HttpCookie cookie = this.Request.Cookies["StayInEditMode"]; - if (cookie != null && cookie.Value == "YES") - { - if (PortalSettings.Current.UserMode != PortalSettings.Mode.Edit) - { - this.SetUserMode("EDIT"); - this.SetLastPageHistory(pageId); - this.Response.Redirect(this.Request.RawUrl, true); - } - - return; - } - - string lastPageId = this.GetLastPageHistory(); - var isShowAsCustomError = this.Request.QueryString.AllKeys.Contains("aspxerrorpath"); - - if (lastPageId != pageId && !isShowAsCustomError) - { - // navigate between pages - if (PortalSettings.Current.UserMode != PortalSettings.Mode.View) - { - this.SetUserMode("VIEW"); - this.SetLastPageHistory(pageId); - this.Response.Redirect(this.Request.RawUrl, true); - } - } - - if (!isShowAsCustomError) - { - this.SetLastPageHistory(pageId); - } - } - - private void SetLastPageHistory(string pageId) - { - this.Response.Cookies.Add(new HttpCookie("LastPageId", pageId) { Path = !string.IsNullOrEmpty(Globals.ApplicationPath) ? Globals.ApplicationPath : "/" }); - } - - private string GetLastPageHistory() - { - var cookie = this.Request.Cookies["LastPageId"]; - if (cookie != null) - { - return cookie.Value; - } - - return "NEW"; - } - - private void SetLanguage(bool update, string currentCulture) - { - if (update) - { - Personalization.SetProfile("Usability", "UICulture", currentCulture); - } - } - - private void BindPortalsList() - { - foreach (var portal in this.LoadPortalsList()) - { - this.controlBar_SwitchSite.Items.Add(new DnnComboBoxItem(portal[0], portal[1])); - } - } - - private void BindLanguagesList() - { - if (this.ShowSwitchLanguagesPanel()) - { - const string FlagImageUrlFormatString = "~/images/Flags/{0}.gif"; - foreach (var lang in this.LoadLanguagesList()) - { - var item = new DnnComboBoxItem(lang[0], lang[1]); - item.ImageUrl = string.Format(FlagImageUrlFormatString, item.Value); - if (lang[2] == "true") - { - item.Selected = true; - } - - this.controlBar_SwitchLanguage.Items.Add(item); - } - } - } - - private void GetHostTabs() - { - var hostTab = TabController.GetTabByTabPath(Null.NullInteger, "//Host", string.Empty); - var hosts = TabController.GetTabsByParent(hostTab, -1); - - var professionalTab = TabController.Instance.GetTabByName("Professional Features", -1); - var professionalTabs = professionalTab != null - ? TabController.GetTabsByParent(professionalTab.TabID, -1) - : new List(); - - this._hostTabs = new List(); - this._hostTabs.AddRange(hosts); - this._hostTabs.AddRange(professionalTabs); - this._hostTabs = this._hostTabs.OrderBy(t => t.LocalizedTabName).ToList(); - - this._hostBaseTabs = new List(); - this._hostAdvancedTabs = new List(); - - foreach (var tabInfo in this._hostTabs) - { - if (this.IsCommonTab(tabInfo, true)) - { - this._hostBaseTabs.Add(tabInfo); - } - else - { - this._hostAdvancedTabs.Add(tabInfo); - } - } - } - - private void GetAdminTabs() - { - var adminTab = TabController.GetTabByTabPath(this.PortalSettings.PortalId, "//Admin", string.Empty); - this._adminTabs = TabController.GetTabsByParent(adminTab, this.PortalSettings.PortalId).OrderBy(t => t.LocalizedTabName).ToList(); - - this._adminBaseTabs = new List(); - this._adminAdvancedTabs = new List(); - - foreach (var tabInfo in this._adminTabs) - { - if (this.IsCommonTab(tabInfo)) - { - this._adminBaseTabs.Add(tabInfo); - } - else - { - this._adminAdvancedTabs.Add(tabInfo); - } - } - } - - private bool IsCommonTab(TabInfo tab, bool isHost = false) - { - if (tab.TabSettings.ContainsKey("ControlBar_CommonTab") && - tab.TabSettings["ControlBar_CommonTab"].ToString() == "Y") - { - return true; - } - - return isHost ? this._hostCommonTabs.Contains(tab.TabName) : this._adminCommonTabs.Contains(tab.TabName); - } - } -} + using DotNetNuke.Application; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Content.Common; + using DotNetNuke.Entities.Content.Taxonomy; + using DotNetNuke.Entities.Host; + using DotNetNuke.Entities.Modules; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Tabs; + using DotNetNuke.Entities.Users; + using DotNetNuke.Framework; + using DotNetNuke.Framework.JavaScriptLibraries; + using DotNetNuke.Security.Permissions; + using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Personalization; + using DotNetNuke.UI.Utilities; + using DotNetNuke.Web.Client; + using DotNetNuke.Web.Client.ClientResourceManagement; + using DotNetNuke.Web.Common; + using DotNetNuke.Web.Components.Controllers; + using DotNetNuke.Web.Components.Controllers.Models; + using DotNetNuke.Web.UI.WebControls; + using Microsoft.Extensions.DependencyInjection; + + using Globals = DotNetNuke.Common.Globals; + + public partial class ControlBar : ControlPanelBase + { + protected DnnFileUpload FileUploader; + + private readonly INavigationManager _navigationManager; + + private readonly IList _adminCommonTabs = new List + { + "Site Settings", + "Security Roles", + "User Accounts", + "File Management", + }; + + private readonly IList _hostCommonTabs = new List + { + "Host Settings", + "Site Management", + "File Management", + "Extensions", + "Dashboard", + "Health Monitoring", + "Technical Support", + "Knowledge Base", + "Software and Documentation", + }; + + private List _adminBookmarkItems; + + private List _hostBookmarkItems; + + private List _adminTabs; + private List _adminBaseTabs; + private List _adminAdvancedTabs; + private List _hostTabs; + private List _hostBaseTabs; + private List _hostAdvancedTabs; + + public ControlBar() + { + this._navigationManager = Globals.DependencyProvider.GetRequiredService(); + } + + public override bool IncludeInControlHierarchy + { + get + { + return base.IncludeInControlHierarchy && (this.IsPageAdmin() || this.IsModuleAdmin()); + } + } + + public override bool IsDockable { get; set; } + + protected string BookmarkModuleCategory + { + get + { + return ControlBarController.Instance.GetBookmarkCategory(this.PortalSettings.PortalId); + } + } + + protected string BookmarkedModuleKeys + { + get + { + var bookmarkModules = Personalization.GetProfile("ControlBar", "module" + this.PortalSettings.PortalId); + if (bookmarkModules == null) + { + return string.Empty; + } + + return bookmarkModules.ToString(); + } + } + + protected List AdminBookmarkItems + { + get + { + if (this._adminBookmarkItems == null) + { + var bookmarkItems = Personalization.GetProfile("ControlBar", "admin" + this.PortalSettings.PortalId); + + this._adminBookmarkItems = bookmarkItems != null + ? bookmarkItems.ToString().Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList() + : new List(); + } + + return this._adminBookmarkItems; + } + } + + protected List HostBookmarkItems + { + get + { + if (this._hostBookmarkItems == null) + { + var bookmarkItems = Personalization.GetProfile("ControlBar", "host" + this.PortalSettings.PortalId); + + this._hostBookmarkItems = bookmarkItems != null + ? bookmarkItems.ToString().Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList() + : new List(); + } + + return this._hostBookmarkItems; + } + } + + protected List AdminBaseTabs + { + get + { + if (this._adminBaseTabs == null) + { + this.GetAdminTabs(); + } + + return this._adminBaseTabs; + } + } + + protected List AdminAdvancedTabs + { + get + { + if (this._adminAdvancedTabs == null) + { + this.GetAdminTabs(); + } + + return this._adminAdvancedTabs; + } + } + + protected List HostBaseTabs + { + get + { + if (this._hostBaseTabs == null) + { + this.GetHostTabs(); + } + + return this._hostBaseTabs; + } + } + + protected List HostAdvancedTabs + { + get + { + if (this._hostAdvancedTabs == null) + { + this.GetHostTabs(); + } + + return this._hostAdvancedTabs; + } + } + + protected string CurrentUICulture { get; set; } + + protected string LoginUrl { get; set; } + + protected string LoadTabModuleMessage { get; set; } + + private new string LocalResourceFile + { + get + { + return string.Format("{0}/{1}/{2}.ascx.resx", this.TemplateSourceDirectory, Localization.LocalResourceDirectory, this.GetType().BaseType?.Name); + } + } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + + // page will be null if the control panel initial twice, it will be removed in the second time. + if (this.Page != null) + { + this.ID = "ControlBar"; + + this.FileUploader = new DnnFileUpload { ID = "fileUploader", SupportHost = false }; + this.Page.Form.Controls.Add(this.FileUploader); + + this.LoadCustomMenuItems(); + } + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + + if (this.PortalSettings.EnablePopUps && Host.EnableModuleOnLineHelp) + { + this.helpLink.Text = string.Format(@"
  • {1}
  • ", UrlUtils.PopUpUrl(Host.HelpURL, this, this.PortalSettings, false, false), this.GetString("Tool.Help.ToolTip")); + } + else if (Host.EnableModuleOnLineHelp) + { + this.helpLink.Text = string.Format(@"
  • {1}
  • ", Host.HelpURL, this.GetString("Tool.Help.ToolTip")); + } + + this.LoginUrl = this.ResolveClientUrl(@"~/Login.aspx"); + + if (this.ControlPanel.Visible && this.IncludeInControlHierarchy) + { + ClientResourceManager.RegisterStyleSheet(this.Page, "~/admin/ControlPanel/ControlBar.css", FileOrder.Css.ResourceCss); + JavaScript.RequestRegistration(CommonJs.DnnPlugins); + ClientResourceManager.RegisterScript(this.Page, "~/resources/shared/scripts/dnn.controlBar.js"); + + // Is there more than one site in this group? + var multipleSites = GetCurrentPortalsGroup().Count() > 1; + ClientAPI.RegisterClientVariable(this.Page, "moduleSharing", multipleSites.ToString().ToLowerInvariant(), true); + } + + ServicesFramework.Instance.RequestAjaxAntiForgerySupport(); + var multipleSite = false; + + this.conrolbar_logo.ImageUrl = ControlBarController.Instance.GetControlBarLogoURL(); + if (!this.IsPostBack) + { + this.LoadCategoryList(); + multipleSite = this.LoadSiteList(); + this.LoadVisibilityList(); + this.AutoSetUserMode(); + this.BindPortalsList(); + this.BindLanguagesList(); + } + + this.LoadTabModuleMessage = multipleSite ? this.GetString("LoadingTabModuleCE.Text") : this.GetString("LoadingTabModule.Text"); + } + + protected bool CheckPageQuota() + { + UserInfo objUser = UserController.Instance.GetCurrentUserInfo(); + return (objUser != null && objUser.IsSuperUser) || this.PortalSettings.PageQuota == 0 || this.PortalSettings.Pages < this.PortalSettings.PageQuota; + } + + protected string GetUpgradeIndicator() + { + UserInfo objUser = UserController.Instance.GetCurrentUserInfo(); + + if (objUser != null && objUser.IsSuperUser) + { + var upgradeIndicator = ControlBarController.Instance.GetUpgradeIndicator( + DotNetNukeContext.Current.Application.Version, + this.Request.IsLocal, this.Request.IsSecureConnection); + if (upgradeIndicator == null) + { + return string.Empty; + } + + return this.GetUpgradeIndicatorButton(upgradeIndicator); + } + + return string.Empty; + } + + protected string PreviewPopup() + { + var previewUrl = string.Format( + "{0}/Default.aspx?ctl={1}&previewTab={2}&TabID={2}", + Globals.AddHTTP(this.PortalSettings.PortalAlias.HTTPAlias), + "MobilePreview", + this.PortalSettings.ActiveTab.TabID); + + if (this.PortalSettings.EnablePopUps) + { + return UrlUtils.PopUpUrl(previewUrl, this, this.PortalSettings, true, false, 660, 800); + } + + return string.Format("location.href = \"{0}\"", previewUrl); + } + + protected IEnumerable LoadPaneList() + { + ArrayList panes = PortalSettings.Current.ActiveTab.Panes; + var resultPanes = new List(); + + if (panes.Count < 4) + { + foreach (var p in panes) + { + var topPane = new[] + { + string.Format(this.GetString("Pane.AddTop.Text"), p), + p.ToString(), + "TOP", + }; + + var botPane = new[] + { + string.Format(this.GetString("Pane.AddBottom.Text"), p), + p.ToString(), + "BOTTOM", + }; + + resultPanes.Add(topPane); + resultPanes.Add(botPane); + } + } + else + { + foreach (var p in panes) + { + var botPane = new[] + { + string.Format(this.GetString("Pane.Add.Text"), p), + p.ToString(), + "BOTTOM", + }; + + resultPanes.Add(botPane); + } + } + + return resultPanes; + } + + protected string GetString(string key) + { + return Localization.GetString(key, this.LocalResourceFile); + } + + protected string BuildToolUrl(string toolName, bool isHostTool, string moduleFriendlyName, + string controlKey, string navigateUrl, bool showAsPopUp) + { + if (isHostTool && !UserController.Instance.GetCurrentUserInfo().IsSuperUser) + { + return "javascript:void(0);"; + } + + if (!string.IsNullOrEmpty(navigateUrl)) + { + return navigateUrl; + } + + string returnValue = "javascript:void(0);"; + switch (toolName) + { + case "PageSettings": + if (TabPermissionController.CanManagePage()) + { + returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Tab", "action=edit&activeTab=settingTab"); + } + + break; + case "CopyPage": + if (TabPermissionController.CanCopyPage()) + { + returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Tab", "action=copy&activeTab=copyTab"); + } + + break; + case "DeletePage": + if (TabPermissionController.CanDeletePage()) + { + returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Tab", "action=delete"); + } + + break; + case "PageTemplate": + if (TabPermissionController.CanManagePage()) + { + returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Tab", "action=edit&activeTab=advancedTab"); + } + + break; + case "PageLocalization": + if (TabPermissionController.CanManagePage()) + { + returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Tab", "action=edit&activeTab=localizationTab"); + } + + break; + case "PagePermission": + if (TabPermissionController.CanAdminPage()) + { + returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Tab", "action=edit&activeTab=permissionsTab"); + } + + break; + case "ImportPage": + if (TabPermissionController.CanImportPage()) + { + returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "ImportTab"); + } + + break; + case "ExportPage": + if (TabPermissionController.CanExportPage()) + { + returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "ExportTab"); + } + + break; + case "NewPage": + if (TabPermissionController.CanAddPage()) + { + returnValue = this._navigationManager.NavigateURL("Tab", "activeTab=settingTab"); + } + + break; + case "PublishPage": + if (TabPermissionController.CanAdminPage()) + { + returnValue = this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID); + } + + break; + default: + if (!string.IsNullOrEmpty(moduleFriendlyName)) + { + var additionalParams = new List(); + returnValue = this.GetTabURL(additionalParams, toolName, isHostTool, + moduleFriendlyName, controlKey, showAsPopUp); + } + + break; + } + + return returnValue; + } + + protected string GetTabURL(List additionalParams, string toolName, bool isHostTool, + string moduleFriendlyName, string controlKey, bool showAsPopUp) + { + int portalId = isHostTool ? Null.NullInteger : this.PortalSettings.PortalId; + + string strURL = string.Empty; + + if (additionalParams == null) + { + additionalParams = new List(); + } + + var moduleInfo = ModuleController.Instance.GetModuleByDefinition(portalId, moduleFriendlyName); + + if (moduleInfo != null) + { + bool isHostPage = portalId == Null.NullInteger; + if (!string.IsNullOrEmpty(controlKey)) + { + additionalParams.Insert(0, "mid=" + moduleInfo.ModuleID); + if (showAsPopUp && this.PortalSettings.EnablePopUps) + { + additionalParams.Add("popUp=true"); + } + } + + string currentCulture = System.Threading.Thread.CurrentThread.CurrentCulture.Name; + strURL = this._navigationManager.NavigateURL(moduleInfo.TabID, isHostPage, this.PortalSettings, controlKey, currentCulture, additionalParams.ToArray()); + } + + return strURL; + } + + protected string GetTabURL(string tabName, bool isHostTool) + { + return this.GetTabURL(tabName, isHostTool, null); + } + + protected string GetTabURL(string tabName, bool isHostTool, int? parentId) + { + if (isHostTool && !UserController.Instance.GetCurrentUserInfo().IsSuperUser) + { + return "javascript:void(0);"; + } + + int portalId = isHostTool ? Null.NullInteger : this.PortalSettings.PortalId; + return this.GetTabURL(tabName, portalId, parentId); + } + + protected string GetTabURL(string tabName, int portalId, int? parentId) + { + var tab = parentId.HasValue ? TabController.Instance.GetTabByName(tabName, portalId, parentId.Value) : TabController.Instance.GetTabByName(tabName, portalId); + + if (tab != null) + { + return tab.FullUrl; + } + + return string.Empty; + } + + protected string GetTabPublishing() + { + return TabPublishingController.Instance.IsTabPublished(TabController.CurrentPage.TabID, this.PortalSettings.PortalId) ? "true" : "false"; + } + + protected string GetPublishActionText() + { + return TabPublishingController.Instance.IsTabPublished(TabController.CurrentPage.TabID, this.PortalSettings.PortalId) + ? ClientAPI.GetSafeJSString(this.GetString("Tool.UnpublishPage.Text")) + : ClientAPI.GetSafeJSString(this.GetString("Tool.PublishPage.Text")); + } + + protected string GetPublishConfirmText() + { + return TabPublishingController.Instance.IsTabPublished(TabController.CurrentPage.TabID, this.PortalSettings.PortalId) + ? this.GetButtonConfirmMessage("UnpublishPage") + : this.GetButtonConfirmMessage("PublishPage"); + } + + protected string GetPublishConfirmHeader() + { + return TabPublishingController.Instance.IsTabPublished(TabController.CurrentPage.TabID, this.PortalSettings.PortalId) + ? this.GetButtonConfirmHeader("UnpublishPage") + : this.GetButtonConfirmHeader("PublishPage"); + } + + protected string GetMenuItem(string tabName, bool isHostTool) + { + if (isHostTool && !UserController.Instance.GetCurrentUserInfo().IsSuperUser) + { + return string.Empty; + } + + List tabList; + if (isHostTool) + { + if (this._hostTabs == null) + { + this.GetHostTabs(); + } + + tabList = this._hostTabs; + } + else + { + if (this._adminTabs == null) + { + this.GetAdminTabs(); + } + + tabList = this._adminTabs; + } + + var tab = tabList?.SingleOrDefault(t => t.TabName == tabName); + return this.GetMenuItem(tab); + } + + protected string GetMenuItem(string tabName, bool isHostTool, bool isRemoveBookmark, bool isHideBookmark = false) + { + if (isHostTool && !UserController.Instance.GetCurrentUserInfo().IsSuperUser) + { + return string.Empty; + } + + List tabList; + if (isHostTool) + { + if (this._hostTabs == null) + { + this.GetHostTabs(); + } + + tabList = this._hostTabs; + } + else + { + if (this._adminTabs == null) + { + this.GetAdminTabs(); + } + + tabList = this._adminTabs; + } + + var tab = tabList?.SingleOrDefault(t => t.TabName == tabName); + return this.GetMenuItem(tab, isRemoveBookmark, isHideBookmark); + } + + protected string GetMenuItem(TabInfo tab, bool isRemoveBookmark = false, bool isHideBookmark = false) + { + if (tab == null) + { + return string.Empty; + } + + if (tab.IsVisible && !tab.IsDeleted && !tab.DisableLink) + { + string name = !string.IsNullOrEmpty(tab.LocalizedTabName) ? tab.LocalizedTabName : tab.Title; + var linkClass = DotNetNukeContext.Current.Application.Name == "DNNCORP.CE" && tab.FullUrl.Contains("ProfessionalFeatures") ? "class=\"PE\"" : string.Empty; + if (!isRemoveBookmark) + { + if (!isHideBookmark) + { + return string.Format( + "
  • {1}
  • ", + tab.FullUrl, + name, + ClientAPI.GetSafeJSString(this.GetString("Tool.AddToBookmarks.ToolTip")), + ClientAPI.GetSafeJSString(tab.TabName), + linkClass); + } + else + { + return string.Format( + "
  • {1}
  • ", + tab.FullUrl, + name, + ClientAPI.GetSafeJSString(this.GetString("Tool.AddToBookmarks.ToolTip")), + ClientAPI.GetSafeJSString(tab.TabName), + linkClass); + } + } + + return string.Format( + "
  • {1}
  • ", + tab.FullUrl, + name, + ClientAPI.GetSafeJSString(this.GetString("Tool.RemoveFromBookmarks.ToolTip")), + ClientAPI.GetSafeJSString(tab.TabName), + linkClass); + } + + return string.Empty; + } + + protected string GetAdminBaseMenu() + { + var tabs = this.AdminBaseTabs; + var sb = new StringBuilder(); + foreach (var tab in tabs) + { + var hideBookmark = this.AdminBookmarkItems.Contains(tab.TabName); + sb.Append(this.GetMenuItem(tab, false, hideBookmark)); + } + + return sb.ToString(); + } + + protected string GetAdminAdvancedMenu() + { + var tabs = this.AdminAdvancedTabs; + var sb = new StringBuilder(); + foreach (var tab in tabs) + { + var hideBookmark = this.AdminBookmarkItems.Contains(tab.TabName); + sb.Append(this.GetMenuItem(tab, false, hideBookmark)); + } + + return sb.ToString(); + } + + protected string GetHostBaseMenu() + { + var tabs = this.HostBaseTabs; + + var sb = new StringBuilder(); + foreach (var tab in tabs) + { + var hideBookmark = this.HostBookmarkItems.Contains(tab.TabName); + sb.Append(this.GetMenuItem(tab, false, hideBookmark)); + } + + return sb.ToString(); + } + + protected string GetHostAdvancedMenu() + { + var tabs = this.HostAdvancedTabs; + var sb = new StringBuilder(); + foreach (var tab in tabs) + { + var hideBookmark = this.HostBookmarkItems.Contains(tab.TabName); + sb.Append(this.GetMenuItem(tab, false, hideBookmark)); + } + + return sb.ToString(); + } + + protected string GetBookmarkItems(string title) + { + var isHostTool = title == "host"; + var bookmarkItems = isHostTool ? this.HostBookmarkItems : this.AdminBookmarkItems; + + if (bookmarkItems != null && bookmarkItems.Any()) + { + var sb = new StringBuilder(); + foreach (var itemKey in bookmarkItems) + { + sb.Append(this.GetMenuItem(itemKey, isHostTool, true)); + } + + return sb.ToString(); + } + + return string.Empty; + } + + protected string GetButtonConfirmMessage(string toolName) + { + return ClientAPI.GetSafeJSString(Localization.GetString("Tool." + toolName + ".ConfirmText", this.LocalResourceFile)); + } + + protected string GetButtonConfirmHeader(string toolName) + { + return ClientAPI.GetSafeJSString(Localization.GetString("Tool." + toolName + ".ConfirmHeader", this.LocalResourceFile)); + } + + protected IEnumerable LoadPortalsList() + { + var portals = PortalController.Instance.GetPortals(); + + var result = new List(); + foreach (var portal in portals) + { + var pi = portal as PortalInfo; + + if (pi != null) + { + string[] p = + { + pi.PortalName, + pi.PortalID.ToString("D"), + }; + + result.Add(p); + } + } + + return result; + } + + protected IEnumerable LoadLanguagesList() + { + var result = new List(); + + if (this.PortalSettings.AllowUserUICulture) + { + if (this.CurrentUICulture == null) + { + object oCulture = Personalization.GetProfile("Usability", "UICulture"); + + if (oCulture != null) + { + this.CurrentUICulture = oCulture.ToString(); + } + else + { + var l = new Localization(); + this.CurrentUICulture = l.CurrentUICulture; + this.SetLanguage(true, this.CurrentUICulture); + } + } + + IEnumerable cultureListItems = Localization.LoadCultureInListItems(CultureDropDownTypes.NativeName, this.CurrentUICulture, string.Empty, false); + foreach (var cultureItem in cultureListItems) + { + var selected = cultureItem.Value == this.CurrentUICulture ? "true" : "false"; + string[] p = new string[] + { + cultureItem.Text, + cultureItem.Value, + selected, + }; + result.Add(p); + } + } + + return result; + } + + protected bool ShowSwitchLanguagesPanel() + { + if (this.PortalSettings.AllowUserUICulture && this.PortalSettings.ContentLocalizationEnabled) + { + if (this.CurrentUICulture == null) + { + object oCulture = Personalization.GetProfile("Usability", "UICulture"); + + if (oCulture != null) + { + this.CurrentUICulture = oCulture.ToString(); + } + else + { + var l = new Localization(); + this.CurrentUICulture = l.CurrentUICulture; + } + } + + IEnumerable cultureListItems = Localization.LoadCultureInListItems(CultureDropDownTypes.NativeName, this.CurrentUICulture, string.Empty, false); + return cultureListItems.Count() > 1; + } + + return false; + } + + protected string CheckedWhenInLayoutMode() + { + return this.UserMode == PortalSettings.Mode.Layout ? "checked='checked'" : string.Empty; + } + + protected string CheckedWhenStayInEditMode() + { + string checkboxState = string.Empty; + var cookie = this.Request.Cookies["StayInEditMode"]; + if (cookie != null && cookie.Value == "YES") + { + checkboxState = "checked='checked'"; + } + + if (this.UserMode == PortalSettings.Mode.Layout) + { + checkboxState += " disabled='disabled'"; + } + + return checkboxState; + } + + protected string SpecialClassWhenNotInViewMode() + { + return this.UserMode == PortalSettings.Mode.View ? string.Empty : "controlBar_editPageInEditMode"; + } + + protected string GetModeForAttribute() + { + return this.UserMode.ToString().ToUpperInvariant(); + } + + protected string GetEditButtonLabel() + { + return this.UserMode == PortalSettings.Mode.Edit ? this.GetString("Tool.CloseEditMode.Text") : this.GetString("Tool.EditThisPage.Text"); + } + + protected virtual bool ActiveTabHasChildren() + { + var children = TabController.GetTabsByParent(this.PortalSettings.ActiveTab.TabID, this.PortalSettings.ActiveTab.PortalID); + + if ((children == null) || children.Count < 1) + { + return false; + } + + return true; + } + + protected bool IsLanguageModuleInstalled() + { + return DesktopModuleController.GetDesktopModuleByFriendlyName("Languages") != null; + } + + private static IEnumerable GetCurrentPortalsGroup() + { + var groups = PortalGroupController.Instance.GetPortalGroups().ToArray(); + + var result = (from @group in groups + select PortalGroupController.Instance.GetPortalsByGroup(@group.PortalGroupId) + into portals + where portals.Any(x => x.PortalID == PortalSettings.Current.PortalId) + select portals.ToArray()).FirstOrDefault(); + + // Are we in a group of one? + if (result == null || result.Length == 0) + { + result = new[] { PortalController.Instance.GetPortal(PortalSettings.Current.PortalId) }; + } + + return result; + } + + private void LoadCustomMenuItems() + { + foreach (var menuItem in ControlBarController.Instance.GetCustomMenuItems()) + { + var liElement = new HtmlGenericControl("li"); + liElement.Attributes.Add("id", menuItem.ID + "_tab"); + + var control = this.Page.LoadControl(menuItem.Source); + control.ID = menuItem.ID; + + liElement.Controls.Add(control); + + this.CustomMenuItems.Controls.Add(liElement); + } + } + + private string GetUpgradeIndicatorButton(UpgradeIndicatorViewModel upgradeIndicator) + { + return string.Format( + "\"{4}\"", + upgradeIndicator.ID, upgradeIndicator.WebAction, upgradeIndicator.CssClass, this.ResolveClientUrl(upgradeIndicator.ImageUrl), upgradeIndicator.AltText, upgradeIndicator.ToolTip); + } + + private void LoadCategoryList() + { + ITermController termController = Util.GetTermController(); + var terms = termController.GetTermsByVocabulary("Module_Categories").OrderBy(t => t.Weight).Where(t => t.Name != "< None >").ToList(); + var allTerm = new Term("All", Localization.GetString("AllCategories", this.LocalResourceFile)); + terms.Add(allTerm); + this.CategoryList.DataSource = terms; + this.CategoryList.DataBind(); + if (!this.IsPostBack) + { + this.CategoryList.SelectedValue = !string.IsNullOrEmpty(this.BookmarkedModuleKeys) ? this.BookmarkModuleCategory : "All"; + } + } + + private bool LoadSiteList() + { + // Is there more than one site in this group? + var multipleSites = GetCurrentPortalsGroup().Count() > 1; + if (multipleSites) + { + this.PageList.Services.GetTreeMethod = "ItemListService/GetPagesInPortalGroup"; + this.PageList.Services.GetNodeDescendantsMethod = "ItemListService/GetPageDescendantsInPortalGroup"; + this.PageList.Services.SearchTreeMethod = "ItemListService/SearchPagesInPortalGroup"; + this.PageList.Services.GetTreeWithNodeMethod = "ItemListService/GetTreePathForPageInPortalGroup"; + this.PageList.Services.SortTreeMethod = "ItemListService/SortPagesInPortalGroup"; + } + + this.PageList.UndefinedItem = new ListItem(DynamicSharedConstants.Unspecified, string.Empty); + this.PageList.OnClientSelectionChanged.Add("dnn.controlBar.ControlBar_Module_PageList_Changed"); + return multipleSites; + } + + private void LoadVisibilityList() + { + var items = new Dictionary { { "0", this.GetString("PermissionView") }, { "1", this.GetString("PermissionEdit") } }; + + this.VisibilityLst.Items.Clear(); + this.VisibilityLst.DataValueField = "key"; + this.VisibilityLst.DataTextField = "value"; + this.VisibilityLst.DataSource = items; + this.VisibilityLst.DataBind(); + } + + private void AutoSetUserMode() + { + int tabId = this.PortalSettings.ActiveTab.TabID; + int portalId = PortalSettings.Current.PortalId; + string pageId = string.Format("{0}:{1}", portalId, tabId); + + HttpCookie cookie = this.Request.Cookies["StayInEditMode"]; + if (cookie != null && cookie.Value == "YES") + { + if (PortalSettings.Current.UserMode != PortalSettings.Mode.Edit) + { + this.SetUserMode("EDIT"); + this.SetLastPageHistory(pageId); + this.Response.Redirect(this.Request.RawUrl, true); + } + + return; + } + + string lastPageId = this.GetLastPageHistory(); + var isShowAsCustomError = this.Request.QueryString.AllKeys.Contains("aspxerrorpath"); + + if (lastPageId != pageId && !isShowAsCustomError) + { + // navigate between pages + if (PortalSettings.Current.UserMode != PortalSettings.Mode.View) + { + this.SetUserMode("VIEW"); + this.SetLastPageHistory(pageId); + this.Response.Redirect(this.Request.RawUrl, true); + } + } + + if (!isShowAsCustomError) + { + this.SetLastPageHistory(pageId); + } + } + + private void SetLastPageHistory(string pageId) + { + this.Response.Cookies.Add(new HttpCookie("LastPageId", pageId) { Path = !string.IsNullOrEmpty(Globals.ApplicationPath) ? Globals.ApplicationPath : "/" }); + } + + private string GetLastPageHistory() + { + var cookie = this.Request.Cookies["LastPageId"]; + if (cookie != null) + { + return cookie.Value; + } + + return "NEW"; + } + + private void SetLanguage(bool update, string currentCulture) + { + if (update) + { + Personalization.SetProfile("Usability", "UICulture", currentCulture); + } + } + + private void BindPortalsList() + { + foreach (var portal in this.LoadPortalsList()) + { + this.controlBar_SwitchSite.Items.Add(new ListItem(portal[0], portal[1])); + } + } + + private void BindLanguagesList() + { + if (this.ShowSwitchLanguagesPanel()) + { + const string FlagImageUrlFormatString = "~/images/Flags/{0}.gif"; + foreach (var lang in this.LoadLanguagesList()) + { + var item = new ListItem(lang[0], lang[1]); + var imageUrl = string.Format(FlagImageUrlFormatString, item.Value); + item.Text = $" {item.Text}"; + if (lang[2] == "true") + { + item.Selected = true; + } + + this.controlBar_SwitchLanguage.Items.Add(item); + } + } + } + + private void GetHostTabs() + { + var hostTab = TabController.GetTabByTabPath(Null.NullInteger, "//Host", string.Empty); + var hosts = TabController.GetTabsByParent(hostTab, -1); + + var professionalTab = TabController.Instance.GetTabByName("Professional Features", -1); + var professionalTabs = professionalTab != null + ? TabController.GetTabsByParent(professionalTab.TabID, -1) + : new List(); + + this._hostTabs = new List(); + this._hostTabs.AddRange(hosts); + this._hostTabs.AddRange(professionalTabs); + this._hostTabs = this._hostTabs.OrderBy(t => t.LocalizedTabName).ToList(); + + this._hostBaseTabs = new List(); + this._hostAdvancedTabs = new List(); + + foreach (var tabInfo in this._hostTabs) + { + if (this.IsCommonTab(tabInfo, true)) + { + this._hostBaseTabs.Add(tabInfo); + } + else + { + this._hostAdvancedTabs.Add(tabInfo); + } + } + } + + private void GetAdminTabs() + { + var adminTab = TabController.GetTabByTabPath(this.PortalSettings.PortalId, "//Admin", string.Empty); + this._adminTabs = TabController.GetTabsByParent(adminTab, this.PortalSettings.PortalId).OrderBy(t => t.LocalizedTabName).ToList(); + + this._adminBaseTabs = new List(); + this._adminAdvancedTabs = new List(); + + foreach (var tabInfo in this._adminTabs) + { + if (this.IsCommonTab(tabInfo)) + { + this._adminBaseTabs.Add(tabInfo); + } + else + { + this._adminAdvancedTabs.Add(tabInfo); + } + } + } + + private bool IsCommonTab(TabInfo tab, bool isHost = false) + { + if (tab.TabSettings.ContainsKey("ControlBar_CommonTab") && + tab.TabSettings["ControlBar_CommonTab"].ToString() == "Y") + { + return true; + } + + return isHost ? this._hostCommonTabs.Contains(tab.TabName) : this._adminCommonTabs.Contains(tab.TabName); + } + } +} diff --git a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/ControlBar.ascx.designer.cs b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/ControlBar.ascx.designer.cs index bbe3e4cfb41..0269ed119ee 100644 --- a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/ControlBar.ascx.designer.cs +++ b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/ControlBar.ascx.designer.cs @@ -1,100 +1,100 @@ -// -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the MIT License. See LICENSE file in the project root for full license information. -// -//------------------------------------------------------------------------------ -// -// 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 DotNetNuke.UI.ControlPanels { - - - public partial class ControlBar { - - /// - /// ControlPanel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel ControlPanel; - - /// - /// conrolbar_logo control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Image conrolbar_logo; - - /// - /// controlBar_SwitchSite control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox controlBar_SwitchSite; - - /// - /// controlBar_SwitchLanguage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox controlBar_SwitchLanguage; - - /// - /// helpLink control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal helpLink; - - /// - /// CustomMenuItems control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl CustomMenuItems; - - /// - /// CategoryList control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox CategoryList; - - /// - /// PageList control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnPageDropDownList PageList; - - /// - /// VisibilityLst control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox VisibilityLst; - } -} +// +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the MIT License. See LICENSE file in the project root for full license information. +// +//------------------------------------------------------------------------------ +// +// 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 DotNetNuke.UI.ControlPanels { + + + public partial class ControlBar { + + /// + /// ControlPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel ControlPanel; + + /// + /// conrolbar_logo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image conrolbar_logo; + + /// + /// controlBar_SwitchSite control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList controlBar_SwitchSite; + + /// + /// controlBar_SwitchLanguage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList controlBar_SwitchLanguage; + + /// + /// helpLink control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal helpLink; + + /// + /// CustomMenuItems control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl CustomMenuItems; + + /// + /// CategoryList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList CategoryList; + + /// + /// PageList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnPageDropDownList PageList; + + /// + /// VisibilityLst control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList VisibilityLst; + } +} diff --git a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/RibbonBar.ascx.cs b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/RibbonBar.ascx.cs index cefbdb08f4b..053f6b7a796 100644 --- a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/RibbonBar.ascx.cs +++ b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/RibbonBar.ascx.cs @@ -1,352 +1,352 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.UI.ControlPanels -{ - using System; - using System.Collections.Generic; - using System.Web; - using System.Web.UI; - using System.Web.UI.WebControls; - - using DotNetNuke.Application; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Host; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Entities.Users; - using DotNetNuke.Framework; - using DotNetNuke.Framework.JavaScriptLibraries; - using DotNetNuke.Security; - using DotNetNuke.Security.Permissions; - using DotNetNuke.Services.Exceptions; - using DotNetNuke.Services.Localization; - using DotNetNuke.Services.Mobile; - using DotNetNuke.Services.Upgrade; - using DotNetNuke.UI.Utilities; - using DotNetNuke.Web.Client.ClientResourceManagement; - using DotNetNuke.Web.UI.WebControls; +namespace DotNetNuke.UI.ControlPanels +{ + using System; + using System.Collections.Generic; + using System.Web; + using System.Web.UI; + using System.Web.UI.WebControls; + + using DotNetNuke.Application; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Host; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Users; + using DotNetNuke.Framework; + using DotNetNuke.Framework.JavaScriptLibraries; + using DotNetNuke.Security; + using DotNetNuke.Security.Permissions; + using DotNetNuke.Services.Exceptions; + using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Mobile; + using DotNetNuke.Services.Upgrade; + using DotNetNuke.UI.Utilities; + using DotNetNuke.Web.Client.ClientResourceManagement; + using DotNetNuke.Web.UI.WebControls; using Globals = DotNetNuke.Common.Globals; - public partial class RibbonBar : ControlPanelBase - { - public override bool IncludeInControlHierarchy - { - get - { - return base.IncludeInControlHierarchy && (this.IsPageAdmin() || this.IsModuleAdmin()); - } - } - - public override bool IsDockable { get; set; } - - protected string GetButtonConfirmMessage(string toolName) - { - if (toolName == "DeletePage") - { - return ClientAPI.GetSafeJSString(Localization.GetString("Tool.DeletePage.Confirm", this.LocalResourceFile)); - } - - if (toolName == "CopyPermissionsToChildren") - { - if (PortalSecurity.IsInRole("Administrators")) - { - return ClientAPI.GetSafeJSString(Localization.GetString("Tool.CopyPermissionsToChildren.Confirm", this.LocalResourceFile)); - } - - return ClientAPI.GetSafeJSString(Localization.GetString("Tool.CopyPermissionsToChildrenPageEditor.Confirm", this.LocalResourceFile)); - } - - if (toolName == "CopyDesignToChildren") - { - if (PortalSecurity.IsInRole("Administrators")) - { - return ClientAPI.GetSafeJSString(Localization.GetString("Tool.CopyDesignToChildren.Confirm", this.LocalResourceFile)); - } - - return ClientAPI.GetSafeJSString(Localization.GetString("Tool.CopyDesignToChildrenPageEditor.Confirm", this.LocalResourceFile)); - } - - return string.Empty; - } - - protected void DetermineNodesToInclude(object sender, EventArgs e) - { - var skinObject = (Web.DDRMenu.SkinObject)sender; - string admin = this.StripLocalizationPrefix(Localization.GetString("//Admin.String", Localization.GlobalResourceFile)).Trim(); - string host = this.StripLocalizationPrefix(Localization.GetString("//Host.String", Localization.GlobalResourceFile)).Trim(); - - skinObject.IncludeNodes = admin + ", " + host; - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - this.ID = "RibbonBar"; - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - this.ddlMode.SelectedIndexChanged += this.ddlMode_SelectedIndexChanged; - this.ddlUICulture.SelectedIndexChanged += this.ddlUICulture_SelectedIndexChanged; - - try - { - this.AdminPanel.Visible = false; - this.AdvancedToolsPanel.Visible = false; - - if (this.ControlPanel.Visible && this.IncludeInControlHierarchy) - { - ClientResourceManager.RegisterStyleSheet(this.Page, "~/admin/ControlPanel/module.css"); - ClientResourceManager.RegisterScript(this.Page, "~/Resources/ControlPanel/ControlPanel.debug.js"); - } - - JavaScript.RequestRegistration(CommonJs.DnnPlugins); - - Control copyPageButton = this.CurrentPagePanel.FindControl("CopyPage"); - if (copyPageButton != null) - { - copyPageButton.Visible = LocaleController.Instance.IsDefaultLanguage(LocaleController.Instance.GetCurrentLocale(this.PortalSettings.PortalId).Code); - } - - if (this.Request.IsAuthenticated) - { - UserInfo user = UserController.Instance.GetCurrentUserInfo(); - if (user != null) - { - bool isAdmin = user.IsInRole(PortalSettings.Current.AdministratorRoleName); - this.AdminPanel.Visible = isAdmin; - } - } - - if (this.IsPageAdmin()) - { - this.ControlPanel.Visible = true; - this.BodyPanel.Visible = true; - - if (DotNetNukeContext.Current.Application.Name == "DNNCORP.CE") - { - // Hide Support icon in CE - this.AdminPanel.FindControl("SupportTickets").Visible = false; - } - else - { - // Show PE/XE tools - this.AdvancedToolsPanel.Visible = true; - } - - this.Localize(); - - if (!this.Page.IsPostBack) - { - UserInfo objUser = UserController.Instance.GetCurrentUserInfo(); - if (objUser != null) - { - if (objUser.IsSuperUser) - { - this.hypMessage.ImageUrl = Upgrade.UpgradeIndicator(DotNetNukeContext.Current.Application.Version, this.Request.IsLocal, this.Request.IsSecureConnection); - if (!string.IsNullOrEmpty(this.hypMessage.ImageUrl)) - { - this.hypMessage.ToolTip = Localization.GetString("hypUpgrade.Text", this.LocalResourceFile); - this.hypMessage.NavigateUrl = Upgrade.UpgradeRedirect(); - } - } - else - { - if (PortalSecurity.IsInRole(this.PortalSettings.AdministratorRoleName) && Host.DisplayCopyright) - { - this.hypMessage.ImageUrl = "~/images/branding/iconbar_logo.png"; - this.hypMessage.ToolTip = DotNetNukeContext.Current.Application.Description; - this.hypMessage.NavigateUrl = Localization.GetString("hypMessageUrl.Text", this.LocalResourceFile); - } - else - { - this.hypMessage.Visible = false; - } - - if (!TabPermissionController.CanAddContentToPage()) - { - this.CommonTasksPanel.Visible = false; - } - } - - if (this.PortalSettings.AllowUserUICulture) - { - object oCulture = DotNetNuke.Services.Personalization.Personalization.GetProfile("Usability", "UICulture"); - string currentCulture; - if (oCulture != null) - { - currentCulture = oCulture.ToString(); - } - else - { - Localization l = new Localization(); - currentCulture = l.CurrentUICulture; - } - - // Localization.LoadCultureDropDownList(ddlUICulture, CultureDropDownTypes.NativeName, currentCulture); - IEnumerable cultureListItems = Localization.LoadCultureInListItems(CultureDropDownTypes.NativeName, currentCulture, string.Empty, false); - foreach (var cultureItem in cultureListItems) - { - this.ddlUICulture.AddItem(cultureItem.Text, cultureItem.Value); - } - - var selectedCultureItem = this.ddlUICulture.FindItemByValue(currentCulture); - if (selectedCultureItem != null) - { - selectedCultureItem.Selected = true; - } - - // only show language selector if more than one language - if (this.ddlUICulture.Items.Count > 1) - { - this.lblUILanguage.Visible = true; - this.ddlUICulture.Visible = true; - - if (oCulture == null) - { - this.SetLanguage(true); - } - } - } - } - - this.SetMode(false); - } - } - else if (this.IsModuleAdmin()) - { - this.ControlPanel.Visible = true; - this.BodyPanel.Visible = false; - this.adminMenus.Visible = false; - if (!this.Page.IsPostBack) - { - this.SetMode(false); - } - } - else - { - this.ControlPanel.Visible = false; - } - } - catch (Exception exc) - { - Exceptions.ProcessModuleLoadException(this, exc); - } - } - - protected void ddlMode_SelectedIndexChanged(object sender, EventArgs e) - { - if (this.Page.IsCallback) - { - return; - } - - this.SetMode(true); - this.Response.Redirect(this.Request.RawUrl, true); - } - - protected string PreviewPopup() - { - var previewUrl = string.Format( - "{0}/Default.aspx?ctl={1}&previewTab={2}&TabID={2}", - Globals.AddHTTP(this.PortalSettings.PortalAlias.HTTPAlias), - "MobilePreview", - this.PortalSettings.ActiveTab.TabID); - - if (this.PortalSettings.EnablePopUps) - { - return UrlUtils.PopUpUrl(previewUrl, this, this.PortalSettings, true, false, 660, 800); - } - else - { - return string.Format("location.href = \"{0}\"", previewUrl); - } - } - - private void Localize() - { - Control ctrl = this.AdminPanel.FindControl("SiteNewPage"); - if ((ctrl != null) && ctrl is DnnRibbonBarTool) - { - var toolCtrl = (DnnRibbonBarTool)ctrl; - toolCtrl.Text = Localization.GetString("SiteNewPage", this.LocalResourceFile); - toolCtrl.ToolTip = Localization.GetString("SiteNewPage.ToolTip", this.LocalResourceFile); - } - } - - private void SetMode(bool update) - { - if (update) - { - this.SetUserMode(this.ddlMode.SelectedValue); - } - - if (!TabPermissionController.CanAddContentToPage()) - { - this.RemoveModeDropDownItem("LAYOUT"); - } - - if (!(new PreviewProfileController().GetProfilesByPortal(this.PortalSettings.PortalId).Count > 0)) - { - this.RemoveModeDropDownItem("PREVIEW"); - } - - switch (this.UserMode) - { - case PortalSettings.Mode.View: - this.ddlMode.FindItemByValue("VIEW").Selected = true; - break; - case PortalSettings.Mode.Edit: - this.ddlMode.FindItemByValue("EDIT").Selected = true; - break; - case PortalSettings.Mode.Layout: - this.ddlMode.FindItemByValue("LAYOUT").Selected = true; - break; - } - } - - private void RemoveModeDropDownItem(string value) - { - var item = this.ddlMode.FindItemByValue(value); - if (item != null) - { - this.ddlMode.Items.Remove(item); - } - } - - private void SetLanguage(bool update) - { - if (update) - { - DotNetNuke.Services.Personalization.Personalization.SetProfile("Usability", "UICulture", this.ddlUICulture.SelectedValue); - } - } - - private string StripLocalizationPrefix(string s) - { - const string prefix = "[L]"; - - if (s.StartsWith(prefix)) - { - return s.Substring(prefix.Length); - } - - return s; - } - - private void ddlUICulture_SelectedIndexChanged(object sender, EventArgs e) - { - if (this.Page.IsCallback) - { - return; - } - - this.SetLanguage(true); - this.Response.Redirect(this.Request.RawUrl, true); - } - } -} + public partial class RibbonBar : ControlPanelBase + { + public override bool IncludeInControlHierarchy + { + get + { + return base.IncludeInControlHierarchy && (this.IsPageAdmin() || this.IsModuleAdmin()); + } + } + + public override bool IsDockable { get; set; } + + protected string GetButtonConfirmMessage(string toolName) + { + if (toolName == "DeletePage") + { + return ClientAPI.GetSafeJSString(Localization.GetString("Tool.DeletePage.Confirm", this.LocalResourceFile)); + } + + if (toolName == "CopyPermissionsToChildren") + { + if (PortalSecurity.IsInRole("Administrators")) + { + return ClientAPI.GetSafeJSString(Localization.GetString("Tool.CopyPermissionsToChildren.Confirm", this.LocalResourceFile)); + } + + return ClientAPI.GetSafeJSString(Localization.GetString("Tool.CopyPermissionsToChildrenPageEditor.Confirm", this.LocalResourceFile)); + } + + if (toolName == "CopyDesignToChildren") + { + if (PortalSecurity.IsInRole("Administrators")) + { + return ClientAPI.GetSafeJSString(Localization.GetString("Tool.CopyDesignToChildren.Confirm", this.LocalResourceFile)); + } + + return ClientAPI.GetSafeJSString(Localization.GetString("Tool.CopyDesignToChildrenPageEditor.Confirm", this.LocalResourceFile)); + } + + return string.Empty; + } + + protected void DetermineNodesToInclude(object sender, EventArgs e) + { + var skinObject = (Web.DDRMenu.SkinObject)sender; + string admin = this.StripLocalizationPrefix(Localization.GetString("//Admin.String", Localization.GlobalResourceFile)).Trim(); + string host = this.StripLocalizationPrefix(Localization.GetString("//Host.String", Localization.GlobalResourceFile)).Trim(); + + skinObject.IncludeNodes = admin + ", " + host; + } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + + this.ID = "RibbonBar"; + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + + this.ddlMode.SelectedIndexChanged += this.ddlMode_SelectedIndexChanged; + this.ddlUICulture.SelectedIndexChanged += this.ddlUICulture_SelectedIndexChanged; + + try + { + this.AdminPanel.Visible = false; + this.AdvancedToolsPanel.Visible = false; + + if (this.ControlPanel.Visible && this.IncludeInControlHierarchy) + { + ClientResourceManager.RegisterStyleSheet(this.Page, "~/admin/ControlPanel/module.css"); + ClientResourceManager.RegisterScript(this.Page, "~/Resources/ControlPanel/ControlPanel.debug.js"); + } + + JavaScript.RequestRegistration(CommonJs.DnnPlugins); + + Control copyPageButton = this.CurrentPagePanel.FindControl("CopyPage"); + if (copyPageButton != null) + { + copyPageButton.Visible = LocaleController.Instance.IsDefaultLanguage(LocaleController.Instance.GetCurrentLocale(this.PortalSettings.PortalId).Code); + } + + if (this.Request.IsAuthenticated) + { + UserInfo user = UserController.Instance.GetCurrentUserInfo(); + if (user != null) + { + bool isAdmin = user.IsInRole(PortalSettings.Current.AdministratorRoleName); + this.AdminPanel.Visible = isAdmin; + } + } + + if (this.IsPageAdmin()) + { + this.ControlPanel.Visible = true; + this.BodyPanel.Visible = true; + + if (DotNetNukeContext.Current.Application.Name == "DNNCORP.CE") + { + // Hide Support icon in CE + this.AdminPanel.FindControl("SupportTickets").Visible = false; + } + else + { + // Show PE/XE tools + this.AdvancedToolsPanel.Visible = true; + } + + this.Localize(); + + if (!this.Page.IsPostBack) + { + UserInfo objUser = UserController.Instance.GetCurrentUserInfo(); + if (objUser != null) + { + if (objUser.IsSuperUser) + { + this.hypMessage.ImageUrl = Upgrade.UpgradeIndicator(DotNetNukeContext.Current.Application.Version, this.Request.IsLocal, this.Request.IsSecureConnection); + if (!string.IsNullOrEmpty(this.hypMessage.ImageUrl)) + { + this.hypMessage.ToolTip = Localization.GetString("hypUpgrade.Text", this.LocalResourceFile); + this.hypMessage.NavigateUrl = Upgrade.UpgradeRedirect(); + } + } + else + { + if (PortalSecurity.IsInRole(this.PortalSettings.AdministratorRoleName) && Host.DisplayCopyright) + { + this.hypMessage.ImageUrl = "~/images/branding/iconbar_logo.png"; + this.hypMessage.ToolTip = DotNetNukeContext.Current.Application.Description; + this.hypMessage.NavigateUrl = Localization.GetString("hypMessageUrl.Text", this.LocalResourceFile); + } + else + { + this.hypMessage.Visible = false; + } + + if (!TabPermissionController.CanAddContentToPage()) + { + this.CommonTasksPanel.Visible = false; + } + } + + if (this.PortalSettings.AllowUserUICulture) + { + object oCulture = DotNetNuke.Services.Personalization.Personalization.GetProfile("Usability", "UICulture"); + string currentCulture; + if (oCulture != null) + { + currentCulture = oCulture.ToString(); + } + else + { + Localization l = new Localization(); + currentCulture = l.CurrentUICulture; + } + + // Localization.LoadCultureDropDownList(ddlUICulture, CultureDropDownTypes.NativeName, currentCulture); + IEnumerable cultureListItems = Localization.LoadCultureInListItems(CultureDropDownTypes.NativeName, currentCulture, string.Empty, false); + foreach (var cultureItem in cultureListItems) + { + this.ddlUICulture.Items.Add(new ListItem(cultureItem.Text, cultureItem.Value)); + } + + var selectedCultureItem = this.ddlUICulture.Items.FindByValue(currentCulture); + if (selectedCultureItem != null) + { + selectedCultureItem.Selected = true; + } + + // only show language selector if more than one language + if (this.ddlUICulture.Items.Count > 1) + { + this.lblUILanguage.Visible = true; + this.ddlUICulture.Visible = true; + + if (oCulture == null) + { + this.SetLanguage(true); + } + } + } + } + + this.SetMode(false); + } + } + else if (this.IsModuleAdmin()) + { + this.ControlPanel.Visible = true; + this.BodyPanel.Visible = false; + this.adminMenus.Visible = false; + if (!this.Page.IsPostBack) + { + this.SetMode(false); + } + } + else + { + this.ControlPanel.Visible = false; + } + } + catch (Exception exc) + { + Exceptions.ProcessModuleLoadException(this, exc); + } + } + + protected void ddlMode_SelectedIndexChanged(object sender, EventArgs e) + { + if (this.Page.IsCallback) + { + return; + } + + this.SetMode(true); + this.Response.Redirect(this.Request.RawUrl, true); + } + + protected string PreviewPopup() + { + var previewUrl = string.Format( + "{0}/Default.aspx?ctl={1}&previewTab={2}&TabID={2}", + Globals.AddHTTP(this.PortalSettings.PortalAlias.HTTPAlias), + "MobilePreview", + this.PortalSettings.ActiveTab.TabID); + + if (this.PortalSettings.EnablePopUps) + { + return UrlUtils.PopUpUrl(previewUrl, this, this.PortalSettings, true, false, 660, 800); + } + else + { + return string.Format("location.href = \"{0}\"", previewUrl); + } + } + + private void Localize() + { + Control ctrl = this.AdminPanel.FindControl("SiteNewPage"); + if ((ctrl != null) && ctrl is DnnRibbonBarTool) + { + var toolCtrl = (DnnRibbonBarTool)ctrl; + toolCtrl.Text = Localization.GetString("SiteNewPage", this.LocalResourceFile); + toolCtrl.ToolTip = Localization.GetString("SiteNewPage.ToolTip", this.LocalResourceFile); + } + } + + private void SetMode(bool update) + { + if (update) + { + this.SetUserMode(this.ddlMode.SelectedValue); + } + + if (!TabPermissionController.CanAddContentToPage()) + { + this.RemoveModeDropDownItem("LAYOUT"); + } + + if (!(new PreviewProfileController().GetProfilesByPortal(this.PortalSettings.PortalId).Count > 0)) + { + this.RemoveModeDropDownItem("PREVIEW"); + } + + switch (this.UserMode) + { + case PortalSettings.Mode.View: + this.ddlMode.Items.FindByValue("VIEW").Selected = true; + break; + case PortalSettings.Mode.Edit: + this.ddlMode.Items.FindByValue("EDIT").Selected = true; + break; + case PortalSettings.Mode.Layout: + this.ddlMode.Items.FindByValue("LAYOUT").Selected = true; + break; + } + } + + private void RemoveModeDropDownItem(string value) + { + var item = this.ddlMode.Items.FindByValue(value); + if (item != null) + { + this.ddlMode.Items.Remove(item); + } + } + + private void SetLanguage(bool update) + { + if (update) + { + DotNetNuke.Services.Personalization.Personalization.SetProfile("Usability", "UICulture", this.ddlUICulture.SelectedValue); + } + } + + private string StripLocalizationPrefix(string s) + { + const string prefix = "[L]"; + + if (s.StartsWith(prefix)) + { + return s.Substring(prefix.Length); + } + + return s; + } + + private void ddlUICulture_SelectedIndexChanged(object sender, EventArgs e) + { + if (this.Page.IsCallback) + { + return; + } + + this.SetLanguage(true); + this.Response.Redirect(this.Request.RawUrl, true); + } + } +} diff --git a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/RibbonBar.ascx.designer.cs b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/RibbonBar.ascx.designer.cs index acc6e2720e6..3ad16a50e65 100644 --- a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/RibbonBar.ascx.designer.cs +++ b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/RibbonBar.ascx.designer.cs @@ -1,397 +1,397 @@ -// -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the MIT License. See LICENSE file in the project root for full license information. -// -//------------------------------------------------------------------------------ -// -// 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 DotNetNuke.UI.ControlPanels { - - - public partial class RibbonBar { - - /// - /// ControlPanel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel ControlPanel; - - /// - /// adminMenus control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.DDRMenu.SkinObject adminMenus; - - /// - /// lblUILanguage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblUILanguage; - - /// - /// ddlUICulture control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox ddlUICulture; - - /// - /// lblMode control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblMode; - - /// - /// ddlMode control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox ddlMode; - - /// - /// hypMessage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.HyperLink hypMessage; - - /// - /// BodyPanel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl BodyPanel; - - /// - /// CommonTasksPanel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel CommonTasksPanel; - - /// - /// AddMod control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.UI.ControlPanel.AddModule AddMod; - - /// - /// CurrentPagePanel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel CurrentPagePanel; - - /// - /// CurrentTabActions control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnLiteral CurrentTabActions; - - /// - /// EditCurrentSettings control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool EditCurrentSettings; - - /// - /// NewPage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool NewPage; - - /// - /// CopyPage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool CopyPage; - - /// - /// DeletePage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool DeletePage; - - /// - /// ImportPage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool ImportPage; - - /// - /// ExportPage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool ExportPage; - - /// - /// CurrentTabCopyToChildren control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnLiteral CurrentTabCopyToChildren; - - /// - /// CopyPermissionsToChildren control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool CopyPermissionsToChildren; - - /// - /// CopyDesignToChildren control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool CopyDesignToChildren; - - /// - /// CurrentTabAddPage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnLiteral CurrentTabAddPage; - - /// - /// AddPage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.UI.ControlPanel.AddPage AddPage; - - /// - /// CurrentTabEditPage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnLiteral CurrentTabEditPage; - - /// - /// EditPage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.UI.ControlPanel.UpdatePage EditPage; - - /// - /// AdminPanel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel AdminPanel; - - /// - /// SiteTabManage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnLiteral SiteTabManage; - - /// - /// NewUser control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool NewUser; - - /// - /// NewRole control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool NewRole; - - /// - /// UploadFile control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool UploadFile; - - /// - /// ClearCache control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool ClearCache; - - /// - /// RecycleApp control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool RecycleApp; - - /// - /// AdvancedToolsPanel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel AdvancedToolsPanel; - - /// - /// SystemTabTools control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnLiteral SystemTabTools; - - /// - /// WebServerManager control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool WebServerManager; - - /// - /// SupportTickets control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool SupportTickets; - - /// - /// ImpersonateUser control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool ImpersonateUser; - - /// - /// IntegrityChecker control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool IntegrityChecker; - - /// - /// SystemTabSwitchSite control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnLiteral SystemTabSwitchSite; - - /// - /// SwitchSite control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.UI.ControlPanel.SwitchSite SwitchSite; - - /// - /// CurrentTabHelp control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnLiteral CurrentTabHelp; - - /// - /// Help control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool Help; - } -} +// +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the MIT License. See LICENSE file in the project root for full license information. +// +//------------------------------------------------------------------------------ +// +// 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 DotNetNuke.UI.ControlPanels { + + + public partial class RibbonBar { + + /// + /// ControlPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel ControlPanel; + + /// + /// adminMenus control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.DDRMenu.SkinObject adminMenus; + + /// + /// lblUILanguage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblUILanguage; + + /// + /// ddlUICulture control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlUICulture; + + /// + /// lblMode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblMode; + + /// + /// ddlMode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlMode; + + /// + /// hypMessage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HyperLink hypMessage; + + /// + /// BodyPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl BodyPanel; + + /// + /// CommonTasksPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel CommonTasksPanel; + + /// + /// AddMod control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.UI.ControlPanel.AddModule AddMod; + + /// + /// CurrentPagePanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel CurrentPagePanel; + + /// + /// CurrentTabActions control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnLiteral CurrentTabActions; + + /// + /// EditCurrentSettings control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool EditCurrentSettings; + + /// + /// NewPage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool NewPage; + + /// + /// CopyPage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool CopyPage; + + /// + /// DeletePage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool DeletePage; + + /// + /// ImportPage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool ImportPage; + + /// + /// ExportPage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool ExportPage; + + /// + /// CurrentTabCopyToChildren control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnLiteral CurrentTabCopyToChildren; + + /// + /// CopyPermissionsToChildren control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool CopyPermissionsToChildren; + + /// + /// CopyDesignToChildren control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool CopyDesignToChildren; + + /// + /// CurrentTabAddPage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnLiteral CurrentTabAddPage; + + /// + /// AddPage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.UI.ControlPanel.AddPage AddPage; + + /// + /// CurrentTabEditPage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnLiteral CurrentTabEditPage; + + /// + /// EditPage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.UI.ControlPanel.UpdatePage EditPage; + + /// + /// AdminPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel AdminPanel; + + /// + /// SiteTabManage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnLiteral SiteTabManage; + + /// + /// NewUser control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool NewUser; + + /// + /// NewRole control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool NewRole; + + /// + /// UploadFile control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool UploadFile; + + /// + /// ClearCache control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool ClearCache; + + /// + /// RecycleApp control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool RecycleApp; + + /// + /// AdvancedToolsPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel AdvancedToolsPanel; + + /// + /// SystemTabTools control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnLiteral SystemTabTools; + + /// + /// WebServerManager control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool WebServerManager; + + /// + /// SupportTickets control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool SupportTickets; + + /// + /// ImpersonateUser control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool ImpersonateUser; + + /// + /// IntegrityChecker control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool IntegrityChecker; + + /// + /// SystemTabSwitchSite control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnLiteral SystemTabSwitchSite; + + /// + /// SwitchSite control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.UI.ControlPanel.SwitchSite SwitchSite; + + /// + /// CurrentTabHelp control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnLiteral CurrentTabHelp; + + /// + /// Help control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnRibbonBarTool Help; + } +} diff --git a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/SwitchSite.ascx.cs b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/SwitchSite.ascx.cs index 1abfa1c2ed6..e36d8decc62 100644 --- a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/SwitchSite.ascx.cs +++ b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/SwitchSite.ascx.cs @@ -1,112 +1,111 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.UI.ControlPanel -{ - using System; - using System.Collections; - using System.Linq; - using System.Threading; - using System.Web.UI; - using System.Web.UI.WebControls; +namespace DotNetNuke.UI.ControlPanel +{ + using System; + using System.Collections; + using System.Linq; + using System.Threading; + using System.Web.UI; + using System.Web.UI.WebControls; - using DotNetNuke.Common; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Services.Exceptions; + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Services.Exceptions; using DotNetNuke.Web.UI.WebControls; - public partial class SwitchSite : UserControl, IDnnRibbonBarTool - { - public override bool Visible - { - get - { - if (PortalSettings.Current.UserId == Null.NullInteger) - { - return false; - } - - return PortalSettings.Current.UserInfo.IsSuperUser && base.Visible; - } - - set - { - base.Visible = value; - } - } - - public string ToolName - { - get - { - return "QuickSwitchSite"; - } - - set - { - throw new NotSupportedException("Set ToolName not supported"); - } - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - this.cmdSwitch.Click += this.CmdSwitchClick; - - try - { - if (this.Visible && !this.IsPostBack) - { - this.LoadPortalsList(); - } - } - catch (Exception exc) - { - Exceptions.ProcessModuleLoadException(this, exc); - } - } - - protected void CmdSwitchClick(object sender, EventArgs e) - { - try - { - if (!string.IsNullOrEmpty(this.SitesLst.SelectedValue)) - { - int selectedPortalID = int.Parse(this.SitesLst.SelectedValue); - var portalAliases = PortalAliasController.Instance.GetPortalAliasesByPortalId(selectedPortalID).ToList(); - - if (portalAliases.Count > 0 && (portalAliases[0] != null)) - { - this.Response.Redirect(Globals.AddHTTP(((PortalAliasInfo)portalAliases[0]).HTTPAlias)); - } - } - } - catch (ThreadAbortException) - { - // Do nothing we are not logging ThreadAbortxceptions caused by redirects - } - catch (Exception ex) - { - Exceptions.LogException(ex); - } - } - - private void LoadPortalsList() - { - var portals = PortalController.Instance.GetPortals(); - - this.SitesLst.ClearSelection(); - this.SitesLst.Items.Clear(); - - this.SitesLst.DataSource = portals; - this.SitesLst.DataTextField = "PortalName"; - this.SitesLst.DataValueField = "PortalID"; - this.SitesLst.DataBind(); - - // SitesLst.Items.Insert(0, new ListItem(string.Empty)); - this.SitesLst.InsertItem(0, string.Empty, string.Empty); - } - } -} + public partial class SwitchSite : UserControl, IDnnRibbonBarTool + { + public override bool Visible + { + get + { + if (PortalSettings.Current.UserId == Null.NullInteger) + { + return false; + } + + return PortalSettings.Current.UserInfo.IsSuperUser && base.Visible; + } + + set + { + base.Visible = value; + } + } + + public string ToolName + { + get + { + return "QuickSwitchSite"; + } + + set + { + throw new NotSupportedException("Set ToolName not supported"); + } + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + + this.cmdSwitch.Click += this.CmdSwitchClick; + + try + { + if (this.Visible && !this.IsPostBack) + { + this.LoadPortalsList(); + } + } + catch (Exception exc) + { + Exceptions.ProcessModuleLoadException(this, exc); + } + } + + protected void CmdSwitchClick(object sender, EventArgs e) + { + try + { + if (!string.IsNullOrEmpty(this.SitesLst.SelectedValue)) + { + int selectedPortalID = int.Parse(this.SitesLst.SelectedValue); + var portalAliases = PortalAliasController.Instance.GetPortalAliasesByPortalId(selectedPortalID).ToList(); + + if (portalAliases.Count > 0 && (portalAliases[0] != null)) + { + this.Response.Redirect(Globals.AddHTTP(((PortalAliasInfo)portalAliases[0]).HTTPAlias)); + } + } + } + catch (ThreadAbortException) + { + // Do nothing we are not logging ThreadAbortxceptions caused by redirects + } + catch (Exception ex) + { + Exceptions.LogException(ex); + } + } + + private void LoadPortalsList() + { + var portals = PortalController.Instance.GetPortals(); + + this.SitesLst.ClearSelection(); + this.SitesLst.Items.Clear(); + + this.SitesLst.DataSource = portals; + this.SitesLst.DataTextField = "PortalName"; + this.SitesLst.DataValueField = "PortalID"; + this.SitesLst.DataBind(); + + this.SitesLst.Items.Insert(0, string.Empty); + } + } +} diff --git a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/SwitchSite.ascx.designer.cs b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/SwitchSite.ascx.designer.cs index c04698aa334..8c45a3f8b9f 100644 --- a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/SwitchSite.ascx.designer.cs +++ b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/SwitchSite.ascx.designer.cs @@ -1,37 +1,37 @@ -// -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the MIT License. See LICENSE file in the project root for full license information. -// -//------------------------------------------------------------------------------ -// -// 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 DotNetNuke.UI.ControlPanel { - - - public partial class SwitchSite { - - /// - /// SitesLst control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox SitesLst; - - /// - /// cmdSwitch control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.LinkButton cmdSwitch; - } -} +// +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the MIT License. See LICENSE file in the project root for full license information. +// +//------------------------------------------------------------------------------ +// +// 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 DotNetNuke.UI.ControlPanel { + + + public partial class SwitchSite { + + /// + /// SitesLst control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList SitesLst; + + /// + /// cmdSwitch control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton cmdSwitch; + } +} diff --git a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/UpdatePage.ascx.cs b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/UpdatePage.ascx.cs index e00d004f9f6..810888a91cb 100644 --- a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/UpdatePage.ascx.cs +++ b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/UpdatePage.ascx.cs @@ -1,361 +1,359 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.UI.ControlPanel -{ - using System; - using System.IO; - using System.Linq; - using System.Web.UI; - using System.Web.UI.WebControls; - - using DotNetNuke.Abstractions; - using DotNetNuke.Common; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Entities.Tabs; - using DotNetNuke.Security.Permissions; - using DotNetNuke.Services.Exceptions; - using DotNetNuke.Services.Localization; - using DotNetNuke.UI.Skins; - using DotNetNuke.Web.UI; - using DotNetNuke.Web.UI.WebControls; - using Microsoft.Extensions.DependencyInjection; - using Telerik.Web.UI; - - public partial class UpdatePage : UserControl, IDnnRibbonBarTool - { - private readonly INavigationManager _navigationManager; - - private TabInfo _currentTab; - - public UpdatePage() - { - this._navigationManager = Globals.DependencyProvider.GetRequiredService(); - } - - public override bool Visible - { - get - { - return base.Visible && TabPermissionController.CanManagePage(); - } - - set - { - base.Visible = value; - } - } - - public string ToolName - { - get - { - return "QuickUpdatePage"; - } - - set - { - throw new NotSupportedException("Set ToolName not supported"); - } - } - - private static PortalSettings PortalSettings - { - get - { - return PortalSettings.Current; - } - } - - private TabInfo CurrentTab - { - get - { - // Weird - but the activetab has different skin src value than getting from the db - if (this._currentTab == null) - { - this._currentTab = TabController.Instance.GetTab(PortalSettings.ActiveTab.TabID, PortalSettings.ActiveTab.PortalID, false); - } - - return this._currentTab; - } - } - - private string LocalResourceFile - { - get - { - return string.Format("{0}/{1}/{2}.ascx.resx", this.TemplateSourceDirectory, Localization.LocalResourceDirectory, this.GetType().BaseType.Name); - } - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - this.cmdUpdate.Click += this.CmdUpdateClick; - - try - { - if (this.Visible && !this.IsPostBack) - { - this.Name.Text = this.CurrentTab.TabName; - this.IncludeInMenu.Checked = this.CurrentTab.IsVisible; - this.IsDisabled.Checked = this.CurrentTab.DisableLink; - this.IsSecurePanel.Visible = PortalSettings.SSLEnabled; - this.IsSecure.Enabled = PortalSettings.SSLEnabled; - this.IsSecure.Checked = this.CurrentTab.IsSecure; - this.LoadAllLists(); - } - } - catch (Exception exc) - { - Exceptions.ProcessModuleLoadException(this, exc); - } - } - - protected void CmdUpdateClick(object sender, EventArgs e) - { - if (TabPermissionController.CanManagePage()) - { - TabInfo selectedTab = null; - if (!string.IsNullOrEmpty(this.PageLst.SelectedValue)) - { - int selectedTabID = int.Parse(this.PageLst.SelectedValue); - selectedTab = TabController.Instance.GetTab(selectedTabID, PortalSettings.ActiveTab.PortalID, false); - } - - TabRelativeLocation tabLocation = TabRelativeLocation.NOTSET; - if (!string.IsNullOrEmpty(this.LocationLst.SelectedValue)) - { - tabLocation = (TabRelativeLocation)Enum.Parse(typeof(TabRelativeLocation), this.LocationLst.SelectedValue); - } - - TabInfo tab = this.CurrentTab; - - tab.TabName = this.Name.Text; - tab.IsVisible = this.IncludeInMenu.Checked; - tab.DisableLink = this.IsDisabled.Checked; - tab.IsSecure = this.IsSecure.Checked; - tab.SkinSrc = this.SkinLst.SelectedValue; - - string errMsg = string.Empty; - try - { - RibbonBarManager.SaveTabInfoObject(tab, selectedTab, tabLocation, null); - } - catch (DotNetNukeException ex) - { - Exceptions.LogException(ex); - errMsg = (ex.ErrorCode != DotNetNukeErrorCode.NotSet) ? this.GetString("Err." + ex.ErrorCode) : ex.Message; - } - catch (Exception ex) - { - Exceptions.LogException(ex); - errMsg = ex.Message; - } - - // Clear the Tab's Cached modules - DataCache.ClearModuleCache(PortalSettings.ActiveTab.TabID); - - // Update Cached Tabs as TabPath may be needed before cache is cleared - TabInfo tempTab; - if (TabController.Instance.GetTabsByPortal(PortalSettings.ActiveTab.PortalID).TryGetValue(tab.TabID, out tempTab)) - { - tempTab.TabPath = tab.TabPath; - } - - if (string.IsNullOrEmpty(errMsg)) - { - this.Response.Redirect(this._navigationManager.NavigateURL(tab.TabID)); - } - else - { - errMsg = string.Format("

    {0}

    {1}

    ", this.GetString("Err.Header"), errMsg); - Web.UI.Utilities.RegisterAlertOnPageLoad(this, new MessageWindowParameters(errMsg) { Title = this.GetString("Err.Title") }); - } - } - } - - private static string FormatSkinName(string strSkinFolder, string strSkinFile) - { - if (strSkinFolder.ToLowerInvariant() == "_default") - { - return strSkinFile; - } - - switch (strSkinFile.ToLowerInvariant()) - { - case "skin": - case "container": - case "default": - return strSkinFolder; - default: - return strSkinFolder + " - " + strSkinFile; - } - } - - private void LoadAllLists() - { - this.LocationLst.Enabled = RibbonBarManager.CanMovePage(); - this.PageLst.Enabled = RibbonBarManager.CanMovePage(); - if (this.LocationLst.Enabled) - { - this.LoadLocationList(); - this.LoadPageList(); - } - - this.LoadSkinList(); - } - - private void LoadSkinList() - { - this.SkinLst.ClearSelection(); - this.SkinLst.Items.Clear(); - this.SkinLst.Items.Add(new RadComboBoxItem(this.GetString("DefaultSkin"), string.Empty)); - - // load portal skins - var portalSkinsHeader = new RadComboBoxItem(this.GetString("PortalSkins"), string.Empty) { Enabled = false, CssClass = "SkinListHeader" }; - this.SkinLst.Items.Add(portalSkinsHeader); - - string[] arrFolders; - string[] arrFiles; - string strLastFolder = string.Empty; - string strRoot = PortalSettings.HomeDirectoryMapPath + SkinController.RootSkin; - if (Directory.Exists(strRoot)) - { - arrFolders = Directory.GetDirectories(strRoot); - foreach (string strFolder in arrFolders) - { - arrFiles = Directory.GetFiles(strFolder, "*.ascx"); - foreach (string strFile in arrFiles) - { - string folder = strFolder.Substring(strFolder.LastIndexOf("\\") + 1); - if (strLastFolder != folder) - { - if (!string.IsNullOrEmpty(strLastFolder)) - { - this.SkinLst.Items.Add(this.GetSeparatorItem()); - } - - strLastFolder = folder; - } - - this.SkinLst.Items.Add(new RadComboBoxItem( - FormatSkinName(folder, Path.GetFileNameWithoutExtension(strFile)), - "[L]" + SkinController.RootSkin + "/" + folder + "/" + Path.GetFileName(strFile))); - } - } - } - - // No portal skins added, remove the header - if (this.SkinLst.Items.Count == 2) - { - this.SkinLst.Items.Remove(1); - } - - // load host skins - var hostSkinsHeader = new RadComboBoxItem(this.GetString("HostSkins"), string.Empty) { Enabled = false, CssClass = "SkinListHeader" }; - this.SkinLst.Items.Add(hostSkinsHeader); - - strRoot = Globals.HostMapPath + SkinController.RootSkin; - if (Directory.Exists(strRoot)) - { - arrFolders = Directory.GetDirectories(strRoot); - foreach (string strFolder in arrFolders) - { - if (!strFolder.EndsWith(Globals.glbHostSkinFolder)) - { - arrFiles = Directory.GetFiles(strFolder, "*.ascx"); - foreach (string strFile in arrFiles) - { - string folder = strFolder.Substring(strFolder.LastIndexOf("\\") + 1); - if (strLastFolder != folder) - { - if (!string.IsNullOrEmpty(strLastFolder)) - { - this.SkinLst.Items.Add(this.GetSeparatorItem()); - } - - strLastFolder = folder; - } - - this.SkinLst.Items.Add(new RadComboBoxItem( - FormatSkinName(folder, Path.GetFileNameWithoutExtension(strFile)), - "[G]" + SkinController.RootSkin + "/" + folder + "/" + Path.GetFileName(strFile))); - } - } - } - } - - // Set the selected item - this.SkinLst.SelectedIndex = 0; - if (!string.IsNullOrEmpty(this.CurrentTab.SkinSrc)) - { - RadComboBoxItem selectItem = this.SkinLst.FindItemByValue(this.CurrentTab.SkinSrc); - if (selectItem != null) - { - selectItem.Selected = true; - } - } - } - - private RadComboBoxItem GetSeparatorItem() - { - return new RadComboBoxItem(this.GetString("SkinLstSeparator"), string.Empty) { CssClass = "SkinLstSeparator", Enabled = false }; - } - - private void LoadLocationList() - { - this.LocationLst.ClearSelection(); - this.LocationLst.Items.Clear(); - - // LocationLst.Items.Add(new ListItem(GetString("NoLocationSelection"), "")); - // LocationLst.Items.Add(new ListItem(GetString("Before"), "BEFORE")); - // LocationLst.Items.Add(new ListItem(GetString("After"), "AFTER")); - // LocationLst.Items.Add(new ListItem(GetString("Child"), "CHILD")); - this.LocationLst.AddItem(this.GetString("NoLocationSelection"), string.Empty); - this.LocationLst.AddItem(this.GetString("Before"), "BEFORE"); - this.LocationLst.AddItem(this.GetString("After"), "AFTER"); - this.LocationLst.AddItem(this.GetString("Child"), "CHILD"); - - this.LocationLst.SelectedIndex = 0; - } - - private void LoadPageList() - { - this.PageLst.ClearSelection(); - this.PageLst.Items.Clear(); - - this.PageLst.DataTextField = "IndentedTabName"; - this.PageLst.DataValueField = "TabID"; - this.PageLst.DataSource = RibbonBarManager.GetPagesList().Where(t => !this.IsParentTab(t, this.CurrentTab.TabID)); - this.PageLst.DataBind(); - - // PageLst.Items.Insert(0, new ListItem(GetString("NoPageSelection"), string.Empty)); - this.PageLst.InsertItem(0, this.GetString("NoPageSelection"), string.Empty); - this.PageLst.SelectedIndex = 0; - } - - private string GetString(string key) - { - return Localization.GetString(key, this.LocalResourceFile); - } - - private bool IsParentTab(TabInfo tab, int parentTabId) - { - while (tab != null) - { - if (tab.TabID == parentTabId) - { - return true; - } - - tab = tab.ParentId != Null.NullInteger ? TabController.Instance.GetTab(tab.ParentId, tab.PortalID, false) : null; - } - - return false; - } - } -} +namespace DotNetNuke.UI.ControlPanel +{ + using System; + using System.IO; + using System.Linq; + using System.Web.UI; + using System.Web.UI.WebControls; + + using DotNetNuke.Abstractions; + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Tabs; + using DotNetNuke.Security.Permissions; + using DotNetNuke.Services.Exceptions; + using DotNetNuke.Services.Localization; + using DotNetNuke.UI.Skins; + using DotNetNuke.Web.UI; + using DotNetNuke.Web.UI.WebControls; + using Microsoft.Extensions.DependencyInjection; + + public partial class UpdatePage : UserControl, IDnnRibbonBarTool + { + private readonly INavigationManager _navigationManager; + + private TabInfo _currentTab; + + public UpdatePage() + { + this._navigationManager = Globals.DependencyProvider.GetRequiredService(); + } + + public override bool Visible + { + get + { + return base.Visible && TabPermissionController.CanManagePage(); + } + + set + { + base.Visible = value; + } + } + + public string ToolName + { + get + { + return "QuickUpdatePage"; + } + + set + { + throw new NotSupportedException("Set ToolName not supported"); + } + } + + private static PortalSettings PortalSettings + { + get + { + return PortalSettings.Current; + } + } + + private TabInfo CurrentTab + { + get + { + // Weird - but the activetab has different skin src value than getting from the db + if (this._currentTab == null) + { + this._currentTab = TabController.Instance.GetTab(PortalSettings.ActiveTab.TabID, PortalSettings.ActiveTab.PortalID, false); + } + + return this._currentTab; + } + } + + private string LocalResourceFile + { + get + { + return string.Format("{0}/{1}/{2}.ascx.resx", this.TemplateSourceDirectory, Localization.LocalResourceDirectory, this.GetType().BaseType.Name); + } + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + + this.cmdUpdate.Click += this.CmdUpdateClick; + + try + { + if (this.Visible && !this.IsPostBack) + { + this.Name.Text = this.CurrentTab.TabName; + this.IncludeInMenu.Checked = this.CurrentTab.IsVisible; + this.IsDisabled.Checked = this.CurrentTab.DisableLink; + this.IsSecurePanel.Visible = PortalSettings.SSLEnabled; + this.IsSecure.Enabled = PortalSettings.SSLEnabled; + this.IsSecure.Checked = this.CurrentTab.IsSecure; + this.LoadAllLists(); + } + } + catch (Exception exc) + { + Exceptions.ProcessModuleLoadException(this, exc); + } + } + + protected void CmdUpdateClick(object sender, EventArgs e) + { + if (TabPermissionController.CanManagePage()) + { + TabInfo selectedTab = null; + if (!string.IsNullOrEmpty(this.PageLst.SelectedValue)) + { + int selectedTabID = int.Parse(this.PageLst.SelectedValue); + selectedTab = TabController.Instance.GetTab(selectedTabID, PortalSettings.ActiveTab.PortalID, false); + } + + TabRelativeLocation tabLocation = TabRelativeLocation.NOTSET; + if (!string.IsNullOrEmpty(this.LocationLst.SelectedValue)) + { + tabLocation = (TabRelativeLocation)Enum.Parse(typeof(TabRelativeLocation), this.LocationLst.SelectedValue); + } + + TabInfo tab = this.CurrentTab; + + tab.TabName = this.Name.Text; + tab.IsVisible = this.IncludeInMenu.Checked; + tab.DisableLink = this.IsDisabled.Checked; + tab.IsSecure = this.IsSecure.Checked; + tab.SkinSrc = this.SkinLst.SelectedValue; + + string errMsg = string.Empty; + try + { + RibbonBarManager.SaveTabInfoObject(tab, selectedTab, tabLocation, null); + } + catch (DotNetNukeException ex) + { + Exceptions.LogException(ex); + errMsg = (ex.ErrorCode != DotNetNukeErrorCode.NotSet) ? this.GetString("Err." + ex.ErrorCode) : ex.Message; + } + catch (Exception ex) + { + Exceptions.LogException(ex); + errMsg = ex.Message; + } + + // Clear the Tab's Cached modules + DataCache.ClearModuleCache(PortalSettings.ActiveTab.TabID); + + // Update Cached Tabs as TabPath may be needed before cache is cleared + TabInfo tempTab; + if (TabController.Instance.GetTabsByPortal(PortalSettings.ActiveTab.PortalID).TryGetValue(tab.TabID, out tempTab)) + { + tempTab.TabPath = tab.TabPath; + } + + if (string.IsNullOrEmpty(errMsg)) + { + this.Response.Redirect(this._navigationManager.NavigateURL(tab.TabID)); + } + else + { + errMsg = string.Format("

    {0}

    {1}

    ", this.GetString("Err.Header"), errMsg); + Web.UI.Utilities.RegisterAlertOnPageLoad(this, new MessageWindowParameters(errMsg) { Title = this.GetString("Err.Title") }); + } + } + } + + private static string FormatSkinName(string strSkinFolder, string strSkinFile) + { + if (strSkinFolder.ToLowerInvariant() == "_default") + { + return strSkinFile; + } + + switch (strSkinFile.ToLowerInvariant()) + { + case "skin": + case "container": + case "default": + return strSkinFolder; + default: + return strSkinFolder + " - " + strSkinFile; + } + } + + private void LoadAllLists() + { + this.LocationLst.Enabled = RibbonBarManager.CanMovePage(); + this.PageLst.Enabled = RibbonBarManager.CanMovePage(); + if (this.LocationLst.Enabled) + { + this.LoadLocationList(); + this.LoadPageList(); + } + + this.LoadSkinList(); + } + + private void LoadSkinList() + { + this.SkinLst.ClearSelection(); + this.SkinLst.Items.Clear(); + this.SkinLst.Items.Add(new ListItem(this.GetString("DefaultSkin"), string.Empty)); + + // load portal skins + var portalSkinsHeader = new ListItem(this.GetString("PortalSkins"), string.Empty) { Enabled = false, }; + portalSkinsHeader.Attributes["class"] = "SkinListHeader"; + this.SkinLst.Items.Add(portalSkinsHeader); + + string[] arrFolders; + string[] arrFiles; + string strLastFolder = string.Empty; + string strRoot = PortalSettings.HomeDirectoryMapPath + SkinController.RootSkin; + if (Directory.Exists(strRoot)) + { + arrFolders = Directory.GetDirectories(strRoot); + foreach (string strFolder in arrFolders) + { + arrFiles = Directory.GetFiles(strFolder, "*.ascx"); + foreach (string strFile in arrFiles) + { + string folder = strFolder.Substring(strFolder.LastIndexOf("\\") + 1); + if (strLastFolder != folder) + { + if (!string.IsNullOrEmpty(strLastFolder)) + { + this.SkinLst.Items.Add(this.GetSeparatorItem()); + } + + strLastFolder = folder; + } + + this.SkinLst.Items.Add(new ListItem( + FormatSkinName(folder, Path.GetFileNameWithoutExtension(strFile)), + "[L]" + SkinController.RootSkin + "/" + folder + "/" + Path.GetFileName(strFile))); + } + } + } + + // No portal skins added, remove the header + if (this.SkinLst.Items.Count == 2) + { + this.SkinLst.Items.RemoveAt(1); + } + + // load host skins + var hostSkinsHeader = new ListItem(this.GetString("HostSkins"), string.Empty) { Enabled = false, }; + hostSkinsHeader.Attributes["class"] = "SkinListHeader"; + this.SkinLst.Items.Add(hostSkinsHeader); + + strRoot = Globals.HostMapPath + SkinController.RootSkin; + if (Directory.Exists(strRoot)) + { + arrFolders = Directory.GetDirectories(strRoot); + foreach (string strFolder in arrFolders) + { + if (!strFolder.EndsWith(Globals.glbHostSkinFolder)) + { + arrFiles = Directory.GetFiles(strFolder, "*.ascx"); + foreach (string strFile in arrFiles) + { + string folder = strFolder.Substring(strFolder.LastIndexOf("\\") + 1); + if (strLastFolder != folder) + { + if (!string.IsNullOrEmpty(strLastFolder)) + { + this.SkinLst.Items.Add(this.GetSeparatorItem()); + } + + strLastFolder = folder; + } + + this.SkinLst.Items.Add(new ListItem( + FormatSkinName(folder, Path.GetFileNameWithoutExtension(strFile)), + "[G]" + SkinController.RootSkin + "/" + folder + "/" + Path.GetFileName(strFile))); + } + } + } + } + + // Set the selected item + this.SkinLst.SelectedIndex = 0; + if (!string.IsNullOrEmpty(this.CurrentTab.SkinSrc)) + { + ListItem selectItem = this.SkinLst.Items.FindByValue(this.CurrentTab.SkinSrc); + if (selectItem != null) + { + selectItem.Selected = true; + } + } + } + + private ListItem GetSeparatorItem() + { + var separatorItem = new ListItem(this.GetString("SkinLstSeparator"), string.Empty) { Enabled = false }; + separatorItem.Attributes["class"] = "SkinLstSeparator"; + return separatorItem; + } + + private void LoadLocationList() + { + this.LocationLst.ClearSelection(); + this.LocationLst.Items.Clear(); + + this.LocationLst.Items.Add(new ListItem(this.GetString("NoLocationSelection"), string.Empty)); + this.LocationLst.Items.Add(new ListItem(this.GetString("Before"), "BEFORE")); + this.LocationLst.Items.Add(new ListItem(this.GetString("After"), "AFTER")); + this.LocationLst.Items.Add(new ListItem(this.GetString("Child"), "CHILD")); + + this.LocationLst.SelectedIndex = 0; + } + + private void LoadPageList() + { + this.PageLst.ClearSelection(); + this.PageLst.Items.Clear(); + + this.PageLst.DataTextField = "IndentedTabName"; + this.PageLst.DataValueField = "TabID"; + this.PageLst.DataSource = RibbonBarManager.GetPagesList().Where(t => !this.IsParentTab(t, this.CurrentTab.TabID)); + this.PageLst.DataBind(); + + this.PageLst.Items.Insert(0, new ListItem(this.GetString("NoPageSelection"), string.Empty)); + this.PageLst.SelectedIndex = 0; + } + + private string GetString(string key) + { + return Localization.GetString(key, this.LocalResourceFile); + } + + private bool IsParentTab(TabInfo tab, int parentTabId) + { + while (tab != null) + { + if (tab.TabID == parentTabId) + { + return true; + } + + tab = tab.ParentId != Null.NullInteger ? TabController.Instance.GetTab(tab.ParentId, tab.PortalID, false) : null; + } + + return false; + } + } +} diff --git a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/UpdatePage.ascx.designer.cs b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/UpdatePage.ascx.designer.cs index ddb7a7d2e11..041006b2dda 100644 --- a/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/UpdatePage.ascx.designer.cs +++ b/DNN Platform/DotNetNuke.Website.Deprecated/admin/ControlPanel/UpdatePage.ascx.designer.cs @@ -1,136 +1,136 @@ -// -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the MIT License. See LICENSE file in the project root for full license information. -// -//------------------------------------------------------------------------------ -// -// 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 DotNetNuke.UI.ControlPanel { - - - public partial class UpdatePage { - - /// - /// Name control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox Name; - - /// - /// LocationLst control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox LocationLst; - - /// - /// PageLst control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox PageLst; - - /// - /// SkinLbl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label SkinLbl; - - /// - /// SkinLst control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnComboBox SkinLst; - - /// - /// IncludeInMenu control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox IncludeInMenu; - - /// - /// IncludeInMenuLbl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label IncludeInMenuLbl; - - /// - /// IsDisabled control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox IsDisabled; - - /// - /// DisabledLbl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label DisabledLbl; - - /// - /// IsSecurePanel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel IsSecurePanel; - - /// - /// IsSecureLbl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::DotNetNuke.Web.UI.WebControls.DnnFieldLabel IsSecureLbl; - - /// - /// IsSecure control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox IsSecure; - - /// - /// cmdUpdate control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.LinkButton cmdUpdate; - } -} +// +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the MIT License. See LICENSE file in the project root for full license information. +// +//------------------------------------------------------------------------------ +// +// 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 DotNetNuke.UI.ControlPanel { + + + public partial class UpdatePage { + + /// + /// Name control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox Name; + + /// + /// LocationLst control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList LocationLst; + + /// + /// PageLst control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList PageLst; + + /// + /// SkinLbl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label SkinLbl; + + /// + /// SkinLst control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList SkinLst; + + /// + /// IncludeInMenu control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox IncludeInMenu; + + /// + /// IncludeInMenuLbl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label IncludeInMenuLbl; + + /// + /// IsDisabled control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox IsDisabled; + + /// + /// DisabledLbl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label DisabledLbl; + + /// + /// IsSecurePanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel IsSecurePanel; + + /// + /// IsSecureLbl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnFieldLabel IsSecureLbl; + + /// + /// IsSecure control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox IsSecure; + + /// + /// cmdUpdate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton cmdUpdate; + } +} diff --git a/DNN Platform/DotNetNuke.Website.Deprecated/dnn_Website_Deprecated.dnn b/DNN Platform/DotNetNuke.Website.Deprecated/dnn_Website_Deprecated.dnn index c030295ab2e..65cc56a1302 100644 --- a/DNN Platform/DotNetNuke.Website.Deprecated/dnn_Website_Deprecated.dnn +++ b/DNN Platform/DotNetNuke.Website.Deprecated/dnn_Website_Deprecated.dnn @@ -1,6 +1,6 @@  - + DNN Deprecated Website Codebehind files DNN Deprecated Website Codebehind files for backward compability. diff --git a/DNN Platform/HttpModules/DotNetNuke.HttpModules.csproj b/DNN Platform/HttpModules/DotNetNuke.HttpModules.csproj index c9b9ec652a3..c61b606a527 100644 --- a/DNN Platform/HttpModules/DotNetNuke.HttpModules.csproj +++ b/DNN Platform/HttpModules/DotNetNuke.HttpModules.csproj @@ -72,6 +72,7 @@ SolutionInfo.cs
    + diff --git a/DNN Platform/HttpModules/Localization/LocalizationModule.cs b/DNN Platform/HttpModules/Localization/LocalizationModule.cs new file mode 100644 index 00000000000..677dbda172d --- /dev/null +++ b/DNN Platform/HttpModules/Localization/LocalizationModule.cs @@ -0,0 +1,57 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace DotNetNuke.HttpModules.Localization +{ + using System; + using System.Web; + + using DotNetNuke.Entities.Portals; + using DotNetNuke.Services.Localization; + + /// Sets up localization for all requests. + public class LocalizationModule : IHttpModule + { + /// + public void Init(HttpApplication context) + { + context.PreRequestHandlerExecute += Context_PreRequestHandlerExecute; + } + + /// + public void Dispose() + { + // intentionally left empty + } + + /// + /// The PreRequestHandlerExecute event happens after AuthenticateRequest. This means this code will + /// run after we know the identity of the user. This allows for the accurate retrieval of the locale + /// which depends not just on the site and page locale, but also on the user's preference. + /// + private static void Context_PreRequestHandlerExecute(object sender, EventArgs e) + { + // We need to ensure that we don't run this code when not requesting a page as otherwise we may not have + // an accurate portal identified (e.g. resources) + var isPage = HttpContext.Current.CurrentHandler is Framework.PageBase; + if (!isPage) + { + return; + } + + var isInstallPage = HttpContext.Current.Request.Url.LocalPath.ToLowerInvariant().Contains("installwizard.aspx"); + if (isInstallPage) + { + return; + } + + // The portalSettings should always be correct at this point, but in case we can't find a portal + // we need to insure we're not setting the thread locale. + var portalSettings = PortalController.Instance.GetCurrentSettings(); + if (portalSettings != null) + { + Localization.SetThreadCultures(Localization.GetPageLocale(portalSettings), portalSettings); + } + } + } +} diff --git a/DNN Platform/HttpModules/Membership/MembershipModule.cs b/DNN Platform/HttpModules/Membership/MembershipModule.cs index b5cda96f4fb..53b7716188b 100644 --- a/DNN Platform/HttpModules/Membership/MembershipModule.cs +++ b/DNN Platform/HttpModules/Membership/MembershipModule.cs @@ -1,6 +1,6 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information namespace DotNetNuke.HttpModules.Membership { using System; @@ -8,9 +8,10 @@ namespace DotNetNuke.HttpModules.Membership using System.Linq; using System.Security.Principal; using System.Text.RegularExpressions; + using System.Threading; using System.Web; using System.Web.Security; - + using DotNetNuke.Application; using DotNetNuke.Common; using DotNetNuke.Common.Utilities; @@ -25,10 +26,10 @@ namespace DotNetNuke.HttpModules.Membership using DotNetNuke.Security.Roles.Internal; using DotNetNuke.Services.Localization; using DotNetNuke.Services.Personalization; - using DotNetNuke.Services.UserRequest; + using DotNetNuke.Services.UserRequest; using DotNetNuke.UI.Skins.Controls; using DotNetNuke.UI.Skins.EventListeners; - + /// /// Information about membership. /// @@ -38,6 +39,19 @@ public class MembershipModule : IHttpModule private static readonly Regex NameRegex = new Regex(@"\w+[\\]+(?=)", RegexOptions.Compiled); + private static bool IsActiveDirectoryAuthHeaderPresent() + { + var auth = HttpContext.Current.Request.Headers.Get("Authorization"); + if (!string.IsNullOrEmpty(auth)) + { + if (auth.StartsWith("Negotiate")) + { + return true; + } + } + return false; + } + private static string _cultureCode; /// @@ -54,19 +68,6 @@ public string ModuleName } } - private static string CurrentCulture - { - get - { - if (string.IsNullOrEmpty(_cultureCode)) - { - _cultureCode = Localization.GetPageLocale(PortalSettings.Current).Name; - } - - return _cultureCode; - } - } - /// /// Called when unverified user skin initialize. /// @@ -74,7 +75,7 @@ private static string CurrentCulture /// The instance containing the event data. public static void OnUnverifiedUserSkinInit(object sender, SkinEventArgs e) { - var strMessage = Localization.GetString("UnverifiedUser", Localization.SharedResourceFile, CurrentCulture); + var strMessage = Localization.GetString("UnverifiedUser", Localization.SharedResourceFile, Thread.CurrentThread.CurrentCulture.Name); UI.Skins.Skin.AddPageMessage(e.Skin, string.Empty, strMessage, ModuleMessage.ModuleMessageType.YellowWarning); } @@ -97,17 +98,7 @@ public static void AuthenticateRequest(HttpContextBase context, bool allowUnknow // Obtain PortalSettings from Current Context PortalSettings portalSettings = PortalController.Instance.GetCurrentPortalSettings(); - bool isActiveDirectoryAuthHeaderPresent = false; - var auth = request.Headers.Get("Authorization"); - if (!string.IsNullOrEmpty(auth)) - { - if (auth.StartsWith("Negotiate")) - { - isActiveDirectoryAuthHeaderPresent = true; - } - } - - if (request.IsAuthenticated && !isActiveDirectoryAuthHeaderPresent && portalSettings != null) + if (request.IsAuthenticated && !IsActiveDirectoryAuthHeaderPresent() && portalSettings != null) { var user = UserController.GetCachedUser(portalSettings.PortalId, context.User.Identity.Name); @@ -134,17 +125,6 @@ public static void AuthenticateRequest(HttpContextBase context, bool allowUnknow return; } - if (!user.IsSuperUser && user.IsInRole("Unverified Users") && !HttpContext.Current.Items.Contains(DotNetNuke.UI.Skins.Skin.OnInitMessage)) - { - HttpContext.Current.Items.Add(DotNetNuke.UI.Skins.Skin.OnInitMessage, Localization.GetString("UnverifiedUser", Localization.SharedResourceFile, CurrentCulture)); - } - - if (!user.IsSuperUser && HttpContext.Current.Request.QueryString.AllKeys.Contains("VerificationSuccess") && !HttpContext.Current.Items.Contains(DotNetNuke.UI.Skins.Skin.OnInitMessage)) - { - HttpContext.Current.Items.Add(DotNetNuke.UI.Skins.Skin.OnInitMessage, Localization.GetString("VerificationSuccess", Localization.SharedResourceFile, CurrentCulture)); - HttpContext.Current.Items.Add(DotNetNuke.UI.Skins.Skin.OnInitMessageType, ModuleMessage.ModuleMessageType.GreenSuccess); - } - // if users LastActivityDate is outside of the UsersOnlineTimeWindow then record user activity if (DateTime.Compare(user.Membership.LastActivityDate.AddMinutes(Host.UsersOnlineTimeWindow), DateTime.Now) < 0) { @@ -196,6 +176,7 @@ public static void AuthenticateRequest(HttpContextBase context, bool allowUnknow public void Init(HttpApplication application) { application.AuthenticateRequest += this.OnAuthenticateRequest; + application.PreRequestHandlerExecute += this.Context_PreRequestHandlerExecute; application.PreSendRequestHeaders += this.OnPreSendRequestHeaders; } @@ -224,9 +205,9 @@ private static bool RequireLogout(HttpContextBase context, UserInfo user) } // if user's password changed after the user cookie created, then force user to login again. - DateTime? issueDate = null; - if (context.User.Identity is FormsIdentity formsIdentity) - { + DateTime? issueDate = null; + if (context.User.Identity is FormsIdentity formsIdentity) + { issueDate = formsIdentity.Ticket.IssueDate; } @@ -268,5 +249,25 @@ private void OnPreSendRequestHeaders(object sender, EventArgs e) } } } + + private void Context_PreRequestHandlerExecute(object sender, EventArgs e) + { + var portalSettings = PortalController.Instance.GetCurrentPortalSettings(); + var request = HttpContext.Current.Request; + var user = UserController.Instance.GetCurrentUserInfo(); + if (request.IsAuthenticated && !IsActiveDirectoryAuthHeaderPresent() && portalSettings != null) + { + if (!user.IsSuperUser && user.IsInRole("Unverified Users") && !HttpContext.Current.Items.Contains(DotNetNuke.UI.Skins.Skin.OnInitMessage)) + { + HttpContext.Current.Items.Add(DotNetNuke.UI.Skins.Skin.OnInitMessage, Localization.GetString("UnverifiedUser", Localization.SharedResourceFile, Thread.CurrentThread.CurrentCulture.Name)); + } + + if (!user.IsSuperUser && HttpContext.Current.Request.QueryString.AllKeys.Contains("VerificationSuccess") && !HttpContext.Current.Items.Contains(DotNetNuke.UI.Skins.Skin.OnInitMessage)) + { + HttpContext.Current.Items.Add(DotNetNuke.UI.Skins.Skin.OnInitMessage, Localization.GetString("VerificationSuccess", Localization.SharedResourceFile, Thread.CurrentThread.CurrentCulture.Name)); + HttpContext.Current.Items.Add(DotNetNuke.UI.Skins.Skin.OnInitMessageType, ModuleMessage.ModuleMessageType.GreenSuccess); + } + } + } } } diff --git a/DNN Platform/Library/Common/Initialize.cs b/DNN Platform/Library/Common/Initialize.cs index 1a887faea62..409e785427d 100644 --- a/DNN Platform/Library/Common/Initialize.cs +++ b/DNN Platform/Library/Common/Initialize.cs @@ -1,507 +1,505 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Common -{ - using System; - using System.Collections; - using System.IO; - using System.Reflection; - using System.Threading; - using System.Web; - using System.Web.Hosting; - - using DotNetNuke.Common.Internal; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Data; - using DotNetNuke.Entities.Host; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Entities.Urls; - using DotNetNuke.Instrumentation; - using DotNetNuke.Services.Connections; - using DotNetNuke.Services.EventQueue; - using DotNetNuke.Services.Exceptions; - using DotNetNuke.Services.FileSystem; - using DotNetNuke.Services.Installer.Blocker; - using DotNetNuke.Services.Log.EventLog; - using DotNetNuke.Services.Scheduling; - using DotNetNuke.Services.Upgrade; - using DotNetNuke.UI.Modules; +namespace DotNetNuke.Common +{ + using System; + using System.Collections; + using System.IO; + using System.Reflection; + using System.Threading; + using System.Web; + using System.Web.Hosting; + + using DotNetNuke.Common.Internal; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Data; + using DotNetNuke.Entities.Host; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Urls; + using DotNetNuke.Instrumentation; + using DotNetNuke.Services.Connections; + using DotNetNuke.Services.EventQueue; + using DotNetNuke.Services.Exceptions; + using DotNetNuke.Services.FileSystem; + using DotNetNuke.Services.Installer.Blocker; + using DotNetNuke.Services.Log.EventLog; + using DotNetNuke.Services.Scheduling; + using DotNetNuke.Services.Upgrade; + using DotNetNuke.UI.Modules; using Microsoft.Win32; - /// - /// The Object to initialize application. - /// - public class Initialize - { - private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(Initialize)); - private static readonly object InitializeLock = new object(); - private static bool InitializedAlready; - - /// ----------------------------------------------------------------------------- - /// - /// Inits the app. - /// - /// The app. - /// ----------------------------------------------------------------------------- - public static void Init(HttpApplication app) - { - string redirect; - - // Check if app is initialised - if (InitializedAlready && Globals.Status == Globals.UpgradeStatus.None) - { - return; - } - - lock (InitializeLock) - { - // Double-Check if app was initialised by another request - if (InitializedAlready && Globals.Status == Globals.UpgradeStatus.None) - { - return; - } - - // Initialize ... - redirect = InitializeApp(app, ref InitializedAlready); - } - - if (!string.IsNullOrEmpty(redirect)) - { - app.Response.Redirect(redirect, true); - } - } - - /// ----------------------------------------------------------------------------- - /// - /// LogStart logs the Application Start Event. - /// - /// ----------------------------------------------------------------------------- - public static void LogStart() - { - var log = new LogInfo - { - BypassBuffering = true, - LogTypeKey = EventLogController.EventLogType.APPLICATION_START.ToString(), - }; - LogController.Instance.AddLog(log); - } - - /// ----------------------------------------------------------------------------- - /// - /// LogEnd logs the Application Start Event. - /// - /// ----------------------------------------------------------------------------- - public static void LogEnd() - { - try - { - ApplicationShutdownReason shutdownReason = HostingEnvironment.ShutdownReason; - string shutdownDetail; - switch (shutdownReason) - { - case ApplicationShutdownReason.BinDirChangeOrDirectoryRename: - shutdownDetail = "The AppDomain shut down because of a change to the Bin folder or files contained in it."; - break; - case ApplicationShutdownReason.BrowsersDirChangeOrDirectoryRename: - shutdownDetail = "The AppDomain shut down because of a change to the App_Browsers folder or files contained in it."; - break; - case ApplicationShutdownReason.ChangeInGlobalAsax: - shutdownDetail = "The AppDomain shut down because of a change to Global.asax."; - break; - case ApplicationShutdownReason.ChangeInSecurityPolicyFile: - shutdownDetail = "The AppDomain shut down because of a change in the code access security policy file."; - break; - case ApplicationShutdownReason.CodeDirChangeOrDirectoryRename: - shutdownDetail = "The AppDomain shut down because of a change to the App_Code folder or files contained in it."; - break; - case ApplicationShutdownReason.ConfigurationChange: - shutdownDetail = "The AppDomain shut down because of a change to the application level configuration."; - break; - case ApplicationShutdownReason.HostingEnvironment: - shutdownDetail = "The AppDomain shut down because of the hosting environment."; - break; - case ApplicationShutdownReason.HttpRuntimeClose: - shutdownDetail = "The AppDomain shut down because of a call to Close."; - break; - case ApplicationShutdownReason.IdleTimeout: - shutdownDetail = "The AppDomain shut down because of the maximum allowed idle time limit."; - break; - case ApplicationShutdownReason.InitializationError: - shutdownDetail = "The AppDomain shut down because of an AppDomain initialization error."; - break; - case ApplicationShutdownReason.MaxRecompilationsReached: - shutdownDetail = "The AppDomain shut down because of the maximum number of dynamic recompiles of resources limit."; - break; - case ApplicationShutdownReason.PhysicalApplicationPathChanged: - shutdownDetail = "The AppDomain shut down because of a change to the physical path for the application."; - break; - case ApplicationShutdownReason.ResourcesDirChangeOrDirectoryRename: - shutdownDetail = "The AppDomain shut down because of a change to the App_GlobalResources folder or files contained in it."; - break; - case ApplicationShutdownReason.UnloadAppDomainCalled: - shutdownDetail = "The AppDomain shut down because of a call to UnloadAppDomain."; - break; - default: - shutdownDetail = "Shutdown reason: " + shutdownReason; - break; - } - - var log = new LogInfo - { - BypassBuffering = true, - LogTypeKey = EventLogController.EventLogType.APPLICATION_SHUTTING_DOWN.ToString(), - }; - log.AddProperty("Shutdown Details", shutdownDetail); - LogController.Instance.AddLog(log); - - // enhanced shutdown logging - var runtime = typeof(HttpRuntime).InvokeMember( - "_theRuntime", - BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.GetField, - null, null, null) as HttpRuntime; - - if (runtime == null) - { - Logger.InfoFormat("Application shutting down. Reason: {0}", shutdownDetail); - } - else - { - var shutDownMessage = runtime.GetType().InvokeMember( - "_shutDownMessage", - BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField, - null, runtime, null) as string; - - var shutDownStack = runtime.GetType().InvokeMember( - "_shutDownStack", - BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField, - null, runtime, null) as string; - - Logger.Info("Application shutting down. Reason: " + shutdownDetail - + Environment.NewLine + "ASP.NET Shutdown Info: " + shutDownMessage - + Environment.NewLine + shutDownStack); - } - } - catch (Exception exc) - { - Exceptions.LogException(exc); - } - - if (Globals.Status != Globals.UpgradeStatus.Install) - { - // purge log buffer - LoggingProvider.Instance().PurgeLogBuffer(); - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Tests whether this request should be processed in an HttpModule. - /// - /// - /// ----------------------------------------------------------------------------- - public static bool ProcessHttpModule(HttpRequest request, bool allowUnknownExtensions, bool checkOmitFromRewriteProcessing) - { - var toLowerLocalPath = request.Url.LocalPath.ToLowerInvariant(); - - if (toLowerLocalPath.EndsWith("webresource.axd") - || toLowerLocalPath.EndsWith("scriptresource.axd") - || toLowerLocalPath.EndsWith("captcha.aspx") - || toLowerLocalPath.Contains("upgradewizard.aspx") - || toLowerLocalPath.Contains("installwizard.aspx") - || toLowerLocalPath.EndsWith("install.aspx")) - { - return false; - } - - if (allowUnknownExtensions == false - && toLowerLocalPath.EndsWith(".aspx") == false - && toLowerLocalPath.EndsWith(".asmx") == false - && toLowerLocalPath.EndsWith(".ashx") == false - && toLowerLocalPath.EndsWith(".svc") == false) - { - return false; - } - - return !checkOmitFromRewriteProcessing || !RewriterUtils.OmitFromRewriteProcessing(request.Url.LocalPath); - } - - public static void RunSchedule(HttpRequest request) - { - if (!IsUpgradeOrInstallRequest(request)) - { - try - { - if (SchedulingProvider.SchedulerMode == SchedulerMode.REQUEST_METHOD && SchedulingProvider.ReadyForPoll) - { - Logger.Trace("Running Schedule " + SchedulingProvider.SchedulerMode); - var scheduler = SchedulingProvider.Instance(); - var requestScheduleThread = new Thread(scheduler.ExecuteTasks) { IsBackground = true }; - requestScheduleThread.Start(); - SchedulingProvider.ScheduleLastPolled = DateTime.Now; - } - } - catch (Exception exc) - { - Exceptions.LogException(exc); - } - } - } - - /// ----------------------------------------------------------------------------- - /// - /// StartScheduler starts the Scheduler. - /// - /// Whether reset app start elapse time before running schedule tasks. - /// - /// - /// ----------------------------------------------------------------------------- - public static void StartScheduler(bool resetAppStartElapseTime = false) - { - if (resetAppStartElapseTime) - { - Globals.ResetAppStartElapseTime(); - } - - var scheduler = SchedulingProvider.Instance(); - scheduler.RunEventSchedule(EventName.APPLICATION_START); - - // instantiate APPLICATION_START scheduled jobs - if (SchedulingProvider.SchedulerMode == SchedulerMode.TIMER_METHOD) - { - Logger.Trace("Running Schedule " + SchedulingProvider.SchedulerMode); - var newThread = new Thread(scheduler.Start) - { - IsBackground = true, - Name = "Scheduler Thread", - }; - newThread.Start(); - } - } - - /// ----------------------------------------------------------------------------- - /// - /// StopScheduler stops the Scheduler. - /// - /// - /// - /// ----------------------------------------------------------------------------- - public static void StopScheduler() - { - // stop scheduled jobs - SchedulingProvider.Instance().Halt("Stopped by Application_End"); - } - - private static string CheckVersion(HttpApplication app) - { - HttpServerUtility Server = app.Server; - - bool autoUpgrade = Config.GetSetting("AutoUpgrade") == null || bool.Parse(Config.GetSetting("AutoUpgrade")); - bool useWizard = Config.GetSetting("UseInstallWizard") == null || bool.Parse(Config.GetSetting("UseInstallWizard")); - - // Determine the Upgrade status and redirect as neccessary to InstallWizard.aspx - string retValue = Null.NullString; - switch (Globals.Status) - { - case Globals.UpgradeStatus.Install: - if (autoUpgrade || useWizard) - { - retValue = useWizard ? "~/Install/InstallWizard.aspx" : "~/Install/Install.aspx?mode=install"; - } - else - { - CreateUnderConstructionPage(Server); - retValue = "~/Install/UnderConstruction.htm"; - Logger.Info("UnderConstruction page was shown because application needs to be installed, and both the AutoUpgrade and UseWizard AppSettings in web.config are false. Use /install/install.aspx?mode=install to install application. "); - } - - break; - case Globals.UpgradeStatus.Upgrade: - if (autoUpgrade || useWizard) - { - retValue = useWizard ? "~/Install/UpgradeWizard.aspx" : "~/Install/Install.aspx?mode=upgrade"; - } - else - { - CreateUnderConstructionPage(Server); - retValue = "~/Install/UnderConstruction.htm"; - Logger.Info("UnderConstruction page was shown because application needs to be upgraded, and both the AutoUpgrade and UseInstallWizard AppSettings in web.config are false. Use /install/install.aspx?mode=upgrade to upgrade application. "); - } - - break; - case Globals.UpgradeStatus.Error: - // here we need to check if the application is already installed - // or is in pre-install state. - // see http://support.dotnetnuke.com/project/DNN/2/item/26053 for scenarios - bool isInstalled = Globals.IsInstalled(); - - if (!isInstalled && (useWizard || autoUpgrade)) - { - // app has never been installed, and either Wizard or Autoupgrade is configured - CreateUnderConstructionPage(Server); - retValue = "~/Install/UnderConstruction.htm"; - Logger.Error("UnderConstruction page was shown because we cannot ascertain the application was ever installed, and there is no working database connection. Check database connectivity before continuing. "); - } - else - { - // 500 Error - Redirect to ErrorPage - if (HttpContext.Current != null) - { - if (!isInstalled) - { - Logger.Error("The connection to the database has failed, the application is not installed yet, and both AutoUpgrade and UseInstallWizard are not set in web.config, a 500 error page will be shown to visitors"); - } - else - { - Logger.Error("The connection to the database has failed, however, the application is already completely installed, a 500 error page will be shown to visitors"); - } - - string url = "~/ErrorPage.aspx?status=500&error=Site Unavailable&error2=Connection To The Database Failed"; - HttpContext.Current.Response.Clear(); - HttpContext.Current.Server.Transfer(url); - } - } - - break; - } - - return retValue; - } - - private static void CreateUnderConstructionPage(HttpServerUtility server) - { - // create an UnderConstruction page if it does not exist already - if (!File.Exists(server.MapPath("~/Install/UnderConstruction.htm"))) - { - if (File.Exists(server.MapPath("~/Install/UnderConstruction.template.htm"))) - { - File.Copy(server.MapPath("~/Install/UnderConstruction.template.htm"), server.MapPath("~/Install/UnderConstruction.htm")); - } - } - } - - private static Version GetDatabaseEngineVersion() - { - return DataProvider.Instance().GetDatabaseEngineVersion(); - } - - private static Version GetNETFrameworkVersion() - { - // Obtain the .NET Framework version, 9.4.0 and later requires .NET 4.7.2 or later - var version = Environment.Version.ToString(2); - - // If unknown version return as is. - if (version != "4.0") - { - return new Version(version); - } - - // Otherwise utilize release DWORD from registry to determine version - // Reference List: https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies - var release = GetDotNet4ReleaseNumberFromRegistry(); - if (release >= 528040) - { - version = "4.8"; - } - else - { - version = "4.7.2"; - } - - return new Version(version); - } - - private static int GetDotNet4ReleaseNumberFromRegistry() - { - try - { - using (var ndpKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32) - .OpenSubKey(@"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\")) - { - if (ndpKey?.GetValue("Release") != null) - { - return (int)ndpKey.GetValue("Release"); - } - } - } - catch (Exception) - { - // ignore - } - - return -1; - } - - private static string InitializeApp(HttpApplication app, ref bool initialized) - { - var request = app.Request; - var redirect = Null.NullString; - - Logger.Trace("Request " + request.Url.LocalPath); - - // Don't process some of the AppStart methods if we are installing - if (!IsUpgradeOrInstallRequest(app.Request)) - { - // Check whether the current App Version is the same as the DB Version - redirect = CheckVersion(app); - if (string.IsNullOrEmpty(redirect) && !InstallBlocker.Instance.IsInstallInProgress()) - { - Logger.Info("Application Initializing"); - - // Set globals - Globals.IISAppName = request.ServerVariables["APPL_MD_PATH"]; - Globals.OperatingSystemVersion = Environment.OSVersion.Version; - Globals.NETFrameworkVersion = GetNETFrameworkVersion(); - Globals.DatabaseEngineVersion = GetDatabaseEngineVersion(); - - // Try and Upgrade to Current Framewok - Upgrade.TryUpgradeNETFramework(); - Upgrade.CheckFipsCompilanceAssemblies(); - - // Log Server information - ServerController.UpdateServerActivity(new ServerInfo()); - - // Start Scheduler - StartScheduler(); - - // Log Application Start - LogStart(); - - // Process any messages in the EventQueue for the Application_Start event - EventQueueController.ProcessMessages("Application_Start"); - - ServicesRoutingManager.RegisterServiceRoutes(); - - ModuleInjectionManager.RegisterInjectionFilters(); - - ConnectionsManager.Instance.RegisterConnections(); - - // Set Flag so we can determine the first Page Request after Application Start - app.Context.Items.Add("FirstRequest", true); - - Logger.Info("Application Initialized"); - - initialized = true; - } - } - else - { - // NET Framework version is neeed by Upgrade - Globals.NETFrameworkVersion = GetNETFrameworkVersion(); - Globals.IISAppName = request.ServerVariables["APPL_MD_PATH"]; - Globals.OperatingSystemVersion = Environment.OSVersion.Version; - } - - return redirect; - } - - private static bool IsUpgradeOrInstallRequest(HttpRequest request) - { - var url = request.Url.LocalPath.ToLowerInvariant(); - - return url.EndsWith("/install.aspx") - || url.Contains("/upgradewizard.aspx") - || url.Contains("/installwizard.aspx"); - } - } -} + /// + /// The Object to initialize application. + /// + public class Initialize + { + private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(Initialize)); + private static readonly object InitializeLock = new object(); + private static bool InitializedAlready; + + /// ----------------------------------------------------------------------------- + /// + /// Inits the app. + /// + /// The app. + /// ----------------------------------------------------------------------------- + public static void Init(HttpApplication app) + { + string redirect; + + // Check if app is initialised + if (InitializedAlready && Globals.Status == Globals.UpgradeStatus.None) + { + return; + } + + lock (InitializeLock) + { + // Double-Check if app was initialised by another request + if (InitializedAlready && Globals.Status == Globals.UpgradeStatus.None) + { + return; + } + + // Initialize ... + redirect = InitializeApp(app, ref InitializedAlready); + } + + if (!string.IsNullOrEmpty(redirect)) + { + app.Response.Redirect(redirect, true); + } + } + + /// ----------------------------------------------------------------------------- + /// + /// LogStart logs the Application Start Event. + /// + /// ----------------------------------------------------------------------------- + public static void LogStart() + { + var log = new LogInfo + { + BypassBuffering = true, + LogTypeKey = EventLogController.EventLogType.APPLICATION_START.ToString(), + }; + LogController.Instance.AddLog(log); + } + + /// ----------------------------------------------------------------------------- + /// + /// LogEnd logs the Application Start Event. + /// + /// ----------------------------------------------------------------------------- + public static void LogEnd() + { + try + { + ApplicationShutdownReason shutdownReason = HostingEnvironment.ShutdownReason; + string shutdownDetail; + switch (shutdownReason) + { + case ApplicationShutdownReason.BinDirChangeOrDirectoryRename: + shutdownDetail = "The AppDomain shut down because of a change to the Bin folder or files contained in it."; + break; + case ApplicationShutdownReason.BrowsersDirChangeOrDirectoryRename: + shutdownDetail = "The AppDomain shut down because of a change to the App_Browsers folder or files contained in it."; + break; + case ApplicationShutdownReason.ChangeInGlobalAsax: + shutdownDetail = "The AppDomain shut down because of a change to Global.asax."; + break; + case ApplicationShutdownReason.ChangeInSecurityPolicyFile: + shutdownDetail = "The AppDomain shut down because of a change in the code access security policy file."; + break; + case ApplicationShutdownReason.CodeDirChangeOrDirectoryRename: + shutdownDetail = "The AppDomain shut down because of a change to the App_Code folder or files contained in it."; + break; + case ApplicationShutdownReason.ConfigurationChange: + shutdownDetail = "The AppDomain shut down because of a change to the application level configuration."; + break; + case ApplicationShutdownReason.HostingEnvironment: + shutdownDetail = "The AppDomain shut down because of the hosting environment."; + break; + case ApplicationShutdownReason.HttpRuntimeClose: + shutdownDetail = "The AppDomain shut down because of a call to Close."; + break; + case ApplicationShutdownReason.IdleTimeout: + shutdownDetail = "The AppDomain shut down because of the maximum allowed idle time limit."; + break; + case ApplicationShutdownReason.InitializationError: + shutdownDetail = "The AppDomain shut down because of an AppDomain initialization error."; + break; + case ApplicationShutdownReason.MaxRecompilationsReached: + shutdownDetail = "The AppDomain shut down because of the maximum number of dynamic recompiles of resources limit."; + break; + case ApplicationShutdownReason.PhysicalApplicationPathChanged: + shutdownDetail = "The AppDomain shut down because of a change to the physical path for the application."; + break; + case ApplicationShutdownReason.ResourcesDirChangeOrDirectoryRename: + shutdownDetail = "The AppDomain shut down because of a change to the App_GlobalResources folder or files contained in it."; + break; + case ApplicationShutdownReason.UnloadAppDomainCalled: + shutdownDetail = "The AppDomain shut down because of a call to UnloadAppDomain."; + break; + default: + shutdownDetail = "Shutdown reason: " + shutdownReason; + break; + } + + var log = new LogInfo + { + BypassBuffering = true, + LogTypeKey = EventLogController.EventLogType.APPLICATION_SHUTTING_DOWN.ToString(), + }; + log.AddProperty("Shutdown Details", shutdownDetail); + LogController.Instance.AddLog(log); + + // enhanced shutdown logging + var runtime = typeof(HttpRuntime).InvokeMember( + "_theRuntime", + BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.GetField, + null, null, null) as HttpRuntime; + + if (runtime == null) + { + Logger.InfoFormat("Application shutting down. Reason: {0}", shutdownDetail); + } + else + { + var shutDownMessage = runtime.GetType().InvokeMember( + "_shutDownMessage", + BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField, + null, runtime, null) as string; + + var shutDownStack = runtime.GetType().InvokeMember( + "_shutDownStack", + BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField, + null, runtime, null) as string; + + Logger.Info("Application shutting down. Reason: " + shutdownDetail + + Environment.NewLine + "ASP.NET Shutdown Info: " + shutDownMessage + + Environment.NewLine + shutDownStack); + } + } + catch (Exception exc) + { + Exceptions.LogException(exc); + } + + if (Globals.Status != Globals.UpgradeStatus.Install) + { + // purge log buffer + LoggingProvider.Instance().PurgeLogBuffer(); + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Tests whether this request should be processed in an HttpModule. + /// + /// + /// ----------------------------------------------------------------------------- + public static bool ProcessHttpModule(HttpRequest request, bool allowUnknownExtensions, bool checkOmitFromRewriteProcessing) + { + var toLowerLocalPath = request.Url.LocalPath.ToLowerInvariant(); + + if (toLowerLocalPath.EndsWith("webresource.axd") + || toLowerLocalPath.EndsWith("scriptresource.axd") + || toLowerLocalPath.EndsWith("captcha.aspx") + || toLowerLocalPath.Contains("upgradewizard.aspx") + || toLowerLocalPath.Contains("installwizard.aspx") + || toLowerLocalPath.EndsWith("install.aspx")) + { + return false; + } + + if (allowUnknownExtensions == false + && toLowerLocalPath.EndsWith(".aspx") == false + && toLowerLocalPath.EndsWith(".asmx") == false + && toLowerLocalPath.EndsWith(".ashx") == false + && toLowerLocalPath.EndsWith(".svc") == false) + { + return false; + } + + return !checkOmitFromRewriteProcessing || !RewriterUtils.OmitFromRewriteProcessing(request.Url.LocalPath); + } + + public static void RunSchedule(HttpRequest request) + { + if (!IsUpgradeOrInstallRequest(request)) + { + try + { + if (SchedulingProvider.SchedulerMode == SchedulerMode.REQUEST_METHOD && SchedulingProvider.ReadyForPoll) + { + Logger.Trace("Running Schedule " + SchedulingProvider.SchedulerMode); + var scheduler = SchedulingProvider.Instance(); + var requestScheduleThread = new Thread(scheduler.ExecuteTasks) { IsBackground = true }; + requestScheduleThread.Start(); + SchedulingProvider.ScheduleLastPolled = DateTime.Now; + } + } + catch (Exception exc) + { + Exceptions.LogException(exc); + } + } + } + + /// ----------------------------------------------------------------------------- + /// + /// StartScheduler starts the Scheduler. + /// + /// Whether reset app start elapse time before running schedule tasks. + /// + /// + /// ----------------------------------------------------------------------------- + public static void StartScheduler(bool resetAppStartElapseTime = false) + { + if (resetAppStartElapseTime) + { + Globals.ResetAppStartElapseTime(); + } + + var scheduler = SchedulingProvider.Instance(); + scheduler.RunEventSchedule(EventName.APPLICATION_START); + + // instantiate APPLICATION_START scheduled jobs + if (SchedulingProvider.SchedulerMode == SchedulerMode.TIMER_METHOD) + { + Logger.Trace("Running Schedule " + SchedulingProvider.SchedulerMode); + var newThread = new Thread(scheduler.Start) + { + IsBackground = true, + Name = "Scheduler Thread", + }; + newThread.Start(); + } + } + + /// ----------------------------------------------------------------------------- + /// + /// StopScheduler stops the Scheduler. + /// + /// + /// + /// ----------------------------------------------------------------------------- + public static void StopScheduler() + { + // stop scheduled jobs + SchedulingProvider.Instance().Halt("Stopped by Application_End"); + } + + private static string CheckVersion(HttpApplication app) + { + HttpServerUtility Server = app.Server; + + bool autoUpgrade = Config.GetSetting("AutoUpgrade") == null || bool.Parse(Config.GetSetting("AutoUpgrade")); + bool useWizard = Config.GetSetting("UseInstallWizard") == null || bool.Parse(Config.GetSetting("UseInstallWizard")); + + // Determine the Upgrade status and redirect as neccessary to InstallWizard.aspx + string retValue = Null.NullString; + switch (Globals.Status) + { + case Globals.UpgradeStatus.Install: + if (autoUpgrade || useWizard) + { + retValue = useWizard ? "~/Install/InstallWizard.aspx" : "~/Install/Install.aspx?mode=install"; + } + else + { + CreateUnderConstructionPage(Server); + retValue = "~/Install/UnderConstruction.htm"; + Logger.Info("UnderConstruction page was shown because application needs to be installed, and both the AutoUpgrade and UseWizard AppSettings in web.config are false. Use /install/install.aspx?mode=install to install application. "); + } + + break; + case Globals.UpgradeStatus.Upgrade: + if (autoUpgrade || useWizard) + { + retValue = useWizard ? "~/Install/UpgradeWizard.aspx" : "~/Install/Install.aspx?mode=upgrade"; + } + else + { + CreateUnderConstructionPage(Server); + retValue = "~/Install/UnderConstruction.htm"; + Logger.Info("UnderConstruction page was shown because application needs to be upgraded, and both the AutoUpgrade and UseInstallWizard AppSettings in web.config are false. Use /install/install.aspx?mode=upgrade to upgrade application. "); + } + + break; + case Globals.UpgradeStatus.Error: + // here we need to check if the application is already installed + // or is in pre-install state. + // see http://support.dotnetnuke.com/project/DNN/2/item/26053 for scenarios + bool isInstalled = Globals.IsInstalled(); + + if (!isInstalled && (useWizard || autoUpgrade)) + { + // app has never been installed, and either Wizard or Autoupgrade is configured + CreateUnderConstructionPage(Server); + retValue = "~/Install/UnderConstruction.htm"; + Logger.Error("UnderConstruction page was shown because we cannot ascertain the application was ever installed, and there is no working database connection. Check database connectivity before continuing. "); + } + else + { + // 500 Error - Redirect to ErrorPage + if (HttpContext.Current != null) + { + if (!isInstalled) + { + Logger.Error("The connection to the database has failed, the application is not installed yet, and both AutoUpgrade and UseInstallWizard are not set in web.config, a 500 error page will be shown to visitors"); + } + else + { + Logger.Error("The connection to the database has failed, however, the application is already completely installed, a 500 error page will be shown to visitors"); + } + + string url = "~/ErrorPage.aspx?status=500&error=Site Unavailable&error2=Connection To The Database Failed"; + HttpContext.Current.Response.Clear(); + HttpContext.Current.Server.Transfer(url); + } + } + + break; + } + + return retValue; + } + + private static void CreateUnderConstructionPage(HttpServerUtility server) + { + // create an UnderConstruction page if it does not exist already + if (!File.Exists(server.MapPath("~/Install/UnderConstruction.htm"))) + { + if (File.Exists(server.MapPath("~/Install/UnderConstruction.template.htm"))) + { + File.Copy(server.MapPath("~/Install/UnderConstruction.template.htm"), server.MapPath("~/Install/UnderConstruction.htm")); + } + } + } + + private static Version GetDatabaseEngineVersion() + { + return DataProvider.Instance().GetDatabaseEngineVersion(); + } + + private static Version GetNETFrameworkVersion() + { + // Obtain the .NET Framework version, 9.4.0 and later requires .NET 4.7.2 or later + var version = Environment.Version.ToString(2); + + // If unknown version return as is. + if (version != "4.0") + { + return new Version(version); + } + + // Otherwise utilize release DWORD from registry to determine version + // Reference List: https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies + var release = GetDotNet4ReleaseNumberFromRegistry(); + if (release >= 528040) + { + version = "4.8"; + } + else + { + version = "4.7.2"; + } + + return new Version(version); + } + + private static int GetDotNet4ReleaseNumberFromRegistry() + { + try + { + using (var ndpKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32) + .OpenSubKey(@"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\")) + { + if (ndpKey?.GetValue("Release") != null) + { + return (int)ndpKey.GetValue("Release"); + } + } + } + catch (Exception) + { + // ignore + } + + return -1; + } + + private static string InitializeApp(HttpApplication app, ref bool initialized) + { + var request = app.Request; + var redirect = Null.NullString; + + Logger.Trace("Request " + request.Url.LocalPath); + + // Don't process some of the AppStart methods if we are installing + if (!IsUpgradeOrInstallRequest(app.Request)) + { + // Check whether the current App Version is the same as the DB Version + redirect = CheckVersion(app); + if (string.IsNullOrEmpty(redirect) && !InstallBlocker.Instance.IsInstallInProgress()) + { + Logger.Info("Application Initializing"); + + // Set globals + Globals.IISAppName = request.ServerVariables["APPL_MD_PATH"]; + Globals.OperatingSystemVersion = Environment.OSVersion.Version; + Globals.NETFrameworkVersion = GetNETFrameworkVersion(); + Globals.DatabaseEngineVersion = GetDatabaseEngineVersion(); + + Upgrade.CheckFipsCompilanceAssemblies(); + + // Log Server information + ServerController.UpdateServerActivity(new ServerInfo()); + + // Start Scheduler + StartScheduler(); + + // Log Application Start + LogStart(); + + // Process any messages in the EventQueue for the Application_Start event + EventQueueController.ProcessMessages("Application_Start"); + + ServicesRoutingManager.RegisterServiceRoutes(); + + ModuleInjectionManager.RegisterInjectionFilters(); + + ConnectionsManager.Instance.RegisterConnections(); + + // Set Flag so we can determine the first Page Request after Application Start + app.Context.Items.Add("FirstRequest", true); + + Logger.Info("Application Initialized"); + + initialized = true; + } + } + else + { + // NET Framework version is neeed by Upgrade + Globals.NETFrameworkVersion = GetNETFrameworkVersion(); + Globals.IISAppName = request.ServerVariables["APPL_MD_PATH"]; + Globals.OperatingSystemVersion = Environment.OSVersion.Version; + } + + return redirect; + } + + private static bool IsUpgradeOrInstallRequest(HttpRequest request) + { + var url = request.Url.LocalPath.ToLowerInvariant(); + + return url.EndsWith("/install.aspx") + || url.Contains("/upgradewizard.aspx") + || url.Contains("/installwizard.aspx"); + } + } +} diff --git a/DNN Platform/Library/Common/Utilities/PathUtils.cs b/DNN Platform/Library/Common/Utilities/PathUtils.cs index 89604de5846..b2548c7db73 100644 --- a/DNN Platform/Library/Common/Utilities/PathUtils.cs +++ b/DNN Platform/Library/Common/Utilities/PathUtils.cs @@ -222,7 +222,7 @@ public virtual string RemoveTrailingSlash(string source) } /// - /// Strips the original path by removing starting 0 or 0\\. + /// Strips the original path by removing starting 0\\. /// /// The original path. /// The stripped path. @@ -235,7 +235,7 @@ public virtual string StripFolderPath(string originalPath) return FolderPathRx.Replace(originalPath, string.Empty); } - return originalPath.StartsWith("0") ? originalPath.Substring(1) : originalPath; + return originalPath; } internal string GetUserFolderPathElementInternal(int userId, UserFolderElement mode) diff --git a/DNN Platform/Library/Common/Utilities/ValidationUtils.cs b/DNN Platform/Library/Common/Utilities/ValidationUtils.cs index 956d8294068..7ce68a344b3 100644 --- a/DNN Platform/Library/Common/Utilities/ValidationUtils.cs +++ b/DNN Platform/Library/Common/Utilities/ValidationUtils.cs @@ -22,7 +22,7 @@ internal static string GetDecryptionKey() return FIPSCompliant.EncryptAES(key, key, Host.GUID); } - internal static string ComputeValidationCode(IList parameters) + public static string ComputeValidationCode(IList parameters) { if (parameters != null && parameters.Any()) { diff --git a/DNN Platform/Library/DotNetNuke.Library.csproj b/DNN Platform/Library/DotNetNuke.Library.csproj index 4447e31804b..291ea83e098 100644 --- a/DNN Platform/Library/DotNetNuke.Library.csproj +++ b/DNN Platform/Library/DotNetNuke.Library.csproj @@ -213,13 +213,14 @@ + - + @@ -252,8 +253,13 @@ Code + + + + + @@ -800,9 +806,6 @@ - - - @@ -816,7 +819,13 @@ + + + + + + diff --git a/DNN Platform/Library/Entities/Controllers/IHostController.cs b/DNN Platform/Library/Entities/Controllers/IHostController.cs index 2c4fde9682b..fbf251936de 100644 --- a/DNN Platform/Library/Entities/Controllers/IHostController.cs +++ b/DNN Platform/Library/Entities/Controllers/IHostController.cs @@ -2,173 +2,173 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Entities.Controllers +namespace DotNetNuke.Entities.Controllers { using System; using System.Collections.Generic; - /// - /// Interface of HostController. - /// - /// - /// - /// public static bool CheckUpgrade - /// { - /// get - /// { - /// return HostController.Instance.GetBoolean("CheckUpgrade", true); - /// } - /// } - /// - /// - /// - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - public interface IHostController - { - /// - /// Gets the setting value for the specific key. - /// - /// The setting key string. - /// host setting as a boolean. - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - bool GetBoolean(string key); - - /// - /// Gets the setting value for the specific key. - /// - /// The setting key string. - /// Default value returned if the setting is not found or not compatible with the requested type. - /// host setting or the provided default value as a . - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - bool GetBoolean(string key, bool defaultValue); - - /// - /// Gets the setting value for the specific key. - /// - /// The setting key string. - /// Default value returned if the setting is not found or not compatible with the requested type. - /// Host setting or the provided default value as a . - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - double GetDouble(string key, double defaultValue); - - /// - /// Gets the setting value for the specific key. - /// - /// The setting key string. - /// Host setting as a . - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - double GetDouble(string key); - - /// - /// Gets the setting value for the specific key. - /// - /// The setting key string. - /// Host setting as an . - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - int GetInteger(string key); - - /// - /// Gets the setting value for the specific key. - /// - /// The setting key string. - /// Default value returned if the setting is not found or not compatible with the requested type. - /// Host setting or provided default value as a . - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - int GetInteger(string key, int defaultValue); - - /// - /// Gets the host settings. - /// - /// Host settings as a . - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - Dictionary GetSettings(); - - /// - /// Gets the host settings. - /// - /// Host settings as a . - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - Dictionary GetSettingsDictionary(); - - /// - /// Gets an encrypted host setting as a . - /// - /// The setting key string. - /// The passPhrase used to decrypt the setting value. - /// The setting value as a . - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - string GetEncryptedString(string key, string passPhrase); - - /// - /// Gets the setting value for a specific key. - /// - /// The setting key string. - /// The setting value as a . - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - string GetString(string key); - - /// - /// Gets the setting value for a specific key. - /// - /// The seeting key string. - /// - /// Default value returned if the setting is not found. - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - string GetString(string key, string defaultValue); - - /// - /// Updates the specified settings. - /// - /// The settings to update. - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - void Update(Dictionary settings); - - /// - /// Updates the specified config. - /// - /// The configuration setting. - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - void Update(ConfigurationSetting config); - - /// - /// Updates the specified config, ontionally clearing the cache. - /// - /// The configuaration setting. - /// If set to true, will clear the cache after updating the setting. - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - void Update(ConfigurationSetting config, bool clearCache); - - /// - /// Updates the setting for a specific key. - /// - /// The setting key string. - /// The value to update. - /// If set to true, will clear the cache after updating the setting. - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - void Update(string key, string value, bool clearCache); - - /// - /// Updates the setting for a specific key. - /// - /// The setting key string. - /// The value to update. - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - void Update(string key, string value); - - /// - /// Takes in a value, encrypts it with a FIPS compliant algorithm and stores. - /// - /// host settings key. - /// host settings value. - /// pass phrase to allow encryption/decryption. - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - void UpdateEncryptedString(string key, string value, string passPhrase); - - /// - /// Increments the Client Resource Manager (CRM) version to bust local cache. - /// - /// If true also forces a CRM version increment on portals that have non-default settings for CRM. - [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Controllers.IHostController instead.")] - void IncrementCrmVersion(bool includeOverridingPortals); - } -} + /// + /// Interface of HostController. + /// + /// + /// + /// public static bool CheckUpgrade + /// { + /// get + /// { + /// return HostController.Instance.GetBoolean("CheckUpgrade", true); + /// } + /// } + /// + /// + /// + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + public interface IHostController + { + /// + /// Gets the setting value for the specific key. + /// + /// The setting key string. + /// host setting as a boolean. + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + bool GetBoolean(string key); + + /// + /// Gets the setting value for the specific key. + /// + /// The setting key string. + /// Default value returned if the setting is not found or not compatible with the requested type. + /// host setting or the provided default value as a . + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + bool GetBoolean(string key, bool defaultValue); + + /// + /// Gets the setting value for the specific key. + /// + /// The setting key string. + /// Default value returned if the setting is not found or not compatible with the requested type. + /// Host setting or the provided default value as a . + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + double GetDouble(string key, double defaultValue); + + /// + /// Gets the setting value for the specific key. + /// + /// The setting key string. + /// Host setting as a . + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + double GetDouble(string key); + + /// + /// Gets the setting value for the specific key. + /// + /// The setting key string. + /// Host setting as an . + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + int GetInteger(string key); + + /// + /// Gets the setting value for the specific key. + /// + /// The setting key string. + /// Default value returned if the setting is not found or not compatible with the requested type. + /// Host setting or provided default value as a . + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + int GetInteger(string key, int defaultValue); + + /// + /// Gets the host settings. + /// + /// Host settings as a . + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + Dictionary GetSettings(); + + /// + /// Gets the host settings. + /// + /// Host settings as a . + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + Dictionary GetSettingsDictionary(); + + /// + /// Gets an encrypted host setting as a . + /// + /// The setting key string. + /// The passPhrase used to decrypt the setting value. + /// The setting value as a . + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + string GetEncryptedString(string key, string passPhrase); + + /// + /// Gets the setting value for a specific key. + /// + /// The setting key string. + /// The setting value as a . + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + string GetString(string key); + + /// + /// Gets the setting value for a specific key. + /// + /// The seeting key string. + /// + /// Default value returned if the setting is not found. + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + string GetString(string key, string defaultValue); + + /// + /// Updates the specified settings. + /// + /// The settings to update. + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + void Update(Dictionary settings); + + /// + /// Updates the specified config. + /// + /// The configuration setting. + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + void Update(ConfigurationSetting config); + + /// + /// Updates the specified config, ontionally clearing the cache. + /// + /// The configuaration setting. + /// If set to true, will clear the cache after updating the setting. + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + void Update(ConfigurationSetting config, bool clearCache); + + /// + /// Updates the setting for a specific key. + /// + /// The setting key string. + /// The value to update. + /// If set to true, will clear the cache after updating the setting. + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + void Update(string key, string value, bool clearCache); + + /// + /// Updates the setting for a specific key. + /// + /// The setting key string. + /// The value to update. + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + void Update(string key, string value); + + /// + /// Takes in a value, encrypts it with a FIPS compliant algorithm and stores. + /// + /// host settings key. + /// host settings value. + /// pass phrase to allow encryption/decryption. + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + void UpdateEncryptedString(string key, string value, string passPhrase); + + /// + /// Increments the Client Resource Manager (CRM) version to bust local cache. + /// + /// If true also forces a CRM version increment on portals that have non-default settings for CRM. + [Obsolete("Deprecated in 9.7.1. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Application.IHostSettingsService instead.")] + void IncrementCrmVersion(bool includeOverridingPortals); + } +} diff --git a/DNN Platform/Library/Entities/Host/Host.cs b/DNN Platform/Library/Entities/Host/Host.cs index 5f9c9dac657..edcb045e742 100644 --- a/DNN Platform/Library/Entities/Host/Host.cs +++ b/DNN Platform/Library/Entities/Host/Host.cs @@ -425,6 +425,7 @@ public static bool DebugMode /// Gets a value indicating whether gets whether the installation participates in the improvements program. /// /// ----------------------------------------------------------------------------- + [Obsolete("Improvement program functionality removed in 9.7.3. API Scheduled for removal in 10.0.0.")] public static bool ParticipateInImprovementProg { get diff --git a/DNN Platform/Library/Entities/Modules/ModuleInfo.cs b/DNN Platform/Library/Entities/Modules/ModuleInfo.cs index 5fa42d6a9bd..7988f395edf 100644 --- a/DNN Platform/Library/Entities/Modules/ModuleInfo.cs +++ b/DNN Platform/Library/Entities/Modules/ModuleInfo.cs @@ -389,7 +389,8 @@ public CacheLevel Cacheability [XmlIgnore] public bool IsShareableViewOnly { get; set; } - + + [Obsolete("WebSlice functionality is no longer used. Will be removed in v10.0.0")] [XmlElement("iswebslice")] public bool IsWebSlice { get; set; } @@ -472,12 +473,15 @@ public ModulePermissionCollection ModulePermissions [XmlElement("visibility")] public VisibilityState Visibility { get; set; } + [Obsolete("WebSlice functionality is no longer used. Will be removed in v10.0.0")] [XmlElement("websliceexpirydate")] public DateTime WebSliceExpiryDate { get; set; } + [Obsolete("WebSlice functionality is no longer used. Will be removed in v10.0.0")] [XmlElement("webslicetitle")] public string WebSliceTitle { get; set; } + [Obsolete("WebSlice functionality is no longer used. Will be removed in v10.0.0")] [XmlElement("webslicettl")] public int WebSliceTTL { get; set; } diff --git a/DNN Platform/Library/Entities/Modules/Settings/HostSettingAttribute.cs b/DNN Platform/Library/Entities/Modules/Settings/HostSettingAttribute.cs new file mode 100644 index 00000000000..f8e07f7d81f --- /dev/null +++ b/DNN Platform/Library/Entities/Modules/Settings/HostSettingAttribute.cs @@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + +namespace DotNetNuke.Entities.Modules.Settings +{ + using System; + + /// + /// When applied to a property this attribute persists the value of the property in the DNN HostSettings table. + /// + [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)] + public class HostSettingAttribute : ParameterAttributeBase + { + } +} diff --git a/DNN Platform/Library/Entities/Modules/Settings/ISettingsRepository.cs b/DNN Platform/Library/Entities/Modules/Settings/ISettingsRepository.cs index 994df7093ea..b8fece03fbe 100644 --- a/DNN Platform/Library/Entities/Modules/Settings/ISettingsRepository.cs +++ b/DNN Platform/Library/Entities/Modules/Settings/ISettingsRepository.cs @@ -7,8 +7,36 @@ namespace DotNetNuke.Entities.Modules.Settings public interface ISettingsRepository where T : class { - T GetSettings(ModuleInfo moduleContext); - + /// + /// Retrieve module settings. This can optionally include TabModule settings, Portal settings and + /// host settings as well. Note the result is cached. + /// + /// Your module's context. + /// Your settings class. + T GetSettings(ModuleInfo moduleContext); + + /// + /// Retrieve portal/host settings. This will ignore Module and TabModule settings. + /// Note the result is cached. + /// + /// The portal ID for which to retrieve the settings. + /// Your settings class. + T GetSettings(int portalId); + + /// + /// Save your module's settings. This can optionally include TabModule settings, Portal settings and + /// host settings as well. + /// + /// Your module's context. + /// Your settings class. void SaveSettings(ModuleInfo moduleContext, T settings); + + /// + /// Save your settings. Module and TabModule settings will be ignored. Only Portal settings and + /// host settings will be saved. + /// + /// Your portal Id for these settings. + /// Your settings class. + void SaveSettings(int portalId, T settings); } } diff --git a/DNN Platform/Library/Entities/Modules/Settings/SerializationController.cs b/DNN Platform/Library/Entities/Modules/Settings/SerializationController.cs deleted file mode 100644 index c267566b018..00000000000 --- a/DNN Platform/Library/Entities/Modules/Settings/SerializationController.cs +++ /dev/null @@ -1,193 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information -using DotNetNuke.Services.Exceptions; -using System; -using System.ComponentModel; -using System.Globalization; -using System.Linq; -using System.Reflection; -using System.Text.RegularExpressions; - -namespace DotNetNuke.Entities.Modules.Settings -{ - public class SerializationController - { - public static string SerializeProperty(T myObject, PropertyInfo property) - { - return SerializeProperty(myObject, property, null); - } - public static string SerializeProperty(T myObject, PropertyInfo property, string serializer) - { - var settingValue = property.GetValue(myObject, null) ?? string.Empty; - string settingValueAsString = null; - if (!string.IsNullOrEmpty(serializer)) - { - settingValueAsString = (string)CallSerializerMethod(serializer, property.PropertyType, settingValue, nameof(ISettingsSerializer.Serialize)); - } - if (settingValueAsString == null) - { - settingValueAsString = GetSettingValueAsString(settingValue); - } - return settingValueAsString; - } - - public static void DeserializeProperty(T myObject, PropertyInfo property, string propertyValue) where T : class, new() - { - DeserializeProperty(myObject, property, propertyValue, null); - } - public static void DeserializeProperty(T myObject, PropertyInfo property, string propertyValue, string serializer) where T : class, new() - { - try - { - var valueType = propertyValue.GetType(); - var propertyType = property.PropertyType; - if (propertyType.GetGenericArguments().Any() && propertyType.GetGenericTypeDefinition() == typeof(Nullable<>)) - { - // Nullable type - propertyType = propertyType.GetGenericArguments()[0]; - if (string.IsNullOrEmpty(propertyValue)) - { - property.SetValue(myObject, null, null); - return; - } - } - - if (propertyType == valueType) - { - // The property and settingsValue have the same type - no conversion needed - just update! - property.SetValue(myObject, propertyValue, null); - return; - } - - if (!string.IsNullOrEmpty(serializer)) - { - var deserializedValue = CallSerializerMethod(serializer, property.PropertyType, propertyValue, nameof(ISettingsSerializer.Deserialize)); - property.SetValue(myObject, deserializedValue, null); - return; - } - - if (propertyType.BaseType == typeof(Enum)) - { - // The property is an enum. Determine if the enum value is persisted as string or numeric. - if (Regex.IsMatch(propertyValue, "^\\d+$")) - { - // The enum value is a number - property.SetValue(myObject, Enum.ToObject(propertyType, Convert.ToInt32(propertyValue, CultureInfo.InvariantCulture)), null); - } - else - { - try - { - property.SetValue(myObject, Enum.Parse(propertyType, propertyValue, true), null); - } - catch (ArgumentException exception) - { - // Just log the exception. Use the default. - Exceptions.LogException(exception); - } - } - - return; - } - - TimeSpan timeSpanValue; - if (propertyType.IsAssignableFrom(typeof(TimeSpan)) && TimeSpan.TryParse(propertyValue, CultureInfo.InvariantCulture, out timeSpanValue)) - { - property.SetValue(myObject, timeSpanValue); - return; - } - - DateTime dateTimeValue; - if (propertyType.IsAssignableFrom(typeof(DateTime)) && DateTime.TryParse(propertyValue, CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind, out dateTimeValue)) - { - property.SetValue(myObject, dateTimeValue); - return; - } - - if (propertyType.GetInterface(typeof(IConvertible).FullName) != null) - { - propertyValue = ChangeFormatForBooleansIfNeeded(propertyType, propertyValue); - property.SetValue(myObject, Convert.ChangeType(propertyValue, propertyType, CultureInfo.InvariantCulture), null); - return; - } - - var converter = TypeDescriptor.GetConverter(propertyType); - if (converter.IsValid(propertyValue)) - { - converter.ConvertFromInvariantString(propertyValue); - } - } - catch (Exception exception) - { - // TODO: Localize exception - throw new InvalidCastException(string.Format(CultureInfo.CurrentUICulture, "Could not cast {0} to property {1} of type {2}", - propertyValue, - property.Name, - property.PropertyType), exception); - } - } - - private static string GetSettingValueAsString(object settingValue) - { - var dateTimeValue = settingValue as DateTime?; - if (dateTimeValue != null) - { - return dateTimeValue.Value.ToString("o", CultureInfo.InvariantCulture); - } - - var timeSpanValue = settingValue as TimeSpan?; - if (timeSpanValue != null) - { - return timeSpanValue.Value.ToString("c", CultureInfo.InvariantCulture); - } - - return Convert.ToString(settingValue, CultureInfo.InvariantCulture); - } - - private static string ChangeFormatForBooleansIfNeeded(Type propertyType, string propertyValue) - { - if (!propertyType.Name.Equals("Boolean")) - { - return propertyValue; - } - - bool boolValue; - if (bool.TryParse(propertyValue, out boolValue)) - { - return propertyValue; - } - - if (propertyValue.Equals("1")) - { - return bool.TrueString; - } - if (propertyValue.Equals("0")) - { - return bool.FalseString; - } - - return propertyValue; - } - - private static object CallSerializerMethod(string serializerTypeName, Type typeArgument, object value, string methodName) - { - var serializerType = Framework.Reflection.CreateType(serializerTypeName, true); - if (serializerType == null) - { - return null; - } - - var serializer = Framework.Reflection.CreateInstance(serializerType); - if (serializer == null) - { - return null; - } - - var serializerInterfaceType = typeof(ISettingsSerializer<>).MakeGenericType(typeArgument); - var method = serializerInterfaceType.GetMethod(methodName); - return method.Invoke(serializer, new[] { value, }); - } - - } -} diff --git a/DNN Platform/Library/Entities/Modules/Settings/SerializationManager.cs b/DNN Platform/Library/Entities/Modules/Settings/SerializationManager.cs new file mode 100644 index 00000000000..9cd7cc532fd --- /dev/null +++ b/DNN Platform/Library/Entities/Modules/Settings/SerializationManager.cs @@ -0,0 +1,236 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + +namespace DotNetNuke.Entities.Modules.Settings +{ + using System; + using System.ComponentModel; + using System.Globalization; + using System.Linq; + using System.Reflection; + using System.Text.RegularExpressions; + + using DotNetNuke.Abstractions; + using DotNetNuke.Services.Exceptions; + + /// + public class SerializationManager : ISerializationManager + { + /// + string ISerializationManager.SerializeValue(T value) => + this.SerializeValue(value, null, typeof(T)); + + /// + string ISerializationManager.SerializeValue(T value, string serializer) => + this.SerializeValue(value, serializer, typeof(T)); + + /// + string ISerializationManager.SerializeProperty(T myObject, PropertyInfo property) => + ((ISerializationManager)this).SerializeProperty(myObject, property, null); + + /// + string ISerializationManager.SerializeProperty(T myObject, PropertyInfo property, string serializer) + { + var settingValue = property.GetValue(myObject, null) ?? string.Empty; + return this.SerializeValue(settingValue, serializer, property.PropertyType); + } + + /// + public T DeserializeValue(string value) => ((ISerializationManager)this).DeserializeValue(value, null); + + /// + public T DeserializeValue(string value, string serializer) + { + return (T)this.DeserializeValue(value, serializer, typeof(T)); + } + + /// + void ISerializationManager.DeserializeProperty(T myObject, PropertyInfo property, string propertyValue) => + ((ISerializationManager)this).DeserializeProperty(myObject, property, propertyValue, null); + + /// + void ISerializationManager.DeserializeProperty(T myObject, PropertyInfo property, string propertyValue, string serializer) + { + try + { + var propertyType = property.PropertyType; + var deserializedValue = this.DeserializeValue(propertyValue, serializer, propertyType); + property.SetValue(myObject, deserializedValue, null); + } + catch (Exception exception) + { + // TODO: Localize exception + var message = string.Format( + CultureInfo.CurrentUICulture, + "Could not cast {0} to property {1} of type {2}", + propertyValue, + property.Name, + property.PropertyType); + throw new InvalidCastException(message, exception); + } + } + + private string SerializeValue(T value, string serializer, Type valueType) + { + string settingValueAsString = null; + if (!string.IsNullOrEmpty(serializer)) + { + settingValueAsString = (string)this.CallSerializerMethod(serializer, valueType, value, nameof(ISettingsSerializer.Serialize)); + } + + if (settingValueAsString == null) + { + settingValueAsString = this.GetSettingValueAsString(value); + } + + return settingValueAsString; + } + + private object DeserializeValue( + string propertyValue, + string serializer, + Type destinationType) + { + if (destinationType.GetGenericArguments().Any() + && destinationType.GetGenericTypeDefinition() == typeof(Nullable<>)) + { + // Nullable type + destinationType = destinationType.GetGenericArguments()[0]; + if (string.IsNullOrEmpty(propertyValue)) + { + return null; + } + } + + if (destinationType == propertyValue.GetType()) + { + // The property and settingsValue have the same type - no conversion needed - just update! + return propertyValue; + } + + if (!string.IsNullOrEmpty(serializer)) + { + return this.CallSerializerMethod( + serializer, + destinationType, + propertyValue, + nameof(ISettingsSerializer.Deserialize)); + } + + if (destinationType.BaseType == typeof(Enum)) + { + // The property is an enum. Determine if the enum value is persisted as string or numeric. + if (Regex.IsMatch(propertyValue, "^\\d+$")) + { + // The enum value is a number + return Enum.ToObject(destinationType, Convert.ToInt32(propertyValue, CultureInfo.InvariantCulture)); + } + + try + { + return Enum.Parse(destinationType, propertyValue, true); + } + catch (ArgumentException exception) + { + // Just log the exception. Use the default. + Exceptions.LogException(exception); + } + + return 0; + } + + if (destinationType.IsAssignableFrom(typeof(TimeSpan)) + && TimeSpan.TryParse(propertyValue, CultureInfo.InvariantCulture, out var timeSpanValue)) + { + return timeSpanValue; + } + + if (destinationType.IsAssignableFrom(typeof(DateTime)) + && DateTime.TryParse( + propertyValue, + CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind, + out var dateTimeValue)) + { + return dateTimeValue; + } + + if (destinationType.GetInterface(typeof(IConvertible).FullName) != null) + { + propertyValue = this.ChangeFormatForBooleansIfNeeded(destinationType, propertyValue); + return Convert.ChangeType(propertyValue, destinationType, CultureInfo.InvariantCulture); + } + + var converter = TypeDescriptor.GetConverter(destinationType); + if (converter.IsValid(propertyValue)) + { + return converter.ConvertFromInvariantString(propertyValue); + } + + // TODO: Localize exception + throw new InvalidCastException($"Could not cast {propertyValue} to {destinationType}"); + } + + private string GetSettingValueAsString(T settingValue) + { + var dateTimeValue = settingValue as DateTime?; + if (dateTimeValue != null) + { + return dateTimeValue.Value.ToString("o", CultureInfo.InvariantCulture); + } + + var timeSpanValue = settingValue as TimeSpan?; + if (timeSpanValue != null) + { + return timeSpanValue.Value.ToString("c", CultureInfo.InvariantCulture); + } + + return Convert.ToString(settingValue, CultureInfo.InvariantCulture); + } + + private string ChangeFormatForBooleansIfNeeded(Type propertyType, string propertyValue) + { + if (!propertyType.Name.Equals("Boolean")) + { + return propertyValue; + } + + if (bool.TryParse(propertyValue, out _)) + { + return propertyValue; + } + + if (propertyValue.Equals("1")) + { + return bool.TrueString; + } + + if (propertyValue.Equals("0")) + { + return bool.FalseString; + } + + return propertyValue; + } + + private object CallSerializerMethod(string serializerTypeName, Type typeArgument, object value, string methodName) + { + var serializerType = Framework.Reflection.CreateType(serializerTypeName, true); + if (serializerType == null) + { + return null; + } + + var serializer = Framework.Reflection.CreateInstance(serializerType); + if (serializer == null) + { + return null; + } + + var serializerInterfaceType = typeof(ISettingsSerializer<>).MakeGenericType(typeArgument); + var method = serializerInterfaceType.GetMethod(methodName); + return method?.Invoke(serializer, new[] { value, }); + } + } +} diff --git a/DNN Platform/Library/Entities/Modules/Settings/SettingsRepository.cs b/DNN Platform/Library/Entities/Modules/Settings/SettingsRepository.cs index 897a0648afa..579b0959bb0 100644 --- a/DNN Platform/Library/Entities/Modules/Settings/SettingsRepository.cs +++ b/DNN Platform/Library/Entities/Modules/Settings/SettingsRepository.cs @@ -1,77 +1,85 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information + namespace DotNetNuke.Entities.Modules.Settings { using System; using System.Collections.Generic; using System.Reflection; using System.Web.Caching; + + using DotNetNuke.Abstractions; using DotNetNuke.Collections; using DotNetNuke.Common; using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Controllers; using DotNetNuke.Entities.Portals; using DotNetNuke.Services.Cache; + using Microsoft.Extensions.DependencyInjection; + + /// public abstract class SettingsRepository : ISettingsRepository where T : class, new() { - public const string CachePrefix = "ModuleSettingsPersister_"; + private readonly IModuleController moduleController; - private readonly IModuleController _moduleController; + private static ISerializationManager SerializationManager => + Globals.DependencyProvider.GetRequiredService(); + /// + /// Initializes a new instance of the class. + /// protected SettingsRepository() { this.Mapping = this.LoadMapping(); - this._moduleController = ModuleController.Instance; + this.moduleController = ModuleController.Instance; } + + /// + /// Gets cache key for this class. Used for parameter mapping storage as well as entire class persistence. + /// protected virtual string MappingCacheKey { get { var type = typeof(T); - return CachePrefix + type.FullName.Replace(".", "_"); + return "SettingsRepository_" + type.FullName.Replace(".", "_"); } } private IList Mapping { get; } + /// public T GetSettings(ModuleInfo moduleContext) { return CBO.GetCachedObject(new CacheItemArgs(this.CacheKey(moduleContext.TabModuleID), 20, CacheItemPriority.AboveNormal, moduleContext), this.Load, false); } + /// + public T GetSettings(int portalId) + { + return CBO.GetCachedObject(new CacheItemArgs(this.CacheKey(portalId), 20, CacheItemPriority.AboveNormal, null, portalId), this.Load, false); + } + + /// public void SaveSettings(ModuleInfo moduleContext, T settings) { Requires.NotNull("settings", settings); Requires.NotNull("ctlModule", moduleContext); + this.SaveSettings(moduleContext.PortalID, moduleContext, settings); + } - this.Mapping.ForEach(mapping => - { - var attribute = mapping.Attribute; - var property = mapping.Property; - - if (property.CanRead) // Should be, because we asked for properties with a Get accessor. - { - var settingValueAsString = SerializationController.SerializeProperty(settings, property, attribute.Serializer); - - if (attribute is ModuleSettingAttribute) - { - this._moduleController.UpdateModuleSetting(moduleContext.ModuleID, mapping.FullParameterName, settingValueAsString); - moduleContext.ModuleSettings[mapping.FullParameterName] = settingValueAsString; // temporary fix for issue 3692 - } - else if (attribute is TabModuleSettingAttribute) - { - this._moduleController.UpdateTabModuleSetting(moduleContext.TabModuleID, mapping.FullParameterName, settingValueAsString); - moduleContext.TabModuleSettings[mapping.FullParameterName] = settingValueAsString; // temporary fix for issue 3692 - } - else if (attribute is PortalSettingAttribute) - { - PortalController.UpdatePortalSetting(moduleContext.PortalID, mapping.FullParameterName, settingValueAsString); - } - } - }); - DataCache.SetCache(this.CacheKey(moduleContext.TabModuleID), settings); + /// + public void SaveSettings(int portalId, T settings) + { + Requires.NotNull("settings", settings); + this.SaveSettings(portalId, null, settings); } + /// + /// Retrieves the parameter mapping from cache if still there, otherwise recreates it. + /// + /// List of parameters. protected IList LoadMapping() { var cacheKey = this.MappingCacheKey; @@ -88,6 +96,10 @@ protected IList LoadMapping() return mapping; } + /// + /// Rebuilds parameter mapping of the class. + /// + /// List of parameters. protected virtual IList CreateMapping() { var mapping = new List(); @@ -103,9 +115,44 @@ protected virtual IList CreateMapping() return mapping; } + private void SaveSettings(int portalId, ModuleInfo moduleContext, T settings) + { + this.Mapping.ForEach(mapping => + { + var attribute = mapping.Attribute; + var property = mapping.Property; + + if (property.CanRead) // Should be, because we asked for properties with a Get accessor. + { + var settingValueAsString = SerializationController.SerializeProperty(settings, property, attribute.Serializer); + + if (attribute is ModuleSettingAttribute && moduleContext != null) + { + this.moduleController.UpdateModuleSetting(moduleContext.ModuleID, mapping.FullParameterName, settingValueAsString); + moduleContext.ModuleSettings[mapping.FullParameterName] = settingValueAsString; // temporary fix for issue 3692 + } + else if (attribute is TabModuleSettingAttribute && moduleContext != null) + { + this.moduleController.UpdateTabModuleSetting(moduleContext.TabModuleID, mapping.FullParameterName, settingValueAsString); + moduleContext.TabModuleSettings[mapping.FullParameterName] = settingValueAsString; // temporary fix for issue 3692 + } + else if (attribute is PortalSettingAttribute && portalId != -1) + { + PortalController.UpdatePortalSetting(portalId, mapping.FullParameterName, settingValueAsString); + } + else if (attribute is HostSettingAttribute) + { + HostController.Instance.Update(mapping.FullParameterName, settingValueAsString); + } + } + }); + DataCache.SetCache(this.CacheKey(moduleContext == null ? portalId : moduleContext.TabModuleID), settings); + } + private T Load(CacheItemArgs args) { var ctlModule = (ModuleInfo)args.ParamList[0]; + var portalId = ctlModule == null ? (int)args.ParamList[1] : ctlModule.PortalID; var settings = new T(); this.Mapping.ForEach(mapping => @@ -116,15 +163,19 @@ private T Load(CacheItemArgs args) var property = mapping.Property; // TODO: Make more extensible, enable other attributes to be defined - if (attribute is PortalSettingAttribute && PortalController.Instance.GetPortalSettings(ctlModule.PortalID).ContainsKey(mapping.FullParameterName)) + if (attribute is HostSettingAttribute && HostController.Instance.GetSettings().ContainsKey(mapping.FullParameterName)) { - settingValue = PortalController.Instance.GetPortalSettings(ctlModule.PortalID)[mapping.FullParameterName]; + settingValue = HostController.Instance.GetSettings()[mapping.FullParameterName].Value; } - else if (attribute is TabModuleSettingAttribute && ctlModule.TabModuleSettings.ContainsKey(mapping.FullParameterName)) + else if (attribute is PortalSettingAttribute && portalId != -1 && PortalController.Instance.GetPortalSettings(portalId).ContainsKey(mapping.FullParameterName)) + { + settingValue = PortalController.Instance.GetPortalSettings(portalId)[mapping.FullParameterName]; + } + else if (attribute is TabModuleSettingAttribute && ctlModule != null && ctlModule.TabModuleSettings.ContainsKey(mapping.FullParameterName)) { settingValue = (string)ctlModule.TabModuleSettings[mapping.FullParameterName]; } - else if (attribute is ModuleSettingAttribute && ctlModule.ModuleSettings.ContainsKey(mapping.FullParameterName)) + else if (attribute is ModuleSettingAttribute && ctlModule != null && ctlModule.ModuleSettings.ContainsKey(mapping.FullParameterName)) { settingValue = (string)ctlModule.ModuleSettings[mapping.FullParameterName]; } @@ -138,10 +189,7 @@ private T Load(CacheItemArgs args) return settings; } - private string CacheKey(int moduleId) - { - return string.Format("SettingsModule{0}", moduleId); - } + private string CacheKey(int id) => $"Settings{this.MappingCacheKey}_{id}"; /// /// Deserializes the property. @@ -149,10 +197,10 @@ private string CacheKey(int moduleId) /// The settings. /// The property. /// The property value. - /// + /// Thrown if string value cannot be deserialized to desired type. private void DeserializeProperty(T settings, PropertyInfo property, ParameterAttributeBase attribute, string propertyValue) { - SerializationController.DeserializeProperty(settings, property, propertyValue, attribute.Serializer); + SerializationManager.DeserializeProperty(settings, property, propertyValue, attribute.Serializer); } } } diff --git a/DNN Platform/Library/Entities/Portals/PortalAliasController.cs b/DNN Platform/Library/Entities/Portals/PortalAliasController.cs index 6fb8cf402a9..186779d0dd0 100644 --- a/DNN Platform/Library/Entities/Portals/PortalAliasController.cs +++ b/DNN Platform/Library/Entities/Portals/PortalAliasController.cs @@ -22,17 +22,19 @@ namespace DotNetNuke.Entities.Portals /// /// /// For DotNetNuke to know what site a request should load, it uses a system of portal aliases. - /// When a request is recieved by DotNetNuke from IIS, it extracts the domain name portion and does a comparison against - /// the list of portal aliases and then redirects to the relevant portal to load the approriate page. + /// When a request is received by DotNetNuke from IIS, it extracts the domain name portion and does a comparison against + /// the list of portal aliases and then redirects to the relevant portal to load the appropriate page. /// public partial class PortalAliasController : IPortalAliasService { + private IPortalAliasService ThisAsInterface => this; + /// string IPortalAliasService.GetPortalAliasByPortal(int portalId, string portalAlias) { string retValue = string.Empty; bool foundAlias = false; - PortalAliasInfo portalAliasInfo = this.GetPortalAlias(portalAlias, portalId); + var portalAliasInfo = this.ThisAsInterface.GetPortalAlias(portalAlias, portalId); if (portalAliasInfo != null) { retValue = portalAliasInfo.HttpAlias; @@ -54,17 +56,18 @@ string IPortalAliasService.GetPortalAliasByPortal(int portalId, string portalAli // StartsWith because child portals are redirected to the parent portal domain name // eg. child = 'www.domain.com/child' and parent is 'www.domain.com' // this allows the parent domain name to resolve to the child alias ( the tabid still identifies the child portalid ) - string httpAlias = currentAlias.Value.HttpAlias.ToLowerInvariant(); - if (httpAlias.StartsWith(portalAlias.ToLowerInvariant()) && currentAlias.Value.PortalId == portalId) + IPortalAliasInfo currentAliasInfo = currentAlias.Value; + string httpAlias = currentAliasInfo.HttpAlias.ToLowerInvariant(); + if (httpAlias.StartsWith(portalAlias.ToLowerInvariant()) && currentAliasInfo.PortalId == portalId) { - retValue = currentAlias.Value.HttpAlias; + retValue = currentAliasInfo.HttpAlias; break; } httpAlias = httpAlias.StartsWith("www.") ? httpAlias.Replace("www.", string.Empty) : string.Concat("www.", httpAlias); - if (httpAlias.StartsWith(portalAlias.ToLowerInvariant()) && currentAlias.Value.PortalId == portalId) + if (httpAlias.StartsWith(portalAlias.ToLowerInvariant()) && currentAliasInfo.PortalId == portalId) { - retValue = currentAlias.Value.HttpAlias; + retValue = currentAliasInfo.HttpAlias; break; } } @@ -99,7 +102,7 @@ string IPortalAliasService.GetPortalAliasByTab(int tabId, string portalAlias) retValue = portalAlias; break; default: // portal tab - retValue = GetPortalAliasByPortal(intPortalId, portalAlias); + retValue = this.ThisAsInterface.GetPortalAliasByPortal(intPortalId, portalAlias); break; } @@ -167,18 +170,20 @@ IPortalAliasInfo IPortalAliasService.GetPortalAlias(string alias) => /// IPortalAliasInfo IPortalAliasService.GetPortalAlias(string alias, int portalId) => this.GetPortalAliasesInternal() - .SingleOrDefault(portalAliasInfo => portalAliasInfo.Key.Equals(alias, StringComparison.InvariantCultureIgnoreCase) && portalAliasInfo.Value.PortalID == portalId).Value; + .SingleOrDefault((portalAliasInfo) => portalAliasInfo.Key.Equals(alias, StringComparison.InvariantCultureIgnoreCase) && ((IPortalAliasInfo)portalAliasInfo.Value).PortalId == portalId).Value; /// IPortalAliasInfo IPortalAliasService.GetPortalAliasByPortalAliasId(int portalAliasId) => this.GetPortalAliasesInternal() - .SingleOrDefault(portalAliasInfo => portalAliasInfo.Value.PortalAliasId == portalAliasId).Value; + .Values + .Cast() + .SingleOrDefault(portalAliasInfo => portalAliasInfo.PortalAliasId == portalAliasId); /// IDictionary IPortalAliasService.GetPortalAliases() { var aliasCollection = new Dictionary(); - foreach (var alias in this.GetPortalAliasesInternal().Values) + foreach (IPortalAliasInfo alias in this.GetPortalAliasesInternal().Values) { aliasCollection.Add(alias.HttpAlias, alias); } @@ -188,7 +193,7 @@ IDictionary IPortalAliasService.GetPortalAliases() /// IEnumerable IPortalAliasService.GetPortalAliasesByPortalId(int portalId) => - this.GetPortalAliasesInternal().Values.Where(alias => alias.PortalId == portalId).ToList(); + this.GetPortalAliasesInternal().Values.Cast().Where(alias => alias.PortalId == portalId).ToList(); /// IPortalInfo IPortalAliasService.GetPortalByPortalAliasId(int portalAliasId) => @@ -256,7 +261,7 @@ private static void ClearCache(bool refreshServiceRoutes, int portalId = -1) private static void LogEvent(IPortalAliasInfo portalAlias, EventLogController.EventLogType logType) { int userId = UserController.Instance.GetCurrentUserInfo().UserID; - EventLogController.Instance.AddLog(portalAlias, PortalController.Instance.GetCurrentPortalSettings(), userId, string.Empty, logType); + EventLogController.Instance.AddLog(portalAlias, PortalController.Instance.GetCurrentSettings(), userId, string.Empty, logType); } private static bool ValidateAlias(string portalAlias, bool ischild, bool isDomain) @@ -340,7 +345,7 @@ private IPortalAliasInfo GetPortalAliasInternal(string httpAlias) EventLogController.Instance.AddLog( "PortalAlias", httpAlias, - PortalController.Instance.GetCurrentPortalSettings(), + PortalController.Instance.GetCurrentSettings(), UserController.Instance.GetCurrentUserInfo().UserID, EventLogController.EventLogType.PORTALALIAS_UPDATED); diff --git a/DNN Platform/Library/Entities/Portals/PortalAliasInfo.cs b/DNN Platform/Library/Entities/Portals/PortalAliasInfo.cs index ac99cf619d7..8ff6d920dea 100644 --- a/DNN Platform/Library/Entities/Portals/PortalAliasInfo.cs +++ b/DNN Platform/Library/Entities/Portals/PortalAliasInfo.cs @@ -25,46 +25,51 @@ public PortalAliasInfo() { } - public PortalAliasInfo(PortalAliasInfo alias) + public PortalAliasInfo(PortalAliasInfo alias) + : this((IPortalAliasInfo)alias) { - this.HttpAlias = alias.HttpAlias; - this.PortalAliasId = alias.PortalAliasId; - this.PortalId = alias.PortalId; + } + + public PortalAliasInfo(IPortalAliasInfo alias) + { + this.ThisAsInterface.HttpAlias = alias.HttpAlias; + this.ThisAsInterface.PortalAliasId = alias.PortalAliasId; + this.ThisAsInterface.PortalId = alias.PortalId; this.IsPrimary = alias.IsPrimary; this.Redirect = alias.Redirect; - ((IPortalAliasInfo)this).BrowserType = ((IPortalAliasInfo)alias).BrowserType; + this.ThisAsInterface.BrowserType = alias.BrowserType; this.CultureCode = alias.CultureCode; this.Skin = alias.Skin; } /// - public string HttpAlias { get; set; } + string IPortalAliasInfo.HttpAlias { get; set; } [Obsolete("Deprecated in 9.7.2. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Portals.IPortalAliasInfo.HttpAlias instead.")] public string HTTPAlias { - get => this.HttpAlias; - set => this.HttpAlias = value; + get => this.ThisAsInterface.HttpAlias; + set => this.ThisAsInterface.HttpAlias = value; } /// - public int PortalAliasId { get; set; } + int IPortalAliasInfo.PortalAliasId { get; set; } [Obsolete("Deprecated in 9.7.2. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Portals.IPortalAliasInfo.PortalAliasId instead.")] public int PortalAliasID { - get => this.PortalAliasId; - set => this.PortalAliasId = value; + get => this.ThisAsInterface.PortalAliasId; + set => this.ThisAsInterface.PortalAliasId = value; } /// - public int PortalId { get; set; } + int IPortalAliasInfo.PortalId { get; set; } [Obsolete("Deprecated in 9.7.2. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Portals.IPortalAliasInfo.PortalId instead.")] public int PortalID { - get => this.PortalId; - set => this.PortalId = value; + get => this.ThisAsInterface.PortalId; + set => this.ThisAsInterface.PortalId = value; } /// @@ -79,8 +84,8 @@ public int PortalID [Obsolete("Deprecated in 9.7.2. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Portals.IPortalAliasInfo.BrowserType instead.")] public BrowserTypes BrowserType { - get => (BrowserTypes)((IPortalAliasInfo)this).BrowserType; - set => ((IPortalAliasInfo)this).BrowserType = (NewBrowserType)value; + get => (BrowserTypes)this.ThisAsInterface.BrowserType; + set => this.ThisAsInterface.BrowserType = (NewBrowserType)value; } /// @@ -95,17 +100,19 @@ public BrowserTypes BrowserType /// public int KeyID { - get { return this.PortalAliasId; } - set { this.PortalAliasId = value; } + get { return this.ThisAsInterface.PortalAliasId; } + set { this.ThisAsInterface.PortalAliasId = value; } } + private IPortalAliasInfo ThisAsInterface => this; + public void Fill(IDataReader dr) { this.FillInternal(dr); - this.PortalAliasId = Null.SetNullInteger(dr["PortalAliasID"]); - this.PortalId = Null.SetNullInteger(dr["PortalID"]); - this.HttpAlias = Null.SetNullString(dr["HTTPAlias"]); + this.ThisAsInterface.PortalAliasId = Null.SetNullInteger(dr["PortalAliasID"]); + this.ThisAsInterface.PortalId = Null.SetNullInteger(dr["PortalID"]); + this.ThisAsInterface.HttpAlias = Null.SetNullString(dr["HTTPAlias"]); this.IsPrimary = Null.SetNullBoolean(dr["IsPrimary"]); var browserType = Null.SetNullString(dr["BrowserType"]); this.BrowserType = string.IsNullOrEmpty(browserType) || browserType.Equals("normal", StringComparison.OrdinalIgnoreCase) @@ -139,13 +146,13 @@ public void ReadXml(XmlReader reader) case "portalAlias": break; case "portalID": - this.PortalId = reader.ReadElementContentAsInt(); + this.ThisAsInterface.PortalId = reader.ReadElementContentAsInt(); break; case "portalAliasID": - this.PortalAliasId = reader.ReadElementContentAsInt(); + this.ThisAsInterface.PortalAliasId = reader.ReadElementContentAsInt(); break; case "HTTPAlias": - this.HttpAlias = reader.ReadElementContentAsString(); + this.ThisAsInterface.HttpAlias = reader.ReadElementContentAsString(); break; case "skin": this.Skin = reader.ReadElementContentAsString(); @@ -177,9 +184,9 @@ public void WriteXml(XmlWriter writer) writer.WriteStartElement("portalAlias"); // write out properties - writer.WriteElementString("portalID", this.PortalId.ToString()); - writer.WriteElementString("portalAliasID", this.PortalAliasId.ToString()); - writer.WriteElementString("HTTPAlias", this.HttpAlias); + writer.WriteElementString("portalID", this.ThisAsInterface.PortalId.ToString()); + writer.WriteElementString("portalAliasID", this.ThisAsInterface.PortalAliasId.ToString()); + writer.WriteElementString("HTTPAlias", this.ThisAsInterface.HttpAlias); writer.WriteElementString("skin", this.Skin); writer.WriteElementString("cultureCode", this.CultureCode); writer.WriteElementString("browserType", this.BrowserType.ToString().ToLowerInvariant()); diff --git a/DNN Platform/Library/Entities/Urls/AdvancedUrlRewriter.cs b/DNN Platform/Library/Entities/Urls/AdvancedUrlRewriter.cs index 5e12f83a714..e176b50d29f 100644 --- a/DNN Platform/Library/Entities/Urls/AdvancedUrlRewriter.cs +++ b/DNN Platform/Library/Entities/Urls/AdvancedUrlRewriter.cs @@ -254,7 +254,7 @@ protected bool IsPortalAliasIncorrect( { var portalAliases = PortalAliasController.Instance.GetPortalAliasesByPortalId(result.PortalId).ToList(); - if (queryStringCol != null && queryStringCol["forceAlias"] != "true") + if (queryStringCol != null && queryStringCol["forceAlias"] != null && queryStringCol["forceAlias"] != "true") { if (portalAliases.Count > 0) { diff --git a/DNN Platform/Library/Framework/AJAX.cs b/DNN Platform/Library/Framework/AJAX.cs index dc50d95f2c9..1ff205d7cd0 100644 --- a/DNN Platform/Library/Framework/AJAX.cs +++ b/DNN Platform/Library/Framework/AJAX.cs @@ -63,34 +63,6 @@ public static void AddScriptManager(Page page, bool checkCdn) // suppress error adding script manager to support edge-case of module developers custom aspx pages that inherit from basepage and use code blocks } } - - if (page.Form != null) - { - try - { - // DNN-9145 TODO - // using (var stylesheetManager = new RadStyleSheetManager { ID = "StylesheetManager", EnableHandlerDetection = false }) - // { - // if (checkCdn) - // { - // stylesheetManager.CdnSettings.TelerikCdn = Host.EnableTelerikCdn ? TelerikCdnMode.Enabled : TelerikCdnMode.Disabled; - // if (stylesheetManager.CdnSettings.TelerikCdn != TelerikCdnMode.Disabled && !string.IsNullOrEmpty(Host.TelerikCdnBasicUrl)) - // { - // stylesheetManager.CdnSettings.BaseUrl = Host.TelerikCdnBasicUrl; - // } - // if (stylesheetManager.CdnSettings.TelerikCdn != TelerikCdnMode.Disabled && !string.IsNullOrEmpty(Host.TelerikCdnSecureUrl)) - // { - // stylesheetManager.CdnSettings.BaseSecureUrl = Host.TelerikCdnSecureUrl; - // } - // } - // page.Form.Controls.AddAt(0, stylesheetManager); - // } - } - catch - { - // suppress error adding script manager to support edge-case of module developers custom aspx pages that inherit from basepage and use code blocks - } - } } } diff --git a/DNN Platform/Library/Framework/PageBase.cs b/DNN Platform/Library/Framework/PageBase.cs index ed24ed4a253..d78da905f0e 100644 --- a/DNN Platform/Library/Framework/PageBase.cs +++ b/DNN Platform/Library/Framework/PageBase.cs @@ -1,6 +1,6 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information namespace DotNetNuke.Framework { using System; @@ -13,7 +13,7 @@ namespace DotNetNuke.Framework using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; - + using DotNetNuke.Common; using DotNetNuke.Common.Utilities; using DotNetNuke.Entities.Host; @@ -25,8 +25,8 @@ namespace DotNetNuke.Framework using DotNetNuke.Services.Exceptions; using DotNetNuke.Services.Localization; using DotNetNuke.UI.Modules; - using DotNetNuke.Web.Client.ClientResourceManagement; - + using DotNetNuke.Web.Client.ClientResourceManagement; + /// ----------------------------------------------------------------------------- /// Namespace: DotNetNuke.Framework /// Project: DotNetNuke @@ -426,11 +426,6 @@ protected override void OnError(EventArgs e) protected override void OnInit(EventArgs e) { var isInstallPage = HttpContext.Current.Request.Url.LocalPath.ToLowerInvariant().Contains("installwizard.aspx"); - if (!isInstallPage) - { - Localization.SetThreadCultures(this.PageCulture, this.PortalSettings); - } - if (ScriptManager.GetCurrent(this) == null) { AJAX.AddScriptManager(this, !isInstallPage); diff --git a/DNN Platform/Library/Framework/Providers/Provider.cs b/DNN Platform/Library/Framework/Providers/Provider.cs index 6cfafbe5a09..8f49fd13348 100644 --- a/DNN Platform/Library/Framework/Providers/Provider.cs +++ b/DNN Platform/Library/Framework/Providers/Provider.cs @@ -8,24 +8,24 @@ namespace DotNetNuke.Framework.Providers public class Provider { - private readonly NameValueCollection _ProviderAttributes = new NameValueCollection(); - private readonly string _ProviderName; - private readonly string _ProviderType; + private readonly NameValueCollection providerAttributes = new NameValueCollection(); + private readonly string providerName; + private readonly string providerType; - public Provider(XmlAttributeCollection Attributes) + public Provider(XmlAttributeCollection attributes) { // Set the name of the provider - this._ProviderName = Attributes["name"].Value; + this.providerName = attributes["name"].Value; // Set the type of the provider - this._ProviderType = Attributes["type"].Value; + this.providerType = attributes["type"].Value; // Store all the attributes in the attributes bucket - foreach (XmlAttribute Attribute in Attributes) + foreach (XmlAttribute attribute in attributes) { - if (Attribute.Name != "name" && Attribute.Name != "type") + if (attribute.Name != "name" && attribute.Name != "type") { - this._ProviderAttributes.Add(Attribute.Name, Attribute.Value); + this.providerAttributes.Add(attribute.Name, attribute.Value); } } } @@ -34,7 +34,7 @@ public string Name { get { - return this._ProviderName; + return this.providerName; } } @@ -42,7 +42,7 @@ public string Type { get { - return this._ProviderType; + return this.providerType; } } @@ -50,7 +50,7 @@ public NameValueCollection Attributes { get { - return this._ProviderAttributes; + return this.providerAttributes; } } } diff --git a/DNN Platform/Library/Framework/Providers/ProviderConfiguration.cs b/DNN Platform/Library/Framework/Providers/ProviderConfiguration.cs index c055fd3dd04..8f9b41a2fa4 100644 --- a/DNN Platform/Library/Framework/Providers/ProviderConfiguration.cs +++ b/DNN Platform/Library/Framework/Providers/ProviderConfiguration.cs @@ -10,14 +10,14 @@ namespace DotNetNuke.Framework.Providers public class ProviderConfiguration { - private readonly Hashtable _Providers = new Hashtable(); - private string _DefaultProvider; + private readonly Hashtable providers = new Hashtable(); + private string defaultProvider; public string DefaultProvider { get { - return this._DefaultProvider; + return this.defaultProvider; } } @@ -25,8 +25,13 @@ public Hashtable Providers { get { - return this._Providers; + return this.providers; } + } + + public Provider GetDefaultProvider() + { + return (Provider)this.providers[this.defaultProvider]; } public static ProviderConfiguration GetProviderConfiguration(string strProvider) @@ -39,7 +44,7 @@ internal void LoadValuesFromConfigurationXml(XmlNode node) XmlAttributeCollection attributeCollection = node.Attributes; // Get the default provider - this._DefaultProvider = attributeCollection["defaultProvider"].Value; + this.defaultProvider = attributeCollection["defaultProvider"].Value; // Read child nodes foreach (XmlNode child in node.ChildNodes) diff --git a/DNN Platform/Library/Obsolete/EventLogController.cs b/DNN Platform/Library/Obsolete/EventLogController.cs new file mode 100644 index 00000000000..5ff7925e53a --- /dev/null +++ b/DNN Platform/Library/Obsolete/EventLogController.cs @@ -0,0 +1,307 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace DotNetNuke.Services.Log.EventLog +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + using DotNetNuke.Abstractions.Logging; + using DotNetNuke.Abstractions.Portals; + using DotNetNuke.Common; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Framework; + + using Microsoft.Extensions.DependencyInjection; + + public partial class EventLogController : ServiceLocator, IEventLogController + { + [Obsolete("Deprecated in 9.8.0. Use 'DotNetNuke.Abstractions.Logging.EventLogType' instead. Scheduled for removal in v11.0.0.")] + public enum EventLogType + { + USER_CREATED = 0, + USER_DELETED = 1, + LOGIN_SUPERUSER = 2, + LOGIN_SUCCESS = 3, + LOGIN_FAILURE = 4, + LOGIN_USERLOCKEDOUT = 5, + LOGIN_USERNOTAPPROVED = 6, + CACHE_REFRESHED = 7, + PASSWORD_SENT_SUCCESS = 8, + PASSWORD_SENT_FAILURE = 9, + LOG_NOTIFICATION_FAILURE = 10, + PORTAL_CREATED = 11, + PORTAL_DELETED = 12, + PORTALGROUP_CREATED = 13, + PORTALGROUP_DELETED = 14, + PORTAL_ADDEDTOPORTALGROUP = 15, + PORTAL_REMOVEDFROMPORTALGROUP = 16, + TAB_CREATED = 17, + TAB_UPDATED = 18, + TAB_DELETED = 19, + TAB_SENT_TO_RECYCLE_BIN = 20, + TAB_RESTORED = 21, + USER_ROLE_CREATED = 22, + USER_ROLE_DELETED = 23, + USER_ROLE_UPDATED = 24, + ROLE_CREATED = 25, + ROLE_UPDATED = 26, + ROLE_DELETED = 27, + MODULE_CREATED = 28, + MODULE_UPDATED = 29, + MODULE_DELETED = 30, + MODULE_SENT_TO_RECYCLE_BIN = 31, + MODULE_RESTORED = 32, + SCHEDULER_EVENT_STARTED = 33, + SCHEDULER_EVENT_PROGRESSING = 34, + SCHEDULER_EVENT_COMPLETED = 35, + APPLICATION_START = 36, + APPLICATION_END = 37, + APPLICATION_SHUTTING_DOWN = 38, + SCHEDULER_STARTED = 39, + SCHEDULER_SHUTTING_DOWN = 40, + SCHEDULER_STOPPED = 41, + ADMIN_ALERT = 42, + HOST_ALERT = 43, + CACHE_REMOVED = 44, + CACHE_EXPIRED = 45, + CACHE_UNDERUSED = 46, + CACHE_DEPENDENCYCHANGED = 47, + CACHE_OVERFLOW = 48, + CACHE_REFRESH = 49, + LISTENTRY_CREATED = 50, + LISTENTRY_UPDATED = 51, + LISTENTRY_DELETED = 52, + DESKTOPMODULE_CREATED = 53, + DESKTOPMODULE_UPDATED = 54, + DESKTOPMODULE_DELETED = 55, + SKINCONTROL_CREATED = 56, + SKINCONTROL_UPDATED = 57, + SKINCONTROL_DELETED = 58, + PORTALALIAS_CREATED = 59, + PORTALALIAS_UPDATED = 60, + PORTALALIAS_DELETED = 61, + PROFILEPROPERTY_CREATED = 62, + PROFILEPROPERTY_UPDATED = 63, + PROFILEPROPERTY_DELETED = 64, + USER_UPDATED = 65, + DESKTOPMODULEPERMISSION_CREATED = 66, + DESKTOPMODULEPERMISSION_UPDATED = 67, + DESKTOPMODULEPERMISSION_DELETED = 68, + PERMISSION_CREATED = 69, + PERMISSION_UPDATED = 70, + PERMISSION_DELETED = 71, + TABPERMISSION_CREATED = 72, + TABPERMISSION_UPDATED = 73, + TABPERMISSION_DELETED = 74, + AUTHENTICATION_CREATED = 75, + AUTHENTICATION_UPDATED = 76, + AUTHENTICATION_DELETED = 77, + FILE_ADDED = 78, + FILE_CHANGED = 79, + FILE_DELETED = 80, + FILE_DOWNLOADED = 81, + FILE_MOVED = 82, + FILE_OVERWRITTEN = 83, + FILE_RENAMED = 84, + FILE_METADATACHANGED = 85, + FOLDER_CREATED = 86, + FOLDER_UPDATED = 87, + FOLDER_DELETED = 88, + PACKAGE_CREATED = 89, + PACKAGE_UPDATED = 90, + PACKAGE_DELETED = 91, + LANGUAGEPACK_CREATED = 92, + LANGUAGEPACK_UPDATED = 93, + LANGUAGEPACK_DELETED = 94, + LANGUAGE_CREATED = 95, + LANGUAGE_UPDATED = 96, + LANGUAGE_DELETED = 97, + LIBRARY_UPDATED = 98, + SKINPACKAGE_CREATED = 99, + SKINPACKAGE_UPDATED = 100, + SKINPACKAGE_DELETED = 101, + SCHEDULE_CREATED = 102, + SCHEDULE_UPDATED = 103, + SCHEDULE_DELETED = 104, + HOST_SETTING_CREATED = 105, + HOST_SETTING_UPDATED = 106, + HOST_SETTING_DELETED = 107, + PORTALDESKTOPMODULE_CREATED = 108, + PORTALDESKTOPMODULE_UPDATED = 109, + PORTALDESKTOPMODULE_DELETED = 110, + TABMODULE_CREATED = 111, + TABMODULE_UPDATED = 112, + TABMODULE_DELETED = 113, + TABMODULE_SETTING_CREATED = 114, + TABMODULE_SETTING_UPDATED = 115, + TABMODULE_SETTING_DELETED = 116, + MODULE_SETTING_CREATED = 117, + MODULE_SETTING_UPDATED = 118, + MODULE_SETTING_DELETED = 119, + PORTAL_SETTING_CREATED = 120, + PORTAL_SETTING_UPDATED = 121, + PORTAL_SETTING_DELETED = 122, + PORTALINFO_CREATED = 123, + PORTALINFO_UPDATED = 124, + PORTALINFO_DELETED = 125, + AUTHENTICATION_USER_CREATED = 126, + AUTHENTICATION_USER_UPDATED = 127, + AUTHENTICATION_USER_DELETED = 128, + LANGUAGETOPORTAL_CREATED = 129, + LANGUAGETOPORTAL_UPDATED = 130, + LANGUAGETOPORTAL_DELETED = 131, + TAB_ORDER_UPDATED = 132, + TAB_SETTING_CREATED = 133, + TAB_SETTING_UPDATED = 134, + TAB_SETTING_DELETED = 135, + HOST_SQL_EXECUTED = 136, + USER_RESTORED = 137, + USER_REMOVED = 138, + USER_IMPERSONATED = 139, + USERNAME_UPDATED = 140, + IP_LOGIN_BANNED = 141, + PAGE_NOT_FOUND_404 = 142, + TABURL_CREATED = 143, + TABURL_UPDATED = 144, + TABURL_DELETED = 145, + SCRIPT_COLLISION = 146, + POTENTIAL_PAYPAL_PAYMENT_FRAUD = 147, + WEBSERVER_CREATED = 148, + WEBSERVER_UPDATED = 149, + WEBSERVER_DISABLED = 150, + WEBSERVER_ENABLED = 151, + WEBSERVER_PINGFAILED = 152, + FOLDER_MOVED = 153, + } + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogger' instead. Scheduled for removal in v11.0.0.")] + public static void AddSettingLog(EventLogType logTypeKey, string idFieldName, int idValue, string settingName, string settingValue, int userId) => + Globals.DependencyProvider.GetRequiredService() + .AddSettingLog((Abstractions.Logging.EventLogType)logTypeKey, idFieldName, idValue, settingName, settingValue, userId); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogger' instead. Scheduled for removal in v11.0.0.")] + public void AddLog(string propertyName, string propertyValue, EventLogType logType) => + this.EventLogger.AddLog(propertyName, propertyValue, (Abstractions.Logging.EventLogType)logType); + + [Obsolete("Deprecated in DNN 9.7. It has been replaced by the overload taking IPortalSettings. Scheduled removal in v11.0.0.")] + public void AddLog(string propertyName, string propertyValue, PortalSettings portalSettings, int userID, EventLogType logType) => + this.AddLog(propertyName, propertyValue, (IPortalSettings)portalSettings, userID, logType); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogger' instead. Scheduled for removal in v11.0.0.")] + public void AddLog(string propertyName, string propertyValue, IPortalSettings portalSettings, int userID, EventLogType logType) => + this.EventLogger.AddLog(propertyName, propertyValue, portalSettings, userID, (Abstractions.Logging.EventLogType)logType); + + [Obsolete("Deprecated in DNN 9.7. It has been replaced by the overload taking IPortalSettings. Scheduled removal in v11.0.0.")] + public void AddLog(string propertyName, string propertyValue, PortalSettings portalSettings, int userID, string logType) => + this.AddLog(propertyName, propertyValue, (IPortalSettings)portalSettings, userID, logType); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogger' instead. Scheduled for removal in v11.0.0.")] + public void AddLog(string propertyName, string propertyValue, IPortalSettings portalSettings, int userID, string logType) => + this.EventLogger.AddLog(propertyName, propertyValue, portalSettings, userID, logType); + + [Obsolete("Deprecated in DNN 9.7. It has been replaced by the overload taking IPortalSettings. Scheduled removal in v11.0.0.")] + public void AddLog(LogProperties properties, PortalSettings portalSettings, int userID, string logTypeKey, bool bypassBuffering) => + this.AddLog(properties, (IPortalSettings)portalSettings, userID, logTypeKey, bypassBuffering); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogger' instead. Scheduled for removal in v11.0.0.")] + public void AddLog(LogProperties properties, IPortalSettings portalSettings, int userID, string logTypeKey, bool bypassBuffering) => + this.EventLogger.AddLog(properties, portalSettings, userID, logTypeKey, bypassBuffering); + + [Obsolete("Deprecated in DNN 9.7. It has been replaced by the overload taking IPortalSettings. Scheduled removal in v11.0.0.")] + public void AddLog(PortalSettings portalSettings, int userID, EventLogType logType) => + this.AddLog((IPortalSettings)portalSettings, userID, logType); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogger' instead. Scheduled for removal in v11.0.0.")] + public void AddLog(IPortalSettings portalSettings, int userID, EventLogType logType) => + this.EventLogger.AddLog(portalSettings, userID, (Abstractions.Logging.EventLogType)logType); + + [Obsolete("Deprecated in DNN 9.7. It has been replaced by the overload taking IPortalSettings. Scheduled removal in v11.0.0.")] + public void AddLog(object businessObject, PortalSettings portalSettings, int userID, string userName, EventLogType logType) => + this.AddLog(businessObject, (IPortalSettings)portalSettings, userID, userName, logType); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogger' instead. Scheduled for removal in v11.0.0.")] + public void AddLog(object businessObject, IPortalSettings portalSettings, int userID, string userName, EventLogType logType) => + this.EventLogger.AddLog(businessObject, portalSettings, userID, userName, (Abstractions.Logging.EventLogType)logType); + + [Obsolete("Deprecated in DNN 9.7. It has been replaced by the overload taking IPortalSettings. Scheduled removal in v11.0.0.")] + public void AddLog(object businessObject, PortalSettings portalSettings, int userID, string userName, string logType) => + this.AddLog(businessObject, (IPortalSettings)portalSettings, userID, userName, logType); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogger' instead. Scheduled for removal in v11.0.0.")] + public void AddLog(object businessObject, IPortalSettings portalSettings, int userID, string userName, string logType) => + this.EventLogger.AddLog(businessObject, portalSettings, userID, userName, logType); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogger' instead. Scheduled for removal in v11.0.0.")] + public void AddLog(LogInfo logInfo) => + this.EventLogger.AddLog(logInfo); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogConfigService' instead. Scheduled for removal in v11.0.0.")] + public void AddLogType(string configFile, string fallbackConfigFile) => + this.EventLogConfigService.AddLogType(configFile, fallbackConfigFile); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogConfigService' instead. Scheduled for removal in v11.0.0.")] + public void AddLogType(LogTypeInfo logType) => + this.EventLogConfigService.AddLogType(logType); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogConfigService' instead. Scheduled for removal in v11.0.0.")] + public void AddLogTypeConfigInfo(LogTypeConfigInfo logTypeConfig) => + this.EventLogConfigService.AddLogTypeConfigInfo(logTypeConfig); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogService' instead. Scheduled for removal in v11.0.0.")] + public void ClearLog() => + this.EventLogService.ClearLog(); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogService' instead. Scheduled for removal in v11.0.0.")] + public void DeleteLog(LogInfo logInfo) => + this.EventLogService.DeleteLog(logInfo); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogConfigService' instead. Scheduled for removal in v11.0.0.")] + public void DeleteLogType(LogTypeInfo logType) => + this.EventLogConfigService.DeleteLogType(logType); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogConfigService' instead. Scheduled for removal in v11.0.0.")] + public void DeleteLogTypeConfigInfo(LogTypeConfigInfo logTypeConfig) => + this.EventLogConfigService.DeleteLogTypeConfigInfo(logTypeConfig); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogService' instead. Scheduled for removal in v11.0.0.")] + public List GetLogs(int portalID, string logType, int pageSize, int pageIndex, ref int totalRecords) => + this.EventLogService.GetLogs(portalID, logType, pageSize, pageIndex, ref totalRecords).Cast().ToList(); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogConfigService' instead. Scheduled for removal in v11.0.0.")] + public ArrayList GetLogTypeConfigInfo() => + LogController.Instance.GetLogTypeConfigInfo(); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogConfigService' instead. Scheduled for removal in v11.0.0.")] + public LogTypeConfigInfo GetLogTypeConfigInfoByID(string id) => + (LogTypeConfigInfo)this.EventLogConfigService.GetLogTypeConfigInfoByID(id); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogConfigService' instead. Scheduled for removal in v11.0.0.")] + public Dictionary GetLogTypeInfoDictionary() => + this.EventLogConfigService + .GetLogTypeInfoDictionary() + .ToDictionary(key => key.Key, value => (LogTypeInfo)value.Value); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogService.GetLog()' instead. Scheduled for removal in v11.0.0.")] + public object GetSingleLog(LogInfo log, LoggingProvider.ReturnType returnType) => + LogController.Instance.GetSingleLog(log, returnType); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogService' instead. Scheduled for removal in v11.0.0.")] + public void PurgeLogBuffer() => + this.EventLogService.PurgeLogBuffer(); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogConfigService' instead. Scheduled for removal in v11.0.0.")] + public virtual void UpdateLogTypeConfigInfo(LogTypeConfigInfo logTypeConfig) => + this.EventLogConfigService.UpdateLogTypeConfigInfo(logTypeConfig); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogConfigService' instead. Scheduled for removal in v11.0.0.")] + public virtual void UpdateLogType(LogTypeInfo logType) => + this.EventLogConfigService.UpdateLogType(logType); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogger' instead. Scheduled for removal in v11.0.0.")] + protected override Func GetFactory() => + () => new EventLogController(); + } +} diff --git a/DNN Platform/Library/Obsolete/LogInfo.cs b/DNN Platform/Library/Obsolete/LogInfo.cs new file mode 100644 index 00000000000..2ab95cc80c8 --- /dev/null +++ b/DNN Platform/Library/Obsolete/LogInfo.cs @@ -0,0 +1,54 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace DotNetNuke.Services.Log.EventLog +{ + using System; + + using DotNetNuke.Abstractions.Logging; + + public partial class LogInfo + { + [Obsolete("Deprecated in 9.8.0. Use 'DotNetNuke.Abstractions.Logging.ILogInfo.LogGuid' instead. Scheduled for removal in v11.0.0.")] + public string LogGUID + { + get => ((ILogInfo)this).LogGuid; + set => ((ILogInfo)this).LogGuid = value; + } + + [Obsolete("Deprecated in 9.8.0. Use 'DotNetNuke.Abstractions.Logging.ILogInfo.LogFileId' instead. Scheduled for removal in v11.0.0.")] + public string LogFileID + { + get => ((ILogInfo)this).LogFileId; + set => ((ILogInfo)this).LogFileId = value; + } + + [Obsolete("Deprecated in 9.8.0. Use 'DotNetNuke.Abstractions.Logging.ILogInfo.LogUserId' instead. Scheduled for removal in v11.0.0.")] + public int LogUserID + { + get => ((ILogInfo)this).LogUserId; + set => ((ILogInfo)this).LogUserId = value; + } + + [Obsolete("Deprecated in 9.8.0. Use 'DotNetNuke.Abstractions.Logging.ILogInfo.LogEventId' instead. Scheduled for removal in v11.0.0.")] + public int LogEventID + { + get => ((ILogInfo)this).LogEventId; + set => ((ILogInfo)this).LogEventId = value; + } + + [Obsolete("Deprecated in 9.8.0. Use 'DotNetNuke.Abstractions.Logging.ILogInfo.LogPortalId' instead. Scheduled for removal in v11.0.0.")] + public int LogPortalID + { + get => ((ILogInfo)this).LogPortalId; + set => ((ILogInfo)this).LogPortalId = value; + } + + [Obsolete("Deprecated in 9.8.0. Use 'DotNetNuke.Abstractions.Logging.ILogInfo.LogConfigId' instead. Scheduled for removal in v11.0.0.")] + public string LogConfigID + { + get => ((ILogInfo)this).LogConfigId; + set => ((ILogInfo)this).LogConfigId = value; + } + } +} diff --git a/DNN Platform/Library/Obsolete/LogTypeConfigInfo.cs b/DNN Platform/Library/Obsolete/LogTypeConfigInfo.cs new file mode 100644 index 00000000000..d51df897240 --- /dev/null +++ b/DNN Platform/Library/Obsolete/LogTypeConfigInfo.cs @@ -0,0 +1,26 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace DotNetNuke.Services.Log.EventLog +{ + using System; + + using DotNetNuke.Abstractions.Logging; + + public partial class LogTypeConfigInfo + { + [Obsolete("Deprecated in 9.8.0. Use 'DotNetNuke.Abstractions.Logging.ILogTypeConfigInfo.Id' instead. Scheduled for removal in v11.0.0.")] + public string ID + { + get => ((ILogTypeConfigInfo)this).Id; + set => ((ILogTypeConfigInfo)this).Id = value; + } + + [Obsolete("Deprecated in 9.8.0. Use 'DotNetNuke.Abstractions.Logging.ILogTypeConfigInfo.LogTypePortalId' instead. Scheduled for removal in v11.0.0.")] + public string LogTypePortalID + { + get => ((ILogTypeConfigInfo)this).LogTypePortalId; + set => ((ILogTypeConfigInfo)this).LogTypePortalId = value; + } + } +} diff --git a/DNN Platform/Library/Obsolete/LogTypeInfo.cs b/DNN Platform/Library/Obsolete/LogTypeInfo.cs new file mode 100644 index 00000000000..c6deaa56715 --- /dev/null +++ b/DNN Platform/Library/Obsolete/LogTypeInfo.cs @@ -0,0 +1,19 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace DotNetNuke.Services.Log.EventLog +{ + using System; + + using DotNetNuke.Abstractions.Logging; + + public partial class LogTypeInfo + { + [Obsolete("Deprecated in 9.8.0. Use 'DotNetNuke.Abstractions.Logging.ILogTypeInfo.LogTypeCssClass' instead. Scheduled for removal in v11.0.0.")] + public string LogTypeCSSClass + { + get => ((ILogTypeInfo)this).LogTypeCssClass; + set => ((ILogTypeInfo)this).LogTypeCssClass = value; + } + } +} diff --git a/DNN Platform/Library/Obsolete/SerializationController.cs b/DNN Platform/Library/Obsolete/SerializationController.cs new file mode 100644 index 00000000000..e8977173c75 --- /dev/null +++ b/DNN Platform/Library/Obsolete/SerializationController.cs @@ -0,0 +1,35 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace DotNetNuke.Entities.Modules.Settings +{ + using System; + using System.Reflection; + + using DotNetNuke.Abstractions; + using DotNetNuke.Common; + using Microsoft.Extensions.DependencyInjection; + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.ISerializationManager' instead. Scheduled for removal in v11.0.0.")] + public partial class SerializationController + { + static ISerializationManager SerializationManager => + Globals.DependencyProvider.GetRequiredService(); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.ISerializationManager' instead. Scheduled for removal in v11.0.0.")] + public static string SerializeProperty(T myObject, PropertyInfo property) => + SerializationManager.SerializeProperty(myObject, property); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.ISerializationManager' instead. Scheduled for removal in v11.0.0.")] + public static string SerializeProperty(T myObject, PropertyInfo property, string serializer) => + SerializationManager.SerializeProperty(myObject, property, serializer); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.ISerializationManager' instead. Scheduled for removal in v11.0.0.")] + public static void DeserializeProperty(T myObject, PropertyInfo property, string propertyValue) + where T : class, new() => SerializationManager.DeserializeProperty(myObject, property, propertyValue); + + [Obsolete("Deprecated in 9.8.0. Use Dependency Injection to resolve 'DotNetNuke.Abstractions.ISerializationManager' instead. Scheduled for removal in v11.0.0.")] + public static void DeserializeProperty(T myObject, PropertyInfo property, string propertyValue, string serializer) + where T : class, new() => SerializationManager.DeserializeProperty(myObject, property, propertyValue, serializer); + } +} diff --git a/DNN Platform/Library/Prompt/ConsoleCommand.cs b/DNN Platform/Library/Prompt/ConsoleCommand.cs index 53e5cf8c613..b3731142e52 100644 --- a/DNN Platform/Library/Prompt/ConsoleCommand.cs +++ b/DNN Platform/Library/Prompt/ConsoleCommand.cs @@ -1,18 +1,24 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -using DotNetNuke.Abstractions.Portals; -using DotNetNuke.Abstractions.Prompt; -using DotNetNuke.Abstractions.Users; -using DotNetNuke.Collections; -using DotNetNuke.Services.Localization; -using System.Collections.Generic; -using System.Reflection; - namespace DotNetNuke.Prompt { + using System.Collections.Generic; + using System.Reflection; + + using DotNetNuke.Abstractions; + using DotNetNuke.Abstractions.Portals; + using DotNetNuke.Abstractions.Prompt; + using DotNetNuke.Abstractions.Users; + using DotNetNuke.Collections; + using DotNetNuke.Services.Localization; + using Microsoft.Extensions.DependencyInjection; + public abstract class ConsoleCommand : IConsoleCommand { + private static ISerializationManager SerializationManager => + Common.Globals.DependencyProvider.GetRequiredService(); + public abstract string LocalResourceFile { get; } protected IPortalSettings PortalSettings { get; private set; } protected IUserInfo User { get; private set; } @@ -43,7 +49,7 @@ protected void AddMessage(string message) if (settingValue != null && property.CanWrite) { var tp = property.PropertyType; - Entities.Modules.Settings.SerializationController.DeserializeProperty(myCommand, property, settingValue); + SerializationManager.DeserializeProperty(myCommand, property, settingValue); } }); } diff --git a/DNN Platform/Library/Services/Exceptions/ExceptionInfo.cs b/DNN Platform/Library/Services/Exceptions/ExceptionInfo.cs index 86ceabc0816..04684f69454 100644 --- a/DNN Platform/Library/Services/Exceptions/ExceptionInfo.cs +++ b/DNN Platform/Library/Services/Exceptions/ExceptionInfo.cs @@ -2,15 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information namespace DotNetNuke.Services.Exceptions -{ +{ using System; using System.IO; using System.Net; using System.Text; using System.Xml; + using DotNetNuke.Abstractions.Logging; + + /// [Serializable] - public class ExceptionInfo + public class ExceptionInfo : IExceptionInfo { public ExceptionInfo() { @@ -29,39 +32,55 @@ public ExceptionInfo(Exception e) this.ExceptionHash = e.Hash(); } - + + /// public string AssemblyVersion { get; set; } - + + /// public int PortalId { get; set; } - + + /// public int UserId { get; set; } - + + /// public int TabId { get; set; } - + + /// public string RawUrl { get; set; } - + + /// public string Referrer { get; set; } - + + /// public string UserAgent { get; set; } - + + /// public string ExceptionHash { get; set; } - + + /// public string Message { get; set; } - + + /// public string StackTrace { get; set; } public string InnerMessage { get; set; } - + + /// public string InnerStackTrace { get; set; } - + + /// public string Source { get; set; } - + + /// public string FileName { get; set; } - + + /// public int FileLineNumber { get; set; } - + + /// public int FileColumnNumber { get; set; } - + + /// public string Method { get; set; } public void Deserialize(string content) diff --git a/DNN Platform/Library/Services/FileSystem/FileManager.cs b/DNN Platform/Library/Services/FileSystem/FileManager.cs index 32c65174c24..cc7ddbc7682 100644 --- a/DNN Platform/Library/Services/FileSystem/FileManager.cs +++ b/DNN Platform/Library/Services/FileSystem/FileManager.cs @@ -1,7 +1,7 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information - +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + namespace DotNetNuke.Services.FileSystem { using System; @@ -15,7 +15,6 @@ namespace DotNetNuke.Services.FileSystem using System.Text; using System.Text.RegularExpressions; using System.Web; - using DotNetNuke.Common; using DotNetNuke.Common.Internal; using DotNetNuke.Common.Lists; @@ -38,16 +37,15 @@ namespace DotNetNuke.Services.FileSystem using DotNetNuke.Services.FileSystem.Internal; using DotNetNuke.Services.Log.EventLog; using ICSharpCode.SharpZipLib.Zip; - + using Localization = DotNetNuke.Services.Localization.Localization; - + /// /// Exposes methods to manage files. /// public class FileManager : ComponentBase, IFileManager { private const int BufferSize = 4096; - private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(FileManager)); public virtual IDictionary ContentTypes @@ -55,7 +53,7 @@ public virtual IDictionary ContentTypes get { return FileContentTypeManager.Instance.ContentTypes; } } - private FileExtensionWhitelist WhiteList + public FileExtensionWhitelist WhiteList { get { @@ -66,7 +64,6 @@ private FileExtensionWhitelist WhiteList { return Host.AllowedExtensionWhitelist; } - if (!user.IsAdmin) { var settings = PortalSettings.Current; @@ -76,7 +73,6 @@ private FileExtensionWhitelist WhiteList } } } - return Host.AllowedExtensionWhitelist; } } @@ -530,6 +526,7 @@ public virtual bool FileExists(IFolderInfo folder, string fileName, bool retriev /// The Content Type for the specified extension. public virtual string GetContentType(string extension) { + return FileContentTypeManager.Instance.GetContentType(extension); } @@ -1169,6 +1166,43 @@ internal virtual void MoveVersions(IFileInfo file, IFolderInfo destinationFolder } } + private void AddFileToFolderProvider(Stream fileContent, string fileName, IFolderInfo destinationFolder, FolderProvider provider) + { + try + { + if (!fileContent.CanSeek) + { + using (var seekableStream = this.GetSeekableStream(fileContent)) + { + provider.AddFile(destinationFolder, fileName, seekableStream); + } + } + else + { + provider.AddFile(destinationFolder, fileName, fileContent); + } + } + catch (Exception ex) + { + Logger.Error(ex); + throw new FolderProviderException(Localization.GetExceptionMessage("UnderlyingSystemError", "The underlying system threw an exception."), ex); + } + } + + private void DeleteFileFromFolderProvider(IFileInfo file, FolderProvider provider) + { + try + { + // We can't delete the file until the fileContent resource has been released + provider.DeleteFile(file); + } + catch (Exception ex) + { + Logger.Error(ex); + throw new FolderProviderException(Localization.GetExceptionMessage("UnderlyingSystemError", "The underlying system threw an exception."), ex); + } + } + /// This member is reserved for internal use and is not intended to be used directly from your code. internal virtual void AutoSyncFile(IFileInfo file) { @@ -1194,6 +1228,68 @@ internal virtual void AutoSyncFile(IFileInfo file) } } + private void OnFileDeleted(IFileInfo fileInfo, int userId) + { + EventManager.Instance.OnFileDeleted(new FileDeletedEventArgs + { + FileInfo = fileInfo, + UserId = userId, + IsCascadeDeleting = false, + }); + } + + private static ImageFormat GetImageFormat(Image img) + { + if (img.RawFormat.Equals(ImageFormat.Jpeg)) + { + return ImageFormat.Jpeg; + } + + if (img.RawFormat.Equals(ImageFormat.Bmp)) + { + return ImageFormat.Bmp; + } + + if (img.RawFormat.Equals(ImageFormat.Png)) + { + return ImageFormat.Png; + } + + if (img.RawFormat.Equals(ImageFormat.Emf)) + { + return ImageFormat.Emf; + } + + if (img.RawFormat.Equals(ImageFormat.Exif)) + { + return ImageFormat.Exif; + } + + if (img.RawFormat.Equals(ImageFormat.Gif)) + { + return ImageFormat.Gif; + } + + if (img.RawFormat.Equals(ImageFormat.Icon)) + { + return ImageFormat.Icon; + } + + if (img.RawFormat.Equals(ImageFormat.MemoryBmp)) + { + return ImageFormat.Jpeg; + } + + if (img.RawFormat.Equals(ImageFormat.Tiff)) + { + return ImageFormat.Tiff; + } + else + { + return ImageFormat.Wmf; + } + } + /// This member is reserved for internal use and is not intended to be used directly from your code. /// internal virtual int ExtractFiles(IFileInfo file, IFolderInfo destinationFolder, IList invalidFiles) @@ -1276,6 +1372,49 @@ internal virtual int ExtractFiles(IFileInfo file, IFolderInfo destinationFolder, return exactFilesCount; } + private static Stream ToStream(Image image, ImageFormat formaw) + { + var stream = new MemoryStream(); + image.Save(stream, formaw); + stream.Position = 0; + return stream; + } + + private void OnFileRenamed(IFileInfo fileInfo, string oldFileName, int userId) + { + EventManager.Instance.OnFileRenamed(new FileRenamedEventArgs + { + FileInfo = fileInfo, + UserId = userId, + OldFileName = oldFileName, + }); + } + + // Match the orientation code to the correct rotation: + private static RotateFlipType OrientationToFlipType(string orientation) + { + switch (int.Parse(orientation)) + { + case 1: + return RotateFlipType.RotateNoneFlipNone; + case 2: + return RotateFlipType.RotateNoneFlipX; + case 3: + return RotateFlipType.Rotate180FlipNone; + case 4: + return RotateFlipType.Rotate180FlipX; + case 5: + return RotateFlipType.Rotate90FlipX; + case 6: + return RotateFlipType.Rotate90FlipNone; + case 7: + return RotateFlipType.Rotate270FlipX; + case 8: + return RotateFlipType.Rotate270FlipNone; + default: + return RotateFlipType.RotateNoneFlipNone; + } + } /// This member is reserved for internal use and is not intended to be used directly from your code. internal void EnsureZipFolder(string fileName, IFolderInfo destinationFolder) @@ -1321,6 +1460,16 @@ internal void EnsureZipFolder(string fileName, IFolderInfo destinationFolder) } } + private void OnFileMoved(IFileInfo fileInfo, string oldFilePath, int userId) + { + EventManager.Instance.OnFileMoved(new FileMovedEventArgs + { + FileInfo = fileInfo, + UserId = userId, + OldFilePath = oldFilePath, + }); + } + /// This member is reserved for internal use and is not intended to be used directly from your code. /// internal virtual Stream GetAutoDeleteFileStream(string filePath) @@ -1328,6 +1477,15 @@ internal virtual Stream GetAutoDeleteFileStream(string filePath) return new FileStream(filePath, FileMode.Create, FileAccess.ReadWrite, FileShare.Read, BufferSize, FileOptions.DeleteOnClose); } + private void OnFileOverwritten(IFileInfo fileInfo, int userId) + { + EventManager.Instance.OnFileOverwritten(new FileChangedEventArgs + { + FileInfo = fileInfo, + UserId = userId, + }); + } + /// This member is reserved for internal use and is not intended to be used directly from your code. /// internal virtual int GetCurrentUserID() @@ -1335,6 +1493,15 @@ internal virtual int GetCurrentUserID() return UserController.Instance.GetCurrentUserInfo().UserID; } + private void OnFileMetadataChanged(IFileInfo fileInfo, int userId) + { + EventManager.Instance.OnFileMetadataChanged(new FileChangedEventArgs + { + FileInfo = fileInfo, + UserId = userId, + }); + } + /// This member is reserved for internal use and is not intended to be used directly from your code. /// SHA1 hash of the file. internal virtual string GetHash(Stream stream) @@ -1353,6 +1520,16 @@ internal virtual string GetHash(Stream stream) return hashText.ToString(); } + private void OnFileAdded(IFileInfo fileInfo, IFolderInfo folderInfo, int userId) + { + EventManager.Instance.OnFileAdded(new FileAddedEventArgs + { + FileInfo = fileInfo, + UserId = userId, + FolderInfo = folderInfo, + }); + } + /// /// Gets the hash of a file. /// @@ -1363,459 +1540,53 @@ internal virtual string GetHash(IFileInfo fileInfo) return FolderProvider.Instance(FolderMappingController.Instance.GetFolderMapping(fileInfo.FolderMappingID).FolderProviderType).GetHashCode(fileInfo); } - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// - internal virtual string GetHostMapPath() - { - return TestableGlobals.Instance.HostMapPath; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// - internal virtual Image GetImageFromStream(Stream stream) + /// + /// Rotate/Flip the image as per the metadata and reset the metadata. + /// + /// + private void RotateFlipImage(ref Stream content) { - return Image.FromStream(stream); - } + try + { + using (var image = this.GetImageFromStream(content)) + { + if (!image.PropertyIdList.Any(x => x == 274)) + { + return; + } - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// - internal virtual Globals.PerformanceSettings GetPerformanceSetting() - { - return Host.PerformanceSetting; - } + var orientation = image.GetPropertyItem(274); // Find rotation/flip meta property + if (orientation == null) + { + return; + } - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// - internal virtual bool IsAllowedExtension(string fileName) - { - var extension = Path.GetExtension(fileName); + var flip = OrientationToFlipType(orientation.Value[0].ToString()); + if (flip == RotateFlipType.RotateNoneFlipNone) + { + return; // No rotation or flip required + } - // regex matches a dot followed by 1 or more chars followed by a semi-colon - // regex is meant to block files like "foo.asp;.png" which can take advantage - // of a vulnerability in IIS6 which treasts such files as .asp, not .png - return !string.IsNullOrEmpty(extension) - && this.WhiteList.IsAllowedExtension(extension) - && !Globals.FileExtensionRegex.IsMatch(fileName); + image.RotateFlip(flip); + var newOrientation = new byte[2]; + newOrientation[0] = 1; // little Endian + newOrientation[1] = 0; + orientation.Value = newOrientation; + image.SetPropertyItem(orientation); + content = ToStream(image, GetImageFormat(image)); + } + } + catch (Exception ex) + { + Logger.Error(ex); + } } /// This member is reserved for internal use and is not intended to be used directly from your code. /// - internal virtual bool IsValidFilename(string fileName) + internal virtual string GetHostMapPath() { - // regex ensures the file is a valid filename and doesn't include illegal characters - return Globals.FileValidNameRegex.IsMatch(fileName); - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// - internal virtual bool IsFileAutoSyncEnabled() - { - return Host.EnableFileAutoSync; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - internal virtual void WriteFileToHttpContext(IFileInfo file, ContentDisposition contentDisposition) - { - var scriptTimeOut = HttpContext.Current.Server.ScriptTimeout; - - HttpContext.Current.Server.ScriptTimeout = int.MaxValue; - var objResponse = HttpContext.Current.Response; - - objResponse.ClearContent(); - objResponse.ClearHeaders(); - - switch (contentDisposition) - { - case ContentDisposition.Attachment: - objResponse.AppendHeader("content-disposition", "attachment; filename=\"" + file.FileName + "\""); - break; - case ContentDisposition.Inline: - objResponse.AppendHeader("content-disposition", "inline; filename=\"" + file.FileName + "\""); - break; - default: - throw new ArgumentOutOfRangeException("contentDisposition"); - } - - // Do not send negative Content-Length (file.Size could be negative due to integer overflow for files > 2GB) - if (file.Size >= 0) - { - objResponse.AppendHeader("Content-Length", file.Size.ToString(CultureInfo.InvariantCulture)); - } - - objResponse.ContentType = this.GetContentType(file.Extension.Replace(".", string.Empty)); - - try - { - using (var fileContent = this.GetFileContent(file)) - { - this.WriteStream(objResponse, fileContent); - } - } - catch (Exception ex) - { - Logger.Error(ex); - - objResponse.Write("Error : " + ex.Message); - } - - objResponse.Flush(); - objResponse.End(); - - HttpContext.Current.Server.ScriptTimeout = scriptTimeOut; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - internal virtual void WriteStream(HttpResponse objResponse, Stream objStream) - { - var bytBuffer = new byte[10000]; - try - { - if (objResponse.IsClientConnected) - { - var intLength = objStream.Read(bytBuffer, 0, 10000); - - while (objResponse.IsClientConnected && intLength > 0) - { - objResponse.OutputStream.Write(bytBuffer, 0, intLength); - objResponse.Flush(); - - intLength = objStream.Read(bytBuffer, 0, 10000); - } - } - } - catch (Exception ex) - { - Logger.Error(ex); - objResponse.Write("Error : " + ex.Message); - } - finally - { - if (objStream != null) - { - objStream.Close(); - objStream.Dispose(); - } - } - } - - /// - /// Update file info to database. - /// - /// File info. - /// Whether to update the lazy load properties: Width, Height, Sha1Hash. - /// The file info. - internal virtual IFileInfo UpdateFile(IFileInfo file, bool updateLazyload) - { - // By default File Events will be fired - return this.UpdateFile(file, updateLazyload, true); - } - - /// - /// Update file info to database. - /// - /// File info. - /// Whether to update the lazy load properties: Width, Height, Sha1Hash. - /// Whether to fire File events or not. - /// The file info. - internal virtual IFileInfo UpdateFile(IFileInfo file, bool updateLazyload, bool fireEvent) - { - Requires.NotNull("file", file); - - DataProvider.Instance().UpdateFile( - file.FileId, - file.VersionGuid, - file.FileName, - file.Extension, - file.Size, - updateLazyload ? file.Width : Null.NullInteger, - updateLazyload ? file.Height : Null.NullInteger, - file.ContentType, - file.FolderId, - this.GetCurrentUserID(), - updateLazyload ? file.SHA1Hash : Null.NullString, - file.LastModificationTime, - file.Title, - file.Description, - file.StartDate, - file.EndDate, - file.EnablePublishPeriod, - file.ContentItemID); - - DataCache.RemoveCache("GetFileById" + file.FileId); - this.ClearFolderCache(file.PortalId); - var updatedFile = this.GetFile(file.FileId); - - if (fireEvent) - { - this.OnFileMetadataChanged(updatedFile ?? this.GetFile(file.FileId, true), this.GetCurrentUserID()); - } - - return updatedFile; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - internal virtual void ClearFolderCache(int portalId) - { - DataCache.ClearFolderCache(portalId); - } - - private static ImageFormat GetImageFormat(Image img) - { - if (img.RawFormat.Equals(ImageFormat.Jpeg)) - { - return ImageFormat.Jpeg; - } - - if (img.RawFormat.Equals(ImageFormat.Bmp)) - { - return ImageFormat.Bmp; - } - - if (img.RawFormat.Equals(ImageFormat.Png)) - { - return ImageFormat.Png; - } - - if (img.RawFormat.Equals(ImageFormat.Emf)) - { - return ImageFormat.Emf; - } - - if (img.RawFormat.Equals(ImageFormat.Exif)) - { - return ImageFormat.Exif; - } - - if (img.RawFormat.Equals(ImageFormat.Gif)) - { - return ImageFormat.Gif; - } - - if (img.RawFormat.Equals(ImageFormat.Icon)) - { - return ImageFormat.Icon; - } - - if (img.RawFormat.Equals(ImageFormat.MemoryBmp)) - { - return ImageFormat.Jpeg; - } - - if (img.RawFormat.Equals(ImageFormat.Tiff)) - { - return ImageFormat.Tiff; - } - else - { - return ImageFormat.Wmf; - } - } - - private static Stream ToStream(Image image, ImageFormat formaw) - { - var stream = new MemoryStream(); - image.Save(stream, formaw); - stream.Position = 0; - return stream; - } - - // Match the orientation code to the correct rotation: - private static RotateFlipType OrientationToFlipType(string orientation) - { - switch (int.Parse(orientation)) - { - case 1: - return RotateFlipType.RotateNoneFlipNone; - case 2: - return RotateFlipType.RotateNoneFlipX; - case 3: - return RotateFlipType.Rotate180FlipNone; - case 4: - return RotateFlipType.Rotate180FlipX; - case 5: - return RotateFlipType.Rotate90FlipX; - case 6: - return RotateFlipType.Rotate90FlipNone; - case 7: - return RotateFlipType.Rotate270FlipX; - case 8: - return RotateFlipType.Rotate270FlipNone; - default: - return RotateFlipType.RotateNoneFlipNone; - } - } - - private static bool ValidMetadata(IFileInfo file, out string exceptionMessage) - { - exceptionMessage = string.Empty; - - // TODO check dynamically all required fields from MetadataInfo - - // TODO check dynamically all max lengths from MetadataInfo - // TODO Use the MaxLength from MetadataInfo - if (!string.IsNullOrEmpty(file.Title) && file.Title.Length > 256) - { - exceptionMessage = Localization.GetExceptionMessage("MaxLengthExceeded", "The maximum length of the field {0} has been exceeded", DefaultMetadataNames.Title); - return false; - } - - if (file.StartDate == null || file.StartDate == Null.NullDate) - { - exceptionMessage = Localization.GetExceptionMessage("StartDateRequired", "The Start Date is required"); - return false; - } - - var savedFile = FileManager.Instance.GetFile(file.FileId); - if (file.StartDate < file.CreatedOnDate.Date && file.StartDate != savedFile.StartDate) - { - exceptionMessage = Localization.GetExceptionMessage("StartDateMustNotBeInThePast", "The Start Date must not be in the past"); - return false; - } - - if (file.EndDate != Null.NullDate && file.StartDate > file.EndDate) - { - exceptionMessage = Localization.GetExceptionMessage("InvalidPublishPeriod", "The End Date must be after the Start Date"); - return false; - } - - return true; - } - - private void AddFileToFolderProvider(Stream fileContent, string fileName, IFolderInfo destinationFolder, FolderProvider provider) - { - try - { - if (!fileContent.CanSeek) - { - using (var seekableStream = this.GetSeekableStream(fileContent)) - { - provider.AddFile(destinationFolder, fileName, seekableStream); - } - } - else - { - provider.AddFile(destinationFolder, fileName, fileContent); - } - } - catch (Exception ex) - { - Logger.Error(ex); - throw new FolderProviderException(Localization.GetExceptionMessage("UnderlyingSystemError", "The underlying system threw an exception."), ex); - } - } - - private void DeleteFileFromFolderProvider(IFileInfo file, FolderProvider provider) - { - try - { - // We can't delete the file until the fileContent resource has been released - provider.DeleteFile(file); - } - catch (Exception ex) - { - Logger.Error(ex); - throw new FolderProviderException(Localization.GetExceptionMessage("UnderlyingSystemError", "The underlying system threw an exception."), ex); - } - } - - private void OnFileDeleted(IFileInfo fileInfo, int userId) - { - EventManager.Instance.OnFileDeleted(new FileDeletedEventArgs - { - FileInfo = fileInfo, - UserId = userId, - IsCascadeDeleting = false, - }); - } - - private void OnFileRenamed(IFileInfo fileInfo, string oldFileName, int userId) - { - EventManager.Instance.OnFileRenamed(new FileRenamedEventArgs - { - FileInfo = fileInfo, - UserId = userId, - OldFileName = oldFileName, - }); - } - - private void OnFileMoved(IFileInfo fileInfo, string oldFilePath, int userId) - { - EventManager.Instance.OnFileMoved(new FileMovedEventArgs - { - FileInfo = fileInfo, - UserId = userId, - OldFilePath = oldFilePath, - }); - } - - private void OnFileOverwritten(IFileInfo fileInfo, int userId) - { - EventManager.Instance.OnFileOverwritten(new FileChangedEventArgs - { - FileInfo = fileInfo, - UserId = userId, - }); - } - - private void OnFileMetadataChanged(IFileInfo fileInfo, int userId) - { - EventManager.Instance.OnFileMetadataChanged(new FileChangedEventArgs - { - FileInfo = fileInfo, - UserId = userId, - }); - } - - private void OnFileAdded(IFileInfo fileInfo, IFolderInfo folderInfo, int userId) - { - EventManager.Instance.OnFileAdded(new FileAddedEventArgs - { - FileInfo = fileInfo, - UserId = userId, - FolderInfo = folderInfo, - }); - } - - /// - /// Rotate/Flip the image as per the metadata and reset the metadata. - /// - /// - private void RotateFlipImage(ref Stream content) - { - try - { - using (var image = this.GetImageFromStream(content)) - { - if (!image.PropertyIdList.Any(x => x == 274)) - { - return; - } - - var orientation = image.GetPropertyItem(274); // Find rotation/flip meta property - if (orientation == null) - { - return; - } - - var flip = OrientationToFlipType(orientation.Value[0].ToString()); - if (flip == RotateFlipType.RotateNoneFlipNone) - { - return; // No rotation or flip required - } - - image.RotateFlip(flip); - var newOrientation = new byte[2]; - newOrientation[0] = 1; // little Endian - newOrientation[1] = 0; - orientation.Value = newOrientation; - image.SetPropertyItem(orientation); - content = ToStream(image, GetImageFormat(image)); - } - } - catch (Exception ex) - { - Logger.Error(ex); - } + return TestableGlobals.Instance.HostMapPath; } private void CheckFileAddingRestrictions(IFolderInfo folder, string fileName, bool checkPermissions, @@ -1847,6 +1618,13 @@ private void CheckFileAddingRestrictions(IFolderInfo folder, string fileName, bo } } + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// + internal virtual Image GetImageFromStream(Stream stream) + { + return Image.FromStream(stream); + } + private void NotifyFileAddingEvents(IFolderInfo folder, int createdByUserID, bool fileExists, Workflow folderWorkflow, IFileInfo file) { // Notify file event @@ -1862,6 +1640,13 @@ private void NotifyFileAddingEvents(IFolderInfo folder, int createdByUserID, boo } } + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// + internal virtual Globals.PerformanceSettings GetPerformanceSetting() + { + return Host.PerformanceSetting; + } + private void SetContentItem(IFileInfo file) { // Create Content Item if does not exists @@ -1871,6 +1656,20 @@ private void SetContentItem(IFileInfo file) } } + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// + internal virtual bool IsAllowedExtension(string fileName) + { + var extension = Path.GetExtension(fileName); + + // regex matches a dot followed by 1 or more chars followed by a semi-colon + // regex is meant to block files like "foo.asp;.png" which can take advantage + // of a vulnerability in IIS6 which treasts such files as .asp, not .png + return !string.IsNullOrEmpty(extension) + && this.WhiteList.IsAllowedExtension(extension) + && !Globals.FileExtensionRegex.IsMatch(fileName); + } + private void SetInitialFileMetadata(ref Stream fileContent, FileInfo file, FolderProvider folderProvider) { file.Size = (int)fileContent.Length; @@ -1888,6 +1687,14 @@ private void SetInitialFileMetadata(ref Stream fileContent, FileInfo file, Folde } } + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// + internal virtual bool IsValidFilename(string fileName) + { + // regex ensures the file is a valid filename and doesn't include illegal characters + return Globals.FileValidNameRegex.IsMatch(fileName); + } + private void SetImageProperties(IFileInfo file, Stream fileContent) { try @@ -1908,6 +1715,13 @@ private void SetImageProperties(IFileInfo file, Stream fileContent) } } + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// + internal virtual bool IsFileAutoSyncEnabled() + { + return Host.EnableFileAutoSync; + } + private void CheckFileWritingRestrictions(IFolderInfo folder, string fileName, Stream fileContent, IFileInfo oldFile, int createdByUserId) { if (!PortalController.Instance.HasSpaceAvailable(folder.PortalID, fileContent.Length)) @@ -1935,6 +1749,57 @@ private void CheckFileWritingRestrictions(IFolderInfo folder, string fileName, S } } + /// This member is reserved for internal use and is not intended to be used directly from your code. + internal virtual void WriteFileToHttpContext(IFileInfo file, ContentDisposition contentDisposition) + { + var scriptTimeOut = HttpContext.Current.Server.ScriptTimeout; + + HttpContext.Current.Server.ScriptTimeout = int.MaxValue; + var objResponse = HttpContext.Current.Response; + + objResponse.ClearContent(); + objResponse.ClearHeaders(); + + switch (contentDisposition) + { + case ContentDisposition.Attachment: + objResponse.AppendHeader("content-disposition", "attachment; filename=\"" + file.FileName + "\""); + break; + case ContentDisposition.Inline: + objResponse.AppendHeader("content-disposition", "inline; filename=\"" + file.FileName + "\""); + break; + default: + throw new ArgumentOutOfRangeException("contentDisposition"); + } + + // Do not send negative Content-Length (file.Size could be negative due to integer overflow for files > 2GB) + if (file.Size >= 0) + { + objResponse.AppendHeader("Content-Length", file.Size.ToString(CultureInfo.InvariantCulture)); + } + + objResponse.ContentType = this.GetContentType(file.Extension.Replace(".", string.Empty)); + + try + { + using (var fileContent = this.GetFileContent(file)) + { + this.WriteStream(objResponse, fileContent); + } + } + catch (Exception ex) + { + Logger.Error(ex); + + objResponse.Write("Error : " + ex.Message); + } + + objResponse.Flush(); + objResponse.End(); + + HttpContext.Current.Server.ScriptTimeout = scriptTimeOut; + } + private void ManageFileAdding(int createdByUserID, Workflow folderWorkflow, bool fileExists, FileInfo file) { if (folderWorkflow == null || !fileExists) @@ -1957,22 +1822,108 @@ private void ManageFileAdding(int createdByUserID, Workflow folderWorkflow, bool } } + /// This member is reserved for internal use and is not intended to be used directly from your code. + internal virtual void WriteStream(HttpResponse objResponse, Stream objStream) + { + var bytBuffer = new byte[10000]; + try + { + if (objResponse.IsClientConnected) + { + var intLength = objStream.Read(bytBuffer, 0, 10000); + + while (objResponse.IsClientConnected && intLength > 0) + { + objResponse.OutputStream.Write(bytBuffer, 0, intLength); + objResponse.Flush(); + + intLength = objStream.Read(bytBuffer, 0, 10000); + } + } + } + catch (Exception ex) + { + Logger.Error(ex); + objResponse.Write("Error : " + ex.Message); + } + finally + { + if (objStream != null) + { + objStream.Close(); + objStream.Dispose(); + } + } + } + private void AddFile(IFileInfo file, int createdByUserID) { - file.FileId = DataProvider.Instance().AddFile( - file.PortalId, - file.UniqueId, + file.FileId = DataProvider.Instance().AddFile(file.PortalId, + file.UniqueId, + file.VersionGuid, + file.FileName, + file.Extension, + file.Size, + file.Width, + file.Height, + file.ContentType, + file.Folder, + file.FolderId, + createdByUserID, + file.SHA1Hash, + file.LastModificationTime, + file.Title, + file.Description, + file.StartDate, + file.EndDate, + file.EnablePublishPeriod, + file.ContentItemID); + } + + /// + /// Update file info to database. + /// + /// File info. + /// Whether to update the lazy load properties: Width, Height, Sha1Hash. + /// The file info. + internal virtual IFileInfo UpdateFile(IFileInfo file, bool updateLazyload) + { + // By default File Events will be fired + return this.UpdateFile(file, updateLazyload, true); + } + + private string ProcessVersioning(IFolderInfo folder, IFileInfo oldFile, IFileInfo file, int createdByUserID) + { + if (oldFile != null && FileVersionController.Instance.IsFolderVersioned(folder) && oldFile.SHA1Hash != file.SHA1Hash) + { + return FileVersionController.Instance.AddFileVersion(oldFile, createdByUserID); + } + return file.FileName; + } + + /// + /// Update file info to database. + /// + /// File info. + /// Whether to update the lazy load properties: Width, Height, Sha1Hash. + /// Whether to fire File events or not. + /// The file info. + internal virtual IFileInfo UpdateFile(IFileInfo file, bool updateLazyload, bool fireEvent) + { + Requires.NotNull("file", file); + + DataProvider.Instance().UpdateFile( + file.FileId, file.VersionGuid, file.FileName, file.Extension, file.Size, - file.Width, - file.Height, + updateLazyload ? file.Width : Null.NullInteger, + updateLazyload ? file.Height : Null.NullInteger, file.ContentType, - file.Folder, file.FolderId, - createdByUserID, - file.SHA1Hash, + this.GetCurrentUserID(), + updateLazyload ? file.SHA1Hash : Null.NullString, file.LastModificationTime, file.Title, file.Description, @@ -1980,16 +1931,17 @@ private void AddFile(IFileInfo file, int createdByUserID) file.EndDate, file.EnablePublishPeriod, file.ContentItemID); - } - private string ProcessVersioning(IFolderInfo folder, IFileInfo oldFile, IFileInfo file, int createdByUserID) - { - if (oldFile != null && FileVersionController.Instance.IsFolderVersioned(folder) && oldFile.SHA1Hash != file.SHA1Hash) + DataCache.RemoveCache("GetFileById" + file.FileId); + this.ClearFolderCache(file.PortalId); + var updatedFile = this.GetFile(file.FileId); + + if (fireEvent) { - return FileVersionController.Instance.AddFileVersion(oldFile, createdByUserID); + this.OnFileMetadataChanged(updatedFile ?? this.GetFile(file.FileId, true), this.GetCurrentUserID()); } - return file.FileName; + return updatedFile; } private bool CanUpdateWhenApproving(IFolderInfo folder, ContentItem item, int createdByUserID) @@ -2003,6 +1955,12 @@ private bool CanUpdateWhenApproving(IFolderInfo folder, ContentItem item, int cr return WorkflowSecurity.Instance.HasStateReviewerPermission(folder.PortalID, createdByUserID, item.StateID); } + /// This member is reserved for internal use and is not intended to be used directly from your code. + internal virtual void ClearFolderCache(int portalId) + { + DataCache.ClearFolderCache(portalId); + } + private bool StartWorkflow(int createdByUserID, Workflow folderWorkflow, bool fileExists, int contentItemID) { if (WorkflowEngine.Instance.IsWorkflowCompleted(contentItemID)) @@ -2010,10 +1968,45 @@ private bool StartWorkflow(int createdByUserID, Workflow folderWorkflow, bool fi WorkflowEngine.Instance.StartWorkflow(folderWorkflow.WorkflowID, contentItemID, createdByUserID); return true; } - return false; } + private static bool ValidMetadata(IFileInfo file, out string exceptionMessage) + { + exceptionMessage = string.Empty; + + // TODO check dynamically all required fields from MetadataInfo + + // TODO check dynamically all max lengths from MetadataInfo + // TODO Use the MaxLength from MetadataInfo + if (!string.IsNullOrEmpty(file.Title) && file.Title.Length > 256) + { + exceptionMessage = Localization.GetExceptionMessage("MaxLengthExceeded", "The maximum length of the field {0} has been exceeded", DefaultMetadataNames.Title); + return false; + } + + if (file.StartDate == null || file.StartDate == Null.NullDate) + { + exceptionMessage = Localization.GetExceptionMessage("StartDateRequired", "The Start Date is required"); + return false; + } + + var savedFile = FileManager.Instance.GetFile(file.FileId); + if (file.StartDate < file.CreatedOnDate.Date && file.StartDate != savedFile.StartDate) + { + exceptionMessage = Localization.GetExceptionMessage("StartDateMustNotBeInThePast", "The Start Date must not be in the past"); + return false; + } + + if (file.EndDate != Null.NullDate && file.StartDate > file.EndDate) + { + exceptionMessage = Localization.GetExceptionMessage("InvalidPublishPeriod", "The End Date must be after the Start Date"); + return false; + } + + return true; + } + private string UpdateWhileApproving(IFolderInfo folder, int createdByUserID, IFileInfo file, IFileInfo oldFile, Stream content) { var contentController = new ContentController(); diff --git a/DNN Platform/Library/Services/FileSystem/FolderManager.cs b/DNN Platform/Library/Services/FileSystem/FolderManager.cs index e64992aa500..30d3752b06b 100644 --- a/DNN Platform/Library/Services/FileSystem/FolderManager.cs +++ b/DNN Platform/Library/Services/FileSystem/FolderManager.cs @@ -1,2455 +1,2447 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Services.FileSystem -{ - using System; - using System.Collections.Generic; - using System.Collections.ObjectModel; - using System.ComponentModel; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Net.NetworkInformation; - using System.Reflection; - using System.Text.RegularExpressions; - using System.Threading; - using System.Web; - - using DotNetNuke.Common; - using DotNetNuke.Common.Utilities; - using DotNetNuke.ComponentModel; - using DotNetNuke.Data; - using DotNetNuke.Entities; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Entities.Users; - using DotNetNuke.Instrumentation; - using DotNetNuke.Security.Permissions; - using DotNetNuke.Services.FileSystem.EventArgs; - using DotNetNuke.Services.FileSystem.Internal; - using DotNetNuke.Services.Log.EventLog; - - using Localization = DotNetNuke.Services.Localization.Localization; - - /// Exposes methods to manage folders. - public class FolderManager : ComponentBase, IFolderManager - { - private const string DefaultUsersFoldersPath = "Users"; - private const string DefaultMappedPathSetting = "DefaultMappedPath"; - private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(FolderManager)); - private static readonly Dictionary SyncFoldersData = new Dictionary(); - private static readonly object ThreadLocker = new object(); - - /// Gets the localization key for MyFolderName. - public virtual string MyFolderName - { - get - { - return Localization.GetString("MyFolderName"); - } - } - - /// - /// Creates a new folder using the provided folder path. - /// - /// The folder mapping to use. - /// The path of the new folder. - /// Thrown when folderPath or folderMapping are null. - /// Thrown when the underlying system throw an exception. - /// The added folder. - public virtual IFolderInfo AddFolder(FolderMappingInfo folderMapping, string folderPath) - { - return this.AddFolder(folderMapping, folderPath, folderPath); - } - - /// - /// Creates a new folder using the provided folder path and mapping. - /// - /// The folder mapping to use. - /// The path of the new folder. - /// The mapped path of the new folder. - /// Thrown when folderPath or folderMapping are null. - /// Thrown when the underlying system throw an exception. - /// The added folder. - public virtual IFolderInfo AddFolder(FolderMappingInfo folderMapping, string folderPath, string mappedPath) - { - Requires.PropertyNotNull("folderPath", folderPath); - Requires.NotNull("folderMapping", folderMapping); - - folderPath = folderPath.Trim(); - - if (this.FolderExists(folderMapping.PortalID, folderPath)) - { - throw new FolderAlreadyExistsException(Localization.GetExceptionMessage("AddFolderAlreadyExists", "The provided folder path already exists. The folder has not been added.")); - } - - if (!this.IsValidFolderPath(folderPath)) - { - throw new InvalidFolderPathException(Localization.GetExceptionMessage("AddFolderNotAllowed", "The folder path '{0}' is not allowed. The folder has not been added.", folderPath)); - } - - var parentFolder = this.GetParentFolder(folderMapping.PortalID, folderPath); - if (parentFolder != null) - { - var parentFolderMapping = FolderMappingController.Instance.GetFolderMapping( - parentFolder.PortalID, - parentFolder.FolderMappingID); - if (FolderProvider.Instance(parentFolderMapping.FolderProviderType).SupportsMappedPaths) - { - folderMapping = parentFolderMapping; - mappedPath = string.IsNullOrEmpty(parentFolder.FolderPath) ? PathUtils.Instance.FormatFolderPath(parentFolder.MappedPath + folderPath) - : PathUtils.Instance.FormatFolderPath(parentFolder.MappedPath + folderPath.Replace(parentFolder.FolderPath, string.Empty)); - } - else if (!FolderProvider.Instance(folderMapping.FolderProviderType).SupportsMappedPaths) - { - mappedPath = folderPath; - } - else - { - // Parent foldermapping DOESN'T support mapped path - // abd current foldermapping YES support mapped path - mappedPath = PathUtils.Instance.FormatFolderPath(this.GetDefaultMappedPath(folderMapping) + mappedPath); - } - } - else if (FolderProvider.Instance(folderMapping.FolderProviderType).SupportsMappedPaths) - { - mappedPath = PathUtils.Instance.FormatFolderPath(this.GetDefaultMappedPath(folderMapping) + mappedPath); - } - - try - { - FolderProvider.Instance(folderMapping.FolderProviderType).AddFolder(folderPath, folderMapping, mappedPath); - } - catch (Exception ex) - { - Logger.Error(ex); - - throw new FolderProviderException(Localization.GetExceptionMessage("AddFolderUnderlyingSystemError", "The underlying system threw an exception. The folder has not been added."), ex); - } - - this.CreateFolderInFileSystem(PathUtils.Instance.GetPhysicalPath(folderMapping.PortalID, folderPath)); - var folderId = this.CreateFolderInDatabase(folderMapping.PortalID, folderPath, folderMapping.FolderMappingID, mappedPath); - - var folder = this.GetFolder(folderId); - - // Notify add folder event - this.OnFolderAdded(folder, this.GetCurrentUserId()); - - return folder; - } - - /// - /// Creates a new folder in the given portal using the provided folder path. - /// The same mapping than the parent folder will be used to create this folder. So this method have to be used only to create subfolders. - /// - /// The portal identifier. - /// The path of the new folder. - /// Thrown when folderPath is null or empty. - /// The added folder. - public virtual IFolderInfo AddFolder(int portalId, string folderPath) - { - Requires.NotNullOrEmpty("folderPath", folderPath); - - folderPath = PathUtils.Instance.FormatFolderPath(folderPath); - - var parentFolderPath = folderPath.Substring(0, folderPath.Substring(0, folderPath.Length - 1).LastIndexOf("/", StringComparison.Ordinal) + 1); - var parentFolder = this.GetFolder(portalId, parentFolderPath) ?? this.AddFolder(portalId, parentFolderPath); - - var folderMapping = FolderMappingController.Instance.GetFolderMapping(portalId, parentFolder.FolderMappingID); - - return this.AddFolder(folderMapping, folderPath); - } - - /// - /// Deletes the specified folder. - /// - /// The folder to delete. - /// Thrown when folder is null. - /// Thrown when the underlying system throw an exception. - public virtual void DeleteFolder(IFolderInfo folder) - { - this.DeleteFolderInternal(folder, false); - } - - /// - /// Removes the database reference to a folder on disk. - /// - /// The folder to unlink. - public virtual void UnlinkFolder(IFolderInfo folder) - { - this.DeleteFolderRecursive(folder, new Collection(), true, true); - } - - /// - /// Deletes the specified folder. - /// - /// The folder identifier. - public virtual void DeleteFolder(int folderId) - { - var folder = this.GetFolder(folderId); - - this.DeleteFolder(folder); - } - - /// - /// Deletes the specified folder and all its content. - /// - /// The folder to delete. - /// A collection with all not deleted subfolders after processiong the action. - public void DeleteFolder(IFolderInfo folder, ICollection notDeletedSubfolders) - { - this.DeleteFolderRecursive(folder, notDeletedSubfolders, true, this.GetOnlyUnmap(folder)); - } - - /// - /// Checks the existence of the specified folder in the specified portal. - /// - /// The portal where to check the existence of the folder. - /// The path of folder to check the existence of. - /// A bool value indicating whether the folder exists or not in the specified portal. - public virtual bool FolderExists(int portalId, string folderPath) - { - Requires.PropertyNotNull("folderPath", folderPath); - - return this.GetFolder(portalId, folderPath) != null; - } - - /// - /// Gets the files contained in the specified folder. - /// - /// The folder from which to retrieve the files. - /// The list of files contained in the specified folder. - public virtual IEnumerable GetFiles(IFolderInfo folder) - { - return this.GetFiles(folder, false); - } - - /// - /// Gets the files contained in the specified folder. - /// - /// The folder from which to retrieve the files. - /// Whether or not to include all the subfolders. - /// The list of files contained in the specified folder. - public virtual IEnumerable GetFiles(IFolderInfo folder, bool recursive) - { - return this.GetFiles(folder, recursive, false); - } - - /// - /// Gets the files contained in the specified folder. - /// - /// The folder from which to retrieve the files. - /// Whether or not to include all the subfolders. - /// Indicates if the file is retrieved from All files or from Published files. - /// The list of files contained in the specified folder. - public virtual IEnumerable GetFiles(IFolderInfo folder, bool recursive, bool retrieveUnpublishedFiles) - { - Requires.NotNull("folder", folder); - - return CBO.Instance.FillCollection(DataProvider.Instance().GetFiles(folder.FolderID, retrieveUnpublishedFiles, recursive)); - } - - /// - /// Gets the list of Standard folders the specified user has the provided permissions. - /// - /// The user info. - /// The permissions the folders have to met. - /// The list of Standard folders the specified user has the provided permissions. - /// This method is used to support legacy behaviours and situations where we know the file/folder is in the file system. - public virtual IEnumerable GetFileSystemFolders(UserInfo user, string permissions) - { - var userFolders = new List(); - - var portalId = user.PortalID; - - var userFolder = this.GetUserFolder(user); - - var defaultFolderMaping = FolderMappingController.Instance.GetDefaultFolderMapping(portalId); - - var folders = this.GetFolders(portalId, permissions, user.UserID).Where(f => f.FolderPath != null && f.FolderMappingID == defaultFolderMaping.FolderMappingID); - - foreach (var folder in folders) - { - if (folder.FolderPath.StartsWith(DefaultUsersFoldersPath + "/", StringComparison.InvariantCultureIgnoreCase)) - { - if (folder.FolderID == userFolder.FolderID) - { - folder.DisplayPath = this.MyFolderName + "/"; - folder.DisplayName = this.MyFolderName; - } - else if (!folder.FolderPath.StartsWith(userFolder.FolderPath, StringComparison.InvariantCultureIgnoreCase)) - { - // Allow UserFolder children - continue; - } - } - - userFolders.Add(folder); - } - - return userFolders; - } - - /// - /// Gets a folder entity by providing a folder identifier. - /// - /// The identifier of the folder. - /// The folder entity or null if the folder cannot be located. - public virtual IFolderInfo GetFolder(int folderId) - { - // Try and get the folder from the portal cache - IFolderInfo folder = null; - var portalSettings = PortalController.Instance.GetCurrentSettings(); - if (portalSettings != null) - { - var folders = this.GetFolders(portalSettings.PortalId); - folder = folders.SingleOrDefault(f => f.FolderID == folderId) ?? CBO.Instance.FillObject(DataProvider.Instance().GetFolder(folderId)); - } - - return folder ?? CBO.Instance.FillObject(DataProvider.Instance().GetFolder(folderId)); - } - - /// - /// Gets a folder entity by providing a portal identifier and folder path. - /// - /// The portal where the folder exists. - /// The path of the folder. - /// The folder entity or null if the folder cannot be located. - public virtual IFolderInfo GetFolder(int portalId, string folderPath) - { - Requires.PropertyNotNull("folderPath", folderPath); - - folderPath = PathUtils.Instance.FormatFolderPath(folderPath); - - var folders = this.GetFolders(portalId); - return folders.SingleOrDefault(f => f.FolderPath == folderPath) ?? CBO.Instance.FillObject(DataProvider.Instance().GetFolder(portalId, folderPath)); - } - - /// - /// Gets a folder entity by providing its unique id. - /// - /// The unique id of the folder. - /// The folder entity or null if the folder cannot be located. - public virtual IFolderInfo GetFolder(Guid uniqueId) - { - return CBO.Instance.FillObject(DataProvider.Instance().GetFolderByUniqueID(uniqueId)); - } - - /// - /// Gets the list of subfolders for the specified folder. - /// - /// The folder to get the list of subfolders. - /// The list of subfolders for the specified folder. - /// Thrown when parentFolder is null. - public virtual IEnumerable GetFolders(IFolderInfo parentFolder) - { - return this.GetFolders(parentFolder, false); - } - - /// - /// Gets the sorted list of folders of the provided portal. - /// - /// The portal identifier. - /// True = Read from Cache, False = Read from DB. - /// The sorted list of folders of the provided portal. - public virtual IEnumerable GetFolders(int portalId, bool useCache) - { - if (!useCache) - { - this.ClearFolderCache(portalId); - } - - return this.GetFolders(portalId); - } - - /// - /// Gets the sorted list of folders of the provided portal. - /// - /// The portal identifier. - /// The sorted list of folders of the provided portal. - public virtual IEnumerable GetFolders(int portalId) - { - var folders = new List(); - - var cacheKey = string.Format(DataCache.FolderCacheKey, portalId); - CBO.Instance.GetCachedObject>(new CacheItemArgs(cacheKey, DataCache.FolderCacheTimeOut, DataCache.FolderCachePriority, portalId), this.GetFoldersSortedCallBack, false).ForEach(folders.Add); - - return folders; - } - - /// - /// Gets the sorted list of folders that match the provided permissions in the specified portal. - /// - /// The portal identifier. - /// The permissions to match. - /// The user identifier to be used to check permissions. - /// The list of folders that match the provided permissions in the specified portal. - public virtual IEnumerable GetFolders(int portalId, string permissions, int userId) - { - var folders = new List(); - - var cacheKey = string.Format(DataCache.FolderUserCacheKey, portalId, permissions, userId); - var cacheItemArgs = new CacheItemArgs(cacheKey, DataCache.FolderUserCacheTimeOut, DataCache.FolderUserCachePriority, portalId, permissions, userId); - CBO.Instance.GetCachedObject>(cacheItemArgs, this.GetFoldersByPermissionSortedCallBack, false).ForEach(folders.Add); - - return folders; - } - - /// - /// Gets the list of folders the specified user has read permissions. - /// - /// The user info. - /// The list of folders the specified user has read permissions. - public virtual IEnumerable GetFolders(UserInfo user) - { - return this.GetFolders(user, "READ"); - } - - /// - /// Gets the list of folders the specified user has the provided permissions. - /// - /// The user info. - /// The permissions the folders have to met. - /// The list of folders the specified user has the provided permissions. - public virtual IEnumerable GetFolders(UserInfo user, string permissions) - { - var userFolders = new List(); - - var portalId = user.PortalID; - - var userFolder = this.GetUserFolder(user); - - foreach (var folder in this.GetFolders(portalId, permissions, user.UserID).Where(folder => folder.FolderPath != null)) - { - if (folder.FolderPath.StartsWith(DefaultUsersFoldersPath + "/", StringComparison.InvariantCultureIgnoreCase)) - { - if (folder.FolderID == userFolder.FolderID) - { - folder.DisplayPath = Localization.GetString("MyFolderName") + "/"; - folder.DisplayName = Localization.GetString("MyFolderName"); - } - else if (!folder.FolderPath.StartsWith(userFolder.FolderPath, StringComparison.InvariantCultureIgnoreCase)) - { - // Allow UserFolder children - continue; - } - } - - userFolders.Add(folder); - } - - return userFolders; - } - - /// - /// Gets the folder that belongs to a specific user. - /// - /// The user to get the folder for. - /// The information about the the user folder, . - public virtual IFolderInfo GetUserFolder(UserInfo userInfo) - { - // always use _default portal for a super user - int portalId = userInfo.IsSuperUser ? -1 : userInfo.PortalID; - - string userFolderPath = ((PathUtils)PathUtils.Instance).GetUserFolderPathInternal(userInfo); - return this.GetFolder(portalId, userFolderPath) ?? this.AddUserFolder(userInfo); - } - - /// - /// Moves a folder to a new location. - /// - /// The folder to move. - /// Where to move the new folder. - /// The information about the moved folder, . - public virtual IFolderInfo MoveFolder(IFolderInfo folder, IFolderInfo destinationFolder) - { - Requires.NotNull("folder", folder); - Requires.NotNull("destinationFolder", destinationFolder); - - var newFolderPath = PathUtils.Instance.FormatFolderPath(destinationFolder.FolderPath + folder.FolderName + "/"); - - if (folder.FolderPath == destinationFolder.FolderPath) - { - return folder; - } - - if (this.FolderExists(folder.PortalID, newFolderPath)) - { - throw new InvalidOperationException(string.Format( - Localization.GetExceptionMessage( - "CannotMoveFolderAlreadyExists", - "The folder with name '{0}' cannot be moved. A folder with that name already exists under the folder '{1}'.", - folder.FolderName, - destinationFolder.FolderName))); - } - - var folderMapping = FolderMappingController.Instance.GetFolderMapping(folder.PortalID, folder.FolderMappingID); - var destinationFolderMapping = FolderMappingController.Instance.GetFolderMapping(destinationFolder.PortalID, destinationFolder.FolderMappingID); - - if (!this.CanMoveBetweenFolderMappings(folderMapping, destinationFolderMapping)) - { - throw new InvalidOperationException(string.Format( - Localization.GetExceptionMessage( - "CannotMoveFolderBetweenFolderType", - "The folder with name '{0}' cannot be moved. Move Folder operation between this two folder types is not allowed", - folder.FolderName))); - } - - if (!this.IsMoveOperationValid(folder, destinationFolder, newFolderPath)) - { - throw new InvalidOperationException(Localization.GetExceptionMessage("MoveFolderCannotComplete", "The operation cannot be completed.")); - } - - var currentFolderPath = folder.FolderPath; - - if ((folder.FolderMappingID == destinationFolder.FolderMappingID && FolderProvider.Instance(folderMapping.FolderProviderType).SupportsMoveFolder) || - (IsStandardFolderProviderType(folderMapping) && IsStandardFolderProviderType(destinationFolderMapping))) - { - this.MoveFolderWithinProvider(folder, destinationFolder); - } - else - { - this.MoveFolderBetweenProviders(folder, newFolderPath); - } - - // log the folder moved event. - var log = new LogInfo(); - log.AddProperty("Old Folder Path", currentFolderPath); - log.AddProperty("New Folder Path", newFolderPath); - log.AddProperty("Home Directory", folder.PortalID == Null.NullInteger ? Globals.HostPath : PortalSettings.Current.HomeDirectory); - log.LogTypeKey = EventLogController.EventLogType.FOLDER_MOVED.ToString(); - LogController.Instance.AddLog(log); - - // Files in cache are obsolete because their physical path is not correct after moving - this.DeleteFilesFromCache(folder.PortalID, newFolderPath); - var movedFolder = this.GetFolder(folder.FolderID); - - // Notify folder moved event - this.OnFolderMoved(folder, this.GetCurrentUserId(), currentFolderPath); - - return movedFolder; - } - - /// - /// Renames the specified folder by setting the new provided folder name. - /// - /// The folder to rename. - /// The new name to apply to the folder. - /// Thrown when newFolderName is null or empty. - /// Thrown when folder is null. - /// Thrown when the underlying system throw an exception. - public virtual void RenameFolder(IFolderInfo folder, string newFolderName) - { - Requires.NotNull("folder", folder); - Requires.NotNullOrEmpty("newFolderName", newFolderName); - - if (folder.FolderName.Equals(newFolderName)) - { - return; - } - - var currentFolderName = folder.FolderName; - - var newFolderPath = folder.FolderPath.Substring(0, folder.FolderPath.LastIndexOf(folder.FolderName, StringComparison.Ordinal)) + PathUtils.Instance.FormatFolderPath(newFolderName); - - if (this.FolderExists(folder.PortalID, newFolderPath)) - { - throw new FolderAlreadyExistsException(Localization.GetExceptionMessage("RenameFolderAlreadyExists", "The destination folder already exists. The folder has not been renamed.")); - } - - var folderMapping = FolderMappingController.Instance.GetFolderMapping(folder.PortalID, folder.FolderMappingID); - var provider = FolderProvider.Instance(folderMapping.FolderProviderType); - - this.RenameFolderInFileSystem(folder, newFolderPath); - - // Update Provider - provider.RenameFolder(folder, newFolderName); - - // Update database - this.UpdateChildFolders(folder, newFolderPath); - - // Files in cache are obsolete because their physical path is not correct after rename - this.DeleteFilesFromCache(folder.PortalID, newFolderPath); - - // Notify folder renamed event - this.OnFolderRenamed(folder, this.GetCurrentUserId(), currentFolderName); - } - - /// - /// Search the files contained in the specified folder, for a matching pattern. - /// - /// The folder from which to retrieve the files. - /// The patter to search for. - /// Shoud the search be recursive. - /// The list of files contained in the specified folder. - public virtual IEnumerable SearchFiles(IFolderInfo folder, string pattern, bool recursive) - { - Requires.NotNull("folder", folder); - - if (!FolderPermissionController.Instance.CanViewFolder(folder)) - { - throw new FolderProviderException("No permission to view the folder"); - } - - return this.SearchFiles(folder, WildcardToRegex(pattern), recursive); - } - - /// - /// Synchronizes the entire folder tree for the specified portal. - /// - /// The portal identifier. - /// The number of folder collisions. - public virtual int Synchronize(int portalId) - { - var folderCollisions = this.Synchronize(portalId, string.Empty, true, true); - - DataCache.ClearFolderCache(portalId); - - return folderCollisions; - } - - /// - /// Syncrhonizes the specified folder, its files and its subfolders. - /// - /// The portal identifier. - /// The relative path of the folder. - /// The number of folder collisions. - public virtual int Synchronize(int portalId, string relativePath) - { - return this.Synchronize(portalId, relativePath, true, true); - } - - /// - /// Syncrhonizes the specified folder, its files and, optionally, its subfolders. - /// - /// The portal identifier. - /// The relative path of the folder. - /// Indicates if the synchronization has to be recursive. - /// Indicates if files need to be synchronized. - /// Thrown when there are folder mappings requiring network connection but there is no network available. - /// The number of folder collisions. - public virtual int Synchronize(int portalId, string relativePath, bool isRecursive, bool syncFiles) - { - Requires.PropertyNotNull("relativePath", relativePath); - - if (this.AreThereFolderMappingsRequiringNetworkConnectivity(portalId, relativePath, isRecursive) && !this.IsNetworkAvailable()) - { - throw new NoNetworkAvailableException(Localization.GetExceptionMessage("NoNetworkAvailableError", "Network connectivity is needed but there is no network available.")); - } - - int? scriptTimeOut = null; - - Monitor.Enter(ThreadLocker); - try - { - if (HttpContext.Current != null) - { - scriptTimeOut = this.GetCurrentScriptTimeout(); - - // Synchronization could be a time-consuming process. To not get a time-out, we need to modify the request time-out value - this.SetScriptTimeout(int.MaxValue); - } - - var mergedTree = this.GetMergedTree(portalId, relativePath, isRecursive); - - // Step 1: Add Folders - this.InitialiseSyncFoldersData(portalId, relativePath); - for (var i = 0; i < mergedTree.Count; i++) - { - var item = mergedTree.Values[i]; - this.ProcessMergedTreeItemInAddMode(item, portalId); - } - - this.RemoveSyncFoldersData(relativePath); - - // Step 2: Delete Files and Folders - for (var i = mergedTree.Count - 1; i >= 0; i--) - { - var item = mergedTree.Values[i]; - - if (syncFiles) - { - this.SynchronizeFiles(item, portalId); - } - - this.ProcessMergedTreeItemInDeleteMode(item, portalId); - } - } - finally - { - Monitor.Exit(ThreadLocker); - - // Restore original time-out - if (HttpContext.Current != null && scriptTimeOut != null) - { - this.SetScriptTimeout(scriptTimeOut.Value); - } - } - - return 0; - } - - /// - /// Updates metadata of the specified folder. - /// - /// The folder to update. - /// Thrown when folder is null. - /// The information about the updated folder, . - public virtual IFolderInfo UpdateFolder(IFolderInfo folder) - { - var updatedFolder = this.UpdateFolderInternal(folder, true); - - this.AddLogEntry(updatedFolder, EventLogController.EventLogType.FOLDER_UPDATED); - - this.SaveFolderPermissions(updatedFolder); - - return updatedFolder; - } - - /// - /// Adds read permissions for all users to the specified folder. - /// - /// The folder to add the permission to. - /// Used as base class for FolderPermissionInfo when there is no read permission already defined. - public virtual void AddAllUserReadPermission(IFolderInfo folder, PermissionInfo permission) - { - var roleId = int.Parse(Globals.glbRoleAllUsers); - - var folderPermission = - (from FolderPermissionInfo p in folder.FolderPermissions - where p.PermissionKey == "READ" && p.FolderID == folder.FolderID && p.RoleID == roleId && p.UserID == Null.NullInteger - select p).SingleOrDefault(); - - if (folderPermission != null) - { - folderPermission.AllowAccess = true; - } - else - { - folderPermission = new FolderPermissionInfo(permission) - { - FolderID = folder.FolderID, - UserID = Null.NullInteger, - RoleID = roleId, - AllowAccess = true, - }; - - folder.FolderPermissions.Add(folderPermission); - } - } - - /// - /// Sets folder permissions to the given folder by copying parent folder permissions. - /// - /// The folder to copy permissions to. - public virtual void CopyParentFolderPermissions(IFolderInfo folder) - { - Requires.NotNull("folder", folder); - - if (string.IsNullOrEmpty(folder.FolderPath)) - { - return; - } - - var parentFolderPath = folder.FolderPath.Substring(0, folder.FolderPath.Substring(0, folder.FolderPath.Length - 1).LastIndexOf("/", StringComparison.Ordinal) + 1); - - foreach (FolderPermissionInfo objPermission in - this.GetFolderPermissionsFromSyncData(folder.PortalID, parentFolderPath)) - { - var folderPermission = new FolderPermissionInfo(objPermission) - { - FolderID = folder.FolderID, - RoleID = objPermission.RoleID, - UserID = objPermission.UserID, - AllowAccess = objPermission.AllowAccess, - }; - folder.FolderPermissions.Add(folderPermission, true); - } - - FolderPermissionController.SaveFolderPermissions((FolderInfo)folder); - } - - /// - /// Sets specific folder permissions for the given role to the given folder. - /// - /// The folder to set permission to. - /// The id of the permission to assign. - /// The role to assign the permission to. - public virtual void SetFolderPermission(IFolderInfo folder, int permissionId, int roleId) - { - this.SetFolderPermission(folder, permissionId, roleId, Null.NullInteger); - } - - /// - /// Sets specific folder permissions for the given role/user to the given folder. - /// - /// The folder to set permission to. - /// The id of the permission to assign. - /// The role to assign the permission to. - /// The user to assign the permission to. - public virtual void SetFolderPermission(IFolderInfo folder, int permissionId, int roleId, int userId) - { - if (folder.FolderPermissions.Cast() - .Any(fpi => fpi.FolderID == folder.FolderID && fpi.PermissionID == permissionId && fpi.RoleID == roleId && fpi.UserID == userId && fpi.AllowAccess)) - { - return; - } - - var objFolderPermissionInfo = new FolderPermissionInfo - { - FolderID = folder.FolderID, - PermissionID = permissionId, - RoleID = roleId, - UserID = userId, - AllowAccess = true, - }; - - folder.FolderPermissions.Add(objFolderPermissionInfo, true); - FolderPermissionController.SaveFolderPermissions((FolderInfo)folder); - } - - /// - /// Sets folder permissions for administrator role to the given folder. - /// - /// The folder to set permission to. - /// The administrator role id to assign the permission to. - public virtual void SetFolderPermissions(IFolderInfo folder, int administratorRoleId) - { - Requires.NotNull("folder", folder); - - foreach (PermissionInfo objPermission in PermissionController.GetPermissionsByFolder()) - { - var folderPermission = new FolderPermissionInfo(objPermission) - { - FolderID = folder.FolderID, - RoleID = administratorRoleId, - }; - - folder.FolderPermissions.Add(folderPermission, true); - } - - FolderPermissionController.SaveFolderPermissions((FolderInfo)folder); - } - - /// - /// Moves the specified folder and its contents to a new location. - /// - /// The folder to move. - /// The new folder path. - /// The moved folder. - [EditorBrowsable(EditorBrowsableState.Never)] - [Obsolete("Deprecated in DNN 7.1. It has been replaced by FolderManager.Instance.MoveFolder(IFolderInfo folder, IFolderInfo destinationFolder) . Scheduled removal in v10.0.0.")] - public virtual IFolderInfo MoveFolder(IFolderInfo folder, string newFolderPath) - { - Requires.NotNull("folder", folder); - Requires.NotNullOrEmpty("newFolderPath", newFolderPath); - - var nameCharIndex = newFolderPath.Substring(0, newFolderPath.Length - 1).LastIndexOf("/", StringComparison.Ordinal) + 1; - var parentFolder = this.GetFolder(folder.PortalID, newFolderPath.Substring(0, nameCharIndex)); - if (parentFolder.FolderID == folder.ParentID) - { - var newFolderName = newFolderPath.Substring(nameCharIndex, newFolderPath.Length - nameCharIndex - 1); - this.RenameFolder(folder, newFolderName); - return folder; - } - - return this.MoveFolder(folder, parentFolder); - } - - /// - /// Checks if a given folder path is valid. - /// - /// The folder path. - /// A value indicating whether the folder path is valid. - internal virtual bool IsValidFolderPath(string folderPath) - { - var illegalInFolderPath = new Regex(string.Format("[{0}]", Regex.Escape(new string(Path.GetInvalidPathChars()))), RegexOptions.Compiled); - return !illegalInFolderPath.IsMatch(folderPath) && !folderPath.TrimEnd('/', '\\').EndsWith("."); - } - - /// - /// Adds a log entry. - /// - /// The folder to log about. - /// The type of the log entry. - internal virtual void AddLogEntry(IFolderInfo folder, EventLogController.EventLogType eventLogType) - { - EventLogController.Instance.AddLog(folder, PortalController.Instance.GetCurrentSettings(), this.GetCurrentUserId(), string.Empty, eventLogType); - } - - /// - /// Adds a log entry. - /// - /// The name of the property. - /// The value of the property. - /// The type of log entry. - internal virtual void AddLogEntry(string propertyName, string propertyValue, EventLogController.EventLogType eventLogType) - { - EventLogController.Instance.AddLog(propertyName, propertyValue, PortalController.Instance.GetCurrentSettings(), this.GetCurrentUserId(), eventLogType); - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The site (portal) ID. - /// The new folder path. - internal void DeleteFilesFromCache(int portalId, string newFolderPath) - { - var folders = this.GetFolders(portalId).Where(f => f.FolderPath.StartsWith(newFolderPath)); - foreach (var folderInfo in folders) - { - var fileIds = this.GetFiles(folderInfo).Select(f => f.FileId); - foreach (var fileId in fileIds) - { - DataCache.RemoveCache("GetFileById" + fileId); - } - } - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The added folder information, . - /// the user to add a folder for. - internal virtual IFolderInfo AddUserFolder(UserInfo user) - { - // user _default portal for all super users - var portalId = user.IsSuperUser ? Null.NullInteger : user.PortalID; - - var folderMapping = FolderMappingsConfigController.Instance.GetFolderMapping(portalId, DefaultUsersFoldersPath) ?? FolderMappingController.Instance.GetDefaultFolderMapping(portalId); - - if (!this.FolderExists(portalId, DefaultUsersFoldersPath)) - { - this.AddFolder(folderMapping, DefaultUsersFoldersPath); - } - - // GetUserFolderPathElement is deprecated without a replacement, it should have been internal only and will be removed in DNN v10, hence the warning disable here -#pragma warning disable 612,618 - var rootFolder = PathUtils.Instance.GetUserFolderPathElement(user.UserID, PathUtils.UserFolderElement.Root); -#pragma warning restore 612,618 - - var folderPath = PathUtils.Instance.FormatFolderPath(string.Format(DefaultUsersFoldersPath + "/{0}", rootFolder)); - - if (!this.FolderExists(portalId, folderPath)) - { - this.AddFolder(folderMapping, folderPath); - } - - // GetUserFolderPathElement is deprecated without a replacement, it should have been internal only and will be removed in DNN v10, hence the warning disable here -#pragma warning disable 612,618 - folderPath = PathUtils.Instance.FormatFolderPath(string.Concat(folderPath, PathUtils.Instance.GetUserFolderPathElement(user.UserID, PathUtils.UserFolderElement.SubFolder))); -#pragma warning restore 612,618 - - if (!this.FolderExists(portalId, folderPath)) - { - this.AddFolder(folderMapping, folderPath); - } - - folderPath = PathUtils.Instance.FormatFolderPath(string.Concat(folderPath, user.UserID.ToString(CultureInfo.InvariantCulture))); - - if (!this.FolderExists(portalId, folderPath)) - { - this.AddFolder(folderMapping, folderPath); - - var folder = this.GetFolder(portalId, folderPath); - - foreach (PermissionInfo permission in PermissionController.GetPermissionsByFolder()) - { - if (permission.PermissionKey.Equals("READ", StringComparison.InvariantCultureIgnoreCase) || permission.PermissionKey.Equals("WRITE", StringComparison.InvariantCultureIgnoreCase) || permission.PermissionKey.Equals("BROWSE", StringComparison.InvariantCultureIgnoreCase)) - { - var folderPermission = new FolderPermissionInfo(permission) - { - FolderID = folder.FolderID, - UserID = user.UserID, - RoleID = int.Parse(Globals.glbRoleNothing), - AllowAccess = true, - }; - - folder.FolderPermissions.Add(folderPermission); - - if (permission.PermissionKey.Equals("READ", StringComparison.InvariantCultureIgnoreCase)) - { - this.AddAllUserReadPermission(folder, permission); - } - } - } - - FolderPermissionController.SaveFolderPermissions((FolderInfo)folder); - } - - return this.GetFolder(portalId, folderPath); - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// A value indicating whether there are any folder mappings that required network connectivity. - /// The site (Portal) ID. - /// The relative path. - /// A value indicating whether the check should be recursive or not. - internal virtual bool AreThereFolderMappingsRequiringNetworkConnectivity(int portalId, string relativePath, bool isRecursive) - { - var folder = this.GetFolder(portalId, relativePath); - - if (folder != null) - { - var folderMapping = FolderMappingController.Instance.GetFolderMapping(folder.PortalID, folder.FolderMappingID); - var folderProvider = FolderProvider.Instance(folderMapping.FolderProviderType); - - if (folderProvider.RequiresNetworkConnectivity) - { - return true; - } - } - - if (isRecursive) - { - var folderMappingsRequiringNetworkConnectivity = from fm in FolderMappingController.Instance.GetFolderMappings(portalId) - where - fm.IsEditable && - FolderProvider.Instance(fm.FolderProviderType).RequiresNetworkConnectivity - select fm; - - return folderMappingsRequiringNetworkConnectivity.Any(); - } - - return false; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The site (portal) ID. - internal void ClearFolderProviderCachedLists(int portalId) - { - foreach (var folderMapping in FolderMappingController.Instance.GetFolderMappings(portalId)) - { - var folderProvider = FolderProvider.Instance(folderMapping.FolderProviderType); - - if (folderMapping.MappingName != "Standard" && folderMapping.MappingName != "Secure" && folderMapping.MappingName != "Database") - { - var type = folderProvider.GetType(); - MethodInfo method = type.GetMethod("ClearCache"); - if (method != null) - { - method.Invoke(folderProvider, new object[] { folderMapping.FolderMappingID }); - } - } - } - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The site (portal) ID. - internal virtual void ClearFolderCache(int portalId) - { - DataCache.ClearFolderCache(portalId); - } - - /// - /// Creates a folder in the database. - /// - /// The site (portal) ID. - /// The folder path to create. - /// The folder mapping id, . - /// The created folder ID. - internal virtual int CreateFolderInDatabase(int portalId, string folderPath, int folderMappingId) - { - return this.CreateFolderInDatabase(portalId, folderPath, folderMappingId, folderPath); - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The site (portal) ID. - /// The folder path to create. - /// The id for the folder mapping. - /// The mapped path. - /// The created folder ID. - internal virtual int CreateFolderInDatabase(int portalId, string folderPath, int folderMappingId, string mappedPath) - { - var isProtected = PathUtils.Instance.IsDefaultProtectedPath(folderPath); - var folderMapping = FolderMappingController.Instance.GetFolderMapping(portalId, folderMappingId); - var storageLocation = (int)FolderController.StorageLocationTypes.DatabaseSecure; - if (!folderMapping.IsEditable) - { - switch (folderMapping.MappingName) - { - case "Standard": - storageLocation = (int)FolderController.StorageLocationTypes.InsecureFileSystem; - break; - case "Secure": - storageLocation = (int)FolderController.StorageLocationTypes.SecureFileSystem; - break; - default: - storageLocation = (int)FolderController.StorageLocationTypes.DatabaseSecure; - break; - } - } - - var folder = new FolderInfo(true) - { - PortalID = portalId, - FolderPath = folderPath, - MappedPath = mappedPath, - StorageLocation = storageLocation, - IsProtected = isProtected, - IsCached = false, - FolderMappingID = folderMappingId, - LastUpdated = Null.NullDate, - }; - - folder.FolderID = this.AddFolderInternal(folder); - - if (portalId != Null.NullInteger) - { - // Set Folder Permissions to inherit from parent - this.CopyParentFolderPermissions(folder); - } - - return folder.FolderID; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The physical path to create the folder in. - internal virtual void CreateFolderInFileSystem(string physicalPath) - { - var di = new DirectoryInfo(physicalPath); - - if (!di.Exists) - { - di.Create(); - } - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The site (portal) ID. - /// The folder path. - internal virtual void DeleteFolder(int portalId, string folderPath) - { - DataProvider.Instance().DeleteFolder(portalId, PathUtils.Instance.FormatFolderPath(folderPath)); - this.AddLogEntry("FolderPath", folderPath, EventLogController.EventLogType.FOLDER_DELETED); - this.UpdateParentFolder(portalId, folderPath); - DataCache.ClearFolderCache(portalId); - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The folder mapping affected. - /// A list of folders to delete. - internal virtual void DeleteFoldersFromExternalStorageLocations(Dictionary folderMappings, IEnumerable foldersToDelete) - { - foreach (var folderToDelete in foldersToDelete) - { - // Delete source folder from its storage location - var folderMapping = this.GetFolderMapping(folderMappings, folderToDelete.FolderMappingID); - - try - { - var folderProvider = FolderProvider.Instance(folderMapping.FolderProviderType); - - // IMPORTANT: We cannot delete the folder from its storage location when it contains other subfolders - if (!folderProvider.GetSubFolders(folderToDelete.MappedPath, folderMapping).Any()) - { - folderProvider.DeleteFolder(folderToDelete); - } - } - catch (Exception ex) - { - // The folders that cannot be deleted from its storage location will be handled during the next sync - Logger.Error(ex); - } - } - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// A value representing the current script timeout. - internal virtual int GetCurrentScriptTimeout() - { - return HttpContext.Current.Server.ScriptTimeout; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The id of the current user. - internal virtual int GetCurrentUserId() - { - return UserController.Instance.GetCurrentUserInfo().UserID; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The site (portal) ID. - /// The relative path. - /// A value indicating whether to return folders recursively. - /// A sorted list of folders. - internal virtual SortedList GetDatabaseFolders(int portalId, string relativePath, bool isRecursive) - { - var databaseFolders = new SortedList(new IgnoreCaseStringComparer()); - - var folder = this.GetFolder(portalId, relativePath); - - if (folder != null) - { - if (!isRecursive) - { - var item = new MergedTreeItem - { - FolderID = folder.FolderID, - FolderMappingID = folder.FolderMappingID, - FolderPath = folder.FolderPath, - ExistsInDatabase = true, - MappedPath = folder.MappedPath, - }; - - databaseFolders.Add(relativePath, item); - } - else - { - databaseFolders = this.GetDatabaseFoldersRecursive(folder); - } - } - - return databaseFolders; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The folder to get. - /// A sorted list of folders. - internal virtual SortedList GetDatabaseFoldersRecursive(IFolderInfo folder) - { - var result = new SortedList(new IgnoreCaseStringComparer()); - var stack = new Stack(); - - stack.Push(folder); - - while (stack.Count > 0) - { - var folderInfo = stack.Pop(); - - var item = new MergedTreeItem - { - FolderID = folderInfo.FolderID, - FolderMappingID = folderInfo.FolderMappingID, - FolderPath = folderInfo.FolderPath, - ExistsInDatabase = true, - MappedPath = folderInfo.MappedPath, - }; - - if (!result.ContainsKey(item.FolderPath)) - { - result.Add(item.FolderPath, item); - } - - foreach (var subfolder in this.GetFolders(folderInfo)) - { - stack.Push(subfolder); - } - } - - return result; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The site (portal) ID. - /// The relative path. - /// A value indicating whether to return the folders recursively. - /// A sorted list of folders. - internal virtual SortedList GetFileSystemFolders(int portalId, string relativePath, bool isRecursive) - { - var fileSystemFolders = new SortedList(new IgnoreCaseStringComparer()); - - var physicalPath = PathUtils.Instance.GetPhysicalPath(portalId, relativePath); - var hideFoldersEnabled = PortalController.GetPortalSettingAsBoolean("HideFoldersEnabled", portalId, true); - - if (DirectoryWrapper.Instance.Exists(physicalPath)) - { - if (((FileWrapper.Instance.GetAttributes(physicalPath) & FileAttributes.Hidden) == FileAttributes.Hidden || physicalPath.StartsWith("_")) && hideFoldersEnabled) - { - return fileSystemFolders; - } - - if (!isRecursive) - { - var item = new MergedTreeItem - { - FolderID = -1, - FolderMappingID = -1, - FolderPath = relativePath, - ExistsInFileSystem = true, - MappedPath = string.Empty, - }; - - fileSystemFolders.Add(relativePath, item); - } - else - { - fileSystemFolders = this.GetFileSystemFoldersRecursive(portalId, physicalPath); - } - } - - return fileSystemFolders; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The site (portal) ID. - /// The physical path of the folder. - /// A sorted list of folders. - internal virtual SortedList GetFileSystemFoldersRecursive(int portalId, string physicalPath) - { - var result = new SortedList(new IgnoreCaseStringComparer()); - var stack = new Stack(); - - stack.Push(physicalPath); - - var hideFoldersEnabled = PortalController.GetPortalSettingAsBoolean("HideFoldersEnabled", portalId, true); - - while (stack.Count > 0) - { - var dir = stack.Pop(); - - try - { - var item = new MergedTreeItem - { - FolderID = -1, - FolderMappingID = -1, - FolderPath = PathUtils.Instance.GetRelativePath(portalId, dir), - ExistsInFileSystem = true, - MappedPath = string.Empty, - }; - - result.Add(item.FolderPath, item); - - foreach (var dn in DirectoryWrapper.Instance.GetDirectories(dir)) - { - if (((FileWrapper.Instance.GetAttributes(dn) & FileAttributes.Hidden) == FileAttributes.Hidden || dn.StartsWith("_")) && hideFoldersEnabled) - { - continue; - } - - stack.Push(dn); - } - } - catch (Exception ex) - { - Logger.Error(ex); - } - } - - return result; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The folder mapping to search in. - /// The folder mapping id to return. - /// A single folder mapping, . - internal virtual FolderMappingInfo GetFolderMapping(Dictionary folderMappings, int folderMappingId) - { - if (!folderMappings.ContainsKey(folderMappingId)) - { - folderMappings.Add(folderMappingId, FolderMappingController.Instance.GetFolderMapping(folderMappingId)); - } - - return folderMappings[folderMappingId]; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The folder mapping to use. - /// The folder base path. - /// A sorted list of folder mappings. - internal virtual SortedList GetFolderMappingFoldersRecursive(FolderMappingInfo folderMapping, IFolderInfo folder) - { - var result = new SortedList(new IgnoreCaseStringComparer()); - var stack = new Stack(); - var folderProvider = FolderProvider.Instance(folderMapping.FolderProviderType); - - var baseMappedPath = folder.MappedPath; - var baseFolderPath = folder.FolderPath; - - stack.Push(baseMappedPath); - - while (stack.Count > 0) - { - var mappedPath = stack.Pop(); - var relativePath = string.IsNullOrEmpty(mappedPath) - ? string.Empty - : string.IsNullOrEmpty(baseMappedPath) - ? mappedPath - : RegexUtils.GetCachedRegex(Regex.Escape(baseMappedPath)).Replace(mappedPath, string.Empty, 1); - - var folderPath = baseFolderPath + relativePath; - - if (folderProvider.FolderExists(mappedPath, folderMapping)) - { - var item = new MergedTreeItem - { - FolderID = -1, - FolderMappingID = folderMapping.FolderMappingID, - FolderPath = folderPath, - ExistsInFolderMapping = true, - MappedPath = mappedPath, - }; - - if (!result.ContainsKey(item.FolderPath)) - { - result.Add(item.FolderPath, item); - } - - foreach (var subfolderPath in folderProvider.GetSubFolders(mappedPath, folderMapping)) - { - if (folderMapping.SyncAllSubFolders || folderProvider.FolderExists(subfolderPath, folderMapping)) - { - stack.Push(subfolderPath); - } - } - } - } - - return result; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The cached items arguments, . - /// A list of folders. - internal virtual object GetFoldersByPermissionSortedCallBack(CacheItemArgs cacheItemArgs) - { - var portalId = (int)cacheItemArgs.ParamList[0]; - var permissions = (string)cacheItemArgs.ParamList[1]; - var userId = (int)cacheItemArgs.ParamList[2]; - return CBO.Instance.FillCollection(DataProvider.Instance().GetFoldersByPortalAndPermissions(portalId, permissions, userId)); - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The cache item arguments, . - /// A list of folders. - internal virtual object GetFoldersSortedCallBack(CacheItemArgs cacheItemArgs) - { - var portalId = (int)cacheItemArgs.ParamList[0]; - return CBO.Instance.FillCollection(DataProvider.Instance().GetFoldersByPortal(portalId)); - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The site (portal) ID. - /// The relative path. - /// A vavlue indicating whether the search should be recursive. - /// A sorted list of . - internal virtual SortedList GetMergedTree(int portalId, string relativePath, bool isRecursive) - { - var fileSystemFolders = this.GetFileSystemFolders(portalId, relativePath, isRecursive); - var databaseFolders = this.GetDatabaseFolders(portalId, relativePath, isRecursive); - - var mergedTree = this.MergeFolderLists(fileSystemFolders, databaseFolders); - var mappedFolders = new SortedList(); - - // Some providers cache the list of objects for performance - this.ClearFolderProviderCachedLists(portalId); - - foreach (var mergedItem in mergedTree.Values) - { - if (mergedItem.FolderMappingID == Null.NullInteger) - { - continue; - } - - var folderMapping = FolderMappingController.Instance.GetFolderMapping(portalId, mergedItem.FolderMappingID); - - // Add any folders from non-core providers - if (folderMapping.MappingName != "Standard" && folderMapping.MappingName != "Secure" && folderMapping.MappingName != "Database") - { - if (!isRecursive) - { - mergedItem.ExistsInFolderMapping = true; - } - else - { - var folder = this.GetFolder(portalId, mergedItem.FolderPath); - mappedFolders = this.MergeFolderLists(mappedFolders, this.GetFolderMappingFoldersRecursive(folderMapping, folder)); - } - } - else - { - mergedItem.ExistsInFolderMapping = folderMapping.MappingName == "Database" ? mergedItem.ExistsInDatabase : mergedItem.ExistsInFileSystem; - } - } - - mergedTree = this.MergeFolderLists(mergedTree, mappedFolders); - - // Update ExistsInFolderMapping if the Parent Does Not ExistsInFolderMapping - var margedTreeItems = mergedTree.Values; - foreach (var mergedItem in margedTreeItems.Where(m => m.ExistsInFolderMapping - && margedTreeItems.Any(mt2 => !mt2.ExistsInFolderMapping && m.FolderPath.StartsWith(mt2.FolderPath)))) - { - mergedItem.ExistsInFolderMapping = false; - } - - return mergedTree; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The folder mapping. - /// A value indicating whether the folder mapping is editable. - internal virtual bool IsFolderMappingEditable(FolderMappingInfo folderMapping) - { - return folderMapping.IsEditable; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The folder to move. - /// The destination folder to move the folder to. - /// The new folder path. - /// A value indicating whether the move operation would be valid. - internal virtual bool IsMoveOperationValid(IFolderInfo folderToMove, IFolderInfo destinationFolder, string newFolderPath) - { - // FolderMapping cases - var folderMapping = FolderMappingController.Instance.GetFolderMapping(folderToMove.PortalID, folderToMove.FolderMappingID); - if (folderToMove.FolderMappingID == destinationFolder.FolderMappingID && FolderProvider.Instance(folderMapping.FolderProviderType).SupportsMappedPaths) - { - // Root mapped folder cannot be move, when folder mappings are equal - if (folderToMove.MappedPath == string.Empty) - { - return false; - } - - // Destination folder cannot be a child mapped folder from the folder to move - if (destinationFolder.MappedPath.StartsWith(folderToMove.MappedPath)) - { - return false; - } - } - - return this.IsMoveOperationValid(folderToMove, newFolderPath); - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The folder to move. - /// The distination folder to move the folder into. - /// A value indicating if the move operation would be valid. - internal virtual bool IsMoveOperationValid(IFolderInfo folderToMove, string newFolderPath) - { - // Root folder cannot be moved - if (folderToMove.FolderPath == string.Empty) - { - return false; - } - - // newParentFolder cannot be a child of folderToMove - if (newFolderPath.StartsWith(folderToMove.FolderPath)) - { - return false; - } - - return true; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// A value indicating whether the network is available. - internal virtual bool IsNetworkAvailable() - { - return NetworkInterface.GetIsNetworkAvailable(); - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The first list for the merge. - /// The second list for the merge. - /// A merged sorted list of MergedTreeItems, . - internal virtual SortedList MergeFolderLists(SortedList list1, SortedList list2) - { - foreach (var item in list2.Values) - { - if (list1.ContainsKey(item.FolderPath)) - { - var existingItem = list1[item.FolderPath]; - if (existingItem.FolderID < 0) - { - existingItem.FolderID = item.FolderID; - } - - if (existingItem.FolderMappingID < 0) - { - existingItem.FolderMappingID = item.FolderMappingID; - } - - if (string.IsNullOrEmpty(existingItem.MappedPath)) - { - existingItem.MappedPath = item.MappedPath; - } - - existingItem.ExistsInFileSystem = existingItem.ExistsInFileSystem || item.ExistsInFileSystem; - existingItem.ExistsInDatabase = existingItem.ExistsInDatabase || item.ExistsInDatabase; - existingItem.ExistsInFolderMapping = existingItem.ExistsInFolderMapping || item.ExistsInFolderMapping; - } - else - { - list1.Add(item.FolderPath, item); - } - } - - return list1; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The source directory. - /// The target directory. - internal virtual void MoveDirectory(string source, string target) - { - var stack = new Stack(); - stack.Push(new MoveFoldersInfo(source, target)); - - // ReSharper disable AssignNullToNotNullAttribute - while (stack.Count > 0) - { - var folders = stack.Pop(); - Directory.CreateDirectory(folders.Target); - foreach (var file in Directory.GetFiles(folders.Source, "*.*")) - { - var targetFile = Path.Combine(folders.Target, Path.GetFileName(file)); - if (File.Exists(targetFile)) - { - File.Delete(targetFile); - } - - File.Move(file, targetFile); - } - - foreach (var folder in Directory.GetDirectories(folders.Source)) - { - stack.Push(new MoveFoldersInfo(folder, Path.Combine(folders.Target, Path.GetFileName(folder)))); - } - } - - // ReSharper restore AssignNullToNotNullAttribute - Directory.Delete(source, true); - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The folder to move. - /// The destination folder. - internal virtual void MoveFolderWithinProvider(IFolderInfo folder, IFolderInfo destinationFolder) - { - var newFolderPath = destinationFolder.FolderPath + folder.FolderName + "/"; - this.RenameFolderInFileSystem(folder, newFolderPath); - - // Update provider - var newMappedPath = destinationFolder.MappedPath + folder.FolderName + "/"; - var folderMapping = FolderMappingController.Instance.GetFolderMapping(folder.PortalID, folder.FolderMappingID); - var provider = FolderProvider.Instance(folderMapping.FolderProviderType); - provider.MoveFolder(folder.MappedPath, newMappedPath, folderMapping); - - // Update database - this.UpdateChildFolders(folder, Path.Combine(destinationFolder.FolderPath, folder.FolderName)); - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The folder to move. - /// The target folder for the move. - internal virtual void MoveFolderBetweenProviders(IFolderInfo folder, string newFolderPath) - { - this.RenameFolderInFileSystem(folder, newFolderPath); - - var folderInfos = this.GetFolders(folder.PortalID).Where(f => f.FolderPath != string.Empty && f.FolderPath.StartsWith(folder.FolderPath)).ToArray(); - var tmpFolderPath = folder.FolderPath; - - foreach (var folderInfo in folderInfos) - { - var folderPath = newFolderPath + folderInfo.FolderPath.Substring(tmpFolderPath.Length); - - var parentFolder = this.GetParentFolder(folder.PortalID, folderPath); - folderInfo.ParentID = parentFolder.FolderID; - folderInfo.FolderPath = folderPath; - this.UpdateFolderInternal(folderInfo, true); - } - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The source folder. - /// The destination folder. - /// The folder mappings. - /// The folders to delete. - internal virtual void OverwriteFolder(IFolderInfo sourceFolder, IFolderInfo destinationFolder, Dictionary folderMappings, SortedList foldersToDelete) - { - var fileManager = FileManager.Instance; - var files = this.GetFiles(sourceFolder, true); - - foreach (var file in files) - { - fileManager.MoveFile(file, destinationFolder); - } - - // Delete source folder in database - this.DeleteFolder(sourceFolder.PortalID, sourceFolder.FolderPath); - - var folderMapping = this.GetFolderMapping(folderMappings, sourceFolder.FolderMappingID); - - if (this.IsFolderMappingEditable(folderMapping)) - { - foldersToDelete.Add(sourceFolder.FolderPath, sourceFolder); - } - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The item to process. - /// The site (portal) ID. - internal virtual void ProcessMergedTreeItemInAddMode(MergedTreeItem item, int portalId) - { - try - { - if (item.ExistsInFileSystem) - { - if (!item.ExistsInDatabase) - { - var folderMappingId = this.FindFolderMappingId(item, portalId); - this.CreateFolderInDatabase(portalId, item.FolderPath, folderMappingId); - } - } - else - { - if (item.ExistsInDatabase) - { - if (item.ExistsInFolderMapping) - { - this.CreateFolderInFileSystem(PathUtils.Instance.GetPhysicalPath(portalId, item.FolderPath)); - } - } - else - { - // by exclusion it exists in the Folder Mapping - this.CreateFolderInFileSystem(PathUtils.Instance.GetPhysicalPath(portalId, item.FolderPath)); - this.CreateFolderInDatabase(portalId, item.FolderPath, item.FolderMappingID, item.MappedPath); - } - } - } - catch (Exception ex) - { - Logger.Error(string.Format("Could not create folder {0}. EXCEPTION: {1}", item.FolderPath, ex.Message), ex); - } - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// . - /// The site (portal) ID. - internal virtual void ProcessMergedTreeItemInDeleteMode(MergedTreeItem item, int portalId) - { - if (item.ExistsInFileSystem) - { - if (item.ExistsInDatabase) - { - if (item.FolderPath == string.Empty) - { - return; // Do not process root folder - } - - if (!item.ExistsInFolderMapping) - { - var folderMapping = FolderMappingController.Instance.GetFolderMapping(portalId, item.FolderMappingID); - - if (folderMapping.IsEditable) - { - DirectoryWrapper.Instance.Delete(PathUtils.Instance.GetPhysicalPath(portalId, item.FolderPath), false); - this.DeleteFolder(portalId, item.FolderPath); - } - } - } - } - else - { - if (item.ExistsInDatabase && !item.ExistsInFolderMapping) - { - this.DeleteFolder(portalId, item.FolderPath); - } - } - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The folder to cleanup. - internal virtual void RemoveOrphanedFiles(IFolderInfo folder) - { - var files = this.GetFiles(folder, false, true); - - var folderMapping = FolderMappingController.Instance.GetFolderMapping(folder.PortalID, folder.FolderMappingID); - - if (folderMapping != null) - { - var folderProvider = FolderProvider.Instance(folderMapping.FolderProviderType); - - foreach (var file in files) - { - try - { - if (!folderProvider.FileExists(folder, file.FileName)) - { - FileDeletionController.Instance.DeleteFileData(file); - } - } - catch (Exception ex) - { - Logger.Error(ex); - } - } - } - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The folder to rename. - /// The new folder path. - internal virtual void RenameFolderInFileSystem(IFolderInfo folder, string newFolderPath) - { - var source = folder.PhysicalPath; - - var di = new DirectoryInfo(source); - if (!di.Exists) - { - return; - } - - var target = PathUtils.Instance.GetPhysicalPath(folder.PortalID, newFolderPath); - this.MoveDirectory(source, target); - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The folder to save the permissions for. - internal virtual void SaveFolderPermissions(IFolderInfo folder) - { - FolderPermissionController.SaveFolderPermissions((FolderInfo)folder); - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The timeout in seconds. - internal virtual void SetScriptTimeout(int timeout) - { - HttpContext.Current.Server.ScriptTimeout = timeout; - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The item to synchronize. - /// The site (portal) ID. - internal virtual void SynchronizeFiles(MergedTreeItem item, int portalId) - { - var folder = this.GetFolder(portalId, item.FolderPath); - - if (folder == null) - { - return; - } - - var folderMapping = FolderMappingController.Instance.GetFolderMapping(portalId, folder.FolderMappingID); - - if (folderMapping == null) - { - return; - } - - try - { - var folderProvider = FolderProvider.Instance(folderMapping.FolderProviderType); - var fileManager = FileManager.Instance; - - if (folderProvider.FolderExists(folder.MappedPath, folderMapping)) - { - var files = folderProvider.GetFiles(folder); - - files = files.Except(FileVersionController.Instance.GetFileVersionsInFolder(folder.FolderID).Select(f => f.FileName)).ToArray(); - - foreach (var fileName in files) - { - try - { - var file = fileManager.GetFile(folder, fileName, true); - - if (file == null) - { - fileManager.AddFile(folder, fileName, null, false); - } - else if (!folderProvider.IsInSync(file)) - { - fileManager.UpdateFile(file, null); - } - } - catch (InvalidFileExtensionException ex) - { - Logger.Info(ex.Message); - } - catch (Exception ex) - { - Logger.Error(ex); - } - } - } - - this.RemoveOrphanedFiles(folder); - } - catch (Exception ex) - { - Logger.Error(ex); - } - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The site (portal) ID. - /// The folder path to update. - internal virtual void UpdateParentFolder(int portalId, string folderPath) - { - if (!string.IsNullOrEmpty(folderPath)) - { - var parentFolderPath = folderPath.Substring(0, folderPath.Substring(0, folderPath.Length - 1).LastIndexOf("/", StringComparison.Ordinal) + 1); - var objFolder = this.GetFolder(portalId, parentFolderPath); - if (objFolder != null) - { - // UpdateFolder(objFolder); - this.UpdateFolderInternal(objFolder, false); - } - } - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The folder to update. - /// The new folder path. - internal virtual void UpdateChildFolders(IFolderInfo folder, string newFolderPath) - { - var originalFolderPath = folder.FolderPath; - - var folderInfos = this.GetFolders(folder.PortalID).Where(f => f.FolderPath != string.Empty && f.FolderPath.StartsWith(originalFolderPath)).ToArray(); - - foreach (var folderInfo in folderInfos) - { - var folderMapping = FolderMappingController.Instance.GetFolderMapping(folder.PortalID, folderInfo.FolderMappingID); - var provider = FolderProvider.Instance(folderMapping.FolderProviderType); - - var folderPath = newFolderPath + (newFolderPath.EndsWith("/") ? string.Empty : "/") + folderInfo.FolderPath.Substring(originalFolderPath.Length); - - var parentFolder = this.GetParentFolder(folder.PortalID, folderPath); - folderInfo.ParentID = parentFolder.FolderID; - folderInfo.FolderPath = folderPath; - - var parentProvider = FolderProvider.Instance(FolderMappingController.Instance.GetFolderMapping(parentFolder.PortalID, parentFolder.FolderMappingID).FolderProviderType); - if (parentProvider.SupportsMappedPaths || !provider.SupportsMappedPaths) - { - if (provider.SupportsMappedPaths) - { - var mappedPath = parentFolder.FolderPath == string.Empty ? string.Empty : folderPath.Replace(parentFolder.FolderPath, string.Empty); - folderInfo.MappedPath = PathUtils.Instance.FormatFolderPath(parentFolder.MappedPath + mappedPath); - } - else - { - folderInfo.MappedPath = folderPath; - } - } - else if (provider.SupportsMappedPaths) - { - if (originalFolderPath == folderInfo.MappedPath) - { - folderInfo.MappedPath = folderPath; - } - else if (folderInfo.MappedPath.EndsWith("/" + originalFolderPath, StringComparison.Ordinal)) - { - var newMappedPath = PathUtils.Instance.FormatFolderPath( - folderInfo.MappedPath.Substring(0, folderInfo.MappedPath.LastIndexOf("/" + originalFolderPath, StringComparison.Ordinal)) + "/" + folderPath); - folderInfo.MappedPath = newMappedPath; - } - } - - this.UpdateFolderInternal(folderInfo, false); - } - - this.ClearFolderCache(folder.PortalID); - } - - /// This member is reserved for internal use and is not intended to be used directly from your code. - /// The source folder mapping. - /// The destination folder mapping. - /// A value indicating whether a folder mapping can be moved to another one. - internal virtual bool CanMoveBetweenFolderMappings(FolderMappingInfo sourceFolderMapping, FolderMappingInfo destinationFolderMapping) - { - // If Folder Mappings are exactly the same - if (sourceFolderMapping.FolderMappingID == destinationFolderMapping.FolderMappingID) - { - return true; - } - - return IsStandardFolderProviderType(sourceFolderMapping) && IsStandardFolderProviderType(destinationFolderMapping); - } - - private static Regex WildcardToRegex(string pattern) - { - if (!pattern.Contains("*") && !pattern.Contains("?")) - { - pattern = "^" + pattern + ".*$"; - } - else - { - pattern = "^" + Regex.Escape(pattern).Replace(@"\*", ".*").Replace(@"\?", ".") + "$"; - } - - return RegexUtils.GetCachedRegex(pattern, RegexOptions.IgnoreCase); - } - - private static bool IsStandardFolderProviderType(FolderMappingInfo folderMappingInfo) - { - var compatibleTypes = new[] { "StandardFolderProvider", "SecureFolderProvider", "DatabaseFolderProvider" }; - return compatibleTypes.Contains(folderMappingInfo.FolderProviderType); - } - - private int AddFolderInternal(IFolderInfo folder) - { - // Check this is not a duplicate - var tmpfolder = this.GetFolder(folder.PortalID, folder.FolderPath); - - if (tmpfolder != null && folder.FolderID == Null.NullInteger) - { - folder.FolderID = tmpfolder.FolderID; - } - - if (folder.FolderID == Null.NullInteger) - { - var isVersioned = folder.IsVersioned; - var workflowId = folder.WorkflowID; - - // Inherit some configuration from its Parent Folder - var parentFolder = this.GetParentFolder(folder.PortalID, folder.FolderPath); - var parentId = Null.NullInteger; - if (parentFolder != null) - { - isVersioned = parentFolder.IsVersioned; - workflowId = parentFolder.WorkflowID; - parentId = parentFolder.FolderID; - } - - folder.FolderPath = PathUtils.Instance.FormatFolderPath(folder.FolderPath); - folder.FolderID = DataProvider.Instance().AddFolder( - folder.PortalID, - folder.UniqueId, - folder.VersionGuid, - folder.FolderPath, - folder.MappedPath, - folder.StorageLocation, - folder.IsProtected, - folder.IsCached, - folder.LastUpdated, - this.GetCurrentUserId(), - folder.FolderMappingID, - isVersioned, - workflowId, - parentId); - - // Refetch folder for logging - folder = this.GetFolder(folder.PortalID, folder.FolderPath); - - this.AddLogEntry(folder, EventLogController.EventLogType.FOLDER_CREATED); - - if (parentFolder != null) - { - this.UpdateFolderInternal(parentFolder, false); - } - else - { - this.UpdateParentFolder(folder.PortalID, folder.FolderPath); - } - } - else - { - var parentFolder = this.GetParentFolder(folder.PortalID, folder.FolderPath); - if (parentFolder != null) - { - // Ensure that Parent Id is repaired - folder.ParentID = parentFolder.FolderID; - } - - this.UpdateFolderInternal(folder, false); - } - - // Invalidate Cache - this.ClearFolderCache(folder.PortalID); - - return folder.FolderID; - } - - private bool GetOnlyUnmap(IFolderInfo folder) - { - if (folder == null || folder.ParentID == Null.NullInteger) - { - return true; - } - - return FolderProvider.Instance(FolderMappingController.Instance.GetFolderMapping(folder.FolderMappingID).FolderProviderType).SupportsMappedPaths && - this.GetFolder(folder.ParentID).FolderMappingID != folder.FolderMappingID; - } - - private void UnmapFolderInternal(IFolderInfo folder, bool isCascadeDeleting) - { - Requires.NotNull("folder", folder); - - if (DirectoryWrapper.Instance.Exists(folder.PhysicalPath)) - { - DirectoryWrapper.Instance.Delete(folder.PhysicalPath, true); - } - - this.DeleteFolder(folder.PortalID, folder.FolderPath); - - // Notify folder deleted event - this.OnFolderDeleted(folder, this.GetCurrentUserId(), isCascadeDeleting); - } - - private void DeleteFolderInternal(IFolderInfo folder, bool isCascadeDeleting) - { - Requires.NotNull("folder", folder); - - var folderMapping = FolderMappingController.Instance.GetFolderMapping(folder.PortalID, folder.FolderMappingID); - - try - { - FolderProvider.Instance(folderMapping.FolderProviderType).DeleteFolder(folder); - } - catch (Exception ex) - { - Logger.Error(ex); - - throw new FolderProviderException( - Localization.GetExceptionMessage( - "DeleteFolderUnderlyingSystemError", - "The underlying system threw an exception. The folder has not been deleted."), - ex); - } - - if (DirectoryWrapper.Instance.Exists(folder.PhysicalPath)) - { - DirectoryWrapper.Instance.Delete(folder.PhysicalPath, true); - } - - this.DeleteFolder(folder.PortalID, folder.FolderPath); - - // Notify folder deleted event - this.OnFolderDeleted(folder, this.GetCurrentUserId(), isCascadeDeleting); - } - - private IFolderInfo GetParentFolder(int portalId, string folderPath) - { - if (!string.IsNullOrEmpty(folderPath)) - { - var parentFolderPath = folderPath.Substring(0, folderPath.Substring(0, folderPath.Length - 1).LastIndexOf("/", StringComparison.Ordinal) + 1); - return this.GetFolder(portalId, parentFolderPath); - } - - return null; - } - - private IEnumerable SearchFiles(IFolderInfo folder, Regex regex, bool recursive) - { - var fileCollection = - CBO.Instance.FillCollection(DataProvider.Instance().GetFiles(folder.FolderID, false, false)); - - var files = (from f in fileCollection where regex.IsMatch(f.FileName) select f).Cast().ToList(); - - if (recursive) - { - foreach (var subFolder in this.GetFolders(folder)) - { - if (FolderPermissionController.Instance.CanViewFolder(subFolder)) - { - files.AddRange(this.SearchFiles(subFolder, regex, true)); - } - } - } - - return files; - } - - private IFolderInfo UpdateFolderInternal(IFolderInfo folder, bool clearCache) - { - Requires.NotNull("folder", folder); - - DataProvider.Instance().UpdateFolder( - folder.PortalID, - folder.VersionGuid, - folder.FolderID, - PathUtils.Instance.FormatFolderPath(folder.FolderPath), - folder.StorageLocation, - folder.MappedPath, - folder.IsProtected, - folder.IsCached, - folder.LastUpdated, - this.GetCurrentUserId(), - folder.FolderMappingID, - folder.IsVersioned, - folder.WorkflowID, - folder.ParentID); - - if (clearCache) - { - this.ClearFolderCache(folder.PortalID); - } - - return folder; - } - - private int FindFolderMappingId(MergedTreeItem item, int portalId) - { - if (item.ExistsInFolderMapping) - { - return item.FolderMappingID; - } - - if (item.FolderPath.IndexOf('/') != item.FolderPath.LastIndexOf('/')) - { - var parentPath = item.FolderPath.Substring(0, item.FolderPath.TrimEnd('/').LastIndexOf('/') + 1); - var folder = this.GetFolder(portalId, parentPath); - if (folder != null) - { - return folder.FolderMappingID; - } - } - - return FolderMappingController.Instance.GetDefaultFolderMapping(portalId).FolderMappingID; - } - - private bool DeleteFolderRecursive(IFolderInfo folder, ICollection notDeletedSubfolders, bool isRecursiveDeletionFolder, bool unmap) - { - Requires.NotNull("folder", folder); - - if (UserSecurityController.Instance.HasFolderPermission(folder, "DELETE")) - { - var subfolders = this.GetFolders(folder); - - var allSubFoldersHasBeenDeleted = true; - - foreach (var subfolder in subfolders) - { - if (!this.DeleteFolderRecursive(subfolder, notDeletedSubfolders, false, unmap || this.GetOnlyUnmap(subfolder))) - { - allSubFoldersHasBeenDeleted = false; - } - } - - var files = this.GetFiles(folder, false, true); - foreach (var file in files) - { - if (unmap) - { - FileDeletionController.Instance.UnlinkFile(file); - } - else - { - FileDeletionController.Instance.DeleteFile(file); - } - - this.OnFileDeleted(file, this.GetCurrentUserId(), true); - } - - if (allSubFoldersHasBeenDeleted) - { - if (unmap) - { - this.UnmapFolderInternal(folder, !isRecursiveDeletionFolder); - } - else - { - this.DeleteFolderInternal(folder, !isRecursiveDeletionFolder); - } - - return true; - } - } - - notDeletedSubfolders.Add(folder); - return false; - } - - private string GetDefaultMappedPath(FolderMappingInfo folderMapping) - { - var defaultMappedPath = folderMapping.FolderMappingSettings[DefaultMappedPathSetting]; - if (defaultMappedPath == null) - { - return string.Empty; - } - - return defaultMappedPath.ToString(); - } - - private IEnumerable GetFolders(IFolderInfo parentFolder, bool allSubFolders) - { - Requires.NotNull("parentFolder", parentFolder); - - if (allSubFolders) - { - var subFolders = - this.GetFolders(parentFolder.PortalID) - .Where( - f => - f.FolderPath.StartsWith( - parentFolder.FolderPath, - StringComparison.InvariantCultureIgnoreCase)); - - return subFolders.Where(f => f.FolderID != parentFolder.FolderID); - } - - return this.GetFolders(parentFolder.PortalID).Where(f => f.ParentID == parentFolder.FolderID); - } - - private void OnFolderMoved(IFolderInfo folderInfo, int userId, string oldFolderPath) - { - EventManager.Instance.OnFolderMoved(new FolderMovedEventArgs - { - FolderInfo = folderInfo, - UserId = userId, - OldFolderPath = oldFolderPath, - }); - } - - private void OnFolderRenamed(IFolderInfo folderInfo, int userId, string oldFolderName) - { - EventManager.Instance.OnFolderRenamed(new FolderRenamedEventArgs - { - FolderInfo = folderInfo, - UserId = userId, - OldFolderName = oldFolderName, - }); - } - - private void OnFolderDeleted(IFolderInfo folderInfo, int userId, bool isCascadeDeleting) - { - EventManager.Instance.OnFolderDeleted(new FolderDeletedEventArgs - { - FolderInfo = folderInfo, - UserId = userId, - IsCascadeDeletng = isCascadeDeleting, - }); - } - - private void OnFolderAdded(IFolderInfo folderInfo, int userId) - { - EventManager.Instance.OnFolderAdded(new FolderChangedEventArgs - { - FolderInfo = folderInfo, - UserId = userId, - }); - } - - private void OnFileDeleted(IFileInfo fileInfo, int userId, bool isCascadeDeleting) - { - EventManager.Instance.OnFileDeleted(new FileDeletedEventArgs - { - FileInfo = fileInfo, - UserId = userId, - IsCascadeDeleting = isCascadeDeleting, - }); - } - - private FolderPermissionCollection GetFolderPermissionsFromSyncData(int portalId, string relativePath) - { - var threadId = Thread.CurrentThread.ManagedThreadId; - FolderPermissionCollection permissions = null; - if (SyncFoldersData.ContainsKey(threadId)) - { - if (SyncFoldersData[threadId].FolderPath == relativePath && SyncFoldersData[threadId].PortalId == portalId) - { - return SyncFoldersData[threadId].Permissions; - } - - permissions = FolderPermissionController.GetFolderPermissionsCollectionByFolder(portalId, relativePath); - SyncFoldersData[threadId] = new SyncFolderData { PortalId = portalId, FolderPath = relativePath, Permissions = permissions }; - return permissions; - } - - permissions = FolderPermissionController.GetFolderPermissionsCollectionByFolder(portalId, relativePath); - SyncFoldersData.Add(threadId, new SyncFolderData { PortalId = portalId, FolderPath = relativePath, Permissions = permissions }); - - return permissions; - } - - private void InitialiseSyncFoldersData(int portalId, string relativePath) - { - var threadId = Thread.CurrentThread.ManagedThreadId; - var permissions = FolderPermissionController.GetFolderPermissionsCollectionByFolder(portalId, relativePath); - if (SyncFoldersData.ContainsKey(threadId)) - { - if (SyncFoldersData[threadId].FolderPath == relativePath && SyncFoldersData[threadId].PortalId == portalId) - { - SyncFoldersData[threadId].Permissions = permissions; - } - else - { - SyncFoldersData[threadId] = new SyncFolderData { PortalId = portalId, FolderPath = relativePath, Permissions = permissions }; - } - } - else - { - SyncFoldersData.Add(threadId, new SyncFolderData { PortalId = portalId, FolderPath = relativePath, Permissions = permissions }); - } - } - - private void RemoveSyncFoldersData(string relativePath) - { - var threadId = Thread.CurrentThread.ManagedThreadId; - if (SyncFoldersData.ContainsKey(threadId)) - { - SyncFoldersData.Remove(threadId); - } - } - - /// - /// This class and its members are reserved for internal use and are not intended to be used in your code. - /// - internal class MergedTreeItem - { - /// - /// Gets or sets a value indicating whether the item exists in the file system. - /// - public bool ExistsInFileSystem { get; set; } - - /// - /// Gets or sets a value indicating whether the item exists in the database. - /// - public bool ExistsInDatabase { get; set; } - - /// - /// Gets or sets a value indicating whether the item exists in the folder mappings. - /// - public bool ExistsInFolderMapping { get; set; } - - /// - /// Gets or sets the folder id. - /// - public int FolderID { get; set; } - - /// - /// Gets or sets the folder path. - /// - public int FolderMappingID { get; set; } - - /// - /// Gets or sets the folder path. - /// - public string FolderPath { get; set; } - - /// - /// Gets or sets the mapped path. - /// - public string MappedPath { get; set; } - } - - /// - /// This class and its members are reserved for internal use and are not intended to be used in your code. - /// - internal class IgnoreCaseStringComparer : IComparer - { - /// - public int Compare(string x, string y) - { - return string.Compare(x.ToLowerInvariant(), y.ToLowerInvariant(), StringComparison.Ordinal); - } - } - - /// - /// This class and its members are reserved for internal use and are not intended to be used in your code. - /// - internal class MoveFoldersInfo - { - /// - /// Initializes a new instance of the class. - /// - /// The source folder. - /// The destination folder. - public MoveFoldersInfo(string source, string target) - { - this.Source = source; - this.Target = target; - } - - /// - /// Gets the Source folder. - - /// - public string Source { get; private set; } - - /// - /// Gets the target folder. - /// - public string Target { get; private set; } - } - } -} +namespace DotNetNuke.Services.FileSystem +{ + using System; + using System.Collections.Generic; + using System.Collections.ObjectModel; + using System.ComponentModel; + using System.Globalization; + using System.IO; + using System.Linq; + using System.Net.NetworkInformation; + using System.Reflection; + using System.Text.RegularExpressions; + using System.Threading; + using System.Web; + + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.ComponentModel; + using DotNetNuke.Data; + using DotNetNuke.Entities; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Users; + using DotNetNuke.Instrumentation; + using DotNetNuke.Security.Permissions; + using DotNetNuke.Services.FileSystem.EventArgs; + using DotNetNuke.Services.FileSystem.Internal; + using DotNetNuke.Services.Log.EventLog; + + using Localization = DotNetNuke.Services.Localization.Localization; + + /// Exposes methods to manage folders. + public class FolderManager : ComponentBase, IFolderManager + { + private const string DefaultUsersFoldersPath = "Users"; + private const string DefaultMappedPathSetting = "DefaultMappedPath"; + private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(FolderManager)); + private static readonly Dictionary SyncFoldersData = new Dictionary(); + private static readonly object ThreadLocker = new object(); + + /// Gets the localization key for MyFolderName. + public virtual string MyFolderName + { + get + { + return Localization.GetString("MyFolderName"); + } + } + + /// + /// Creates a new folder using the provided folder path. + /// + /// The folder mapping to use. + /// The path of the new folder. + /// Thrown when folderPath or folderMapping are null. + /// Thrown when the underlying system throw an exception. + /// The added folder. + public virtual IFolderInfo AddFolder(FolderMappingInfo folderMapping, string folderPath) + { + return this.AddFolder(folderMapping, folderPath, folderPath); + } + + /// + /// Creates a new folder using the provided folder path and mapping. + /// + /// The folder mapping to use. + /// The path of the new folder. + /// The mapped path of the new folder. + /// Thrown when folderPath or folderMapping are null. + /// Thrown when the underlying system throw an exception. + /// The added folder. + public virtual IFolderInfo AddFolder(FolderMappingInfo folderMapping, string folderPath, string mappedPath) + { + Requires.PropertyNotNull("folderPath", folderPath); + Requires.NotNull("folderMapping", folderMapping); + + folderPath = folderPath.Trim(); + + if (this.FolderExists(folderMapping.PortalID, folderPath)) + { + throw new FolderAlreadyExistsException(Localization.GetExceptionMessage("AddFolderAlreadyExists", "The provided folder path already exists. The folder has not been added.")); + } + + if (!this.IsValidFolderPath(folderPath)) + { + throw new InvalidFolderPathException(Localization.GetExceptionMessage("AddFolderNotAllowed", "The folder path '{0}' is not allowed. The folder has not been added.", folderPath)); + } + + var parentFolder = this.GetParentFolder(folderMapping.PortalID, folderPath); + if (parentFolder != null) + { + var parentFolderMapping = FolderMappingController.Instance.GetFolderMapping( + parentFolder.PortalID, + parentFolder.FolderMappingID); + if (FolderProvider.Instance(parentFolderMapping.FolderProviderType).SupportsMappedPaths) + { + folderMapping = parentFolderMapping; + mappedPath = string.IsNullOrEmpty(parentFolder.FolderPath) ? PathUtils.Instance.FormatFolderPath(parentFolder.MappedPath + folderPath) + : PathUtils.Instance.FormatFolderPath(parentFolder.MappedPath + folderPath.Replace(parentFolder.FolderPath, string.Empty)); + } + else if (!FolderProvider.Instance(folderMapping.FolderProviderType).SupportsMappedPaths) + { + mappedPath = folderPath; + } + else + { + // Parent foldermapping DOESN'T support mapped path + // abd current foldermapping YES support mapped path + mappedPath = PathUtils.Instance.FormatFolderPath(this.GetDefaultMappedPath(folderMapping) + mappedPath); + } + } + else if (FolderProvider.Instance(folderMapping.FolderProviderType).SupportsMappedPaths) + { + mappedPath = PathUtils.Instance.FormatFolderPath(this.GetDefaultMappedPath(folderMapping) + mappedPath); + } + + try + { + FolderProvider.Instance(folderMapping.FolderProviderType).AddFolder(folderPath, folderMapping, mappedPath); + } + catch (Exception ex) + { + Logger.Error(ex); + + throw new FolderProviderException(Localization.GetExceptionMessage("AddFolderUnderlyingSystemError", "The underlying system threw an exception. The folder has not been added."), ex); + } + + this.CreateFolderInFileSystem(PathUtils.Instance.GetPhysicalPath(folderMapping.PortalID, folderPath)); + var folderId = this.CreateFolderInDatabase(folderMapping.PortalID, folderPath, folderMapping.FolderMappingID, mappedPath); + + var folder = this.GetFolder(folderId); + + // Notify add folder event + this.OnFolderAdded(folder, this.GetCurrentUserId()); + + return folder; + } + + /// + /// Creates a new folder in the given portal using the provided folder path. + /// The same mapping than the parent folder will be used to create this folder. So this method have to be used only to create subfolders. + /// + /// The portal identifier. + /// The path of the new folder. + /// Thrown when folderPath is null or empty. + /// The added folder. + public virtual IFolderInfo AddFolder(int portalId, string folderPath) + { + Requires.NotNullOrEmpty("folderPath", folderPath); + + folderPath = PathUtils.Instance.FormatFolderPath(folderPath); + + var parentFolderPath = folderPath.Substring(0, folderPath.Substring(0, folderPath.Length - 1).LastIndexOf("/", StringComparison.Ordinal) + 1); + var parentFolder = this.GetFolder(portalId, parentFolderPath) ?? this.AddFolder(portalId, parentFolderPath); + + var folderMapping = FolderMappingController.Instance.GetFolderMapping(portalId, parentFolder.FolderMappingID); + + return this.AddFolder(folderMapping, folderPath); + } + + /// + /// Deletes the specified folder. + /// + /// The folder to delete. + /// Thrown when folder is null. + /// Thrown when the underlying system throw an exception. + public virtual void DeleteFolder(IFolderInfo folder) + { + this.DeleteFolderInternal(folder, false); + } + + /// + /// Removes the database reference to a folder on disk. + /// + /// The folder to unlink. + public virtual void UnlinkFolder(IFolderInfo folder) + { + this.DeleteFolderRecursive(folder, new Collection(), true, true); + } + + /// + /// Deletes the specified folder. + /// + /// The folder identifier. + public virtual void DeleteFolder(int folderId) + { + var folder = this.GetFolder(folderId); + + this.DeleteFolder(folder); + } + + /// + /// Deletes the specified folder and all its content. + /// + /// The folder to delete. + /// A collection with all not deleted subfolders after processiong the action. + public void DeleteFolder(IFolderInfo folder, ICollection notDeletedSubfolders) + { + this.DeleteFolderRecursive(folder, notDeletedSubfolders, true, this.GetOnlyUnmap(folder)); + } + + /// + /// Checks the existence of the specified folder in the specified portal. + /// + /// The portal where to check the existence of the folder. + /// The path of folder to check the existence of. + /// A bool value indicating whether the folder exists or not in the specified portal. + public virtual bool FolderExists(int portalId, string folderPath) + { + Requires.PropertyNotNull("folderPath", folderPath); + + return this.GetFolder(portalId, folderPath) != null; + } + + /// + /// Gets the files contained in the specified folder. + /// + /// The folder from which to retrieve the files. + /// The list of files contained in the specified folder. + public virtual IEnumerable GetFiles(IFolderInfo folder) + { + return this.GetFiles(folder, false); + } + + /// + /// Gets the files contained in the specified folder. + /// + /// The folder from which to retrieve the files. + /// Whether or not to include all the subfolders. + /// The list of files contained in the specified folder. + public virtual IEnumerable GetFiles(IFolderInfo folder, bool recursive) + { + return this.GetFiles(folder, recursive, false); + } + + /// + /// Gets the files contained in the specified folder. + /// + /// The folder from which to retrieve the files. + /// Whether or not to include all the subfolders. + /// Indicates if the file is retrieved from All files or from Published files. + /// The list of files contained in the specified folder. + public virtual IEnumerable GetFiles(IFolderInfo folder, bool recursive, bool retrieveUnpublishedFiles) + { + Requires.NotNull("folder", folder); + + return CBO.Instance.FillCollection(DataProvider.Instance().GetFiles(folder.FolderID, retrieveUnpublishedFiles, recursive)); + } + + /// + /// Gets the list of Standard folders the specified user has the provided permissions. + /// + /// The user info. + /// The permissions the folders have to met. + /// The list of Standard folders the specified user has the provided permissions. + /// This method is used to support legacy behaviours and situations where we know the file/folder is in the file system. + public virtual IEnumerable GetFileSystemFolders(UserInfo user, string permissions) + { + var userFolders = new List(); + + var portalId = user.PortalID; + + var userFolder = this.GetUserFolder(user); + + var defaultFolderMaping = FolderMappingController.Instance.GetDefaultFolderMapping(portalId); + + var folders = this.GetFolders(portalId, permissions, user.UserID).Where(f => f.FolderPath != null && f.FolderMappingID == defaultFolderMaping.FolderMappingID); + + foreach (var folder in folders) + { + if (folder.FolderPath.StartsWith(DefaultUsersFoldersPath + "/", StringComparison.InvariantCultureIgnoreCase)) + { + if (folder.FolderID == userFolder.FolderID) + { + folder.DisplayPath = this.MyFolderName + "/"; + folder.DisplayName = this.MyFolderName; + } + else if (!folder.FolderPath.StartsWith(userFolder.FolderPath, StringComparison.InvariantCultureIgnoreCase)) + { + // Allow UserFolder children + continue; + } + } + + userFolders.Add(folder); + } + + return userFolders; + } + + /// + /// Gets a folder entity by providing a folder identifier. + /// + /// The identifier of the folder. + /// The folder entity or null if the folder cannot be located. + public virtual IFolderInfo GetFolder(int folderId) + { + // Try and get the folder from the portal cache + IFolderInfo folder = null; + var portalSettings = PortalController.Instance.GetCurrentSettings(); + if (portalSettings != null) + { + var folders = this.GetFolders(portalSettings.PortalId); + folder = folders.SingleOrDefault(f => f.FolderID == folderId) ?? CBO.Instance.FillObject(DataProvider.Instance().GetFolder(folderId)); + } + + return folder ?? CBO.Instance.FillObject(DataProvider.Instance().GetFolder(folderId)); + } + + /// + /// Gets a folder entity by providing a portal identifier and folder path. + /// + /// The portal where the folder exists. + /// The path of the folder. + /// The folder entity or null if the folder cannot be located. + public virtual IFolderInfo GetFolder(int portalId, string folderPath) + { + Requires.PropertyNotNull("folderPath", folderPath); + + folderPath = PathUtils.Instance.FormatFolderPath(folderPath); + + var folders = this.GetFolders(portalId); + return folders.SingleOrDefault(f => f.FolderPath == folderPath) ?? CBO.Instance.FillObject(DataProvider.Instance().GetFolder(portalId, folderPath)); + } + + /// + /// Gets a folder entity by providing its unique id. + /// + /// The unique id of the folder. + /// The folder entity or null if the folder cannot be located. + public virtual IFolderInfo GetFolder(Guid uniqueId) + { + return CBO.Instance.FillObject(DataProvider.Instance().GetFolderByUniqueID(uniqueId)); + } + + /// + /// Gets the list of subfolders for the specified folder. + /// + /// The folder to get the list of subfolders. + /// The list of subfolders for the specified folder. + /// Thrown when parentFolder is null. + public virtual IEnumerable GetFolders(IFolderInfo parentFolder) + { + return this.GetFolders(parentFolder, false); + } + + /// + /// Gets the sorted list of folders of the provided portal. + /// + /// The portal identifier. + /// True = Read from Cache, False = Read from DB. + /// The sorted list of folders of the provided portal. + public virtual IEnumerable GetFolders(int portalId, bool useCache) + { + if (!useCache) + { + this.ClearFolderCache(portalId); + } + + return this.GetFolders(portalId); + } + + /// + /// Gets the sorted list of folders of the provided portal. + /// + /// The portal identifier. + /// The sorted list of folders of the provided portal. + public virtual IEnumerable GetFolders(int portalId) + { + var folders = new List(); + + var cacheKey = string.Format(DataCache.FolderCacheKey, portalId); + CBO.Instance.GetCachedObject>(new CacheItemArgs(cacheKey, DataCache.FolderCacheTimeOut, DataCache.FolderCachePriority, portalId), this.GetFoldersSortedCallBack, false).ForEach(folders.Add); + + return folders; + } + + /// + /// Gets the sorted list of folders that match the provided permissions in the specified portal. + /// + /// The portal identifier. + /// The permissions to match. + /// The user identifier to be used to check permissions. + /// The list of folders that match the provided permissions in the specified portal. + public virtual IEnumerable GetFolders(int portalId, string permissions, int userId) + { + var folders = new List(); + + var cacheKey = string.Format(DataCache.FolderUserCacheKey, portalId, permissions, userId); + var cacheItemArgs = new CacheItemArgs(cacheKey, DataCache.FolderUserCacheTimeOut, DataCache.FolderUserCachePriority, portalId, permissions, userId); + CBO.Instance.GetCachedObject>(cacheItemArgs, this.GetFoldersByPermissionSortedCallBack, false).ForEach(folders.Add); + + return folders; + } + + /// + /// Gets the list of folders the specified user has read permissions. + /// + /// The user info. + /// The list of folders the specified user has read permissions. + public virtual IEnumerable GetFolders(UserInfo user) + { + return this.GetFolders(user, "READ"); + } + + /// + /// Gets the list of folders the specified user has the provided permissions. + /// + /// The user info. + /// The permissions the folders have to met. + /// The list of folders the specified user has the provided permissions. + public virtual IEnumerable GetFolders(UserInfo user, string permissions) + { + var userFolders = new List(); + + var portalId = user.PortalID; + + var userFolder = this.GetUserFolder(user); + + foreach (var folder in this.GetFolders(portalId, permissions, user.UserID).Where(folder => folder.FolderPath != null)) + { + if (folder.FolderPath.StartsWith(DefaultUsersFoldersPath + "/", StringComparison.InvariantCultureIgnoreCase)) + { + if (folder.FolderID == userFolder.FolderID) + { + folder.DisplayPath = Localization.GetString("MyFolderName") + "/"; + folder.DisplayName = Localization.GetString("MyFolderName"); + } + else if (!folder.FolderPath.StartsWith(userFolder.FolderPath, StringComparison.InvariantCultureIgnoreCase)) + { + // Allow UserFolder children + continue; + } + } + + userFolders.Add(folder); + } + + return userFolders; + } + + /// + /// Gets the folder that belongs to a specific user. + /// + /// The user to get the folder for. + /// The information about the the user folder, . + public virtual IFolderInfo GetUserFolder(UserInfo userInfo) + { + // always use _default portal for a super user + int portalId = userInfo.IsSuperUser ? -1 : userInfo.PortalID; + + string userFolderPath = ((PathUtils)PathUtils.Instance).GetUserFolderPathInternal(userInfo); + return this.GetFolder(portalId, userFolderPath) ?? this.AddUserFolder(userInfo); + } + + /// + /// Moves a folder to a new location. + /// + /// The folder to move. + /// Where to move the new folder. + /// The information about the moved folder, . + public virtual IFolderInfo MoveFolder(IFolderInfo folder, IFolderInfo destinationFolder) + { + Requires.NotNull("folder", folder); + Requires.NotNull("destinationFolder", destinationFolder); + + var newFolderPath = PathUtils.Instance.FormatFolderPath(destinationFolder.FolderPath + folder.FolderName + "/"); + + if (folder.FolderPath == destinationFolder.FolderPath) + { + return folder; + } + + if (this.FolderExists(folder.PortalID, newFolderPath)) + { + throw new InvalidOperationException(string.Format( + Localization.GetExceptionMessage( + "CannotMoveFolderAlreadyExists", + "The folder with name '{0}' cannot be moved. A folder with that name already exists under the folder '{1}'.", + folder.FolderName, + destinationFolder.FolderName))); + } + + var folderMapping = FolderMappingController.Instance.GetFolderMapping(folder.PortalID, folder.FolderMappingID); + var destinationFolderMapping = FolderMappingController.Instance.GetFolderMapping(destinationFolder.PortalID, destinationFolder.FolderMappingID); + + if (!this.CanMoveBetweenFolderMappings(folderMapping, destinationFolderMapping)) + { + throw new InvalidOperationException(string.Format( + Localization.GetExceptionMessage( + "CannotMoveFolderBetweenFolderType", + "The folder with name '{0}' cannot be moved. Move Folder operation between this two folder types is not allowed", + folder.FolderName))); + } + + if (!this.IsMoveOperationValid(folder, destinationFolder, newFolderPath)) + { + throw new InvalidOperationException(Localization.GetExceptionMessage("MoveFolderCannotComplete", "The operation cannot be completed.")); + } + + var currentFolderPath = folder.FolderPath; + + if ((folder.FolderMappingID == destinationFolder.FolderMappingID && FolderProvider.Instance(folderMapping.FolderProviderType).SupportsMoveFolder) || + (IsStandardFolderProviderType(folderMapping) && IsStandardFolderProviderType(destinationFolderMapping))) + { + this.MoveFolderWithinProvider(folder, destinationFolder); + } + else + { + this.MoveFolderBetweenProviders(folder, newFolderPath); + } + + // log the folder moved event. + var log = new LogInfo(); + log.AddProperty("Old Folder Path", currentFolderPath); + log.AddProperty("New Folder Path", newFolderPath); + log.AddProperty("Home Directory", folder.PortalID == Null.NullInteger ? Globals.HostPath : PortalSettings.Current.HomeDirectory); + log.LogTypeKey = EventLogController.EventLogType.FOLDER_MOVED.ToString(); + LogController.Instance.AddLog(log); + + // Files in cache are obsolete because their physical path is not correct after moving + this.DeleteFilesFromCache(folder.PortalID, newFolderPath); + var movedFolder = this.GetFolder(folder.FolderID); + + // Notify folder moved event + this.OnFolderMoved(folder, this.GetCurrentUserId(), currentFolderPath); + + return movedFolder; + } + + /// + /// Renames the specified folder by setting the new provided folder name. + /// + /// The folder to rename. + /// The new name to apply to the folder. + /// Thrown when newFolderName is null or empty. + /// Thrown when folder is null. + /// Thrown when the underlying system throw an exception. + public virtual void RenameFolder(IFolderInfo folder, string newFolderName) + { + Requires.NotNull("folder", folder); + Requires.NotNullOrEmpty("newFolderName", newFolderName); + + if (folder.FolderName.Equals(newFolderName)) + { + return; + } + + var currentFolderName = folder.FolderName; + + var newFolderPath = folder.FolderPath.Substring(0, folder.FolderPath.LastIndexOf(folder.FolderName, StringComparison.Ordinal)) + PathUtils.Instance.FormatFolderPath(newFolderName); + + if (this.FolderExists(folder.PortalID, newFolderPath)) + { + throw new FolderAlreadyExistsException(Localization.GetExceptionMessage("RenameFolderAlreadyExists", "The destination folder already exists. The folder has not been renamed.")); + } + + var folderMapping = FolderMappingController.Instance.GetFolderMapping(folder.PortalID, folder.FolderMappingID); + var provider = FolderProvider.Instance(folderMapping.FolderProviderType); + + this.RenameFolderInFileSystem(folder, newFolderPath); + + // Update Provider + provider.RenameFolder(folder, newFolderName); + + // Update database + this.UpdateChildFolders(folder, newFolderPath); + + // Files in cache are obsolete because their physical path is not correct after rename + this.DeleteFilesFromCache(folder.PortalID, newFolderPath); + + // Notify folder renamed event + this.OnFolderRenamed(folder, this.GetCurrentUserId(), currentFolderName); + } + + /// + /// Search the files contained in the specified folder, for a matching pattern. + /// + /// The folder from which to retrieve the files. + /// The patter to search for. + /// Shoud the search be recursive. + /// The list of files contained in the specified folder. + public virtual IEnumerable SearchFiles(IFolderInfo folder, string pattern, bool recursive) + { + Requires.NotNull("folder", folder); + + if (!FolderPermissionController.Instance.CanViewFolder(folder)) + { + throw new FolderProviderException("No permission to view the folder"); + } + + return this.SearchFiles(folder, WildcardToRegex(pattern), recursive); + } + + /// + /// Synchronizes the entire folder tree for the specified portal. + /// + /// The portal identifier. + /// The number of folder collisions. + public virtual int Synchronize(int portalId) + { + var folderCollisions = this.Synchronize(portalId, string.Empty, true, true); + + DataCache.ClearFolderCache(portalId); + + return folderCollisions; + } + + /// + /// Syncrhonizes the specified folder, its files and its subfolders. + /// + /// The portal identifier. + /// The relative path of the folder. + /// The number of folder collisions. + public virtual int Synchronize(int portalId, string relativePath) + { + return this.Synchronize(portalId, relativePath, true, true); + } + + /// + /// Syncrhonizes the specified folder, its files and, optionally, its subfolders. + /// + /// The portal identifier. + /// The relative path of the folder. + /// Indicates if the synchronization has to be recursive. + /// Indicates if files need to be synchronized. + /// Thrown when there are folder mappings requiring network connection but there is no network available. + /// The number of folder collisions. + public virtual int Synchronize(int portalId, string relativePath, bool isRecursive, bool syncFiles) + { + Requires.PropertyNotNull("relativePath", relativePath); + + if (this.AreThereFolderMappingsRequiringNetworkConnectivity(portalId, relativePath, isRecursive) && !this.IsNetworkAvailable()) + { + throw new NoNetworkAvailableException(Localization.GetExceptionMessage("NoNetworkAvailableError", "Network connectivity is needed but there is no network available.")); + } + + int? scriptTimeOut = null; + + Monitor.Enter(ThreadLocker); + try + { + if (HttpContext.Current != null) + { + scriptTimeOut = this.GetCurrentScriptTimeout(); + + // Synchronization could be a time-consuming process. To not get a time-out, we need to modify the request time-out value + this.SetScriptTimeout(int.MaxValue); + } + + var mergedTree = this.GetMergedTree(portalId, relativePath, isRecursive); + + // Step 1: Add Folders + this.InitialiseSyncFoldersData(portalId, relativePath); + for (var i = 0; i < mergedTree.Count; i++) + { + var item = mergedTree.Values[i]; + this.ProcessMergedTreeItemInAddMode(item, portalId); + } + + this.RemoveSyncFoldersData(relativePath); + + // Step 2: Delete Files and Folders + for (var i = mergedTree.Count - 1; i >= 0; i--) + { + var item = mergedTree.Values[i]; + + if (syncFiles) + { + this.SynchronizeFiles(item, portalId); + } + + this.ProcessMergedTreeItemInDeleteMode(item, portalId); + } + } + finally + { + Monitor.Exit(ThreadLocker); + + // Restore original time-out + if (HttpContext.Current != null && scriptTimeOut != null) + { + this.SetScriptTimeout(scriptTimeOut.Value); + } + } + + return 0; + } + + /// + /// Updates metadata of the specified folder. + /// + /// The folder to update. + /// Thrown when folder is null. + /// The information about the updated folder, . + public virtual IFolderInfo UpdateFolder(IFolderInfo folder) + { + var updatedFolder = this.UpdateFolderInternal(folder, true); + + this.AddLogEntry(updatedFolder, EventLogController.EventLogType.FOLDER_UPDATED); + + this.SaveFolderPermissions(updatedFolder); + + return updatedFolder; + } + + /// + /// Adds read permissions for all users to the specified folder. + /// + /// The folder to add the permission to. + /// Used as base class for FolderPermissionInfo when there is no read permission already defined. + public virtual void AddAllUserReadPermission(IFolderInfo folder, PermissionInfo permission) + { + var roleId = int.Parse(Globals.glbRoleAllUsers); + + var folderPermission = + (from FolderPermissionInfo p in folder.FolderPermissions + where p.PermissionKey == "READ" && p.FolderID == folder.FolderID && p.RoleID == roleId && p.UserID == Null.NullInteger + select p).SingleOrDefault(); + + if (folderPermission != null) + { + folderPermission.AllowAccess = true; + } + else + { + folderPermission = new FolderPermissionInfo(permission) + { + FolderID = folder.FolderID, + UserID = Null.NullInteger, + RoleID = roleId, + AllowAccess = true, + }; + + folder.FolderPermissions.Add(folderPermission); + } + } + + /// + /// Sets folder permissions to the given folder by copying parent folder permissions. + /// + /// The folder to copy permissions to. + public virtual void CopyParentFolderPermissions(IFolderInfo folder) + { + Requires.NotNull("folder", folder); + + if (string.IsNullOrEmpty(folder.FolderPath)) + { + return; + } + + var parentFolderPath = folder.FolderPath.Substring(0, folder.FolderPath.Substring(0, folder.FolderPath.Length - 1).LastIndexOf("/", StringComparison.Ordinal) + 1); + + foreach (FolderPermissionInfo objPermission in + this.GetFolderPermissionsFromSyncData(folder.PortalID, parentFolderPath)) + { + var folderPermission = new FolderPermissionInfo(objPermission) + { + FolderID = folder.FolderID, + RoleID = objPermission.RoleID, + UserID = objPermission.UserID, + AllowAccess = objPermission.AllowAccess, + }; + folder.FolderPermissions.Add(folderPermission, true); + } + + FolderPermissionController.SaveFolderPermissions((FolderInfo)folder); + } + + /// + /// Sets specific folder permissions for the given role to the given folder. + /// + /// The folder to set permission to. + /// The id of the permission to assign. + /// The role to assign the permission to. + public virtual void SetFolderPermission(IFolderInfo folder, int permissionId, int roleId) + { + this.SetFolderPermission(folder, permissionId, roleId, Null.NullInteger); + } + + /// + /// Sets specific folder permissions for the given role/user to the given folder. + /// + /// The folder to set permission to. + /// The id of the permission to assign. + /// The role to assign the permission to. + /// The user to assign the permission to. + public virtual void SetFolderPermission(IFolderInfo folder, int permissionId, int roleId, int userId) + { + if (folder.FolderPermissions.Cast() + .Any(fpi => fpi.FolderID == folder.FolderID && fpi.PermissionID == permissionId && fpi.RoleID == roleId && fpi.UserID == userId && fpi.AllowAccess)) + { + return; + } + + var objFolderPermissionInfo = new FolderPermissionInfo + { + FolderID = folder.FolderID, + PermissionID = permissionId, + RoleID = roleId, + UserID = userId, + AllowAccess = true, + }; + + folder.FolderPermissions.Add(objFolderPermissionInfo, true); + FolderPermissionController.SaveFolderPermissions((FolderInfo)folder); + } + + /// + /// Sets folder permissions for administrator role to the given folder. + /// + /// The folder to set permission to. + /// The administrator role id to assign the permission to. + public virtual void SetFolderPermissions(IFolderInfo folder, int administratorRoleId) + { + Requires.NotNull("folder", folder); + + foreach (PermissionInfo objPermission in PermissionController.GetPermissionsByFolder()) + { + var folderPermission = new FolderPermissionInfo(objPermission) + { + FolderID = folder.FolderID, + RoleID = administratorRoleId, + }; + + folder.FolderPermissions.Add(folderPermission, true); + } + + FolderPermissionController.SaveFolderPermissions((FolderInfo)folder); + } + + /// + /// Moves the specified folder and its contents to a new location. + /// + /// The folder to move. + /// The new folder path. + /// The moved folder. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("Deprecated in DNN 7.1. It has been replaced by FolderManager.Instance.MoveFolder(IFolderInfo folder, IFolderInfo destinationFolder) . Scheduled removal in v10.0.0.")] + public virtual IFolderInfo MoveFolder(IFolderInfo folder, string newFolderPath) + { + Requires.NotNull("folder", folder); + Requires.NotNullOrEmpty("newFolderPath", newFolderPath); + + var nameCharIndex = newFolderPath.Substring(0, newFolderPath.Length - 1).LastIndexOf("/", StringComparison.Ordinal) + 1; + var parentFolder = this.GetFolder(folder.PortalID, newFolderPath.Substring(0, nameCharIndex)); + if (parentFolder.FolderID == folder.ParentID) + { + var newFolderName = newFolderPath.Substring(nameCharIndex, newFolderPath.Length - nameCharIndex - 1); + this.RenameFolder(folder, newFolderName); + return folder; + } + + return this.MoveFolder(folder, parentFolder); + } + + /// + /// Checks if a given folder path is valid. + /// + /// The folder path. + /// A value indicating whether the folder path is valid. + internal virtual bool IsValidFolderPath(string folderPath) + { + var illegalInFolderPath = new Regex(string.Format("[{0}]", Regex.Escape(new string(Path.GetInvalidPathChars()))), RegexOptions.Compiled); + return !illegalInFolderPath.IsMatch(folderPath) && !folderPath.TrimEnd('/', '\\').EndsWith("."); + } + + /// + /// Adds a log entry. + /// + /// The folder to log about. + /// The type of the log entry. + internal virtual void AddLogEntry(IFolderInfo folder, EventLogController.EventLogType eventLogType) + { + EventLogController.Instance.AddLog(folder, PortalController.Instance.GetCurrentSettings(), this.GetCurrentUserId(), string.Empty, eventLogType); + } + + /// + /// Adds a log entry. + /// + /// The name of the property. + /// The value of the property. + /// The type of log entry. + internal virtual void AddLogEntry(string propertyName, string propertyValue, EventLogController.EventLogType eventLogType) + { + EventLogController.Instance.AddLog(propertyName, propertyValue, PortalController.Instance.GetCurrentSettings(), this.GetCurrentUserId(), eventLogType); + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The site (portal) ID. + /// The new folder path. + internal void DeleteFilesFromCache(int portalId, string newFolderPath) + { + var folders = this.GetFolders(portalId).Where(f => f.FolderPath.StartsWith(newFolderPath)); + foreach (var folderInfo in folders) + { + var fileIds = this.GetFiles(folderInfo).Select(f => f.FileId); + foreach (var fileId in fileIds) + { + DataCache.RemoveCache("GetFileById" + fileId); + } + } + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The added folder information, . + /// the user to add a folder for. + internal virtual IFolderInfo AddUserFolder(UserInfo user) + { + // user _default portal for all super users + var portalId = user.IsSuperUser ? Null.NullInteger : user.PortalID; + + var folderMapping = FolderMappingsConfigController.Instance.GetFolderMapping(portalId, DefaultUsersFoldersPath) ?? FolderMappingController.Instance.GetDefaultFolderMapping(portalId); + + if (!this.FolderExists(portalId, DefaultUsersFoldersPath)) + { + this.AddFolder(folderMapping, DefaultUsersFoldersPath); + } + + // GetUserFolderPathElement is deprecated without a replacement, it should have been internal only and will be removed in DNN v10, hence the warning disable here +#pragma warning disable 612,618 + var rootFolder = PathUtils.Instance.GetUserFolderPathElement(user.UserID, PathUtils.UserFolderElement.Root); +#pragma warning restore 612,618 + + var folderPath = PathUtils.Instance.FormatFolderPath(string.Format(DefaultUsersFoldersPath + "/{0}", rootFolder)); + + if (!this.FolderExists(portalId, folderPath)) + { + this.AddFolder(folderMapping, folderPath); + } + + // GetUserFolderPathElement is deprecated without a replacement, it should have been internal only and will be removed in DNN v10, hence the warning disable here +#pragma warning disable 612,618 + folderPath = PathUtils.Instance.FormatFolderPath(string.Concat(folderPath, PathUtils.Instance.GetUserFolderPathElement(user.UserID, PathUtils.UserFolderElement.SubFolder))); +#pragma warning restore 612,618 + + if (!this.FolderExists(portalId, folderPath)) + { + this.AddFolder(folderMapping, folderPath); + } + + folderPath = PathUtils.Instance.FormatFolderPath(string.Concat(folderPath, user.UserID.ToString(CultureInfo.InvariantCulture))); + + if (!this.FolderExists(portalId, folderPath)) + { + this.AddFolder(folderMapping, folderPath); + + var folder = this.GetFolder(portalId, folderPath); + + foreach (PermissionInfo permission in PermissionController.GetPermissionsByFolder()) + { + if (permission.PermissionKey.Equals("READ", StringComparison.InvariantCultureIgnoreCase) || permission.PermissionKey.Equals("WRITE", StringComparison.InvariantCultureIgnoreCase) || permission.PermissionKey.Equals("BROWSE", StringComparison.InvariantCultureIgnoreCase)) + { + var folderPermission = new FolderPermissionInfo(permission) + { + FolderID = folder.FolderID, + UserID = user.UserID, + RoleID = int.Parse(Globals.glbRoleNothing), + AllowAccess = true, + }; + + folder.FolderPermissions.Add(folderPermission); + + if (permission.PermissionKey.Equals("READ", StringComparison.InvariantCultureIgnoreCase)) + { + this.AddAllUserReadPermission(folder, permission); + } + } + } + + FolderPermissionController.SaveFolderPermissions((FolderInfo)folder); + } + + return this.GetFolder(portalId, folderPath); + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// A value indicating whether there are any folder mappings that required network connectivity. + /// The site (Portal) ID. + /// The relative path. + /// A value indicating whether the check should be recursive or not. + internal virtual bool AreThereFolderMappingsRequiringNetworkConnectivity(int portalId, string relativePath, bool isRecursive) + { + var folder = this.GetFolder(portalId, relativePath); + + if (folder != null) + { + var folderMapping = FolderMappingController.Instance.GetFolderMapping(folder.PortalID, folder.FolderMappingID); + var folderProvider = FolderProvider.Instance(folderMapping.FolderProviderType); + + if (folderProvider.RequiresNetworkConnectivity) + { + return true; + } + } + + if (isRecursive) + { + var folderMappingsRequiringNetworkConnectivity = from fm in FolderMappingController.Instance.GetFolderMappings(portalId) + where + fm.IsEditable && + FolderProvider.Instance(fm.FolderProviderType).RequiresNetworkConnectivity + select fm; + + return folderMappingsRequiringNetworkConnectivity.Any(); + } + + return false; + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The site (portal) ID. + internal void ClearFolderProviderCachedLists(int portalId) + { + foreach (var folderMapping in FolderMappingController.Instance.GetFolderMappings(portalId)) + { + var folderProvider = FolderProvider.Instance(folderMapping.FolderProviderType); + + if (folderMapping.MappingName != "Standard" && folderMapping.MappingName != "Secure" && folderMapping.MappingName != "Database") + { + var type = folderProvider.GetType(); + MethodInfo method = type.GetMethod("ClearCache"); + if (method != null) + { + method.Invoke(folderProvider, new object[] { folderMapping.FolderMappingID }); + } + } + } + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The site (portal) ID. + internal virtual void ClearFolderCache(int portalId) + { + DataCache.ClearFolderCache(portalId); + } + + /// + /// Creates a folder in the database. + /// + /// The site (portal) ID. + /// The folder path to create. + /// The folder mapping id, . + /// The created folder ID. + internal virtual int CreateFolderInDatabase(int portalId, string folderPath, int folderMappingId) + { + return this.CreateFolderInDatabase(portalId, folderPath, folderMappingId, folderPath); + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The site (portal) ID. + /// The folder path to create. + /// The id for the folder mapping. + /// The mapped path. + /// The created folder ID. + internal virtual int CreateFolderInDatabase(int portalId, string folderPath, int folderMappingId, string mappedPath) + { + var isProtected = PathUtils.Instance.IsDefaultProtectedPath(folderPath); + var folderMapping = FolderMappingController.Instance.GetFolderMapping(portalId, folderMappingId); + var storageLocation = (int)FolderController.StorageLocationTypes.DatabaseSecure; + if (!folderMapping.IsEditable) + { + switch (folderMapping.MappingName) + { + case "Standard": + storageLocation = (int)FolderController.StorageLocationTypes.InsecureFileSystem; + break; + case "Secure": + storageLocation = (int)FolderController.StorageLocationTypes.SecureFileSystem; + break; + default: + storageLocation = (int)FolderController.StorageLocationTypes.DatabaseSecure; + break; + } + } + + var folder = new FolderInfo(true) + { + PortalID = portalId, + FolderPath = folderPath, + MappedPath = mappedPath, + StorageLocation = storageLocation, + IsProtected = isProtected, + IsCached = false, + FolderMappingID = folderMappingId, + LastUpdated = Null.NullDate, + }; + + folder.FolderID = this.AddFolderInternal(folder); + + if (portalId != Null.NullInteger) + { + // Set Folder Permissions to inherit from parent + this.CopyParentFolderPermissions(folder); + } + + return folder.FolderID; + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The physical path to create the folder in. + internal virtual void CreateFolderInFileSystem(string physicalPath) + { + var di = new DirectoryInfo(physicalPath); + + if (!di.Exists) + { + di.Create(); + } + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The site (portal) ID. + /// The folder path. + internal virtual void DeleteFolder(int portalId, string folderPath) + { + DataProvider.Instance().DeleteFolder(portalId, PathUtils.Instance.FormatFolderPath(folderPath)); + this.AddLogEntry("FolderPath", folderPath, EventLogController.EventLogType.FOLDER_DELETED); + this.UpdateParentFolder(portalId, folderPath); + DataCache.ClearFolderCache(portalId); + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The folder mapping affected. + /// A list of folders to delete. + internal virtual void DeleteFoldersFromExternalStorageLocations(Dictionary folderMappings, IEnumerable foldersToDelete) + { + foreach (var folderToDelete in foldersToDelete) + { + // Delete source folder from its storage location + var folderMapping = this.GetFolderMapping(folderMappings, folderToDelete.FolderMappingID); + + try + { + var folderProvider = FolderProvider.Instance(folderMapping.FolderProviderType); + + // IMPORTANT: We cannot delete the folder from its storage location when it contains other subfolders + if (!folderProvider.GetSubFolders(folderToDelete.MappedPath, folderMapping).Any()) + { + folderProvider.DeleteFolder(folderToDelete); + } + } + catch (Exception ex) + { + // The folders that cannot be deleted from its storage location will be handled during the next sync + Logger.Error(ex); + } + } + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// A value representing the current script timeout. + internal virtual int GetCurrentScriptTimeout() + { + return HttpContext.Current.Server.ScriptTimeout; + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The id of the current user. + internal virtual int GetCurrentUserId() + { + return UserController.Instance.GetCurrentUserInfo().UserID; + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The site (portal) ID. + /// The relative path. + /// A value indicating whether to return folders recursively. + /// A sorted list of folders. + internal virtual SortedList GetDatabaseFolders(int portalId, string relativePath, bool isRecursive) + { + var databaseFolders = new SortedList(new IgnoreCaseStringComparer()); + + var folder = this.GetFolder(portalId, relativePath); + + if (folder != null) + { + if (!isRecursive) + { + var item = new MergedTreeItem + { + FolderID = folder.FolderID, + FolderMappingID = folder.FolderMappingID, + FolderPath = folder.FolderPath, + ExistsInDatabase = true, + MappedPath = folder.MappedPath, + }; + + databaseFolders.Add(relativePath, item); + } + else + { + databaseFolders = this.GetDatabaseFoldersRecursive(folder); + } + } + + return databaseFolders; + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The folder to get. + /// A sorted list of folders. + internal virtual SortedList GetDatabaseFoldersRecursive(IFolderInfo folder) + { + var result = new SortedList(new IgnoreCaseStringComparer()); + var stack = new Stack(); + + stack.Push(folder); + + while (stack.Count > 0) + { + var folderInfo = stack.Pop(); + + var item = new MergedTreeItem + { + FolderID = folderInfo.FolderID, + FolderMappingID = folderInfo.FolderMappingID, + FolderPath = folderInfo.FolderPath, + ExistsInDatabase = true, + MappedPath = folderInfo.MappedPath, + }; + + if (!result.ContainsKey(item.FolderPath)) + { + result.Add(item.FolderPath, item); + } + + foreach (var subfolder in this.GetFolders(folderInfo)) + { + stack.Push(subfolder); + } + } + + return result; + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The site (portal) ID. + /// The relative path. + /// A value indicating whether to return the folders recursively. + /// A sorted list of folders. + internal virtual SortedList GetFileSystemFolders(int portalId, string relativePath, bool isRecursive) + { + var fileSystemFolders = new SortedList(new IgnoreCaseStringComparer()); + + var physicalPath = PathUtils.Instance.GetPhysicalPath(portalId, relativePath); + var hideFoldersEnabled = PortalController.GetPortalSettingAsBoolean("HideFoldersEnabled", portalId, true); + + if (DirectoryWrapper.Instance.Exists(physicalPath)) + { + if (((FileWrapper.Instance.GetAttributes(physicalPath) & FileAttributes.Hidden) == FileAttributes.Hidden || physicalPath.StartsWith("_")) && hideFoldersEnabled) + { + return fileSystemFolders; + } + + if (!isRecursive) + { + var item = new MergedTreeItem + { + FolderID = -1, + FolderMappingID = -1, + FolderPath = relativePath, + ExistsInFileSystem = true, + MappedPath = string.Empty, + }; + + fileSystemFolders.Add(relativePath, item); + } + else + { + fileSystemFolders = this.GetFileSystemFoldersRecursive(portalId, physicalPath); + } + } + + return fileSystemFolders; + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The site (portal) ID. + /// The physical path of the folder. + /// A sorted list of folders. + internal virtual SortedList GetFileSystemFoldersRecursive(int portalId, string physicalPath) + { + var result = new SortedList(new IgnoreCaseStringComparer()); + var stack = new Stack(); + + stack.Push(physicalPath); + + var hideFoldersEnabled = PortalController.GetPortalSettingAsBoolean("HideFoldersEnabled", portalId, true); + + while (stack.Count > 0) + { + var dir = stack.Pop(); + + try + { + var item = new MergedTreeItem + { + FolderID = -1, + FolderMappingID = -1, + FolderPath = PathUtils.Instance.GetRelativePath(portalId, dir), + ExistsInFileSystem = true, + MappedPath = string.Empty, + }; + + result.Add(item.FolderPath, item); + + foreach (var dn in DirectoryWrapper.Instance.GetDirectories(dir)) + { + if (((FileWrapper.Instance.GetAttributes(dn) & FileAttributes.Hidden) == FileAttributes.Hidden || dn.StartsWith("_")) && hideFoldersEnabled) + { + continue; + } + + stack.Push(dn); + } + } + catch (Exception ex) + { + Logger.Error(ex); + } + } + + return result; + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The folder mapping to search in. + /// The folder mapping id to return. + /// A single folder mapping, . + internal virtual FolderMappingInfo GetFolderMapping(Dictionary folderMappings, int folderMappingId) + { + if (!folderMappings.ContainsKey(folderMappingId)) + { + folderMappings.Add(folderMappingId, FolderMappingController.Instance.GetFolderMapping(folderMappingId)); + } + + return folderMappings[folderMappingId]; + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The folder mapping to use. + /// The folder base path. + /// A sorted list of folder mappings. + internal virtual SortedList GetFolderMappingFoldersRecursive(FolderMappingInfo folderMapping, IFolderInfo folder) + { + var result = new SortedList(new IgnoreCaseStringComparer()); + var stack = new Stack(); + var folderProvider = FolderProvider.Instance(folderMapping.FolderProviderType); + + var baseMappedPath = folder.MappedPath; + var baseFolderPath = folder.FolderPath; + + stack.Push(baseMappedPath); + + while (stack.Count > 0) + { + var mappedPath = stack.Pop(); + var relativePath = string.IsNullOrEmpty(mappedPath) + ? string.Empty + : string.IsNullOrEmpty(baseMappedPath) + ? mappedPath + : RegexUtils.GetCachedRegex(Regex.Escape(baseMappedPath)).Replace(mappedPath, string.Empty, 1); + + var folderPath = baseFolderPath + relativePath; + + if (folderProvider.FolderExists(mappedPath, folderMapping)) + { + var item = new MergedTreeItem + { + FolderID = -1, + FolderMappingID = folderMapping.FolderMappingID, + FolderPath = folderPath, + ExistsInFolderMapping = true, + MappedPath = mappedPath, + }; + + if (!result.ContainsKey(item.FolderPath)) + { + result.Add(item.FolderPath, item); + } + + foreach (var subfolderPath in folderProvider.GetSubFolders(mappedPath, folderMapping)) + { + if (folderMapping.SyncAllSubFolders || folderProvider.FolderExists(subfolderPath, folderMapping)) + { + stack.Push(subfolderPath); + } + } + } + } + + return result; + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The cached items arguments, . + /// A list of folders. + internal virtual object GetFoldersByPermissionSortedCallBack(CacheItemArgs cacheItemArgs) + { + var portalId = (int)cacheItemArgs.ParamList[0]; + var permissions = (string)cacheItemArgs.ParamList[1]; + var userId = (int)cacheItemArgs.ParamList[2]; + return CBO.Instance.FillCollection(DataProvider.Instance().GetFoldersByPortalAndPermissions(portalId, permissions, userId)); + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The cache item arguments, . + /// A list of folders. + internal virtual object GetFoldersSortedCallBack(CacheItemArgs cacheItemArgs) + { + var portalId = (int)cacheItemArgs.ParamList[0]; + return CBO.Instance.FillCollection(DataProvider.Instance().GetFoldersByPortal(portalId)); + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The site (portal) ID. + /// The relative path. + /// A vavlue indicating whether the search should be recursive. + /// A sorted list of . + internal virtual SortedList GetMergedTree(int portalId, string relativePath, bool isRecursive) + { + var fileSystemFolders = this.GetFileSystemFolders(portalId, relativePath, isRecursive); + var databaseFolders = this.GetDatabaseFolders(portalId, relativePath, isRecursive); + + var mergedTree = this.MergeFolderLists(fileSystemFolders, databaseFolders); + var mappedFolders = new SortedList(); + + // Some providers cache the list of objects for performance + this.ClearFolderProviderCachedLists(portalId); + + foreach (var mergedItem in mergedTree.Values) + { + if (mergedItem.FolderMappingID == Null.NullInteger) + { + continue; + } + + var folderMapping = FolderMappingController.Instance.GetFolderMapping(portalId, mergedItem.FolderMappingID); + + // Add any folders from non-core providers + if (folderMapping.MappingName != "Standard" && folderMapping.MappingName != "Secure" && folderMapping.MappingName != "Database") + { + if (!isRecursive) + { + mergedItem.ExistsInFolderMapping = true; + } + else + { + var folder = this.GetFolder(portalId, mergedItem.FolderPath); + mappedFolders = this.MergeFolderLists(mappedFolders, this.GetFolderMappingFoldersRecursive(folderMapping, folder)); + } + } + else + { + mergedItem.ExistsInFolderMapping = folderMapping.MappingName == "Database" ? mergedItem.ExistsInDatabase : mergedItem.ExistsInFileSystem; + } + } + + mergedTree = this.MergeFolderLists(mergedTree, mappedFolders); + + // Update ExistsInFolderMapping if the Parent Does Not ExistsInFolderMapping + var margedTreeItems = mergedTree.Values; + foreach (var mergedItem in margedTreeItems.Where(m => m.ExistsInFolderMapping + && margedTreeItems.Any(mt2 => !mt2.ExistsInFolderMapping && m.FolderPath.StartsWith(mt2.FolderPath)))) + { + mergedItem.ExistsInFolderMapping = false; + } + + return mergedTree; + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The folder mapping. + /// A value indicating whether the folder mapping is editable. + internal virtual bool IsFolderMappingEditable(FolderMappingInfo folderMapping) + { + return folderMapping.IsEditable; + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The folder to move. + /// The destination folder to move the folder to. + /// The new folder path. + /// A value indicating whether the move operation would be valid. + internal virtual bool IsMoveOperationValid(IFolderInfo folderToMove, IFolderInfo destinationFolder, string newFolderPath) + { + // FolderMapping cases + var folderMapping = FolderMappingController.Instance.GetFolderMapping(folderToMove.PortalID, folderToMove.FolderMappingID); + if (folderToMove.FolderMappingID == destinationFolder.FolderMappingID && FolderProvider.Instance(folderMapping.FolderProviderType).SupportsMappedPaths) + { + // Root mapped folder cannot be move, when folder mappings are equal + if (folderToMove.MappedPath == string.Empty) + { + return false; + } + + // Destination folder cannot be a child mapped folder from the folder to move + if (destinationFolder.MappedPath.StartsWith(folderToMove.MappedPath)) + { + return false; + } + } + + return this.IsMoveOperationValid(folderToMove, newFolderPath); + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The folder to move. + /// The distination folder to move the folder into. + /// A value indicating if the move operation would be valid. + internal virtual bool IsMoveOperationValid(IFolderInfo folderToMove, string newFolderPath) + { + // Root folder cannot be moved + if (folderToMove.FolderPath == string.Empty) + { + return false; + } + + // newParentFolder cannot be a child of folderToMove + if (newFolderPath.StartsWith(folderToMove.FolderPath)) + { + return false; + } + + return true; + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// A value indicating whether the network is available. + internal virtual bool IsNetworkAvailable() + { + return NetworkInterface.GetIsNetworkAvailable(); + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The first list for the merge. + /// The second list for the merge. + /// A merged sorted list of MergedTreeItems, . + internal virtual SortedList MergeFolderLists(SortedList list1, SortedList list2) + { + foreach (var item in list2.Values) + { + if (list1.ContainsKey(item.FolderPath)) + { + var existingItem = list1[item.FolderPath]; + if (existingItem.FolderID < 0) + { + existingItem.FolderID = item.FolderID; + } + + if (existingItem.FolderMappingID < 0) + { + existingItem.FolderMappingID = item.FolderMappingID; + } + + if (string.IsNullOrEmpty(existingItem.MappedPath)) + { + existingItem.MappedPath = item.MappedPath; + } + + existingItem.ExistsInFileSystem = existingItem.ExistsInFileSystem || item.ExistsInFileSystem; + existingItem.ExistsInDatabase = existingItem.ExistsInDatabase || item.ExistsInDatabase; + existingItem.ExistsInFolderMapping = existingItem.ExistsInFolderMapping || item.ExistsInFolderMapping; + } + else + { + list1.Add(item.FolderPath, item); + } + } + + return list1; + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The source directory. + /// The target directory. + internal virtual void MoveDirectory(string source, string target) + { + var stack = new Stack(); + stack.Push(new MoveFoldersInfo(source, target)); + + // ReSharper disable AssignNullToNotNullAttribute + while (stack.Count > 0) + { + var folders = stack.Pop(); + Directory.CreateDirectory(folders.Target); + foreach (var file in Directory.GetFiles(folders.Source, "*.*")) + { + var targetFile = Path.Combine(folders.Target, Path.GetFileName(file)); + if (File.Exists(targetFile)) + { + File.Delete(targetFile); + } + + File.Move(file, targetFile); + } + + foreach (var folder in Directory.GetDirectories(folders.Source)) + { + stack.Push(new MoveFoldersInfo(folder, Path.Combine(folders.Target, Path.GetFileName(folder)))); + } + } + + // ReSharper restore AssignNullToNotNullAttribute + Directory.Delete(source, true); + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The folder to move. + /// The destination folder. + internal virtual void MoveFolderWithinProvider(IFolderInfo folder, IFolderInfo destinationFolder) + { + var newFolderPath = destinationFolder.FolderPath + folder.FolderName + "/"; + this.RenameFolderInFileSystem(folder, newFolderPath); + + // Update provider + var newMappedPath = destinationFolder.MappedPath + folder.FolderName + "/"; + var folderMapping = FolderMappingController.Instance.GetFolderMapping(folder.PortalID, folder.FolderMappingID); + var provider = FolderProvider.Instance(folderMapping.FolderProviderType); + provider.MoveFolder(folder.MappedPath, newMappedPath, folderMapping); + + // Update database + this.UpdateChildFolders(folder, Path.Combine(destinationFolder.FolderPath, folder.FolderName)); + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The folder to move. + /// The target folder for the move. + internal virtual void MoveFolderBetweenProviders(IFolderInfo folder, string newFolderPath) + { + this.RenameFolderInFileSystem(folder, newFolderPath); + + var folderInfos = this.GetFolders(folder.PortalID).Where(f => f.FolderPath != string.Empty && f.FolderPath.StartsWith(folder.FolderPath)).ToArray(); + var tmpFolderPath = folder.FolderPath; + + foreach (var folderInfo in folderInfos) + { + var folderPath = newFolderPath + folderInfo.FolderPath.Substring(tmpFolderPath.Length); + + var parentFolder = this.GetParentFolder(folder.PortalID, folderPath); + folderInfo.ParentID = parentFolder.FolderID; + folderInfo.FolderPath = folderPath; + this.UpdateFolderInternal(folderInfo, true); + } + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The source folder. + /// The destination folder. + /// The folder mappings. + /// The folders to delete. + internal virtual void OverwriteFolder(IFolderInfo sourceFolder, IFolderInfo destinationFolder, Dictionary folderMappings, SortedList foldersToDelete) + { + var fileManager = FileManager.Instance; + var files = this.GetFiles(sourceFolder, true); + + foreach (var file in files) + { + fileManager.MoveFile(file, destinationFolder); + } + + // Delete source folder in database + this.DeleteFolder(sourceFolder.PortalID, sourceFolder.FolderPath); + + var folderMapping = this.GetFolderMapping(folderMappings, sourceFolder.FolderMappingID); + + if (this.IsFolderMappingEditable(folderMapping)) + { + foldersToDelete.Add(sourceFolder.FolderPath, sourceFolder); + } + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The item to process. + /// The site (portal) ID. + internal virtual void ProcessMergedTreeItemInAddMode(MergedTreeItem item, int portalId) + { + try + { + if (item.ExistsInFileSystem) + { + if (!item.ExistsInDatabase) + { + var folderMappingId = this.FindFolderMappingId(item, portalId); + this.CreateFolderInDatabase(portalId, item.FolderPath, folderMappingId); + } + } + else + { + if (item.ExistsInDatabase) + { + if (item.ExistsInFolderMapping) + { + this.CreateFolderInFileSystem(PathUtils.Instance.GetPhysicalPath(portalId, item.FolderPath)); + } + } + else + { + // by exclusion it exists in the Folder Mapping + this.CreateFolderInFileSystem(PathUtils.Instance.GetPhysicalPath(portalId, item.FolderPath)); + this.CreateFolderInDatabase(portalId, item.FolderPath, item.FolderMappingID, item.MappedPath); + } + } + } + catch (Exception ex) + { + Logger.Error(string.Format("Could not create folder {0}. EXCEPTION: {1}", item.FolderPath, ex.Message), ex); + } + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// . + /// The site (portal) ID. + internal virtual void ProcessMergedTreeItemInDeleteMode(MergedTreeItem item, int portalId) + { + if (item.ExistsInFileSystem) + { + if (item.ExistsInDatabase) + { + if (item.FolderPath == string.Empty) + { + return; // Do not process root folder + } + + if (!item.ExistsInFolderMapping) + { + var folderMapping = FolderMappingController.Instance.GetFolderMapping(portalId, item.FolderMappingID); + + if (folderMapping.IsEditable) + { + DirectoryWrapper.Instance.Delete(PathUtils.Instance.GetPhysicalPath(portalId, item.FolderPath), false); + this.DeleteFolder(portalId, item.FolderPath); + } + } + } + } + else + { + if (item.ExistsInDatabase && !item.ExistsInFolderMapping) + { + this.DeleteFolder(portalId, item.FolderPath); + } + } + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The folder to cleanup. + internal virtual void RemoveOrphanedFiles(IFolderInfo folder) + { + var files = this.GetFiles(folder, false, true); + + var folderMapping = FolderMappingController.Instance.GetFolderMapping(folder.PortalID, folder.FolderMappingID); + + if (folderMapping != null) + { + var folderProvider = FolderProvider.Instance(folderMapping.FolderProviderType); + + foreach (var file in files) + { + try + { + if (!folderProvider.FileExists(folder, file.FileName)) + { + FileDeletionController.Instance.DeleteFileData(file); + } + } + catch (Exception ex) + { + Logger.Error(ex); + } + } + } + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The folder to rename. + /// The new folder path. + internal virtual void RenameFolderInFileSystem(IFolderInfo folder, string newFolderPath) + { + var source = folder.PhysicalPath; + + var di = new DirectoryInfo(source); + if (!di.Exists) + { + return; + } + + var target = PathUtils.Instance.GetPhysicalPath(folder.PortalID, newFolderPath); + this.MoveDirectory(source, target); + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The folder to save the permissions for. + internal virtual void SaveFolderPermissions(IFolderInfo folder) + { + FolderPermissionController.SaveFolderPermissions((FolderInfo)folder); + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The timeout in seconds. + internal virtual void SetScriptTimeout(int timeout) + { + HttpContext.Current.Server.ScriptTimeout = timeout; + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The item to synchronize. + /// The site (portal) ID. + internal virtual void SynchronizeFiles(MergedTreeItem item, int portalId) + { + var folder = this.GetFolder(portalId, item.FolderPath); + + if (folder == null) + { + return; + } + + var folderMapping = FolderMappingController.Instance.GetFolderMapping(portalId, folder.FolderMappingID); + + if (folderMapping == null) + { + return; + } + + try + { + var folderProvider = FolderProvider.Instance(folderMapping.FolderProviderType); + var fileManager = FileManager.Instance; + + if (folderProvider.FolderExists(folder.MappedPath, folderMapping)) + { + var files = folderProvider.GetFiles(folder); + + files = files.Except(FileVersionController.Instance.GetFileVersionsInFolder(folder.FolderID).Select(f => f.FileName)).ToArray(); + + foreach (var fileName in files) + { + try + { + var file = fileManager.GetFile(folder, fileName, true); + + if (file == null) + { + fileManager.AddFile(folder, fileName, null, false); + } + else if (!folderProvider.IsInSync(file)) + { + fileManager.UpdateFile(file, null); + } + } + catch (InvalidFileExtensionException ex) + { + Logger.Info(ex.Message); + } + catch (Exception ex) + { + Logger.Error(ex); + } + } + } + + this.RemoveOrphanedFiles(folder); + } + catch (Exception ex) + { + Logger.Error(ex); + } + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The site (portal) ID. + /// The folder path to update. + internal virtual void UpdateParentFolder(int portalId, string folderPath) + { + if (!string.IsNullOrEmpty(folderPath)) + { + var parentFolderPath = folderPath.Substring(0, folderPath.Substring(0, folderPath.Length - 1).LastIndexOf("/", StringComparison.Ordinal) + 1); + var objFolder = this.GetFolder(portalId, parentFolderPath); + if (objFolder != null) + { + // UpdateFolder(objFolder); + this.UpdateFolderInternal(objFolder, false); + } + } + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The folder to update. + /// The new folder path. + internal virtual void UpdateChildFolders(IFolderInfo folder, string newFolderPath) + { + var originalFolderPath = folder.FolderPath; + + var folderInfos = this.GetFolders(folder.PortalID).Where(f => f.FolderPath != string.Empty && f.FolderPath.StartsWith(originalFolderPath)).ToArray(); + + foreach (var folderInfo in folderInfos) + { + var folderMapping = FolderMappingController.Instance.GetFolderMapping(folder.PortalID, folderInfo.FolderMappingID); + var provider = FolderProvider.Instance(folderMapping.FolderProviderType); + + var folderPath = newFolderPath + (newFolderPath.EndsWith("/") ? string.Empty : "/") + folderInfo.FolderPath.Substring(originalFolderPath.Length); + + var parentFolder = this.GetParentFolder(folder.PortalID, folderPath); + folderInfo.ParentID = parentFolder.FolderID; + folderInfo.FolderPath = folderPath; + + var parentProvider = FolderProvider.Instance(FolderMappingController.Instance.GetFolderMapping(parentFolder.PortalID, parentFolder.FolderMappingID).FolderProviderType); + if (parentProvider.SupportsMappedPaths || !provider.SupportsMappedPaths) + { + if (provider.SupportsMappedPaths) + { + var mappedPath = parentFolder.FolderPath == string.Empty ? string.Empty : folderPath.Replace(parentFolder.FolderPath, string.Empty); + folderInfo.MappedPath = PathUtils.Instance.FormatFolderPath(parentFolder.MappedPath + mappedPath); + } + else + { + folderInfo.MappedPath = folderPath; + } + } + else if (provider.SupportsMappedPaths) + { + if (originalFolderPath == folderInfo.MappedPath) + { + folderInfo.MappedPath = folderPath; + } + else if (folderInfo.MappedPath.EndsWith("/" + originalFolderPath, StringComparison.Ordinal)) + { + var newMappedPath = PathUtils.Instance.FormatFolderPath( + folderInfo.MappedPath.Substring(0, folderInfo.MappedPath.LastIndexOf("/" + originalFolderPath, StringComparison.Ordinal)) + "/" + folderPath); + folderInfo.MappedPath = newMappedPath; + } + } + + this.UpdateFolderInternal(folderInfo, false); + } + + this.ClearFolderCache(folder.PortalID); + } + + /// This member is reserved for internal use and is not intended to be used directly from your code. + /// The source folder mapping. + /// The destination folder mapping. + /// A value indicating whether a folder mapping can be moved to another one. + internal virtual bool CanMoveBetweenFolderMappings(FolderMappingInfo sourceFolderMapping, FolderMappingInfo destinationFolderMapping) + { + // If Folder Mappings are exactly the same + if (sourceFolderMapping.FolderMappingID == destinationFolderMapping.FolderMappingID) + { + return true; + } + + return IsStandardFolderProviderType(sourceFolderMapping) && IsStandardFolderProviderType(destinationFolderMapping); + } + + private static Regex WildcardToRegex(string pattern) + { + pattern = Regex.Escape(pattern).Replace(@"\*", ".*").Replace(@"\?", "."); + return RegexUtils.GetCachedRegex(pattern, RegexOptions.IgnoreCase); + } + + private static bool IsStandardFolderProviderType(FolderMappingInfo folderMappingInfo) + { + var compatibleTypes = new[] { "StandardFolderProvider", "SecureFolderProvider", "DatabaseFolderProvider" }; + return compatibleTypes.Contains(folderMappingInfo.FolderProviderType); + } + + private int AddFolderInternal(IFolderInfo folder) + { + // Check this is not a duplicate + var tmpfolder = this.GetFolder(folder.PortalID, folder.FolderPath); + + if (tmpfolder != null && folder.FolderID == Null.NullInteger) + { + folder.FolderID = tmpfolder.FolderID; + } + + if (folder.FolderID == Null.NullInteger) + { + var isVersioned = folder.IsVersioned; + var workflowId = folder.WorkflowID; + + // Inherit some configuration from its Parent Folder + var parentFolder = this.GetParentFolder(folder.PortalID, folder.FolderPath); + var parentId = Null.NullInteger; + if (parentFolder != null) + { + isVersioned = parentFolder.IsVersioned; + workflowId = parentFolder.WorkflowID; + parentId = parentFolder.FolderID; + } + + folder.FolderPath = PathUtils.Instance.FormatFolderPath(folder.FolderPath); + folder.FolderID = DataProvider.Instance().AddFolder( + folder.PortalID, + folder.UniqueId, + folder.VersionGuid, + folder.FolderPath, + folder.MappedPath, + folder.StorageLocation, + folder.IsProtected, + folder.IsCached, + folder.LastUpdated, + this.GetCurrentUserId(), + folder.FolderMappingID, + isVersioned, + workflowId, + parentId); + + // Refetch folder for logging + folder = this.GetFolder(folder.PortalID, folder.FolderPath); + + this.AddLogEntry(folder, EventLogController.EventLogType.FOLDER_CREATED); + + if (parentFolder != null) + { + this.UpdateFolderInternal(parentFolder, false); + } + else + { + this.UpdateParentFolder(folder.PortalID, folder.FolderPath); + } + } + else + { + var parentFolder = this.GetParentFolder(folder.PortalID, folder.FolderPath); + if (parentFolder != null) + { + // Ensure that Parent Id is repaired + folder.ParentID = parentFolder.FolderID; + } + + this.UpdateFolderInternal(folder, false); + } + + // Invalidate Cache + this.ClearFolderCache(folder.PortalID); + + return folder.FolderID; + } + + private bool GetOnlyUnmap(IFolderInfo folder) + { + if (folder == null || folder.ParentID == Null.NullInteger) + { + return true; + } + + return FolderProvider.Instance(FolderMappingController.Instance.GetFolderMapping(folder.FolderMappingID).FolderProviderType).SupportsMappedPaths && + this.GetFolder(folder.ParentID).FolderMappingID != folder.FolderMappingID; + } + + private void UnmapFolderInternal(IFolderInfo folder, bool isCascadeDeleting) + { + Requires.NotNull("folder", folder); + + if (DirectoryWrapper.Instance.Exists(folder.PhysicalPath)) + { + DirectoryWrapper.Instance.Delete(folder.PhysicalPath, true); + } + + this.DeleteFolder(folder.PortalID, folder.FolderPath); + + // Notify folder deleted event + this.OnFolderDeleted(folder, this.GetCurrentUserId(), isCascadeDeleting); + } + + private void DeleteFolderInternal(IFolderInfo folder, bool isCascadeDeleting) + { + Requires.NotNull("folder", folder); + + var folderMapping = FolderMappingController.Instance.GetFolderMapping(folder.PortalID, folder.FolderMappingID); + + try + { + FolderProvider.Instance(folderMapping.FolderProviderType).DeleteFolder(folder); + } + catch (Exception ex) + { + Logger.Error(ex); + + throw new FolderProviderException( + Localization.GetExceptionMessage( + "DeleteFolderUnderlyingSystemError", + "The underlying system threw an exception. The folder has not been deleted."), + ex); + } + + if (DirectoryWrapper.Instance.Exists(folder.PhysicalPath)) + { + DirectoryWrapper.Instance.Delete(folder.PhysicalPath, true); + } + + this.DeleteFolder(folder.PortalID, folder.FolderPath); + + // Notify folder deleted event + this.OnFolderDeleted(folder, this.GetCurrentUserId(), isCascadeDeleting); + } + + private IFolderInfo GetParentFolder(int portalId, string folderPath) + { + if (!string.IsNullOrEmpty(folderPath)) + { + var parentFolderPath = folderPath.Substring(0, folderPath.Substring(0, folderPath.Length - 1).LastIndexOf("/", StringComparison.Ordinal) + 1); + return this.GetFolder(portalId, parentFolderPath); + } + + return null; + } + + private IEnumerable SearchFiles(IFolderInfo folder, Regex regex, bool recursive) + { + var fileCollection = + CBO.Instance.FillCollection(DataProvider.Instance().GetFiles(folder.FolderID, false, false)); + + var files = (from f in fileCollection where regex.IsMatch(f.FileName) select f).Cast().ToList(); + + if (recursive) + { + foreach (var subFolder in this.GetFolders(folder)) + { + if (FolderPermissionController.Instance.CanViewFolder(subFolder)) + { + files.AddRange(this.SearchFiles(subFolder, regex, true)); + } + } + } + + return files; + } + + private IFolderInfo UpdateFolderInternal(IFolderInfo folder, bool clearCache) + { + Requires.NotNull("folder", folder); + + DataProvider.Instance().UpdateFolder( + folder.PortalID, + folder.VersionGuid, + folder.FolderID, + PathUtils.Instance.FormatFolderPath(folder.FolderPath), + folder.StorageLocation, + folder.MappedPath, + folder.IsProtected, + folder.IsCached, + folder.LastUpdated, + this.GetCurrentUserId(), + folder.FolderMappingID, + folder.IsVersioned, + folder.WorkflowID, + folder.ParentID); + + if (clearCache) + { + this.ClearFolderCache(folder.PortalID); + } + + return folder; + } + + private int FindFolderMappingId(MergedTreeItem item, int portalId) + { + if (item.ExistsInFolderMapping) + { + return item.FolderMappingID; + } + + if (item.FolderPath.IndexOf('/') != item.FolderPath.LastIndexOf('/')) + { + var parentPath = item.FolderPath.Substring(0, item.FolderPath.TrimEnd('/').LastIndexOf('/') + 1); + var folder = this.GetFolder(portalId, parentPath); + if (folder != null) + { + return folder.FolderMappingID; + } + } + + return FolderMappingController.Instance.GetDefaultFolderMapping(portalId).FolderMappingID; + } + + private bool DeleteFolderRecursive(IFolderInfo folder, ICollection notDeletedSubfolders, bool isRecursiveDeletionFolder, bool unmap) + { + Requires.NotNull("folder", folder); + + if (UserSecurityController.Instance.HasFolderPermission(folder, "DELETE")) + { + var subfolders = this.GetFolders(folder); + + var allSubFoldersHasBeenDeleted = true; + + foreach (var subfolder in subfolders) + { + if (!this.DeleteFolderRecursive(subfolder, notDeletedSubfolders, false, unmap || this.GetOnlyUnmap(subfolder))) + { + allSubFoldersHasBeenDeleted = false; + } + } + + var files = this.GetFiles(folder, false, true); + foreach (var file in files) + { + if (unmap) + { + FileDeletionController.Instance.UnlinkFile(file); + } + else + { + FileDeletionController.Instance.DeleteFile(file); + } + + this.OnFileDeleted(file, this.GetCurrentUserId(), true); + } + + if (allSubFoldersHasBeenDeleted) + { + if (unmap) + { + this.UnmapFolderInternal(folder, !isRecursiveDeletionFolder); + } + else + { + this.DeleteFolderInternal(folder, !isRecursiveDeletionFolder); + } + + return true; + } + } + + notDeletedSubfolders.Add(folder); + return false; + } + + private string GetDefaultMappedPath(FolderMappingInfo folderMapping) + { + var defaultMappedPath = folderMapping.FolderMappingSettings[DefaultMappedPathSetting]; + if (defaultMappedPath == null) + { + return string.Empty; + } + + return defaultMappedPath.ToString(); + } + + private IEnumerable GetFolders(IFolderInfo parentFolder, bool allSubFolders) + { + Requires.NotNull("parentFolder", parentFolder); + + if (allSubFolders) + { + var subFolders = + this.GetFolders(parentFolder.PortalID) + .Where( + f => + f.FolderPath.StartsWith( + parentFolder.FolderPath, + StringComparison.InvariantCultureIgnoreCase)); + + return subFolders.Where(f => f.FolderID != parentFolder.FolderID); + } + + return this.GetFolders(parentFolder.PortalID).Where(f => f.ParentID == parentFolder.FolderID); + } + + private void OnFolderMoved(IFolderInfo folderInfo, int userId, string oldFolderPath) + { + EventManager.Instance.OnFolderMoved(new FolderMovedEventArgs + { + FolderInfo = folderInfo, + UserId = userId, + OldFolderPath = oldFolderPath, + }); + } + + private void OnFolderRenamed(IFolderInfo folderInfo, int userId, string oldFolderName) + { + EventManager.Instance.OnFolderRenamed(new FolderRenamedEventArgs + { + FolderInfo = folderInfo, + UserId = userId, + OldFolderName = oldFolderName, + }); + } + + private void OnFolderDeleted(IFolderInfo folderInfo, int userId, bool isCascadeDeleting) + { + EventManager.Instance.OnFolderDeleted(new FolderDeletedEventArgs + { + FolderInfo = folderInfo, + UserId = userId, + IsCascadeDeletng = isCascadeDeleting, + }); + } + + private void OnFolderAdded(IFolderInfo folderInfo, int userId) + { + EventManager.Instance.OnFolderAdded(new FolderChangedEventArgs + { + FolderInfo = folderInfo, + UserId = userId, + }); + } + + private void OnFileDeleted(IFileInfo fileInfo, int userId, bool isCascadeDeleting) + { + EventManager.Instance.OnFileDeleted(new FileDeletedEventArgs + { + FileInfo = fileInfo, + UserId = userId, + IsCascadeDeleting = isCascadeDeleting, + }); + } + + private FolderPermissionCollection GetFolderPermissionsFromSyncData(int portalId, string relativePath) + { + var threadId = Thread.CurrentThread.ManagedThreadId; + FolderPermissionCollection permissions = null; + if (SyncFoldersData.ContainsKey(threadId)) + { + if (SyncFoldersData[threadId].FolderPath == relativePath && SyncFoldersData[threadId].PortalId == portalId) + { + return SyncFoldersData[threadId].Permissions; + } + + permissions = FolderPermissionController.GetFolderPermissionsCollectionByFolder(portalId, relativePath); + SyncFoldersData[threadId] = new SyncFolderData { PortalId = portalId, FolderPath = relativePath, Permissions = permissions }; + return permissions; + } + + permissions = FolderPermissionController.GetFolderPermissionsCollectionByFolder(portalId, relativePath); + SyncFoldersData.Add(threadId, new SyncFolderData { PortalId = portalId, FolderPath = relativePath, Permissions = permissions }); + + return permissions; + } + + private void InitialiseSyncFoldersData(int portalId, string relativePath) + { + var threadId = Thread.CurrentThread.ManagedThreadId; + var permissions = FolderPermissionController.GetFolderPermissionsCollectionByFolder(portalId, relativePath); + if (SyncFoldersData.ContainsKey(threadId)) + { + if (SyncFoldersData[threadId].FolderPath == relativePath && SyncFoldersData[threadId].PortalId == portalId) + { + SyncFoldersData[threadId].Permissions = permissions; + } + else + { + SyncFoldersData[threadId] = new SyncFolderData { PortalId = portalId, FolderPath = relativePath, Permissions = permissions }; + } + } + else + { + SyncFoldersData.Add(threadId, new SyncFolderData { PortalId = portalId, FolderPath = relativePath, Permissions = permissions }); + } + } + + private void RemoveSyncFoldersData(string relativePath) + { + var threadId = Thread.CurrentThread.ManagedThreadId; + if (SyncFoldersData.ContainsKey(threadId)) + { + SyncFoldersData.Remove(threadId); + } + } + + /// + /// This class and its members are reserved for internal use and are not intended to be used in your code. + /// + internal class MergedTreeItem + { + /// + /// Gets or sets a value indicating whether the item exists in the file system. + /// + public bool ExistsInFileSystem { get; set; } + + /// + /// Gets or sets a value indicating whether the item exists in the database. + /// + public bool ExistsInDatabase { get; set; } + + /// + /// Gets or sets a value indicating whether the item exists in the folder mappings. + /// + public bool ExistsInFolderMapping { get; set; } + + /// + /// Gets or sets the folder id. + /// + public int FolderID { get; set; } + + /// + /// Gets or sets the folder path. + /// + public int FolderMappingID { get; set; } + + /// + /// Gets or sets the folder path. + /// + public string FolderPath { get; set; } + + /// + /// Gets or sets the mapped path. + /// + public string MappedPath { get; set; } + } + + /// + /// This class and its members are reserved for internal use and are not intended to be used in your code. + /// + internal class IgnoreCaseStringComparer : IComparer + { + /// + public int Compare(string x, string y) + { + return string.Compare(x.ToLowerInvariant(), y.ToLowerInvariant(), StringComparison.Ordinal); + } + } + + /// + /// This class and its members are reserved for internal use and are not intended to be used in your code. + /// + internal class MoveFoldersInfo + { + /// + /// Initializes a new instance of the class. + /// + /// The source folder. + /// The destination folder. + public MoveFoldersInfo(string source, string target) + { + this.Source = source; + this.Target = target; + } + + /// + /// Gets the Source folder. + + /// + public string Source { get; private set; } + + /// + /// Gets the target folder. + /// + public string Target { get; private set; } + } + } +} diff --git a/DNN Platform/Library/Services/FileSystem/IFileManager.cs b/DNN Platform/Library/Services/FileSystem/IFileManager.cs index 9cea7ceb7f3..6b19ad1401d 100644 --- a/DNN Platform/Library/Services/FileSystem/IFileManager.cs +++ b/DNN Platform/Library/Services/FileSystem/IFileManager.cs @@ -1,13 +1,16 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information - +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + + namespace DotNetNuke.Services.FileSystem { using System; using System.Collections.Generic; using System.IO; - + + using DotNetNuke.Common.Utilities; + /// /// Do not implement. This interface is meant for reference and unit test purposes only. /// There is no guarantee that this interface will not change. @@ -19,7 +22,6 @@ public interface IFileManager /// [Obsolete("Deprecated in DNN 7.4.2. It has been replaced by FileContentTypeManager.Instance.ContentTypes. Scheduled removal in v10.0.0.")] IDictionary ContentTypes { get; } - /// /// Adds a file to the specified folder. /// @@ -120,7 +122,7 @@ public interface IFileManager /// /// The file extension. /// The Content Type for the specified extension. - [Obsolete("Deprecated in DNN 7.4.2. It has been replaced by FileContentTypeManager.Instance.GetContentType(string extension). Scheduled removal in v10.0.0.")] + [Obsolete("Deprecated in DNN 7.4.2. It has been replaced by FileContentTypeManager.Instance.GetContentType(string extension). Scheduled removal in v10.0.0.")] string GetContentType(string extension); /// @@ -275,5 +277,10 @@ public interface IFileManager /// The file to download. /// Indicates how to display the document once downloaded. void WriteFileToResponse(IFileInfo file, ContentDisposition contentDisposition); + + /// + /// Current user's file upload extension whitelist + /// + FileExtensionWhitelist WhiteList { get; } } } diff --git a/DNN Platform/Library/Services/GeneratedImage/ImageHandlerInternal.cs b/DNN Platform/Library/Services/GeneratedImage/ImageHandlerInternal.cs index 80701e9e82c..08250c0920e 100644 --- a/DNN Platform/Library/Services/GeneratedImage/ImageHandlerInternal.cs +++ b/DNN Platform/Library/Services/GeneratedImage/ImageHandlerInternal.cs @@ -19,7 +19,8 @@ namespace DotNetNuke.Services.GeneratedImage using System.Web; using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Users; using DotNetNuke.Services.GeneratedImage.ImageQuantization; using DotNetNuke.Services.Log.EventLog; using DotNetNuke.Services.UserRequest; @@ -92,7 +93,7 @@ public TimeSpan IpCountPurgeInterval public string[] AllowedDomains { get; set; } - public bool LogSecurity { get; set; } + public bool LogSecurity { get; set; } public List ImageTransforms { @@ -214,12 +215,12 @@ public void HandleImageRequest(HttpContextBase context, Func, IBeaconService - { - private static readonly bool IsAlphaMode = DotNetNukeContext.Current?.Application?.Status == ReleaseMode.Alpha; - - private string _beaconEndpoint; - - public string GetBeaconEndpoint() - { - if (string.IsNullOrEmpty(this._beaconEndpoint)) - { - var ep = ConfigurationManager.AppSettings["ImprovementProgram.Endpoint"]; -#if DEBUG - this._beaconEndpoint = string.IsNullOrEmpty(ep) - ? "https://dev.dnnapi.com/beacon" - : ep; -#else - _beaconEndpoint = string.IsNullOrEmpty(ep) - ? "https://dnnapi.com/beacon" - : ep; -#endif - } - - return this._beaconEndpoint; - } - - public bool IsBeaconEnabledForControlBar(UserInfo user) - { - // check for Update Service Opt-in - // check if a host or admin - // check if currently on a host/admin page - var enabled = false; - - if (Host.ParticipateInImprovementProg && !IsAlphaMode) - { - var roles = GetUserRolesBitValues(user); - var tabPath = TabController.CurrentPage.TabPath; - enabled = (roles & (RolesEnum.Host | RolesEnum.Admin)) != 0 && - (tabPath.StartsWith("//Admin") || tabPath.StartsWith("//Host")); - } - - return enabled; - } - - public bool IsBeaconEnabledForPersonaBar() - { - return Host.ParticipateInImprovementProg && !IsAlphaMode; - } - - public string GetBeaconQuery(UserInfo user, string filePath = null) - { - var roles = 0; - if (user.UserID >= 0) - { - if (user.IsSuperUser) - { - roles |= (int)RolesEnum.Host; - } - - if (user.IsInRole("Administrators")) - { - roles |= (int)RolesEnum.Admin; - } - - if (user.IsInRole("Content Managers")) - { - roles |= (int)RolesEnum.ContentManager; - } - - if (user.IsInRole("Content Editors")) - { - roles |= (int)RolesEnum.ContentEditor; - } - - if (user.IsInRole("Community Manager")) - { - roles |= (int)RolesEnum.CommunityManager; - } - } - - // h: Host GUID - hashed - // p: Portal GUID - hashed - // a: Portal Alias - hashed - // r: Role(s) - bitmask - see RolesEnum - // u: User ID - hashed - // f: page name / tab path - // n: Product Edition - hashed - // v: Version - hashed - var uid = user.UserID.ToString("D") + user.CreatedOnDate.ToString("O"); - var portalSettings = PortalController.Instance.GetCurrentPortalSettings(); - var qparams = new Dictionary - { - // Remember to URL ENCODE values that can be ambigious - { "h", HttpUtility.UrlEncode(this.GetHash(Host.GUID)) }, - { "p", HttpUtility.UrlEncode(this.GetHash(portalSettings.GUID.ToString())) }, - { "a", HttpUtility.UrlEncode(this.GetHash(portalSettings.PortalAlias.HTTPAlias)) }, - { "u", HttpUtility.UrlEncode(this.GetHash(uid)) }, - { "r", roles.ToString("D") }, - }; - - if (!string.IsNullOrEmpty(filePath)) - { - qparams["f"] = HttpUtility.UrlEncode(filePath); - } - - // add package and version to context of request - string packageName = DotNetNukeContext.Current.Application.Name; - string installVersion = Common.Globals.FormatVersion(DotNetNukeContext.Current.Application.Version, "00", 3, string.Empty); - if (!string.IsNullOrEmpty(packageName)) - { - qparams["n"] = HttpUtility.UrlEncode(this.GetHash(packageName)); - } - - if (!string.IsNullOrEmpty(installVersion)) - { - qparams["v"] = HttpUtility.UrlEncode(this.GetHash(installVersion)); - } - - return "?" + string.Join("&", qparams.Select(kpv => kpv.Key + "=" + kpv.Value)); - } - - public string GetBeaconUrl(UserInfo user, string filePath = null) - { - return this.GetBeaconEndpoint() + this.GetBeaconQuery(user, filePath); - } - - protected override Func GetFactory() - { - return () => new BeaconService(); - } - - private static RolesEnum GetUserRolesBitValues(UserInfo user) - { - var roles = RolesEnum.None; - if (user.UserID >= 0) - { - if (user.IsSuperUser) - { - roles |= RolesEnum.Host; - } - - if (user.IsInRole("Administrators")) - { - roles |= RolesEnum.Admin; - } - - if (user.IsInRole("Content Managers")) - { - roles |= RolesEnum.ContentManager; - } - - if (user.IsInRole("Content Editors")) - { - roles |= RolesEnum.ContentEditor; - } - - if (user.IsInRole("Community Manager")) - { - roles |= RolesEnum.CommunityManager; - } - } - - return roles; - } - - private string GetHash(string data) - { - using (var sha256 = CryptographyUtils.CreateSHA256()) - { - var hash = sha256.ComputeHash(Encoding.UTF8.GetBytes(data)); - return Convert.ToBase64String(hash); - } - } - } -} diff --git a/DNN Platform/Library/Services/ImprovementsProgram/IBeaconService.cs b/DNN Platform/Library/Services/ImprovementsProgram/IBeaconService.cs deleted file mode 100644 index eb57a469d51..00000000000 --- a/DNN Platform/Library/Services/ImprovementsProgram/IBeaconService.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information - -namespace DotNetNuke.Services.ImprovementsProgram -{ - using DotNetNuke.Entities.Users; - - public interface IBeaconService - { - string GetBeaconEndpoint(); - - string GetBeaconQuery(UserInfo user, string filePath = null); - - string GetBeaconUrl(UserInfo user, string filePath = null); - - bool IsBeaconEnabledForControlBar(UserInfo user); - - bool IsBeaconEnabledForPersonaBar(); - } -} diff --git a/DNN Platform/Library/Services/ImprovementsProgram/RolesEnum.cs b/DNN Platform/Library/Services/ImprovementsProgram/RolesEnum.cs deleted file mode 100644 index 57a2d995d13..00000000000 --- a/DNN Platform/Library/Services/ImprovementsProgram/RolesEnum.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information - -namespace DotNetNuke.Services.ImprovementsProgram -{ - using System; - - [Flags] - internal enum RolesEnum - { - None = 0, - Host = 1, - Admin = 2, - CommunityManager = 4, - ContentManager = 8, - ContentEditor = 16, - } -} diff --git a/DNN Platform/Library/Services/Installer/LegacyUtil.cs b/DNN Platform/Library/Services/Installer/LegacyUtil.cs index 6c486920bee..776b2c8cd40 100644 --- a/DNN Platform/Library/Services/Installer/LegacyUtil.cs +++ b/DNN Platform/Library/Services/Installer/LegacyUtil.cs @@ -146,6 +146,7 @@ public static void ParsePackageName(PackageInfo package) /// /// Process legacy language package (that is based on manifest xml file). /// + [Obsolete("Module package required, functionality removed. Will be removed in 10.0.0.")] public static void ProcessLegacyLanguages() { string filePath = Globals.ApplicationMapPath + Localization.SupportedLocalesFile.Substring(1).Replace("/", "\\"); @@ -266,12 +267,13 @@ public static void ProcessLegacyLanguages() } } } - } - + } + /// /// Process legacy module version 3 .dnn install file. /// /// + [Obsolete("Version 3 package formats not supported, must use modern package format. Will be removed in 10.0.0.")] public static void ProcessLegacyModule(DesktopModuleInfo desktopModule) { // Get the Module folder @@ -343,77 +345,6 @@ public static void ProcessLegacyModule(DesktopModuleInfo desktopModule) } } - public static void ProcessLegacyModules() - { - foreach (DesktopModuleInfo desktopModule in DesktopModuleController.GetDesktopModules(Null.NullInteger).Values) - { - if (desktopModule.PackageID == Null.NullInteger) - { - ProcessLegacyModule(desktopModule); - } - } - } - - /// - /// Process legacy skinobject version 3 .dnn install package. - /// - public static void ProcessLegacySkinControls() - { - foreach (SkinControlInfo skinControl in SkinControlController.GetSkinControls().Values) - { - if (skinControl.PackageID == Null.NullInteger) - { - try - { - // SkinControl is not affiliated with a Package - var package = new PackageInfo(new InstallerInfo()); - package.Name = skinControl.ControlKey; - - package.FriendlyName = skinControl.ControlKey; - package.Description = Null.NullString; - package.Version = new Version(1, 0, 0); - package.PackageType = "SkinObject"; - - // See if the SkinControl is using a "Namespace" for its name - ParsePackageName(package); - - var skinControlWriter = new SkinControlPackageWriter(skinControl, package); - package.Manifest = skinControlWriter.WriteManifest(true); - - // Save Package - PackageController.Instance.SaveExtensionPackage(package); - - // Update SkinControl with new PackageID - skinControl.PackageID = package.PackageID; - - // Save SkinControl - SkinControlController.SaveSkinControl(skinControl); - } - catch (Exception exc) - { - Logger.Error(exc); - } - } - } - } - - public static void ProcessLegacySkins() - { - // Process Legacy Skins - string skinRootPath = Path.Combine(Globals.HostMapPath, SkinController.RootSkin); - foreach (string skinFolder in Directory.GetDirectories(skinRootPath)) - { - ProcessLegacySkin(skinFolder, "Skin"); - } - - // Process Legacy Containers - skinRootPath = Path.Combine(Globals.HostMapPath, SkinController.RootContainer); - foreach (string skinFolder in Directory.GetDirectories(skinRootPath)) - { - ProcessLegacySkin(skinFolder, "Container"); - } - } - private static PackageInfo CreateSkinPackage(SkinPackageInfo skin) { // Create a Package @@ -452,51 +383,6 @@ private static void CreateSkinManifest(XmlWriter writer, string skinFolder, stri skinWriter.WriteManifest(writer, true); } - private static void ProcessLegacySkin(string skinFolder, string skinType) - { - string skinName = Path.GetFileName(skinFolder); - if (skinName != "_default") - { - var skin = new SkinPackageInfo(); - skin.SkinName = skinName; - skin.SkinType = skinType; - - // Create a Package - PackageInfo package = CreateSkinPackage(skin); - - // Create a SkinPackageWriter - var skinWriter = new SkinPackageWriter(skin, package); - skinWriter.GetFiles(false); - - // Save the manifest - package.Manifest = skinWriter.WriteManifest(true); - - // Save Package - PackageController.Instance.SaveExtensionPackage(package); - - // Update Skin Package with new PackageID - skin.PackageID = package.PackageID; - - // Save Skin Package - skin.SkinPackageID = SkinController.AddSkinPackage(skin); - - foreach (InstallFile skinFile in skinWriter.Files.Values) - { - if (skinFile.Type == InstallFileType.Ascx) - { - if (skinType == "Skin") - { - SkinController.AddSkin(skin.SkinPackageID, Path.Combine("[G]" + SkinController.RootSkin, Path.Combine(skin.SkinName, skinFile.FullName))); - } - else - { - SkinController.AddSkin(skin.SkinPackageID, Path.Combine("[G]" + SkinController.RootContainer, Path.Combine(skin.SkinName, skinFile.FullName))); - } - } - } - } - } - private static void ParsePackageName(PackageInfo package, string separator) { // See if the Module is using a "Namespace" for its name diff --git a/DNN Platform/Library/Services/Installer/Util.cs b/DNN Platform/Library/Services/Installer/Util.cs index 33911d7a028..609bb874d43 100644 --- a/DNN Platform/Library/Services/Installer/Util.cs +++ b/DNN Platform/Library/Services/Installer/Util.cs @@ -616,12 +616,6 @@ private static string ValidateNode(string propValue, bool isRequired, Logger log public static string CONFIG_Committed = GetLocalizedString("CONFIG_Committed"); public static string CONFIG_RolledBack = GetLocalizedString("CONFIG_RolledBack"); public static string CONFIG_Updated = GetLocalizedString("CONFIG_Updated"); - public static string DASHBOARD_ReadSuccess = GetLocalizedString("DASHBOARD_ReadSuccess"); - public static string DASHBOARD_SrcMissing = GetLocalizedString("DASHBOARD_SrcMissing"); - public static string DASHBOARD_Registered = GetLocalizedString("DASHBOARD_Registered"); - public static string DASHBOARD_KeyMissing = GetLocalizedString("DASHBOARD_KeyMissing"); - public static string DASHBOARD_LocalResourcesMissing = GetLocalizedString("DASHBOARD_LocalResourcesMissing"); - public static string DASHBOARD_UnRegistered = GetLocalizedString("DASHBOARD_UnRegistered"); public static string DNN_Reading = GetLocalizedString("DNN_Reading"); public static string DNN_ReadingComponent = GetLocalizedString("DNN_ReadingComponent"); public static string DNN_ReadingPackage = GetLocalizedString("DNN_ReadingPackage"); diff --git a/DNN Platform/Library/Services/Localization/Localization.cs b/DNN Platform/Library/Services/Localization/Localization.cs index 3d84f9efb22..2a589a05ba9 100644 --- a/DNN Platform/Library/Services/Localization/Localization.cs +++ b/DNN Platform/Library/Services/Localization/Localization.cs @@ -1,33 +1,28 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information namespace DotNetNuke.Services.Localization { using System; using System.Collections; using System.Collections.Generic; - using System.Collections.Specialized; using System.Globalization; - using System.IO; using System.Linq; using System.Reflection; - using System.Text.RegularExpressions; using System.Threading; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; - using System.Xml; + using DotNetNuke.Abstractions.Portals; using DotNetNuke.Common; using DotNetNuke.Common.Utilities; using DotNetNuke.Data; - using DotNetNuke.Entities.Host; using DotNetNuke.Entities.Portals; using DotNetNuke.Entities.Tabs; using DotNetNuke.Entities.Users; using DotNetNuke.Instrumentation; using DotNetNuke.Security.Roles; - using DotNetNuke.Services.Cache; using DotNetNuke.Services.Localization.Internal; using DotNetNuke.Services.Log.EventLog; using DotNetNuke.Services.Tokens; @@ -41,8 +36,8 @@ namespace DotNetNuke.Services.Localization /// good support for international users. Otherwise we are limiting our potential user base to /// that using English as their base language. /// - /// You can store the muti language content in resource files and use the api below to get localization content. - /// Resouces files named as: Control(Page)Name + Extension (.aspx/.ascx ) + Language + ".resx" + /// You can store the multi language content in resource files and use the api below to get localization content. + /// Resources files named as: Control(Page)Name + Extension (.aspx/.ascx ) + Language + ".resx" /// e.g: Installwizard.aspx.de-DE.resx. /// /// @@ -576,7 +571,26 @@ public static string GetLocaleName(string code, CultureDropDownTypes displayType /// /// Current PortalSettings. /// A valid CultureInfo. + [Obsolete("Deprecated in Platform 9.8.0. Scheduled removal in v11.0.0. Use overload taking IPortalSettings instead.")] public static CultureInfo GetPageLocale(PortalSettings portalSettings) + { + return GetPageLocale((IPortalSettings)portalSettings); + } + + /// + /// Detects the current language for the request. + /// The order in which the language is being detect is: + /// 1. QueryString + /// 2. Cookie + /// 3. User profile (if request is authenticated) + /// 4. Browser preference (if portal has this option enabled) + /// 5. Portal default + /// 6. System default (en-US) + /// At any point, if a valid language is detected nothing else should be done. + /// + /// Current PortalSettings. + /// A valid CultureInfo. + public static CultureInfo GetPageLocale(IPortalSettings portalSettings) { CultureInfo pageCulture = null; @@ -1555,26 +1569,11 @@ public static void SetLanguage(string value) } // save the page culture as a cookie - HttpCookie cookie = response.Cookies.Get("language"); - if (cookie == null) - { - if (!string.IsNullOrEmpty(value)) - { - cookie = new HttpCookie("language", value) { Path = !string.IsNullOrEmpty(Globals.ApplicationPath) ? Globals.ApplicationPath : "/" }; - response.Cookies.Add(cookie); - } - } - else + response.Cookies.Remove("language"); + if (!string.IsNullOrEmpty(value)) { - cookie.Value = value; - if (!string.IsNullOrEmpty(value)) - { - response.Cookies.Set(cookie); - } - else - { - response.Cookies.Remove("language"); - } + var cookie = new HttpCookie("language", value) { Path = !string.IsNullOrEmpty(Globals.ApplicationPath) ? Globals.ApplicationPath : "/" }; + response.Cookies.Add(cookie); } } catch @@ -1583,20 +1582,31 @@ public static void SetLanguage(string value) } } - /// - /// Sets the culture codes on the current Thread. - /// - /// Culture Info for the current page. - /// The current portalSettings. + /// Sets the culture codes on the current Thread. + /// Culture Info for the current page. + /// The current portal settings. /// - /// This method will configure the Thread culture codes. Any page which does not derive from PageBase should - /// be sure to call this method in OnInit to ensure localiztion works correctly. See the TelerikDialogHandler for an example. + /// This method will configure the Thread culture codes. Any page which does not derive from should + /// be sure to call this method in to ensure localization works correctly. See the for an example. /// + [Obsolete("Deprecated in Platform 9.8.0. Scheduled removal in v11.0.0. Use overload taking IPortalSettings instead.")] public static void SetThreadCultures(CultureInfo cultureInfo, PortalSettings portalSettings) + { + SetThreadCultures(cultureInfo, (IPortalSettings)portalSettings); + } + + /// Sets the culture codes on the current Thread. + /// Culture Info for the current page. + /// The current portal settings. + /// + /// This method will configure the Thread culture codes. Any page which does not derive from should + /// be sure to call this method in to ensure localization works correctly. See the for an example. + /// + public static void SetThreadCultures(CultureInfo cultureInfo, IPortalSettings portalSettings) { if (cultureInfo == null) { - throw new ArgumentNullException("cultureInfo"); + throw new ArgumentNullException(nameof(cultureInfo)); } if (cultureInfo.Name == "fa-IR") @@ -1895,7 +1905,7 @@ private static string GetValidLanguageURL(int portalId, string httpAlias, string /// /// Current PortalSettings. /// A valid CultureInfo if any is found. - private static CultureInfo GetCultureFromQs(PortalSettings portalSettings) + private static CultureInfo GetCultureFromQs(IPortalSettings portalSettings) { if (HttpContext.Current == null || HttpContext.Current.Request["language"] == null) { @@ -1912,7 +1922,7 @@ private static CultureInfo GetCultureFromQs(PortalSettings portalSettings) /// /// Current PortalSettings. /// A valid CultureInfo if any is found. - private static CultureInfo GetCultureFromCookie(PortalSettings portalSettings) + private static CultureInfo GetCultureFromCookie(IPortalSettings portalSettings) { CultureInfo culture; if (HttpContext.Current == null || HttpContext.Current.Request.Cookies["language"] == null) @@ -1930,7 +1940,7 @@ private static CultureInfo GetCultureFromCookie(PortalSettings portalSettings) /// /// Current PortalSettings. /// A valid CultureInfo if any is found. - private static CultureInfo GetCultureFromProfile(PortalSettings portalSettings) + private static CultureInfo GetCultureFromProfile(IPortalSettings portalSettings) { UserInfo objUserInfo = UserController.Instance.GetCurrentUserInfo(); @@ -1950,7 +1960,7 @@ private static CultureInfo GetCultureFromProfile(PortalSettings portalSettings) /// /// Current PortalSettings. /// A valid CultureInfo if any is found. - private static CultureInfo GetCultureFromBrowser(PortalSettings portalSettings) + private static CultureInfo GetCultureFromBrowser(IPortalSettings portalSettings) { if (!portalSettings.EnableBrowserLanguage) { @@ -1967,7 +1977,7 @@ private static CultureInfo GetCultureFromBrowser(PortalSettings portalSettings) /// /// Current PortalSettings. /// A valid CultureInfo if any is found. - private static CultureInfo GetCultureFromPortal(PortalSettings portalSettings) + private static CultureInfo GetCultureFromPortal(IPortalSettings portalSettings) { CultureInfo culture = null; if (!string.IsNullOrEmpty(portalSettings.DefaultLanguage)) @@ -2004,13 +2014,13 @@ private static IList GetPortalLocalizations(int portalID) /// /// When portal allows users to select their preferred UI language, this method - /// will return the user ui preferred language if defined. Otherwise defaults + /// will return the user UI preferred language if defined. Otherwise defaults /// to the current culture. /// /// Current culture. - /// PortalSettings for the current request. - /// - private static CultureInfo GetUserUICulture(CultureInfo currentCulture, PortalSettings portalSettings) + /// Portal settings for the current request. + /// A instance representing the user's UI culture. + private static CultureInfo GetUserUICulture(CultureInfo currentCulture, IPortalSettings portalSettings) { CultureInfo uiCulture = currentCulture; try diff --git a/DNN Platform/Library/Services/Log/EventLog/DBLoggingProvider.cs b/DNN Platform/Library/Services/Log/EventLog/DBLoggingProvider.cs index 356d84887e8..376282ea8b0 100644 --- a/DNN Platform/Library/Services/Log/EventLog/DBLoggingProvider.cs +++ b/DNN Platform/Library/Services/Log/EventLog/DBLoggingProvider.cs @@ -11,8 +11,8 @@ namespace DotNetNuke.Services.Log.EventLog using System.Threading; using System.Web; using System.Web.Caching; - using System.Xml; - + using System.Xml; + using DotNetNuke.Abstractions.Logging; using DotNetNuke.Common; using DotNetNuke.Common.Utilities; using DotNetNuke.Data; @@ -179,21 +179,8 @@ public override ArrayList GetLogTypeInfo() } public override object GetSingleLog(LogInfo logInfo, ReturnType returnType) - { - IDataReader dr = DataProvider.Instance().GetSingleLog(logInfo.LogGUID); - LogInfo log = null; - try - { - if (dr != null) - { - dr.Read(); - log = FillLogInfo(dr); - } - } - finally - { - CBO.CloseDataReader(dr, true); - } + { + var log = (LogInfo)GetLog(logInfo.LogGUID); if (returnType == ReturnType.LogInfoObjects) { @@ -207,6 +194,27 @@ public override object GetSingleLog(LogInfo logInfo, ReturnType returnType) } return xmlDoc.DocumentElement; + } + + /// + public override ILogInfo GetLog(string logGuid) + { + IDataReader dr = DataProvider.Instance().GetSingleLog(logGuid); + LogInfo log = null; + try + { + if (dr != null) + { + dr.Read(); + log = FillLogInfo(dr); + } + } + finally + { + CBO.CloseDataReader(dr, true); + } + + return log; } public override bool LoggingIsEnabled(string logType, int portalID) diff --git a/DNN Platform/Library/Services/Log/EventLog/EventLogController.cs b/DNN Platform/Library/Services/Log/EventLog/EventLogController.cs index c32db991915..c4e2d5a48e1 100644 --- a/DNN Platform/Library/Services/Log/EventLog/EventLogController.cs +++ b/DNN Platform/Library/Services/Log/EventLog/EventLogController.cs @@ -1,466 +1,288 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information -namespace DotNetNuke.Services.Log.EventLog -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.Globalization; - using System.Linq; +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace DotNetNuke.Services.Log.EventLog +{ + using System.Collections; + using System.Collections.Generic; + using System.Globalization; + using System.Linq; - using DotNetNuke.Abstractions.Portals; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Modules; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Entities.Tabs; - using DotNetNuke.Entities.Users; - using DotNetNuke.Framework; - using DotNetNuke.Security.Roles; + using DotNetNuke.Abstractions.Logging; + using DotNetNuke.Abstractions.Portals; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Modules; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Tabs; + using DotNetNuke.Entities.Users; + using DotNetNuke.Security.Roles; using DotNetNuke.Services.FileSystem; - public class EventLogController : ServiceLocator, IEventLogController - { - public enum EventLogType - { - USER_CREATED, - USER_DELETED, - LOGIN_SUPERUSER, - LOGIN_SUCCESS, - LOGIN_FAILURE, - LOGIN_USERLOCKEDOUT, - LOGIN_USERNOTAPPROVED, - CACHE_REFRESHED, - PASSWORD_SENT_SUCCESS, - PASSWORD_SENT_FAILURE, - LOG_NOTIFICATION_FAILURE, - PORTAL_CREATED, - PORTAL_DELETED, - PORTALGROUP_CREATED, - PORTALGROUP_DELETED, - PORTAL_ADDEDTOPORTALGROUP, - PORTAL_REMOVEDFROMPORTALGROUP, - TAB_CREATED, - TAB_UPDATED, - TAB_DELETED, - TAB_SENT_TO_RECYCLE_BIN, - TAB_RESTORED, - USER_ROLE_CREATED, - USER_ROLE_DELETED, - USER_ROLE_UPDATED, - ROLE_CREATED, - ROLE_UPDATED, - ROLE_DELETED, - MODULE_CREATED, - MODULE_UPDATED, - MODULE_DELETED, - MODULE_SENT_TO_RECYCLE_BIN, - MODULE_RESTORED, - SCHEDULER_EVENT_STARTED, - SCHEDULER_EVENT_PROGRESSING, - SCHEDULER_EVENT_COMPLETED, - APPLICATION_START, - APPLICATION_END, - APPLICATION_SHUTTING_DOWN, - SCHEDULER_STARTED, - SCHEDULER_SHUTTING_DOWN, - SCHEDULER_STOPPED, - ADMIN_ALERT, - HOST_ALERT, - CACHE_REMOVED, - CACHE_EXPIRED, - CACHE_UNDERUSED, - CACHE_DEPENDENCYCHANGED, - CACHE_OVERFLOW, - CACHE_REFRESH, - LISTENTRY_CREATED, - LISTENTRY_UPDATED, - LISTENTRY_DELETED, - DESKTOPMODULE_CREATED, - DESKTOPMODULE_UPDATED, - DESKTOPMODULE_DELETED, - SKINCONTROL_CREATED, - SKINCONTROL_UPDATED, - SKINCONTROL_DELETED, - PORTALALIAS_CREATED, - PORTALALIAS_UPDATED, - PORTALALIAS_DELETED, - PROFILEPROPERTY_CREATED, - PROFILEPROPERTY_UPDATED, - PROFILEPROPERTY_DELETED, - USER_UPDATED, - DESKTOPMODULEPERMISSION_CREATED, - DESKTOPMODULEPERMISSION_UPDATED, - DESKTOPMODULEPERMISSION_DELETED, - PERMISSION_CREATED, - PERMISSION_UPDATED, - PERMISSION_DELETED, - TABPERMISSION_CREATED, - TABPERMISSION_UPDATED, - TABPERMISSION_DELETED, - AUTHENTICATION_CREATED, - AUTHENTICATION_UPDATED, - AUTHENTICATION_DELETED, - FILE_ADDED, - FILE_CHANGED, - FILE_DELETED, - FILE_DOWNLOADED, - FILE_MOVED, - FILE_OVERWRITTEN, - FILE_RENAMED, - FILE_METADATACHANGED, - FOLDER_CREATED, - FOLDER_UPDATED, - FOLDER_DELETED, - PACKAGE_CREATED, - PACKAGE_UPDATED, - PACKAGE_DELETED, - LANGUAGEPACK_CREATED, - LANGUAGEPACK_UPDATED, - LANGUAGEPACK_DELETED, - LANGUAGE_CREATED, - LANGUAGE_UPDATED, - LANGUAGE_DELETED, - LIBRARY_UPDATED, - SKINPACKAGE_CREATED, - SKINPACKAGE_UPDATED, - SKINPACKAGE_DELETED, - SCHEDULE_CREATED, - SCHEDULE_UPDATED, - SCHEDULE_DELETED, - HOST_SETTING_CREATED, - HOST_SETTING_UPDATED, - HOST_SETTING_DELETED, - PORTALDESKTOPMODULE_CREATED, - PORTALDESKTOPMODULE_UPDATED, - PORTALDESKTOPMODULE_DELETED, - TABMODULE_CREATED, - TABMODULE_UPDATED, - TABMODULE_DELETED, - TABMODULE_SETTING_CREATED, - TABMODULE_SETTING_UPDATED, - TABMODULE_SETTING_DELETED, - MODULE_SETTING_CREATED, - MODULE_SETTING_UPDATED, - MODULE_SETTING_DELETED, - PORTAL_SETTING_CREATED, - PORTAL_SETTING_UPDATED, - PORTAL_SETTING_DELETED, - PORTALINFO_CREATED, - PORTALINFO_UPDATED, - PORTALINFO_DELETED, - AUTHENTICATION_USER_CREATED, - AUTHENTICATION_USER_UPDATED, - AUTHENTICATION_USER_DELETED, - LANGUAGETOPORTAL_CREATED, - LANGUAGETOPORTAL_UPDATED, - LANGUAGETOPORTAL_DELETED, - TAB_ORDER_UPDATED, - TAB_SETTING_CREATED, - TAB_SETTING_UPDATED, - TAB_SETTING_DELETED, - HOST_SQL_EXECUTED, - USER_RESTORED, - USER_REMOVED, - USER_IMPERSONATED, - USERNAME_UPDATED, - IP_LOGIN_BANNED, - PAGE_NOT_FOUND_404, - TABURL_CREATED, - TABURL_UPDATED, - TABURL_DELETED, - SCRIPT_COLLISION, - POTENTIAL_PAYPAL_PAYMENT_FRAUD, - WEBSERVER_CREATED, - WEBSERVER_UPDATED, - WEBSERVER_DISABLED, - WEBSERVER_ENABLED, - WEBSERVER_PINGFAILED, - FOLDER_MOVED, - } - - public static void AddSettingLog(EventLogType logTypeKey, string idFieldName, int idValue, string settingName, string settingValue, int userId) - { - var log = new LogInfo() { LogUserID = userId, LogTypeKey = logTypeKey.ToString() }; - log.LogProperties.Add(new LogDetailInfo(idFieldName, idValue.ToString())); - log.LogProperties.Add(new LogDetailInfo("SettingName", settingName)); - log.LogProperties.Add(new LogDetailInfo("SettingValue", settingValue)); - - LogController.Instance.AddLog(log); - } - - public void AddLog(string propertyName, string propertyValue, EventLogType logType) - { - this.AddLog(propertyName, propertyValue, PortalController.Instance.GetCurrentSettings(), UserController.Instance.GetCurrentUserInfo().UserID, logType); - } - - [Obsolete("Deprecated in DNN 9.7. It has been replaced by the overload taking IPortalSettings. Scheduled removal in v11.0.0.")] - public void AddLog(string propertyName, string propertyValue, PortalSettings portalSettings, int userID, EventLogType logType) - { - this.AddLog(propertyName, propertyValue, (IPortalSettings)portalSettings, userID, logType); - } - - public void AddLog(string propertyName, string propertyValue, IPortalSettings portalSettings, int userID, EventLogType logType) - { - this.AddLog(propertyName, propertyValue, portalSettings, userID, logType.ToString()); - } - - [Obsolete("Deprecated in DNN 9.7. It has been replaced by the overload taking IPortalSettings. Scheduled removal in v11.0.0.")] - public void AddLog(string propertyName, string propertyValue, PortalSettings portalSettings, int userID, string logType) - { - this.AddLog(propertyName, propertyValue, (IPortalSettings)portalSettings, userID, logType); - } - - public void AddLog(string propertyName, string propertyValue, IPortalSettings portalSettings, int userID, string logType) - { - var properties = new LogProperties(); - var logDetailInfo = new LogDetailInfo { PropertyName = propertyName, PropertyValue = propertyValue }; - properties.Add(logDetailInfo); - this.AddLog(properties, portalSettings, userID, logType, false); - } - - [Obsolete("Deprecated in DNN 9.7. It has been replaced by the overload taking IPortalSettings. Scheduled removal in v11.0.0.")] - public void AddLog(LogProperties properties, PortalSettings portalSettings, int userID, string logTypeKey, bool bypassBuffering) - { - this.AddLog(properties, (IPortalSettings)portalSettings, userID, logTypeKey, bypassBuffering); - } - - public void AddLog(LogProperties properties, IPortalSettings portalSettings, int userID, string logTypeKey, bool bypassBuffering) - { - // supports adding a custom string for LogType - var log = new LogInfo - { - LogUserID = userID, - LogTypeKey = logTypeKey, - LogProperties = properties, - BypassBuffering = bypassBuffering, - }; - if (portalSettings != null) - { - log.LogPortalID = portalSettings.PortalId; - log.LogPortalName = portalSettings.PortalName; - } - - LogController.Instance.AddLog(log); - } - - [Obsolete("Deprecated in DNN 9.7. It has been replaced by the overload taking IPortalSettings. Scheduled removal in v11.0.0.")] - public void AddLog(PortalSettings portalSettings, int userID, EventLogType logType) - { - this.AddLog((IPortalSettings)portalSettings, userID, logType); - } - - public void AddLog(IPortalSettings portalSettings, int userID, EventLogType logType) - { - this.AddLog(new LogProperties(), portalSettings, userID, logType.ToString(), false); - } - - [Obsolete("Deprecated in DNN 9.7. It has been replaced by the overload taking IPortalSettings. Scheduled removal in v11.0.0.")] - public void AddLog(object businessObject, PortalSettings portalSettings, int userID, string userName, EventLogType logType) - { - this.AddLog(businessObject, (IPortalSettings)portalSettings, userID, userName, logType); - } - - public void AddLog(object businessObject, IPortalSettings portalSettings, int userID, string userName, EventLogType logType) - { - this.AddLog(businessObject, portalSettings, userID, userName, logType.ToString()); - } - - [Obsolete("Deprecated in DNN 9.7. It has been replaced by the overload taking IPortalSettings. Scheduled removal in v11.0.0.")] - public void AddLog(object businessObject, PortalSettings portalSettings, int userID, string userName, string logType) - { - this.AddLog(businessObject, (IPortalSettings)portalSettings, userID, userName, logType); - } - - public void AddLog(object businessObject, IPortalSettings portalSettings, int userID, string userName, string logType) - { - var log = new LogInfo { LogUserID = userID, LogTypeKey = logType }; - if (portalSettings != null) - { - log.LogPortalID = portalSettings.PortalId; - log.LogPortalName = portalSettings.PortalName; - } - - if (businessObject is PortalInfo) - { - var portal = (PortalInfo)businessObject; - log.LogProperties.Add(new LogDetailInfo("PortalID", portal.PortalID.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("PortalName", portal.PortalName)); - log.LogProperties.Add(new LogDetailInfo("Description", portal.Description)); - log.LogProperties.Add(new LogDetailInfo("KeyWords", portal.KeyWords)); - log.LogProperties.Add(new LogDetailInfo("LogoFile", portal.LogoFile)); - } - else if (businessObject is TabInfo) - { - var tab = (TabInfo)businessObject; - log.LogProperties.Add(new LogDetailInfo("TabID", tab.TabID.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("PortalID", tab.PortalID.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("TabName", tab.TabName)); - log.LogProperties.Add(new LogDetailInfo("Title", tab.Title)); - log.LogProperties.Add(new LogDetailInfo("Description", tab.Description)); - log.LogProperties.Add(new LogDetailInfo("KeyWords", tab.KeyWords)); - log.LogProperties.Add(new LogDetailInfo("Url", tab.Url)); - log.LogProperties.Add(new LogDetailInfo("ParentId", tab.ParentId.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("IconFile", tab.IconFile)); - log.LogProperties.Add(new LogDetailInfo("IsVisible", tab.IsVisible.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("SkinSrc", tab.SkinSrc)); - log.LogProperties.Add(new LogDetailInfo("ContainerSrc", tab.ContainerSrc)); - } - else if (businessObject is ModuleInfo) - { - var module = (ModuleInfo)businessObject; - log.LogProperties.Add(new LogDetailInfo("ModuleId", module.ModuleID.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("ModuleTitle", module.ModuleTitle)); - log.LogProperties.Add(new LogDetailInfo("TabModuleID", module.TabModuleID.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("TabID", module.TabID.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("PortalID", module.PortalID.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("ModuleDefId", module.ModuleDefID.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("FriendlyName", module.DesktopModule.FriendlyName)); - log.LogProperties.Add(new LogDetailInfo("IconFile", module.IconFile)); - log.LogProperties.Add(new LogDetailInfo("Visibility", module.Visibility.ToString())); - log.LogProperties.Add(new LogDetailInfo("ContainerSrc", module.ContainerSrc)); - } - else if (businessObject is UserInfo) - { - var user = (UserInfo)businessObject; - log.LogProperties.Add(new LogDetailInfo("UserID", user.UserID.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("FirstName", user.Profile.FirstName)); - log.LogProperties.Add(new LogDetailInfo("LastName", user.Profile.LastName)); - log.LogProperties.Add(new LogDetailInfo("UserName", user.Username)); - log.LogProperties.Add(new LogDetailInfo("Email", user.Email)); - } - else if (businessObject is RoleInfo) - { - var role = (RoleInfo)businessObject; - log.LogProperties.Add(new LogDetailInfo("RoleID", role.RoleID.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("RoleName", role.RoleName)); - log.LogProperties.Add(new LogDetailInfo("PortalID", role.PortalID.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("Description", role.Description)); - log.LogProperties.Add(new LogDetailInfo("IsPublic", role.IsPublic.ToString(CultureInfo.InvariantCulture))); - } - else if (businessObject is DesktopModuleInfo) - { - var desktopModule = (DesktopModuleInfo)businessObject; - log.LogProperties.Add(new LogDetailInfo("DesktopModuleID", desktopModule.DesktopModuleID.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("ModuleName", desktopModule.ModuleName)); - log.LogProperties.Add(new LogDetailInfo("FriendlyName", desktopModule.FriendlyName)); - log.LogProperties.Add(new LogDetailInfo("FolderName", desktopModule.FolderName)); - log.LogProperties.Add(new LogDetailInfo("Description", desktopModule.Description)); - } - else if (businessObject is FolderInfo) - { - var folderInfo = (FolderInfo)businessObject; - log.LogProperties.Add(new LogDetailInfo("FolderID", folderInfo.FolderID.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("PortalID", folderInfo.PortalID.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("FolderName", folderInfo.FolderName)); - log.LogProperties.Add(new LogDetailInfo("FolderPath", folderInfo.FolderPath)); - log.LogProperties.Add(new LogDetailInfo("FolderMappingID", folderInfo.FolderMappingID.ToString(CultureInfo.InvariantCulture))); - } - else if (businessObject is FileInfo) - { - var fileInfo = (FileInfo)businessObject; - log.LogProperties.Add(new LogDetailInfo("FileID", fileInfo.FileId.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("PortalID", fileInfo.PortalId.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("FolderID", fileInfo.FolderId.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("FolderMappingID", fileInfo.FolderMappingID.ToString(CultureInfo.InvariantCulture))); - log.LogProperties.Add(new LogDetailInfo("ContentType", fileInfo.ContentType)); - log.LogProperties.Add(new LogDetailInfo("FileName", fileInfo.FileName)); - log.LogProperties.Add(new LogDetailInfo("FolderName", fileInfo.Folder)); - log.LogProperties.Add(new LogDetailInfo("PhysicalPath", fileInfo.PhysicalPath)); - log.LogProperties.Add(new LogDetailInfo("VersionGuid", fileInfo.VersionGuid.ToString())); - } - else - { - // Serialise using XmlSerializer - log.LogProperties.Add(new LogDetailInfo("logdetail", XmlUtils.Serialize(businessObject))); - } - - LogController.Instance.AddLog(log); - } - - public void AddLog(LogInfo logInfo) - { - LogController.Instance.AddLog(logInfo); - } - - public void AddLogType(string configFile, string fallbackConfigFile) - { - LogController.Instance.AddLogType(configFile, fallbackConfigFile); - } - - public void AddLogType(LogTypeInfo logType) - { - LogController.Instance.AddLogType(logType); - } - - public void AddLogTypeConfigInfo(LogTypeConfigInfo logTypeConfig) - { - LogController.Instance.AddLogTypeConfigInfo(logTypeConfig); - } - - public void ClearLog() - { - LogController.Instance.ClearLog(); - } - - public void DeleteLog(LogInfo logInfo) - { - LogController.Instance.DeleteLog(logInfo); - } - - public void DeleteLogType(LogTypeInfo logType) - { - LogController.Instance.DeleteLogType(logType); - } - - public void DeleteLogTypeConfigInfo(LogTypeConfigInfo logTypeConfig) - { - LogController.Instance.DeleteLogTypeConfigInfo(logTypeConfig); - } - - public List GetLogs(int portalID, string logType, int pageSize, int pageIndex, ref int totalRecords) - { - return LogController.Instance.GetLogs(portalID, logType, pageSize, pageIndex, ref totalRecords); - } - - public ArrayList GetLogTypeConfigInfo() - { - return LogController.Instance.GetLogTypeConfigInfo(); - } - - public LogTypeConfigInfo GetLogTypeConfigInfoByID(string id) - { - return LogController.Instance.GetLogTypeConfigInfoByID(id); - } - - public Dictionary GetLogTypeInfoDictionary() - { - return LogController.Instance.GetLogTypeInfoDictionary(); - } - - public object GetSingleLog(LogInfo log, LoggingProvider.ReturnType returnType) - { - return LogController.Instance.GetSingleLog(log, returnType); - } - - public void PurgeLogBuffer() - { - LogController.Instance.PurgeLogBuffer(); - } - - public virtual void UpdateLogTypeConfigInfo(LogTypeConfigInfo logTypeConfig) - { - LogController.Instance.UpdateLogTypeConfigInfo(logTypeConfig); - } - - public virtual void UpdateLogType(LogTypeInfo logType) - { - LogController.Instance.UpdateLogType(logType); - } - - protected override Func GetFactory() - { - return () => new EventLogController(); - } - } -} + /// + public partial class EventLogController : IEventLogger, IEventLogConfigService, IEventLogService + { + private IEventLogger EventLogger => this; + + private IEventLogConfigService EventLogConfigService => this; + + private IEventLogService EventLogService => this; + + /// + void IEventLogger.AddLog(string name, string value, Abstractions.Logging.EventLogType logType) + { + this.EventLogger.AddLog(name, value, PortalController.Instance.GetCurrentSettings(), UserController.Instance.GetCurrentUserInfo().UserID, logType); + } + + /// + void IEventLogger.AddLog(string name, string value, IPortalSettings portalSettings, int userID, Abstractions.Logging.EventLogType logType) + { + this.EventLogger.AddLog(name, value, portalSettings, userID, logType.ToString()); + } + + /// + void IEventLogger.AddLog(string name, string value, IPortalSettings portalSettings, int userID, string logType) + { + var properties = new LogProperties(); + var logDetailInfo = new LogDetailInfo { PropertyName = name, PropertyValue = value }; + properties.Add(logDetailInfo); + this.AddLog(properties, portalSettings, userID, logType, false); + } + + /// + void IEventLogger.AddLog(ILogProperties properties, IPortalSettings portalSettings, int userID, string logTypeKey, bool bypassBuffering) + { + // supports adding a custom string for LogType + var log = new LogInfo + { + LogUserID = userID, + LogTypeKey = logTypeKey, + LogProperties = (LogProperties)properties, + BypassBuffering = bypassBuffering, + }; + + if (portalSettings != null) + { + log.LogPortalID = portalSettings.PortalId; + log.LogPortalName = portalSettings.PortalName; + } + + LogController.Instance.AddLog(log); + } + + /// + void IEventLogger.AddLog(IPortalSettings portalSettings, int userID, Abstractions.Logging.EventLogType logType) + { + this.EventLogger.AddLog(new LogProperties(), portalSettings, userID, logType.ToString(), false); + } + + /// + void IEventLogger.AddLog(object businessObject, IPortalSettings portalSettings, int userID, string userName, Abstractions.Logging.EventLogType logType) + { + this.AddLog(businessObject, portalSettings, userID, userName, logType.ToString()); + } + + /// + void IEventLogger.AddLog(object businessObject, IPortalSettings portalSettings, int userID, string userName, string logType) + { + var log = new LogInfo { LogUserID = userID, LogTypeKey = logType }; + if (portalSettings != null) + { + log.LogPortalID = portalSettings.PortalId; + log.LogPortalName = portalSettings.PortalName; + } + + if (businessObject is PortalInfo) + { + var portal = (PortalInfo)businessObject; + log.LogProperties.Add(new LogDetailInfo("PortalID", portal.PortalID.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("PortalName", portal.PortalName)); + log.LogProperties.Add(new LogDetailInfo("Description", portal.Description)); + log.LogProperties.Add(new LogDetailInfo("KeyWords", portal.KeyWords)); + log.LogProperties.Add(new LogDetailInfo("LogoFile", portal.LogoFile)); + } + else if (businessObject is TabInfo) + { + var tab = (TabInfo)businessObject; + log.LogProperties.Add(new LogDetailInfo("TabID", tab.TabID.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("PortalID", tab.PortalID.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("TabName", tab.TabName)); + log.LogProperties.Add(new LogDetailInfo("Title", tab.Title)); + log.LogProperties.Add(new LogDetailInfo("Description", tab.Description)); + log.LogProperties.Add(new LogDetailInfo("KeyWords", tab.KeyWords)); + log.LogProperties.Add(new LogDetailInfo("Url", tab.Url)); + log.LogProperties.Add(new LogDetailInfo("ParentId", tab.ParentId.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("IconFile", tab.IconFile)); + log.LogProperties.Add(new LogDetailInfo("IsVisible", tab.IsVisible.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("SkinSrc", tab.SkinSrc)); + log.LogProperties.Add(new LogDetailInfo("ContainerSrc", tab.ContainerSrc)); + } + else if (businessObject is ModuleInfo) + { + var module = (ModuleInfo)businessObject; + log.LogProperties.Add(new LogDetailInfo("ModuleId", module.ModuleID.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("ModuleTitle", module.ModuleTitle)); + log.LogProperties.Add(new LogDetailInfo("TabModuleID", module.TabModuleID.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("TabID", module.TabID.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("PortalID", module.PortalID.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("ModuleDefId", module.ModuleDefID.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("FriendlyName", module.DesktopModule.FriendlyName)); + log.LogProperties.Add(new LogDetailInfo("IconFile", module.IconFile)); + log.LogProperties.Add(new LogDetailInfo("Visibility", module.Visibility.ToString())); + log.LogProperties.Add(new LogDetailInfo("ContainerSrc", module.ContainerSrc)); + } + else if (businessObject is UserInfo) + { + var user = (UserInfo)businessObject; + log.LogProperties.Add(new LogDetailInfo("UserID", user.UserID.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("FirstName", user.Profile.FirstName)); + log.LogProperties.Add(new LogDetailInfo("LastName", user.Profile.LastName)); + log.LogProperties.Add(new LogDetailInfo("UserName", user.Username)); + log.LogProperties.Add(new LogDetailInfo("Email", user.Email)); + } + else if (businessObject is RoleInfo) + { + var role = (RoleInfo)businessObject; + log.LogProperties.Add(new LogDetailInfo("RoleID", role.RoleID.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("RoleName", role.RoleName)); + log.LogProperties.Add(new LogDetailInfo("PortalID", role.PortalID.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("Description", role.Description)); + log.LogProperties.Add(new LogDetailInfo("IsPublic", role.IsPublic.ToString(CultureInfo.InvariantCulture))); + } + else if (businessObject is DesktopModuleInfo) + { + var desktopModule = (DesktopModuleInfo)businessObject; + log.LogProperties.Add(new LogDetailInfo("DesktopModuleID", desktopModule.DesktopModuleID.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("ModuleName", desktopModule.ModuleName)); + log.LogProperties.Add(new LogDetailInfo("FriendlyName", desktopModule.FriendlyName)); + log.LogProperties.Add(new LogDetailInfo("FolderName", desktopModule.FolderName)); + log.LogProperties.Add(new LogDetailInfo("Description", desktopModule.Description)); + } + else if (businessObject is FolderInfo) + { + var folderInfo = (FolderInfo)businessObject; + log.LogProperties.Add(new LogDetailInfo("FolderID", folderInfo.FolderID.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("PortalID", folderInfo.PortalID.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("FolderName", folderInfo.FolderName)); + log.LogProperties.Add(new LogDetailInfo("FolderPath", folderInfo.FolderPath)); + log.LogProperties.Add(new LogDetailInfo("FolderMappingID", folderInfo.FolderMappingID.ToString(CultureInfo.InvariantCulture))); + } + else if (businessObject is FileInfo) + { + var fileInfo = (FileInfo)businessObject; + log.LogProperties.Add(new LogDetailInfo("FileID", fileInfo.FileId.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("PortalID", fileInfo.PortalId.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("FolderID", fileInfo.FolderId.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("FolderMappingID", fileInfo.FolderMappingID.ToString(CultureInfo.InvariantCulture))); + log.LogProperties.Add(new LogDetailInfo("ContentType", fileInfo.ContentType)); + log.LogProperties.Add(new LogDetailInfo("FileName", fileInfo.FileName)); + log.LogProperties.Add(new LogDetailInfo("FolderName", fileInfo.Folder)); + log.LogProperties.Add(new LogDetailInfo("PhysicalPath", fileInfo.PhysicalPath)); + log.LogProperties.Add(new LogDetailInfo("VersionGuid", fileInfo.VersionGuid.ToString())); + } + else + { + // Serialise using XmlSerializer + log.LogProperties.Add(new LogDetailInfo("logdetail", XmlUtils.Serialize(businessObject))); + } + + LogController.Instance.AddLog(log); + } + + /// + void IEventLogger.AddLog(ILogInfo logInfo) + { + LogController.Instance.AddLog((LogInfo)logInfo); + } + + /// + void IEventLogConfigService.AddLogType(string configFile, string fallbackConfigFile) + { + LogController.Instance.AddLogType(configFile, fallbackConfigFile); + } + + /// + void IEventLogConfigService.AddLogType(ILogTypeInfo logType) + { + LogController.Instance.AddLogType((LogTypeInfo)logType); + } + + /// + void IEventLogConfigService.AddLogTypeConfigInfo(ILogTypeConfigInfo logTypeConfig) + { + LogController.Instance.AddLogTypeConfigInfo((LogTypeConfigInfo)logTypeConfig); + } + + /// + void IEventLogService.ClearLog() + { + LogController.Instance.ClearLog(); + } + + /// + void IEventLogService.DeleteLog(ILogInfo logInfo) + { + LogController.Instance.DeleteLog((LogInfo)logInfo); + } + + /// + void IEventLogConfigService.DeleteLogType(ILogTypeInfo logType) + { + LogController.Instance.DeleteLogType((LogTypeInfo)logType); + } + + /// + void IEventLogConfigService.DeleteLogTypeConfigInfo(ILogTypeConfigInfo logTypeConfig) + { + LogController.Instance.DeleteLogTypeConfigInfo((LogTypeConfigInfo)logTypeConfig); + } + + /// + IEnumerable IEventLogService.GetLogs(int portalID, string logType, int pageSize, int pageIndex, ref int totalRecords) + { + return LogController.Instance.GetLogs(portalID, logType, pageSize, pageIndex, ref totalRecords); + } + + /// + IEnumerable IEventLogConfigService.GetLogTypeConfigInfo() + { + return LogController.Instance.GetLogTypeConfigInfo().Cast(); + } + + /// + ILogTypeConfigInfo IEventLogConfigService.GetLogTypeConfigInfoByID(string id) + { + return LogController.Instance.GetLogTypeConfigInfoByID(id); + } + + /// + IDictionary IEventLogConfigService.GetLogTypeInfoDictionary() + { + return LogController.Instance.GetLogTypeInfoDictionary() + .ToDictionary(key => key.Key, value => (ILogTypeInfo)value.Value); + } + + /// + public ILogInfo GetLog(string logGuid) + { + return LogController.Instance.GetLog(logGuid); + } + + /// + void IEventLogService.PurgeLogBuffer() + { + LogController.Instance.PurgeLogBuffer(); + } + + /// + void IEventLogConfigService.UpdateLogTypeConfigInfo(ILogTypeConfigInfo logTypeConfig) + { + LogController.Instance.UpdateLogTypeConfigInfo((LogTypeConfigInfo)logTypeConfig); + } + + /// + void IEventLogConfigService.UpdateLogType(ILogTypeInfo logType) + { + LogController.Instance.UpdateLogType((LogTypeInfo)logType); + } + } +} diff --git a/DNN Platform/Library/Services/Log/EventLog/EventLogExtensions.cs b/DNN Platform/Library/Services/Log/EventLog/EventLogExtensions.cs new file mode 100644 index 00000000000..ab37d19e93d --- /dev/null +++ b/DNN Platform/Library/Services/Log/EventLog/EventLogExtensions.cs @@ -0,0 +1,32 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace DotNetNuke.Services.Log.EventLog +{ + using System; + + using DotNetNuke.Abstractions.Logging; + + /// Extensions methods for types related to the Event Log. + public static class EventLogExtensions + { + /// Add setting log. + /// The instance. + /// The log type. + /// The ID field name, e.g. "ModuleId" or "TabId". + /// The ID value. + /// The setting name. + /// The setting value. + /// The ID of the user taking the action. + public static void AddSettingLog(this IEventLogger logger, EventLogType logTypeKey, string idFieldName, int idValue, string settingName, string settingValue, int userId) + { + ILogInfo log = new LogInfo { LogTypeKey = logTypeKey.ToString(), }; + log.LogUserId = userId; + log.LogProperties.Add(new LogDetailInfo(idFieldName, idValue.ToString())); + log.LogProperties.Add(new LogDetailInfo("SettingName", settingName)); + log.LogProperties.Add(new LogDetailInfo("SettingValue", settingValue)); + + logger.AddLog(log); + } + } +} diff --git a/DNN Platform/Library/Services/Log/EventLog/ILogController.cs b/DNN Platform/Library/Services/Log/EventLog/ILogController.cs index bd1cef58e02..9ea85c94584 100644 --- a/DNN Platform/Library/Services/Log/EventLog/ILogController.cs +++ b/DNN Platform/Library/Services/Log/EventLog/ILogController.cs @@ -3,7 +3,8 @@ // See the LICENSE file in the project root for more information namespace DotNetNuke.Services.Log.EventLog -{ +{ + using DotNetNuke.Abstractions.Logging; using System.Collections; using System.Collections.Generic; @@ -33,7 +34,14 @@ public interface ILogController Dictionary GetLogTypeInfoDictionary(); - object GetSingleLog(LogInfo log, LoggingProvider.ReturnType returnType); + object GetSingleLog(LogInfo log, LoggingProvider.ReturnType returnType); + + /// + /// Retrieves a single event log via the Log Guid. + /// + /// A string reprenstation of the log Guid. + /// The . + ILogInfo GetLog(string logGuid); void PurgeLogBuffer(); diff --git a/DNN Platform/Library/Services/Log/EventLog/LogController.cs b/DNN Platform/Library/Services/Log/EventLog/LogController.cs index b27ab5ac671..c8346de8682 100644 --- a/DNN Platform/Library/Services/Log/EventLog/LogController.cs +++ b/DNN Platform/Library/Services/Log/EventLog/LogController.cs @@ -12,8 +12,9 @@ namespace DotNetNuke.Services.Log.EventLog using System.Text; using System.Threading; using System.Web; - using System.Xml; + using System.Xml; + using DotNetNuke.Abstractions.Logging; using DotNetNuke.Common; using DotNetNuke.Common.Utilities; using DotNetNuke.Entities.Portals; @@ -45,14 +46,21 @@ public void AddLog(LogInfo logInfo) } if (string.IsNullOrEmpty(logInfo.LogUserName)) - { - if (HttpContext.Current != null) - { - if (HttpContext.Current.Request.IsAuthenticated) - { - logInfo.LogUserName = UserController.Instance.GetCurrentUserInfo().Username; - } - } + { + if (HttpContext.Current != null) + { + try + { + if (HttpContext.Current.Request.IsAuthenticated) + { + logInfo.LogUserName = UserController.Instance.GetCurrentUserInfo().Username; + } + } + catch (HttpException exception) + { + Logger.Error("Unable to retrieve HttpContext.Request, ignoring LogUserName", exception); + } + } } // Get portal name if name isn't set @@ -240,6 +248,12 @@ public virtual Dictionary GetLogTypeInfoDictionary() public virtual object GetSingleLog(LogInfo log, LoggingProvider.ReturnType returnType) { return LoggingProvider.Instance().GetSingleLog(log, returnType); + } + + /// + public virtual ILogInfo GetLog(string logGuid) + { + return LoggingProvider.Instance().GetLog(logGuid); } public void PurgeLogBuffer() diff --git a/DNN Platform/Library/Services/Log/EventLog/LogDetailInfo.cs b/DNN Platform/Library/Services/Log/EventLog/LogDetailInfo.cs index fe6484133da..39582d32143 100644 --- a/DNN Platform/Library/Services/Log/EventLog/LogDetailInfo.cs +++ b/DNN Platform/Library/Services/Log/EventLog/LogDetailInfo.cs @@ -2,17 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information namespace DotNetNuke.Services.Log.EventLog -{ +{ using System; using System.Text; using System.Xml; + using DotNetNuke.Abstractions.Logging; + + /// [Serializable] - public class LogDetailInfo + public class LogDetailInfo : ILogDetailInfo { - private string _PropertyName; - private string _PropertyValue; - public LogDetailInfo() : this(string.Empty, string.Empty) { @@ -20,36 +20,15 @@ public LogDetailInfo() public LogDetailInfo(string name, string value) { - this._PropertyName = name; - this._PropertyValue = value; + this.PropertyName = name; + this.PropertyValue = value; } - - public string PropertyName - { - get - { - return this._PropertyName; - } - - set - { - this._PropertyName = value; - } - } - - public string PropertyValue - { - get - { - return this._PropertyValue; - } - - set - { - this._PropertyValue = value; - } - } - + + /// + public string PropertyName { get; set; } + + /// + public string PropertyValue { get; set; } public void ReadXml(XmlReader reader) { reader.ReadStartElement("PropertyName"); diff --git a/DNN Platform/Library/Services/Log/EventLog/LogInfo.cs b/DNN Platform/Library/Services/Log/EventLog/LogInfo.cs index 9e2c46bf16a..d73e4ccc0b8 100644 --- a/DNN Platform/Library/Services/Log/EventLog/LogInfo.cs +++ b/DNN Platform/Library/Services/Log/EventLog/LogInfo.cs @@ -6,22 +6,24 @@ namespace DotNetNuke.Services.Log.EventLog using System; using System.IO; using System.Text; - using System.Xml; + using System.Xml; + using DotNetNuke.Abstractions.Logging; using DotNetNuke.Services.Exceptions; + /// [Serializable] - public class LogInfo + public partial class LogInfo : ILogInfo { public LogInfo() { - this.LogGUID = Guid.NewGuid().ToString(); + ((ILogInfo)this).LogGuid = Guid.NewGuid().ToString(); this.BypassBuffering = false; - this.LogProperties = new LogProperties(); - this.LogPortalID = -1; + ((ILogInfo)this).LogProperties = new LogProperties(); + ((ILogInfo)this).LogPortalId = -1; this.LogPortalName = string.Empty; - this.LogUserID = -1; - this.LogEventID = -1; + ((ILogInfo)this).LogUserId = -1; + ((ILogInfo)this).LogEventId = -1; this.LogUserName = string.Empty; this.Exception = new ExceptionInfo(); } @@ -30,37 +32,64 @@ public LogInfo(string content) : this() { this.Deserialize(content); - } - - public string LogGUID { get; set; } - - public string LogFileID { get; set; } - + } + + /// + string ILogInfo.LogGuid { get; set; } + + /// + string ILogInfo.LogFileId { get; set; } + + /// public string LogTypeKey { get; set; } - - public int LogUserID { get; set; } - - public int LogEventID { get; set; } - + + /// + int ILogInfo.LogUserId { get; set; } + + /// + int ILogInfo.LogEventId { get; set; } + + /// public string LogUserName { get; set; } - - public int LogPortalID { get; set; } - + + /// + int ILogInfo.LogPortalId { get; set; } + + /// public string LogPortalName { get; set; } - + + /// public DateTime LogCreateDate { get; set; } - + + /// public long LogCreateDateNum { get; set; } - public LogProperties LogProperties { get; set; } - + public LogProperties LogProperties + { + get => (LogProperties)((ILogInfo)this).LogProperties; + set => ((ILogInfo)this).LogProperties = value; + } + + /// + ILogProperties ILogInfo.LogProperties { get; set; } + + /// public bool BypassBuffering { get; set; } - + + /// public string LogServerName { get; set; } - - public string LogConfigID { get; set; } - - public ExceptionInfo Exception { get; set; } + + /// + string ILogInfo.LogConfigId { get; set; } + + public ExceptionInfo Exception + { + get => (ExceptionInfo)((ILogInfo)this).Exception; + set => ((ILogInfo)this).Exception = value; + } + + /// + IExceptionInfo ILogInfo.Exception { get; set; } public static bool IsSystemType(string PropName) { @@ -82,7 +111,8 @@ public static bool IsSystemType(string PropName) return false; } - + + /// public void AddProperty(string PropertyName, string PropertyValue) { try @@ -135,25 +165,25 @@ public void ReadXml(XmlReader reader) switch (reader.Name) { case "LogGUID": - this.LogGUID = reader.ReadContentAsString(); + ((ILogInfo)this).LogGuid = reader.ReadContentAsString(); break; case "LogFileID": - this.LogFileID = reader.ReadContentAsString(); + ((ILogInfo)this).LogFileId = reader.ReadContentAsString(); break; case "LogTypeKey": this.LogTypeKey = reader.ReadContentAsString(); break; case "LogUserID": - this.LogUserID = reader.ReadContentAsInt(); + ((ILogInfo)this).LogUserId = reader.ReadContentAsInt(); break; case "LogEventID": - this.LogEventID = reader.ReadContentAsInt(); + ((ILogInfo)this).LogEventId = reader.ReadContentAsInt(); break; case "LogUserName": this.LogUserName = reader.ReadContentAsString(); break; case "LogPortalID": - this.LogPortalID = reader.ReadContentAsInt(); + ((ILogInfo)this).LogPortalId = reader.ReadContentAsInt(); break; case "LogPortalName": this.LogPortalName = reader.ReadContentAsString(); @@ -171,7 +201,7 @@ public void ReadXml(XmlReader reader) this.LogServerName = reader.ReadContentAsString(); break; case "LogConfigID": - this.LogConfigID = reader.ReadContentAsString(); + ((ILogInfo)this).LogConfigId = reader.ReadContentAsString(); break; } } @@ -212,12 +242,12 @@ public string Serialize() public override string ToString() { var str = new StringBuilder(); - str.Append("

    LogGUID:" + this.LogGUID + "

    "); + str.Append("

    LogGUID:" + ((ILogInfo)this).LogGuid + "

    "); str.Append("

    LogType:" + this.LogTypeKey + "

    "); - str.Append("

    UserID:" + this.LogUserID + "

    "); - str.Append("

    EventID:" + this.LogEventID + "

    "); + str.Append("

    UserID:" + ((ILogInfo)this).LogUserId + "

    "); + str.Append("

    EventID:" + ((ILogInfo)this).LogEventId + "

    "); str.Append("

    Username:" + this.LogUserName + "

    "); - str.Append("

    PortalID:" + this.LogPortalID + "

    "); + str.Append("

    PortalID:" + ((ILogInfo)this).LogPortalId + "

    "); str.Append("

    PortalName:" + this.LogPortalName + "

    "); str.Append("

    CreateDate:" + this.LogCreateDate + "

    "); str.Append("

    ServerName:" + this.LogServerName + "

    "); @@ -233,19 +263,19 @@ public override string ToString() public void WriteXml(XmlWriter writer) { writer.WriteStartElement("log"); - writer.WriteAttributeString("LogGUID", this.LogGUID); - writer.WriteAttributeString("LogFileID", this.LogFileID); + writer.WriteAttributeString("LogGUID", ((ILogInfo)this).LogGuid); + writer.WriteAttributeString("LogFileID", ((ILogInfo)this).LogFileId); writer.WriteAttributeString("LogTypeKey", this.LogTypeKey); - writer.WriteAttributeString("LogUserID", this.LogUserID.ToString()); - writer.WriteAttributeString("LogEventID", this.LogEventID.ToString()); + writer.WriteAttributeString("LogUserID", ((ILogInfo)this).LogUserId.ToString()); + writer.WriteAttributeString("LogEventID", ((ILogInfo)this).LogEventId.ToString()); writer.WriteAttributeString("LogUserName", this.LogUserName); - writer.WriteAttributeString("LogPortalID", this.LogPortalID.ToString()); + writer.WriteAttributeString("LogPortalID", ((ILogInfo)this).LogPortalId.ToString()); writer.WriteAttributeString("LogPortalName", this.LogPortalName); writer.WriteAttributeString("LogCreateDate", this.LogCreateDate.ToString()); writer.WriteAttributeString("LogCreateDateNum", this.LogCreateDateNum.ToString()); writer.WriteAttributeString("BypassBuffering", this.BypassBuffering.ToString()); writer.WriteAttributeString("LogServerName", this.LogServerName); - writer.WriteAttributeString("LogConfigID", this.LogConfigID); + writer.WriteAttributeString("LogConfigID", ((ILogInfo)this).LogConfigId); this.LogProperties.WriteXml(writer); if (!string.IsNullOrEmpty(this.Exception.ExceptionHash)) { diff --git a/DNN Platform/Library/Services/Log/EventLog/LogProperties.cs b/DNN Platform/Library/Services/Log/EventLog/LogProperties.cs index 7db17c1854e..b1959e05293 100644 --- a/DNN Platform/Library/Services/Log/EventLog/LogProperties.cs +++ b/DNN Platform/Library/Services/Log/EventLog/LogProperties.cs @@ -2,17 +2,21 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information namespace DotNetNuke.Services.Log.EventLog -{ - using System; - using System.Collections; - using System.IO; +{ + using System.Collections; + using System.Collections.Generic; + using System.IO; + using System.Linq; using System.Text; - using System.Xml; + using System.Xml; + using DotNetNuke.Abstractions.Logging; using DotNetNuke.Common.Utilities; - public class LogProperties : ArrayList - { + /// + public class LogProperties : ArrayList, ILogProperties + { + /// public string Summary { get @@ -25,8 +29,37 @@ public string Summary return summary; } - } - + } + + /// + public void Add(ILogDetailInfo item) => + base.Add(item); + + /// + public bool Contains(ILogDetailInfo item) => + base.Contains(item); + + /// + public void CopyTo(ILogDetailInfo[] array, int arrayIndex) => + base.CopyTo(array, arrayIndex); + + /// + IEnumerator IEnumerable.GetEnumerator() => + this.ToArray().Cast().GetEnumerator(); + + /// + public bool Remove(ILogDetailInfo item) + { + var index = this.IndexOf(item); + if (index >= 0) + { + this.RemoveAt(index); + return true; + } + + return false; + } + public void Deserialize(string content) { using (XmlReader reader = XmlReader.Create(new StringReader(content))) @@ -40,7 +73,7 @@ public void Deserialize(string content) reader.Close(); } } - + public void ReadXml(XmlReader reader) { do @@ -57,8 +90,8 @@ public void ReadXml(XmlReader reader) this.Add(logDetail); } while (reader.ReadToNextSibling("LogProperty")); - } - + } + public string Serialize() { var settings = new XmlWriterSettings(); @@ -93,6 +126,6 @@ public void WriteXml(XmlWriter writer) } writer.WriteEndElement(); - } + } } } diff --git a/DNN Platform/Library/Services/Log/EventLog/LogTypeConfigInfo.cs b/DNN Platform/Library/Services/Log/EventLog/LogTypeConfigInfo.cs index af37b2ee2d6..f68f217a892 100644 --- a/DNN Platform/Library/Services/Log/EventLog/LogTypeConfigInfo.cs +++ b/DNN Platform/Library/Services/Log/EventLog/LogTypeConfigInfo.cs @@ -3,13 +3,15 @@ // See the LICENSE file in the project root for more information namespace DotNetNuke.Services.Log.EventLog { - using System; + using System; + using DotNetNuke.Abstractions.Logging; using DotNetNuke.Common; using DotNetNuke.Common.Utilities; + /// [Serializable] - public class LogTypeConfigInfo : LogTypeInfo + public partial class LogTypeConfigInfo : LogTypeInfo, ILogTypeConfigInfo { private string _mailFromAddress; @@ -21,7 +23,8 @@ public enum NotificationThresholdTimeTypes Hours = 3, Days = 4, } - + + /// public DateTime StartDateTime { get @@ -29,21 +32,23 @@ public DateTime StartDateTime switch (this.NotificationThresholdTimeType) { case NotificationThresholdTimeTypes.Seconds: - return DateTime.Now.AddSeconds(this.NotificationThresholdTime * -1); + return DateTime.Now.AddSeconds((int)((ILogTypeConfigInfo)this).NotificationThresholdTimeType * -1); case NotificationThresholdTimeTypes.Minutes: - return DateTime.Now.AddMinutes(this.NotificationThresholdTime * -1); + return DateTime.Now.AddMinutes((int)((ILogTypeConfigInfo)this).NotificationThresholdTimeType * -1); case NotificationThresholdTimeTypes.Hours: - return DateTime.Now.AddHours(this.NotificationThresholdTime * -1); + return DateTime.Now.AddHours((int)((ILogTypeConfigInfo)this).NotificationThresholdTimeType * -1); case NotificationThresholdTimeTypes.Days: - return DateTime.Now.AddDays(this.NotificationThresholdTime * -1); + return DateTime.Now.AddDays((int)((ILogTypeConfigInfo)this).NotificationThresholdTimeType * -1); default: return Null.NullDate; } } } - + + /// public bool EmailNotificationIsActive { get; set; } - + + /// public string MailFromAddress { get @@ -57,25 +62,41 @@ public string MailFromAddress set { this._mailFromAddress = value; } } - + + /// public string MailToAddress { get; set; } - + + /// public int NotificationThreshold { get; set; } - + + /// public int NotificationThresholdTime { get; set; } - public NotificationThresholdTimeTypes NotificationThresholdTimeType { get; set; } - - public string ID { get; set; } - + public NotificationThresholdTimeTypes NotificationThresholdTimeType + { + get => (NotificationThresholdTimeTypes)((ILogTypeConfigInfo)this).NotificationThresholdTimeType; + set => ((ILogTypeConfigInfo)this).NotificationThresholdTimeType = (Abstractions.Logging.NotificationThresholdTimeType)value; + } + + /// + NotificationThresholdTimeType ILogTypeConfigInfo.NotificationThresholdTimeType { get; set; } + + /// + string ILogTypeConfigInfo.Id { get; set; } + + /// public bool LoggingIsActive { get; set; } - + + /// public string LogFileName { get; set; } - + + /// public string LogFileNameWithPath { get; set; } - - public string LogTypePortalID { get; set; } - + + /// + string ILogTypeConfigInfo.LogTypePortalId { get; set; } + + /// public string KeepMostRecent { get; set; } } } diff --git a/DNN Platform/Library/Services/Log/EventLog/LogTypeInfo.cs b/DNN Platform/Library/Services/Log/EventLog/LogTypeInfo.cs index 5fb1102ab07..becb079ede1 100644 --- a/DNN Platform/Library/Services/Log/EventLog/LogTypeInfo.cs +++ b/DNN Platform/Library/Services/Log/EventLog/LogTypeInfo.cs @@ -2,20 +2,28 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information namespace DotNetNuke.Services.Log.EventLog -{ +{ using System; + using DotNetNuke.Abstractions.Logging; + + /// [Serializable] - public class LogTypeInfo - { - public string LogTypeCSSClass { get; set; } - + public partial class LogTypeInfo : ILogTypeInfo + { + /// + string ILogTypeInfo.LogTypeCssClass { get; set; } + + /// public string LogTypeDescription { get; set; } - + + /// public string LogTypeFriendlyName { get; set; } - + + /// public string LogTypeKey { get; set; } - + + /// public string LogTypeOwner { get; set; } } } diff --git a/DNN Platform/Library/Services/Log/EventLog/LoggingProvider.cs b/DNN Platform/Library/Services/Log/EventLog/LoggingProvider.cs index 8c09e3846cb..4223f8820bf 100644 --- a/DNN Platform/Library/Services/Log/EventLog/LoggingProvider.cs +++ b/DNN Platform/Library/Services/Log/EventLog/LoggingProvider.cs @@ -7,16 +7,17 @@ namespace DotNetNuke.Services.Log.EventLog using System.Collections; using System.Collections.Generic; using System.ComponentModel; - using System.Linq; - + using System.Linq; + using DotNetNuke.Abstractions.Logging; using DotNetNuke.ComponentModel; public abstract class LoggingProvider - { + { + [Obsolete("Deprecated in 9.8.0. Not suitable replacement, use Dependency Injection to resolve 'DotNetNuke.Abstractions.Logging.IEventLogService.GetLog()' instead. Scheduled for removal in v11.0.0.")] public enum ReturnType { - LogInfoObjects, - XML, + LogInfoObjects = 0, + XML = 1, } // return the provider @@ -50,7 +51,14 @@ public virtual List GetLogs(int portalID, string logType, int pageSize, public abstract LogTypeConfigInfo GetLogTypeConfigInfoByID(string id); - public abstract object GetSingleLog(LogInfo logInfo, ReturnType returnType); + public abstract object GetSingleLog(LogInfo logInfo, ReturnType returnType); + + /// + /// Retrieves a single event log via the Log Guid. + /// + /// A string reprenstation of the log Guid. + /// The . + public abstract ILogInfo GetLog(string logGuid); public abstract bool LoggingIsEnabled(string logType, int portalID); diff --git a/DNN Platform/Library/Services/Mail/CoreMailProvider.cs b/DNN Platform/Library/Services/Mail/CoreMailProvider.cs new file mode 100644 index 00000000000..15345b67a33 --- /dev/null +++ b/DNN Platform/Library/Services/Mail/CoreMailProvider.cs @@ -0,0 +1,201 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace DotNetNuke.Services.Mail +{ + using System; + using System.IO; + using System.Linq; + using System.Net; + using System.Net.Mail; + using System.Text.RegularExpressions; + + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Host; + using DotNetNuke.Entities.Portals; + + using Localize = DotNetNuke.Services.Localization.Localization; + + /// A implementation using the original core DNN logic (via ). + public class CoreMailProvider : MailProvider + { + private static readonly Regex SmtpServerRegex = new Regex("^[^:]+(:[0-9]{1,5})?$", RegexOptions.Compiled); + + /// + public override string SendMail(MailInfo mailInfo, SmtpInfo smtpInfo = null) + { + // validate smtp server + if (smtpInfo == null || string.IsNullOrEmpty(smtpInfo.Server)) + { + if (string.IsNullOrWhiteSpace(Host.SMTPServer)) + { + return "SMTP Server not configured"; + } + + smtpInfo = new SmtpInfo() + { + Server = Host.SMTPServer, + Authentication = Host.SMTPAuthentication, + Username = Host.SMTPUsername, + Password = Host.SMTPPassword, + EnableSSL = Host.EnableSMTPSSL, + }; + } + + // translate semi-colon delimiters to commas as ASP.NET 2.0 does not support semi-colons + if (!string.IsNullOrEmpty(mailInfo.To)) + { + mailInfo.To = mailInfo.To.Replace(";", ","); + } + + if (!string.IsNullOrEmpty(mailInfo.CC)) + { + mailInfo.CC = mailInfo.CC.Replace(";", ","); + } + + if (!string.IsNullOrEmpty(mailInfo.BCC)) + { + mailInfo.BCC = mailInfo.BCC.Replace(";", ","); + } + + var retValue = string.Empty; + + var mailMessage = new MailMessage(mailInfo.From, mailInfo.To); + + if (!string.IsNullOrEmpty(mailInfo.Sender)) + { + mailMessage.Sender = new MailAddress(mailInfo.Sender); + } + + mailMessage.Priority = (System.Net.Mail.MailPriority)mailInfo.Priority; + mailMessage.IsBodyHtml = mailInfo.BodyFormat == MailFormat.Html; + + // Only modify senderAddress if smtpAuthentication is enabled + // Can be "0", empty or Null - anonymous, "1" - basic, "2" - NTLM. + if (smtpInfo.Authentication == "1" || smtpInfo.Authentication == "2") + { + // if the senderAddress is the email address of the Host then switch it smtpUsername if different + // if display name of senderAddress is empty, then use Host.HostTitle for it + if (mailMessage.Sender != null) + { + var senderAddress = mailInfo.Sender; + var senderDisplayName = mailInfo.FromName; + var needUpdateSender = false; + if (smtpInfo.Username.Contains("@") && senderAddress == Host.HostEmail && + !senderAddress.Equals(smtpInfo.Username, StringComparison.InvariantCultureIgnoreCase)) + { + senderAddress = smtpInfo.Username; + needUpdateSender = true; + } + + if (string.IsNullOrEmpty(senderDisplayName)) + { + senderDisplayName = Host.SMTPPortalEnabled ? PortalSettings.Current.PortalName : Host.HostTitle; + needUpdateSender = true; + } + + if (needUpdateSender) + { + mailMessage.Sender = new MailAddress(senderAddress, senderDisplayName); + } + } + else if (smtpInfo.Username.Contains("@")) + { + mailMessage.Sender = new MailAddress(smtpInfo.Username, Host.SMTPPortalEnabled ? PortalSettings.Current.PortalName : Host.HostTitle); + } + } + + // attachments + if (mailInfo.Attachments != null) + { + foreach (var attachment in mailInfo.Attachments.Where(attachment => attachment.Content != null)) + { + mailMessage.Attachments.Add( + new Attachment( + new MemoryStream(attachment.Content, writable: false), + attachment.Filename, + attachment.ContentType)); + } + } + + // message + mailMessage.Subject = HtmlUtils.StripWhiteSpace(mailInfo.Subject, true); + mailMessage.Body = mailInfo.Body; + smtpInfo.Server = smtpInfo.Server.Trim(); + if (SmtpServerRegex.IsMatch(smtpInfo.Server)) + { + try + { + // to workaround problem in 4.0 need to specify host name + using (var smtpClient = new SmtpClient()) + { + var smtpHostParts = smtpInfo.Server.Split(':'); + smtpClient.Host = smtpHostParts[0]; + if (smtpHostParts.Length > 1) + { + // port is guaranteed to be of max 5 digits numeric by the RegEx check + var port = int.Parse(smtpHostParts[1]); + if (port < 1 || port > 65535) + { + return Localize.GetString("SmtpInvalidPort"); + } + + smtpClient.Port = port; + } + + switch (smtpInfo.Authentication) + { + case "": + case "0": // anonymous + break; + case "1": // basic + if (!string.IsNullOrEmpty(smtpInfo.Username) + && !string.IsNullOrEmpty(smtpInfo.Password)) + { + smtpClient.UseDefaultCredentials = false; + smtpClient.Credentials = new NetworkCredential( + smtpInfo.Username, + smtpInfo.Password); + } + + break; + case "2": // NTLM + smtpClient.UseDefaultCredentials = true; + break; + } + + smtpClient.EnableSsl = smtpInfo.EnableSSL; + smtpClient.Send(mailMessage); + smtpClient.Dispose(); + } + } + catch (Exception exc) + { + retValue = Localize.GetString("SMTPConfigurationProblem") + " "; + + // mail configuration problem + if (exc.InnerException != null) + { + retValue += string.Concat(exc.Message, Environment.NewLine, exc.InnerException.Message); + Exceptions.Exceptions.LogException(exc.InnerException); + } + else + { + retValue += exc.Message; + Exceptions.Exceptions.LogException(exc); + } + } + finally + { + mailMessage.Dispose(); + } + } + else + { + retValue = Localize.GetString("SMTPConfigurationProblem"); + } + + return retValue; + } + } +} diff --git a/DNN Platform/Library/Services/Mail/Mail.cs b/DNN Platform/Library/Services/Mail/Mail.cs index 32d741274b0..33a5fd0cf2e 100644 --- a/DNN Platform/Library/Services/Mail/Mail.cs +++ b/DNN Platform/Library/Services/Mail/Mail.cs @@ -1,625 +1,528 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Services.Mail -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Mail; - using System.Text; - using System.Text.RegularExpressions; - using System.Web; - - using DotNetNuke.Common; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Host; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Entities.Users; - using DotNetNuke.Services.Tokens; +namespace DotNetNuke.Services.Mail +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Net.Mail; + using System.Text; + using System.Text.RegularExpressions; + using System.Web; + + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Host; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Users; + using DotNetNuke.Services.Tokens; using Localize = DotNetNuke.Services.Localization.Localization; - public class Mail - { - private static readonly Regex SmtpServerRegex = new Regex("^[^:]+(:[0-9]{1,5})?$", RegexOptions.Compiled); - - public static string ConvertToText(string sHTML) - { - var formattedHtml = HtmlUtils.FormatText(sHTML, true); - var styleLessHtml = HtmlUtils.RemoveInlineStyle(formattedHtml); - return HtmlUtils.StripTags(styleLessHtml, true); - } - - public static bool IsValidEmailAddress(string Email, int portalid) - { - string pattern = Null.NullString; - - // During install Wizard we may not have a valid PortalID - if (portalid != Null.NullInteger) - { - pattern = Convert.ToString(UserController.GetUserSettings(portalid)["Security_EmailValidation"]); - } - - pattern = string.IsNullOrEmpty(pattern) ? Globals.glbEmailRegEx : pattern; - return Regex.Match(Email, pattern).Success; - } - - public static void SendEmail(string fromAddress, string toAddress, string subject, string body) - { - SendEmail(fromAddress, fromAddress, toAddress, subject, body); - } - - public static void SendEmail(string fromAddress, string senderAddress, string toAddress, string subject, string body) - { - if (string.IsNullOrWhiteSpace(Host.SMTPServer) || string.IsNullOrEmpty(fromAddress) || string.IsNullOrEmpty(senderAddress) || string.IsNullOrEmpty(toAddress)) - { - return; - } - - using (var emailMessage = new MailMessage(fromAddress, toAddress) { Sender = new MailAddress(senderAddress) }) - { - SendMailInternal(emailMessage, subject, body, MailPriority.Normal, - HtmlUtils.IsHtml(body) ? MailFormat.Html : MailFormat.Text, - Encoding.UTF8, new List(), - Host.SMTPServer, Host.SMTPAuthentication, Host.SMTPUsername, - Host.SMTPPassword, Host.EnableSMTPSSL); - } - } - - public static string SendEmail(string fromAddress, string senderAddress, string toAddress, string subject, string body, List attachments) - { - if (string.IsNullOrWhiteSpace(Host.SMTPServer)) - { - return "SMTP Server not configured"; - } - - using (var emailMessage = new MailMessage(fromAddress, toAddress) { Sender = new MailAddress(senderAddress) }) - { - return SendMailInternal(emailMessage, subject, body, MailPriority.Normal, - HtmlUtils.IsHtml(body) ? MailFormat.Html : MailFormat.Text, - Encoding.UTF8, attachments, - Host.SMTPServer, Host.SMTPAuthentication, Host.SMTPUsername, - Host.SMTPPassword, Host.EnableSMTPSSL); - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Send an email notification - /// - /// The user to whom the message is being sent. - /// The type of message being sent. - /// Portal Settings. - /// - /// - /// ----------------------------------------------------------------------------- - public static string SendMail(UserInfo user, MessageType msgType, PortalSettings settings) - { - return SendMail(user.PortalID, user.UserID, msgType, settings); - } - - /// ----------------------------------------------------------------------------- - /// - /// Send an email notification - /// - /// The PortalId of the user to whom the message is being sent. - /// The UserId of the user to whom the message is being sent. - /// The type of message being sent. - /// Portal Settings. - /// - /// - /// ----------------------------------------------------------------------------- - public static string SendMail(int portalId, int userId, MessageType msgType, PortalSettings settings) - { - // Send Notification to User - var user = UserController.Instance.GetUserById(portalId, userId); - int toUser = user.UserID; - string locale = user.Profile.PreferredLocale; - string subject; - string body; - ArrayList custom = null; - switch (msgType) - { - case MessageType.UserRegistrationAdmin: - subject = "EMAIL_USER_REGISTRATION_ADMINISTRATOR_SUBJECT"; - body = "EMAIL_USER_REGISTRATION_ADMINISTRATOR_BODY"; - toUser = settings.AdministratorId; - UserInfo admin = UserController.GetUserById(settings.PortalId, settings.AdministratorId); - locale = admin.Profile.PreferredLocale; - break; - case MessageType.UserRegistrationPrivate: - subject = "EMAIL_USER_REGISTRATION_PRIVATE_SUBJECT"; - body = "EMAIL_USER_REGISTRATION_PRIVATE_BODY"; - break; - case MessageType.UserRegistrationPrivateNoApprovalRequired: - subject = "EMAIL_USER_REGISTRATION_PUBLIC_SUBJECT"; - body = "EMAIL_USER_REGISTRATION_PUBLIC_BODY"; - break; - case MessageType.UserRegistrationPublic: - subject = "EMAIL_USER_REGISTRATION_PUBLIC_SUBJECT"; - body = "EMAIL_USER_REGISTRATION_PUBLIC_BODY"; - break; - case MessageType.UserRegistrationVerified: - subject = "EMAIL_USER_REGISTRATION_VERIFIED_SUBJECT"; - body = "EMAIL_USER_REGISTRATION_VERIFIED_BODY"; - var propertyNotFound = false; - if (HttpContext.Current != null) - { - custom = new ArrayList - { - HttpContext.Current.Server.HtmlEncode(HttpContext.Current.Server.UrlEncode(user.Username)), - HttpContext.Current.Server.UrlEncode(user.GetProperty("verificationcode", string.Empty, null, - user, Scope.SystemMessages, ref propertyNotFound)), - }; - } - - break; - case MessageType.PasswordReminder: - subject = "EMAIL_PASSWORD_REMINDER_SUBJECT"; - body = "EMAIL_PASSWORD_REMINDER_BODY"; - break; - case MessageType.ProfileUpdated: - subject = "EMAIL_PROFILE_UPDATED_SUBJECT"; - body = "EMAIL_PROFILE_UPDATED_BODY"; - break; - case MessageType.PasswordUpdated: - subject = "EMAIL_PASSWORD_UPDATED_SUBJECT"; - body = "EMAIL_PASSWORD_UPDATED_BODY"; - break; - case MessageType.PasswordReminderUserIsNotApproved: - subject = "EMAIL_PASSWORD_REMINDER_USER_ISNOT_APPROVED_SUBJECT"; - body = "EMAIL_PASSWORD_REMINDER_USER_ISNOT_APPROVED_BODY"; - break; - case MessageType.UserAuthorized: - subject = "EMAIL_USER_AUTHORIZED_SUBJECT"; - body = "EMAIL_USER_AUTHORIZED_BODY"; - break; - case MessageType.UserUnAuthorized: - subject = "EMAIL_USER_UNAUTHORIZED_SUBJECT"; - body = "EMAIL_USER_UNAUTHORIZED_BODY"; - break; - default: - subject = "EMAIL_USER_UPDATED_OWN_PASSWORD_SUBJECT"; - body = "EMAIL_USER_UPDATED_OWN_PASSWORD_BODY"; - break; - } - - subject = Localize.GetSystemMessage(locale, settings, subject, user, Localize.GlobalResourceFile, custom, string.Empty, settings.AdministratorId); - body = Localize.GetSystemMessage(locale, settings, body, user, Localize.GlobalResourceFile, custom, string.Empty, settings.AdministratorId); - - var fromUser = (UserController.GetUserByEmail(settings.PortalId, settings.Email) != null) ? - string.Format("{0} < {1} >", UserController.GetUserByEmail(settings.PortalId, settings.Email).DisplayName, settings.Email) : settings.Email; - SendEmail(fromUser, UserController.GetUserById(settings.PortalId, toUser).Email, subject, body); - - return Null.NullString; - } - - /// ----------------------------------------------------------------------------- - /// - /// Send a simple email. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// ----------------------------------------------------------------------------- - public static string SendMail(string mailFrom, string mailTo, string bcc, string subject, string body, string attachment, string bodyType, string smtpServer, string smtpAuthentication, - string smtpUsername, string smtpPassword) - { - MailFormat bodyFormat = MailFormat.Text; - if (!string.IsNullOrEmpty(bodyType)) - { - switch (bodyType.ToLowerInvariant()) - { - case "html": - bodyFormat = MailFormat.Html; - break; - case "text": - bodyFormat = MailFormat.Text; - break; - } - } - - return SendMail(mailFrom, mailTo, string.Empty, bcc, MailPriority.Normal, subject, bodyFormat, Encoding.UTF8, body, attachment, smtpServer, smtpAuthentication, smtpUsername, smtpPassword); - } - - /// ----------------------------------------------------------------------------- - /// Send a simple email. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// ----------------------------------------------------------------------------- - public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, string body, - string attachment, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword) - { - return SendMail(mailFrom, mailTo, cc, bcc, priority, subject, bodyFormat, bodyEncoding, body, attachment, smtpServer, smtpAuthentication, smtpUsername, smtpPassword, Host.EnableSMTPSSL); - } - - public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, string body, - string attachment, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL) - { - return SendMail( - mailFrom, - mailTo, - cc, - bcc, - mailFrom, - priority, - subject, - bodyFormat, - bodyEncoding, - body, - attachment.Split('|'), - smtpServer, - smtpAuthentication, - smtpUsername, - smtpPassword, - smtpEnableSSL); - } - - public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, string body, - string[] attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL) - { - return SendMail( - mailFrom, - mailTo, - cc, - bcc, - mailFrom, - priority, - subject, - bodyFormat, - bodyEncoding, - body, - attachments, - smtpServer, - smtpAuthentication, - smtpUsername, - smtpPassword, - smtpEnableSSL); - } - - /// - /// Sends an email based on params. - /// - /// Email sender. - /// Recipients, can be more then one separated by semi-colons. - /// CC-recipients, can be more then one separated by semi-colons. - /// BCC-recipients, can be more then one separated by semi-colons. - /// Reply-to email to be displayed for recipients. - /// . - /// Subject of email. - /// . - /// Email Encoding from System.Text.Encoding. - /// Body of email. - /// List of filenames to attach to email. - /// IP or ServerName of the SMTP server. When empty or null, then it takes from the HostSettings. - /// SMTP authentication method. Can be "0" - anonymous, "1" - basic, "2" - NTLM. When empty or null, then it takes from the HostSettings. - /// SMTP authentication UserName. When empty or null, then it takes from the HostSettings. - /// SMTP authentication Password. When empty or null, then it takes from the HostSettings. - /// Enable or disable SSL. - /// Returns an empty string on success mail sending. Otherwise returns an error description. - /// SendMail( "admin@email.com", - /// "user@email.com", - /// "user1@email.com;user2@email.com", - /// "user3@email.com", - /// "no-reply@email.com", - /// MailPriority.Low, - /// "This is test email", - /// MailFormat.Text, - /// Encoding.UTF8, - /// "Test body. Test body. Test body.", - /// new string[] {"d:\documents\doc1.doc","d:\documents\doc2.doc"}, - /// "mail.email.com", - /// "1", - /// "admin@email.com", - /// "AdminPassword", - /// false). - /// - public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, string replyTo, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, - string body, string[] attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL) - { - var attachmentList = (from attachment in attachments - where !string.IsNullOrEmpty(attachment) - select new Attachment(attachment)) - .ToList(); - - return SendMail( - mailFrom, - mailTo, - cc, - bcc, - replyTo, - priority, - subject, - bodyFormat, - bodyEncoding, - body, - attachmentList, - smtpServer, - smtpAuthentication, - smtpUsername, - smtpPassword, - smtpEnableSSL); - } - - public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, string replyTo, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, - string body, List attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL) - { - return SendMail( - mailFrom, - string.Empty, - mailTo, - cc, - bcc, - replyTo, - priority, - subject, - bodyFormat, - bodyEncoding, - body, - attachments, - smtpServer, - smtpAuthentication, - smtpUsername, - smtpPassword, - smtpEnableSSL); - } - - public static string SendMail(string mailFrom, string mailSender, string mailTo, string cc, string bcc, string replyTo, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, - string body, List attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL) - { - // SMTP server configuration - if (string.IsNullOrWhiteSpace(smtpServer) && !string.IsNullOrWhiteSpace(Host.SMTPServer)) - { - smtpServer = Host.SMTPServer; - } - - if (string.IsNullOrEmpty(smtpAuthentication) && !string.IsNullOrEmpty(Host.SMTPAuthentication)) - { - smtpAuthentication = Host.SMTPAuthentication; - } - - if (string.IsNullOrEmpty(smtpUsername) && !string.IsNullOrEmpty(Host.SMTPUsername)) - { - smtpUsername = Host.SMTPUsername; - } - - if (string.IsNullOrEmpty(smtpPassword) && !string.IsNullOrEmpty(Host.SMTPPassword)) - { - smtpPassword = Host.SMTPPassword; - } - - MailMessage mailMessage = null; - if (PortalSettings.Current != null) - { - mailMessage = (UserController.GetUserByEmail(PortalSettings.Current.PortalId, mailFrom) != null) - ? new MailMessage - { - From = - new MailAddress( - mailFrom, - UserController.GetUserByEmail(PortalSettings.Current.PortalId, mailFrom).DisplayName), - } - : new MailMessage { From = new MailAddress(mailFrom) }; - } - else - { - mailMessage = new MailMessage { From = new MailAddress(mailFrom) }; - } - - if (!string.IsNullOrEmpty(mailSender)) - { - mailMessage.Sender = new MailAddress(mailSender); - } - - if (!string.IsNullOrEmpty(mailTo)) - { - // translate semi-colon delimiters to commas as ASP.NET 2.0 does not support semi-colons - mailTo = mailTo.Replace(";", ","); - mailMessage.To.Add(mailTo); - } - - if (!string.IsNullOrEmpty(cc)) - { - // translate semi-colon delimiters to commas as ASP.NET 2.0 does not support semi-colons - cc = cc.Replace(";", ","); - mailMessage.CC.Add(cc); - } - - if (!string.IsNullOrEmpty(bcc)) - { - // translate semi-colon delimiters to commas as ASP.NET 2.0 does not support semi-colons - bcc = bcc.Replace(";", ","); - mailMessage.Bcc.Add(bcc); - } - - if (replyTo != string.Empty) - { - mailMessage.ReplyToList.Add(new MailAddress(replyTo)); - } - - using (mailMessage) - { - return SendMailInternal(mailMessage, subject, body, priority, bodyFormat, bodyEncoding, - attachments, smtpServer, smtpAuthentication, smtpUsername, smtpPassword, smtpEnableSSL); - } - } - - private static string SendMailInternal(MailMessage mailMessage, string subject, string body, MailPriority priority, - MailFormat bodyFormat, Encoding bodyEncoding, IEnumerable attachments, - string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL) - { - string retValue = string.Empty; - - mailMessage.Priority = (System.Net.Mail.MailPriority)priority; - mailMessage.IsBodyHtml = bodyFormat == MailFormat.Html; - - // Only modify senderAdress if smtpAuthentication is enabled - // Can be "0", empty or Null - anonymous, "1" - basic, "2" - NTLM. - if (smtpAuthentication == "1" || smtpAuthentication == "2") - { - // if the senderAddress is the email address of the Host then switch it smtpUsername if different - // if display name of senderAddress is empty, then use Host.HostTitle for it - if (mailMessage.Sender != null) - { - var senderAddress = mailMessage.Sender.Address; - var senderDisplayName = mailMessage.Sender.DisplayName; - var needUpdateSender = false; - if (smtpUsername.Contains("@") && senderAddress == Host.HostEmail && - !senderAddress.Equals(smtpUsername, StringComparison.InvariantCultureIgnoreCase)) - { - senderAddress = smtpUsername; - needUpdateSender = true; - } - - if (string.IsNullOrEmpty(senderDisplayName)) - { - senderDisplayName = Host.SMTPPortalEnabled ? PortalSettings.Current.PortalName : Host.HostTitle; - needUpdateSender = true; - } - - if (needUpdateSender) - { - mailMessage.Sender = new MailAddress(senderAddress, senderDisplayName); - } - } - else if (smtpUsername.Contains("@")) - { - mailMessage.Sender = new MailAddress(smtpUsername, Host.SMTPPortalEnabled ? PortalSettings.Current.PortalName : Host.HostTitle); - } - } - - // attachments - foreach (var attachment in attachments) - { - mailMessage.Attachments.Add(attachment); - } - - // message - mailMessage.SubjectEncoding = bodyEncoding; - mailMessage.Subject = HtmlUtils.StripWhiteSpace(subject, true); - mailMessage.BodyEncoding = bodyEncoding; - - // added support for multipart html messages - // add text part as alternate view - var PlainView = AlternateView.CreateAlternateViewFromString(ConvertToText(body), null, "text/plain"); - mailMessage.AlternateViews.Add(PlainView); - if (mailMessage.IsBodyHtml) - { - var HTMLView = AlternateView.CreateAlternateViewFromString(body, null, "text/html"); - mailMessage.AlternateViews.Add(HTMLView); - } - - smtpServer = smtpServer.Trim(); - if (SmtpServerRegex.IsMatch(smtpServer)) - { - try - { - // to workaround problem in 4.0 need to specify host name - using (var smtpClient = new SmtpClient()) - { - var smtpHostParts = smtpServer.Split(':'); - smtpClient.Host = smtpHostParts[0]; - if (smtpHostParts.Length > 1) - { - // port is guaranteed to be of max 5 digits numeric by the RegEx check - var port = Convert.ToInt32(smtpHostParts[1]); - if (port < 1 || port > 65535) - { - return Localize.GetString("SmtpInvalidPort"); - } - - smtpClient.Port = port; - } - - // else the port defaults to 25 by .NET when not set - smtpClient.ServicePoint.MaxIdleTime = Host.SMTPMaxIdleTime; - smtpClient.ServicePoint.ConnectionLimit = Host.SMTPConnectionLimit; - - switch (smtpAuthentication) - { - case "": - case "0": // anonymous - break; - case "1": // basic - if (!string.IsNullOrEmpty(smtpUsername) && !string.IsNullOrEmpty(smtpPassword)) - { - smtpClient.UseDefaultCredentials = false; - smtpClient.Credentials = new NetworkCredential(smtpUsername, smtpPassword); - } - - break; - case "2": // NTLM - smtpClient.UseDefaultCredentials = true; - break; - } - - smtpClient.EnableSsl = smtpEnableSSL; - smtpClient.Send(mailMessage); - smtpClient.Dispose(); - } - } - catch (Exception exc) - { - var exc2 = exc as SmtpFailedRecipientException; - if (exc2 != null) - { - retValue = string.Format(Localize.GetString("FailedRecipient"), exc2.FailedRecipient) + " "; - } - else if (exc is SmtpException) - { - retValue = Localize.GetString("SMTPConfigurationProblem") + " "; - } - - // mail configuration problem - if (exc.InnerException != null) - { - retValue += string.Concat(exc.Message, Environment.NewLine, exc.InnerException.Message); - Exceptions.Exceptions.LogException(exc.InnerException); - } - else - { - retValue += exc.Message; - Exceptions.Exceptions.LogException(exc); - } - } - finally - { - mailMessage.Dispose(); - } - } - else - { - retValue = Localize.GetString("SMTPConfigurationProblem"); - } - - return retValue; - } - } -} + public class Mail + { + public static bool IsValidEmailAddress(string Email, int portalid) + { + string pattern = Null.NullString; + + // During install Wizard we may not have a valid PortalID + if (portalid != Null.NullInteger) + { + pattern = Convert.ToString(UserController.GetUserSettings(portalid)["Security_EmailValidation"]); + } + + pattern = string.IsNullOrEmpty(pattern) ? Globals.glbEmailRegEx : pattern; + return Regex.Match(Email, pattern).Success; + } + + public static void SendEmail(string fromAddress, string toAddress, string subject, string body) + { + SendEmail(fromAddress, fromAddress, toAddress, subject, body); + } + + public static void SendEmail(string fromAddress, string senderAddress, string toAddress, string subject, string body) + { + if (string.IsNullOrWhiteSpace(Host.SMTPServer) || string.IsNullOrEmpty(fromAddress) || string.IsNullOrEmpty(senderAddress) || string.IsNullOrEmpty(toAddress)) + { + return; + } + + var mailInfo = new MailInfo + { + From = fromAddress, + Sender = senderAddress, + To = toAddress, + Subject = subject, + Body = body, + Priority = MailPriority.Normal, + BodyFormat = HtmlUtils.IsHtml(body) ? MailFormat.Html : MailFormat.Text, + BodyEncoding = Encoding.UTF8, + }; + + MailProvider.Instance().SendMail(mailInfo); + } + + [Obsolete("This method has been deprecated. Please use SendEmail() with ICollection Scheduled removal in v11.0.0.")] + public static string SendEmail(string fromAddress, string senderAddress, string toAddress, string subject, string body, List attachments) + { + var mailInfo = new MailInfo + { + From = fromAddress, + Sender = senderAddress, + To = toAddress, + Subject = subject, + Body = body, + Priority = MailPriority.Normal, + BodyFormat = HtmlUtils.IsHtml(body) ? MailFormat.Html : MailFormat.Text, + BodyEncoding = Encoding.UTF8, + Attachments = ConvertAttachments(attachments), + }; + + return MailProvider.Instance().SendMail(mailInfo); + } + + public static string SendEmail(string fromAddress, string senderAddress, string toAddress, string subject, string body, ICollection attachments) + { + var mailInfo = new MailInfo + { + From = fromAddress, + Sender = senderAddress, + To = toAddress, + Subject = subject, + Body = body, + Priority = MailPriority.Normal, + BodyFormat = HtmlUtils.IsHtml(body) ? MailFormat.Html : MailFormat.Text, + BodyEncoding = Encoding.UTF8, + Attachments = attachments, + }; + + return MailProvider.Instance().SendMail(mailInfo); + } + + /// ----------------------------------------------------------------------------- + /// + /// Send an email notification + /// + /// The user to whom the message is being sent. + /// The type of message being sent. + /// Portal Settings. + /// + /// + /// ----------------------------------------------------------------------------- + public static string SendMail(UserInfo user, MessageType msgType, PortalSettings settings) + { + return SendMail(user.PortalID, user.UserID, msgType, settings); + } + + /// ----------------------------------------------------------------------------- + /// + /// Send an email notification + /// + /// The PortalId of the user to whom the message is being sent. + /// The UserId of the user to whom the message is being sent. + /// The type of message being sent. + /// Portal Settings. + /// + /// + /// ----------------------------------------------------------------------------- + public static string SendMail(int portalId, int userId, MessageType msgType, PortalSettings settings) + { + // Send Notification to User + var user = UserController.Instance.GetUserById(portalId, userId); + int toUser = user.UserID; + string locale = user.Profile.PreferredLocale; + string subject; + string body; + ArrayList custom = null; + switch (msgType) + { + case MessageType.UserRegistrationAdmin: + subject = "EMAIL_USER_REGISTRATION_ADMINISTRATOR_SUBJECT"; + body = "EMAIL_USER_REGISTRATION_ADMINISTRATOR_BODY"; + toUser = settings.AdministratorId; + UserInfo admin = UserController.GetUserById(settings.PortalId, settings.AdministratorId); + locale = admin.Profile.PreferredLocale; + break; + case MessageType.UserRegistrationPrivate: + subject = "EMAIL_USER_REGISTRATION_PRIVATE_SUBJECT"; + body = "EMAIL_USER_REGISTRATION_PRIVATE_BODY"; + break; + case MessageType.UserRegistrationPrivateNoApprovalRequired: + subject = "EMAIL_USER_REGISTRATION_PUBLIC_SUBJECT"; + body = "EMAIL_USER_REGISTRATION_PUBLIC_BODY"; + break; + case MessageType.UserRegistrationPublic: + subject = "EMAIL_USER_REGISTRATION_PUBLIC_SUBJECT"; + body = "EMAIL_USER_REGISTRATION_PUBLIC_BODY"; + break; + case MessageType.UserRegistrationVerified: + subject = "EMAIL_USER_REGISTRATION_VERIFIED_SUBJECT"; + body = "EMAIL_USER_REGISTRATION_VERIFIED_BODY"; + var propertyNotFound = false; + if (HttpContext.Current != null) + { + custom = new ArrayList + { + HttpContext.Current.Server.HtmlEncode( + HttpContext.Current.Server.UrlEncode(user.Username)), + HttpContext.Current.Server.UrlEncode( + user.GetProperty( + "verificationcode", + string.Empty, + null, + user, + Scope.SystemMessages, + ref propertyNotFound)), + }; + } + + break; + case MessageType.PasswordReminder: + subject = "EMAIL_PASSWORD_REMINDER_SUBJECT"; + body = "EMAIL_PASSWORD_REMINDER_BODY"; + break; + case MessageType.ProfileUpdated: + subject = "EMAIL_PROFILE_UPDATED_SUBJECT"; + body = "EMAIL_PROFILE_UPDATED_BODY"; + break; + case MessageType.PasswordUpdated: + subject = "EMAIL_PASSWORD_UPDATED_SUBJECT"; + body = "EMAIL_PASSWORD_UPDATED_BODY"; + break; + case MessageType.PasswordReminderUserIsNotApproved: + subject = "EMAIL_PASSWORD_REMINDER_USER_ISNOT_APPROVED_SUBJECT"; + body = "EMAIL_PASSWORD_REMINDER_USER_ISNOT_APPROVED_BODY"; + break; + case MessageType.UserAuthorized: + subject = "EMAIL_USER_AUTHORIZED_SUBJECT"; + body = "EMAIL_USER_AUTHORIZED_BODY"; + break; + case MessageType.UserUnAuthorized: + subject = "EMAIL_USER_UNAUTHORIZED_SUBJECT"; + body = "EMAIL_USER_UNAUTHORIZED_BODY"; + break; + default: + subject = "EMAIL_USER_UPDATED_OWN_PASSWORD_SUBJECT"; + body = "EMAIL_USER_UPDATED_OWN_PASSWORD_BODY"; + break; + } + + subject = Localize.GetSystemMessage(locale, settings, subject, user, Localize.GlobalResourceFile, custom, string.Empty, settings.AdministratorId); + body = Localize.GetSystemMessage(locale, settings, body, user, Localize.GlobalResourceFile, custom, string.Empty, settings.AdministratorId); + + var fromUser = (UserController.GetUserByEmail(settings.PortalId, settings.Email) != null) ? + string.Format("{0} < {1} >", UserController.GetUserByEmail(settings.PortalId, settings.Email).DisplayName, settings.Email) : settings.Email; + SendEmail(fromUser, UserController.GetUserById(settings.PortalId, toUser).Email, subject, body); + + return Null.NullString; + } + + /// ----------------------------------------------------------------------------- + /// + /// Send a simple email. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// ----------------------------------------------------------------------------- + public static string SendMail(string mailFrom, string mailTo, string bcc, string subject, string body, string attachment, string bodyType, string smtpServer, string smtpAuthentication, + string smtpUsername, string smtpPassword) + { + MailFormat bodyFormat = MailFormat.Text; + if (!string.IsNullOrEmpty(bodyType)) + { + switch (bodyType.ToLowerInvariant()) + { + case "html": + bodyFormat = MailFormat.Html; + break; + case "text": + bodyFormat = MailFormat.Text; + break; + } + } + + return SendMail(mailFrom, mailTo, string.Empty, bcc, MailPriority.Normal, subject, bodyFormat, Encoding.UTF8, body, attachment, smtpServer, smtpAuthentication, smtpUsername, smtpPassword); + } + + /// ----------------------------------------------------------------------------- + /// Send a simple email. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// ----------------------------------------------------------------------------- + public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, string body, + string attachment, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword) + { + return SendMail(mailFrom, mailTo, cc, bcc, priority, subject, bodyFormat, bodyEncoding, body, attachment, smtpServer, smtpAuthentication, smtpUsername, smtpPassword, Host.EnableSMTPSSL); + } + + public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, string body, + string attachment, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL) + { + return SendMail( + mailFrom, + mailTo, + cc, + bcc, + mailFrom, + priority, + subject, + bodyFormat, + bodyEncoding, + body, + attachment.Split('|'), + smtpServer, + smtpAuthentication, + smtpUsername, + smtpPassword, + smtpEnableSSL); + } + + public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, string body, + string[] attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL) + { + return SendMail( + mailFrom, + mailTo, + cc, + bcc, + mailFrom, + priority, + subject, + bodyFormat, + bodyEncoding, + body, + attachments, + smtpServer, + smtpAuthentication, + smtpUsername, + smtpPassword, + smtpEnableSSL); + } + + /// + /// Sends an email based on params. + /// + /// Email sender. + /// Recipients, can be more then one separated by semi-colons. + /// CC-recipients, can be more then one separated by semi-colons. + /// BCC-recipients, can be more then one separated by semi-colons. + /// Reply-to email to be displayed for recipients. + /// . + /// Subject of email. + /// . + /// Email Encoding from System.Text.Encoding. + /// Body of email. + /// List of filenames to attach to email. + /// IP or ServerName of the SMTP server. When empty or null, then it takes from the HostSettings. + /// SMTP authentication method. Can be "0" - anonymous, "1" - basic, "2" - NTLM. When empty or null, then it takes from the HostSettings. + /// SMTP authentication UserName. When empty or null, then it takes from the HostSettings. + /// SMTP authentication Password. When empty or null, then it takes from the HostSettings. + /// Enable or disable SSL. + /// Returns an empty string on success mail sending. Otherwise returns an error description. + /// SendMail( "admin@email.com", + /// "user@email.com", + /// "user1@email.com;user2@email.com", + /// "user3@email.com", + /// "no-reply@email.com", + /// MailPriority.Low, + /// "This is test email", + /// MailFormat.Text, + /// Encoding.UTF8, + /// "Test body. Test body. Test body.", + /// new string[] {"d:\documents\doc1.doc","d:\documents\doc2.doc"}, + /// "mail.email.com", + /// "1", + /// "admin@email.com", + /// "AdminPassword", + /// false). + /// + public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, string replyTo, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, + string body, string[] attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL) + { + var attachmentList = (from attachment in attachments + where !string.IsNullOrEmpty(attachment) + select new Attachment(attachment)) + .ToList(); + + return SendMail( + mailFrom, + mailTo, + cc, + bcc, + replyTo, + priority, + subject, + bodyFormat, + bodyEncoding, + body, + attachmentList, + smtpServer, + smtpAuthentication, + smtpUsername, + smtpPassword, + smtpEnableSSL); + } + + [Obsolete("This method has been deprecated. Please use SendEmail() with ICollection Scheduled removal in v11.0.0.")] + public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, string replyTo, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, + string body, List attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL) + { + return SendMail( + mailFrom, + string.Empty, + mailTo, + cc, + bcc, + replyTo, + priority, + subject, + bodyFormat, + bodyEncoding, + body, + attachments, + smtpServer, + smtpAuthentication, + smtpUsername, + smtpPassword, + smtpEnableSSL); + } + + public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, string replyTo, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, + string body, ICollection attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL) + { + return SendMail( + mailFrom, + string.Empty, + mailTo, + cc, + bcc, + replyTo, + priority, + subject, + bodyFormat, + bodyEncoding, + body, + attachments, + smtpServer, + smtpAuthentication, + smtpUsername, + smtpPassword, + smtpEnableSSL); + } + + [Obsolete("This method has been deprecated. Please use SendEmail() with ICollection Scheduled removal in v11.0.0.")] + public static string SendMail(string mailFrom, string mailSender, string mailTo, string cc, string bcc, string replyTo, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, + string body, List attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL) + { + var smtpInfo = new SmtpInfo + { + Server = smtpServer, + Authentication = smtpAuthentication, + Username = smtpUsername, + Password = smtpPassword, + EnableSSL = smtpEnableSSL, + }; + + var mailInfo = new MailInfo + { + From = mailFrom, + Sender = mailSender, + To = mailTo, + CC = cc, + BCC = bcc, + ReplyTo = replyTo, + Priority = priority, + BodyEncoding = bodyEncoding, + BodyFormat = bodyFormat, + Body = body, + Subject = subject, + Attachments = ConvertAttachments(attachments), + }; + + if (PortalSettings.Current != null && UserController.GetUserByEmail(PortalSettings.Current.PortalId, mailFrom) != null) + { + mailInfo.FromName = UserController.GetUserByEmail(PortalSettings.Current.PortalId, mailFrom).DisplayName; + } + + return MailProvider.Instance().SendMail(mailInfo, smtpInfo); + } + + public static string SendMail(string mailFrom, string mailSender, string mailTo, string cc, string bcc, string replyTo, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, + string body, ICollection attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL) + { + var smtpInfo = new SmtpInfo + { + Server = smtpServer, + Authentication = smtpAuthentication, + Username = smtpUsername, + Password = smtpPassword, + EnableSSL = smtpEnableSSL, + }; + + var mailInfo = new MailInfo + { + From = mailFrom, + Sender = mailSender, + To = mailTo, + CC = cc, + BCC = bcc, + ReplyTo = replyTo, + Priority = priority, + BodyEncoding = bodyEncoding, + BodyFormat = bodyFormat, + Body = body, + Subject = subject, + Attachments = attachments, + }; + + if (PortalSettings.Current != null && UserController.GetUserByEmail(PortalSettings.Current.PortalId, mailFrom) != null) + { + mailInfo.FromName = UserController.GetUserByEmail(PortalSettings.Current.PortalId, mailFrom).DisplayName; + } + + return MailProvider.Instance().SendMail(mailInfo, smtpInfo); + } + + private static ICollection ConvertAttachments(List attachments) + { + return attachments.Select( + attachment => + { + using (var ms = new MemoryStream()) + { + attachment.ContentStream.CopyTo(ms); + return new MailAttachment(attachment.Name, ms.ToArray()); + } + }) + .ToList(); + } + } +} diff --git a/DNN Platform/Library/Services/Mail/MailAttachment.cs b/DNN Platform/Library/Services/Mail/MailAttachment.cs new file mode 100644 index 00000000000..694c87d0285 --- /dev/null +++ b/DNN Platform/Library/Services/Mail/MailAttachment.cs @@ -0,0 +1,45 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + +using System; +using System.IO; +using System.Web; + +namespace DotNetNuke.Services.Mail +{ + public class MailAttachment + { + private const string DefaultContentType = "application/octet-stream"; + + public MailAttachment(string FilePath) + { + var Content = File.ReadAllBytes(FilePath); + var Filename = Path.GetFileName(FilePath); + var ContentType = MimeMapping.GetMimeMapping(Filename); + + this.MailAttachmentInternal(Filename, Content, ContentType); + } + + public MailAttachment(string Filename, Byte[] Content) + { + this.MailAttachmentInternal(Filename, Content, MimeMapping.GetMimeMapping(Filename)); + } + + public MailAttachment(string Filename, Byte[] Content, string ContentType) + { + this.MailAttachmentInternal(Filename, Content, ContentType); + } + + private void MailAttachmentInternal(string Filename, Byte[] Content, string ContentType) + { + this.Filename = Filename; + this.Content = Content; + this.ContentType = ContentType; + } + + public byte[] Content { get; set; } + public string Filename { get; set; } + public string ContentType { get; set; } + } +} diff --git a/DNN Platform/Library/Services/Mail/MailInfo.cs b/DNN Platform/Library/Services/Mail/MailInfo.cs new file mode 100644 index 00000000000..73cfdf8d997 --- /dev/null +++ b/DNN Platform/Library/Services/Mail/MailInfo.cs @@ -0,0 +1,77 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace DotNetNuke.Services.Mail +{ + using System.Collections.Generic; + using System.Text; + + /// Information about an email to be sent. + public class MailInfo + { + /// + /// Gets or sets From email address. + /// + public string From { get; set; } + + /// + /// Gets or sets sender email address. + /// + public string Sender { get; set; } + + /// + /// Gets or sets To email address. + /// + public string To { get; set; } + + /// + /// Gets or sets From Name. + /// + public string FromName { get; set; } + + /// + /// Gets or sets CC email address. + /// + public string CC { get; set; } + + /// + /// Gets or sets BCC email address. + /// + public string BCC { get; set; } + + /// + /// Gets or sets Reply To email address. + /// + public string ReplyTo { get; set; } + + /// + /// Gets or sets Body of email. + /// + public string Body { get; set; } + + /// + /// Gets or sets Subject of email. + /// + public string Subject { get; set; } + + /// + /// Gets or sets Priority. + /// + public MailPriority Priority { get; set; } + + /// + /// Gets or sets Body Encoding. + /// + public Encoding BodyEncoding { get; set; } + + /// + /// Gets or sets Body Format. + /// + public MailFormat BodyFormat { get; set; } + + /// + /// Gets or sets mail attachments. + /// + public ICollection Attachments { get; set; } + } +} diff --git a/DNN Platform/Library/Services/Mail/MailProvider.cs b/DNN Platform/Library/Services/Mail/MailProvider.cs new file mode 100644 index 00000000000..ac48fdca3af --- /dev/null +++ b/DNN Platform/Library/Services/Mail/MailProvider.cs @@ -0,0 +1,18 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +using DotNetNuke.ComponentModel; + +namespace DotNetNuke.Services.Mail +{ + public abstract class MailProvider + { + public abstract string SendMail(MailInfo mailInfo, SmtpInfo smtpInfo = null); + + // return the provider + public static MailProvider Instance() + { + return ComponentFactory.GetComponent(); + } + } +} diff --git a/DNN Platform/Library/Services/Mail/SMTPInfo.cs b/DNN Platform/Library/Services/Mail/SMTPInfo.cs new file mode 100644 index 00000000000..01c9ec1aca4 --- /dev/null +++ b/DNN Platform/Library/Services/Mail/SMTPInfo.cs @@ -0,0 +1,35 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +using System.Text; + +namespace DotNetNuke.Services.Mail +{ + public class SmtpInfo + { + /// + /// Gets or sets SMTP Server. + /// + public string Server { get; set; } + + /// + /// Gets or sets SMTP Authentication. + /// + public string Authentication { get; set; } + + /// + /// Gets or sets SMTP Username. + /// + public string Username { get; set; } + + /// + /// Gets or sets SMTP Password. + /// + public string Password { get; set; } + + /// + /// Gets or sets a value indicating whether SSL should be enabled or disabled. + /// + public bool EnableSSL { get; set; } + } +} diff --git a/DNN Platform/Library/Services/Search/Controllers/SearchControllerImpl.cs b/DNN Platform/Library/Services/Search/Controllers/SearchControllerImpl.cs index 1a020bd0450..b4ead8d19a0 100644 --- a/DNN Platform/Library/Services/Search/Controllers/SearchControllerImpl.cs +++ b/DNN Platform/Library/Services/Search/Controllers/SearchControllerImpl.cs @@ -137,7 +137,7 @@ private static void FillTagsValues(Document doc, SearchResult result) break; case Constants.ModifiedTimeTag: DateTime modifiedTimeUtc; - DateTime.TryParseExact(field.StringValue, Constants.DateTimeFormat, null, DateTimeStyles.None, out modifiedTimeUtc); + DateTime.TryParseExact(field.StringValue, Constants.DateTimeFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out modifiedTimeUtc); result.ModifiedTimeUtc = modifiedTimeUtc; break; default: diff --git a/DNN Platform/Library/Services/Search/Internals/InternalSearchControllerImpl.cs b/DNN Platform/Library/Services/Search/Internals/InternalSearchControllerImpl.cs index 68324397883..a82704d7ecb 100644 --- a/DNN Platform/Library/Services/Search/Internals/InternalSearchControllerImpl.cs +++ b/DNN Platform/Library/Services/Search/Internals/InternalSearchControllerImpl.cs @@ -609,7 +609,14 @@ private void AddSearchDocumentParamters(Document doc, SearchDocument searchDocum doc.Add(new Field(Constants.PermissionsTag, SearchHelper.Instance.StripTagsNoAttributes(searchDocument.Permissions, true), Field.Store.YES, Field.Index.NOT_ANALYZED)); } - doc.Add(new NumericField(Constants.ModifiedTimeTag, Field.Store.YES, true).SetLongValue(long.Parse(searchDocument.ModifiedTimeUtc.ToString(Constants.DateTimeFormat)))); + doc.Add( + new NumericField(Constants.ModifiedTimeTag, Field.Store.YES, true) + .SetLongValue( + long.Parse( + searchDocument.ModifiedTimeUtc.ToString( + Constants.DateTimeFormat, + CultureInfo.InvariantCulture), + CultureInfo.InvariantCulture))); if (sb.Length > 0) { diff --git a/DNN Platform/Library/Services/Social/Messaging/Internal/Views/MessageConversationView.cs b/DNN Platform/Library/Services/Social/Messaging/Internal/Views/MessageConversationView.cs index e3e75e5a75e..0fb6d260812 100644 --- a/DNN Platform/Library/Services/Social/Messaging/Internal/Views/MessageConversationView.cs +++ b/DNN Platform/Library/Services/Social/Messaging/Internal/Views/MessageConversationView.cs @@ -155,7 +155,7 @@ public void Fill(IDataReader dr) this.To = Null.SetNullString(dr["To"]); this.From = Null.SetNullString(dr["From"]); this.Subject = Null.SetNullString(dr["Subject"]); - this.Body = Null.SetNullString(dr["Body"]); + this.Body = HtmlUtils.ConvertToHtml(Null.SetNullString(dr["Body"])); this.ConversationId = Null.SetNullInteger(dr["ConversationID"]); this.ReplyAllAllowed = Null.SetNullBoolean(dr["ReplyAllAllowed"]); this.SenderUserID = Convert.ToInt32(dr["SenderUserID"]); diff --git a/DNN Platform/Library/Services/Social/Messaging/Scheduler/CoreMessagingScheduler.cs b/DNN Platform/Library/Services/Social/Messaging/Scheduler/CoreMessagingScheduler.cs index d9c84c45516..daca6eab6d5 100644 --- a/DNN Platform/Library/Services/Social/Messaging/Scheduler/CoreMessagingScheduler.cs +++ b/DNN Platform/Library/Services/Social/Messaging/Scheduler/CoreMessagingScheduler.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information @@ -126,6 +126,7 @@ private static string GetEmailBody(string template, string messageBody, PortalSe template = template.Replace("[PORTALNAME]", portalSettings.PortalName); template = template.Replace("[LOGOURL]", GetPortalLogoUrl(portalSettings)); template = template.Replace("[UNSUBSCRIBEURL]", GetSubscriptionsUrl(portalSettings, recipientUser.UserID)); + template = template.Replace("[YEAR]", DateTime.Now.Year.ToString()); template = ResolveUrl(portalSettings, template); return template; @@ -144,7 +145,7 @@ private static string GetEmailItemContent(PortalSettings portalSettings, Message var emailItemContent = itemTemplate; emailItemContent = emailItemContent.Replace("[TITLE]", messageDetails.Subject); - emailItemContent = emailItemContent.Replace("[CONTENT]", messageDetails.Body); + emailItemContent = emailItemContent.Replace("[CONTENT]", HtmlUtils.ConvertToHtml(messageDetails.Body)); emailItemContent = emailItemContent.Replace("[PROFILEPICURL]", GetProfilePicUrl(portalSettings, authorId)); emailItemContent = emailItemContent.Replace("[PROFILEURL]", GetProfileUrl(portalSettings, authorId)); emailItemContent = emailItemContent.Replace("[DISPLAYNAME]", GetDisplayName(portalSettings, authorId)); diff --git a/DNN Platform/Library/Services/Upgrade/Upgrade.cs b/DNN Platform/Library/Services/Upgrade/Upgrade.cs index 50d788edb17..f491d5c7d45 100644 --- a/DNN Platform/Library/Services/Upgrade/Upgrade.cs +++ b/DNN Platform/Library/Services/Upgrade/Upgrade.cs @@ -6,7 +6,6 @@ namespace DotNetNuke.Services.Upgrade using System; using System.Collections; using System.Collections.Generic; - using System.Configuration; using System.Data; using System.Data.SqlClient; using System.IO; @@ -15,9 +14,7 @@ namespace DotNetNuke.Services.Upgrade using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; - using System.Threading; using System.Web; - using System.Web.Configuration; using System.Xml; using System.Xml.XPath; @@ -28,7 +25,6 @@ namespace DotNetNuke.Services.Upgrade using DotNetNuke.Data; using DotNetNuke.Entities.Content; using DotNetNuke.Entities.Content.Taxonomy; - using DotNetNuke.Entities.Content.Workflow; using DotNetNuke.Entities.Controllers; using DotNetNuke.Entities.Host; using DotNetNuke.Entities.Modules; @@ -40,22 +36,18 @@ namespace DotNetNuke.Services.Upgrade using DotNetNuke.Entities.Users.Social; using DotNetNuke.Framework; using DotNetNuke.Framework.JavaScriptLibraries; - using DotNetNuke.Framework.Providers; using DotNetNuke.Instrumentation; using DotNetNuke.Security; using DotNetNuke.Security.Permissions; - using DotNetNuke.Security.Roles; using DotNetNuke.Services.Analytics; using DotNetNuke.Services.Authentication; using DotNetNuke.Services.EventQueue.Config; using DotNetNuke.Services.FileSystem; using DotNetNuke.Services.FileSystem.Internal; using DotNetNuke.Services.Installer; - using DotNetNuke.Services.Installer.Dependencies; using DotNetNuke.Services.Installer.Log; using DotNetNuke.Services.Installer.Packages; using DotNetNuke.Services.Localization; - using DotNetNuke.Services.Localization.Internal; using DotNetNuke.Services.Log.EventLog; using DotNetNuke.Services.Search; using DotNetNuke.Services.Social.Messaging.Internal; @@ -64,7 +56,6 @@ namespace DotNetNuke.Services.Upgrade using DotNetNuke.Services.Upgrade.Internals; using DotNetNuke.Services.Upgrade.Internals.Steps; using DotNetNuke.UI.Internals; - using ICSharpCode.SharpZipLib.Zip; using Assembly = System.Reflection.Assembly; using FileInfo = DotNetNuke.Services.FileSystem.FileInfo; @@ -549,108 +540,7 @@ public static int AddPortal(XmlNode node, bool status, int indent) { return AddPortal(node, status, indent, null); } - - public static string BuildUserTable(IDataReader dr, string header, string message) - { - string warnings = Null.NullString; - var stringBuilder = new StringBuilder(); - bool hasRows = false; - - stringBuilder.Append("

    " + header + "

    "); - stringBuilder.Append("

    " + message + "

    "); - stringBuilder.Append(""); - stringBuilder.Append(""); - stringBuilder.Append(""); - stringBuilder.Append(""); - stringBuilder.Append(""); - stringBuilder.Append(""); - stringBuilder.Append(""); - stringBuilder.Append(""); - while (dr.Read()) - { - hasRows = true; - stringBuilder.Append(""); - stringBuilder.Append(""); - stringBuilder.Append(""); - stringBuilder.Append(""); - stringBuilder.Append(""); - stringBuilder.Append(""); - stringBuilder.Append(""); - } - - stringBuilder.Append("
    IDUserNameFirst NameLast NameEmail
    " + dr.GetInt32(0) + "" + dr.GetString(1) + "" + dr.GetString(2) + "" + dr.GetString(3) + "" + dr.GetString(4) + "
    "); - - if (hasRows) - { - warnings = stringBuilder.ToString(); - } - - return warnings; - } - - /// ----------------------------------------------------------------------------- - /// - /// CheckUpgrade checks whether there are any possible upgrade issues. - /// - /// - /// ----------------------------------------------------------------------------- - public static string CheckUpgrade() - { - DataProvider dataProvider = DataProvider.Instance(); - IDataReader dr; - string warnings = Null.NullString; - - try - { - using (dr = dataProvider.ExecuteReader("CheckUpgrade")) - { - warnings = BuildUserTable(dr, "Duplicate SuperUsers", "We have detected that the following SuperUsers have duplicate entries as Portal Users. Although, no longer supported, these users may have been created in early Betas of DNN v3.0. You need to be aware that after the upgrade, these users will only be able to log in using the Super User Account's password."); - - if (dr.NextResult()) - { - warnings += BuildUserTable(dr, "Duplicate Portal Users", "We have detected that the following Users have duplicate entries (they exist in more than one portal). You need to be aware that after the upgrade, the password for some of these users may have been automatically changed (as the system now only uses one password per user, rather than one password per user per portal). It is important to remember that your Users can always retrieve their password using the Password Reminder feature, which will be sent to the Email addess shown in the table."); - } - } - } - catch (SqlException ex) - { - Logger.Error(ex); - warnings += ex.Message; - } - catch (Exception ex) - { - Logger.Error(ex); - warnings += ex.Message; - } - - try - { - using (dr = dataProvider.ExecuteReader("GetUserCount")) - { - dr.Read(); - int userCount = dr.GetInt32(0); - - // ReSharper disable PossibleLossOfFraction - double time = userCount / 10834; - - // ReSharper restore PossibleLossOfFraction - if (userCount > 1000) - { - warnings += "

    More than 1000 Users

    This DotNetNuke Database has " + userCount + - " users. As the users and their profiles are transferred to a new format, it is estimated that the script will take ~" + time.ToString("F2") + - " minutes to execute.

    "; - } - } - } - catch (Exception ex) - { - Logger.Error(ex); - warnings += Environment.NewLine + Environment.NewLine + ex.Message; - } - - return warnings; - } - + /// ----------------------------------------------------------------------------- /// /// DeleteInstallerFiles - clean up install config and installwizard files @@ -1573,52 +1463,6 @@ public static void StartTimer() _startTime = DateTime.Now; } - public static void TryUpgradeNETFramework() - { - switch (Globals.NETFrameworkVersion.ToString(2)) - { - case "3.5": - if (!IsNETFrameworkCurrent("3.5")) - { - // Upgrade to .NET 3.5 - string upgradeFile = string.Format("{0}\\Config\\Net35.config", Globals.InstallMapPath); - string message = UpdateConfig(upgradeFile, ApplicationVersion, ".NET 3.5 Upgrade"); - if (string.IsNullOrEmpty(message)) - { - // Remove old AJAX file - FileSystemUtils.DeleteFile(Path.Combine(Globals.ApplicationMapPath, "bin\\System.Web.Extensions.dll")); - - // Log Upgrade - EventLogController.Instance.AddLog("UpgradeNet", "Upgraded Site to .NET 3.5", PortalController.Instance.GetCurrentPortalSettings(), UserController.Instance.GetCurrentUserInfo().UserID, EventLogController.EventLogType.HOST_ALERT); - } - else - { - // Log Failed Upgrade - EventLogController.Instance.AddLog("UpgradeNet", string.Format("Upgrade to .NET 3.5 failed. Error reported during attempt to update:{0}", message), PortalController.Instance.GetCurrentPortalSettings(), UserController.Instance.GetCurrentUserInfo().UserID, EventLogController.EventLogType.HOST_ALERT); - } - } - - break; - case "4.0": - if (!IsNETFrameworkCurrent("4.0")) - { - // Upgrade to .NET 4.0 - string upgradeFile = string.Format("{0}\\Config\\Net40.config", Globals.InstallMapPath); - string strMessage = UpdateConfig(upgradeFile, ApplicationVersion, ".NET 4.0 Upgrade"); - EventLogController.Instance.AddLog( - "UpgradeNet", - string.IsNullOrEmpty(strMessage) - ? "Upgraded Site to .NET 4.0" - : string.Format("Upgrade to .NET 4.0 failed. Error reported during attempt to update:{0}", strMessage), - PortalController.Instance.GetCurrentPortalSettings(), - UserController.Instance.GetCurrentUserInfo().UserID, - EventLogController.EventLogType.HOST_ALERT); - } - - break; - } - } - /// ----------------------------------------------------------------------------- /// /// UpgradeApplication - This overload is used for general application upgrade operations. @@ -1638,9 +1482,6 @@ public static void UpgradeApplication() ModuleControlController.SaveModuleControl(loginControl, true); - // Upgrade to .NET 3.5/4.0 - TryUpgradeNETFramework(); - // Update the version of the client resources - so the cache is cleared DataCache.ClearHostCache(false); HostController.Instance.IncrementCrmVersion(true); @@ -1706,123 +1547,6 @@ public static string UpgradeApplication(string providerPath, Version version, bo { switch (version.ToString(3)) { - case "3.2.3": - UpgradeToVersion323(); - break; - case "4.4.0": - UpgradeToVersion440(); - break; - case "4.7.0": - UpgradeToVersion470(); - break; - case "4.8.2": - UpgradeToVersion482(); - break; - case "5.0.0": - UpgradeToVersion500(); - break; - case "5.0.1": - UpgradeToVersion501(); - break; - case "5.1.0": - UpgradeToVersion510(); - break; - case "5.1.1.0": - UpgradeToVersion511(); - break; - case "5.1.3": - UpgradeToVersion513(); - break; - case "5.2.0": - UpgradeToVersion520(); - break; - case "5.2.1": - UpgradeToVersion521(); - break; - case "5.3.0": - UpgradeToVersion530(); - break; - case "5.4.0": - UpgradeToVersion540(); - break; - case "5.4.3": - UpgradeToVersion543(); - break; - case "5.5.0": - UpgradeToVersion550(); - break; - case "5.6.0": - UpgradeToVersion560(); - break; - case "5.6.2": - UpgradeToVersion562(); - break; - case "6.0.0": - UpgradeToVersion600(); - break; - case "6.0.1": - UpgradeToVersion601(); - break; - case "6.0.2": - UpgradeToVersion602(); - break; - case "6.1.0": - UpgradeToVersion610(); - break; - case "6.1.2": - UpgradeToVersion612(); - break; - case "6.1.3": - UpgradeToVersion613(); - break; - case "6.2.0": - UpgradeToVersion620(); - break; - case "6.2.1": - UpgradeToVersion621(); - break; - case "6.2.3": - UpgradeToVersion623(); - break; - case "6.2.4": - UpgradeToVersion624(); - break; - case "7.0.0": - UpgradeToVersion700(); - break; - case "7.1.0": - UpgradeToVersion710(); - break; - case "7.1.1": - UpgradeToVersion711(); - break; - case "7.1.2": - UpgradeToVersion712(); - break; - case "7.2.0": - UpgradeToVersion720(); - break; - case "7.2.1": - UpgradeToVersion721(); - break; - case "7.2.2": - UpgradeToVersion722(); - break; - case "7.3.0": - UpgradeToVersion730(); - break; - case "7.3.2": - UpgradeToVersion732(); - break; - case "7.3.3": - UpgradeToVersion733(); - break; - case "7.4.0": - UpgradeToVersion740(); - break; - case "7.4.2": - UpgradeToVersion742(); - break; case "9.1.0": UpgradeToVersion910(); break; @@ -2569,77 +2293,6 @@ protected static bool IsLanguageEnabled(int portalid, string code) return LocaleController.Instance.GetLocales(portalid).TryGetValue(code, out enabledLanguage); } - /// ----------------------------------------------------------------------------- - /// - /// AddAdminPages adds an Admin Page and an associated Module to all configured Portals. - /// - /// The Name to give this new Tab. - /// Description. - /// The Icon for this new Tab. - /// The large Icon for this new Tab. - /// A flag indicating whether the tab is visible. - /// The Module Deinition Id for the module to be aded to this tab. - /// The Module's title. - /// The Module's icon. - /// ----------------------------------------------------------------------------- - private static void AddAdminPages(string tabName, string description, string tabIconFile, string tabIconFileLarge, bool isVisible, int moduleDefId, string moduleTitle, string moduleIconFile) - { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "AddAdminPages:" + tabName); - - // Call overload with InheritPermisions=True - AddAdminPages(tabName, description, tabIconFile, tabIconFileLarge, isVisible, moduleDefId, moduleTitle, moduleIconFile, true); - } - - private static void AddAdminRoleToPage(string tabPath) - { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "AddAdminRoleToPage:" + tabPath); - - foreach (PortalInfo portal in PortalController.Instance.GetPortals()) - { - int tabID = TabController.GetTabByTabPath(portal.PortalID, tabPath, Null.NullString); - if (tabID != Null.NullInteger) - { - TabInfo tab = TabController.Instance.GetTab(tabID, portal.PortalID, true); - - if (tab.TabPermissions.Count == 0) - { - AddPagePermission(tab.TabPermissions, "View", Convert.ToInt32(portal.AdministratorRoleId)); - AddPagePermission(tab.TabPermissions, "Edit", Convert.ToInt32(portal.AdministratorRoleId)); - TabPermissionController.SaveTabPermissions(tab); - } - } - } - } - - private static void AddConsoleModuleSettings(int moduleID) - { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "AddConsoleModuleSettings:" + moduleID); - - ModuleController.Instance.UpdateModuleSetting(moduleID, "DefaultSize", "IconFileLarge"); - ModuleController.Instance.UpdateModuleSetting(moduleID, "AllowSizeChange", "False"); - ModuleController.Instance.UpdateModuleSetting(moduleID, "DefaultView", "Hide"); - ModuleController.Instance.UpdateModuleSetting(moduleID, "AllowViewChange", "False"); - ModuleController.Instance.UpdateModuleSetting(moduleID, "ShowTooltip", "True"); - } - - private static void AddEventQueueApplicationStartFirstRequest() - { - // Add new EventQueue Event - var config = EventQueueConfiguration.GetConfig(); - if (config != null) - { - if (!config.PublishedEvents.ContainsKey("Application_Start_FirstRequest")) - { - foreach (SubscriberInfo subscriber in config.EventQueueSubscribers.Values) - { - EventQueueConfiguration.RegisterEventSubscription(config, "Application_Start_FirstRequest", subscriber); - } - - EventQueueConfiguration.SaveConfig(config, string.Format("{0}EventQueue\\EventQueue.config", Globals.HostMapPath)); - } - } - } - /// ----------------------------------------------------------------------------- /// /// AddModuleControl adds a new Module Control to the system. @@ -2915,2593 +2568,109 @@ private static void AddPagePermission(TabPermissionCollection permissions, strin /// ----------------------------------------------------------------------------- /// - /// AddSearchResults adds a top level Hidden Search Results Page. + /// HostTabExists determines whether a tab of a given name exists under the Host tab. /// - /// The Module Deinition Id for the Search Results Module. + /// + /// + /// The Name of the Tab. + /// True if the Tab exists, otherwise False. /// ----------------------------------------------------------------------------- - private static void AddSearchResults(int moduleDefId) + private static bool HostTabExists(string tabName) { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "AddSearchResults:" + moduleDefId); - var portals = PortalController.Instance.GetPortals(); - int intPortal; + bool tabExists = false; + var hostTab = TabController.Instance.GetTabByName("Host", Null.NullInteger); - // Add Page to Admin Menu of all configured Portals - for (intPortal = 0; intPortal <= portals.Count - 1; intPortal++) + var tab = TabController.Instance.GetTabByName(tabName, Null.NullInteger, hostTab.TabID); + if (tab != null) { - var tabPermissions = new TabPermissionCollection(); - - var portal = (PortalInfo)portals[intPortal]; - - AddPagePermission(tabPermissions, "View", Convert.ToInt32(Globals.glbRoleAllUsers)); - AddPagePermission(tabPermissions, "View", Convert.ToInt32(portal.AdministratorRoleId)); - AddPagePermission(tabPermissions, "Edit", Convert.ToInt32(portal.AdministratorRoleId)); - - // Create New Page (or get existing one) - var tab = AddPage(portal.PortalID, Null.NullInteger, "Search Results", string.Empty, string.Empty, string.Empty, false, tabPermissions, false); - - // Add Module To Page - AddModuleToPage(tab, moduleDefId, "Search Results", string.Empty); + tabExists = true; } + + return tabExists; } /// ----------------------------------------------------------------------------- /// - /// AddSkinControl adds a new Module Control to the system. + /// InstallMemberRoleProviderScript - Installs a specific MemberRole Provider script. /// /// /// - /// The key for this control in the Definition. - /// Package Name. - /// Te source of ths control. - /// ----------------------------------------------------------------------------- - private static void AddSkinControl(string controlKey, string packageName, string controlSrc) - { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "AddSkinControl:" + controlKey); - - // check if skin control exists - SkinControlInfo skinControl = SkinControlController.GetSkinControlByKey(controlKey); - if (skinControl == null) - { - var package = new PackageInfo { Name = packageName, FriendlyName = string.Concat(controlKey, "SkinObject"), PackageType = "SkinObject", Version = new Version(1, 0, 0) }; - LegacyUtil.ParsePackageName(package); - - PackageController.Instance.SaveExtensionPackage(package); - - skinControl = new SkinControlInfo { PackageID = package.PackageID, ControlKey = controlKey, ControlSrc = controlSrc, SupportsPartialRendering = false }; - - SkinControlController.SaveSkinControl(skinControl); - } - } - - private static void AddDefaultModuleIcons() + /// The Path to the Provider Directory. + /// The Name of the Script File. + /// Whether or not to echo results. + private static string InstallMemberRoleProviderScript(string providerPath, string scriptFile, bool writeFeedback) { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "AddDefaultModuleIcons"); - var pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Google Analytics"); - if (pkg != null) - { - pkg.FolderName = "DesktopModules/Admin/Analytics"; - pkg.IconFile = "~/DesktopModules/Admin/Analytics/analytics.gif"; - PackageController.Instance.SaveExtensionPackage(pkg); - } - - pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Configuration Manager"); - if (pkg != null) - { - pkg.FolderName = "DesktopModules/Admin/XmlMerge"; - pkg.IconFile = "~/DesktopModules/Admin/XmlMerge/xmlMerge.png"; - PackageController.Instance.SaveExtensionPackage(pkg); - } - - pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Console"); - if (pkg != null) - { - pkg.FolderName = "DesktopModules/Admin/Console"; - pkg.IconFile = "~/DesktopModules/Admin/Console/console.gif"; - PackageController.Instance.SaveExtensionPackage(pkg); - } - - pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.ContentList"); - if (pkg != null) - { - pkg.FolderName = "DesktopModules/Admin/ContentList"; - pkg.IconFile = "~/DesktopModules/Admin/ContentList/contentList.gif"; - PackageController.Instance.SaveExtensionPackage(pkg); - } - - pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Dashboard"); - if (pkg != null) - { - pkg.FolderName = "DesktopModules/Admin/Dashboard"; - pkg.IconFile = "~/DesktopModules/Admin/Dashboard/dashboard.gif"; - PackageController.Instance.SaveExtensionPackage(pkg); - } - - pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Languages"); - if (pkg != null) - { - pkg.FolderName = "DesktopModules/Admin/Languages"; - pkg.IconFile = "~/DesktopModules/Admin/Languages/languages.gif"; - PackageController.Instance.SaveExtensionPackage(pkg); - } - - pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Marketplace"); - if (pkg != null) - { - pkg.FolderName = "DesktopModules/Admin/Marketplace"; - pkg.IconFile = "~/DesktopModules/Admin/Marketplace/marketplace.gif"; - PackageController.Instance.SaveExtensionPackage(pkg); - } - - pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Sitemap"); - if (pkg != null) - { - pkg.FolderName = "DesktopModules/Admin/Sitemap"; - pkg.IconFile = "~/DesktopModules/Admin/Sitemap/sitemap.gif"; - PackageController.Instance.SaveExtensionPackage(pkg); - } - - pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Skin Designer"); - if (pkg != null) + if (writeFeedback) { - pkg.FolderName = "DesktopModules/Admin/SkinDesigner"; - pkg.IconFile = "~/DesktopModules/Admin/SkinDesigner/skinDesigner.gif"; - PackageController.Instance.SaveExtensionPackage(pkg); + HtmlUtils.WriteFeedback(HttpContext.Current.Response, 2, "Executing Script: " + scriptFile + "
    "); } - pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Skins"); - if (pkg != null) - { - pkg.FolderName = "DesktopModules/Admin/Skins"; - pkg.IconFile = "~/DesktopModules/Admin/Skins/skins.gif"; - PackageController.Instance.SaveExtensionPackage(pkg); - } + string exceptions = DataProvider.Instance().ExecuteScript(FileSystemUtils.ReadFile(providerPath + scriptFile + ".sql")); - pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.ViewProfile"); - if (pkg != null) + // log the results + try { - pkg.FolderName = "DesktopModules/Admin/ViewProfile"; - pkg.IconFile = "~/DesktopModules/Admin/ViewProfile/viewProfile.gif"; - PackageController.Instance.SaveExtensionPackage(pkg); + using (StreamWriter streamWriter = File.CreateText(providerPath + scriptFile + ".log.resources")) + { + streamWriter.WriteLine(exceptions); + streamWriter.Close(); + } } - - pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.ProfessionalPreview"); - if (pkg != null) + catch (Exception exc) { - pkg.FolderName = "DesktopModules/Admin/ProfessionalPreview"; - pkg.IconFile = "~/DesktopModules/Admin/ProfessionalPreview/professionalPreview.gif"; - PackageController.Instance.SaveExtensionPackage(pkg); + // does not have permission to create the log file + Logger.Error(exc); } - } - - private static void AddModuleCategories() - { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "AddModuleCategories"); - DesktopModuleController.AddModuleCategory("< None >"); - DesktopModuleController.AddModuleCategory("Admin"); - DesktopModuleController.AddModuleCategory("Common"); - - foreach (var desktopModuleInfo in DesktopModuleController.GetDesktopModules(Null.NullInteger)) - { - bool update = false; - switch (desktopModuleInfo.Value.ModuleName) - { - case "Portals": - case "SQL": - case "HostSettings": - case "Scheduler": - case "SearchAdmin": - case "Lists": - case "Extensions": - case "WhatsNew": - case "Dashboard": - case "Marketplace": - case "ConfigurationManager": - case "Security": - case "Tabs": - case "Vendors": - case "Banners": - case "FileManager": - case "SiteLog": - case "Newsletters": - case "RecycleBin": - case "LogViewer": - case "SiteWizard": - case "Languages": - case "Skins": - case "SkinDesigner": - case "GoogleAnalytics": - case "Sitemap": - case "DotNetNuke.Taxonomy": - desktopModuleInfo.Value.Category = "Admin"; - update = true; - break; - default: - break; - } - - if (update) - { - if (desktopModuleInfo.Value.PackageID == Null.NullInteger) - { - LegacyUtil.ProcessLegacyModule(desktopModuleInfo.Value); - } - DesktopModuleController.SaveDesktopModule(desktopModuleInfo.Value, false, false); - } - } + return exceptions; } /// ----------------------------------------------------------------------------- /// - /// CoreModuleExists determines whether a Core Module exists on the system. + /// ParseFiles parses the Host Template's Files node. /// /// /// - /// The Friendly Name of the Module. - /// True if the Module exists, otherwise False. + /// The Files node. + /// The PortalId (-1 for Host Files). /// ----------------------------------------------------------------------------- - private static bool CoreModuleExists(string desktopModuleName) + private static void ParseFiles(XmlNode node, int portalId) { - var desktopModule = DesktopModuleController.GetDesktopModuleByModuleName(desktopModuleName, Null.NullInteger); - - return desktopModule != null; - } - - private static void EnableModalPopUps() - { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "EnableModalPopUps"); - foreach (var desktopModuleInfo in DesktopModuleController.GetDesktopModules(Null.NullInteger)) - { - switch (desktopModuleInfo.Value.ModuleName) - { - case "Portals": - case "SQL": - case "HostSettings": - case "Scheduler": - case "SearchAdmin": - case "Lists": - case "Extensions": - case "WhatsNew": - case "Dashboard": - case "Marketplace": - case "ConfigurationManager": - case "Security": - case "Tabs": - case "Vendors": - case "Banners": - case "FileManager": - case "SiteLog": - case "Newsletters": - case "RecycleBin": - case "LogViewer": - case "SiteWizard": - case "Languages": - case "Skins": - case "SkinDesigner": - case "GoogleAnalytics": - case "Sitemap": - case "DotNetNuke.Taxonomy": - foreach (ModuleDefinitionInfo definition in desktopModuleInfo.Value.ModuleDefinitions.Values) - { - foreach (ModuleControlInfo control in definition.ModuleControls.Values) - { - if (!string.IsNullOrEmpty(control.ControlKey)) - { - control.SupportsPopUps = true; - ModuleControlController.SaveModuleControl(control, false); - } - } - } - - break; - default: - break; - } - } - - foreach (ModuleControlInfo control in ModuleControlController.GetModuleControlsByModuleDefinitionID(Null.NullInteger).Values) - { - control.SupportsPopUps = true; - ModuleControlController.SaveModuleControl(control, false); - } - } - - /// ----------------------------------------------------------------------------- - /// - /// GetModuleDefinition gets the Module Definition Id of a module. - /// - /// The Friendly Name of the Module to Add. - /// The Module Definition Name. - /// The Module Definition Id of the Module (-1 if no module definition). - /// ----------------------------------------------------------------------------- - private static int GetModuleDefinition(string desktopModuleName, string moduleDefinitionName) - { - // get desktop module - var desktopModule = DesktopModuleController.GetDesktopModuleByModuleName(desktopModuleName, Null.NullInteger); - if (desktopModule == null) - { - return -1; - } - - // get module definition - ModuleDefinitionInfo objModuleDefinition = ModuleDefinitionController.GetModuleDefinitionByFriendlyName(moduleDefinitionName, desktopModule.DesktopModuleID); - if (objModuleDefinition == null) - { - return -1; - } - - return objModuleDefinition.ModuleDefID; - } - - /// ----------------------------------------------------------------------------- - /// - /// HostTabExists determines whether a tab of a given name exists under the Host tab. - /// - /// - /// - /// The Name of the Tab. - /// True if the Tab exists, otherwise False. - /// ----------------------------------------------------------------------------- - private static bool HostTabExists(string tabName) - { - bool tabExists = false; - var hostTab = TabController.Instance.GetTabByName("Host", Null.NullInteger); - - var tab = TabController.Instance.GetTabByName(tabName, Null.NullInteger, hostTab.TabID); - if (tab != null) - { - tabExists = true; - } - - return tabExists; - } - - /// ----------------------------------------------------------------------------- - /// - /// InstallMemberRoleProviderScript - Installs a specific MemberRole Provider script. - /// - /// - /// - /// The Path to the Provider Directory. - /// The Name of the Script File. - /// Whether or not to echo results. - private static string InstallMemberRoleProviderScript(string providerPath, string scriptFile, bool writeFeedback) - { - if (writeFeedback) - { - HtmlUtils.WriteFeedback(HttpContext.Current.Response, 2, "Executing Script: " + scriptFile + "
    "); - } - - string exceptions = DataProvider.Instance().ExecuteScript(FileSystemUtils.ReadFile(providerPath + scriptFile + ".sql")); - - // log the results - try - { - using (StreamWriter streamWriter = File.CreateText(providerPath + scriptFile + ".log.resources")) - { - streamWriter.WriteLine(exceptions); - streamWriter.Close(); - } - } - catch (Exception exc) - { - // does not have permission to create the log file - Logger.Error(exc); - } - - return exceptions; - } - - /// ----------------------------------------------------------------------------- - /// - /// ParseFiles parses the Host Template's Files node. - /// - /// - /// - /// The Files node. - /// The PortalId (-1 for Host Files). - /// ----------------------------------------------------------------------------- - private static void ParseFiles(XmlNode node, int portalId) - { - // Parse the File nodes - if (node != null) - { - XmlNodeList nodes = node.SelectNodes("file"); - if (nodes != null) - { - var folderManager = FolderManager.Instance; - var fileManager = FileManager.Instance; - - foreach (XmlNode fileNode in nodes) - { - string fileName = XmlUtils.GetNodeValue(fileNode.CreateNavigator(), "filename"); - string extension = XmlUtils.GetNodeValue(fileNode.CreateNavigator(), "extension"); - long size = long.Parse(XmlUtils.GetNodeValue(fileNode.CreateNavigator(), "size")); - int width = XmlUtils.GetNodeValueInt(fileNode, "width"); - int height = XmlUtils.GetNodeValueInt(fileNode, "height"); - string contentType = XmlUtils.GetNodeValue(fileNode.CreateNavigator(), "contentType"); - string folder = XmlUtils.GetNodeValue(fileNode.CreateNavigator(), "folder"); - - var folderInfo = folderManager.GetFolder(portalId, folder); - var file = new FileInfo(portalId, fileName, extension, (int)size, width, height, contentType, folder, folderInfo.FolderID, folderInfo.StorageLocation, true); - - using (var fileContent = fileManager.GetFileContent(file)) - { - var addedFile = fileManager.AddFile(folderInfo, file.FileName, fileContent, false); - - file.FileId = addedFile.FileId; - file.EnablePublishPeriod = addedFile.EnablePublishPeriod; - file.EndDate = addedFile.EndDate; - file.StartDate = addedFile.StartDate; - } - - fileManager.UpdateFile(file); - } - } - } - } - - /// ----------------------------------------------------------------------------- - /// - /// RemoveCoreModule removes a Core Module from the system. - /// - /// - /// - /// The Friendly Name of the Module to Remove. - /// The Name of the parent Tab/Page for this module. - /// The Name to tab that contains the Module. - /// A flag to determine whether to remove the Tab if it has no - /// other modules. - /// ----------------------------------------------------------------------------- - private static void RemoveCoreModule(string desktopModuleName, string parentTabName, string tabName, bool removeTab) - { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "RemoveCoreModule:" + desktopModuleName); - - int moduleDefId = Null.NullInteger; - int desktopModuleId = 0; - - // Find and remove the Module from the Tab - switch (parentTabName) - { - case "Host": - var tab = TabController.Instance.GetTabByName("Host", Null.NullInteger, Null.NullInteger); - - if (tab != null) - { - moduleDefId = RemoveModule(desktopModuleName, tabName, tab.TabID, removeTab); - } - - break; - case "Admin": - var portals = PortalController.Instance.GetPortals(); - - // Iterate through the Portals to remove the Module from the Tab - for (int intPortal = 0; intPortal <= portals.Count - 1; intPortal++) - { - var portal = (PortalInfo)portals[intPortal]; - moduleDefId = RemoveModule(desktopModuleName, tabName, portal.AdminTabId, removeTab); - } - - break; - } - - DesktopModuleInfo desktopModule = null; - if (moduleDefId == Null.NullInteger) - { - desktopModule = DesktopModuleController.GetDesktopModuleByModuleName(desktopModuleName, Null.NullInteger); - desktopModuleId = desktopModule.DesktopModuleID; - } - else - { - // Get the Module Definition - ModuleDefinitionInfo moduleDefinition = ModuleDefinitionController.GetModuleDefinitionByID(moduleDefId); - if (moduleDefinition != null) - { - desktopModuleId = moduleDefinition.DesktopModuleID; - desktopModule = DesktopModuleController.GetDesktopModule(desktopModuleId, Null.NullInteger); - } - } - - if (desktopModule != null) - { - // Delete the Desktop Module - var desktopModuleController = new DesktopModuleController(); - desktopModuleController.DeleteDesktopModule(desktopModuleId); - - // Delete the Package - PackageController.Instance.DeleteExtensionPackage(PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.PackageID == desktopModule.PackageID)); - } - } - - private static void RemoveModuleControl(int moduleDefId, string controlKey) - { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "RemoveModuleControl:" + moduleDefId); - - // get Module Control - var moduleControl = ModuleControlController.GetModuleControlByControlKey(controlKey, moduleDefId); - if (moduleControl != null) - { - ModuleControlController.DeleteModuleControl(moduleControl.ModuleControlID); - } - } - - private static void RemoveModuleFromPortals(string friendlyName) - { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "RemoveModuleFromPortals:" + friendlyName); - DesktopModuleInfo desktopModule = DesktopModuleController.GetDesktopModuleByFriendlyName(friendlyName); - if (desktopModule != null) - { - // Module was incorrectly assigned as "IsPremium=False" - if (desktopModule.PackageID > Null.NullInteger) - { - desktopModule.IsPremium = true; - DesktopModuleController.SaveDesktopModule(desktopModule, false, true); - } - - // Remove the module from Portals - DesktopModuleController.RemoveDesktopModuleFromPortals(desktopModule.DesktopModuleID); - } - } - - private static bool TabPermissionExists(TabPermissionInfo tabPermission, int portalID) - { - return TabPermissionController.GetTabPermissions(tabPermission.TabID, portalID).Cast().Any(permission => permission.TabID == tabPermission.TabID && permission.RoleID == tabPermission.RoleID && permission.PermissionID == tabPermission.PermissionID); - } - - private static void FavIconsToPortalSettings() - { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "FavIconsToPortalSettings"); - const string fileName = "favicon.ico"; - var portals = PortalController.Instance.GetPortals().Cast(); - - foreach (var portalInfo in portals) - { - string localPath = Path.Combine(portalInfo.HomeDirectoryMapPath, fileName); - - if (File.Exists(localPath)) - { - try - { - int fileId; - var folder = FolderManager.Instance.GetFolder(portalInfo.PortalID, string.Empty); - if (!FileManager.Instance.FileExists(folder, fileName)) - { - using (var stream = File.OpenRead(localPath)) - { - FileManager.Instance.AddFile(folder, fileName, stream, /*overwrite*/ false); - } - } - - fileId = FileManager.Instance.GetFile(folder, fileName).FileId; - - new FavIcon(portalInfo.PortalID).Update(fileId); - } - catch (Exception e) - { - string message = string.Format("Unable to setup Favicon for Portal: {0}", portalInfo.PortalName); - var log = new LogInfo { LogTypeKey = EventLogController.EventLogType.ADMIN_ALERT.ToString() }; - log.AddProperty("Issue", message); - log.AddProperty("ExceptionMessage", e.Message); - log.AddProperty("StackTrace", e.StackTrace); - LogController.Instance.AddLog(log); - - Logger.Warn(message, e); - } - } - } - } - - private static void AddIconToAllowedFiles() - { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "AddIconToAllowedFiles"); - var toAdd = new List { ".ico" }; - HostController.Instance.Update("FileExtensions", Host.AllowedExtensionWhitelist.ToStorageString(toAdd)); - } - - private static void UpgradeToVersion323() - { - // add new SecurityException - string configFile = Globals.HostMapPath + "Logs\\LogConfig\\SecurityExceptionTemplate.xml.resources"; - LogController.Instance.AddLogType(configFile, Null.NullString); - } - - private static void UpgradeToVersion440() - { - // remove module cache files with *.htm extension ( they are now securely named *.resources ) - var portals = PortalController.Instance.GetPortals(); - foreach (PortalInfo objPortal in portals) - { - if (Directory.Exists(Globals.ApplicationMapPath + "\\Portals\\" + objPortal.PortalID + "\\Cache\\")) - { - string[] files = Directory.GetFiles(Globals.ApplicationMapPath + "\\Portals\\" + objPortal.PortalID + "\\Cache\\", "*.htm"); - foreach (string file in files) - { - File.Delete(file); - } - } - } - } - - private static void UpgradeToVersion470() - { - string hostTemplateFile = Globals.HostMapPath + "Templates\\Default.page.template"; - if (File.Exists(hostTemplateFile)) - { - ArrayList portals = PortalController.Instance.GetPortals(); - foreach (PortalInfo portal in portals) - { - string portalTemplateFolder = portal.HomeDirectoryMapPath + "Templates\\"; - - if (!Directory.Exists(portalTemplateFolder)) - { - // Create Portal Templates folder - Directory.CreateDirectory(portalTemplateFolder); - } - - string portalTemplateFile = portalTemplateFolder + "Default.page.template"; - if (!File.Exists(portalTemplateFile)) - { - File.Copy(hostTemplateFile, portalTemplateFile); - - // Synchronize the Templates folder to ensure the templates are accessible - FolderManager.Instance.Synchronize(portal.PortalID, "Templates/", false, true); - } - } - } - } - - private static void UpgradeToVersion482() - { - // checks for the very rare case where the default validationkey prior to 4.08.02 - // is still being used and updates it - Config.UpdateValidationKey(); - } - - private static void UpgradeToVersion500() - { - ArrayList portals = PortalController.Instance.GetPortals(); - - // Add Edit Permissions for Admin Tabs to legacy portals - var permissionController = new PermissionController(); - ArrayList permissions = permissionController.GetPermissionByCodeAndKey("SYSTEM_TAB", "EDIT"); - int permissionId = -1; - if (permissions.Count == 1) - { - var permission = permissions[0] as PermissionInfo; - if (permission != null) - { - permissionId = permission.PermissionID; - } - - foreach (PortalInfo portal in portals) - { - var adminTab = TabController.Instance.GetTab(portal.AdminTabId, portal.PortalID, true); - if (adminTab != null) - { - var tabPermission = new TabPermissionInfo { TabID = adminTab.TabID, PermissionID = permissionId, AllowAccess = true, RoleID = portal.AdministratorRoleId }; - if (!TabPermissionExists(tabPermission, portal.PortalID)) - { - adminTab.TabPermissions.Add(tabPermission); - } - - // Save Tab Permissions to Data Base - TabPermissionController.SaveTabPermissions(adminTab); - - foreach (var childTab in TabController.GetTabsByParent(portal.AdminTabId, portal.PortalID)) - { - tabPermission = new TabPermissionInfo { TabID = childTab.TabID, PermissionID = permissionId, AllowAccess = true, RoleID = portal.AdministratorRoleId }; - if (!TabPermissionExists(tabPermission, portal.PortalID)) - { - childTab.TabPermissions.Add(tabPermission); - } - - // Save Tab Permissions to Data Base - TabPermissionController.SaveTabPermissions(childTab); - } - } - } - } - - // Update Host/Admin modules Visibility setting - bool superTabProcessed = Null.NullBoolean; - foreach (PortalInfo portal in portals) - { - if (!superTabProcessed) - { - // Process Host Tabs - foreach (TabInfo childTab in TabController.GetTabsByParent(portal.SuperTabId, Null.NullInteger)) - { - foreach (ModuleInfo tabModule in ModuleController.Instance.GetTabModules(childTab.TabID).Values) - { - tabModule.Visibility = VisibilityState.None; - ModuleController.Instance.UpdateModule(tabModule); - } - } - } - - // Process Portal Tabs - foreach (TabInfo childTab in TabController.GetTabsByParent(portal.AdminTabId, portal.PortalID)) - { - foreach (ModuleInfo tabModule in ModuleController.Instance.GetTabModules(childTab.TabID).Values) - { - tabModule.Visibility = VisibilityState.None; - ModuleController.Instance.UpdateModule(tabModule); - } - } - } - - // Upgrade PortalDesktopModules to support new "model" - permissions = permissionController.GetPermissionByCodeAndKey("SYSTEM_DESKTOPMODULE", "DEPLOY"); - if (permissions.Count == 1) - { - var permission = permissions[0] as PermissionInfo; - if (permission != null) - { - permissionId = permission.PermissionID; - } - - foreach (PortalInfo portal in portals) - { - foreach (DesktopModuleInfo desktopModule in DesktopModuleController.GetDesktopModules(Null.NullInteger).Values) - { - if (!desktopModule.IsPremium) - { - // Parse the permissions - var deployPermissions = new DesktopModulePermissionCollection(); - DesktopModulePermissionInfo deployPermission; - - // if Not IsAdmin add Registered Users - if (!desktopModule.IsAdmin) - { - deployPermission = new DesktopModulePermissionInfo { PermissionID = permissionId, AllowAccess = true, RoleID = portal.RegisteredRoleId }; - deployPermissions.Add(deployPermission); - } - - // if Not a Host Module add Administrators - const string hostModules = "Portals, SQL, HostSettings, Scheduler, SearchAdmin, Lists, SkinDesigner, Extensions"; - if (!hostModules.Contains(desktopModule.ModuleName)) - { - deployPermission = new DesktopModulePermissionInfo { PermissionID = permissionId, AllowAccess = true, RoleID = portal.AdministratorRoleId }; - deployPermissions.Add(deployPermission); - } - - // Add Portal/Module to PortalDesktopModules - DesktopModuleController.AddDesktopModuleToPortal(portal.PortalID, desktopModule, deployPermissions, false); - } - } - - DataCache.ClearPortalCache(portal.PortalID, true); - } - } - - LegacyUtil.ProcessLegacyModules(); - LegacyUtil.ProcessLegacyLanguages(); - LegacyUtil.ProcessLegacySkins(); - LegacyUtil.ProcessLegacySkinControls(); - } - - private static void UpgradeToVersion501() - { - // add new Cache Error Event Type - string configFile = string.Format("{0}Logs\\LogConfig\\CacheErrorTemplate.xml.resources", Globals.HostMapPath); - LogController.Instance.AddLogType(configFile, Null.NullString); - } - - private static void UpgradeToVersion510() - { - int moduleDefId; - - // add Dashboard module and tab - if (HostTabExists("Dashboard") == false) - { - moduleDefId = AddModuleDefinition("Dashboard", "Provides a snapshot of your DotNetNuke Application.", "Dashboard", true, true); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/Dashboard/Dashboard.ascx", "icon_dashboard_32px.gif", SecurityAccessLevel.Host, 0); - AddModuleControl(moduleDefId, "Export", string.Empty, "DesktopModules/Admin/Dashboard/Export.ascx", string.Empty, SecurityAccessLevel.Host, 0); - AddModuleControl(moduleDefId, "DashboardControls", string.Empty, "DesktopModules/Admin/Dashboard/DashboardControls.ascx", string.Empty, SecurityAccessLevel.Host, 0); - - // Create New Host Page (or get existing one) - TabInfo dashboardPage = AddHostPage("Dashboard", "Summary view of application and site settings.", "~/images/icon_dashboard_16px.gif", "~/images/icon_dashboard_32px.gif", true); - - // Add Module To Page - AddModuleToPage(dashboardPage, moduleDefId, "Dashboard", "~/images/icon_dashboard_32px.gif"); - } - else - { - // Module was incorrectly assigned as "IsPremium=False" - RemoveModuleFromPortals("Dashboard"); - - // fix path for dashboarcontrols - moduleDefId = GetModuleDefinition("Dashboard", "Dashboard"); - RemoveModuleControl(moduleDefId, "DashboardControls"); - AddModuleControl(moduleDefId, "DashboardControls", string.Empty, "DesktopModules/Admin/Dashboard/DashboardControls.ascx", string.Empty, SecurityAccessLevel.Host, 0); - } - - // Add the Extensions Module - if (CoreModuleExists("Extensions") == false) - { - moduleDefId = AddModuleDefinition("Extensions", string.Empty, "Extensions"); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/Extensions/Extensions.ascx", "~/images/icon_extensions_32px.png", SecurityAccessLevel.View, 0); - AddModuleControl(moduleDefId, "Edit", "Edit Feature", "DesktopModules/Admin/Extensions/EditExtension.ascx", "~/images/icon_extensions_32px.png", SecurityAccessLevel.Edit, 0); - AddModuleControl(moduleDefId, "PackageWriter", "Package Writer", "DesktopModules/Admin/Extensions/PackageWriter.ascx", "~/images/icon_extensions_32px.png", SecurityAccessLevel.Host, 0); - AddModuleControl(moduleDefId, "EditControl", "Edit Control", "DesktopModules/Admin/Extensions/Editors/EditModuleControl.ascx", "~/images/icon_extensions_32px.png", SecurityAccessLevel.Host, 0); - AddModuleControl(moduleDefId, "ImportModuleDefinition", "Import Module Definition", "DesktopModules/Admin/Extensions/Editors/ImportModuleDefinition.ascx", "~/images/icon_extensions_32px.png", SecurityAccessLevel.Host, 0); - AddModuleControl(moduleDefId, "BatchInstall", "Batch Install", "DesktopModules/Admin/Extensions/BatchInstall.ascx", "~/images/icon_extensions_32px.png", SecurityAccessLevel.Host, 0); - AddModuleControl(moduleDefId, "NewExtension", "New Extension Wizard", "DesktopModules/Admin/Extensions/ExtensionWizard.ascx", "~/images/icon_extensions_32px.png", SecurityAccessLevel.Host, 0); - AddModuleControl(moduleDefId, "UsageDetails", "Usage Information", "DesktopModules/Admin/Extensions/UsageDetails.ascx", "~/images/icon_extensions_32px.png", SecurityAccessLevel.Host, 0, string.Empty, true); - } - else - { - moduleDefId = GetModuleDefinition("Extensions", "Extensions"); - RemoveModuleControl(moduleDefId, "EditLanguage"); - RemoveModuleControl(moduleDefId, "TimeZone"); - RemoveModuleControl(moduleDefId, "Verify"); - RemoveModuleControl(moduleDefId, "LanguageSettings"); - RemoveModuleControl(moduleDefId, "EditResourceKey"); - RemoveModuleControl(moduleDefId, "EditSkins"); - AddModuleControl(moduleDefId, "UsageDetails", "Usage Information", "DesktopModules/Admin/Extensions/UsageDetails.ascx", "~/images/icon_extensions_32px.png", SecurityAccessLevel.Host, 0, string.Empty, true); - - // Module was incorrectly assigned as "IsPremium=False" - RemoveModuleFromPortals("Extensions"); - } - - // Remove Module Definitions Module from Host Page (if present) - RemoveCoreModule("Module Definitions", "Host", "Module Definitions", false); - - // Remove old Module Definition DynamicContentValidator module - DesktopModuleController.DeleteDesktopModule("Module Definition DynamicContentValidator"); - - // Get Module Definitions - TabInfo definitionsPage = TabController.Instance.GetTabByName("Module Definitions", Null.NullInteger); - - // Add Module To Page if not present - int moduleId = AddModuleToPage(definitionsPage, moduleDefId, "Module Definitions", "~/images/icon_moduledefinitions_32px.gif"); - ModuleController.Instance.UpdateModuleSetting(moduleId, "Extensions_Mode", "Module"); - - // Add Extensions Host Page - TabInfo extensionsPage = AddHostPage("Extensions", "Install, add, modify and delete extensions, such as modules, skins and language packs.", "~/images/icon_extensions_16px.gif", "~/images/icon_extensions_32px.png", true); - - moduleId = AddModuleToPage(extensionsPage, moduleDefId, "Extensions", "~/images/icon_extensions_32px.png"); - ModuleController.Instance.UpdateModuleSetting(moduleId, "Extensions_Mode", "All"); - - // Add Extensions Module to Admin Page for all Portals - AddAdminPages("Extensions", "Install, add, modify and delete extensions, such as modules, skins and language packs.", "~/images/icon_extensions_16px.gif", "~/images/icon_extensions_32px.png", true, moduleDefId, "Extensions", "~/images/icon_extensions_32px.png"); - - // Remove Host Languages Page - RemoveHostPage("Languages"); - - // Remove Admin > Authentication Pages - RemoveAdminPages("//Admin//Authentication"); - - // Remove old Languages module - DesktopModuleController.DeleteDesktopModule("Languages"); - - // Add new Languages module - moduleDefId = AddModuleDefinition("Languages", string.Empty, "Languages", false, false); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/Languages/languageeditor.ascx", "~/images/icon_language_32px.gif", SecurityAccessLevel.View, 0); - AddModuleControl(moduleDefId, "Edit", "Edit Language", "DesktopModules/Admin/Languages/EditLanguage.ascx", "~/images/icon_language_32px.gif", SecurityAccessLevel.Edit, 0); - AddModuleControl(moduleDefId, "EditResourceKey", "Full Language Editor", "DesktopModules/Admin/Languages/languageeditorext.ascx", "~/images/icon_language_32px.gif", SecurityAccessLevel.Edit, 0); - AddModuleControl(moduleDefId, "LanguageSettings", "Language Settings", "DesktopModules/Admin/Languages/LanguageSettings.ascx", string.Empty, SecurityAccessLevel.Edit, 0); - AddModuleControl(moduleDefId, "TimeZone", "TimeZone Editor", "DesktopModules/Admin/Languages/timezoneeditor.ascx", "~/images/icon_language_32px.gif", SecurityAccessLevel.Host, 0); - AddModuleControl(moduleDefId, "Verify", "Resource File Verifier", "DesktopModules/Admin/Languages/resourceverifier.ascx", string.Empty, SecurityAccessLevel.Host, 0); - AddModuleControl(moduleDefId, "PackageWriter", "Language Pack Writer", "DesktopModules/Admin/Languages/LanguagePackWriter.ascx", string.Empty, SecurityAccessLevel.Host, 0); - - // Add Module to Admin Page for all Portals - AddAdminPages("Languages", "Manage Language Resources.", "~/images/icon_language_16px.gif", "~/images/icon_language_32px.gif", true, moduleDefId, "Language Editor", "~/images/icon_language_32px.gif"); - - // Remove Host Skins Page - RemoveHostPage("Skins"); - - // Remove old Skins module - DesktopModuleController.DeleteDesktopModule("Skins"); - - // Add new Skins module - moduleDefId = AddModuleDefinition("Skins", string.Empty, "Skins", false, false); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/Skins/editskins.ascx", "~/images/icon_skins_32px.gif", SecurityAccessLevel.View, 0); - - // Add Module to Admin Page for all Portals - AddAdminPages("Skins", "Manage Skin Resources.", "~/images/icon_skins_16px.gif", "~/images/icon_skins_32px.gif", true, moduleDefId, "Skin Editor", "~/images/icon_skins_32px.gif"); - - // Remove old Skin Designer module - DesktopModuleController.DeleteDesktopModule("Skin Designer"); - DesktopModuleController.DeleteDesktopModule("SkinDesigner"); - - // Add new Skin Designer module - moduleDefId = AddModuleDefinition("Skin Designer", "Allows you to modify skin attributes.", "Skin Designer", true, true); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/SkinDesigner/Attributes.ascx", "~/images/icon_skins_32px.gif", SecurityAccessLevel.Host, 0); - - // Add new Skin Designer to every Admin Skins Tab - AddModuleToPages("//Admin//Skins", moduleDefId, "Skin Designer", "~/images/icon_skins_32px.gif", true); - - // Remove Admin Whats New Page - RemoveAdminPages("//Admin//WhatsNew"); - - // WhatsNew needs to be set to IsPremium and removed from all portals - RemoveModuleFromPortals("WhatsNew"); - - // Create New WhatsNew Host Page (or get existing one) - TabInfo newPage = AddHostPage("What's New", "Provides a summary of the major features for each release.", "~/images/icon_whatsnew_16px.gif", "~/images/icon_whatsnew_32px.gif", true); - - // Add WhatsNew Module To Page - moduleDefId = GetModuleDefinition("WhatsNew", "WhatsNew"); - AddModuleToPage(newPage, moduleDefId, "What's New", "~/images/icon_whatsnew_32px.gif"); - - // add console module - moduleDefId = AddModuleDefinition("Console", "Display children pages as icon links for navigation.", "Console", "DotNetNuke.Modules.Console.Components.ConsoleController", true, false, false); - AddModuleControl(moduleDefId, string.Empty, "Console", "DesktopModules/Admin/Console/ViewConsole.ascx", string.Empty, SecurityAccessLevel.Anonymous, 0); - AddModuleControl(moduleDefId, "Settings", "Console Settings", "DesktopModules/Admin/Console/Settings.ascx", string.Empty, SecurityAccessLevel.Admin, 0); - - // add console module to host page - moduleId = AddModuleToPage("//Host", Null.NullInteger, moduleDefId, "Basic Features", string.Empty, true); - int tabId = TabController.GetTabByTabPath(Null.NullInteger, "//Host", Null.NullString); - TabInfo tab; - - // add console settings for host page - if (tabId != Null.NullInteger) - { - tab = TabController.Instance.GetTab(tabId, Null.NullInteger, true); - if (tab != null) - { - AddConsoleModuleSettings(moduleId); - } - } - - // add module to all admin pages - foreach (PortalInfo portal in PortalController.Instance.GetPortals()) - { - tabId = TabController.GetTabByTabPath(portal.PortalID, "//Admin", Null.NullString); - if (tabId != Null.NullInteger) - { - tab = TabController.Instance.GetTab(tabId, portal.PortalID, true); - if (tab != null) - { - moduleId = AddModuleToPage(tab, moduleDefId, "Basic Features", string.Empty, true); - AddConsoleModuleSettings(moduleId); - } - } - } - - // Add Google Analytics module - moduleDefId = AddModuleDefinition("Google Analytics", "Configure Site Google Analytics settings.", "GoogleAnalytics", false, false); - AddModuleControl(moduleDefId, string.Empty, "Google Analytics", "DesktopModules/Admin/Analytics/GoogleAnalyticsSettings.ascx", string.Empty, SecurityAccessLevel.Admin, 0); - AddAdminPages("Google Analytics", "Configure Site Google Analytics settings.", "~/images/icon_analytics_16px.gif", "~/images/icon_analytics_32px.gif", true, moduleDefId, "Google Analytics", "~/images/icon_analytics_32px.gif"); - } - - private static void UpgradeToVersion511() - { - // New Admin pages may not have administrator permission - // Add Admin role if it does not exist for google analytics or extensions - AddAdminRoleToPage("//Admin//Extensions"); - AddAdminRoleToPage("//Admin//GoogleAnalytics"); - } - - private static void UpgradeToVersion513() - { - // Ensure that default language is present (not neccessarily enabled) - var defaultLanguage = LocaleController.Instance.GetLocale("en-US") ?? new Locale(); - defaultLanguage.Code = "en-US"; - defaultLanguage.Text = "English (United States)"; - Localization.SaveLanguage(defaultLanguage); - - // Ensure that there is a Default Authorization System - var package = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DefaultAuthentication"); - if (package == null) - { - package = new PackageInfo - { - Name = "DefaultAuthentication", - FriendlyName = "Default Authentication", - Description = "The Default UserName/Password Authentication System for DotNetNuke.", - PackageType = "Auth_System", - Version = new Version(1, 0, 0), - Owner = "DNN", - License = Localization.GetString("License", Localization.GlobalResourceFile), - Organization = ".NET Foundation", - Url = "https://dnncommunity.org", - Email = "info@dnncommunity.org", - ReleaseNotes = "There are no release notes for this version.", - IsSystemPackage = true, - }; - PackageController.Instance.SaveExtensionPackage(package); - - // Add Authentication System - var authSystem = AuthenticationController.GetAuthenticationServiceByType("DNN") ?? new AuthenticationInfo(); - authSystem.PackageID = package.PackageID; - authSystem.AuthenticationType = "DNN"; - authSystem.SettingsControlSrc = "DesktopModules/AuthenticationServices/DNN/Settings.ascx"; - authSystem.LoginControlSrc = "DesktopModules/AuthenticationServices/DNN/Login.ascx"; - authSystem.IsEnabled = true; - - if (authSystem.AuthenticationID == Null.NullInteger) - { - AuthenticationController.AddAuthentication(authSystem); - } - else - { - AuthenticationController.UpdateAuthentication(authSystem); - } - } - } - - private static void UpgradeToVersion520() - { - // Add new ViewSource control - AddModuleControl(Null.NullInteger, "ViewSource", "View Module Source", "Admin/Modules/ViewSource.ascx", "~/images/icon_source_32px.gif", SecurityAccessLevel.Host, 0, string.Empty, true); - - // Add Marketplace module definition - int moduleDefId = AddModuleDefinition("Marketplace", "Search for DotNetNuke modules, extension and skins.", "Marketplace"); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/Marketplace/Marketplace.ascx", "~/images/icon_marketplace_32px.gif", SecurityAccessLevel.Host, 0); - - // Add marketplace Module To Page - TabInfo newPage = AddHostPage("Marketplace", "Search for DotNetNuke modules, extension and skins.", "~/images/icon_marketplace_16px.gif", "~/images/icon_marketplace_32px.gif", true); - moduleDefId = GetModuleDefinition("Marketplace", "Marketplace"); - AddModuleToPage(newPage, moduleDefId, "Marketplace", "~/images/icon_marketplace_32px.gif"); - } - - private static void UpgradeToVersion521() - { - // UpgradeDefaultLanguages is a temporary procedure containing code that - // needed to execute after the 5.1.3 application upgrade code above - DataProvider.Instance().ExecuteNonQuery("UpgradeDefaultLanguages"); - - // This procedure is not intended to be part of the database schema - // and is therefore dropped once it has been executed. - using (DataProvider.Instance().ExecuteSQL("DROP PROCEDURE {databaseOwner}{objectQualifier}UpgradeDefaultLanguages")) - { - } - } - - private static void UpgradeToVersion530() - { - // update languages module - int moduleDefId = GetModuleDefinition("Languages", "Languages"); - RemoveModuleControl(moduleDefId, string.Empty); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/Languages/languageEnabler.ascx", "~/images/icon_language_32px.gif", SecurityAccessLevel.View, 0, string.Empty, true); - AddModuleControl(moduleDefId, "Editor", string.Empty, "DesktopModules/Admin/Languages/languageeditor.ascx", "~/images/icon_language_32px.gif", SecurityAccessLevel.View, 0); - - // Add new View Profile module - moduleDefId = AddModuleDefinition("ViewProfile", string.Empty, "ViewProfile", false, false); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/ViewProfile/ViewProfile.ascx", "~/images/icon_profile_32px.gif", SecurityAccessLevel.View, 0); - AddModuleControl(moduleDefId, "Settings", "Settings", "DesktopModules/Admin/ViewProfile/Settings.ascx", "~/images/icon_profile_32px.gif", SecurityAccessLevel.Edit, 0); - - // Add new Sitemap settings module - moduleDefId = AddModuleDefinition("Sitemap", string.Empty, "Sitemap", false, false); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/Sitemap/SitemapSettings.ascx", "~/images/icon_analytics_32px.gif", SecurityAccessLevel.View, 0); - AddAdminPages("Search Engine Sitemap", "Configure the sitemap for submission to common search engines.", "~/images/icon_analytics_16px.gif", "~/images/icon_analytics_32px.gif", true, moduleDefId, "Search Engine Sitemap", "~/images/icon_analytics_32px.gif"); - - // Add new Photo Profile field to Host - var listController = new ListController(); - Dictionary dataTypes = listController.GetListEntryInfoDictionary("DataType"); - - var properties = ProfileController.GetPropertyDefinitionsByPortal(Null.NullInteger); - ProfileController.AddDefaultDefinition(Null.NullInteger, "Preferences", "Photo", "Image", 0, (properties.Count * 2) + 2, UserVisibilityMode.AllUsers, dataTypes); - - string installTemplateFile = string.Format("{0}Template\\UserProfile.page.template", Globals.InstallMapPath); - string hostTemplateFile = string.Format("{0}Templates\\UserProfile.page.template", Globals.HostMapPath); - if (File.Exists(installTemplateFile)) - { - if (!File.Exists(hostTemplateFile)) - { - File.Copy(installTemplateFile, hostTemplateFile); - } - } - - if (File.Exists(hostTemplateFile)) - { - ArrayList portals = PortalController.Instance.GetPortals(); - foreach (PortalInfo portal in portals) - { - properties = ProfileController.GetPropertyDefinitionsByPortal(portal.PortalID); - - // Add new Photo Profile field to Portal - ProfileController.AddDefaultDefinition(portal.PortalID, "Preferences", "Photo", "Image", 0, (properties.Count * 2) + 2, UserVisibilityMode.AllUsers, dataTypes); - - // Rename old Default Page template - string defaultPageTemplatePath = string.Format("{0}Templates\\Default.page.template", portal.HomeDirectoryMapPath); - if (File.Exists(defaultPageTemplatePath)) - { - File.Move(defaultPageTemplatePath, string.Format("{0}Templates\\Default_old.page.template", portal.HomeDirectoryMapPath)); - } - - // Update Default profile template in every portal - PortalController.Instance.CopyPageTemplate("Default.page.template", portal.HomeDirectoryMapPath); - - // Add User profile template to every portal - PortalController.Instance.CopyPageTemplate("UserProfile.page.template", portal.HomeDirectoryMapPath); - - // Synchronize the Templates folder to ensure the templates are accessible - FolderManager.Instance.Synchronize(portal.PortalID, "Templates/", false, true); - - var xmlDoc = new XmlDocument { XmlResolver = null }; - try - { - // open the XML file - xmlDoc.Load(hostTemplateFile); - } - catch (Exception ex) - { - Exceptions.Exceptions.LogException(ex); - } - - XmlNode userTabNode = xmlDoc.SelectSingleNode("//portal/tabs/tab"); - if (userTabNode != null) - { - string tabName = XmlUtils.GetNodeValue(userTabNode.CreateNavigator(), "name"); - - var userTab = TabController.Instance.GetTabByName(tabName, portal.PortalID) ?? TabController.DeserializeTab(userTabNode, null, portal.PortalID, PortalTemplateModuleAction.Merge); - - // Update SiteSettings to point to the new page - if (portal.UserTabId > Null.NullInteger) - { - portal.RegisterTabId = portal.UserTabId; - } - else - { - portal.UserTabId = userTab.TabID; - } - } - - PortalController.Instance.UpdatePortalInfo(portal); - - // Add Users folder to every portal - string usersFolder = string.Format("{0}Users\\", portal.HomeDirectoryMapPath); - - if (!Directory.Exists(usersFolder)) - { - // Create Users folder - Directory.CreateDirectory(usersFolder); - - // Synchronize the Users folder to ensure the user folder is accessible - FolderManager.Instance.Synchronize(portal.PortalID, "Users/", false, true); - } - } - } - - AddEventQueueApplicationStartFirstRequest(); - - // Change Key for Module Defintions; - moduleDefId = GetModuleDefinition("Extensions", "Extensions"); - RemoveModuleControl(moduleDefId, "ImportModuleDefinition"); - AddModuleControl(moduleDefId, "EditModuleDefinition", "Edit Module Definition", "DesktopModules/Admin/Extensions/Editors/EditModuleDefinition.ascx", "~/images/icon_extensions_32px.png", SecurityAccessLevel.Host, 0); - - // Module was incorrectly assigned as "IsPremium=False" - RemoveModuleFromPortals("Users And Roles"); - } - - private static void UpgradeToVersion540() - { - var configDoc = Config.Load(); - var configNavigator = configDoc.CreateNavigator().SelectSingleNode("/configuration/system.web.extensions"); - if (configNavigator == null) - { - // attempt to remove "System.Web.Extensions" configuration section - string upgradeFile = string.Format("{0}\\Config\\SystemWebExtensions.config", Globals.InstallMapPath); - string message = UpdateConfig(upgradeFile, ApplicationVersion, "Remove System.Web.Extensions"); - EventLogController.Instance.AddLog( - "UpgradeConfig", - string.IsNullOrEmpty(message) - ? "Remove System Web Extensions" - : string.Format("Remove System Web Extensions failed. Error reported during attempt to update:{0}", message), - PortalController.Instance.GetCurrentPortalSettings(), - UserController.Instance.GetCurrentUserInfo().UserID, - EventLogController.EventLogType.HOST_ALERT); - } - - // Add Styles Skin Object - AddSkinControl("TAGS", "DotNetNuke.TagsSkinObject", "Admin/Skins/Tags.ascx"); - - // Add Content List module definition - int moduleDefId = AddModuleDefinition("ContentList", "This module displays a list of content by tag.", "Content List"); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/ContentList/ContentList.ascx", string.Empty, SecurityAccessLevel.View, 0); - - // Update registration page - ArrayList portals = PortalController.Instance.GetPortals(); - foreach (PortalInfo portal in portals) - { - // objPortal.RegisterTabId = objPortal.UserTabId; - PortalController.Instance.UpdatePortalInfo(portal); - - // Add ContentList to Search Results Page - int tabId = TabController.GetTabByTabPath(portal.PortalID, "//SearchResults", Null.NullString); - TabInfo searchPage = TabController.Instance.GetTab(tabId, portal.PortalID, false); - AddModuleToPage(searchPage, moduleDefId, "Results", string.Empty); - } - } - - private static void UpgradeToVersion543() - { - // get log file path - string logFilePath = DataProvider.Instance().GetProviderPath(); - if (Directory.Exists(logFilePath)) - { - // get log files - foreach (string fileName in Directory.GetFiles(logFilePath, "*.log")) - { - if (File.Exists(fileName + ".resources")) - { - File.Delete(fileName + ".resources"); - } - - // copy requires use of move - File.Move(fileName, fileName + ".resources"); - } - } - } - - private static void UpgradeToVersion550() - { - // update languages module - int moduleDefId = GetModuleDefinition("Languages", "Languages"); - AddModuleControl(moduleDefId, "TranslationStatus", string.Empty, "DesktopModules/Admin/Languages/TranslationStatus.ascx", "~/images/icon_language_32px.gif", SecurityAccessLevel.Edit, 0); - - // due to an error in 5.3.0 we need to recheck and readd Application_Start_FirstRequest - AddEventQueueApplicationStartFirstRequest(); - - // check if UserProfile page template exists in Host folder and if not, copy it from Install folder - string installTemplateFile = string.Format("{0}Templates\\UserProfile.page.template", Globals.InstallMapPath); - if (File.Exists(installTemplateFile)) - { - string hostTemplateFile = string.Format("{0}Templates\\UserProfile.page.template", Globals.HostMapPath); - if (!File.Exists(hostTemplateFile)) - { - File.Copy(installTemplateFile, hostTemplateFile); - } - } - - // Fix the permission for User Folders - foreach (PortalInfo portal in PortalController.Instance.GetPortals()) - { - foreach (FolderInfo folder in FolderManager.Instance.GetFolders(portal.PortalID)) - { - if (folder.FolderPath.StartsWith("Users/")) - { - foreach (PermissionInfo permission in PermissionController.GetPermissionsByFolder()) - { - if (permission.PermissionKey.Equals("READ", StringComparison.InvariantCultureIgnoreCase)) - { - // Add All Users Read Access to the folder - int roleId = int.Parse(Globals.glbRoleAllUsers); - if (!folder.FolderPermissions.Contains(permission.PermissionKey, folder.FolderID, roleId, Null.NullInteger)) - { - var folderPermission = new FolderPermissionInfo(permission) { FolderID = folder.FolderID, UserID = Null.NullInteger, RoleID = roleId, AllowAccess = true }; - - folder.FolderPermissions.Add(folderPermission); - } - } - } - - FolderPermissionController.SaveFolderPermissions(folder); - } - } - - // Remove user page template from portal if it exists (from 5.3) - if (File.Exists(string.Format("{0}Templates\\UserProfile.page.template", portal.HomeDirectoryMapPath))) - { - File.Delete(string.Format("{0}Templates\\UserProfile.page.template", portal.HomeDirectoryMapPath)); - } - } - - // DNN-12894 - Country Code for "United Kingdom" is incorrect - var listController = new ListController(); - var listItem = listController.GetListEntryInfo("Country", "UK"); - if (listItem != null) - { - listItem.Value = "GB"; - listController.UpdateListEntry(listItem); - } - - foreach (PortalInfo portal in PortalController.Instance.GetPortals()) - { - // fix issue where portal default language may be disabled - string defaultLanguage = portal.DefaultLanguage; - if (!IsLanguageEnabled(portal.PortalID, defaultLanguage)) - { - Locale language = LocaleController.Instance.GetLocale(defaultLanguage); - Localization.AddLanguageToPortal(portal.PortalID, language.LanguageId, true); - } - - // preemptively create any missing localization records rather than relying on dynamic creation - foreach (Locale locale in LocaleController.Instance.GetLocales(portal.PortalID).Values) - { - DataProvider.Instance().EnsureLocalizationExists(portal.PortalID, locale.Code); - } - } - } - - private static void UpgradeToVersion560() - { - // Add .htmtemplate file extension - var toAdd = new List { ".htmtemplate" }; - HostController.Instance.Update("FileExtensions", Host.AllowedExtensionWhitelist.ToStorageString(toAdd)); - - // Add new Xml Merge module - int moduleDefId = AddModuleDefinition("Configuration Manager", string.Empty, "Configuration Manager", false, false); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/XmlMerge/XmlMerge.ascx", "~/images/icon_configuration_32px.png", SecurityAccessLevel.Host, 0); - - // Add Module To Page - TabInfo hostPage = AddHostPage("Configuration Manager", "Modify configuration settings for your site", "~/images/icon_configuration_16px.png", "~/images/icon_configuration_32px.png", true); - AddModuleToPage(hostPage, moduleDefId, "Configuration Manager", "~/images/icon_configuration_32px.png"); - - // Update Google Analytics Script in SiteAnalysis.config - var googleAnalyticsController = new GoogleAnalyticsController(); - googleAnalyticsController.UpgradeModule("05.06.00"); - - // Updated LanguageSettings.ascx control to be a Settings control - ModuleDefinitionInfo languageModule = ModuleDefinitionController.GetModuleDefinitionByFriendlyName("Languages"); - ModuleControlInfo moduleControl = ModuleControlController.GetModuleControlsByModuleDefinitionID(languageModule.ModuleDefID)["LanguageSettings"]; - moduleControl.ControlKey = "Settings"; - ModuleControlController.UpdateModuleControl(moduleControl); - } - - private static void UpgradeToVersion562() - { - // Add new Photo Profile field to Host - var listController = new ListController(); - Dictionary dataTypes = listController.GetListEntryInfoDictionary("DataType"); - - var properties = ProfileController.GetPropertyDefinitionsByPortal(Null.NullInteger); - ProfileController.AddDefaultDefinition(Null.NullInteger, "Preferences", "Photo", "Image", 0, (properties.Count * 2) + 2, UserVisibilityMode.AllUsers, dataTypes); - - HostController.Instance.Update("AutoAddPortalAlias", Globals.Status == Globals.UpgradeStatus.Install ? "Y" : "N"); - - // remove the system message module from the admin tab - // System Messages are now managed through Localization - if (CoreModuleExists("System Messages")) - { - RemoveCoreModule("System Messages", "Admin", "Site Settings", false); - } - - // remove portal alias module - if (CoreModuleExists("PortalAliases")) - { - RemoveCoreModule("PortalAliases", "Admin", "Site Settings", false); - } - - // add the log viewer module to the admin tab - int moduleDefId; - if (CoreModuleExists("LogViewer") == false) - { - moduleDefId = AddModuleDefinition("LogViewer", "Allows you to view log entries for site events.", "Log Viewer"); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/LogViewer/LogViewer.ascx", string.Empty, SecurityAccessLevel.Admin, 0); - AddModuleControl(moduleDefId, "Edit", "Edit Log Settings", "DesktopModules/Admin/LogViewer/EditLogTypes.ascx", string.Empty, SecurityAccessLevel.Host, 0); - - // Add the Module/Page to all configured portals - AddAdminPages("Log Viewer", "View a historical log of database events such as event schedules, exceptions, account logins, module and page changes, user account activities, security role activities, etc.", "icon_viewstats_16px.gif", "icon_viewstats_32px.gif", true, moduleDefId, "Log Viewer", "icon_viewstats_16px.gif"); - } - - // add the schedule module to the host tab - TabInfo newPage; - if (CoreModuleExists("Scheduler") == false) - { - moduleDefId = AddModuleDefinition("Scheduler", "Allows you to schedule tasks to be run at specified intervals.", "Scheduler"); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/Scheduler/ViewSchedule.ascx", string.Empty, SecurityAccessLevel.Admin, 0); - AddModuleControl(moduleDefId, "Edit", "Edit Schedule", "DesktopModules/Admin/Scheduler/EditSchedule.ascx", string.Empty, SecurityAccessLevel.Host, 0); - AddModuleControl(moduleDefId, "History", "Schedule History", "DesktopModules/Admin/Scheduler/ViewScheduleHistory.ascx", string.Empty, SecurityAccessLevel.Host, 0); - AddModuleControl(moduleDefId, "Status", "Schedule Status", "DesktopModules/Admin/Scheduler/ViewScheduleStatus.ascx", string.Empty, SecurityAccessLevel.Host, 0); - - // Create New Host Page (or get existing one) - newPage = AddHostPage("Schedule", "Add, modify and delete scheduled tasks to be run at specified intervals.", "icon_scheduler_16px.gif", "icon_scheduler_32px.gif", true); - - // Add Module To Page - AddModuleToPage(newPage, moduleDefId, "Schedule", "icon_scheduler_16px.gif"); - } - - // add the Search Admin module to the host tab - if (CoreModuleExists("SearchAdmin") == false) - { - moduleDefId = AddModuleDefinition("SearchAdmin", "The Search Admininstrator provides the ability to manage search settings.", "Search Admin"); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/SearchAdmin/SearchAdmin.ascx", string.Empty, SecurityAccessLevel.Host, 0); - - // Create New Host Page (or get existing one) - newPage = AddHostPage("Search Admin", "Manage search settings associated with DotNetNuke's search capability.", "icon_search_16px.gif", "icon_search_32px.gif", true); - - // Add Module To Page - AddModuleToPage(newPage, moduleDefId, "Search Admin", "icon_search_16px.gif"); - } - - // add the Search Input module - if (CoreModuleExists("SearchInput") == false) - { - moduleDefId = AddModuleDefinition("SearchInput", "The Search Input module provides the ability to submit a search to a given search results module.", "Search Input", false, false); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/SearchInput/SearchInput.ascx", string.Empty, SecurityAccessLevel.Anonymous, 0); - AddModuleControl(moduleDefId, "Settings", "Search Input Settings", "DesktopModules/Admin/SearchInput/Settings.ascx", string.Empty, SecurityAccessLevel.Edit, 0); - } - - // add the Search Results module - if (CoreModuleExists("SearchResults") == false) - { - moduleDefId = AddModuleDefinition("SearchResults", "The Search Reasults module provides the ability to display search results.", "Search Results", false, false); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/SearchResults/SearchResults.ascx", string.Empty, SecurityAccessLevel.Anonymous, 0); - AddModuleControl(moduleDefId, "Settings", "Search Results Settings", "DesktopModules/Admin/SearchResults/Settings.ascx", string.Empty, SecurityAccessLevel.Edit, 0); - - // Add the Search Module/Page to all configured portals - AddSearchResults(moduleDefId); - } - - // add the site wizard module to the admin tab - if (CoreModuleExists("SiteWizard") == false) - { - moduleDefId = AddModuleDefinition("SiteWizard", "The Administrator can use this user-friendly wizard to set up the common Extensions of the Portal/Site.", "Site Wizard"); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/SiteWizard/Sitewizard.ascx", string.Empty, SecurityAccessLevel.Admin, 0); - AddAdminPages("Site Wizard", "Configure portal settings, page design and apply a site template using a step-by-step wizard.", "icon_wizard_16px.gif", "icon_wizard_32px.gif", true, moduleDefId, "Site Wizard", "icon_wizard_16px.gif"); - } - - // add Lists module and tab - if (HostTabExists("Lists") == false) - { - moduleDefId = AddModuleDefinition("Lists", "Allows you to edit common lists.", "Lists"); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/Lists/ListEditor.ascx", string.Empty, SecurityAccessLevel.Host, 0); - - // Create New Host Page (or get existing one) - newPage = AddHostPage("Lists", "Manage common lists.", "icon_lists_16px.gif", "icon_lists_32px.gif", true); - - // Add Module To Page - AddModuleToPage(newPage, moduleDefId, "Lists", "icon_lists_16px.gif"); - } - - if (HostTabExists("Superuser Accounts") == false) - { - // add SuperUser Accounts module and tab - DesktopModuleInfo objDesktopModuleInfo = DesktopModuleController.GetDesktopModuleByModuleName("Security", Null.NullInteger); - moduleDefId = ModuleDefinitionController.GetModuleDefinitionByFriendlyName("User Accounts", objDesktopModuleInfo.DesktopModuleID).ModuleDefID; - - // Create New Host Page (or get existing one) - newPage = AddHostPage("Superuser Accounts", "Manage host user accounts.", "icon_users_16px.gif", "icon_users_32px.gif", true); - - // Add Module To Page - AddModuleToPage(newPage, moduleDefId, "SuperUser Accounts", "icon_users_32px.gif"); - } - - // Add Edit Role Groups - moduleDefId = GetModuleDefinition("Security", "Security Roles"); - AddModuleControl(moduleDefId, "EditGroup", "Edit Role Groups", "DesktopModules/Admin/Security/EditGroups.ascx", "icon_securityroles_32px.gif", SecurityAccessLevel.Edit, Null.NullInteger); - AddModuleControl(moduleDefId, "UserSettings", "Manage User Settings", "DesktopModules/Admin/Security/UserSettings.ascx", "~/images/settings.gif", SecurityAccessLevel.Edit, Null.NullInteger); - - // Add User Accounts Controls - moduleDefId = GetModuleDefinition("Security", "User Accounts"); - AddModuleControl(moduleDefId, "ManageProfile", "Manage Profile Definition", "DesktopModules/Admin/Security/ProfileDefinitions.ascx", "icon_users_32px.gif", SecurityAccessLevel.Edit, Null.NullInteger); - AddModuleControl(moduleDefId, "EditProfileProperty", "Edit Profile Property Definition", "DesktopModules/Admin/Security/EditProfileDefinition.ascx", "icon_users_32px.gif", SecurityAccessLevel.Edit, Null.NullInteger); - AddModuleControl(moduleDefId, "UserSettings", "Manage User Settings", "DesktopModules/Admin/Security/UserSettings.ascx", "~/images/settings.gif", SecurityAccessLevel.Edit, Null.NullInteger); - AddModuleControl(Null.NullInteger, "Profile", "Profile", "DesktopModules/Admin/Security/ManageUsers.ascx", "icon_users_32px.gif", SecurityAccessLevel.Anonymous, Null.NullInteger); - AddModuleControl(Null.NullInteger, "SendPassword", "Send Password", "DesktopModules/Admin/Security/SendPassword.ascx", string.Empty, SecurityAccessLevel.Anonymous, Null.NullInteger); - AddModuleControl(Null.NullInteger, "ViewProfile", "View Profile", "DesktopModules/Admin/Security/ViewProfile.ascx", "icon_users_32px.gif", SecurityAccessLevel.Anonymous, Null.NullInteger); - - // Update Child Portal subHost.aspx - UpdateChildPortalsDefaultPage(); - - // add the solutions explorer module to the admin tab - if (CoreModuleExists("Solutions") == false) - { - moduleDefId = AddModuleDefinition("Solutions", "Browse additional solutions for your application.", "Solutions", false, false); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/Solutions/Solutions.ascx", string.Empty, SecurityAccessLevel.Admin, 0); - AddAdminPages("Solutions", "DotNetNuke Solutions Explorer page provides easy access to locate free and commercial DotNetNuke modules, skin and more.", "icon_solutions_16px.gif", "icon_solutions_32px.gif", true, moduleDefId, "Solutions Explorer", "icon_solutions_32px.gif"); - } - - // Add Search Skin Object - AddSkinControl("SEARCH", "DotNetNuke.SearchSkinObject", "Admin/Skins/Search.ascx"); - - // Add TreeView Skin Object - AddSkinControl("TREEVIEW", "DotNetNuke.TreeViewSkinObject", "Admin/Skins/TreeViewMenu.ascx"); - - // Add Text Skin Object - AddSkinControl("TEXT", "DotNetNuke.TextSkinObject", "Admin/Skins/Text.ascx"); - - // Add Styles Skin Object - AddSkinControl("STYLES", "DotNetNuke.StylesSkinObject", "Admin/Skins/Styles.ascx"); - } - - private static void UpgradeToVersion600() - { - var hostPages = TabController.Instance.GetTabsByPortal(Null.NullInteger); - - // This ensures that all host pages have a tab path. - // so they can be found later. (DNNPRO-17129) - foreach (var hostPage in hostPages.Values) - { - hostPage.TabPath = Globals.GenerateTabPath(hostPage.ParentId, hostPage.TabName); - TabController.Instance.UpdateTab(hostPage); - } - - var settings = PortalController.Instance.GetCurrentPortalSettings(); - - if (settings != null) - { - var hostTab = TabController.Instance.GetTab(settings.SuperTabId, Null.NullInteger, false); - hostTab.IsVisible = false; - TabController.Instance.UpdateTab(hostTab); - foreach (var module in ModuleController.Instance.GetTabModules(settings.SuperTabId).Values) - { - ModuleController.Instance.UpdateTabModuleSetting(module.TabModuleID, "hideadminborder", "true"); - } - } - - // remove timezone editor - int moduleDefId = GetModuleDefinition("Languages", "Languages"); - RemoveModuleControl(moduleDefId, "TimeZone"); - - // 6.0 requires the old TimeZone property to be marked as Deleted - Delete for Host - ProfilePropertyDefinition ppdHostTimeZone = ProfileController.GetPropertyDefinitionByName(Null.NullInteger, "TimeZone"); - if (ppdHostTimeZone != null) - { - ProfileController.DeletePropertyDefinition(ppdHostTimeZone); - } - - foreach (PortalInfo portal in PortalController.Instance.GetPortals()) - { - // update timezoneinfo -#pragma warning disable 612,618 - TimeZoneInfo timeZoneInfo = Localization.ConvertLegacyTimeZoneOffsetToTimeZoneInfo(portal.TimeZoneOffset); -#pragma warning restore 612,618 - PortalController.UpdatePortalSetting(portal.PortalID, "TimeZone", timeZoneInfo.Id, false); - - // 6.0 requires the old TimeZone property to be marked as Deleted - Delete for Portals - ProfilePropertyDefinition ppdTimeZone = ProfileController.GetPropertyDefinitionByName(portal.PortalID, "TimeZone"); - if (ppdTimeZone != null) - { - ProfileController.DeletePropertyDefinition(ppdTimeZone); - } - - var adminTab = TabController.Instance.GetTab(portal.AdminTabId, portal.PortalID, false); - - adminTab.IsVisible = false; - TabController.Instance.UpdateTab(adminTab); - - foreach (var module in ModuleController.Instance.GetTabModules(portal.AdminTabId).Values) - { - ModuleController.Instance.UpdateTabModuleSetting(module.TabModuleID, "hideadminborder", "true"); - } - } - - // Ensure that Display Beta Notice setting is present - var displayBetaNotice = Host.DisplayBetaNotice; - HostController.Instance.Update("DisplayBetaNotice", displayBetaNotice ? "Y" : "N"); - - moduleDefId = GetModuleDefinition("Languages", "Languages"); - AddModuleControl(moduleDefId, "EnableContent", "Enable Localized Content", "DesktopModules/Admin/Languages/EnableLocalizedContent.ascx", string.Empty, SecurityAccessLevel.Host, 0, null, false); - - AddDefaultModuleIcons(); - - AddIconToAllowedFiles(); - - FavIconsToPortalSettings(); - - var tab = TabController.Instance.GetTabByName("Host", Null.NullInteger, Null.NullInteger); - - if (tab != null) - { - RemoveModule("Extensions", "Module Definitions", tab.TabID, true); - RemoveModule("Marketplace", "Marketplace", tab.TabID, true); - } - } - - private static void UpgradeToVersion601() - { - // List module needs to be available to Portals also - var pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Lists"); - if (pkg != null) - { - // List package is no longer a system package - pkg.IsSystemPackage = false; - PackageController.Instance.SaveExtensionPackage(pkg); - - // List desktop module is no longer premium or admin module - var desktopModule = DesktopModuleController.GetDesktopModuleByPackageID(pkg.PackageID); - desktopModule.IsAdmin = false; - desktopModule.IsPremium = false; - DesktopModuleController.SaveDesktopModule(desktopModule, false, true); - - var permissionController = new PermissionController(); - ArrayList permissions = permissionController.GetPermissionByCodeAndKey("SYSTEM_DESKTOPMODULE", "DEPLOY"); - if (permissions.Count == 1) - { - var permission = permissions[0] as PermissionInfo; - if (permission != null) - { - foreach (PortalInfo portal in PortalController.Instance.GetPortals()) - { - // ensure desktop module is not present in the portal - var pdmi = DesktopModuleController.GetPortalDesktopModule(portal.PortalID, desktopModule.DesktopModuleID); - if (pdmi == null) - { - // Parse the permissions - var deployPermissions = new DesktopModulePermissionCollection(); - var deployPermission = new DesktopModulePermissionInfo { PermissionID = permission.PermissionID, AllowAccess = true, RoleID = portal.AdministratorRoleId }; - deployPermissions.Add(deployPermission); - - // Add Portal/Module to PortalDesktopModules - DesktopModuleController.AddDesktopModuleToPortal(portal.PortalID, desktopModule, deployPermissions, true); - } - } - } - } - } - } - - private static void UpgradeToVersion602() - { - // Add avi,mpg,mpeg,mp3,wmv,mov,wav extensions - var exts = new List { ".avi", ".mpg", ".mpeg", ".mp3", ".wmv", ".mov", ".wav" }; - HostController.Instance.Update("FileExtensions", Host.AllowedExtensionWhitelist.ToStorageString(exts)); - - // Fix the icons for SiteMap page - foreach (PortalInfo portal in PortalController.Instance.GetPortals()) - { - var siteMap = TabController.Instance.GetTabByName("Search Engine SiteMap", portal.PortalID); - - if (siteMap != null) - { - siteMap.IconFile = "~/Icons/Sigma/Sitemap_16X16_Standard.png"; - siteMap.IconFileLarge = "~/Icons/Sigma/Sitemap_32X32_Standard.png"; - TabController.Instance.UpdateTab(siteMap); - } - } - } - - private static void UpgradeToVersion610() - { - AddModuleCategories(); - - // update languages module - int moduleDefId = GetModuleDefinition("Languages", "Languages"); - AddModuleControl(moduleDefId, "LocalizePages", "Localize Pages", "DesktopModules/Admin/Languages/LocalizePages.ascx", "~/images/icon_language_32px.gif", SecurityAccessLevel.Edit, 0, Null.NullString, true); - - // add store control - moduleDefId = AddModuleDefinition("Extensions", string.Empty, "Extensions"); - AddModuleControl(moduleDefId, "Store", "Store Details", "DesktopModules/Admin/Extensions/Store.ascx", "~/images/icon_extensions_32px.png", SecurityAccessLevel.Host, 0); - - EnableModalPopUps(); - - var tab = TabController.Instance.GetTabByName("Portals", Null.NullInteger); - tab.TabName = "Site Management"; - TabController.Instance.UpdateTab(tab); - - foreach (var module in ModuleController.Instance.GetTabModules(tab.TabID).Values) - { - if (module.ModuleTitle == "Portals") - { - module.ModuleTitle = "Site Management"; - ModuleController.Instance.UpdateModule(module); - } - } - - // Add List module to Admin page of every portal - ModuleDefinitionInfo mDef = ModuleDefinitionController.GetModuleDefinitionByFriendlyName("Lists"); - if (mDef != null) - { - AddAdminPages( - "Lists", - "Manage common lists", - "~/Icons/Sigma/Lists_16X16_Standard.png", - "~/Icons/Sigma/Lists_32X32_Standard.png", - true, - mDef.ModuleDefID, - "Lists", - "~/Icons/Sigma/Lists_16X16_Standard.png", - true); - } - - // update DotNetNuke.Portals' friend name to 'Sites'. - var portalPackage = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Portals"); - if (portalPackage != null) - { - portalPackage.FriendlyName = "Sites"; - PackageController.Instance.SaveExtensionPackage(portalPackage); - } - - // add mobile preview control - AddModuleControl(Null.NullInteger, "MobilePreview", "Mobile Preview", "DesktopModules/Admin/MobilePreview/Preview.ascx", string.Empty, SecurityAccessLevel.Admin, Null.NullInteger); - } - - private static void UpgradeToVersion612() - { - // update DotNetNuke.Portals' friend name to 'Sites'. - var portalPackage = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Portals"); - if (portalPackage != null) - { - portalPackage.FriendlyName = "Site Management"; - portalPackage.Description = - "The Super User can manage the various parent and child sites within the install instance. This module allows you to add a new site, modify an existing site, and delete a site."; - PackageController.Instance.SaveExtensionPackage(portalPackage); - } - - // update 'Portal' to 'Sites' in package description. - portalPackage = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Tabs"); - if (portalPackage != null) - { - portalPackage.Description = - "Administrators can manage the Pages within the site. This module allows you to create a new page, modify an existing page, delete pages, change the page order, and change the hierarchical page level."; - PackageController.Instance.SaveExtensionPackage(portalPackage); - } - - portalPackage = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Vendors"); - if (portalPackage != null) - { - portalPackage.Description = - "Administrators can manage the Vendors and Banners associated to the site. This module allows you to add a new vendor, modify an existing vendor, and delete a vendor."; - PackageController.Instance.SaveExtensionPackage(portalPackage); - } - - portalPackage = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.SiteLog"); - if (portalPackage != null) - { - portalPackage.Description = - "Administrators can view the details of visitors using their site. There are a variety of reports available to display information regarding site usage, membership, and volumes."; - PackageController.Instance.SaveExtensionPackage(portalPackage); - } - - portalPackage = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.SiteWizard"); - if (portalPackage != null) - { - portalPackage.Description = - "The Administrator can use this user-friendly wizard to set up the common features of the site."; - PackageController.Instance.SaveExtensionPackage(portalPackage); - } - - portalPackage = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Security"); - if (portalPackage != null) - { - portalPackage.Description = - "Administrators can manage the security roles defined for their site. The module allows you to add new security roles, modify existing security roles, delete security roles, and manage the users assigned to security roles."; - PackageController.Instance.SaveExtensionPackage(portalPackage); - } - - portalPackage = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.LogViewer"); - if (portalPackage != null) - { - portalPackage.Description = - "Allows you to view log entries for site events."; - PackageController.Instance.SaveExtensionPackage(portalPackage); - } - - portalPackage = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Google Analytics"); - if (portalPackage != null) - { - portalPackage.Description = - "Configure Site Google Analytics settings."; - PackageController.Instance.SaveExtensionPackage(portalPackage); - } - } - - private static void UpgradeToVersion613() - { - // Rename admin pages page's title to 'Page Management'. - foreach (PortalInfo portal in PortalController.Instance.GetPortals()) - { - var pagesTabId = TabController.GetTabByTabPath(portal.PortalID, "//Admin//Pages", Null.NullString); - - if (pagesTabId != Null.NullInteger) - { - var pagesTab = TabController.Instance.GetTab(pagesTabId, portal.PortalID, false); - if (pagesTab != null && pagesTab.Title == "Pages") - { - pagesTab.Title = "Page Management"; - TabController.Instance.UpdateTab(pagesTab); - } - } - } - } - - private static void UpgradeToVersion620() - { - // add host (system) profanityfilter list - const string listName = "ProfanityFilter"; - var listController = new ListController(); - var entry = new ListEntryInfo(); - { - entry.DefinitionID = Null.NullInteger; - entry.PortalID = Null.NullInteger; - entry.ListName = listName; - entry.Value = "ReplaceWithNothing"; - entry.Text = "FindThisText"; - entry.SystemList = true; - } - - listController.AddListEntry(entry); - - // add same list to each portal - foreach (PortalInfo portal in PortalController.Instance.GetPortals()) - { - entry.PortalID = portal.PortalID; - entry.SystemList = false; - entry.ListName = listName + "-" + portal.PortalID; - listController.AddListEntry(entry); - - // also create default social relationship entries for the portal - RelationshipController.Instance.CreateDefaultRelationshipsForPortal(portal.PortalID); - } - - // Convert old Messages to new schema - ConvertOldMessages(); - - // Replace old Messaging module on User Profile with new - ReplaceMessagingModule(); - - // Move Photo Property to the end of the propert list. - MovePhotoProperty(); - - // Update Child Portal's Default Page - UpdateChildPortalsDefaultPage(); - - // Add core notification types - AddCoreNotificationTypesFor620(); - - // Console module should not be IPortable - var consoleModule = DesktopModuleController.GetDesktopModuleByModuleName("Console", Null.NullInteger); - consoleModule.SupportedFeatures = 0; - consoleModule.BusinessControllerClass = string.Empty; - DesktopModuleController.SaveDesktopModule(consoleModule, false, false); - } - - private static void UpgradeToVersion621() - { - // update administrators' role description. - foreach (PortalInfo portal in PortalController.Instance.GetPortals()) - { - // update about me's template - var myProfileTabId = TabController.GetTabByTabPath(portal.PortalID, "//ActivityFeed//MyProfile", string.Empty); - if (myProfileTabId != Null.NullInteger) - { - var tabModules = ModuleController.Instance.GetTabModules(myProfileTabId); - foreach (var module in tabModules.Values) - { - var settings = module.TabModuleSettings; - if (settings.ContainsKey("ProfileTemplate") && settings["ProfileTemplate"].ToString().Contains("
    ")) - { - var template = @"
    -

    - -

    -
    -
    -

    - -

    0"">
    - 0"">
    - 0"">
    - -

    -
    -
    -

    - -
      -
    • 0"">:
    • -
    • 0"">:
    • -
    • 0"">:
    • -
    • 0"">:
    • -
    -
    -
    "; - ModuleController.Instance.UpdateTabModuleSetting(module.TabModuleID, "ProfileTemplate", template); - } - } - } - } - } - - private static void UpgradeToVersion623() - { -#pragma warning disable 618 - if (Host.jQueryUrl == "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js") - { - HostController.Instance.Update("jQueryUrl", jQuery.DefaultHostedUrl); - } - - if (Host.jQueryUIUrl == "http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js") - { - HostController.Instance.Update("jQueryUIUrl", jQuery.DefaultUIHostedUrl); - } -#pragma warning restore 618 - } - - private static void UpgradeToVersion624() - { - UninstallPackage("DotNetNuke.MarketPlace", "Module"); - } - - private static void UpgradeToVersion700() - { - // add the site Advanced Settings module to the admin tab - if (CoreModuleExists("AdvancedSettings") == false) - { - var moduleDefId = AddModuleDefinition("AdvancedSettings", string.Empty, "Advanced Settings"); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/AdvancedSettings/AdvancedSettings.ascx", string.Empty, SecurityAccessLevel.Admin, 0); - AddAdminPages( - "Advanced Settings", - string.Empty, - "~/Icons/Sigma/AdvancedSettings_16X16_Standard.png", - "~/Icons/Sigma/AdvancedSettings_32X32_Standard.png", - true, - moduleDefId, - "Advanced Settings", - "~/Icons/Sigma/AdvancedSettings_16X16_Standard.png"); - } - - ConvertCoreNotificationTypeActionsFor700(); - - // Remove Feed Explorer module - DesktopModuleController.DeleteDesktopModule("FeedExplorer"); - DesktopModuleController.DeleteDesktopModule("Solutions"); - - // Register Newtonsoft assembly - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "Newtonsoft.Json.dll", "4.5.6"); - - // subhost.aspx was updated - UpdateChildPortalsDefaultPage(); - } - - private static void UpgradeToVersion710() - { - // create a placeholder entry - uses the most common 5 character password (seed list is 6 characters and above) - const string listName = "BannedPasswords"; - var listController = new ListController(); - var entry = new ListEntryInfo(); - { - entry.DefinitionID = Null.NullInteger; - entry.PortalID = Null.NullInteger; - entry.ListName = listName; - entry.Value = "12345"; - entry.Text = "Placeholder"; - entry.SystemList = false; - } - - // add list to each portal and update primary alias - foreach (PortalInfo portal in PortalController.Instance.GetPortals()) - { - entry.PortalID = portal.PortalID; - entry.SystemList = false; - entry.ListName = listName + "-" + portal.PortalID; - listController.AddListEntry(entry); - - var defaultAlias = PortalController.GetPortalSetting("DefaultPortalAlias", portal.PortalID, string.Empty); - if (!string.IsNullOrEmpty(defaultAlias)) - { - foreach (var alias in PortalAliasController.Instance.GetPortalAliasesByPortalId(portal.PortalID).Where(alias => alias.HTTPAlias == defaultAlias)) - { - alias.IsPrimary = true; - PortalAliasController.Instance.UpdatePortalAlias(alias); - } - } - } - - // Add File Content Type - var typeController = new ContentTypeController(); - var contentTypeFile = (from t in typeController.GetContentTypes() where t.ContentType == "File" select t).SingleOrDefault(); - - if (contentTypeFile == null) - { - typeController.AddContentType(new ContentType { ContentType = "File" }); - } - - var fileContentType = (from t in typeController.GetContentTypes() where t.ContentType == "File" select t).SingleOrDefault(); - - // only perform following for an existing installation upgrading - if (Globals.Status == Globals.UpgradeStatus.Upgrade) - { - UpdateFoldersForParentId(); - ImportDocumentLibraryCategories(); - ImportDocumentLibraryCategoryAssoc(fileContentType); - } - - // Add 404 Log - var logTypeInfo = new LogTypeInfo - { - LogTypeKey = EventLogController.EventLogType.PAGE_NOT_FOUND_404.ToString(), - LogTypeFriendlyName = "HTTP Error Code 404 Page Not Found", - LogTypeDescription = string.Empty, - LogTypeCSSClass = "OperationFailure", - LogTypeOwner = "DotNetNuke.Logging.EventLogType", - }; - LogController.Instance.AddLogType(logTypeInfo); - - // Add LogType - var logTypeConf = new LogTypeConfigInfo - { - LoggingIsActive = true, - LogTypeKey = EventLogController.EventLogType.PAGE_NOT_FOUND_404.ToString(), - KeepMostRecent = "100", - NotificationThreshold = 1, - NotificationThresholdTime = 1, - NotificationThresholdTimeType = LogTypeConfigInfo.NotificationThresholdTimeTypes.Seconds, - MailFromAddress = Null.NullString, - MailToAddress = Null.NullString, - LogTypePortalID = "*", - }; - LogController.Instance.AddLogTypeConfigInfo(logTypeConf); - - UninstallPackage("DotNetNuke.SearchInput", "Module"); - - // enable password strength meter for new installs only - HostController.Instance.Update("EnableStrengthMeter", Globals.Status == Globals.UpgradeStatus.Install ? "Y" : "N"); - - // Add IP filter log type - var logTypeFilterInfo = new LogTypeInfo - { - LogTypeKey = EventLogController.EventLogType.IP_LOGIN_BANNED.ToString(), - LogTypeFriendlyName = "HTTP Error Code 403.6 forbidden ip address rejected", - LogTypeDescription = string.Empty, - LogTypeCSSClass = "OperationFailure", - LogTypeOwner = "DotNetNuke.Logging.EventLogType", - }; - LogController.Instance.AddLogType(logTypeFilterInfo); - - // Add LogType - var logTypeFilterConf = new LogTypeConfigInfo - { - LoggingIsActive = true, - LogTypeKey = EventLogController.EventLogType.IP_LOGIN_BANNED.ToString(), - KeepMostRecent = "100", - NotificationThreshold = 1, - NotificationThresholdTime = 1, - NotificationThresholdTimeType = LogTypeConfigInfo.NotificationThresholdTimeTypes.Seconds, - MailFromAddress = Null.NullString, - MailToAddress = Null.NullString, - LogTypePortalID = "*", - }; - LogController.Instance.AddLogTypeConfigInfo(logTypeFilterConf); - - int tabID = TabController.GetTabByTabPath(Null.NullInteger, "//Host//SearchAdmin", Null.NullString); - if (tabID > Null.NullInteger) - { - TabController.Instance.DeleteTab(tabID, Null.NullInteger); - } - - var modDef = ModuleDefinitionController.GetModuleDefinitionByFriendlyName("Search Admin"); - - if (modDef != null) - { - AddAdminPages("Search Admin", "Manage search settings associated with DotNetNuke's search capability.", "~/Icons/Sigma/Search_16x16_Standard.png", "~/Icons/Sigma/Search_32x32_Standard.png", true, modDef.ModuleDefID, "Search Admin", string.Empty); - } - - CopyGettingStartedStyles(); - } - - private static void UpgradeToVersion711() - { - DesktopModuleController.DeleteDesktopModule("FileManager"); - - // Add TabUrl Logtypes - var logTypeInfo = new LogTypeInfo - { - LogTypeKey = EventLogController.EventLogType.TABURL_CREATED.ToString(), - LogTypeFriendlyName = "TabURL created", - LogTypeDescription = string.Empty, - LogTypeCSSClass = "OperationSuccess", - LogTypeOwner = "DotNetNuke.Logging.EventLogType", - }; - LogController.Instance.AddLogType(logTypeInfo); - - logTypeInfo.LogTypeKey = EventLogController.EventLogType.TABURL_UPDATED.ToString(); - logTypeInfo.LogTypeFriendlyName = "TabURL updated"; - LogController.Instance.AddLogType(logTypeInfo); - - logTypeInfo.LogTypeKey = EventLogController.EventLogType.TABURL_DELETED.ToString(); - logTypeInfo.LogTypeFriendlyName = "TabURL deleted"; - LogController.Instance.AddLogType(logTypeInfo); - } - - private static void UpgradeToVersion712() - { - // update console module in Admin/Host page to set OrderTabsByHierarchy setting to true. - foreach (PortalInfo portal in PortalController.Instance.GetPortals()) - { - var tabId = TabController.GetTabByTabPath(portal.PortalID, "//Admin", Null.NullString); - if (tabId != Null.NullInteger) - { - foreach (var module in ModuleController.Instance.GetTabModules(tabId).Where(m => m.Value.ModuleDefinition.FriendlyName == "Console")) - { - ModuleController.Instance.UpdateModuleSetting(module.Key, "OrderTabsByHierarchy", "True"); - } - } - } - - var hostTabId = TabController.GetTabByTabPath(Null.NullInteger, "//Host", Null.NullString); - if (hostTabId != Null.NullInteger) - { - foreach (var module in ModuleController.Instance.GetTabModules(hostTabId).Where(m => m.Value.ModuleDefinition.FriendlyName == "Console")) - { - ModuleController.Instance.UpdateModuleSetting(module.Key, "OrderTabsByHierarchy", "True"); - } - } - } - - private static void UpgradeToVersion720() - { - var desktopModule = DesktopModuleController.GetDesktopModuleByModuleName("51Degrees.mobi", Null.NullInteger); - if (desktopModule != null) - { - DesktopModuleController.RemoveDesktopModuleFromPortals(desktopModule.DesktopModuleID); - } - - desktopModule = DesktopModuleController.GetDesktopModuleByModuleName("DotNetNuke.RadEditorProvider", Null.NullInteger); - if (desktopModule != null) - { - DesktopModuleController.RemoveDesktopModuleFromPortals(desktopModule.DesktopModuleID); - } - - // ensure old codeplex module is uninstalled - need to check for both variants of package name - UninstallPackage("DotNetNuke.Module Creator", "Module"); - UninstallPackage("DNNCorp.ModuleCreator", "Module"); - - DesktopModuleController.AddModuleCategory("Developer"); - var moduleDefId = AddModuleDefinition("Module Creator", "Development of modules.", "Module Creator"); - AddModuleControl(moduleDefId, string.Empty, string.Empty, "DesktopModules/Admin/ModuleCreator/CreateModule.ascx", "~/DesktopModules/Admin/ModuleCreator/icon.png", SecurityAccessLevel.Host, 0); - if (ModuleDefinitionController.GetModuleDefinitionByID(moduleDefId) != null) - { - var desktopModuleId = ModuleDefinitionController.GetModuleDefinitionByID(moduleDefId).DesktopModuleID; - desktopModule = DesktopModuleController.GetDesktopModule(desktopModuleId, Null.NullInteger); - desktopModule.Category = "Developer"; - DesktopModuleController.SaveDesktopModule(desktopModule, false, false); - - var package = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.PackageID == desktopModule.PackageID); - package.IconFile = "~/Icons/Sigma/ModuleCreator_32x32.png"; - PackageController.Instance.SaveExtensionPackage(package); - } - - var typeController = new ContentTypeController(); - var fileContentType = (from t in typeController.GetContentTypes() where t.ContentType == "File" select t).SingleOrDefault(); - - // only perform following for an existing installation upgrading - if (Globals.Status == Globals.UpgradeStatus.Upgrade) - { - ImportDocumentLibraryCategories(); - ImportDocumentLibraryCategoryAssoc(fileContentType); - } - - // fixes issue introduced by eventlog's being defined in upgrade.cs - PortalController.EnsureRequiredEventLogTypesExist(); - - // Remove Professional Features pages from CE - int advancedFeaturesTabId = TabController.GetTabByTabPath(Null.NullInteger, "//Host//ProfessionalFeatures", Null.NullString); - if (DotNetNukeContext.Current.Application.Name == "DNNCORP.CE") - { - foreach (var tab in TabController.GetTabsByParent(advancedFeaturesTabId, Null.NullInteger)) - { - TabController.Instance.DeleteTab(tab.TabID, Null.NullInteger); - } - - TabController.Instance.DeleteTab(advancedFeaturesTabId, Null.NullInteger); - } - - // Remove Whats New - int whatsNewTabId = TabController.GetTabByTabPath(Null.NullInteger, "//Host//WhatsNew", Null.NullString); - TabController.Instance.DeleteTab(whatsNewTabId, Null.NullInteger); - - // Remove WhatsNew module - DesktopModuleController.DeleteDesktopModule("WhatsNew"); - - // read plaintext password via old API and encrypt - var current = HostController.Instance.GetString("SMTPPassword"); - if (!string.IsNullOrEmpty(current)) - { - HostController.Instance.UpdateEncryptedString("SMTPPassword", current, Config.GetDecryptionkey()); - } - } - - private static void UpgradeToVersion721() - { - try - { - // the username maybe html encode when register in 7.1.2, it will caught unicode charactors changed, need use InputFilter to correct the value. - var portalSecurity = PortalSecurity.Instance; - using (var reader = DataProvider.Instance().ExecuteSQL("SELECT UserID, Username FROM {databaseOwner}[{objectQualifier}Users] WHERE Username LIKE '%&%'")) - { - while (reader.Read()) - { - var userId = Convert.ToInt32(reader["UserID"]); - var userName = reader["Username"].ToString(); - - if (userName != HttpUtility.HtmlDecode(userName)) - { - userName = portalSecurity.InputFilter( - HttpUtility.HtmlDecode(userName), - PortalSecurity.FilterFlag.NoScripting | - PortalSecurity.FilterFlag.NoAngleBrackets | - PortalSecurity.FilterFlag.NoMarkup); - - UserController.ChangeUsername(userId, userName); - } - } - } - } - catch (Exception ex) - { - Logger.Error(ex); - } - - AddManageUsersModulePermissions(); - } - - private static void UpgradeToVersion722() - { - UninstallPackage("DotNetNuke.Messaging", "Module"); - - // add event log type:POTENTIAL_PAYPAL_PAYMENT_FRAUD - if (!DoesLogTypeExists(EventLogController.EventLogType.POTENTIAL_PAYPAL_PAYMENT_FRAUD.ToString())) - { - var logTypeInfo = new LogTypeInfo - { - LogTypeKey = - EventLogController.EventLogType.POTENTIAL_PAYPAL_PAYMENT_FRAUD.ToString(), - LogTypeFriendlyName = "Potential Paypal Payment Fraud", - LogTypeDescription = string.Empty, - LogTypeCSSClass = "OperationFailure", - LogTypeOwner = "DotNetNuke.Logging.EventLogType", - }; - LogController.Instance.AddLogType(logTypeInfo); - } - - // AdvancedSettings module needs to be made a system package - var pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.AdvancedSettings"); - if (pkg != null) - { - pkg.IsSystemPackage = true; - PackageController.Instance.SaveExtensionPackage(pkg); - } - - // Site Wizard module needs to be made a system package - pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.SiteWizard"); - if (pkg != null) - { - pkg.IsSystemPackage = true; - PackageController.Instance.SaveExtensionPackage(pkg); - } - - // Site Log module needs to be made a system package - pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.SiteLog"); - if (pkg != null) - { - pkg.IsSystemPackage = true; - PackageController.Instance.SaveExtensionPackage(pkg); - } - - // Module Creator module needs to be made a system package - pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Module Creator"); - if (pkg != null) - { - pkg.IsSystemPackage = true; - PackageController.Instance.SaveExtensionPackage(pkg); - } - - // Telerik.Web module needs to be made a system package - pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "DotNetNuke.Telerik.Web"); - if (pkg != null) - { - pkg.IsSystemPackage = true; - PackageController.Instance.SaveExtensionPackage(pkg); - } - - // jQuery needs to be made a system package - pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "jQuery"); - if (pkg != null) - { - pkg.IsSystemPackage = true; - PackageController.Instance.SaveExtensionPackage(pkg); - } - - // jQuery-Migrate needs to be made a system package - pkg = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.Name == "jQuery-Migrate"); - if (pkg != null) - { - pkg.IsSystemPackage = true; - PackageController.Instance.SaveExtensionPackage(pkg); - } - - // Make ConfigurationManager Premium - MakeModulePremium(@"ConfigurationManager"); - - // Make ConfigurationManager Premium - MakeModulePremium(@"Dashboard"); - - // Make ProfessionalPreview Premium - MakeModulePremium(@"ProfessionalPreview"); - } - - private static void UpgradeToVersion730() - { -#pragma warning disable 612,618 - if (jQuery.UseHostedScript) - { - HostController.Instance.Update("CDNEnabled", "True", true); - - var jquery = JavaScriptLibraryController.Instance.GetLibrary(l => l.LibraryName == CommonJs.jQuery); - jquery.CDNPath = jQuery.HostedUrl; - JavaScriptLibraryController.Instance.SaveLibrary(jquery); - - var jqueryui = JavaScriptLibraryController.Instance.GetLibrary(l => l.LibraryName == CommonJs.jQueryUI); - jqueryui.CDNPath = jQuery.HostedUIUrl; - JavaScriptLibraryController.Instance.SaveLibrary(jqueryui); - - var jquerymigrate = JavaScriptLibraryController.Instance.GetLibrary(l => l.LibraryName == CommonJs.jQueryMigrate); - jquerymigrate.CDNPath = jQuery.HostedMigrateUrl; - JavaScriptLibraryController.Instance.SaveLibrary(jquerymigrate); - } -#pragma warning restore 612,618 - } - - private static void UpgradeToVersion732() - { - // Register System referenced 3rd party assemblies. - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "Lucene.Net.dll", "3.0.3"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "Lucene.Net.Contrib.FastVectorHighlighter.dll", "3.0.3"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "Lucene.Net.Contrib.Analyzers.dll", "3.0.3"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "Microsoft.ApplicationBlocks.Data.dll", "2.0.0"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "Microsoft.Web.Helpers.dll", "2.0.20710"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "Microsoft.Web.Infrastructure.dll", "1.0.20105"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "Newtonsoft.Json.dll", "4.5.7"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "PetaPoco.dll", "5.0.1"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "SharpZipLib.dll", "0.81.0"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "System.Net.Http.dll", "1.0.0"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "System.Net.Http.Formatting.dll", "4.0.20710"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "System.Net.Http.WebRequest.dll", "1.0.0"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "System.Web.Helpers.dll", "2.0.20216"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "System.Web.Http.dll", "4.0.20710"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "System.Web.Http.WebHost.dll", "4.0.20710"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "System.Web.Razor.dll", "2.0.20216"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "System.Web.WebPages.Deployment.dll", "2.0.20710"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "System.Web.WebPages.dll", "2.0.20710"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "System.Web.WebPages.Razor.dll", "2.0.20126"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "WebFormsMvp.dll", "1.4.1"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "WebMatrix.Data.dll", "2.0.20126"); - DataProvider.Instance().RegisterAssembly(Null.NullInteger, "WebMatrix.WebData.dll", "2.0.20126"); - - // update help url - HostController.Instance.Update("HelpURL", "https://dnndocs.com", false); - } - - private static void UpgradeToVersion733() - { - var notificationType = new NotificationType { Name = "NewUnauthorizedUserRegistration", Description = "New Unauthorized User Registration Notification" }; - NotificationsController.Instance.CreateNotificationType(notificationType); - - var actions = new List - { - new NotificationTypeAction - { - NameResourceKey = "AuthorizeUser", - DescriptionResourceKey = "AuthorizeUserDescription", - APICall = "API/InternalServices/NewUserNotificationService/Authorize", - }, - new NotificationTypeAction - { - NameResourceKey = "RejectUser", - DescriptionResourceKey = "RejectUserDescription", - APICall = "API/InternalServices/NewUserNotificationService/Reject" - }, - }; - - NotificationsController.Instance.SetNotificationTypeActions(actions, notificationType.NotificationTypeId); - } - - private static void UpgradeToVersion740() - { - string PageHeadTextForUpgrade = "" + "\n" + - "" + "\n" + - "" + "\n" + - - "" + "\n" + - "" + "\n" + - "" + "\n"; - ArrayList portals = PortalController.Instance.GetPortals(); - foreach (PortalInfo portal in portals) - { - PortalController.UpdatePortalSetting(portal.PortalID, "PageHeadText", PageHeadTextForUpgrade); - } - - RemoveContentListModuleFromSearchResultsPage(); - ReIndexUserSearch(); - } - - private static void UpgradeToVersion742() - { - var containerFolder = string.Format("{0}Containers\\DarkKnightMobile", Globals.HostMapPath); - var skinFolder = string.Format("{0}Skins\\DarkKnightMobile", Globals.HostMapPath); - if (!Directory.Exists(skinFolder)) - { - UninstallPackage("DarkKnightMobile", "Skin"); // Skin - } - - if (!Directory.Exists(containerFolder)) - { - UninstallPackage("DarkKnightMobile", "Container"); // Container - } - } - - private static void ReIndexUserSearch() - { - var portals = PortalController.Instance.GetPortals(); - foreach (PortalInfo portal in portals) - { - PortalController.UpdatePortalSetting(portal.PortalID, UserIndexer.UserIndexResetFlag, "TRUE"); - } - } - - private static void RemoveContentListModuleFromSearchResultsPage() - { - var portals = PortalController.Instance.GetPortals(); - foreach (PortalInfo portal in portals) - { - foreach (KeyValuePair kvp in ModuleController.Instance.GetTabModules(portal.SearchTabId)) - { - var module = kvp.Value; - if (module.DesktopModule.FriendlyName == "ContentList") - { - // Delete the Module from the Modules list - ModuleController.Instance.DeleteTabModule(module.TabID, module.ModuleID, false); - break; - } - } - } - } - - private static void AddManageUsersModulePermissions() - { - var permCtl = new PermissionController(); - var desktopInfo = DesktopModuleController.GetDesktopModuleByModuleName("Security", Null.NullInteger); - - // add new user dialog - var md = ModuleDefinitionController.GetModuleDefinitionByFriendlyName("User Account", desktopInfo.DesktopModuleID); - try - { - var pi = new PermissionInfo - { - ModuleDefID = md.ModuleDefID, - PermissionCode = "SECURITY_MODULE", - PermissionKey = "MANAGEUSER", - PermissionName = "Manage User", - }; - - permCtl.AddPermission(pi); - } - catch - { - // suppress - } - - md = ModuleDefinitionController.GetModuleDefinitionByFriendlyName("User Accounts", desktopInfo.DesktopModuleID); - try - { - var pi = new PermissionInfo - { - ModuleDefID = md.ModuleDefID, - PermissionCode = "SECURITY_MODULE", - PermissionKey = "MANAGEUSERS", - PermissionName = "Manage Users", - }; - - permCtl.AddPermission(pi); - } - catch - { - // suppress - } - - md = ModuleDefinitionController.GetModuleDefinitionByFriendlyName("Security Roles", desktopInfo.DesktopModuleID); - try + // Parse the File nodes + if (node != null) { - var pi = new PermissionInfo + XmlNodeList nodes = node.SelectNodes("file"); + if (nodes != null) { - ModuleDefID = md.ModuleDefID, - PermissionCode = "SECURITY_MODULE", - PermissionKey = "MANAGEROLES", - PermissionName = "Manage Roles", - }; - - permCtl.AddPermission(pi); - } - catch - { - // suppress - } - } - - private static ContentItem CreateFileContentItem() - { - var typeController = new ContentTypeController(); - var contentTypeFile = (from t in typeController.GetContentTypes() where t.ContentType == "File" select t).SingleOrDefault(); - - if (contentTypeFile == null) - { - contentTypeFile = new ContentType { ContentType = "File" }; - contentTypeFile.ContentTypeId = typeController.AddContentType(contentTypeFile); - } - - var objContent = new ContentItem - { - ContentTypeId = contentTypeFile.ContentTypeId, - Indexed = false, - }; + var folderManager = FolderManager.Instance; + var fileManager = FileManager.Instance; - objContent.ContentItemId = DotNetNuke.Entities.Content.Common.Util.GetContentController().AddContentItem(objContent); + foreach (XmlNode fileNode in nodes) + { + string fileName = XmlUtils.GetNodeValue(fileNode.CreateNavigator(), "filename"); + string extension = XmlUtils.GetNodeValue(fileNode.CreateNavigator(), "extension"); + long size = long.Parse(XmlUtils.GetNodeValue(fileNode.CreateNavigator(), "size")); + int width = XmlUtils.GetNodeValueInt(fileNode, "width"); + int height = XmlUtils.GetNodeValueInt(fileNode, "height"); + string contentType = XmlUtils.GetNodeValue(fileNode.CreateNavigator(), "contentType"); + string folder = XmlUtils.GetNodeValue(fileNode.CreateNavigator(), "folder"); - return objContent; - } + var folderInfo = folderManager.GetFolder(portalId, folder); + var file = new FileInfo(portalId, fileName, extension, (int)size, width, height, contentType, folder, folderInfo.FolderID, folderInfo.StorageLocation, true); - private static void ImportDocumentLibraryCategoryAssoc(ContentType fileContentType) - { - DataProvider dataProvider = DataProvider.Instance(); - IDataReader dr; - try - { - var termController = new TermController(); - var vocabulary = new VocabularyController().GetVocabularies().Single(v => v.Name == "Tags"); - var terms = termController.GetTermsByVocabulary(vocabulary.VocabularyId); - using (dr = dataProvider.ExecuteReader("ImportDocumentLibraryCategoryAssoc")) - { - while (dr.Read()) - { - var file = FileManager.Instance.GetFile((int)dr["FileId"]); - ContentItem attachContentItem; - if (file.ContentItemID == Null.NullInteger) - { - attachContentItem = CreateFileContentItem(); - file.ContentItemID = attachContentItem.ContentItemId; - FileManager.Instance.UpdateFile(file); - } - else + using (var fileContent = fileManager.GetFileContent(file)) { - attachContentItem = Util.GetContentController().GetContentItem(file.ContentItemID); - } + var addedFile = fileManager.AddFile(folderInfo, file.FileName, fileContent, false); - var term = terms.SingleOrDefault(t => t.Name == dr["CategoryName"].ToString()); - if (term == null) - { - term = new Term(dr["CategoryName"].ToString(), null, vocabulary.VocabularyId); - termController.AddTerm(term); + file.FileId = addedFile.FileId; + file.EnablePublishPeriod = addedFile.EnablePublishPeriod; + file.EndDate = addedFile.EndDate; + file.StartDate = addedFile.StartDate; } - termController.AddTermToContent(term, attachContentItem); - } - } - } - catch (Exception ex) - { - Logger.Error(ex); - } - } - - private static void ImportDocumentLibraryCategories() - { - VocabularyController vocabularyController = new VocabularyController(); - var defaultTags = (from v in vocabularyController.GetVocabularies() where v.IsSystem && v.Name == "Tags" select v).SingleOrDefault(); - - DataProvider dataProvider = DataProvider.Instance(); - dataProvider.ExecuteNonQuery("ImportDocumentLibraryCategories", defaultTags.VocabularyId); - } - - private static void UpdateFoldersForParentId() - { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "UpgradeFolders"); - - // Move old messages to new format. Do this in smaller batches so we can send feedback to browser and don't time out - var foldersToConvert = DataProvider.Instance().GetLegacyFolderCount(); - var foldersRemaining = foldersToConvert; - - if (foldersRemaining > 0) - { - // Create an empty line - HtmlUtils.WriteFeedback(HttpContext.Current.Response, 2, "
    ", false); - } - - while (foldersRemaining > 0) - { - HtmlUtils.WriteFeedback(HttpContext.Current.Response, 2, string.Format("Converting old Folders to new format. Total: {0} [Remaining: {1}]
    ", foldersToConvert, foldersRemaining)); - try - { - using (DataProvider.Instance().UpdateLegacyFolders()) - { + fileManager.UpdateFile(file); } } - catch (Exception ex) - { - Exceptions.Exceptions.LogException(ex); - } - - foldersRemaining = DataProvider.Instance().GetLegacyFolderCount(); - } - - if (foldersToConvert > 0) - { - HtmlUtils.WriteFeedback(HttpContext.Current.Response, 2, string.Format("Conversion of old Folders Completed. Total Converted: {0}
    ", foldersToConvert)); } } @@ -5520,299 +2689,6 @@ private static void UninstallPackage(string packageName, string packageType, boo } } - private static void ConvertCoreNotificationTypeActionsFor700() - { - var notificationTypeNames = new[] { "FriendRequest", "FollowerRequest", "FollowBackRequest", "TranslationSubmitted" }; - - foreach (var name in notificationTypeNames) - { - var nt = NotificationsController.Instance.GetNotificationType(name); - - if (nt != null) - { - var actions = NotificationsController.Instance.GetNotificationTypeActions(nt.NotificationTypeId).ToList(); - - if (actions.Any()) - { - foreach (var action in actions) - { - action.APICall = action.APICall.Replace(".ashx", string.Empty); - NotificationsController.Instance.DeleteNotificationTypeAction( - action.NotificationTypeActionId); - } - - NotificationsController.Instance.SetNotificationTypeActions(actions, nt.NotificationTypeId); - } - } - else - { - AddMissingNotificationTypes(name); - } - } - } - - private static void AddMissingNotificationTypes(string notificationTypeName) - { - switch (notificationTypeName) - { - case "FriendRequest": - var friendRequestType = new NotificationType { Name = notificationTypeName, Description = "Friend Request" }; - var friendRequestTypeActions = new List(); - friendRequestTypeActions.Add(new NotificationTypeAction - { - NameResourceKey = "Accept", - DescriptionResourceKey = "AcceptFriend", - APICall = "API/InternalServices/RelationshipService/AcceptFriend", - }); - NotificationsController.Instance.CreateNotificationType(friendRequestType); - NotificationsController.Instance.SetNotificationTypeActions(friendRequestTypeActions, friendRequestType.NotificationTypeId); - break; - case "FollowerRequest": - var followerRequestType = new NotificationType { Name = notificationTypeName, Description = "Follower Request" }; - NotificationsController.Instance.CreateNotificationType(followerRequestType); - break; - case "FollowBackRequest": - var followBackRequestType = new NotificationType { Name = notificationTypeName, Description = "Follow Back Request" }; - var followBackRequestTypeActions = new List(); - followBackRequestTypeActions.Add(new NotificationTypeAction - { - NameResourceKey = "FollowBack", - DescriptionResourceKey = "FollowBack", - ConfirmResourceKey = string.Empty, - APICall = "API/InternalServices/RelationshipService/FollowBack", - }); - NotificationsController.Instance.CreateNotificationType(followBackRequestType); - NotificationsController.Instance.SetNotificationTypeActions(followBackRequestTypeActions, followBackRequestType.NotificationTypeId); - break; - case "TranslationSubmitted": - var translationSubmittedType = new NotificationType { Name = notificationTypeName, Description = "Translation Submitted" }; - NotificationsController.Instance.CreateNotificationType(translationSubmittedType); - break; - default: - break; - } - } - - private static void AddCoreNotificationTypesFor620() - { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "AddCoreNotificationTypesFor620"); - var actions = new List(); - - // Friend request - var type = new NotificationType { Name = "FriendRequest", Description = "Friend Request" }; - actions.Add(new NotificationTypeAction - { - NameResourceKey = "Accept", - DescriptionResourceKey = "AcceptFriend", - APICall = "API/InternalServices/RelationshipService/AcceptFriend", - }); - NotificationsController.Instance.CreateNotificationType(type); - NotificationsController.Instance.SetNotificationTypeActions(actions, type.NotificationTypeId); - - // Follower - type = new NotificationType { Name = "FollowerRequest", Description = "Follower Request" }; - NotificationsController.Instance.CreateNotificationType(type); - - // Follow Back - type = new NotificationType { Name = "FollowBackRequest", Description = "Follow Back Request" }; - actions.Clear(); - actions.Add(new NotificationTypeAction - { - NameResourceKey = "FollowBack", - DescriptionResourceKey = "FollowBack", - ConfirmResourceKey = string.Empty, - APICall = "API/InternalServices/RelationshipService/FollowBack", - }); - NotificationsController.Instance.CreateNotificationType(type); - NotificationsController.Instance.SetNotificationTypeActions(actions, type.NotificationTypeId); - - // Translation submitted - type = new NotificationType { Name = "TranslationSubmitted", Description = "Translation Submitted" }; - NotificationsController.Instance.CreateNotificationType(type); - } - - private static void ConvertOldMessages() - { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "ConvertOldMessages"); - - // Move old messages to new format. Do this in smaller batches so we can send feedback to browser and don't time out - var messagesToConvert = InternalMessagingController.Instance.CountLegacyMessages(); - var messagesRemaining = messagesToConvert; - const int batchSize = 500; - - if (messagesRemaining > 0) - { - // Create an empty line - HtmlUtils.WriteFeedback(HttpContext.Current.Response, 2, "
    ", false); - } - - while (messagesRemaining > 0) - { - HtmlUtils.WriteFeedback(HttpContext.Current.Response, 2, string.Format("Converting old Messages to new format. Total: {0} [Remaining: {1}]
    ", messagesToConvert, messagesRemaining)); - try - { - InternalMessagingController.Instance.ConvertLegacyMessages(0, batchSize); - } - catch (Exception ex) - { - Exceptions.Exceptions.LogException(ex); - } - - messagesRemaining -= batchSize; - } - - if (messagesToConvert > 0) - { - HtmlUtils.WriteFeedback(HttpContext.Current.Response, 2, string.Format("Conversion of old Messages Completed. Total Converted: {0}
    ", messagesToConvert)); - } - } - - private static void ReplaceMessagingModule() - { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "ReplaceMessagingModule"); - var moduleDefinition = ModuleDefinitionController.GetModuleDefinitionByFriendlyName("Message Center"); - if (moduleDefinition == null) - { - return; - } - - var portals = PortalController.Instance.GetPortals(); - foreach (PortalInfo portal in portals) - { - if (portal.UserTabId > Null.NullInteger) - { - // Find TabInfo - TabInfo tab = TabController.Instance.GetTab(portal.UserTabId, portal.PortalID, true); - if (tab != null) - { - // Add new module to the page - AddModuleToPage(tab, moduleDefinition.ModuleDefID, "Message Center", string.Empty, true); - } - - foreach (KeyValuePair kvp in ModuleController.Instance.GetTabModules(portal.UserTabId)) - { - var module = kvp.Value; - if (module.DesktopModule.FriendlyName == "Messaging") - { - // Delete the Module from the Modules list - ModuleController.Instance.DeleteTabModule(module.TabID, module.ModuleID, false); - break; - } - } - } - } - } - - private static void MovePhotoProperty() - { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "MovePhotoProperty"); - foreach (PortalInfo portal in PortalController.Instance.GetPortals()) - { - var properties = ProfileController.GetPropertyDefinitionsByPortal(portal.PortalID).Cast(); - var propPhoto = properties.FirstOrDefault(p => p.PropertyName == "Photo"); - if (propPhoto != null) - { - var maxOrder = properties.Max(p => p.ViewOrder); - if (propPhoto.ViewOrder != maxOrder) - { - properties.Where(p => p.ViewOrder > propPhoto.ViewOrder).ToList().ForEach(p => - { - p.ViewOrder -= 2; - ProfileController.UpdatePropertyDefinition(p); - }); - propPhoto.ViewOrder = maxOrder; - ProfileController.UpdatePropertyDefinition(propPhoto); - } - } - } - } - - private static void UpdateChildPortalsDefaultPage() - { - DnnInstallLogger.InstallLogInfo(Localization.GetString("LogStart", Localization.GlobalResourceFile) + "UpdateChildPortalsDefaultPage"); - - // Update Child Portal subHost.aspx - foreach (PortalAliasInfo aliasInfo in PortalAliasController.Instance.GetPortalAliases().Values) - { - // For the alias to be for a child it must be of the form ...../child - int intChild = aliasInfo.HTTPAlias.IndexOf("/"); - if (intChild != -1 && intChild != (aliasInfo.HTTPAlias.Length - 1)) - { - var childPath = Globals.ApplicationMapPath + "\\" + aliasInfo.HTTPAlias.Substring(intChild + 1); - if (!string.IsNullOrEmpty(Globals.ApplicationPath)) - { - childPath = childPath.Replace("\\", "/"); - childPath = childPath.Replace(Globals.ApplicationPath, string.Empty); - } - - childPath = childPath.Replace("/", "\\"); - - // check if File exists and make sure it's not the site's main default.aspx page - string childDefaultPage = childPath + "\\" + Globals.glbDefaultPage; - if (childPath != Globals.ApplicationMapPath && File.Exists(childDefaultPage)) - { - var objDefault = new System.IO.FileInfo(childDefaultPage); - var objSubHost = new System.IO.FileInfo(Globals.HostMapPath + "subhost.aspx"); - - // check if upgrade is necessary - if (objDefault.Length != objSubHost.Length) - { - // check file is readonly - bool wasReadonly = false; - FileAttributes attributes = File.GetAttributes(childDefaultPage); - if ((attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly) - { - wasReadonly = true; - - // remove readonly attribute - File.SetAttributes(childDefaultPage, FileAttributes.Normal); - } - - // Rename existing file - File.Copy(childDefaultPage, childPath + "\\old_" + Globals.glbDefaultPage, true); - - // copy file - File.Copy(Globals.HostMapPath + "subhost.aspx", childDefaultPage, true); - - // set back the readonly attribute - if (wasReadonly) - { - File.SetAttributes(childDefaultPage, FileAttributes.ReadOnly); - } - } - } - } - } - } - - private static void CopyGettingStartedStyles() - { - // copy getting started css to portals folder. - var hostGettingStartedFile = string.Format("{0}GettingStarted.css", Globals.HostMapPath); - foreach (PortalInfo portal in PortalController.Instance.GetPortals()) - { - if (File.Exists(hostGettingStartedFile)) - { - var portalFile = portal.HomeDirectoryMapPath + "GettingStarted.css"; - if (!File.Exists(portalFile)) - { - File.Copy(hostGettingStartedFile, portalFile); - } - } - - // update the getting started page to have this custom style sheet. - var gettingStartedTabId = PortalController.GetPortalSettingAsInteger("GettingStartedTabId", portal.PortalID, Null.NullInteger); - if (gettingStartedTabId > Null.NullInteger) - { - // check if tab exists - if (TabController.Instance.GetTab(gettingStartedTabId, portal.PortalID, true) != null) - { - TabController.Instance.UpdateTabSetting(gettingStartedTabId, "CustomStylesheet", "GettingStarted.css"); - } - } - } - } - private static void RemoveGettingStartedPages() { foreach (PortalInfo portal in PortalController.Instance.GetPortals()) @@ -5844,18 +2720,6 @@ private static void RemoveGettingStartedPages() } } - private static bool DoesLogTypeExists(string logTypeKey) - { - LogTypeInfo logType; - Dictionary logTypeDictionary = LogController.Instance.GetLogTypeInfoDictionary(); - logTypeDictionary.TryGetValue(logTypeKey, out logType); - if (logType == null) - { - return false; - } - - return true; - } private static string GetStringVersionWithRevision(Version version) { @@ -5913,6 +2777,7 @@ private static void ParsePackagesFromApplicationPath(IEnumerable package continue; } + var isInstalled = false; PackageController.ParsePackage(file, installPackagePath, packages, invalidPackages); if (packages.ContainsKey(file)) { @@ -5923,6 +2788,7 @@ private static void ParsePackagesFromApplicationPath(IEnumerable package Null.NullInteger, p => p.Name.Equals(package.Name, StringComparison.OrdinalIgnoreCase) && p.PackageType.Equals(package.PackageType, StringComparison.OrdinalIgnoreCase)); + isInstalled = installedPackage != null; if (packages.Values.Count(p => p.FriendlyName.Equals(package.FriendlyName, StringComparison.OrdinalIgnoreCase)) > 1 || installedPackage != null) @@ -5954,7 +2820,7 @@ private static void ParsePackagesFromApplicationPath(IEnumerable package } } - if (extension != ".zip") + if (extension != ".zip" && !isInstalled) { optionalPackages.Add(file); } diff --git a/DNN Platform/Library/Startup.cs b/DNN Platform/Library/Startup.cs index 3c9bb21b224..3f0ab88f260 100644 --- a/DNN Platform/Library/Startup.cs +++ b/DNN Platform/Library/Startup.cs @@ -1,17 +1,19 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information - namespace DotNetNuke { using DotNetNuke.Abstractions; using DotNetNuke.Abstractions.Application; + using DotNetNuke.Abstractions.Logging; using DotNetNuke.Abstractions.Portals; using DotNetNuke.Application; using DotNetNuke.Common; using DotNetNuke.DependencyInjection; using DotNetNuke.Entities.Controllers; + using DotNetNuke.Entities.Modules.Settings; using DotNetNuke.Entities.Portals; + using DotNetNuke.Services.Log.EventLog; using DotNetNuke.UI.Modules; using DotNetNuke.UI.Modules.Html5; @@ -28,9 +30,14 @@ public void ConfigureServices(IServiceCollection services) services.AddSingleton(); services.AddSingleton(); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + services.AddTransient(x => PortalController.Instance); services.AddScoped(); services.AddScoped(); + services.AddScoped(); services.AddScoped(); services.AddScoped(); diff --git a/DNN Platform/Modules/CoreMessaging/CoreMessaging.dnn b/DNN Platform/Modules/CoreMessaging/CoreMessaging.dnn index 8fa6c692b27..ab552fefffa 100644 --- a/DNN Platform/Modules/CoreMessaging/CoreMessaging.dnn +++ b/DNN Platform/Modules/CoreMessaging/CoreMessaging.dnn @@ -1,6 +1,6 @@ - + Message Center Core Messaging module allows users to message each other. ~/DesktopModules/CoreMessaging/Images/messaging_32X32.png diff --git a/DNN Platform/Modules/CoreMessaging/DotNetNuke.Modules.CoreMessaging.csproj b/DNN Platform/Modules/CoreMessaging/DotNetNuke.Modules.CoreMessaging.csproj index 8c3d10a9623..831572f1f4a 100644 --- a/DNN Platform/Modules/CoreMessaging/DotNetNuke.Modules.CoreMessaging.csproj +++ b/DNN Platform/Modules/CoreMessaging/DotNetNuke.Modules.CoreMessaging.csproj @@ -167,6 +167,10 @@ + + {6928a9b1-f88a-4581-a132-d3eb38669bb0} + DotNetNuke.Abstractions + {ee1329fe-fd88-4e1a-968c-345e394ef080} DotNetNuke.Web diff --git a/DNN Platform/Modules/CoreMessaging/Services/MessagingServiceController.cs b/DNN Platform/Modules/CoreMessaging/Services/MessagingServiceController.cs index 9d3ca30ac4a..0d1e8232969 100644 --- a/DNN Platform/Modules/CoreMessaging/Services/MessagingServiceController.cs +++ b/DNN Platform/Modules/CoreMessaging/Services/MessagingServiceController.cs @@ -1,7 +1,7 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information - +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + namespace DotNetNuke.Modules.CoreMessaging.Services { using System; @@ -11,8 +11,9 @@ namespace DotNetNuke.Modules.CoreMessaging.Services using System.Net.Http; using System.Web; using System.Web.Http; - + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; using DotNetNuke.Entities.Modules; using DotNetNuke.Entities.Portals; using DotNetNuke.Entities.Users; @@ -117,8 +118,9 @@ public HttpResponseMessage Reply(ReplyDTO postData) { try { - postData.Body = HttpUtility.UrlDecode(postData.Body); - var messageId = InternalMessagingController.Instance.ReplyMessage(postData.ConversationId, postData.Body, postData.FileIds); + var body = HttpUtility.UrlDecode(postData.Body); + body = PortalSecurity.Instance.InputFilter(body, PortalSecurity.FilterFlag.NoMarkup); + var messageId = InternalMessagingController.Instance.ReplyMessage(postData.ConversationId, body, postData.FileIds); var message = this.ToExpandoObject(InternalMessagingController.Instance.GetMessage(messageId)); var portalId = PortalController.GetEffectivePortalId(UserController.Instance.GetCurrentUserInfo().PortalID); diff --git a/DNN Platform/Modules/CoreMessaging/Services/SubscriptionsController.cs b/DNN Platform/Modules/CoreMessaging/Services/SubscriptionsController.cs index 44c0f81d714..b0b0e6e07d5 100644 --- a/DNN Platform/Modules/CoreMessaging/Services/SubscriptionsController.cs +++ b/DNN Platform/Modules/CoreMessaging/Services/SubscriptionsController.cs @@ -1,7 +1,6 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information - +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information namespace DotNetNuke.Modules.CoreMessaging.Services { using System; @@ -13,7 +12,8 @@ namespace DotNetNuke.Modules.CoreMessaging.Services using System.Net.Http; using System.Web.Http; using System.Xml; - + + using DotNetNuke.Abstractions.Portals; using DotNetNuke.Entities.Modules; using DotNetNuke.Modules.CoreMessaging.ViewModels; using DotNetNuke.Services.Exceptions; @@ -22,7 +22,7 @@ namespace DotNetNuke.Modules.CoreMessaging.Services using DotNetNuke.Services.Social.Subscriptions; using DotNetNuke.Services.Social.Subscriptions.Entities; using DotNetNuke.Web.Api; - + [DnnAuthorize] public class SubscriptionsController : DnnApiController { @@ -154,7 +154,7 @@ public HttpResponseMessage GetLocalizationTable(string culture) { if (!string.IsNullOrEmpty(culture)) { - Localization.SetThreadCultures(new CultureInfo(culture), this.PortalSettings); + Localization.SetThreadCultures(new CultureInfo(culture), (IPortalSettings)this.PortalSettings); } var dictionary = new Dictionary(); diff --git a/DNN Platform/Modules/CoreMessaging/View.ascx b/DNN Platform/Modules/CoreMessaging/View.ascx index c55287d5ae9..62d47584ad2 100644 --- a/DNN Platform/Modules/CoreMessaging/View.ascx +++ b/DNN Platform/Modules/CoreMessaging/View.ascx @@ -114,7 +114,7 @@
    <%=LocalizeString("From")%>:
    <%=LocalizeString("SentTo")%>:
    -
    +
  • @@ -176,7 +176,7 @@
    -
    +
    <%=LocalizeString("Attachments")%>:
      diff --git a/DNN Platform/Modules/DDRMenu/DDRMenu.dnn b/DNN Platform/Modules/DDRMenu/DDRMenu.dnn index fd30a6cfe7f..e52a005dcb0 100644 --- a/DNN Platform/Modules/DDRMenu/DDRMenu.dnn +++ b/DNN Platform/Modules/DDRMenu/DDRMenu.dnn @@ -1,108 +1,108 @@  - - - DDR Menu - DotNetNuke Navigation Provider. - - .NET Foundation - https://dnncommunity.org - info@dnncommunity.org - - - - - 07.00.00 - - + + + DDR Menu + DotNetNuke Navigation Provider. + + .NET Foundation + https://dnncommunity.org + info@dnncommunity.org + + + + + 07.00.00 + + - - DDRMenu - DDRMenu - DotNetNuke.Web.DDRMenu.Controller,DotNetNuke.Web.DDRMenu - - - - - - - DDR Menu - 0 - - - - DesktopModules/DDRMenu/MenuView.ascx - False - DDR menu - View - - - Settings - DesktopModules/DDRMenu/MenuSettings.ascx - False - True - DDR menu settings - Edit - - - - - - - DotNetNuke.Entities.Modules.EventMessageProcessor, DotNetNuke - UpgradeModule - - DotNetNuke.Web.DDRMenu.Controller,DotNetNuke.Web.DDRMenu - [DESKTOPMODULEID] - 00.00.01 - - - - - - DDRMENU - DesktopModules/DDRMenu/Menu.ascx - - - - - bin - - DotNetNuke.Web.DDRMenu.dll + + DDRMenu + DDRMenu + DotNetNuke.Web.DDRMenu.Controller,DotNetNuke.Web.DDRMenu + + + + + + + DDR Menu + 0 + + + + DesktopModules/DDRMenu/MenuView.ascx + False + DDR menu + View + + + Settings + DesktopModules/DDRMenu/MenuSettings.ascx + False + True + DDR menu settings + Edit + + + + + + + DotNetNuke.Entities.Modules.EventMessageProcessor, DotNetNuke + UpgradeModule + + DotNetNuke.Web.DDRMenu.Controller,DotNetNuke.Web.DDRMenu + [DESKTOPMODULEID] + 00.00.01 + + + + + + DDRMENU + DesktopModules/DDRMenu/Menu.ascx + + + + + bin + + DotNetNuke.Web.DDRMenu.dll bin\DotNetNuke.Web.DDRMenu.dll - - - - - DesktopModules\DDRMenu - - resources.zip - - - - - - web.config - - - - - - - - - - - - - - - - - - - - - + + + + + DesktopModules\DDRMenu + + resources.zip + + + + + + web.config + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DNN Platform/Modules/DigitalAssets/EditFolderMapping.ascx.cs b/DNN Platform/Modules/DigitalAssets/EditFolderMapping.ascx.cs index 784bc99a88e..b6803a22ff0 100644 --- a/DNN Platform/Modules/DigitalAssets/EditFolderMapping.ascx.cs +++ b/DNN Platform/Modules/DigitalAssets/EditFolderMapping.ascx.cs @@ -64,7 +64,7 @@ protected override void OnInit(EventArgs e) } this.UpdateButton.Text = (this.FolderMappingID == Null.NullInteger) ? Localization.GetString("Add") : Localization.GetString("Update", this.LocalResourceFile); - this.CancelHyperLink.NavigateUrl = this.EditUrl("FolderMappings"); + this.CancelHyperLink.NavigateUrl = this._navigationManager.NavigateURL(this.TabId); var controlTitle = Localization.GetString("ControlTitle", this.LocalResourceFile); var controlTitlePrefix = (this.FolderMappingID == Null.NullInteger) ? Localization.GetString("New") : Localization.GetString("Edit"); @@ -194,7 +194,7 @@ private void cmdUpdate_Click(object sender, EventArgs e) if (!this.Response.IsRequestBeingRedirected) { - this.Response.Redirect(this._navigationManager.NavigateURL(this.TabId, "FolderMappings", "mid=" + this.ModuleId, "popUp=true")); + this.Response.Redirect(this._navigationManager.NavigateURL(this.TabId)); } } catch (Exception exc) diff --git a/DNN Platform/Modules/DigitalAssets/dnn_DigitalAssets.dnn b/DNN Platform/Modules/DigitalAssets/dnn_DigitalAssets.dnn index fa1a74f7d50..bea83c59b28 100644 --- a/DNN Platform/Modules/DigitalAssets/dnn_DigitalAssets.dnn +++ b/DNN Platform/Modules/DigitalAssets/dnn_DigitalAssets.dnn @@ -1,6 +1,6 @@ - + Digital Asset Management DotNetNuke Corporation Digital Asset Management module Images/Files_32x32_Standard.png diff --git a/DNN Platform/Modules/DnnExportImport/Components/Services/PagesExportService.cs b/DNN Platform/Modules/DnnExportImport/Components/Services/PagesExportService.cs index 09f3558ed04..0586b3f9bab 100644 --- a/DNN Platform/Modules/DnnExportImport/Components/Services/PagesExportService.cs +++ b/DNN Platform/Modules/DnnExportImport/Components/Services/PagesExportService.cs @@ -968,8 +968,10 @@ private int ImportTabModulesAndRelatedItems(TabInfo localTab, ExportTab otherTab try { var localExpModule = localExportModules.FirstOrDefault( - m => m.ModuleID == local.ModuleID && m.FriendlyName == local.ModuleDefinition.FriendlyName); - if (localExpModule == null) + m => m.ModuleID == local.ModuleID && m.FriendlyName == local.ModuleDefinition.FriendlyName); + var hasPaneChanged = local.PaneName != other.PaneName; + + if (localExpModule == null || hasPaneChanged) { local = new ModuleInfo { diff --git a/DNN Platform/Modules/DnnExportImport/dnn_SiteExportImport.dnn b/DNN Platform/Modules/DnnExportImport/dnn_SiteExportImport.dnn index 3af76f58474..7105aa2345e 100644 --- a/DNN Platform/Modules/DnnExportImport/dnn_SiteExportImport.dnn +++ b/DNN Platform/Modules/DnnExportImport/dnn_SiteExportImport.dnn @@ -1,6 +1,6 @@ - + Site Export Import DotNetNuke Corporation Site Export Import Library Images/Files_32x32_Standard.png diff --git a/DNN Platform/Modules/DnnExportImportLibrary/Dto/Pages/ExportTabModule.cs b/DNN Platform/Modules/DnnExportImportLibrary/Dto/Pages/ExportTabModule.cs index 72485c2f04f..07f284cded9 100644 --- a/DNN Platform/Modules/DnnExportImportLibrary/Dto/Pages/ExportTabModule.cs +++ b/DNN Platform/Modules/DnnExportImportLibrary/Dto/Pages/ExportTabModule.cs @@ -39,12 +39,16 @@ public class ExportTabModule : BasicExportImportDto public bool DisplaySyndicate { get; set; } + [Obsolete("WebSlice functionality is no longer used. Will be removed in v10.0.0")] public bool IsWebSlice { get; set; } + [Obsolete("WebSlice functionality is no longer used. Will be removed in v10.0.0")] public string WebSliceTitle { get; set; } + [Obsolete("WebSlice functionality is no longer used. Will be removed in v10.0.0")] public DateTime? WebSliceExpiryDate { get; set; } + [Obsolete("WebSlice functionality is no longer used. Will be removed in v10.0.0")] public int? WebSliceTTL { get; set; } public int? CreatedByUserID { get; set; } diff --git a/DNN Platform/Modules/Groups/SocialGroups.dnn b/DNN Platform/Modules/Groups/SocialGroups.dnn index cc12c8fd00d..460107886ca 100644 --- a/DNN Platform/Modules/Groups/SocialGroups.dnn +++ b/DNN Platform/Modules/Groups/SocialGroups.dnn @@ -1,6 +1,6 @@ - + Social Groups DotNetNuke Corporation Social Groups module ~/DesktopModules/SocialGroups/Images/Social_Groups_32X32.png diff --git a/DNN Platform/Modules/HTML/DotNetNuke.Modules.Html.csproj b/DNN Platform/Modules/HTML/DotNetNuke.Modules.Html.csproj index 4a4f40e4791..cb28d5bb9f4 100644 --- a/DNN Platform/Modules/HTML/DotNetNuke.Modules.Html.csproj +++ b/DNN Platform/Modules/HTML/DotNetNuke.Modules.Html.csproj @@ -108,10 +108,6 @@ - - ..\..\Components\Telerik\bin\Telerik.Web.UI.dll - False - diff --git a/DNN Platform/Modules/HTML/EditHtml.ascx.cs b/DNN Platform/Modules/HTML/EditHtml.ascx.cs index a33da278256..d3a0ea7a7d4 100644 --- a/DNN Platform/Modules/HTML/EditHtml.ascx.cs +++ b/DNN Platform/Modules/HTML/EditHtml.ascx.cs @@ -23,7 +23,6 @@ namespace DotNetNuke.Modules.Html using DotNetNuke.Services.Localization; using DotNetNuke.UI.Skins.Controls; using Microsoft.Extensions.DependencyInjection; - using Telerik.Web.UI; /// /// The EditHtml PortalModuleBase is used to manage Html. diff --git a/DNN Platform/Modules/HTML/dnn_HTML.dnn b/DNN Platform/Modules/HTML/dnn_HTML.dnn index c25295d9982..1af0ca86bf2 100644 --- a/DNN Platform/Modules/HTML/dnn_HTML.dnn +++ b/DNN Platform/Modules/HTML/dnn_HTML.dnn @@ -1,209 +1,208 @@ - - - - HTML - This module renders a block of HTML or Text content. The Html/Text module allows authorized users to edit the content either inline or in a separate administration page. Optional tokens can be used that get replaced dynamically during display. All versions of content are stored in the database including the ability to rollback to an older version. - DesktopModules\HTML\Images\html.png - - DNN - .NET Foundation - https://dnncommunity.org - info@dnncommunity.org - - - - true - - 09.01.00 - DotNetNuke.Web.Deprecated - - - - - DesktopModules\HTML - - - - - - - - - - - - - - - - - - - - - DNN_HTML - HTML - Supported - DotNetNuke.Modules.Html.HtmlTextController, DotNetNuke.Modules.Html - - - - - - - - Text/HTML - 1200 - - - - DesktopModules/HTML/HtmlModule.ascx - False - - View - - https://dnndocs.com - 0 - - - Edit - DesktopModules/HTML/EditHTML.ascx - True - Edit Content - Edit - - https://dnndocs.com - 0 - True - - - MyWork - DesktopModules/HTML/MyWork.ascx - True - My Work - View - - https://dnndocs.com - 0 - True - - - Settings - DesktopModules/HTML/Settings.ascx - True - Settings - Edit - - https://dnndocs.com - 0 - - - - - - - DotNetNuke.Entities.Modules.EventMessageProcessor, DotNetNuke - UpgradeModule - - DotNetNuke.Modules.Html.HtmlTextController - [DESKTOPMODULEID] - 05.01.02,06.00.00,06.02.00 - - - - - - - bin - DotNetNuke.Modules.Html.dll - - - - - - DesktopModules/HTML - - Resources.zip - - - - - - - - - - - - - - - - - - + + + + HTML + This module renders a block of HTML or Text content. The Html/Text module allows authorized users to edit the content either inline or in a separate administration page. Optional tokens can be used that get replaced dynamically during display. All versions of content are stored in the database including the ability to rollback to an older version. + DesktopModules\HTML\Images\html.png + + DNN + .NET Foundation + https://dnncommunity.org + info@dnncommunity.org + + + + true + + 09.01.00 + + + + + DesktopModules\HTML + + + + + + + + + + + + + + + + + + + + + DNN_HTML + HTML + Supported + DotNetNuke.Modules.Html.HtmlTextController, DotNetNuke.Modules.Html + + + + + + + + Text/HTML + 1200 + + + + DesktopModules/HTML/HtmlModule.ascx + False + + View + + https://dnndocs.com + 0 + + + Edit + DesktopModules/HTML/EditHTML.ascx + True + Edit Content + Edit + + https://dnndocs.com + 0 + True + + + MyWork + DesktopModules/HTML/MyWork.ascx + True + My Work + View + + https://dnndocs.com + 0 + True + + + Settings + DesktopModules/HTML/Settings.ascx + True + Settings + Edit + + https://dnndocs.com + 0 + + + + + + + DotNetNuke.Entities.Modules.EventMessageProcessor, DotNetNuke + UpgradeModule + + DotNetNuke.Modules.Html.HtmlTextController + [DESKTOPMODULEID] + 05.01.02,06.00.00,06.02.00 + + + + + + + bin + DotNetNuke.Modules.Html.dll + + + + + + DesktopModules/HTML + + Resources.zip + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DNN Platform/Modules/HtmlEditorManager/DotNetNuke.Modules.HtmlEditorManager.csproj b/DNN Platform/Modules/HtmlEditorManager/DotNetNuke.Modules.HtmlEditorManager.csproj index a0f7fe74f8f..4beb96fc39b 100644 --- a/DNN Platform/Modules/HtmlEditorManager/DotNetNuke.Modules.HtmlEditorManager.csproj +++ b/DNN Platform/Modules/HtmlEditorManager/DotNetNuke.Modules.HtmlEditorManager.csproj @@ -79,10 +79,6 @@ - - ..\..\Components\Telerik\bin\Telerik.Web.UI.dll - False - ..\..\..\packages\WebFormsMVP.1.4.1.0\lib\WebFormsMvp.dll diff --git a/DNN Platform/Modules/HtmlEditorManager/dnn_HtmlEditorManager.dnn b/DNN Platform/Modules/HtmlEditorManager/dnn_HtmlEditorManager.dnn index 0cfa83862ba..d70125900ef 100644 --- a/DNN Platform/Modules/HtmlEditorManager/dnn_HtmlEditorManager.dnn +++ b/DNN Platform/Modules/HtmlEditorManager/dnn_HtmlEditorManager.dnn @@ -1,6 +1,6 @@  - + Html Editor Management Images/HtmlEditorManager_Standard_32x32.png A module used to configure toolbar items, behavior, and other options used in the DotNetNuke HtmlEditor Provider. diff --git a/DNN Platform/Modules/Journal/Journal.dnn b/DNN Platform/Modules/Journal/Journal.dnn index 7949815349d..bf35e5df739 100644 --- a/DNN Platform/Modules/Journal/Journal.dnn +++ b/DNN Platform/Modules/Journal/Journal.dnn @@ -1,6 +1,6 @@ - + Journal DotNetNuke Corporation Journal module DesktopModules/Journal/Images/journal_32X32.png diff --git a/DNN Platform/Modules/MemberDirectory/MemberDirectory.dnn b/DNN Platform/Modules/MemberDirectory/MemberDirectory.dnn index 4e72e7b1d82..ca78fec0068 100644 --- a/DNN Platform/Modules/MemberDirectory/MemberDirectory.dnn +++ b/DNN Platform/Modules/MemberDirectory/MemberDirectory.dnn @@ -1,6 +1,6 @@ - + Member Directory The Member Directory module displays a list of Members based on role, profile property or relationship. ~/DesktopModules/MemberDirectory/Images/member_list_32X32.png diff --git a/DNN Platform/Modules/RazorHost/DotNetNuke.Modules.RazorHost.csproj b/DNN Platform/Modules/RazorHost/DotNetNuke.Modules.RazorHost.csproj index cb460f99ef3..f1b678e1605 100644 --- a/DNN Platform/Modules/RazorHost/DotNetNuke.Modules.RazorHost.csproj +++ b/DNN Platform/Modules/RazorHost/DotNetNuke.Modules.RazorHost.csproj @@ -75,10 +75,6 @@ - - ..\..\Components\Telerik\bin\Telerik.Web.UI.dll - False - diff --git a/DNN Platform/Modules/RazorHost/Manifest.dnn b/DNN Platform/Modules/RazorHost/Manifest.dnn index 2a0c949f4a3..77cc01e3029 100644 --- a/DNN Platform/Modules/RazorHost/Manifest.dnn +++ b/DNN Platform/Modules/RazorHost/Manifest.dnn @@ -1,6 +1,6 @@  - + {0} {1} diff --git a/DNN Platform/Modules/RazorHost/RazorHost.dnn b/DNN Platform/Modules/RazorHost/RazorHost.dnn index b051c5b0e5b..6d413b542d0 100644 --- a/DNN Platform/Modules/RazorHost/RazorHost.dnn +++ b/DNN Platform/Modules/RazorHost/RazorHost.dnn @@ -1,6 +1,6 @@  - + Razor Host The Razor Host module allows developers to host Razor Scripts. diff --git a/DNN Platform/Modules/ResourceManager/App_LocalResources/EditFolderMapping.ascx.resx b/DNN Platform/Modules/ResourceManager/App_LocalResources/EditFolderMapping.ascx.resx new file mode 100644 index 00000000000..481d1b99f2d --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/App_LocalResources/EditFolderMapping.ascx.resx @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + {0} Folder Type + + + Edit Folder Mapping + + + Use this dialog to define a new folder type. + + + A mapping with the same name already exists. The changes have not been saved. + + + Folder Provider Settings + + + General Settings + + + Select the folder provider to use. + + + Folder Provider + + + Enter the name of this folder mapping. + + + Name + + + Indicates required fields. + + + - Select a Folder Provider - + + + After updating the folder type, a synchronization will be performed on the folders using this type. This may take some time, depending on the number of folders that match the criteria. + + + Update + + + Folder provider is required. + + + Name is required. + + \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/App_LocalResources/ResourceManager.resx b/DNN Platform/Modules/ResourceManager/App_LocalResources/ResourceManager.resx new file mode 100644 index 00000000000..1c35ffd4857 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/App_LocalResources/ResourceManager.resx @@ -0,0 +1,321 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Add Asset + + + Add Folder + + + Use the tools above to add an asset or create a folder + + + This Folder is Empty + + + Cancel + + + Close + + + Database + + + Confirm delete + + + Are you sure to delete the file? + + + Confirm delete + + + Are you sure to delete the folder? + + + The file you want to upload already exists in this folder. + + + File Uploaded. + + + File upload stopped + + + Enter folder name + + + The folder name is required + + + Folder Parent + + + The folder type is required + + + Name + + + Save + + + Secure + + + Standard + + + Type + + + The user does not have permission to delete folder. + + + The user does not have permission to download this file. + + + Drag and Drop a File or Select an Option + + + Your Search Produced No Results + + + Search Files + + + Search + + + Url copied to clipboard + + + Created + + + Description + + + Last Modified + + + Size + + + Title + + + URL + + + Name is required + + + User has no permission to read file properties. + + + An error has ocurred. + + + Item saved. + + + Folder Type + + + Created on Date + + + Item Name + + + Last Modified on Date + + + is too big. The maximun file size allowed is + + + The user does not have permission to delete file. + + + User has no permission to manage file properties. + + + The user does not have permission to manage this folder. + + + No Folder Selected + + + Search Folder + + + Disabled for anonymous users. + + + The user does not have permission to add new folders. + + + The Group Icon file can't be deleted. + + + is not of a type that is allowed to be uploaded + + + Refresh + + + Sync This Folder + + + Sync This Folder & Subfolders + + + Manage Folder Types + + + Add Folder Type + + + Folder Provider + + + Folder Type Definitions + + + Edit Folder Type + + + Remove Folder Type + + + Are you sure you want to remove this folder type? + + + Remove Folder Type + + + Move Item + + + New Location + + \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/App_LocalResources/Settings.ascx.resx b/DNN Platform/Modules/ResourceManager/App_LocalResources/Settings.ascx.resx new file mode 100644 index 00000000000..57914d1af5a --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/App_LocalResources/Settings.ascx.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ResourceManager Settings + + + Select the root folder for the module + + + Home Folder + + + The mode the module should operate in, normal, group or user (group mode associates the module instance with the group's folder, user mode associates the module instance with the user's folder) + + + Mode + + \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/App_LocalResources/View.ascx.resx b/DNN Platform/Modules/ResourceManager/App_LocalResources/View.ascx.resx new file mode 100644 index 00000000000..46a930fc784 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/App_LocalResources/View.ascx.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Edit Module + + + The module is in group mode, but the page isn't + + + The module is in user mode, but the user is not signed in + + \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/Components/Common/Utils.cs b/DNN Platform/Modules/ResourceManager/Components/Common/Utils.cs new file mode 100644 index 00000000000..ecdac57e050 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/Common/Utils.cs @@ -0,0 +1,62 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Components.Common +{ + using System; + using System.ComponentModel; + + using DotNetNuke.Services.FileSystem; + + /// + /// General utilities for the Resource Manager. + /// + public class Utils + { + /// + /// Obtains a human friendly description from an enum value using the + /// attribute to get a proper name. + /// + /// The enum value to lookup. + /// The specified description attribute name or the value of the enum as a string. + public static string GetEnumDescription(Enum enumValue) + { + var fi = enumValue.GetType().GetField(enumValue.ToString()); + var descriptionAttributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false); + + if (descriptionAttributes.Length > 0) + { + return descriptionAttributes[0].Description; + } + + return enumValue.ToString(); + } + + /// + /// Gets the id of the group folder. + /// + /// The id of the folder. + /// An integer representing the root folder id for the group. + public static int GetFolderGroupId(int folderId) + { + var folder = FolderManager.Instance.GetFolder(folderId); + var folderPath = folder.DisplayPath; + + if (!folderPath.StartsWith(Constants.GroupFolderPathStart)) + { + return -1; + } + + var prefixLength = Constants.GroupFolderPathStart.Length; + var folderGroupIdString = folderPath.Substring(prefixLength - 1); + folderGroupIdString = folderGroupIdString.Substring(0, folderGroupIdString.IndexOf("/")); + + if (!int.TryParse(folderGroupIdString, out var folderGroupId)) + { + return -1; + } + + return folderGroupId; + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Components/Constants.cs b/DNN Platform/Modules/ResourceManager/Components/Constants.cs new file mode 100644 index 00000000000..2135247c8d9 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/Constants.cs @@ -0,0 +1,145 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Components +{ + using System; + using System.ComponentModel; + + using Dnn.Modules.ResourceManager.Components.Models; + using Dnn.Modules.ResourceManager.Helpers; + + /// + /// Defines common constants for the resource manager. + /// + internal class Constants + { + /// + /// The relative path to the shared resource file for this module. + /// + public const string ViewResourceFileName = "~/DesktopModules/ResourceManager/App_LocalResources/ResourceManager.resx"; + + /// + /// The module path. + /// + public const string ModulePath = "DesktopModules/ResourceManager/"; + + /// + /// The cache key for the resource manager localization. + /// + public const string ResourceManagerResxDataCacheKey = "ResourceManagerResxResources:{0}:{1}"; + + /// + /// The cache key for the modified date of the resource files. + /// + public const string ResourceManagerResxModifiedDateCacheKey = "ResourceManagerResxModifiedDate:{0}"; + + /// + /// A string indicating the user has no permission to browser a folder. + /// + public const string UserHasNoPermissionToBrowseFolderDefaultMessage = "The user has no permission to browse this folder"; + + /// + /// The path the the groups folder. + /// + public const string GroupFolderPathStart = "Groups/"; + + /// + /// A key indicating the group icon can't be deleted. + /// + public const string GroupIconCantBeDeletedKey = "GroupIconCantBeDeleted.Error"; + + /// + /// A key indicating the user has no permission to download. + /// + public const string UserHasNoPermissionToDownloadKey = "UserHasNoPermissionToDownload.Error"; + + /// + /// A key indicating the user has no permission to add folders. + /// + public const string UserHasNoPermissionToAddFoldersKey = "UserHasNoPermissionToAddFolders.Error"; + + /// + /// The name of the setting for the resource manager home folder. + /// + public const string HomeFolderSettingName = "RM_HomeFolder"; + + /// + /// The resource manager module setting name. + /// + public const string ModeSettingName = "RM_Mode"; + + /// + /// How many items to show per page. + /// + public const int ItemsPerPage = 20; + + /// + /// The width of the items. + /// + public const int ItemWidth = 176; + + /// + /// The default module mode, . + /// + public const int DefaultMode = 0; + + /// + /// The default field to sort files by. + /// + public const string DefaultSortingField = "ItemName"; + + /// + /// A timespan that represents 5 minutes. + /// + public static readonly TimeSpan FiveMinutes = TimeSpan.FromMinutes(5); + + /// + /// Contains the localization info for the resource manager. + /// + public static readonly Localization ResourceManagerLocalization = new Localization + { + ResxDataCacheKey = ResourceManagerResxDataCacheKey, + ResxModifiedDateCacheKey = ResourceManagerResxModifiedDateCacheKey, + }; + + /// + /// The possible sorting fields for files. + /// + public static readonly dynamic[] SortingFields = + { + new { value = "LastModifiedOnDate", label = LocalizationHelper.GetString("LastModifiedOnDate") }, + new { value = "CreatedOnDate", label = LocalizationHelper.GetString("CreatedOnDate") }, + new { value = "ItemName", label= LocalizationHelper.GetString("ItemName") }, + }; + + /// + /// The localization cache key. + /// + internal const string LocalizationDataCacheKey = "LocalizationLocTable:{0}:{1}"; + + /// + /// Enumerates the possible module modes. + /// + public enum ModuleModes + { + /// + /// Normal mode is when the module is used to manage site or host files. + /// + [Description("Normal")] + Normal = 0, + + /// + /// User mode is for when a module is used for a specific user to manage his files. + /// + [Description("User")] + User = 1, + + /// + /// Group mode is for when the module is used by a social group. + /// + [Description("Group")] + Group = 2, + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Components/GroupManager.cs b/DNN Platform/Modules/ResourceManager/Components/GroupManager.cs new file mode 100644 index 00000000000..e433a556f53 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/GroupManager.cs @@ -0,0 +1,41 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Components +{ + using System; + + using DotNetNuke.Common; + using DotNetNuke.Framework; + using DotNetNuke.Services.FileSystem; + + /// + /// Manages groups. + /// + public class GroupManager : ServiceLocator, IGroupManager + { + /// + public IFolderInfo FindOrCreateGroupFolder(int portalId, int groupId) + { + Requires.NotNegative("portalId", portalId); + Requires.NotNegative("groupId", groupId); + + return this.GetGroupFolder(portalId, groupId) ?? FolderManager.Instance.AddFolder(portalId, "Groups/" + groupId); + } + + /// + public IFolderInfo GetGroupFolder(int portalId, int groupId) + { + Requires.NotNegative("portalId", portalId); + Requires.NotNegative("groupId", groupId); + + return FolderManager.Instance.GetFolder(portalId, "Groups/" + groupId); + } + + /// + protected override Func GetFactory() + { + return () => new GroupManager(); + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Components/IGroupManager.cs b/DNN Platform/Modules/ResourceManager/Components/IGroupManager.cs new file mode 100644 index 00000000000..df29593c21c --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/IGroupManager.cs @@ -0,0 +1,29 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Components +{ + using DotNetNuke.Services.FileSystem; + + /// + /// Manager class for Groups logic on Resource Manager. + /// + public interface IGroupManager + { + /// + /// Find or create the folder of the group. + /// + /// Id of the portal. + /// Id of the group. + /// The Group folder. If the group has no folder currently, then a new one will be created and returned, .. + IFolderInfo FindOrCreateGroupFolder(int portalId, int groupId); + + /// + /// Get the folder of the group. + /// + /// Id of the portal. + /// Id of the group. + /// The group folder, if it exist, or null if doesn't, . + IFolderInfo GetGroupFolder(int portalId, int groupId); + } +} diff --git a/DNN Platform/Modules/ResourceManager/Components/IItemsManager.cs b/DNN Platform/Modules/ResourceManager/Components/IItemsManager.cs new file mode 100644 index 00000000000..02fa4716150 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/IItemsManager.cs @@ -0,0 +1,97 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Components +{ + using System.IO; + + using Dnn.Modules.ResourceManager.Services.Dto; + + using DotNetNuke.Services.Assets; + using DotNetNuke.Services.FileSystem; + + /// + /// Manager for the items of Resource Manager. + /// + public interface IItemsManager + { + /// + /// Get the items contained on the folder. + /// + /// Container folder id. + /// Index of the first item to be returned. + /// Max number of items to return. + /// Sorting option. + /// Current mode of module instance. + /// A with the items in the folder. + ContentPage GetFolderContent(int folderId, int startIndex, int numItems, string sorting, int moduleMode); + + /// + /// Get the content of a file. + /// + /// Id of the file. + /// Name of the file. + /// Type of the file. + /// Stream of the file content. + Stream GetFileContent(int fileId, out string fileName, out string contentType); + + /// + /// Create a new folder on Parent Folder. + /// + /// Name of the new folder. + /// Id of the parent folder. + /// Id of folder mapping. + /// Mapped name. + /// Current mode of the module instance. + /// Folder info object of the new created folder. + IFolderInfo CreateNewFolder(string folderName, int parentFolderId, int folderMappingId, string mappedName, int moduleMode); + + /// + /// Update the asset details of a file. + /// + /// File. + /// New asset details of the file. + void SaveFileDetails(IFileInfo file, FileDetailsRequest fileDetails); + + /// + /// Update the asset details of a folder. + /// + /// Folder. + /// New asset details of the folder. + void SaveFolderDetails(IFolderInfo folder, FolderDetailsRequest folderDetails); + + /// + /// Deletes a file. + /// + /// id of the file to delete. + /// Current mode of the module instance. + /// Id of the group (for group mode). + void DeleteFile(int fileId, int moduleMode, int groupId); + + /// + /// Deletes a folder. + /// + /// Folder to delete Id. + /// Unlink allowed status. + /// Current mode of the module instance. + void DeleteFolder(int folderId, bool unlinkAllowedStatus, int moduleMode); + + /// + /// Moves a file into a folder. + /// + /// The id of the file to move. + /// The id of the folder to move the file into. + /// Current mode of the module instance. + /// Id of the group (gor group mode). + void MoveFile(int sourceFileId, int destinationFolderId, int moduleMode, int groupId); + + /// + /// Moves a folder into another folder. + /// + /// The id of the folder to move. + /// The id of the folder into which to move the source folder. + /// Current mode of the module instance. + /// Id of the group (for group mode). + void MoveFolder(int sourceFolderId, int destinationFolderId, int moduleMode, int groupId); + } +} diff --git a/DNN Platform/Modules/ResourceManager/Components/ILocalizationController.cs b/DNN Platform/Modules/ResourceManager/Components/ILocalizationController.cs new file mode 100644 index 00000000000..36b2ae885a7 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/ILocalizationController.cs @@ -0,0 +1,56 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + +namespace Dnn.Modules.ResourceManager.Components +{ + using System.Collections.Generic; + + using Dnn.Modules.ResourceManager.Components.Models; + + /// + /// Provides localization services. + /// + public interface ILocalizationController + { + /// + /// Gets the culture name. + /// + string CultureName { get; } + + /// + /// Gets a timestamp for a given resource file. + /// + /// The resource file for which to get the timestamp. + /// The localizatio information. + /// A long representing the resource file timestamp. + long GetResxTimeStamp(string resourceFile, Localization localization); + + /// + /// Gets a localized dictionary from a resource file. + /// + /// The resource file from which to generate a dictionary. + /// The culture to get. + /// The localization information. + /// + /// A where the key is a string representing + /// the localization key and the value is a string containing the localized text. + /// + Dictionary GetLocalizedDictionary(string resourceFile, string culture, Localization localization); + + /// + /// Returns a dictionary of localized keys for a resource file for a given culture. + /// + /// + /// The relative file path of the main resource file,e.g. + /// ~/DesktopModules/SocialLibrary/App_LocalResources/CmxResources.resx . + /// + /// The culture for which this dictionay is requested. + /// This API does not fallback to any other DNN resource files. + /// + /// A where the key is a string representing + /// the localization key and the value is a string containing the localized text. + /// + Dictionary GetLocalizedDictionary(string resourceFile, string culture); + } +} diff --git a/DNN Platform/Modules/ResourceManager/Components/IPermissionsManager.cs b/DNN Platform/Modules/ResourceManager/Components/IPermissionsManager.cs new file mode 100644 index 00000000000..4d4fbc33258 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/IPermissionsManager.cs @@ -0,0 +1,58 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Components +{ + /// + /// Manager for permission logic of Resource Manager. + /// + public interface IPermissionsManager + { + /// + /// Checks if the current user is allowed to view the content of a folder. + /// + /// Id of the folder. + /// Current mode of the module instance. + /// A value indicating whether the user is allowed to view the content of the folder. + bool HasFolderContentPermission(int folderId, int moduleMode); + + /// + /// Checks if the current user is allowed to read the files in a folder. + /// + /// Id of the folder. + /// A value indicating whether the user is allowed to view the content of the folder. + bool HasGetFileContentPermission(int folderId); + + /// + /// Checks if the current user is allowed to add files to a folder. + /// + /// Current mode of the module instance. + /// Id of the folder. + /// A value indicating whether the user is allowed to add files to the folder. + bool HasAddFilesPermission(int moduleMode, int folderId); + + /// + /// Checks if the current user is allowed to add folders to a folder. + /// + /// Current mode of the module instance. + /// Id of the folder. + /// A value indicating whether the user is allowed to add folders to the folder. + bool HasAddFoldersPermission(int moduleMode, int folderId); + + /// + /// Cehcks if the current user is allowed to delete items from a folder. + /// + /// Current mode of the module instace. + /// Id of the folder. + /// A value indicating whether the user is allowed to delete items from the folder. + bool HasDeletePermission(int moduleMode, int folderId); + + /// + /// Checks if the current user is allowed to manage the items in a folder. + /// + /// Current mode of the module instance. + /// Id of the folder. + /// A value indicating whether the user is allowed to manage the items in the folder. + bool HasManagePermission(int moduleMode, int folderId); + } +} diff --git a/DNN Platform/Modules/ResourceManager/Components/ISearchController.cs b/DNN Platform/Modules/ResourceManager/Components/ISearchController.cs new file mode 100644 index 00000000000..909433a65fc --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/ISearchController.cs @@ -0,0 +1,30 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Components +{ + using System.Collections.Generic; + + using DotNetNuke.Services.FileSystem; + + /// + /// Provides search functionality for the resource manager. + /// + public interface ISearchController + { + /// + /// Performs the Advanced File Search. + /// + /// The id of the Module. + /// Folder that defines the context of the search. + /// A value indicating whether to include subfolders in search. + /// Search query. + /// The page index to get. + /// The size of each page. + /// A string that defines the sort. + /// Module Mode. + /// Returns the total count (out parameter). + /// Result set of the file search page. + IList SearchFolderContent(int moduleId, IFolderInfo folder, bool recursive, string search, int pageIndex, int pageSize, string sorting, int moduleMode, out int totalCount); + } +} diff --git a/DNN Platform/Modules/ResourceManager/Components/IThumbnailsManager.cs b/DNN Platform/Modules/ResourceManager/Components/IThumbnailsManager.cs new file mode 100644 index 00000000000..13c28908489 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/IThumbnailsManager.cs @@ -0,0 +1,85 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Components +{ + using System.Drawing; + + using Dnn.Modules.ResourceManager.Components.Models; + + using DotNetNuke.Services.FileSystem; + + /// + /// Manager for Thumbnails on Resource Manager. + /// + public interface IThumbnailsManager + { + /// + /// Checks if a file has an available thumbnail. + /// + /// Name of the file. + /// A value indicating wheter the file is available to get a thumbnail. + bool ThumbnailAvailable(string fileName); + + /// + /// Gets the url of the thumbnail of a file. + /// + /// Id of the module. + /// Id of the file. + /// Width of the thumbnail to generate. + /// Height of the thumbnail to generate. + /// A string containing the url of the requested thumbnail. + string ThumbnailUrl(int moduleId, int fileId, int width, int height); + + /// + /// Gets the url of the thumbnail of a file. + /// + /// Id of the module. + /// Id of the file. + /// Width of the thumbnail to generate. + /// Height of the thumbnail to generate. + /// A timestamp string to append to the url for cachebusting. + /// A string containing the url of the requested thumbnail. + string ThumbnailUrl(int moduleId, int fileId, int width, int height, string timestamp); + + /// + /// Gets the url of the thumbnail of a file. + /// + /// Id of the module. + /// Id of the file. + /// Width of the thumbnail to generate. + /// Height of the thumbnail to generate. + /// The version number of the file. + /// A string containing the url of the requested thumbnail. + string ThumbnailUrl(int moduleId, int fileId, int width, int height, int version); + + /// + /// Get the thumbnail from an image. + /// + /// Url of the image. + /// Width of the thumbnail to generate. + /// Height of the thumbnail to generate. + /// The thumbnail of the image, . + ThumbnailContent GetThumbnailContentFromImageUrl(string imageUrl, int width, int height); + + /// + /// Get the thumbnail from an image. + /// + /// The original image from which to get a thumbnail. + /// Width of the thumbnail to generate. + /// Height of the thumbnail to generate. + /// If true, will crop the thumbnail image. + /// The thumbnail of the image, . + ThumbnailContent GetThumbnailContentFromImage(Image image, int width, int height, bool crop = false); + + /// + /// Get the thumbnail from a file. + /// + /// The file from which to get a thumbnail. + /// Width of the thumbnail to generate. + /// Height of the thumbnail to generate. + /// If true, will crop the thumbnail image. + /// The thumbnail of the file, . + ThumbnailContent GetThumbnailContent(IFileInfo item, int width, int height, bool crop = false); + } +} diff --git a/DNN Platform/Modules/ResourceManager/Components/ItemsManager.cs b/DNN Platform/Modules/ResourceManager/Components/ItemsManager.cs new file mode 100644 index 00000000000..495703a4ef2 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/ItemsManager.cs @@ -0,0 +1,254 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Components +{ + using System; + using System.Collections.Generic; + using System.IO; + + using Dnn.Modules.ResourceManager.Components.Common; + using Dnn.Modules.ResourceManager.Exceptions; + using Dnn.Modules.ResourceManager.Helpers; + using Dnn.Modules.ResourceManager.Services.Dto; + + using DotNetNuke.Entities; + using DotNetNuke.Entities.Content; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Users; + using DotNetNuke.Framework; + using DotNetNuke.Security.Roles; + using DotNetNuke.Services.Assets; + using DotNetNuke.Services.FileSystem; + using DotNetNuke.Services.FileSystem.EventArgs; + using DotNetNuke.Services.Localization; + + /// + /// Provides services to manage items. + /// + public class ItemsManager : ServiceLocator, IItemsManager + { + private const int MaxDescriptionLength = 500; + private readonly IRoleController roleController; + private readonly IFileManager fileManager; + private readonly IAssetManager assetManager; + private readonly IPermissionsManager permissionsManager; + + /// + /// Initializes a new instance of the class. + /// + public ItemsManager() + { + this.roleController = RoleController.Instance; + this.fileManager = FileManager.Instance; + this.assetManager = AssetManager.Instance; + this.permissionsManager = PermissionsManager.Instance; + } + + /// + public ContentPage GetFolderContent(int folderId, int startIndex, int numItems, string sorting, int moduleMode) + { + var noPermissionMessage = Localization.GetExceptionMessage( + "UserHasNoPermissionToBrowseFolder", + Constants.UserHasNoPermissionToBrowseFolderDefaultMessage); + + if (!this.permissionsManager.HasFolderContentPermission(folderId, moduleMode)) + { + throw new FolderPermissionNotMetException(noPermissionMessage); + } + + try + { + return AssetManager.Instance.GetFolderContent(folderId, startIndex, numItems, sorting + " ASC"); + } + catch (AssetManagerException) + { + throw new FolderPermissionNotMetException(noPermissionMessage); + } + } + + /// + public Stream GetFileContent(int fileId, out string fileName, out string contentType) + { + var file = this.fileManager.GetFile(fileId, true); + + if (!this.permissionsManager.HasGetFileContentPermission(file.FolderId)) + { + throw new FolderPermissionNotMetException(LocalizationHelper.GetString(Constants.UserHasNoPermissionToDownloadKey)); + } + + var content = this.fileManager.GetFileContent(file); + fileName = file.FileName; + contentType = file.ContentType; + + EventManager.Instance.OnFileDownloaded(new FileDownloadedEventArgs + { + FileInfo = file, + UserId = UserController.Instance.GetCurrentUserInfo().UserID, + }); + return content; + } + + /// + public IFolderInfo CreateNewFolder(string folderName, int parentFolderId, int folderMappingId, string mappedName, int moduleMode) + { + if (!this.permissionsManager.HasAddFoldersPermission(moduleMode, parentFolderId)) + { + throw new FolderPermissionNotMetException(LocalizationHelper.GetString(Constants.UserHasNoPermissionToAddFoldersKey)); + } + + return AssetManager.Instance.CreateFolder(folderName, parentFolderId, folderMappingId, mappedName); + } + + /// + public void SaveFileDetails(IFileInfo file, FileDetailsRequest fileDetails) + { + var propertyChanged = false; + + this.assetManager.RenameFile(file.FileId, fileDetails.FileName); + if (file.Title != fileDetails.Title) + { + file.Title = fileDetails.Title; + propertyChanged = true; + } + + if (file.Description != fileDetails.Description) + { + file.Description = fileDetails.Description; + if (!string.IsNullOrEmpty(file.Description) && file.Description.Length > MaxDescriptionLength) + { + file.Description = file.Description.Substring(0, MaxDescriptionLength); + } + + propertyChanged = true; + } + + if (propertyChanged) + { + FileManager.Instance.UpdateFile(file); + } + } + + /// + public void SaveFolderDetails(IFolderInfo folder, FolderDetailsRequest folderDetails) + { + this.assetManager.RenameFolder(folderDetails.FolderId, folderDetails.FolderName); + folder.FolderPermissions.Clear(); + folder.FolderPermissions.AddRange(folderDetails.Permissions.RolePermissions.ToPermissionInfos(folderDetails.FolderId)); + folder.FolderPermissions.AddRange(folderDetails.Permissions.UserPermissions.ToPermissionInfos(folderDetails.FolderId)); + FolderManager.Instance.UpdateFolder(folder); + } + + /// + public void DeleteFile(int fileId, int moduleMode, int groupId) + { + var file = FileManager.Instance.GetFile(fileId); + if (file == null) + { + return; + } + + if (moduleMode == (int)Constants.ModuleModes.Group && this.IsGroupIcon(file)) + { + throw new FolderPermissionNotMetException(LocalizationHelper.GetString(Constants.GroupIconCantBeDeletedKey)); + } + + if (!this.permissionsManager.HasDeletePermission(moduleMode, file.FolderId)) + { + throw new FolderPermissionNotMetException(LocalizationHelper.GetString("UserHasNoPermissionToDeleteFile.Error")); + } + + AssetManager.Instance.DeleteFile(fileId); + } + + /// + public void DeleteFolder(int folderId, bool unlinkAllowedStatus, int moduleMode) + { + var folder = FolderManager.Instance.GetFolder(folderId); + if (folder == null) + { + return; + } + + if (!this.permissionsManager.HasDeletePermission(moduleMode, folderId)) + { + throw new FolderPermissionNotMetException(LocalizationHelper.GetString("UserHasNoPermissionToDeleteFolder.Error")); + } + + var nonDeletedSubfolders = new List(); + AssetManager.Instance.DeleteFolder(folderId, unlinkAllowedStatus, nonDeletedSubfolders); + } + + /// + public void MoveFile(int sourceFileId, int destinationFolderId, int moduleMode, int groupId) + { + var file = FileManager.Instance.GetFile(sourceFileId); + var destinationFolder = FolderManager.Instance.GetFolder(destinationFolderId); + + if (file == null || destinationFolder == null) + { + return; + } + + if (!this.permissionsManager.HasDeletePermission(moduleMode, file.FolderId)) + { + throw new FolderPermissionNotMetException(LocalizationHelper.GetString("UserHasNoPermissionToDeleteFolder.Error")); + } + + if (!this.permissionsManager.HasAddFilesPermission(moduleMode, destinationFolderId)) + { + throw new FolderPermissionNotMetException(LocalizationHelper.GetString("UserHasNoPermissionToManageFolder.Error")); + } + + FileManager.Instance.MoveFile(file, destinationFolder); + } + + /// + public void MoveFolder(int sourceFolderId, int destinationFolderId, int moduleMode, int groupId) + { + var sourceFolder = FolderManager.Instance.GetFolder(sourceFolderId); + var sourceFolderParent = FolderManager.Instance.GetFolder(sourceFolder.ParentID); + var destinationFolder = FolderManager.Instance.GetFolder(destinationFolderId); + + if (sourceFolder == null || destinationFolder == null || sourceFolderParent == null) + { + return; + } + + if ( + !this.permissionsManager.HasDeletePermission(moduleMode, sourceFolderId) || + !this.permissionsManager.HasDeletePermission(moduleMode, sourceFolderParent.FolderID)) + { + throw new FolderPermissionNotMetException(LocalizationHelper.GetString("UserHasNoPermissionToDeleteFolder.Error")); + } + + if ( + !this.permissionsManager.HasAddFilesPermission(moduleMode, destinationFolderId) || + !this.permissionsManager.HasAddFoldersPermission(moduleMode, destinationFolderId)) + { + throw new FolderPermissionNotMetException(LocalizationHelper.GetString("UserHasNoPermissionToManageFolder.Error")); + } + + FolderManager.Instance.MoveFolder(sourceFolder, destinationFolder); + } + + /// + protected override Func GetFactory() + { + return () => new ItemsManager(); + } + + private bool IsGroupIcon(IFileInfo file) + { + var groupId = Utils.GetFolderGroupId(file.FolderId); + if (groupId < 0) + { + return false; + } + + var portalId = PortalSettings.Current.PortalId; + var role = this.roleController.GetRoleById(portalId, groupId); + return role?.IconFile?.Substring(7) == file.FileId.ToString(); + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Components/LocalizationController.cs b/DNN Platform/Modules/ResourceManager/Components/LocalizationController.cs new file mode 100644 index 00000000000..0e9c251fe50 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/LocalizationController.cs @@ -0,0 +1,256 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Components +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Threading; + using System.Web.Caching; + using System.Xml; + + using Dnn.Modules.ResourceManager.Components.Models; + + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Framework; + using DotNetNuke.Services.Cache; + + /// + /// Provides localization services. + /// + public class LocalizationController : ServiceLocator, ILocalizationController + { + /// + public string CultureName => Instance.CultureName; + + /// + public Dictionary GetLocalizedDictionary(string resourceFile, string culture) => + Instance.GetLocalizedDictionary(resourceFile, culture); + + /// + public Dictionary GetLocalizedDictionary(string resourceFile, string culture, Localization localization) => + Instance.GetLocalizedDictionary(resourceFile, culture, localization); + + /// + public long GetResxTimeStamp(string resourceFile, Localization localization) + => Instance.GetResxTimeStamp(resourceFile, localization); + + /// + protected override Func GetFactory() + { + return () => new LocalizationControllerImplementation(); + } + + /// + /// The localization controller implementation. + /// + private class LocalizationControllerImplementation : ILocalizationController + { + private static readonly TimeSpan FiveMinutes = TimeSpan.FromMinutes(5); + private static readonly TimeSpan OneHour = TimeSpan.FromHours(1); + + /// + public string CultureName + { + get { return Thread.CurrentThread.CurrentUICulture.Name; } + } + + /// + public long GetResxTimeStamp(string resourceFile, Localization localization) + { + return this.GetLastModifiedTime(resourceFile, this.CultureName, localization).Ticks; + } + + /// + public Dictionary GetLocalizedDictionary(string resourceFile, string culture, Localization localization) + { + Requires.NotNullOrEmpty("resourceFile", resourceFile); + Requires.NotNullOrEmpty("culture", culture); + + var cacheKey = string.Format(localization.ResxDataCacheKey, culture, resourceFile); + var localizedDict = DataCache.GetCache(cacheKey) as Dictionary; + if (localizedDict != null) + { + return localizedDict; + } + + var dictionary = new Dictionary(); + + foreach ( + var kvp in + GetLocalizationValues(resourceFile, culture).Where(kvp => !dictionary.ContainsKey(kvp.Key))) + { + dictionary[kvp.Key] = kvp.Value; + } + + DataCache.SetCache( + cacheKey, + dictionary, + default(DNNCacheDependency), + Cache.NoAbsoluteExpiration, + FiveMinutes, + CacheItemPriority.Normal, + null); + + return dictionary; + } + + /// + public Dictionary GetLocalizedDictionary(string resourceFile, string culture) + { + Requires.NotNullOrEmpty("resourceFile", resourceFile); + Requires.NotNullOrEmpty("culture", culture); + + var cacheKey = string.Format(Constants.LocalizationDataCacheKey, culture, resourceFile); + var localizedDict = DataCache.GetCache(cacheKey) as Dictionary; + if (localizedDict != null) + { + return localizedDict; + } + + var dictionary = new Dictionary(); + foreach ( + var kvp in + GetLocalizationValues(resourceFile, culture).Where(kvp => !dictionary.ContainsKey(kvp.Key))) + { + dictionary[kvp.Key] = kvp.Value; + } + + DataCache.SetCache( + cacheKey, + dictionary, + default(DNNCacheDependency), + Cache.NoAbsoluteExpiration, + Constants.FiveMinutes, + CacheItemPriority.Normal, + null); + + return dictionary; + } + + private static string GetNameAttribute(XmlNode node) + { + if (node.Attributes != null) + { + var attribute = node.Attributes.GetNamedItem("name"); + if (attribute != null) + { + return attribute.Value; + } + } + + return null; + } + + private static void AssertHeaderValue(IEnumerable headers, string key, string value) + { + var header = + headers.FirstOrDefault( + x => GetNameAttribute(x).Equals(key, StringComparison.InvariantCultureIgnoreCase)); + if (header != null) + { + if (!header.InnerText.Equals(value, StringComparison.InvariantCultureIgnoreCase)) + { + throw new ApplicationException(string.Format("Resource header '{0}' != '{1}'", key, value)); + } + } + else + { + throw new ApplicationException(string.Format("Resource header '{0}' is missing", key)); + } + } + + private static IEnumerable> GetLocalizationValues(string fullPath, string culture) + { + using ( + var stream = new FileStream( + System.Web.HttpContext.Current.Server.MapPath(fullPath), + FileMode.Open, + FileAccess.Read)) + { + var document = new XmlDocument { XmlResolver = null }; + document.Load(stream); + + var headers = document.SelectNodes(@"/root/resheader").Cast().ToArray(); + AssertHeaderValue(headers, "resmimetype", "text/microsoft-resx"); + + foreach (var xmlNode in document.SelectNodes("/root/data").Cast()) + { + var name = GetNameAttribute(xmlNode); + + const string textPostFix = ".Text"; + if (name.EndsWith(textPostFix)) + { + name = name.Substring(0, name.Length - textPostFix.Length); + } + + if (string.IsNullOrEmpty(name)) + { + continue; + } + + var key = name; + if (key.Contains(".")) + { + key = name + textPostFix; + } + + var value = DotNetNuke.Services.Localization.Localization.GetString(key, fullPath, culture); + + yield return new KeyValuePair(name, value); + } + } + } + + private DateTime GetLastModifiedTime(string resourceFile, string culture, Localization localization) + { + Requires.NotNullOrEmpty("culture", culture); + + var cacheKey = string.Format(localization.ResxModifiedDateCacheKey, culture); + var cachedData = DataCache.GetCache(cacheKey); + if (cachedData is DateTime) + { + return (DateTime)DataCache.GetCache(cacheKey); + } + + var lastModifiedDate = this.GetLastModifiedTimeInternal(resourceFile, culture); + + DataCache.SetCache( + cacheKey, + lastModifiedDate, + default(DNNCacheDependency), + Cache.NoAbsoluteExpiration, + OneHour, + CacheItemPriority.Normal, + null); + + return lastModifiedDate; + } + + private DateTime GetLastModifiedTimeInternal(string resourceFile, string culture) + { + var cultureSpecificFile = System.Web.HttpContext.Current.Server.MapPath( + resourceFile.Replace(".resx", string.Empty) + "." + culture + ".resx"); + var lastModifiedDate = DateTime.MinValue; + + if (File.Exists(cultureSpecificFile)) + { + lastModifiedDate = File.GetLastWriteTime(cultureSpecificFile); + } + else + { + var cultureNeutralFile = System.Web.HttpContext.Current.Server.MapPath(resourceFile); + if (File.Exists(cultureNeutralFile)) + { + lastModifiedDate = File.GetLastWriteTime(cultureNeutralFile); + } + } + + return lastModifiedDate; + } + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Components/Models/Localization.cs b/DNN Platform/Modules/ResourceManager/Components/Models/Localization.cs new file mode 100644 index 00000000000..c94002c433e --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/Models/Localization.cs @@ -0,0 +1,21 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Components.Models +{ + /// + /// Represents a localization caching information. + /// + public class Localization + { + /// + /// Gets or sets the resource file localization cache key. + /// + public string ResxDataCacheKey { get; set; } + + /// + /// Gets or sets the modified date cache key. + /// + public string ResxModifiedDateCacheKey { get; set; } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Components/Models/ThumbnailContent.cs b/DNN Platform/Modules/ResourceManager/Components/Models/ThumbnailContent.cs new file mode 100644 index 00000000000..d2d7be1d417 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/Models/ThumbnailContent.cs @@ -0,0 +1,38 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Components.Models +{ + using System.Net.Http; + + /// + /// Represents the content of a thumbnail. + /// + public class ThumbnailContent + { + /// + /// Gets or sets the thumbnail content as a byte array. + /// + public ByteArrayContent Content { get; set; } + + /// + /// Gets or sets the content type of the thumbnail. + /// + public string ContentType { get; set; } + + /// + /// Gets or sets the thumbnail height. + /// + public int Height { get; set; } + + /// + /// Gets or sets the thumbnail name. + /// + public string ThumbnailName { get; set; } + + /// + /// Gets or sets the thumbnail width. + /// + public int Width { get; set; } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Components/PermissionHelper.cs b/DNN Platform/Modules/ResourceManager/Components/PermissionHelper.cs new file mode 100644 index 00000000000..805a45e126b --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/PermissionHelper.cs @@ -0,0 +1,241 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + +namespace Dnn.Modules.ResourceManager.Components +{ + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + using Dnn.Modules.ResourceManager.Services.Dto; + + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Security.Permissions; + using DotNetNuke.Security.Roles; + + /// + /// Helper methods for permissions. + /// + public static class PermissionHelper + { + /// + /// Adds user permissions to the dto. + /// + /// data transfer object to extend. + /// Permission to add. + public static void AddUserPermission(this Permissions dto, PermissionInfoBase permissionInfo) + { + var userPermission = dto.UserPermissions.FirstOrDefault(p => p.UserId == permissionInfo.UserID); + if (userPermission == null) + { + userPermission = new UserPermission + { + UserId = permissionInfo.UserID, + DisplayName = permissionInfo.DisplayName, + }; + dto.UserPermissions.Add(userPermission); + } + + if (userPermission.Permissions.All(p => p.PermissionId != permissionInfo.PermissionID)) + { + userPermission.Permissions.Add(new Permission + { + PermissionId = permissionInfo.PermissionID, + PermissionName = permissionInfo.PermissionName, + AllowAccess = permissionInfo.AllowAccess, + }); + } + } + + /// + /// Adds role permissions to the dto. + /// + /// dto to extend. + /// Permission to add. + public static void AddRolePermission(this Permissions dto, PermissionInfoBase permissionInfo) + { + var rolePermission = dto.RolePermissions.FirstOrDefault(p => p.RoleId == permissionInfo.RoleID); + if (rolePermission == null) + { + rolePermission = new RolePermission + { + RoleId = permissionInfo.RoleID, + RoleName = permissionInfo.RoleName, + }; + dto.RolePermissions.Add(rolePermission); + } + + if (rolePermission.Permissions.All(p => p.PermissionId != permissionInfo.PermissionID)) + { + rolePermission.Permissions.Add(new Permission + { + PermissionId = permissionInfo.PermissionID, + PermissionName = permissionInfo.PermissionName, + AllowAccess = permissionInfo.AllowAccess, + }); + } + } + + /// + /// Ensures the dto has the default roles. + /// + /// dto to extend. + public static void EnsureDefaultRoles(this Permissions dto) + { + // Administrators Role always has implicit permissions, then it should be always in + dto.EnsureRole(RoleController.Instance.GetRoleById(PortalSettings.Current.PortalId, PortalSettings.Current.AdministratorRoleId), true, true); + + // Show also default roles + dto.EnsureRole(RoleController.Instance.GetRoleById(PortalSettings.Current.PortalId, PortalSettings.Current.RegisteredRoleId), false, true); + dto.EnsureRole(new RoleInfo { RoleID = int.Parse(Globals.glbRoleAllUsers), RoleName = Globals.glbRoleAllUsersName }, false, true); + } + + /// + /// Ensures the dto has the given role. + /// + /// data transfer object to extend. + /// The role to ensure is include, . + public static void EnsureRole(this Permissions dto, RoleInfo role) + { + dto.EnsureRole(role, false); + } + + /// + /// Ensures the dto has the given role. + /// + /// The dto to extend. + /// The role ensure is included. + /// A value indicating whether that role is locked. + public static void EnsureRole(this Permissions dto, RoleInfo role, bool locked) + { + dto.EnsureRole(role, locked, false); + } + + /// + /// Ensures the dto has a specific role. + /// + /// The dto to extend. + /// The role to ensure is included. + /// A value indicating whether the role is locked. + /// A value indicating whether the role is a default role. + public static void EnsureRole(this Permissions dto, RoleInfo role, bool locked, bool isDefault) + { + if (dto.RolePermissions.All(r => r.RoleId != role.RoleID)) + { + dto.RolePermissions.Add(new RolePermission + { + RoleId = role.RoleID, + RoleName = role.RoleName, + Locked = locked, + IsDefault = isDefault, + }); + } + } + + /// + /// Check if the permission is for full control. + /// + /// The to check. + /// A value indicating whether this permission is for full control. + public static bool IsFullControl(PermissionInfo permissionInfo) + { + return (permissionInfo.PermissionKey == "EDIT") && PermissionProvider.Instance().SupportsFullControl(); + } + + /// + /// Checks if the permission is for view. + /// + /// The to check. + /// A value indicating whether the permission is for view. + public static bool IsViewPermission(PermissionInfo permissionInfo) + { + return permissionInfo.PermissionKey == "VIEW"; + } + + /// + /// Gets roles for the portal. + /// + /// The id of the portal. + /// An objected containing the roles. + public static object GetRoles(int portalId) + { + var data = new { Groups = new List(), Roles = new List() }; + + // retreive role groups info + data.Groups.Add(new { GroupId = -2, Name = "AllRoles" }); + data.Groups.Add(new { GroupId = -1, Name = "GlobalRoles", Selected = true }); + + foreach (RoleGroupInfo group in RoleController.GetRoleGroups(portalId)) + { + data.Groups.Add(new { GroupId = group.RoleGroupID, Name = group.RoleGroupName }); + } + + // retreive roles info + data.Roles.Add(new { RoleID = int.Parse(Globals.glbRoleUnauthUser), GroupId = -1, RoleName = Globals.glbRoleUnauthUserName }); + data.Roles.Add(new { RoleID = int.Parse(Globals.glbRoleAllUsers), GroupId = -1, RoleName = Globals.glbRoleAllUsersName }); + foreach (RoleInfo role in RoleController.Instance.GetRoles(portalId).OrderBy(r => r.RoleName)) + { + data.Roles.Add(new { GroupId = role.RoleGroupID, RoleId = role.RoleID, Name = role.RoleName }); + } + + return data; + } + + /// + /// Converts roles permissions into permission info collection. + /// + /// The list of to convert. + /// The folder id. + /// An ArrayList of . + public static ArrayList ToPermissionInfos(this IList permissions, int folderId) + { + var newPermissions = new ArrayList(); + foreach (var permission in permissions) + { + foreach (var p in permission.Permissions) + { + newPermissions.Add(new FolderPermissionInfo() + { + AllowAccess = p.AllowAccess, + FolderID = folderId, + PermissionID = p.PermissionId, + RoleID = permission.RoleId, + UserID = Null.NullInteger, + }); + } + } + + return newPermissions; + } + + /// + /// Converts a list of into a collection of . + /// + /// The list of to extend. + /// The id of the folder. + /// An ArrayList of . + public static ArrayList ToPermissionInfos(this IList permissions, int folderId) + { + var newPermissions = new ArrayList(); + foreach (var permission in permissions) + { + foreach (var p in permission.Permissions) + { + newPermissions.Add(new FolderPermissionInfo() + { + AllowAccess = p.AllowAccess, + FolderID = folderId, + PermissionID = p.PermissionId, + RoleID = Null.NullInteger, + UserID = permission.UserId, + }); + } + } + + return newPermissions; + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Components/PermissionsManager.cs b/DNN Platform/Modules/ResourceManager/Components/PermissionsManager.cs new file mode 100644 index 00000000000..3bfc50cdf6d --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/PermissionsManager.cs @@ -0,0 +1,211 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Components +{ + using System; + + using Dnn.Modules.ResourceManager.Components.Common; + + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Users; + using DotNetNuke.Framework; + using DotNetNuke.Security.Permissions; + using DotNetNuke.Security.Roles; + using DotNetNuke.Services.FileSystem; + + /// + /// Provides permissions checks. + /// + public class PermissionsManager : ServiceLocator, IPermissionsManager + { + private readonly IFolderManager folderManager; + private readonly IRoleController roleController; + private readonly IUserController userController; + + /// + /// Initializes a new instance of the class. + /// + public PermissionsManager() + { + this.folderManager = FolderManager.Instance; + this.roleController = RoleController.Instance; + this.userController = UserController.Instance; + } + + /// + public bool HasFolderContentPermission(int folderId, int moduleMode) + { + return this.HasGroupFolderPublicOrMemberPermission(folderId); + } + + /// + public bool HasGetFileContentPermission(int folderId) + { + if (!this.HasGroupFolderPublicOrMemberPermission(folderId)) + { + return false; + } + + var folder = this.folderManager.GetFolder(folderId); + return HasPermission(folder, "READ"); + } + + /// + public bool HasAddFilesPermission(int moduleMode, int folderId) + { + if (!this.HasGroupFolderMemberPermission(folderId)) + { + return false; + } + + if (moduleMode == (int)Constants.ModuleModes.User && !this.IsUserFolder(folderId)) + { + return false; + } + + var folder = this.folderManager.GetFolder(folderId); + return folder != null && HasPermission(folder, "ADD"); + } + + /// + public bool HasAddFoldersPermission(int moduleMode, int folderId) + { + if (!this.HasGroupFolderOwnerPermission(folderId)) + { + return false; + } + + if (moduleMode == (int)Constants.ModuleModes.User) + { + return false; + } + + var folder = this.folderManager.GetFolder(folderId); + return folder != null && HasPermission(folder, "ADD"); + } + + /// + public bool HasDeletePermission(int moduleMode, int folderId) + { + if (!this.HasGroupFolderOwnerPermission(folderId)) + { + return false; + } + + if (moduleMode == (int)Constants.ModuleModes.User && !this.IsUserFolder(folderId)) + { + return false; + } + + var folder = this.folderManager.GetFolder(folderId); + return FolderPermissionController.CanDeleteFolder((FolderInfo)folder); + } + + /// + public bool HasManagePermission(int moduleMode, int folderId) + { + if (!this.HasGroupFolderOwnerPermission(folderId)) + { + return false; + } + + if (moduleMode == (int)Constants.ModuleModes.User && !this.IsUserFolder(folderId)) + { + return false; + } + + var folder = this.folderManager.GetFolder(folderId); + return FolderPermissionController.CanManageFolder((FolderInfo)folder); + } + + /// + /// Checks if the current user has permission on a group folder. + /// + /// The id of the folder. + /// A value indicating whether the user has permission on the group folder. + public bool HasGroupFolderMemberPermission(int folderId) + { + var groupId = Utils.GetFolderGroupId(folderId); + if (groupId < 0) + { + return true; + } + + return this.UserIsGroupMember(groupId); + } + + /// + protected override Func GetFactory() + { + return () => new PermissionsManager(); + } + + /// + /// Check if a user has a specific permission key on a folder. + /// + /// The id of the folder to check. + /// The permission key. + /// A value indicating whether the user has the permission key for the folder. + private static bool HasPermission(IFolderInfo folder, string permissionKey) + { + var hasPermission = PortalSettings.Current.UserInfo.IsSuperUser; + + if (!hasPermission && folder != null) + { + hasPermission = FolderPermissionController.HasFolderPermission(folder.FolderPermissions, permissionKey); + } + + return hasPermission; + } + + private bool HasGroupFolderPublicOrMemberPermission(int folderId) + { + var groupId = Utils.GetFolderGroupId(folderId); + if (groupId < 0) + { + return true; + } + + var portalId = PortalSettings.Current.PortalId; + var folderGroup = this.roleController.GetRoleById(portalId, groupId); + + return folderGroup.IsPublic || this.UserIsGroupMember(groupId); + } + + private bool HasGroupFolderOwnerPermission(int folderId) + { + var groupId = Utils.GetFolderGroupId(folderId); + if (groupId < 0) + { + return true; + } + + return this.UserIsGroupOwner(groupId); + } + + private bool UserIsGroupMember(int groupId) + { + return this.GetUserRoleInfo(groupId) != null; + } + + private bool UserIsGroupOwner(int groupId) + { + var userRole = this.GetUserRoleInfo(groupId); + return userRole != null && userRole.IsOwner; + } + + private bool IsUserFolder(int folderId) + { + var user = this.userController.GetCurrentUserInfo(); + return this.folderManager.GetUserFolder(user).FolderID == folderId; + } + + private UserRoleInfo GetUserRoleInfo(int groupId) + { + var userId = this.userController.GetCurrentUserInfo().UserID; + var portalId = PortalSettings.Current.PortalId; + return this.roleController.GetUserRole(portalId, userId, groupId); + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Components/SearchController.cs b/DNN Platform/Modules/ResourceManager/Components/SearchController.cs new file mode 100644 index 00000000000..c0403d8e3b4 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/SearchController.cs @@ -0,0 +1,83 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Components +{ + using System; + using System.Collections.Generic; + using System.Linq; + + using Dnn.Modules.ResourceManager.Exceptions; + + using DotNetNuke.ComponentModel; + using DotNetNuke.Services.Assets; + using DotNetNuke.Services.FileSystem; + using DotNetNuke.Services.Localization; + + /// + /// Provides search functionality. + /// + public class SearchController : ComponentBase, ISearchController + { + private readonly IPermissionsManager permissionsManager; + + /// + /// Initializes a new instance of the class. + /// + public SearchController() + { + this.permissionsManager = PermissionsManager.Instance; + } + + /// + public IList SearchFolderContent(int moduleId, IFolderInfo folder, bool recursive, string search, int pageIndex, int pageSize, string sorting, int moduleMode, out int totalCount) + { + var noPermissionMessage = Localization.GetExceptionMessage( + "UserHasNoPermissionToBrowseFolder", + Constants.UserHasNoPermissionToBrowseFolderDefaultMessage); + + if (!this.permissionsManager.HasFolderContentPermission(folder.FolderID, moduleMode)) + { + throw new FolderPermissionNotMetException(noPermissionMessage); + } + + search = (search ?? string.Empty).Trim(); + + var files = FolderManager.Instance.SearchFiles(folder, search, recursive); + var sortProperties = SortProperties.Parse(sorting); + var sortedFiles = SortFiles(files, sortProperties).ToList(); + totalCount = sortedFiles.Count; + + return sortedFiles.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList(); + } + + private static IEnumerable SortFiles(IEnumerable files, SortProperties sortProperties) + { + switch (sortProperties.Column) + { + case "ItemName": + return OrderBy(files, f => f.FileName, sortProperties.Ascending); + case "LastModifiedOnDate": + return OrderBy(files, f => f.LastModifiedOnDate, sortProperties.Ascending); + case "Size": + return OrderBy(files, f => f.Size, sortProperties.Ascending); + case "ParentFolder": + return OrderBy(files, f => f.FolderId, new FolderPathComparer(), sortProperties.Ascending); + case "CreatedOnDate": + return OrderBy(files, f => f.CreatedOnDate, sortProperties.Ascending); + default: + return files; + } + } + + private static IOrderedEnumerable OrderBy(IEnumerable source, Func keySelector, bool ascending) + { + return ascending ? source.OrderBy(keySelector) : source.OrderByDescending(keySelector); + } + + private static IOrderedEnumerable OrderBy(IEnumerable source, Func keySelector, IComparer comparer, bool ascending) + { + return ascending ? source.OrderBy(keySelector, comparer) : source.OrderByDescending(keySelector, comparer); + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Components/SettingsManager.cs b/DNN Platform/Modules/ResourceManager/Components/SettingsManager.cs new file mode 100644 index 00000000000..bde7438b08b --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/SettingsManager.cs @@ -0,0 +1,112 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Components +{ + using System.Collections; + + using Dnn.Modules.ResourceManager.Exceptions; + + using DotNetNuke.Entities.Modules; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Users; + using DotNetNuke.Services.FileSystem; + + using static Dnn.Modules.ResourceManager.Components.Constants; + + /// + /// Manages module settings. + /// + public class SettingsManager + { + private readonly Hashtable moduleSettingsDictionary; + private readonly int groupId; + + /// + /// Initializes a new instance of the class. + /// + /// The id of the module. + /// The id of the group. + public SettingsManager(int moduleId, int groupId) + { + this.groupId = groupId; + var moduleController = new ModuleController(); + var module = moduleController.GetModule(moduleId); + + this.moduleSettingsDictionary = module.ModuleSettings; + this.LoadSettings(); + } + + /// + /// Gets or sets the id of the home folder. + /// + public int HomeFolderId { get; set; } + + /// + /// Gets or sets the module mode, . + /// + public int Mode { get; set; } + + private void LoadSettings() + { + this.Mode = this.GetSettingIntValueOrDefault(ModeSettingName, DefaultMode); + this.ValidateMode(this.Mode); + this.HomeFolderId = this.GetHomeFolderId(this.Mode); + } + + private int GetSettingIntValueOrDefault(string settingName, int defaultValue = -1) + { + var settingValue = this.moduleSettingsDictionary.ContainsKey(settingName) ? this.moduleSettingsDictionary[settingName].ToString() : null; + + return string.IsNullOrEmpty(settingValue) ? defaultValue : int.Parse(settingValue); + } + + private void ValidateMode(int moduleMode) + { + switch (moduleMode) + { + case (int)ModuleModes.Group: + if (this.groupId <= 0) + { + throw new ModeValidationException("GroupModeError"); + } + + break; + + case (int)ModuleModes.User: + var user = UserController.Instance.GetCurrentUserInfo(); + if (user.UserID < 0) + { + throw new ModeValidationException("UserModeError"); + } + + break; + } + } + + private int GetHomeFolderId(int moduleMode) + { + var portalId = PortalSettings.Current.PortalId; + var folderId = 0; + + switch (moduleMode) + { + case (int)ModuleModes.Group: + folderId = GroupManager.Instance.FindOrCreateGroupFolder(portalId, this.groupId).FolderID; + break; + + case (int)ModuleModes.User: + var user = UserController.Instance.GetCurrentUserInfo(); + folderId = FolderManager.Instance.GetUserFolder(user).FolderID; + break; + + case (int)ModuleModes.Normal: + var defaultHomeFolderId = FolderManager.Instance.GetFolder(portalId, string.Empty).FolderID; + folderId = this.GetSettingIntValueOrDefault(HomeFolderSettingName, defaultHomeFolderId); + break; + } + + return folderId; + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Components/ThumbnailsManager.cs b/DNN Platform/Modules/ResourceManager/Components/ThumbnailsManager.cs new file mode 100644 index 00000000000..5d7ece60a86 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Components/ThumbnailsManager.cs @@ -0,0 +1,220 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Components +{ + using System; + using System.Drawing; + using System.Drawing.Imaging; + using System.IO; + using System.Net.Http; + + using Dnn.Modules.ResourceManager.Components.Models; + + using DotNetNuke.Entities.Tabs; + using DotNetNuke.Framework; + using DotNetNuke.Services.FileSystem; + + /// + /// Provides services related to thumbnails. + /// + public class ThumbnailsManager : ServiceLocator, IThumbnailsManager + { + private const int DefaultMaxWidth = 320; + private const int DefaultMaxHeight = 240; + private readonly IFileManager fileManager; + + /// + /// Initializes a new instance of the class. + /// + public ThumbnailsManager() + { + this.fileManager = FileManager.Instance; + } + + /// + /// Enumerates the possible thumbnail file name extensions. + /// + private enum ThumbnailExtensions + { + /// + /// A JPEG thumbnail. + /// + JPEG, + + /// + /// A JPG thumbnail. + /// + JPG, + + /// + /// A PNG thumbnail. + /// + PNG, + + /// + /// A GIF thumbnail. + /// + GIF, + } + + /// + /// Gets the default content mime type. + /// + public string DefaultContentType => "image/png"; + + /// + /// Gets the default file name extension. + /// + public string DefaultThumbnailExtension => "png"; + + /// + public bool ThumbnailAvailable(string fileName) + { + var ext = Path.GetExtension(fileName).ToUpperInvariant(); + ext = ext.StartsWith(".") ? ext.Substring(1) : ext; + return Enum.TryParse(ext, out ThumbnailExtensions _); + } + + /// + public string ThumbnailUrl(int moduleId, int fileId, int width, int height) + { + return this.ThumbnailUrl(moduleId, fileId, width, height, this.GetNewTimeStamp()); + } + + /// + public string ThumbnailUrl(int moduleId, int fileId, int width, int height, string timestamp) + { + var tabId = TabController.CurrentPage.TabID; + + return + $"{ServicesFramework.GetServiceFrameworkRoot()}API/ResourceManager/Items/ThumbnailDownLoad?fileId={fileId}&width={width}&height={height}×tamp={timestamp}&moduleId={moduleId}&tabId={tabId}"; + } + + /// + public string ThumbnailUrl(int moduleId, int fileId, int width, int height, int version) + { + var result = this.ThumbnailUrl(moduleId, fileId, width, height, this.GetNewTimeStamp()); + return result + "&version=" + version; + } + + /// + public ThumbnailContent GetThumbnailContentFromImageUrl(string imageUrl, int width, int height) + { + Image image = new Bitmap(imageUrl); + var result = this.GetThumbnailContentFromImage(image, width, height); + var indexOfSlash = imageUrl.LastIndexOf('/'); + var thumbnailName = (indexOfSlash != -1) ? imageUrl.Substring(indexOfSlash + 1) + "." + this.DefaultThumbnailExtension : imageUrl + "." + this.DefaultThumbnailExtension; + result.ThumbnailName = thumbnailName; + return result; + } + + /// + public ThumbnailContent GetThumbnailContentFromImage(Image image, int width, int height, bool crop = false) + { + int thumbnailWidth; + int thumbnailHeight; + + if (crop) + { + this.GetCroppedThumbnailSize(image, width, height, out thumbnailWidth, out thumbnailHeight); + } + else + { + this.GetThumbnailSize(image, width, height, out thumbnailWidth, out thumbnailHeight); + } + + // create the actual thumbnail image + var thumbnailImage = new Bitmap(image, new Size(thumbnailWidth, thumbnailHeight)); + + using (var memoryStream = new MemoryStream()) + { + // All thumbnails images will be png + thumbnailImage.Save(memoryStream, ImageFormat.Png); + + return new ThumbnailContent + { + Content = new ByteArrayContent(memoryStream.ToArray()), + Width = thumbnailWidth, + Height = thumbnailHeight, + ContentType = this.DefaultContentType, + }; + } + } + + /// + public ThumbnailContent GetThumbnailContent(IFileInfo item, int width, int height, bool crop = false) + { + using (var content = this.fileManager.GetFileContent(item)) + { + Image image = new Bitmap(content); + var result = this.GetThumbnailContentFromImage(image, width, height, crop); + result.ThumbnailName = item.FileName + "." + this.DefaultThumbnailExtension; + return result; + } + } + + /// + protected override Func GetFactory() + { + return () => new ThumbnailsManager(); + } + + private int GetMinSizeValue(int thumbnailMaxSize, int imageMaxSize, int imageMinSize) + { + if (thumbnailMaxSize == imageMaxSize) + { + return imageMinSize; + } + + return (int)Math.Round(imageMinSize * (double)thumbnailMaxSize / imageMaxSize); + } + + private int GetMaxSizeValue(int size, int imageSize, int defaultMaxValue) + { + if (size >= imageSize) + { + return imageSize; + } + + var minimum = Math.Min(size, defaultMaxValue); + return (minimum <= 0) ? defaultMaxValue : minimum; + } + + private void GetThumbnailSize(Image image, int width, int height, out int thumbnailWidth, out int thumbnailHeight) + { + if (image.Width >= image.Height) + { + thumbnailWidth = this.GetMaxSizeValue(width, image.Width, DefaultMaxWidth); + thumbnailHeight = this.GetMinSizeValue(thumbnailWidth, image.Width, image.Height); + } + else + { + thumbnailHeight = this.GetMaxSizeValue(height, image.Height, DefaultMaxHeight); + thumbnailWidth = this.GetMinSizeValue(thumbnailHeight, image.Height, image.Width); + } + } + + private void GetCroppedThumbnailSize(Image image, int width, int height, out int thumbnailWidth, out int thumbnailHeight) + { + var aspect = (double)image.Width / image.Height; + var thumbnailAspect = (double)width / height; + + if (aspect > thumbnailAspect) + { + thumbnailHeight = Math.Min(image.Height, height); + thumbnailWidth = (int)Math.Round(image.Width * (double)thumbnailHeight / image.Height); + } + else + { + thumbnailWidth = Math.Min(image.Width, width); + thumbnailHeight = (int)Math.Round(image.Height * (double)thumbnailWidth / image.Width); + } + } + + private string GetNewTimeStamp() + { + return DateTime.Now.ToString("yyyyMMddHHmmssfff"); + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Data/00.00.01.SqlDataProvider b/DNN Platform/Modules/ResourceManager/Data/00.00.01.SqlDataProvider new file mode 100644 index 00000000000..ae725de4243 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Data/00.00.01.SqlDataProvider @@ -0,0 +1,17 @@ +/************************************************************/ +/***** SqlDataProvider *****/ +/***** *****/ +/***** *****/ +/***** Note: To manually execute this script you must *****/ +/***** perform a search and replace operation *****/ +/***** for {databaseOwner} and {objectQualifier} *****/ +/***** *****/ +/************************************************************/ + + + +/************************************************************/ +/***** SqlDataProvider *****/ +/************************************************************/ + +/****************************** STORED PROCEDURE CREATION SCRIPT *******************************/ \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/Data/Uninstall.SqlDataProvider b/DNN Platform/Modules/ResourceManager/Data/Uninstall.SqlDataProvider new file mode 100644 index 00000000000..7428e347a1d --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Data/Uninstall.SqlDataProvider @@ -0,0 +1,15 @@ +/************************************************************/ +/***** SqlDataProvider *****/ +/***** *****/ +/***** *****/ +/***** Note: To manually execute this script you must *****/ +/***** perform a search and replace operation *****/ +/***** for {databaseOwner} and {objectQualifier} *****/ +/***** *****/ +/************************************************************/ + + + +/************************************************************/ +/***** SqlDataProvider *****/ +/************************************************************/ diff --git a/DNN Platform/Modules/ResourceManager/Dnn.Modules.ResourceManager.csproj b/DNN Platform/Modules/ResourceManager/Dnn.Modules.ResourceManager.csproj new file mode 100644 index 00000000000..7c9154c86f2 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Dnn.Modules.ResourceManager.csproj @@ -0,0 +1,289 @@ + + + + + Debug + AnyCPU + + + 2.0 + {7D61A32C-0F21-453F-A981-BD8E5A3A5304} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + Dnn.Modules.ResourceManager + Dnn.Modules.ResourceManager + v4.7.2 + false + + + + + + + + true + full + true + true + bin\ + bin\Dnn.Modules.ResourceManager.xml + 1591 + AllRules.ruleset + 7 + true + 4 + + + pdbonly + false + true + true + bin\ + bin\Dnn.Modules.ResourceManager.xml + 1591 + AllRules.ruleset + 7 + true + 4 + + + + False + ..\..\..\Packages\Microsoft.Extensions.DependencyInjection.2.1.1\lib\net461\Microsoft.Extensions.DependencyInjection.dll + + + False + ..\..\..\Packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll + + + ..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll + + + + + + False + ..\..\..\Packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll + + + + + False + ..\..\..\Packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll + + + + + + + + + + + + + + + + + + + SolutionInfo.cs + + + + + + + + + + + + + + + + + + + + + + + EditFolderMapping.ascx + ASPXCodeBehind + + + EditFolderMapping.ascx + + + + + + + + + + + + + + + + + + + + + + + + + Settings.ascx + ASPXCodeBehind + + + Settings.ascx + + + View.ascx + ASPXCodeBehind + + + View.ascx + + + stylecop.json + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + + + + + + + + + + + Designer + + + + + {6928A9B1-F88A-4581-A132-D3EB38669BB0} + DotNetNuke.Abstractions + + + {3cd5f6b8-8360-4862-80b6-f402892db7dd} + DotNetNuke.Instrumentation + + + {c4823821-cfb3-4394-851f-e39d0974efbd} + DotNetNuke.ModulePipeline + + + {03e3afa5-ddc9-48fb-a839-ad4282ce237e} + DotNetNuke.Web.Client + + + {4912f062-f8a8-4f9d-8f8e-244ebee1acbd} + DotNetNuke.WebUtility + + + {ee1329fe-fd88-4e1a-968c-345e394ef080} + DotNetNuke.Web + + + {6b29aded-7b56-4484-bea5-c0e09079535b} + DotNetNuke.Library + + + + + + + + + + + + + + + + web.config + + + web.config + + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + + True + + + + + \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/EditFolderMapping.ascx b/DNN Platform/Modules/ResourceManager/EditFolderMapping.ascx new file mode 100644 index 00000000000..ba91443f133 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/EditFolderMapping.ascx @@ -0,0 +1,40 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditFolderMapping.ascx.cs" Inherits="Dnn.Modules.ResourceManager.EditFolderMapping" %> +<%@ Register TagPrefix="dnn" TagName="Label" Src="~/controls/LabelControl.ascx" %> +<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.UI.WebControls" Assembly="DotNetNuke" %> +<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.UI.WebControls" Assembly="DotNetNuke.Web" %> +
      +
      + +
      +
      +
      +

      <%=LocalizeString("RequiredFields")%>

      +
      +
      +

      <%=LocalizeString("GeneralSettings")%>

      +
      +
      + + + +
      +
      + + + +
      +
      +

      <%=LocalizeString("FolderProviderSettings")%>

      +
      + +
      +
      +
      +
      +
        +
      • + +
      • +
      • +
      +
      \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/EditFolderMapping.ascx.cs b/DNN Platform/Modules/ResourceManager/EditFolderMapping.ascx.cs new file mode 100644 index 00000000000..aa665226d6f --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/EditFolderMapping.ascx.cs @@ -0,0 +1,289 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + +namespace Dnn.Modules.ResourceManager +{ + using System; + using System.Linq; + using System.Web.UI.WebControls; + + using DotNetNuke.Abstractions; + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Modules; + using DotNetNuke.Services.FileSystem; + using DotNetNuke.Services.FileSystem.Internal; + using DotNetNuke.Services.Localization; + using DotNetNuke.UI.Skins.Controls; + + using Microsoft.Extensions.DependencyInjection; + + /// + /// Provides editing capabilities for a folder mapping. + /// + public partial class EditFolderMapping : PortalModuleBase + { + private readonly INavigationManager navigationManager; + private readonly IFolderMappingController folderMappingController = FolderMappingController.Instance; + private int folderMappingID = Null.NullInteger; + + /// + /// Initializes a new instance of the class. + /// + public EditFolderMapping() + { + this.navigationManager = this.DependencyProvider.GetRequiredService(); + } + + /// + /// Gets the portalId for the folder. + /// + public int FolderPortalID + { + get + { + return this.IsHostMenu ? Null.NullInteger : this.PortalId; + } + } + + /// + /// Gets the id of the folder mapping. + /// + public int FolderMappingID + { + get + { + if (this.folderMappingID == Null.NullInteger) + { + if (!string.IsNullOrEmpty(this.Request.QueryString["ItemID"])) + { + int.TryParse(this.Request.QueryString["ItemID"], out this.folderMappingID); + } + } + + return this.folderMappingID; + } + } + + /// + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + + if (!this.UserInfo.IsSuperUser && !this.UserInfo.IsInRole(this.PortalSettings.AdministratorRoleName)) + { + this.Response.Redirect(Globals.AccessDeniedURL(), true); + } + + this.UpdateButton.Text = (this.FolderMappingID == Null.NullInteger) ? Localization.GetString("Add") : Localization.GetString("Update", this.LocalResourceFile); + this.CancelHyperLink.NavigateUrl = this.navigationManager.NavigateURL(); + + var controlTitle = Localization.GetString("ControlTitle", this.LocalResourceFile); + var controlTitlePrefix = (this.FolderMappingID == Null.NullInteger) ? Localization.GetString("New") : Localization.GetString("Edit"); + + this.SyncWarningPlaceHolder.Visible = this.FolderMappingID != Null.NullInteger; + + this.ModuleConfiguration.ModuleControl.ControlTitle = string.Format(controlTitle, controlTitlePrefix); + } + + /// + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + + this.UpdateButton.Click += this.CmdUpdate_Click; + + try + { + this.BindFolderMappingSettings(); + + if (!this.IsPostBack) + { + this.BindFolderProviders(); + + if (this.FolderMappingID != Null.NullInteger) + { + this.BindFolderMapping(); + + if (this.ProviderSettingsPlaceHolder.Controls.Count > 0 && this.ProviderSettingsPlaceHolder.Controls[0] is FolderMappingSettingsControlBase) + { + var folderMapping = this.folderMappingController.GetFolderMapping(this.FolderMappingID); + var settingsControl = (FolderMappingSettingsControlBase)this.ProviderSettingsPlaceHolder.Controls[0]; + settingsControl.LoadSettings(folderMapping.FolderMappingSettings); + } + } + } + } + catch (Exception exc) + { + DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException(this, exc); + } + } + + /// + /// Handles the folder providers selection change. + /// + /// The sender of the event. + /// The event arguments. + protected void CboFolderProviders_SelectedIndexChanged(object sender, EventArgs e) + { + this.BindFolderMappingSettings(); + } + + private void CmdUpdate_Click(object sender, EventArgs e) + { + this.Page.Validate("vgEditFolderMapping"); + + if (!this.Page.IsValid) + { + return; + } + + try + { + var folderMapping = new FolderMappingInfo(); + + if (this.FolderMappingID != Null.NullInteger) + { + folderMapping = this.folderMappingController.GetFolderMapping(this.FolderMappingID) ?? new FolderMappingInfo(); + } + + folderMapping.FolderMappingID = this.FolderMappingID; + folderMapping.MappingName = this.NameTextbox.Text; + folderMapping.FolderProviderType = this.FolderProvidersComboBox.SelectedValue; + folderMapping.PortalID = this.FolderPortalID; + + var originalSettings = folderMapping.FolderMappingSettings; + + try + { + var folderMappingID = this.FolderMappingID; + + if (folderMappingID == Null.NullInteger) + { + folderMappingID = this.folderMappingController.AddFolderMapping(folderMapping); + } + else + { + this.folderMappingController.UpdateFolderMapping(folderMapping); + } + + if (this.ProviderSettingsPlaceHolder.Controls.Count > 0 && this.ProviderSettingsPlaceHolder.Controls[0] is FolderMappingSettingsControlBase) + { + var settingsControl = (FolderMappingSettingsControlBase)this.ProviderSettingsPlaceHolder.Controls[0]; + + try + { + settingsControl.UpdateSettings(folderMappingID); + } + catch + { + if (this.FolderMappingID == Null.NullInteger) + { + this.folderMappingController.DeleteFolderMapping(this.FolderPortalID, folderMappingID); + } + + return; + } + } + + if (this.FolderMappingID != Null.NullInteger) + { + // Check if some setting has changed + var updatedSettings = this.folderMappingController.GetFolderMappingSettings(this.FolderMappingID); + + if (originalSettings.Keys.Cast().Any(key => updatedSettings.ContainsKey(key) && !originalSettings[key].ToString().Equals(updatedSettings[key].ToString()))) + { + // Re-synchronize folders using the existing mapping. It's important to synchronize them in descending order + var folders = FolderManager.Instance.GetFolders(this.FolderPortalID).Where(f => f.FolderMappingID == this.FolderMappingID).OrderByDescending(f => f.FolderPath); + + foreach (var folder in folders) + { + FolderManager.Instance.Synchronize(this.FolderPortalID, folder.FolderPath, false, true); + } + } + } + } + catch + { + DotNetNuke.UI.Skins.Skin.AddModuleMessage(this, Localization.GetString("DuplicateMappingName", this.LocalResourceFile), ModuleMessage.ModuleMessageType.RedError); + return; + } + + if (!this.Response.IsRequestBeingRedirected) + { + this.Response.Redirect(this.navigationManager.NavigateURL()); + } + } + catch (Exception exc) + { + DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException(this, exc); + } + } + + private void BindFolderProviders() + { + var defaultProviders = DefaultFolderProviders.GetDefaultProviders(); + + foreach (var provider in FolderProvider.GetProviderList().Keys.Where(provider => !defaultProviders.Contains(provider)).OrderBy(provider => provider)) + { + this.FolderProvidersComboBox.Items.Add(new ListItem(provider, provider)); + } + + this.FolderProvidersComboBox.Items.Insert(0, new ListItem(string.Empty, string.Empty)); + } + + private void BindFolderMapping() + { + var folderMapping = this.folderMappingController.GetFolderMapping(this.FolderMappingID); + + this.NameTextbox.Text = folderMapping.MappingName; + + this.FolderProvidersComboBox.SelectedValue = folderMapping.FolderProviderType; + this.FolderProvidersComboBox.Enabled = false; + } + + private void BindFolderMappingSettings() + { + string folderProviderType; + + if (this.FolderMappingID != Null.NullInteger) + { + var folderMapping = this.folderMappingController.GetFolderMapping(this.FolderMappingID); + folderProviderType = folderMapping.FolderProviderType; + } + else + { + folderProviderType = this.FolderProvidersComboBox.SelectedValue; + } + + if (string.IsNullOrEmpty(folderProviderType)) + { + return; + } + + var settingsControlVirtualPath = FolderProvider.Instance(folderProviderType).GetSettingsControlVirtualPath(); + if (string.IsNullOrEmpty(settingsControlVirtualPath)) + { + return; + } + + var settingsControl = this.LoadControl(settingsControlVirtualPath); + if (settingsControl == null || !(settingsControl is FolderMappingSettingsControlBase)) + { + return; + } + + // This is important to allow settings control to be localizable + var baseType = settingsControl.GetType().BaseType; + if (baseType != null) + { + settingsControl.ID = baseType.Name; + } + + this.ProviderSettingsPlaceHolder.Controls.Clear(); + this.ProviderSettingsPlaceHolder.Controls.Add(settingsControl); + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/EditFolderMapping.ascx.designer.cs b/DNN Platform/Modules/ResourceManager/EditFolderMapping.ascx.designer.cs new file mode 100644 index 00000000000..55ac100cac8 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/EditFolderMapping.ascx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// +// 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 Dnn.Modules.ResourceManager +{ + + + public partial class EditFolderMapping + { + + /// + /// DescriptionLabel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label DescriptionLabel; + + /// + /// SyncWarningPlaceHolder control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.PlaceHolder SyncWarningPlaceHolder; + + /// + /// SyncLabel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label SyncLabel; + + /// + /// NameLabel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.UserControl NameLabel; + + /// + /// NameTextbox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox NameTextbox; + + /// + /// NameValidator control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator NameValidator; + + /// + /// FolderProviderLabel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.UserControl FolderProviderLabel; + + /// + /// FolderProvidersComboBox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList FolderProvidersComboBox; + + /// + /// FolderProviderValidator control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator FolderProviderValidator; + + /// + /// ProviderSettingsPlaceHolder control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.PlaceHolder ProviderSettingsPlaceHolder; + + /// + /// UpdateButton control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton UpdateButton; + + /// + /// CancelHyperLink control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HyperLink CancelHyperLink; + } +} diff --git a/DNN Platform/Modules/ResourceManager/Exceptions/FolderPermissionNotMetException.cs b/DNN Platform/Modules/ResourceManager/Exceptions/FolderPermissionNotMetException.cs new file mode 100644 index 00000000000..3c28e0934fa --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Exceptions/FolderPermissionNotMetException.cs @@ -0,0 +1,22 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Exceptions +{ + using System; + + /// + /// Exception thrown when a folder permission is not met. + /// + public class FolderPermissionNotMetException : Exception + { + /// + /// Initializes a new instance of the class. + /// + /// The exception message. + public FolderPermissionNotMetException(string message) + : base(message) + { + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Exceptions/ModeValidationException.cs b/DNN Platform/Modules/ResourceManager/Exceptions/ModeValidationException.cs new file mode 100644 index 00000000000..412ee5091c7 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Exceptions/ModeValidationException.cs @@ -0,0 +1,22 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Exceptions +{ + using System; + + /// + /// Thrown when the resource manager is not in the expected mode for the requested operation. + /// + public class ModeValidationException : Exception + { + /// + /// Initializes a new instance of the class. + /// + /// The exception message. + public ModeValidationException(string message) + : base(message) + { + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Exceptions/NotFoundException.cs b/DNN Platform/Modules/ResourceManager/Exceptions/NotFoundException.cs new file mode 100644 index 00000000000..e0c5fe7b8d0 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Exceptions/NotFoundException.cs @@ -0,0 +1,22 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Exceptions +{ + using System; + + /// + /// Thrown when a resource is not found. + /// + public class NotFoundException : Exception + { + /// + /// Initializes a new instance of the class. + /// + /// The exception message. + public NotFoundException(string message) + : base(message) + { + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Helpers/LocalizationHelper.cs b/DNN Platform/Modules/ResourceManager/Helpers/LocalizationHelper.cs new file mode 100644 index 00000000000..05c29fecff2 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Helpers/LocalizationHelper.cs @@ -0,0 +1,27 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Helpers +{ + using Dnn.Modules.ResourceManager.Components; + + using DotNetNuke.Services.Localization; + + /// + /// Localization helper methods. + /// + internal class LocalizationHelper + { + private const string ResourceFile = "~/" + Constants.ModulePath + "/App_LocalResources/ResourceManager.resx"; + + /// + /// Gets a localized resource string from the resource manager resource file. + /// + /// The localization key to get. + /// A string containing the localized text. + public static string GetString(string key) + { + return Localization.GetString(key, ResourceFile); + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Images/arrow_forward.svg b/DNN Platform/Modules/ResourceManager/Images/arrow_forward.svg new file mode 100644 index 00000000000..08f2937accd --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/arrow_forward.svg @@ -0,0 +1,87 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/Images/checkmark.svg b/DNN Platform/Modules/ResourceManager/Images/checkmark.svg new file mode 100644 index 00000000000..45217ce3abc --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/checkmark.svg @@ -0,0 +1,6 @@ + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Images/clipboard.svg b/DNN Platform/Modules/ResourceManager/Images/clipboard.svg new file mode 100644 index 00000000000..1cd8cbd8b1a --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/clipboard.svg @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Images/copy.svg b/DNN Platform/Modules/ResourceManager/Images/copy.svg new file mode 100644 index 00000000000..684346cc34e --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/copy.svg @@ -0,0 +1,8 @@ + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Images/delete.svg b/DNN Platform/Modules/ResourceManager/Images/delete.svg new file mode 100644 index 00000000000..d2a6d844b94 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/delete.svg @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Images/dnnanim.gif b/DNN Platform/Modules/ResourceManager/Images/dnnanim.gif new file mode 100644 index 00000000000..5e62d01af9e Binary files /dev/null and b/DNN Platform/Modules/ResourceManager/Images/dnnanim.gif differ diff --git a/DNN Platform/Modules/ResourceManager/Images/download.svg b/DNN Platform/Modules/ResourceManager/Images/download.svg new file mode 100644 index 00000000000..63cfe8d10dd --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/download.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Images/edit.svg b/DNN Platform/Modules/ResourceManager/Images/edit.svg new file mode 100644 index 00000000000..5d9613aa742 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/edit.svg @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Images/eye.svg b/DNN Platform/Modules/ResourceManager/Images/eye.svg new file mode 100644 index 00000000000..db1cca5c077 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/eye.svg @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Images/folder-empty-state-asset-manager.png b/DNN Platform/Modules/ResourceManager/Images/folder-empty-state-asset-manager.png new file mode 100644 index 00000000000..8842be86004 Binary files /dev/null and b/DNN Platform/Modules/ResourceManager/Images/folder-empty-state-asset-manager.png differ diff --git a/DNN Platform/Modules/ResourceManager/Images/folder-hover.png b/DNN Platform/Modules/ResourceManager/Images/folder-hover.png new file mode 100644 index 00000000000..cb7a52468f2 Binary files /dev/null and b/DNN Platform/Modules/ResourceManager/Images/folder-hover.png differ diff --git a/DNN Platform/Modules/ResourceManager/Images/folder.png b/DNN Platform/Modules/ResourceManager/Images/folder.png new file mode 100644 index 00000000000..8480d0d9cb9 Binary files /dev/null and b/DNN Platform/Modules/ResourceManager/Images/folder.png differ diff --git a/DNN Platform/Modules/ResourceManager/Images/icon-add-folder.png b/DNN Platform/Modules/ResourceManager/Images/icon-add-folder.png new file mode 100644 index 00000000000..77ff00ca2e9 Binary files /dev/null and b/DNN Platform/Modules/ResourceManager/Images/icon-add-folder.png differ diff --git a/DNN Platform/Modules/ResourceManager/Images/icon-asset-manager-azure-folder.png b/DNN Platform/Modules/ResourceManager/Images/icon-asset-manager-azure-folder.png new file mode 100644 index 00000000000..bb623f5b979 Binary files /dev/null and b/DNN Platform/Modules/ResourceManager/Images/icon-asset-manager-azure-folder.png differ diff --git a/DNN Platform/Modules/ResourceManager/Images/icon-asset-manager-database-folder.png b/DNN Platform/Modules/ResourceManager/Images/icon-asset-manager-database-folder.png new file mode 100644 index 00000000000..cd409e1a308 Binary files /dev/null and b/DNN Platform/Modules/ResourceManager/Images/icon-asset-manager-database-folder.png differ diff --git a/DNN Platform/Modules/ResourceManager/Images/icon-asset-manager-secure-folder.png b/DNN Platform/Modules/ResourceManager/Images/icon-asset-manager-secure-folder.png new file mode 100644 index 00000000000..1d0c0e7a85d Binary files /dev/null and b/DNN Platform/Modules/ResourceManager/Images/icon-asset-manager-secure-folder.png differ diff --git a/DNN Platform/Modules/ResourceManager/Images/icon-asset-manager-standard-folder.png b/DNN Platform/Modules/ResourceManager/Images/icon-asset-manager-standard-folder.png new file mode 100644 index 00000000000..45a92f639d4 Binary files /dev/null and b/DNN Platform/Modules/ResourceManager/Images/icon-asset-manager-standard-folder.png differ diff --git a/DNN Platform/Modules/ResourceManager/Images/link.svg b/DNN Platform/Modules/ResourceManager/Images/link.svg new file mode 100644 index 00000000000..8f4c4bb44ec --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/link.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Images/loader_failed.svg b/DNN Platform/Modules/ResourceManager/Images/loader_failed.svg new file mode 100644 index 00000000000..624038bbdd2 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/loader_failed.svg @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Images/loading.gif b/DNN Platform/Modules/ResourceManager/Images/loading.gif new file mode 100644 index 00000000000..92e4f0e4f7e Binary files /dev/null and b/DNN Platform/Modules/ResourceManager/Images/loading.gif differ diff --git a/DNN Platform/Modules/ResourceManager/Images/move.svg b/DNN Platform/Modules/ResourceManager/Images/move.svg new file mode 100644 index 00000000000..a04a154c13c --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/move.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Images/preview.svg b/DNN Platform/Modules/ResourceManager/Images/preview.svg new file mode 100644 index 00000000000..11e20414e0e --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/preview.svg @@ -0,0 +1,9 @@ + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Images/redeploy.svg b/DNN Platform/Modules/ResourceManager/Images/redeploy.svg new file mode 100644 index 00000000000..c82dd4f06e9 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/redeploy.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Images/restore.svg b/DNN Platform/Modules/ResourceManager/Images/restore.svg new file mode 100644 index 00000000000..f8f638b9171 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/restore.svg @@ -0,0 +1,42 @@ + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Images/search-glass-no-results.png b/DNN Platform/Modules/ResourceManager/Images/search-glass-no-results.png new file mode 100644 index 00000000000..3f1d9d1278f Binary files /dev/null and b/DNN Platform/Modules/ResourceManager/Images/search-glass-no-results.png differ diff --git a/DNN Platform/Modules/ResourceManager/Images/search.png b/DNN Platform/Modules/ResourceManager/Images/search.png new file mode 100644 index 00000000000..0d9e9ffcd0f Binary files /dev/null and b/DNN Platform/Modules/ResourceManager/Images/search.png differ diff --git a/DNN Platform/Modules/ResourceManager/Images/search.svg b/DNN Platform/Modules/ResourceManager/Images/search.svg new file mode 100644 index 00000000000..77896b06399 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/search.svg @@ -0,0 +1,9 @@ + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Images/transparencyBG.jpg b/DNN Platform/Modules/ResourceManager/Images/transparencyBG.jpg new file mode 100644 index 00000000000..5916d569bb9 Binary files /dev/null and b/DNN Platform/Modules/ResourceManager/Images/transparencyBG.jpg differ diff --git a/DNN Platform/Modules/ResourceManager/Images/trash.svg b/DNN Platform/Modules/ResourceManager/Images/trash.svg new file mode 100644 index 00000000000..be3b81a188d --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/trash.svg @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Images/tree-sprite.png b/DNN Platform/Modules/ResourceManager/Images/tree-sprite.png new file mode 100644 index 00000000000..0885cdd5c8a Binary files /dev/null and b/DNN Platform/Modules/ResourceManager/Images/tree-sprite.png differ diff --git a/DNN Platform/Modules/ResourceManager/Images/unpublished.svg b/DNN Platform/Modules/ResourceManager/Images/unpublished.svg new file mode 100644 index 00000000000..13ac314fec4 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/unpublished.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Images/upload.svg b/DNN Platform/Modules/ResourceManager/Images/upload.svg new file mode 100644 index 00000000000..6b153274fda --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/upload.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Images/x.svg b/DNN Platform/Modules/ResourceManager/Images/x.svg new file mode 100644 index 00000000000..27db8d4cdf4 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Images/x.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/DNN Platform/Modules/ResourceManager/License.txt b/DNN Platform/Modules/ResourceManager/License.txt new file mode 100644 index 00000000000..82b0ac4187f --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/License.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors +All Rights Reserved + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/DNN Platform/Modules/ResourceManager/Module.build b/DNN Platform/Modules/ResourceManager/Module.build new file mode 100644 index 00000000000..63a3fa59ac6 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Module.build @@ -0,0 +1,23 @@ + + + + $(MSBuildProjectDirectory)\..\..\.. + $(MSBuildProjectDirectory)\ResourceManager.Web + + + + resources + ResourceManager + DNNCE_ResourceManager + $(WebsitePath)\DesktopModules\ResourceManager + $(WebsiteInstallPath)\Module + + + + + + + + + \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/Properties/AssemblyInfo.cs b/DNN Platform/Modules/ResourceManager/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..4279d9dd576 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Properties/AssemblyInfo.cs @@ -0,0 +1,18 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Dnn.Modules.ResourceManager")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("5ef01dd5-84a1-49f3-9232-067440288455")] diff --git a/DNN Platform/Modules/ResourceManager/ReleaseNotes.txt b/DNN Platform/Modules/ResourceManager/ReleaseNotes.txt new file mode 100644 index 00000000000..c328c3ddc6c --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ReleaseNotes.txt @@ -0,0 +1 @@ +

      Please see https://www.github.com/dnnsoftware for the complete release history.

      \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/.babelrc b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/.babelrc new file mode 100644 index 00000000000..59a01ef24ee --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/.babelrc @@ -0,0 +1,18 @@ +{ + "presets": [ + "@babel/preset-env", + "@babel/preset-react" + ], + "plugins": [ + "transform-object-assign", + "@babel/plugin-proposal-object-rest-spread", + "@babel/plugin-proposal-class-properties" + ], + "env": { + "production": { + "plugins": [ + "transform-react-remove-prop-types" + ] + } + } +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/.eslintignore b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/.eslintignore new file mode 100644 index 00000000000..ca83d8f7145 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/.eslintignore @@ -0,0 +1,2 @@ +./node_modules/**/* +**/dnn-react-common.min.js \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/.eslintrc.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/.eslintrc.js new file mode 100644 index 00000000000..de205a18d94 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/.eslintrc.js @@ -0,0 +1,43 @@ +module.exports = { + "plugins": [ + "react" + ], + "env": { + "browser": true, + "commonjs": true + }, + "extends": ["eslint:recommended", "plugin:react/recommended"], + "parser": "babel-eslint", + "parserOptions": { + "ecmaFeatures": { + "jsx": true + }, + "ecmaVersion": 2018, + "sourceType": "module" + }, + "settings": { + "react":{ + "version": "16" + } + }, + "globals": { + "__": false, + "Promise": false, + "VERSION": false + }, + "rules": { + "semi": "error", + "no-var": "error", + "quotes": ["warn", "double" ], + "indent": ["warn", 4, {"SwitchCase": 1}], + "no-unused-vars": "warn", + "no-console": "warn", + "keyword-spacing": "warn", + "eqeqeq": "warn", + "space-before-function-paren": ["warn", { "anonymous": "always", "named": "never" }], + "space-before-blocks": "warn", + "no-multiple-empty-lines": "warn", + "react/jsx-equals-spacing": ["warn", "never"], + "id-match": ["error", "^([A-Za-z0-9_])+$", {"properties": true}] + } +}; diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/addAssetPanelActionsTypes.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/addAssetPanelActionsTypes.js new file mode 100644 index 00000000000..1a21d251e45 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/addAssetPanelActionsTypes.js @@ -0,0 +1,12 @@ +const addAssetPanelActionsTypes = { + SHOW_ADD_ASSET_PANEL: "SHOW_ADD_ASSET_PANEL", + HIDE_ADD_ASSET_PANEL: "HIDE_ADD_ASSET_PANEL", + UPDATE_PROGRESS: "UPDATE_PROGRESS", + RESET_PANEL: "RESET_PANEL", + ASSET_ADDED: "ASSET_ADDED", + ASSET_ADDED_ERROR: "ASSET_ADDED_ERROR", + FILE_ALREADY_EXIST: "FILE_ALREADY_EXIST", + STOP_UPLOAD: "STOP_UPLOAD" +}; + +export default addAssetPanelActionsTypes; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/addFolderPanelActionsTypes.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/addFolderPanelActionsTypes.js new file mode 100644 index 00000000000..d5b87983b90 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/addFolderPanelActionsTypes.js @@ -0,0 +1,13 @@ +const addFolderPanelActionsTypes = { + SHOW_ADD_FOLDER_PANEL: "SHOW_ADD_FOLDER_PANEL", + HIDE_ADD_FOLDER_PANEL: "HIDE_ADD_FOLDER_PANEL", + FOLDER_MAPPINGS_LOADED: "FOLDER_MAPPINGS_LOADED", + LOAD_FOLDER_MAPPINGS_ERROR: "LOAD_FOLDER_MAPPINGS_ERROR", + CHANGE_NAME: "CHANGE_NAME", + CHANGE_FOLDER_TYPE: "CHANGE_FOLDER_TYPE", + FOLDER_CREATED: "FOLDER_CREATED", + ADD_FOLDER_ERROR: "ADD_FOLDER_ERROR", + SET_VALIDATION_ERRORS: "SET_VALIDATION_ERRORS" +}; + +export default addFolderPanelActionsTypes; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/dialogModalActionsTypes.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/dialogModalActionsTypes.js new file mode 100644 index 00000000000..b509d6dfb98 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/dialogModalActionsTypes.js @@ -0,0 +1,6 @@ +const dialogModalActionsTypes = { + OPEN_DIALOG_MODAL: "OPEN_DIALOG_MODAL", + CLOSE_DIALOG_MODAL: "CLOSE_DIALOG_MODAL" +}; + +export default dialogModalActionsTypes; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/folderPanelActionsTypes.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/folderPanelActionsTypes.js new file mode 100644 index 00000000000..8d932a7f6e8 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/folderPanelActionsTypes.js @@ -0,0 +1,19 @@ +const folderPanelActionsTypes = { + SET_LOADING: "SET_LOADING", + CONTENT_LOADED: "CONTENT_LOADED", + MORE_CONTENT_LOADED: "MORE_CONTENT_LOADED", + LOAD_CONTENT_ERROR: "LOAD_CONTENT_ERROR", + FILE_DOWNLOADED: "FILE_DOWNLOADED", + FOLDER_DELETED: "FOLDER_DELETED", + DELETE_FOLDER_ERROR: "DELETE_FOLDER_ERROR", + CLOSE_TOP_PANELS: "CLOSE_TOP_PANELS", + FILE_DELETED: "FILE_DELETED", + DELETE_FILE_ERROR: "DELETE_FILE_ERROR", + CHANGE_SEARCH: "CHANGE_SEARCH", + FILES_SEARCHED: "FILES_SEARCHED", + SEARCH_FILES_ERROR: "SEARCH_FILES_ERROR", + URL_COPIED_TO_CLIPBOARD: "URL_COPIED_TO_CLIPBOARD", + CHANGE_SORTING: "CHANGE_SORTING" +}; + +export default folderPanelActionsTypes; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/globalActionsTypes.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/globalActionsTypes.js new file mode 100644 index 00000000000..dd8f4eada35 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/globalActionsTypes.js @@ -0,0 +1,5 @@ +const globalActionsTypes = { + MODULE_PARAMETERS_LOADED: "MODULE_PARAMETERS_LOADED" +}; + +export default globalActionsTypes; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/infiniteScrollActionsTypes.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/infiniteScrollActionsTypes.js new file mode 100644 index 00000000000..9de0b6c683b --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/infiniteScrollActionsTypes.js @@ -0,0 +1,5 @@ +const infiniteScrollActionsTypes = { + SET_MAX_SCROLL_TOP: "SET_MAX_SCROLL_TOP" +}; + +export default infiniteScrollActionsTypes; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/itemDetailsActionsTypes.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/itemDetailsActionsTypes.js new file mode 100644 index 00000000000..d1cd5d9e8f2 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/itemDetailsActionsTypes.js @@ -0,0 +1,18 @@ +const itemDetailsActionsTypes = { + EDIT_ITEM: "EDIT_ITEM", + EDIT_ITEM_ERROR: "EDIT_ITEM_ERROR", + CANCEL_EDIT_ITEM: "CANCEL_EDIT_ITEM", + CHANGE_NAME: "CHANGE_NAME", + CHANGE_TITLE: "CHANGE_TITLE", + CHANGE_DESCRIPTION: "CHANGE_DESCRIPTION", + CHANGE_PERMISSIONS: "CHANGE_PERMISSIONS", + SET_VALIDATION_ERRORS: "SET_VALIDATION_ERRORS", + ITEM_SAVED: "ITEM_SAVED", + SAVE_ITEM_ERROR: "SAVE_ITEM_ERROR", + MOVE_ITEM: "MOVE_ITEM", + MOVE_ITEM_ERROR: "MOVE_ITEM_ERROR", + CANCEL_MOVE_ITEM: "CANCEL_MOVE_ITEM", + ITEM_MOVED: "ITEM_MOVED", +}; + +export default itemDetailsActionsTypes; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/manageFolderTypesPanelActionsTypes.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/manageFolderTypesPanelActionsTypes.js new file mode 100644 index 00000000000..4df0637de47 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/manageFolderTypesPanelActionsTypes.js @@ -0,0 +1,7 @@ +const manageFolderTypesPanelActionsTypes = { + SHOW_MANAGE_FOLDER_TYPES_PANEL: "SHOW_MANAGE_FOLDER_TYPES_PANEL", + HIDE_MANAGE_FOLDER_TYPES_PANEL: "HIDE_MANAGE_FOLDER_TYPES_PANEL", + ADD_FOLDER_TYPE_URL_LOADED: "ADD_FOLDER_TYPE_URL_LOADED", +} + +export default manageFolderTypesPanelActionsTypes; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/messageModalActionsTypes.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/messageModalActionsTypes.js new file mode 100644 index 00000000000..f2a9b23adae --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/messageModalActionsTypes.js @@ -0,0 +1,5 @@ +const messageModalActionsTypes = { + CLOSE_MESSAGE_MODAL: "CLOSE_MESSAGE_MODAL" +}; + +export default messageModalActionsTypes; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/topBarActionsTypes.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/topBarActionsTypes.js new file mode 100644 index 00000000000..e4e21064484 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/action types/topBarActionsTypes.js @@ -0,0 +1,5 @@ +const topBarActionsTypes = { + CHANGE_SEARCH_FIELD: "CHANGE_SEARCH_FIELD" +}; + +export default topBarActionsTypes; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/addAssetPanelActions.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/addAssetPanelActions.js new file mode 100644 index 00000000000..6d709ee13ac --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/addAssetPanelActions.js @@ -0,0 +1,133 @@ +import actionTypes from "../action types/addAssetPanelActionsTypes"; +import folderPanelActionTypes from "../action types/folderPanelActionsTypes"; +import ItemsService from "../services/itemsService"; +import LocalizeService from "../services/localizeService"; + +let files = {}; + +function fileUploadedHandler(dispatch, file, overwrite, response) { + const {alreadyExists, fileName, message} = response; + + if (alreadyExists) { + files[fileName] = file; + + return dispatch ({ + type: actionTypes.FILE_ALREADY_EXIST, + data: response + }); + } + + if (!fileName || message) { + return dispatch (fileUploadError(file.name, message)); + } + + files[fileName] = undefined; + + dispatch ({ + type: actionTypes.ASSET_ADDED, + data: response + }); +} + +function fileUploadError(fileName, message) { + return { + type: actionTypes.ASSET_ADDED_ERROR, + data: { + fileName, + message + } + }; +} + +const addAssetPanelActions = { + showPanel() { + return (dispatch) => { + dispatch ({ + type: folderPanelActionTypes.CLOSE_TOP_PANELS + }); + + dispatch ({ + type: actionTypes.SHOW_ADD_ASSET_PANEL + }); + }; + }, + hidePanel() { + return (dispatch) => { + dispatch ({ + type: actionTypes.HIDE_ADD_ASSET_PANEL + }); + + dispatch ({ + type: actionTypes.RESET_PANEL + }); + }; + }, + overwriteFile(fileName, folderPath, folderPanelState, trackProgress) { + let file = files[fileName]; + return this.uploadFiles([file], folderPath, folderPanelState, trackProgress, true); + }, + uploadFiles(files, folderPath, folderPanelState, trackProgress, overwrite=false) { + const { numItems, sorting } = folderPanelState; + const folderId = folderPanelState.folder ? folderPanelState.folder.folderId : folderPanelState.homeFolderId; + + return dispatch => { + const uploadFilePromises = []; + + files.forEach ( + file => uploadFilePromises.push(ItemsService.uploadFile(file, folderPath, overwrite, trackProgress.bind(null, file.name)) + .then( + response => fileUploadedHandler(dispatch, file, overwrite, response), + reason => dispatch (fileUploadError(file.name, reason.message)) + )) + ); + + Promise.all(uploadFilePromises).then( + () => ItemsService.getContent(folderId, 0, numItems, sorting) + ) + .then( + getContentResponse => dispatch ({ + type: folderPanelActionTypes.CONTENT_LOADED, + data: getContentResponse + }) + ); + }; + }, + trackProgress(fileName, progress) { + return dispatch => + dispatch ({ + type: actionTypes.UPDATE_PROGRESS, + data: { + fileName, + percent: progress.percent + } + }); + }, + stopUpload(fileName) { + files[fileName] = undefined; + + return dispatch => dispatch ({ + type: actionTypes.STOP_UPLOAD, + data: fileName + }); + }, + fileSizeError(fileName, maxSize) { + const fileTooBigMessage = LocalizeService.getString("FileSizeErrorMessage"); + return dispatch => + dispatch(fileUploadError(fileName, fileName + fileTooBigMessage + maxSize)); + }, + invalidExtensionError(fileName) { + const invalidExtensionMessage = LocalizeService.getString("InvalidExtensionMessage"); + return dispatch => + dispatch(fileUploadError(fileName, fileName + invalidExtensionMessage)); + } +/*, + startUpload() { + return dispatch => + dispatch ({ + type: actionTypes.RESET_PANEL + }); + }, + */ +}; + +export default addAssetPanelActions; diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/addFolderPanelActions.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/addFolderPanelActions.js new file mode 100644 index 00000000000..0d4a035b766 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/addFolderPanelActions.js @@ -0,0 +1,101 @@ +import actionTypes from "../action types/addFolderPanelActionsTypes"; +import folderPanelActionTypes from "../action types/folderPanelActionsTypes"; +import ItemsService from "../services/itemsService"; + +const addFolderPanelActions = { + showPanel() { + return (dispatch) => { + dispatch ({ + type: folderPanelActionTypes.CLOSE_TOP_PANELS + }); + + dispatch ({ + type: actionTypes.SHOW_ADD_FOLDER_PANEL + }); + }; + }, + hidePanel() { + return (dispatch) => { + dispatch ({ + type: actionTypes.HIDE_ADD_FOLDER_PANEL + }); + }; + }, + loadFolderMappings() { + return (dispatch) => { + ItemsService.loadFolderMappings().then((response) => { + dispatch({ + type: actionTypes.FOLDER_MAPPINGS_LOADED, + data: response + }); + }).catch(() => { + dispatch({ + type: actionTypes.LOAD_FOLDER_MAPPINGS_ERROR + }); + }); + }; + }, + changeName(event) + { + return { + type: actionTypes.CHANGE_NAME, + data: event.target.value + }; + }, + changeFolderType(folderType) + { + return { + type: actionTypes.CHANGE_FOLDER_TYPE, + data: folderType + }; + }, + addFolder(data) { + const {formData, folderPanelState} = data; + const { numItems, sorting } = folderPanelState; + const folderId = folderPanelState.folder ? folderPanelState.folder.folderId : folderPanelState.homeFolderId; + + let newFolderData = { + folderName: formData.name, + FolderMappingId: formData.folderType, + ParentFolderId: folderId + }; + + return (dispatch) => { + ItemsService.addFolder(newFolderData) + .then( + addFolderResponse => + ItemsService.getContent(folderId, 0, numItems, sorting) + .then( + getContentResponse => { + dispatch({ + type: folderPanelActionTypes.CONTENT_LOADED, + data: getContentResponse + }); + + dispatch({ + type: actionTypes.FOLDER_CREATED, + data: addFolderResponse + }); + } + ), + reason => dispatch({ + type: actionTypes.ADD_FOLDER_ERROR, + data: reason.data ? reason.data.message : null + }) + ) + .catch( + dispatch({ + type: actionTypes.ADD_FOLDER_ERROR + }) + ); + }; + }, + setValidationErrors(validationErrors) { + return { + type: actionTypes.SET_VALIDATION_ERRORS, + data: validationErrors + }; + } +}; + +export default addFolderPanelActions; diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/dialogModalActions.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/dialogModalActions.js new file mode 100644 index 00000000000..ae3440334d4 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/dialogModalActions.js @@ -0,0 +1,19 @@ +import actionTypes from "../action types/dialogModalActionsTypes"; + +const dialogModalActions = { + open(dialogHeader, dialogMessage, yesFunction, noFunction) { + return { + type: actionTypes.OPEN_DIALOG_MODAL, + data: { + dialogHeader, dialogMessage, yesFunction, noFunction + } + }; + }, + close() { + return { + type: actionTypes.CLOSE_DIALOG_MODAL + }; + } +}; + +export default dialogModalActions; diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/folderPanelActions.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/folderPanelActions.js new file mode 100644 index 00000000000..fac5345c72a --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/folderPanelActions.js @@ -0,0 +1,191 @@ +import ItemsService from "../services/itemsService"; +import actionTypes from "../action types/folderPanelActionsTypes"; +import copyToClipboard from "copy-to-clipboard"; + +function loadingWrap(actionFunction) { + return (dispatch) => { + dispatch({ + type: actionTypes.SET_LOADING, + data: true + }); + + actionFunction() + .then(() => + dispatch({ + type: actionTypes.SET_LOADING, + data: false + }) + ); + }; +} + +function getContent(folderPanelState, changeToFolderId=null) { + const { numItems, sorting, currentFolderId, loadedItems } = folderPanelState; + const folderId = changeToFolderId || currentFolderId; + const startIndex = changeToFolderId ? 0 : loadedItems; + + return dispatch => + ItemsService.getContent(folderId, startIndex, numItems, sorting) + .then( + response => dispatch({ + type: startIndex ? actionTypes.MORE_CONTENT_LOADED : actionTypes.CONTENT_LOADED, + data: response + }), + reason => dispatch({ + type: actionTypes.LOAD_CONTENT_ERROR, + data: reason.data ? reason.data.message : null + }) + ); +} + +function syncContent(folderPanelState, recursive) { + const { numItems, sorting, currentFolderId } = folderPanelState; + + return dispatch => + ItemsService.syncContent(currentFolderId, numItems, sorting, recursive) + .then( + response => dispatch({ + type: actionTypes.CONTENT_LOADED, + data: response + }), + reason => dispatch({ + type: actionTypes.LOAD_CONTENT_ERROR, + data: reason.data ? reason.data.message : null + }) + ); +} + +const folderPanelActions = { + syncContent(folderPanelState, changeToFolderId=null) { + return (dispatch) => { + let syncContentLogic = () => dispatch(syncContent(folderPanelState, changeToFolderId)); + dispatch(loadingWrap(syncContentLogic)); + + let currentHistoryFolderId = history.state ? history.state.folderId : null; + + if (changeToFolderId && currentHistoryFolderId !== changeToFolderId && changeToFolderId !== folderPanelState.homeFolderId) { + history.pushState({folderId: changeToFolderId}, null, "?folderId=" + changeToFolderId); + } + else if (changeToFolderId && currentHistoryFolderId !== changeToFolderId) { + let url = window.location.toString(); + if (url.indexOf("?") > 0) { + let clean_url = url.substring(0, url.indexOf("?")); + history.pushState({folderId: changeToFolderId}, null, clean_url); + } + } + }; + }, + loadContent(folderPanelState, changeToFolderId=null) { + return (dispatch) => { + let getContentLogic = () => dispatch(getContent(folderPanelState, changeToFolderId)); + dispatch(loadingWrap(getContentLogic)); + + let currentHistoryFolderId = history.state ? history.state.folderId : null; + + if (changeToFolderId && currentHistoryFolderId !== changeToFolderId && changeToFolderId !== folderPanelState.homeFolderId) { + history.pushState({folderId: changeToFolderId}, null, "?folderId=" + changeToFolderId); + } + else if (changeToFolderId && currentHistoryFolderId !== changeToFolderId) { + let url = window.location.toString(); + if (url.indexOf("?") > 0) { + let clean_url = url.substring(0, url.indexOf("?")); + history.pushState({folderId: changeToFolderId}, null, clean_url); + } + } + }; + }, + deleteFolder(folderToRemoveId, folderPanelState) { + const { currentFolderId } = folderPanelState; + + return (dispatch) => { + let deleteFolder = () => + ItemsService.deleteFolder(folderToRemoveId) + .then( + () => dispatch(getContent(folderPanelState, currentFolderId)), + + reason => dispatch({ + type: actionTypes.DELETE_FOLDER_ERROR, + data: reason.data ? reason.data.message : null + }) + ); + + dispatch(loadingWrap(deleteFolder)); + }; + }, + deleteFile(fileToRemoveId, folderPanelState) { + const { currentFolderId } = folderPanelState; + + return (dispatch) => { + let deleteFile = () => + ItemsService.deleteFile(fileToRemoveId) + .then( + () => dispatch(getContent(folderPanelState, currentFolderId)), + + reason => dispatch({ + type: actionTypes.DELETE_FILE_ERROR, + data: reason.data ? reason.data.message : null + }) + ); + + dispatch(loadingWrap(deleteFile)); + }; + }, + downloadFile(fileId) { + return (dispatch) => { + let downloadUrl = ItemsService.getDownloadUrl(fileId); + window.open(downloadUrl, "_blank"); + dispatch ({ + type: actionTypes.FILE_DOWNLOADED + }); + }; + }, + copyFileUrlToClipboard(item) { + if (!item.path) { + return; + } + + let fullUrl = ItemsService.getItemFullUrl(item.path); + copyToClipboard(fullUrl); + + return { + type: actionTypes.URL_COPIED_TO_CLIPBOARD, + data: fullUrl + }; + }, + changeSearchingValue(searchText) { + return { + type: actionTypes.CHANGE_SEARCH, + data: searchText + }; + }, + searchFiles(folderPanelState, search, searchMore=false) { + const { numItems, sorting, currentFolderId, loadedItems } = folderPanelState; + const folderId = currentFolderId; + const startIndex = searchMore ? Math.ceil(loadedItems/numItems) + 1 : 1; + + return (dispatch) => { + let getContent = () => + ItemsService.searchFiles(folderId, search, startIndex, numItems, sorting, "") + .then( + response => dispatch({ + type: searchMore ? actionTypes.MORE_CONTENT_LOADED : actionTypes.FILES_SEARCHED, + data: response + }), + reason => dispatch({ + type: actionTypes.SEARCH_FILES_ERROR, + data: reason + }) + ); + + dispatch(loadingWrap(getContent)); + }; + }, + changeSorting(sorting) { + return { + type: actionTypes.CHANGE_SORTING, + data: sorting + }; + } +}; + +export default folderPanelActions; diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/globalActions.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/globalActions.js new file mode 100644 index 00000000000..d87e6afddbc --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/globalActions.js @@ -0,0 +1,13 @@ + +import actionTypes from "../action types/globalActionsTypes"; + +const globalActions = { + loadInitialParameters(initialConfig) { + return { + type: actionTypes.MODULE_PARAMETERS_LOADED, + data: initialConfig + }; + } +}; + +export default globalActions; diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/infiniteScrollActions.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/infiniteScrollActions.js new file mode 100644 index 00000000000..95aa4e97ede --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/infiniteScrollActions.js @@ -0,0 +1,12 @@ +import actionTypes from "../action types/infiniteScrollActionsTypes"; + +const infiniteScrollActions = { + setMaxScrollTop(maxScrollTop) { + return { + type: actionTypes.SET_MAX_SCROLL_TOP, + data: maxScrollTop + }; + } +}; + +export default infiniteScrollActions; diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/itemDetailsActions.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/itemDetailsActions.js new file mode 100644 index 00000000000..607d5976b1b --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/itemDetailsActions.js @@ -0,0 +1,136 @@ +import actionTypes from "../action types/itemDetailsActionsTypes"; +import itemsService from "../services/itemsService"; +import localizeService from "../services/localizeService"; + +const itemDetailsActions = { + editItem(item) { + const itemData = {isFolder: item.isFolder, iconUrl: item.iconUrl, thumbnailAvailable: item.thumbnailAvailable, thumbnailUrl: item.thumbnailUrl}; + let getItemDetails = () => item.isFolder + ? itemsService.getFolderDetails(item.itemId) + : itemsService.getFileDetails(item.itemId); + return dispatch => { + getItemDetails() + .then( + response => dispatch({ + type: actionTypes.EDIT_ITEM, + data: {...response, ...itemData} + }), + reason => dispatch({ + type: actionTypes.EDIT_ITEM_ERROR, + data: reason.data && reason.data.message ? reason.data.message : localizeService.getString("GenericErrorMessage") + }) + ); + }; + }, + cancelEditItem() { + return { + type: actionTypes.CANCEL_EDIT_ITEM + }; + }, + moveItem(item) { + const itemData = {isFolder: item.isFolder, iconUrl: item.iconUrl, thumbnailAvailable: item.thumbnailAvailable, thumbnailUrl: item.thumbnailUrl}; + let getItemDetails = () => item.isFolder + ? itemsService.getFolderDetails(item.itemId) + : itemsService.getFileDetails(item.itemId); + return dispatch => { + getItemDetails() + .then( + response => dispatch({ + type: actionTypes.MOVE_ITEM, + data: {...response, ...itemData} + }), + reason => dispatch({ + type: actionTypes.SAVE_ITEM_ERROR, + data: reason.data && reason.data.message ? reason.data.message : localizeService.getString("GenericErrorMessage") + }) + ); + }; + }, + moveFolder(sourceFolderId, destinationFolderId) { + return dispatch => { + itemsService.moveFolder(sourceFolderId, destinationFolderId) + .then( + () => { + dispatch({ + type: actionTypes.ITEM_MOVED, + }); + }, + reason => { + reason.data && reason.data.message ? reason.data.message : localizeService.getString("GenericErrorMessage") + } + ) + }; + }, + moveFile(sourceFileId, destinationFolderId) { + return dispatch => { + itemsService.moveFile(sourceFileId, destinationFolderId) + .then( + () => dispatch({ + type: actionTypes.ITEM_MOVED + }), + reason => { + reason.data && reason.data.message ? reason.data.message : localizeService.getString("GenericErrorMessage") + } + ) + } + }, + cancelMoveItem() { + return { + type: actionTypes.CANCEL_MOVE_ITEM + }; + }, + changeName(event) { + return { + type: actionTypes.CHANGE_NAME, + data: event.target.value + }; + }, + changeTitle(event) { + return { + type: actionTypes.CHANGE_TITLE, + data: event.target.value + }; + }, + changeDescription(event) { + return { + type: actionTypes.CHANGE_DESCRIPTION, + data: event.target.value + }; + }, + changePermissions(permissions) { + return { + type: actionTypes.CHANGE_PERMISSIONS, + data: permissions + }; + }, + setValidationErrors(validationErrors) { + return { + type: actionTypes.SET_VALIDATION_ERRORS, + data: validationErrors + }; + }, + saveItem(item) { + let saveFunction = () => item.isFolder + ? itemsService.saveFolderDetails(item) + : itemsService.saveFileDetails(item); + return dispatch => { + saveFunction() + .then( + () => dispatch({ + type: actionTypes.ITEM_SAVED, + data: { + isFolder: item.isFolder, + itemId: item.isFolder ? item.folderId : item.fileId, + itemName: item.isFolder ? item.folderName : item.fileName + } + }), + reason => dispatch({ + type: actionTypes.SAVE_ITEM_ERROR, + data: reason.data && reason.data.message ? reason.data.message : localizeService.getString("GenericErrorMessage") + }) + ); + }; + } +}; + +export default itemDetailsActions; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/manageFolderTypesPanelActions.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/manageFolderTypesPanelActions.js new file mode 100644 index 00000000000..1d246da77eb --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/manageFolderTypesPanelActions.js @@ -0,0 +1,48 @@ +import actionTypes from "../action types/manageFolderTypesPanelActionsTypes"; +import folderPanelActionTypes from "../action types/folderPanelActionsTypes"; +import addFolderPanelActions from "../actions/addFolderPanelActions"; +import ItemsService from "../services/itemsService"; + +const manageFolderTypesPanelActions = { + showPanel() { + return dispatch => { + dispatch ({ + type: folderPanelActionTypes.CLOSE_TOP_PANELS + }); + + dispatch ({ + type: actionTypes.SHOW_MANAGE_FOLDER_TYPES_PANEL + }); + } + }, + hidePanel() { + return dispatch => { + dispatch ({ + type: actionTypes.HIDE_MANAGE_FOLDER_TYPES_PANEL + }); + }; + }, + removeFolderType(folderMappingId) { + return (dispatch) => { + ItemsService.removeFolderType(folderMappingId) + .then( + () => { + dispatch(addFolderPanelActions.loadFolderMappings()); + } + ); + } + }, + getAddFolderTypeUrl() { + return dispatch => { + ItemsService.getAddFolderTypeUrl() + .then(data => { + dispatch({ + type: actionTypes.ADD_FOLDER_TYPE_URL_LOADED, + data + }); + }); + } + } +}; + +export default manageFolderTypesPanelActions; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/messageModalActions.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/messageModalActions.js new file mode 100644 index 00000000000..9bb61abe72c --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/messageModalActions.js @@ -0,0 +1,11 @@ +import actionTypes from "../action types/messageModalActionsTypes"; + +const messageModalActions = { + close() { + return { + type: actionTypes.CLOSE_MESSAGE_MODAL + }; + } +}; + +export default messageModalActions; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/topBarActions.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/topBarActions.js new file mode 100644 index 00000000000..f01d568652e --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/actions/topBarActions.js @@ -0,0 +1,12 @@ +import actionTypes from "../action types/topBarActionsTypes"; + +const topBarActions = { + changeSearchField(text) { + return { + type: actionTypes.CHANGE_SEARCH_FIELD, + data: text + }; + } +}; + +export default topBarActions; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/App.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/App.jsx new file mode 100644 index 00000000000..1805cfc13fe --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/App.jsx @@ -0,0 +1,10 @@ +import React from "react"; +import ModuleLayout from "../containers/ModuleLayout"; + +export default class App extends React.Component { + render() { + return ( + + ); + } +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/AssetsHeader.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/AssetsHeader.jsx new file mode 100644 index 00000000000..d42673b99b0 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/AssetsHeader.jsx @@ -0,0 +1,12 @@ +import React from "react"; +import ButtonsContainer from "../containers/ButtonsContainer"; +import BreadcrumbsContainer from "../containers/BreadcrumbsContainer"; + +const AssetsHeader = () => ( +
      + + +
      +); + +export default AssetsHeader; diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/Breadcrumb.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/Breadcrumb.jsx new file mode 100644 index 00000000000..e24694b9d09 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/Breadcrumb.jsx @@ -0,0 +1,15 @@ +import React from "react"; +import PropTypes from "prop-types"; + +const Breadcrumb = ({name, onClick}) => ( +
      + { name } +
      +); + +Breadcrumb.propTypes = { + name: PropTypes.string.isRequired, + onClick: PropTypes.func +}; + +export default Breadcrumb; diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FileDetails.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FileDetails.jsx new file mode 100644 index 00000000000..70a4099f801 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FileDetails.jsx @@ -0,0 +1,63 @@ +import React from "react"; +import PropTypes from "prop-types"; +import itemService from "../services/itemsService"; +import localizeService from "../services/localizeService"; + +const FileDetails = ({file, handlers, validationErrors}) => ( +
      +
      +
      +
      + {localizeService.getString("Created")}: + {file.createdOnDate} +
      +
      +
      + {localizeService.getString("Size")}: + {file.size} +
      +
      +
      + {localizeService.getString("LastModified")}: + {file.lastModifiedOnDate} +
      +
      +
      + {localizeService.getString("URL")}: + {itemService.getItemFullUrl(file.url)} +
      +
      +
      +
      +
      + + + +
      +
      + + +
      +
      + + +
      +
      +
      + + +
      +
      +); + +FileDetails.propTypes = { + file: PropTypes.object.isRequired, + handlers: PropTypes.object.isRequired, + validationErrors: PropTypes.object.isRequired +}; + +export default FileDetails; diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FileProgress.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FileProgress.jsx new file mode 100644 index 00000000000..2d048760d42 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FileProgress.jsx @@ -0,0 +1,34 @@ +import React from "react"; +import PropTypes from "prop-types"; +import OverwriteContainer from "../containers/ProgressBarOverwriteContainer"; + +const FileProgress = ({fileName, progress, imgSrc, fileUrl, uploading, error, stopped, message, alreadyExists}) => ( +
      + + + + +
      + {fileName} + {alreadyExists && } + {message && {message}} +
      +
      +
      +
      +
      +); + +FileProgress.propTypes = { + fileName: PropTypes.string, + progress: PropTypes.number, + imgSrc: PropTypes.string, + fileUrl: PropTypes.string, + uploading: PropTypes.bool, + error: PropTypes.bool, + stopped: PropTypes.bool, + message: PropTypes.string, + alreadyExists: PropTypes.bool +}; + +export default FileProgress; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FileUpload.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FileUpload.jsx new file mode 100644 index 00000000000..46567143ae1 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FileUpload.jsx @@ -0,0 +1,17 @@ +import React from "react"; +import DropZone from "../containers/DropZoneContainer"; +import Progress from "../containers/ProgressContainer"; +import localizeService from "../services/localizeService.js"; + +const FileUpload = () => ( +
      + + + {localizeService.getString("FileUploadPanelMessage")} + + + +
      +); + +export default FileUpload; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderDetails.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderDetails.jsx new file mode 100644 index 00000000000..a0993db1157 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderDetails.jsx @@ -0,0 +1,62 @@ +import React from "react"; +import PropTypes from "prop-types"; +import localizeService from "../services/localizeService"; +import itemsService from "../services/itemsService"; +import Permissions from "./Permissions"; + +const FolderDetails = ({folder, handlers, validationErrors}) => ( +
      +
      +
      +
      + {localizeService.getString("Created")}: + {folder.createdOnDate} +
      +
      +
      + {localizeService.getString("LastModified")}: + {folder.lastModifiedOnDate} +
      +
      +
      + {localizeService.getString("FolderType")}: + {folder.type} +
      +
      +
      + {localizeService.getString("URL")}: + {itemsService.getFolderUrl(folder.folderId)} +
      +
      +
      +
      + handlers.changePermissions(permissions)} + > +
      +
      +
      +
      + + + +
      +
      + + +
      +
      +); + +FolderDetails.propTypes = { + folder: PropTypes.object.isRequired, + handlers: PropTypes.object.isRequired, + validationErrors: PropTypes.object.isRequired +}; + +export default FolderDetails; diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/FolderPicker.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/FolderPicker.jsx new file mode 100644 index 00000000000..8b20dace839 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/FolderPicker.jsx @@ -0,0 +1,126 @@ +import React from "react"; +import PropTypes from "prop-types"; +import FolderSelector from "./FolderSelector"; +import internalService from "../../services/internalService"; + +function findKey(thisObject, id) { + /* eslint-disable spellcheck/spell-checker */ + let p, tRet; + for (p in thisObject) { + if (p === "data") { + if (thisObject[p].key === id) { + return thisObject; + } + } else if (thisObject[p] instanceof Object) { + if (thisObject.hasOwnProperty(p)) { + tRet = findKey(thisObject[p], id); + if (tRet) { return tRet; } + } + } + } + return false; + /* eslint-enable spellcheck/spell-checker */ +} + +export default class FolderPicker extends React.Component { + + constructor(props) { + super(props); + + this.state = { + folders: null + }; + } + + componentDidMount() { + this.getFolders(); + } + + componentWillUnmount() { + this.unmounted = true; + } + + getFolders(searchText) { + let folderPromise = searchText ? internalService.searchFolders(searchText) : internalService.getFolders(); + folderPromise.then( + this.setFolders.bind(this) + ); + } + + getChildrenFolders(parentId) { + internalService.getFolderDescendant(parentId) + .then( + this.addChildFolders.bind(this, parentId) + ); + } + + setFolders(result) { + if (this.unmounted) { + return; + } + + const { props } = this; + let homeFolderId = props.homeFolderId; + + let source = result.Tree; + let filtered = this.findNode(source, (n) => {return n !== null && n.data.key === homeFolderId.toString();}); + if (filtered !== null){ + source.children.splice(0, source.children.length, filtered); + } + this.setState({ folders: result.Tree }); + } + + findNode(node, condition) { + if (condition(node)) { + return node; + } + + for (let i = 0; i < node.children.length; i++) { + let found = this.findNode(node.children[i], condition); + if (found !== null) { + return found; + } + } + + return null; + } + + addChildFolders(parentId, result) { + const folders = this.state.folders; + const parent = findKey(folders, parentId); + const children = result.Items.map((item) => { + return { data: item, children: [] }; + }); + parent.children = children; + this.setState({ folders }); + } + + render() { + const {changeFolder} = this.props; + + return ( + + ); + } +} + +/** + * propTypes + * @property {object} selectedFolder selected folder. Should be null or have a key and value properties + * @property {object} onSelectFolder called when change folder. Pass as parameter a selectedFolder object + * @property {object} onRetrieveFolderError callback for error when retrieve data + */ + +FolderPicker.propTypes = { + selectedFolder: PropTypes.object, + changeFolder: PropTypes.func, + onRetrieveFolderError: PropTypes.func, + noFolderSelectedValue: PropTypes.string.isRequired, + searchFolderPlaceHolder: PropTypes.string.isRequired, + homeFolderId: PropTypes.number +}; diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/FolderSelector.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/FolderSelector.jsx new file mode 100644 index 00000000000..0832a9ac9df --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/FolderSelector.jsx @@ -0,0 +1,127 @@ +import React, { Component } from "react"; +import { PropTypes } from "prop-types"; +import Folders from "./Folders"; +import { Scrollbars } from "react-custom-scrollbars"; +import "./style.less"; + +const searchIconImage = require("!raw-loader!./img/search.svg").default; + +export default class FolderSelector extends Component { + + constructor() { + super(); + this.state = { + showFolderPicker: false, + searchFolderText: "" + }; + this.timeOut = null; + this.handleClick = this.handleClick.bind(this); + this.folderSelector = React.createRef(); + } + + componentDidMount() { + document.addEventListener("click", this.handleClick, false); + this._isMounted = true; + } + + componentWillUnmount() { + document.removeEventListener("click", this.handleClick, false); + this._isMounted = false; + } + + handleClick(e) { + if (!this._isMounted) { return; } + const node = this.folderSelector; + if (node && node.contains(e.target) || e.target.className === "clear-button") { + return; + } + this.hide(); + } + + hide() { + this.setState({ showFolderPicker: false}); + } + + onFolderChange(folder) { + this.hide(); + this.props.onFolderChange(folder); + } + + onChangeSearchFolderText(e) { + const searchFolderText = e.target.value ? e.target.value : ""; + this.setState({ searchFolderText }); + clearTimeout(this.timeOut); + this.timeOut = setTimeout(() => + this.props.searchFolder(searchFolderText.toLowerCase()), + 500); + } + + clearSearch(e) { + e.preventDefault(); + this.setState({ searchFolderText: "" }); + this.props.searchFolder(); + } + + onFoldersClick() { + const {showFolderPicker} = this.state; + this.setState({ showFolderPicker: !showFolderPicker }); + } + + getSearchIcon() { + /* eslint-disable react/no-danger */ + return (
      ); + /* eslint-enable react/no-danger */ + } + + render() { + const {selectedFolder, folders, onParentExpands, noFolderSelectedValue, searchFolderPlaceHolder} = this.props; + const selectedFolderText = selectedFolder ? selectedFolder.value : "<" + noFolderSelectedValue + ">"; + const searchIcon = this.getSearchIcon(); + + return ( +
      this.folderSelector = fs} className="dnn-folder-selector"> +
      + {selectedFolderText} +
      +
      +
      +
      + this.onChangeSearchFolderText(e) } + placeholder={searchFolderPlaceHolder} + aria-label="Search" /> + {this.state.searchFolderText && +
      ×
      + } + {searchIcon} +
      +
      + + + +
      +
      +
      +
      + ); + } +} + + +FolderSelector.propTypes = { + folders: PropTypes.object, + onFolderChange: PropTypes.func.isRequired, + onParentExpands: PropTypes.func.isRequired, + selectedFolder: PropTypes.object, + searchFolder: PropTypes.func.isRequired, + noFolderSelectedValue: PropTypes.string.isRequired, + searchFolderPlaceHolder: PropTypes.string.isRequired +}; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/Folders.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/Folders.jsx new file mode 100644 index 00000000000..4cc00d55afa --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/Folders.jsx @@ -0,0 +1,103 @@ +import React, { Component } from "react"; +import { PropTypes } from "prop-types"; +import "./style.less"; + +const folderIcon = require("!raw-loader!./img/folder.svg").default; + +export default class Folders extends Component { + + constructor() { + super(); + this.state = { + openFolders: [] + }; + } + + componentWillReceiveProps(props) { + if (!props.folders || !props.folders.children || !props.folders.children[0] || + !props.folders.children[0].data || !props.folders.children[0].data.key) { + return; + } + const rootKey = props.folders.children[0].data.key; + const {openFolders} = this.state; + openFolders.push(rootKey); + this.setState({ openFolders }); + } + + + toggleFolder(key) { + let {openFolders} = this.state; + if (openFolders.some(id => id === key)) { + openFolders = openFolders.filter(id => id !== key); + } else { + openFolders.push(key); + } + this.setState({ openFolders }); + } + + onParentClick(item) { + if (!item.data.hasChildren) { + return; + } + this.toggleFolder(item.data.key); + if (item.children && item.children.length) { + return; + } + this.props.onParentExpands(item.data.key); + } + + onFolderNameClick(folder) { + this.props.onFolderChange(folder.data); + } + + getFolderIcon() { + /* eslint-disable react/no-danger */ + return (
      ); + /* eslint-enable react/no-danger */ + } + + getFolders(folder) { + if (!folder) { + return false; + } + + const folderIcon = this.getFolderIcon(); + const children = folder.children.map((child) => { + const isOpen = this.state.openFolders.some(id => child !== null && id === child.data.key); + const className = isOpen ? "open" : ""; + return child !== null &&
    • + {child.data.hasChildren && +
      +
      + } +
      + {folderIcon} +
      {child.data.value}
      +
      + {child.data.hasChildren && + this.getFolders(child) + } +
    • ; + }); + + return
        {children}
      ; + } + + render() { + const folders = this.getFolders(this.props.folders); + + return ( +
      + {folders} +
      + ); + } +} + +Folders.propTypes = { + folders: PropTypes.object, + onFolderChange: PropTypes.func.isRequired, + onParentExpands: PropTypes.func.isRequired +}; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/img/folder.svg b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/img/folder.svg new file mode 100644 index 00000000000..cf83478037a --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/img/folder.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/img/search.svg b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/img/search.svg new file mode 100644 index 00000000000..9622314b685 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/img/search.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/style.less b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/style.less new file mode 100644 index 00000000000..a2af1f28a27 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/FolderSelector/style.less @@ -0,0 +1,296 @@ +.prefixes(@property, @value) { + -webkit-@{property}: @value; + -khtml-@{property}: @value; + -moz-@{property}: @value; + -ms-@{property}: @value; + @{property}: @value; +} + +@import "~@dnnsoftware/dnn-react-common/styles/index"; +@transition: .2s; + +.dnn-folder-selector { + width: 100%; + float: left; + height: 30px; + border: 1px solid @mountainMist; + position: relative; + border: none; + + &:after { + content: ""; + position: absolute; + right: 20px; + top: 12px; + width: 0; + height: 0; + pointer-events: none; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-top: 4px solid @rollingStone; + } + + .selected-item { + float: left; + width: 100%; + height: 100%; + padding: 7px; + box-sizing: border-box; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + padding-right: 20px; + } + + span > strong { + cursor: pointer; + &:hover { + text-decoration: underline; + } + } + + .folder-selector-container { + position: absolute; + top: ~"calc(100% + 1px)"; + left: -1px; + width: 100%; + border: 1px solid @alto; + background: white; + z-index: 1; + transition: @transition; + overflow: hidden; + max-height: 0px; + box-shadow: none; + opacity: 0; + &.show { + max-height: 600px; + opacity: 1; + } + .inner-box { + box-sizing: border-box; + padding: 20px; + float: left; + width: 100%; + height: 100%; + .search { + float: left; + width: 100%; + border: 1px solid @alto; + position: relative; + .clear-button { + position: absolute; + right: 32px; + top: 50%; + height: 26px; + margin-top: -13px; + font-size: 26px; + line-height: 26px; + opacity: .5; + cursor: pointer; + &:hover { + opacity: 1; + } + } + .search-icon { + position: absolute; + right: 0px; + top: 50%; + transform: translate(0, -50%); + height: 24px; + color: @rollingStone; + } + input[type="text"] { + float: left; + border: none; + width: ~"calc(100% - 40px)"; + box-sizing: border-box; + outline: none !important; + padding: 0px !important; + box-shadow: none; + border: none !important; + margin-top: 3px; + margin-left: 5px; + } + } + .items { + float: left; + width: 100%; + border: 1px solid @alto; + height: 200px; + margin-top: 14px; + &, * { + .prefixes(user-select, none); + } + + .scrollArea { + height: 100% !important; + max-height: none !important; + + & > div:first-child{ + box-sizing: content-box; + padding-bottom: 17px; + height: 100%; + } + + .dnn-folders-component{ + div.has-children{ + top: 9px; + } + } + } + } + } + } +} + +.dnn-folders-component { + padding-top: 6px; + ul { + padding-left: 20px; + box-sizing: border-box; + li { + list-style: none; + position: relative; + float: left; + width: 100%; + margin-top: 0px; + & > div { + padding-top: 0px; + cursor: pointer; + float: left; + width: 100%; + padding-top: 4px; + &:hover { + color: @curiousBlue; + } + } + & > ul { + height: 0px; + overflow: hidden; + float: left; + width: 100%; + } + &.open { + & > ul { + height: auto; + } + & > .has-children { + transform: rotate(90Deg); + } + } + .icon { + width: 14px; + float: left; + margin-right: 5px; + height: 13px; + cursor: pointer; + } + .item-name { + cursor: pointer; + float: left; + width: ~"calc(100% - 30px)"; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + &.none-specified { + font-weight: bold; + } + } + .has-children { + position: absolute; + left: -15px; + top: 1px; + width: 10px; + height: 10px; + cursor: pointer; + transition: .18s; + &:after { + content: ""; + position: absolute; + left: 4px; + top: 1px; + width: 0; + height: 0; + border-top: 4px solid transparent; + border-bottom: 4px solid transparent; + border-left: 4px solid @rollingStone; + } + } + } + } + + padding-top: 6px; + ul { + padding-left: 20px; + box-sizing: border-box; + li { + list-style: none; + position: relative; + float: left; + width: 100%; + margin-top: 0px; + & > div { + padding-top: 0px; + cursor: pointer; + float: left; + width: 100%; + padding-top: 4px; + &:hover { + color: @curiousBlue; + } + } + & > ul { + height: 0px; + overflow: hidden; + float: left; + width: 100%; + } + &.open { + & > ul { + height: auto; + } + & > .has-children { + transform: rotate(90Deg); + } + } + .icon { + width: 14px; + float: left; + margin-right: 5px; + height: 13px; + cursor: pointer; + } + .item-name { + cursor: pointer; + float: left; + width: ~"calc(100% - 30px)"; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + &.none-specified { + font-weight: bold; + } + } + .has-children { + position: absolute; + left: -15px; + top: 1px; + width: 10px; + height: 10px; + cursor: pointer; + transition: .18s; + &:after { + content: ""; + position: absolute; + left: 4px; + top: 1px; + width: 0; + height: 0; + border-top: 4px solid transparent; + border-bottom: 4px solid transparent; + border-left: 4px solid @rollingStone; + } + } + } + } +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/Item.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/Item.jsx new file mode 100644 index 00000000000..1bf4faab8b5 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/Item.jsx @@ -0,0 +1,46 @@ +import React from "react"; +import PropTypes from "prop-types"; + +function truncateString(content, length) { + if (typeof length === "undefined") { + length = 13; + } + + return content.length <= length ? content : content.substr(0, length) + "..."; +} + +const Item = ({item, iconUrl, handlers, isHighlighted, isDetailed}) => ( +
      +
      +
      +
      +

      { truncateString(item.itemName) }

      +
      +
      +
      +
      +
      +
      + +
      + { handlers.onEdit ?
      : "" } + { handlers.onCopyToClipboard ?
      : "" } + { handlers.onDownload ?
      : "" } + { handlers.onMove ?
      : ""} + { handlers.onDelete ?
      : "" } +
      +
      + {isDetailed &&
      } +
      +); + +Item.propTypes = { + item: PropTypes.object.isRequired, + iconUrl: PropTypes.string.isRequired, + handlers: PropTypes.object.isRequired, + isHighlighted: PropTypes.bool, + isDetailed: PropTypes.bool +}; + +export default Item; diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/Permissions.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/Permissions.jsx new file mode 100644 index 00000000000..1d34801acb9 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/components/Permissions.jsx @@ -0,0 +1,57 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { bindActionCreators } from "redux"; +import { connect } from "react-redux"; +import { PermissionGrid } from "@dnnsoftware/dnn-react-common"; +import DnnSf from "../globals/dnnSf"; + +class Permissions extends React.Component { + constructor(props) { + super(props); + + this.state = { + permissions: JSON.parse( + JSON.stringify(props.folderBeingEdited.permissions) + ), + }; + } + + onPermissionsChanged(permissions) { + const { state } = this; + + let newPermissions = Object.assign({}, state.permissions, permissions); + this.props.updateFolderBeingEdited(newPermissions); + this.setState({ permissions: newPermissions }); + } + + render() { + const { state } = this; + const dnnSf = new DnnSf(); + const grid = ( + {}} + permissions={state.permissions} + service={dnnSf} + onPermissionsChanged={this.onPermissionsChanged.bind(this)} + /> + ); + return
      {grid}
      ; + } +} + +Permissions.propTypes = { + updateFolderBeingEdited: PropTypes.func, + folderBeingEdited: PropTypes.object, +}; + +function mapStateToProps() { + return {}; +} + +function mapDispatchToProps(dispatch) { + return { + ...bindActionCreators({}, dispatch), + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(Permissions); diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/AddAssetPanelContainer.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/AddAssetPanelContainer.jsx new file mode 100644 index 00000000000..8de7b06f21e --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/AddAssetPanelContainer.jsx @@ -0,0 +1,49 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { bindActionCreators } from "redux"; +import { connect } from "react-redux"; +import FileUpload from "../components/FileUpload"; +import localizeService from "../services/localizeService"; +import addAssetPanelActions from "../actions/addAssetPanelActions"; + +class AddAssetPanelContainer extends React.Component { + render() { + const { expanded, hasPermission, hidePanel } = this.props; + + return hasPermission ? ( + + ) : null; + } +} + +AddAssetPanelContainer.propTypes = { + expanded: PropTypes.bool, + hasPermission: PropTypes.bool, + hidePanel: PropTypes.func +}; + +function mapStateToProps(state) { + const addAssetPanelState = state.addAssetPanel; + const folderPanelState = state.folderPanel; + + return { + expanded: addAssetPanelState.expanded, + hasPermission: folderPanelState.hasAddFilesPermission + }; +} + +function mapDispatchToProps(dispatch) { + return { + ...bindActionCreators({ + hidePanel: addAssetPanelActions.hidePanel + }, dispatch) + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(AddAssetPanelContainer); \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/AddFolderPanelContainer.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/AddFolderPanelContainer.jsx new file mode 100644 index 00000000000..83f1bcc04e3 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/AddFolderPanelContainer.jsx @@ -0,0 +1,173 @@ +import React from "react"; +import { PropTypes } from "prop-types"; +import { bindActionCreators } from "redux"; +import { connect } from "react-redux"; +import localizeService from "../services/localizeService"; +import addFolderPanelActions from "../actions/addFolderPanelActions"; +import DropDown from "../../../../../../Dnn.AdminExperience/ClientSide/Dnn.React.Common/src/Dropdown"; + +class AddFolderPanelContainer extends React.Component { + constructor(props) { + super(props); + this.props.loadFolderMappings(); + this.nameInput = React.createRef(); + this.container = React.createRef(); + } + + componentDidUpdate(previousProps) { + if (!previousProps.expanded && this.props.expanded) { + this.nameInput.focus(); + + // Workaround so the dropdown shows properly with more than 3 folder providers + setTimeout(() => { + this.container.style = "overflow: visible;"; + }, 1000); + } + if (previousProps.expanded && !this.props.expanded) { + this.container.style = "overflow: hidden;"; + } + } + + getParentFolderName() { + const {currentFolderId, currentFolderName, homeFolderId} = this.props.folderPanelState; + + if (currentFolderId === homeFolderId) { + return "HOME"; + } + + return currentFolderName; + } + + render() { + const { expanded, hasPermission, hidePanel, folderTypes, formData, validationErrors, folderPanelState, + changeName, changeFolderType, addFolder, setValidationErrors } = this.props; + + let localizedFolderTypes = folderTypes ? folderTypes.map(obj => + { + let label = localizeService.getString(obj.MappingName); + return { label, value: obj.FolderMappingID }; + }) : undefined; + + let nameValidationError = validationErrors ? validationErrors.name : ""; + let typeValidationError = validationErrors ? validationErrors.type : ""; + + function onSelectChange(option) { + changeFolderType.call(this, option.value); + } + + function formSubmit() { + if (!validateForm()) { + return; + } + + let data = { + formData, + folderPanelState + }; + + addFolder(data); + } + + function validateForm() { + let result = true; + let validationErrors = {}; + + if (!formData.name) { + validationErrors.name = localizeService.getString("FolderNameRequiredMessage"); + result = false; + } + + if (!formData.folderType) { + validationErrors.type = localizeService.getString("FolderTypeRequiredMessage"); + result = false; + } + + setValidationErrors(validationErrors); + + return result; + } + + return hasPermission ? ( +
      this.container = e} className={"top-panel add-folder" + (expanded ? " rm-expanded" : "")} > +
      +
      + + { "/" + this.getParentFolderName() } +
      +
      + + { this.nameInput = input; }} /> + + +
      + { + folderPanelState.folder.folderPath === "" && +
      + + + +
      + } +
      + + + + + +
      +
      + ) : null; + } +} + +AddFolderPanelContainer.propTypes = { + expanded: PropTypes.bool, + hasPermission: PropTypes.bool, + hidePanel: PropTypes.func, + loadFolderMappings: PropTypes.func, + folderTypes: PropTypes.array, + validationErrors: PropTypes.object, + formData: PropTypes.object, + folderPanelState: PropTypes.object, + changeName: PropTypes.func, + changeFolderType: PropTypes.func, + addFolder: PropTypes.func, + setValidationErrors: PropTypes.func +}; + +function mapStateToProps(state) { + const folderPanelState = state.folderPanel; + const addFolderPanelState = state.addFolderPanel; + + return { + expanded: addFolderPanelState.expanded, + hasPermission: folderPanelState.hasAddFoldersPermission, + folderTypes: addFolderPanelState.folderMappings, + formData: addFolderPanelState.formData || {}, + validationErrors: addFolderPanelState.validationErrors, + folderPanelState + }; +} + +function mapDispatchToProps(dispatch) { + return { + ...bindActionCreators({ + hidePanel: addFolderPanelActions.hidePanel, + loadFolderMappings: addFolderPanelActions.loadFolderMappings, + changeName: addFolderPanelActions.changeName, + changeFolderType: addFolderPanelActions.changeFolderType, + addFolder: addFolderPanelActions.addFolder, + setValidationErrors: addFolderPanelActions.setValidationErrors + }, dispatch) + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(AddFolderPanelContainer); \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/AssetsPanelContainer.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/AssetsPanelContainer.jsx new file mode 100644 index 00000000000..ee1ea7707ed --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/AssetsPanelContainer.jsx @@ -0,0 +1,224 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { connect } from "react-redux"; +import { bindActionCreators } from "redux"; +import AssetsHeader from "../components/AssetsHeader"; +import folderPanelActions from "../actions/folderPanelActions"; +import ManageFolderTypesContainer from "../containers/ManageFolderTypesPanelContainer"; +import AddFolderPanelContainer from "../containers/AddFolderPanelContainer"; +import AddAssetPanelContainer from "../containers/AddAssetPanelContainer"; +import TopBarContainer from "./TopBarContainer"; +import Item from "../containers/ItemContainer"; +import ItemDetailsContainer from "../containers/ItemDetailsContainer"; +import ItemMoveContainer from "../containers/ItemMoveContainer"; +import localizeService from "../services/localizeService.js"; +import ReactCSSTransitionGroup from "react-transition-group/CSSTransitionGroup"; + +class AssetsPanelContainer extends React.Component { + constructor(props) { + super(props); + this.mainContainer = React.createRef(); + } + componentWillMount() { + window.addEventListener("scroll", this.handleScroll.bind(this)); + } + + getDetailsPosition(i) { + const itemWidth = this.props.itemWidth; + const container = this.mainContainer; + const containerWidth = container.clientWidth; + const itemsPerRow = Math.floor(containerWidth / itemWidth); + let position = Math.floor(i / itemsPerRow) * itemsPerRow + itemsPerRow - 1; + + return position; + } + + getDetailsPanel(showPanel, i) { + return ( + + {showPanel && } + + ); + } + + getMovePanel(showPanel, i) { + return ( + + {showPanel && } + + ); + } + + handleScroll() { + const { folderPanelState, loadContent, searchFiles } = this.props; + const { totalCount, loadedItems, search, loading } = folderPanelState; + + const bodyHeight = document.body.offsetHeight; + const windowHeight = window.innerHeight; + const totalScrolled = window.pageYOffset; + const scrollMax = bodyHeight - windowHeight; + + if (loadedItems < totalCount && totalScrolled + 100 > scrollMax) { + if (!loading) { + this.setState({ + loadingFlag: true, + }); + + if (search) { + searchFiles(folderPanelState, search, true); + } else { + loadContent(folderPanelState); + } + } + } + } + + render() { + const { + items, + itemEditing, + itemMoving, + search, + itemContainerDisabled, + loading, + } = this.props; + let propsPosition = -1; + + let result = []; + for (let i = 0; i < items.length; i++) { + const item = items[i]; + const { itemId, itemName, isFolder } = item; + result.push(); + + if ( itemEditing && + ( + (isFolder && itemEditing.folderId === itemId) || + (!isFolder && itemEditing.fileId === itemId) + ) + ) { + propsPosition = this.getDetailsPosition(i); + } + + if ( itemMoving && + ( + (isFolder && itemMoving.folderId === itemId) || + (!isFolder && itemMoving.fileId === itemId) + ) + ) { + propsPosition = this.getDetailsPosition(i); + } + + let showPanel = + i === propsPosition || + (propsPosition >= items.length && i === items.length - 1); + if (itemEditing){ + result.push(this.getDetailsPanel(showPanel, i)); + } + + if (itemMoving) { + result.push(this.getMovePanel(showPanel, i)); + } + } + + return ( +
      e.stopPropagation()}> + +
      + +
      (this.mainContainer = c)} + className={"main-container" + (loading ? " loading" : "")} + > + + + +
      + {result} +
      + + {localizeService.getString("AssetsPanelNoSearchResults")} + +
      +
      + + {localizeService.getString("AssetsPanelEmpty_Title")} + + + {localizeService.getString("AssetsPanelEmpty_Subtitle")} + +
      +
      +
      +
      +
      + ); + } +} + +AssetsPanelContainer.propTypes = { + folderPanelState: PropTypes.object, + items: PropTypes.array, + search: PropTypes.string, + itemContainerDisabled: PropTypes.bool, + loading: PropTypes.bool, + itemEditing: PropTypes.object, + itemMoving: PropTypes.object, + itemWidth: PropTypes.number, + loadContent: PropTypes.func, + searchFiles: PropTypes.func, +}; + +function mapDispatchToProps(dispatch) { + return { + ...bindActionCreators( + { + loadContent: folderPanelActions.loadContent, + searchFiles: folderPanelActions.searchFiles, + }, + dispatch + ), + }; +} + +function mapStateToProps(state) { + const folderPanelState = state.folderPanel; + const addFolderPanelState = state.addFolderPanel; + const addAssetPanelState = state.addAssetPanel; + const itemDetailsState = state.itemDetails; + + return { + folderPanelState, + items: folderPanelState.items || [], + search: folderPanelState.search, + itemContainerDisabled: + addFolderPanelState.expanded || addAssetPanelState.expanded, + loading: folderPanelState.loading, + itemEditing: itemDetailsState.itemEditing, + itemMoving: itemDetailsState.itemMoving, + itemWidth: folderPanelState.itemWidth, + }; +} + +export default connect( + mapStateToProps, + mapDispatchToProps +)(AssetsPanelContainer); diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/BreadcrumbsContainer.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/BreadcrumbsContainer.jsx new file mode 100644 index 00000000000..8c6a6db0ec9 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/BreadcrumbsContainer.jsx @@ -0,0 +1,65 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { bindActionCreators } from "redux"; +import { connect } from "react-redux"; +import Breadcrumb from "../components/Breadcrumb"; +import folderPanelActions from "../actions/folderPanelActions"; +import localizeService from "../services/localizeService"; + +class BreadcrumbsContainer extends React.Component { + render() { + const { breadcrumbs, loadContent, folderPanelState } = this.props; + const search = folderPanelState.search; + + let result = []; + let folderId; + + if (breadcrumbs[0]) { + folderId = breadcrumbs[0].folderId; + } + result.push(); + for (let i = 1; i"); + result.push(); + } + + if (search) { + result.push(">"); + result.push(); + } + + return ( +
      + { result } +
      + ); + } +} + +BreadcrumbsContainer.propTypes = { + breadcrumbs: PropTypes.array, + loadContent: PropTypes.func, + folderPanelState: PropTypes.object +}; + +function mapStateToProps(state) { + const breadcrumbsState = state.breadcrumbs; + const folderPanelState = state.folderPanel; + + return { + breadcrumbs: breadcrumbsState.breadcrumbs || [], + folderPanelState + }; +} + +function mapDispatchToProps(dispatch) { + return { + ...bindActionCreators({ + loadContent: folderPanelActions.loadContent + }, dispatch) + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(BreadcrumbsContainer); \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ButtonsContainer.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ButtonsContainer.jsx new file mode 100644 index 00000000000..80258fb3244 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ButtonsContainer.jsx @@ -0,0 +1,55 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { bindActionCreators } from "redux"; +import { connect } from "react-redux"; +import localizeService from "../services/localizeService.js"; +import manageFolderTypesPanelActions from "../actions/manageFolderTypesPanelActions"; +import addFolderPanelActions from "../actions/addFolderPanelActions"; +import addAssetPanelActions from "../actions/addAssetPanelActions"; + +class ButtonsContainer extends React.Component { + render() { + const { hasManageFolderTypesPermission, hasAddFilesPermission, hasAddFoldersPermission, showAddFolderPanel, showAddAssetPanel, showManageFolderTypesPanel } = this.props; + + return ( +
      +
      + { hasManageFolderTypesPermission ? { localizeService.getString("ManageFolderTypes") } : null } + { hasAddFoldersPermission ? { localizeService.getString("AddFolder") } : null } + { hasAddFilesPermission ? { localizeService.getString("AddAsset") } : null } +
      +
      + ); + } +} + +ButtonsContainer.propTypes = { + showManageFolderTypesPanel: PropTypes.func, + showAddFolderPanel: PropTypes.func, + showAddAssetPanel: PropTypes.func, + hasManageFolderTypesPermission: PropTypes.bool, + hasAddFilesPermission: PropTypes.bool, + hasAddFoldersPermission: PropTypes.bool +}; + +function mapDispatchToProps(dispatch) { + return { + ...bindActionCreators({ + showManageFolderTypesPanel: manageFolderTypesPanelActions.showPanel, + showAddFolderPanel: addFolderPanelActions.showPanel, + showAddAssetPanel: addAssetPanelActions.showPanel + }, dispatch) + }; +} + +function mapStateToProps(state) { + const folderPanelState = state.folderPanel; + const moduleState = state.module; + return { + hasManageFolderTypesPermission: moduleState.isAdmin, + hasAddFilesPermission: folderPanelState.hasAddFilesPermission, + hasAddFoldersPermission: folderPanelState.hasAddFoldersPermission + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(ButtonsContainer); \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/DevTools.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/DevTools.js new file mode 100644 index 00000000000..89ffa86bf64 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/DevTools.js @@ -0,0 +1,11 @@ +import React from "react"; +import { createDevTools } from "redux-devtools"; +import LogMonitor from "redux-devtools-log-monitor"; +import DockMonitor from "redux-devtools-dock-monitor"; + +export default createDevTools( + + + +); diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/DialogModalContainer.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/DialogModalContainer.jsx new file mode 100644 index 00000000000..0dfb455f9b6 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/DialogModalContainer.jsx @@ -0,0 +1,76 @@ +import React from "react"; +import { PropTypes } from "prop-types"; +import { bindActionCreators } from "redux"; +import { connect } from "react-redux"; +import dialogModalActions from "../actions/dialogModalActions"; +import Modal from "../../../../../../Dnn.AdminExperience/ClientSide/Dnn.React.Common/src/Modal"; +import Label from "../../../../../../Dnn.AdminExperience/ClientSide/Dnn.React.Common/src/Label"; + +class DialogModalContainer extends React.Component { + render() { + const modalStyles = { + overlay: { + zIndex: "99999", + backgroundColor: "rgba(0,0,0,0.6)" + }, + content: { + borderRadius: "7px", + "background": "white", + WebkitBoxShadow: "0 0 25px 0 rgba(0, 0, 0, 0.75)", + boxShadow: "0 0 25px 0 rgba(0, 0, 0, 0.75)", + textAlign: "center", + "width": "300px", + height: "178px", + margin: "auto", + padding: 0, + border: "none", + boxSizing: "border-box" + } + }; + + const { dialogHeader, dialogMessage, close, yesFunction, noFunction } = this.props; + + function yesHandler() { + close(); + yesFunction(); + } + + return ( + + + ); + } +} + +DialogModalContainer.propTypes = { + dialogHeader: PropTypes.string, + dialogMessage: PropTypes.string, + close: PropTypes.func.isRequired, + yesFunction: PropTypes.func, + noFunction: PropTypes.func +}; + +function mapStateToProps(state) { + const dialogModalState = state.dialogModal; + return { + dialogHeader: dialogModalState.dialogHeader, + dialogMessage: dialogModalState.dialogMessage, + yesFunction: dialogModalState.yesFunction, + noFunction: dialogModalState.noFunction + }; +} + +function mapDispatchToProps(dispatch) { + return { + ...bindActionCreators({ + close: dialogModalActions.close + }, dispatch) + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(DialogModalContainer); diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/DropZoneContainer.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/DropZoneContainer.jsx new file mode 100644 index 00000000000..043151329c6 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/DropZoneContainer.jsx @@ -0,0 +1,126 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { bindActionCreators } from "redux"; +import { connect } from "react-redux"; +import DropZone from "react-dropzone"; +import addAssetPanelActions from "../actions/addAssetPanelActions"; +import api from "../globals/api"; + +class DropZoneContainer extends React.Component { + validateFile(file) { + const { + maxUploadSize, + maxFileUploadSizeHumanReadable, + fileSizeError, + invalidExtensionError, + } = this.props; + + if (file.size > maxUploadSize) { + fileSizeError(file.name, maxFileUploadSizeHumanReadable); + return false; + } + + const validExtensions = api + .getWhitelistObject() + .extensionWhitelist.split(","); + const ext = file.name.substr(file.name.lastIndexOf(".") + 1); + let valid = false; + for (let i = 0; i < validExtensions.length; i++) { + const extension = validExtensions[i]; + if (extension !== ext) continue; + valid = true; + break; + } + + if (!valid) { + invalidExtensionError(file.name); + return false; + } + + return true; + } + + uploadFilesHandler(acceptedFiles) { + const { + showPanel, + folderPanelState, + trackProgress, + uploadFiles, + } = this.props; + showPanel(); + const validFiles = acceptedFiles.filter(this.validateFile.bind(this)); + uploadFiles( + validFiles, + this.getFolderPath(), + folderPanelState, + trackProgress + ); + } + + getFolderPath() { + const { folder } = this.props.folderPanelState; + return folder ? folder.folderPath : ""; + } + + render() { + const { hasPermission, style, activeStyle, className } = this.props; + return hasPermission ? ( + + {() => this.props.children} + + ) : ( +
      {this.props.children}
      + ); + } +} + +DropZoneContainer.propTypes = { + children: PropTypes.node, + disableClick: PropTypes.bool, + className: PropTypes.string, + style: PropTypes.any, + activeStyle: PropTypes.any, + folderPanelState: PropTypes.object, + hasPermission: PropTypes.bool, + showPanel: PropTypes.func, + uploadFiles: PropTypes.func, + trackProgress: PropTypes.func, + maxUploadSize: PropTypes.number, + maxFileUploadSizeHumanReadable: PropTypes.string, + fileSizeError: PropTypes.func, + invalidExtensionError: PropTypes.func, +}; + +function mapStateToProps(state) { + const folderPanelState = state.folderPanel; + const moduleState = state.module; + + return { + folderPanelState, + maxUploadSize: moduleState.maxUploadSize, + maxFileUploadSizeHumanReadable: moduleState.maxFileUploadSizeHumanReadable, + hasPermission: folderPanelState.hasAddFilesPermission, + }; +} + +function mapDispatchToProps(dispatch) { + return { + ...bindActionCreators( + { + showPanel: addAssetPanelActions.showPanel, + uploadFiles: addAssetPanelActions.uploadFiles, + trackProgress: addAssetPanelActions.trackProgress, + fileSizeError: addAssetPanelActions.fileSizeError, + invalidExtensionError: addAssetPanelActions.invalidExtensionError, + }, + dispatch + ), + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(DropZoneContainer); diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ItemContainer.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ItemContainer.jsx new file mode 100644 index 00000000000..23b4c8a97de --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ItemContainer.jsx @@ -0,0 +1,176 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { bindActionCreators } from "redux"; +import { connect } from "react-redux"; +import folderPanelActions from "../actions/folderPanelActions"; +import itemDetailsActions from "../actions/itemDetailsActions"; +import dialogModalActions from "../actions/dialogModalActions"; +import Item from "../components/Item"; +import itemsService from "../services/itemsService"; +import localizeService from "../services/localizeService"; + +class ItemContainer extends React.Component { + render() { + const { item, itemEditing, loadContent, editItem, moveItem, downloadFile, deleteFolder, + deleteFile, copyFileUrlToClipboard, openDialog, closeDialog, + folderPanelState, uploadedFiles, newFolderId } = this.props; + const isFolder = item.isFolder; + const { hasDeletePermission, hasManagePermission } = folderPanelState; + + function isHighlighted() { + if (isFolder && newFolderId === item.itemId) { + return true; + } + + if (!isFolder) { + for (let i = 0; i < uploadedFiles.length; i++) { + if (uploadedFiles[i].fileId === item.itemId) { + return true; + } + } + } + + return false; + } + + function getIconUrl() { + return itemsService.getIconUrl(item); + } + + function onClickFolder() { + if (!isFolder) { + return; + } + + loadContent(folderPanelState, item.itemId); + } + + function onEditItem(item, event) { + event.stopPropagation(); + editItem(item); + } + + function onDeleteFolder(event) { + event.stopPropagation(); + if (!isFolder) { + return; + } + + const dialogHeader = localizeService.getString("DeleteFolderDialogHeader"); + const dialogMessage = localizeService.getString("DeleteFolderDialogMessage"); + const yesFunction = deleteFolder.bind(this, item.itemId, folderPanelState); + const noFunction = closeDialog; + + openDialog(dialogHeader, dialogMessage, yesFunction, noFunction); + } + + function onMoveFolder(item, event) { + event.stopPropagation(); + if (!isFolder) { + return; + } + + moveItem(item); + } + + function onMoveFile(item, event) { + event.stopPropagation(); + if(isFolder) { + return; + } + + moveItem(item); + } + + function onDeleteFile(event) { + event.stopPropagation(); + if (isFolder) { + return; + } + + const dialogHeader = localizeService.getString("DeleteFileDialogHeader"); + const dialogMessage = localizeService.getString("DeleteFileDialogMessage"); + const yesFunction = deleteFile.bind(this, item.itemId, folderPanelState); + const noFunction = closeDialog; + + openDialog(dialogHeader, dialogMessage, yesFunction, noFunction); + } + + function isDetailed() { + if (!itemEditing) { + return false; + } + + const {isFolder, fileId, folderId} = itemEditing; + + if ((isFolder && folderId === item.itemId) || + (!isFolder && fileId === item.itemId)) { + return true; + } + + return false; + } + + const handlers = { + onClick: isFolder ? onClickFolder : null, + onEdit: hasManagePermission ? onEditItem.bind(this, item) : null, + onCopyToClipboard: isFolder ? null : copyFileUrlToClipboard.bind(this, item), + onDownload: isFolder ? null : downloadFile.bind(this, item.itemId), + onMove: (hasManagePermission && hasDeletePermission) ? isFolder ? onMoveFolder.bind(this, item) : onMoveFile.bind(this, item) : null, + onDelete: hasDeletePermission ? isFolder ? onDeleteFolder : onDeleteFile : null + }; + + return ( + + ); + } +} + +ItemContainer.propTypes = { + item: PropTypes.object, + loadContent: PropTypes.func, + editItem: PropTypes.func, + moveItem: PropTypes.func, + downloadFile: PropTypes.func, + deleteFolder: PropTypes.func, + deleteFile: PropTypes.func, + copyFileUrlToClipboard: PropTypes.func, + openDialog: PropTypes.func, + closeDialog: PropTypes.func, + folderPanelState: PropTypes.object, + uploadedFiles: PropTypes.array, + newFolderId: PropTypes.number, + itemEditing: PropTypes.object +}; + +function mapStateToProps(state) { + const folderPanelState = state.folderPanel; + const addAssetPanelState = state.addAssetPanel; + const addFolderPanelState = state.addFolderPanel; + const itemDetailsState = state.itemDetails; + + return { + folderPanelState, + uploadedFiles: addAssetPanelState.uploadedFiles, + newFolderId: addFolderPanelState.newFolderId, + itemEditing: itemDetailsState.itemEditing + }; +} + +function mapDispatchToProps(dispatch) { + return { + ...bindActionCreators({ + loadContent: folderPanelActions.loadContent, + editItem: itemDetailsActions.editItem, + moveItem: itemDetailsActions.moveItem, + downloadFile: folderPanelActions.downloadFile, + deleteFolder: folderPanelActions.deleteFolder, + deleteFile: folderPanelActions.deleteFile, + copyFileUrlToClipboard: folderPanelActions.copyFileUrlToClipboard, + openDialog: dialogModalActions.open, + closeDialog: dialogModalActions.close + }, dispatch) + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(ItemContainer); \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ItemDetailsContainer.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ItemDetailsContainer.jsx new file mode 100644 index 00000000000..6afa215c5c0 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ItemDetailsContainer.jsx @@ -0,0 +1,95 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { bindActionCreators } from "redux"; +import { connect } from "react-redux"; +import itemDetailsActions from "../actions/itemDetailsActions"; +import FolderDetails from "../components/FolderDetails"; +import FileDetails from "../components/FileDetails"; +import itemService from "../services/itemsService"; +import localizeService from "../services/localizeService"; + +class ItemDetailsContainer extends React.Component { + constructor(props) { + super(props); + } + + validateForm() { + const {itemEditing, setValidationErrors} = this.props; + let result = true; + let validationErrors = {}; + + if ((!itemEditing.isFolder && !itemEditing.fileName) || (itemEditing.isFolder && !itemEditing.folderName)) { + validationErrors.fileName = localizeService.getString("ItemNameRequiredMessage"); + result = false; + } + + setValidationErrors(validationErrors); + return result; + } + formSubmit() { + if (!this.validateForm()) { + return; + } + + const {itemEditing, saveItem} = this.props; + saveItem(itemEditing); + } + render() { + const {itemEditing, cancelEditItem, + changeName, changeTitle, changeDescription, changePermissions} = this.props; + const onSave = this.formSubmit.bind(this); + const handlers = {changeName, changeTitle, changeDescription, changePermissions, cancelEditItem, onSave}; + let fileName, folderName, title, description; + fileName = folderName = title = description = ""; + let item = {fileName, folderName, title, description}; + const isFolder = itemEditing ? itemEditing.isFolder : false; + const validationErrors = this.props.validationErrors || {}; + + if (itemEditing) { + let iconStyle = {backgroundImage: "url('" + itemService.getIconUrl(itemEditing) + "')"}; + item = {...itemEditing, iconStyle}; + } + + return ( + isFolder ? + : + + ); + } +} + +ItemDetailsContainer.propTypes = { + itemEditing: PropTypes.object, + cancelEditItem: PropTypes.func, + changeName: PropTypes.func, + changeTitle: PropTypes.func, + changeDescription: PropTypes.func, + changePermissions: PropTypes.func, + saveItem: PropTypes.func, + setValidationErrors: PropTypes.func, + validationErrors: PropTypes.object +}; + +function mapStateToProps(state) { + const itemDetailsState = state.itemDetails; + return { + itemEditing: itemDetailsState.itemEditing, + validationErrors: itemDetailsState.validationErrors + }; +} + +function mapDispatchToProps(dispatch) { + return { + ...bindActionCreators({ + cancelEditItem: itemDetailsActions.cancelEditItem, + changeName: itemDetailsActions.changeName, + changeTitle: itemDetailsActions.changeTitle, + changeDescription: itemDetailsActions.changeDescription, + changePermissions: itemDetailsActions.changePermissions, + saveItem: itemDetailsActions.saveItem, + setValidationErrors: itemDetailsActions.setValidationErrors + }, dispatch) + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(ItemDetailsContainer); diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ItemMoveContainer.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ItemMoveContainer.jsx new file mode 100644 index 00000000000..fd452473a01 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ItemMoveContainer.jsx @@ -0,0 +1,107 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { bindActionCreators } from "redux"; +import { connect } from "react-redux"; +import itemDetailsActions from "../actions/itemDetailsActions"; +import localizeService from "../services/localizeService"; +import FolderPicker from "../components/FolderSelector/FolderPicker" +import folderPanelActions from "../actions/folderPanelActions"; + +class ItemMoveContainer extends React.Component { + constructor(props) { + super(props); + this.state = { + selectedFolderId: this.props.folderPanelState.currentFolderId, + selectedFolderName: this.props.folderPanelState.currentFolderName, + }; + } + + handleFolderChange(e){ + this.setState({ + ...this.state, + selectedFolderId: e.key, + selectedFolderName: e.value, + }); + } + + handleItemMove(){ + if (this.state.selectedFolderId === this.props.folderPanelState.currentFolderId){ + this.props.cancelMoveItem(); + return; + } + + if (this.props.itemMoving.isFolder){ + this.props.moveFolder(this.props.itemMoving.folderId, this.state.selectedFolderId); + } + else { + this.props.moveFile(this.props.itemMoving.fileId, this.state.selectedFolderId); + } + } + + componentWillUnmount(){ + this.props.loadContent(this.props.folderPanelState, this.state.selectedFolderId); + } + + render() { + const { cancelMoveItem, homeFolderId } = this.props; + return ( +
      +

      {localizeService.getString("MoveItem")}

      + +
      + + this.handleFolderChange(e)} + homeFolderId={homeFolderId} + noFolderSelectedValue={localizeService.getString("NoFolderSelected")} + searchFolderPlaceHolder={localizeService.getString("SearchFolder")} + /> +
      + +
      + + +
      +
      + ); + } +} + +ItemMoveContainer.propTypes = { + itemMoving: PropTypes.object, + cancelMoveItem: PropTypes.func, + moveItem: PropTypes.func, + moveFolder: PropTypes.func, + moveFile: PropTypes.func, + loadContent: PropTypes.func, + folderPanelState: PropTypes.object, + homeFolderId: PropTypes.number, +}; + +function mapStateToProps(state) { + const itemDetailsState = state.itemDetails; + return { + folderPanelState: state.folderPanel, + itemMoving: itemDetailsState.itemMoving, + homeFolderId: state.module.homeFolderId, + }; +} + +function mapDispatchToProps(dispatch) { + return { + ...bindActionCreators({ + cancelMoveItem: itemDetailsActions.cancelMoveItem, + moveItem: itemDetailsActions.moveItem, + moveFolder: itemDetailsActions.moveFolder, + moveFile: itemDetailsActions.moveFile, + loadContent: folderPanelActions.loadContent, + }, dispatch) + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(ItemMoveContainer); diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ManageFolderTypesPanelContainer.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ManageFolderTypesPanelContainer.jsx new file mode 100644 index 00000000000..4c69a4f981a --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ManageFolderTypesPanelContainer.jsx @@ -0,0 +1,143 @@ +import React from "react"; +import { PropTypes } from "prop-types"; +import { bindActionCreators } from "redux"; +import { connect } from "react-redux"; +import localizeService from "../services/localizeService"; +import manageFolderTypesPanelActions from "../actions/manageFolderTypesPanelActions"; +import { SvgIcons } from "@dnnsoftware/dnn-react-common"; +import addFolderPanelActions from "../actions/addFolderPanelActions"; +import dialogModalActions from "../actions/dialogModalActions"; + +class ManageFolderTypesPanelContainer extends React.Component { + constructor(props) { + super(props); + this.props.loadFolderMappings(); + if (props.isAdmin){ + this.props.getAddFolderTypeUrl(); + } + } + + handleConfirmRemoveFolderType(e, folderTypeMappingId) { + e.preventDefault(); + let dialogHeader = localizeService.getString("RemoveFolderTypeDialogHeader"); + let dialogBody = localizeService.getString("RemoveFolderTypeDialogBody"); + this.props.openDialog(dialogHeader, dialogBody, () => this.handleRemoveFolderType(folderTypeMappingId), this.props.closeDialog); + } + + handleRemoveFolderType(folderTypeMappingId) { + this.props.removeFolderType(folderTypeMappingId); + this.props.loadFolderMappings(); + } + + render() { + const { + expanded, + hidePanel, + folderTypes, + isAdmin, + addFolderTypeUrl, + } = this.props; + + return isAdmin && expanded ? ( +
      +

      {localizeService.getString("FolderTypeDefinitions")}

      + + + + + + + + + + + {folderTypes && folderTypes.map(folderType => { + return ( + + + + + + + ); + })} + +
       {localizeService.getString("Name")}{localizeService.getString("FolderProvider")} 
      + {!folderType.IsDefault && + + } + {folderType.MappingName}{folderType.FolderProviderType} + {!folderType.IsDefault && +
      + + + + + +
      +
      + ) : null; + } +} + +ManageFolderTypesPanelContainer.propTypes = { + expanded: PropTypes.bool, + hidePanel: PropTypes.func, + folderTypes: PropTypes.array, + isAdmin: PropTypes.bool, + loadFolderMappings: PropTypes.func, + removeFolderType: PropTypes.func, + openDialog: PropTypes.func, + closeDialog: PropTypes.func, + getAddFolderTypeUrl: PropTypes.func, + addFolderTypeUrl: PropTypes.string, +}; + +function mapStateToProps(state) { + const folderPanelState = state.folderPanel; + const manageFolderTypesPanelState = state.manageFolderTypesPanel; + const addFolderPanelState = state.addFolderPanel; + const module = state.module; + + return { + expanded: manageFolderTypesPanelState.expanded, + isAdmin: module.isAdmin, + folderTypes: addFolderPanelState.folderMappings, + addFolderTypeUrl: manageFolderTypesPanelState.addFolderTypeUrl, + folderPanelState + }; +} + +function mapDispatchToProps(dispatch) { + return { + ...bindActionCreators({ + hidePanel: manageFolderTypesPanelActions.hidePanel, + loadFolderMappings: addFolderPanelActions.loadFolderMappings, + removeFolderType: manageFolderTypesPanelActions.removeFolderType, + openDialog: dialogModalActions.open, + closeDialog: dialogModalActions.close, + getAddFolderTypeUrl: manageFolderTypesPanelActions.getAddFolderTypeUrl, + }, dispatch) + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(ManageFolderTypesPanelContainer); \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/MessageModalContainer.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/MessageModalContainer.jsx new file mode 100644 index 00000000000..55c5052ba9e --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/MessageModalContainer.jsx @@ -0,0 +1,78 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { bindActionCreators } from "redux"; +import { connect } from "react-redux"; +import messageModalActions from "../actions/messageModalActions"; +import Modal from "../../../../../../Dnn.AdminExperience/ClientSide/Dnn.React.Common/src/Modal"; + + +class MessageModalContainer extends React.Component { + render() { + const modalStyles = { + overlay: { + zIndex: "99999", + "background": "none" + }, + content: { + borderRadius: "3px", + color: "white", + textAlign: "center", + background: "#002e47", + opacity: ".9", + WebkitBoxShadow: "0 0 25px 0 rgba(0, 0, 0, 0.75)", + width: "10%", + minWidth: "250px", + minHeight: "80px", + maxHeight: "120px", + margin: "auto", + padding: 0, + border: "none", + boxSizing: "border-box" + } + }; + + const { infoMessage, errorMessage, close } = this.props; + const messageToShow = infoMessage || errorMessage; + + function setTimeOutToClose() { + setTimeout(function () { + close(); + }, 3000); + } + + if (messageToShow) + { + setTimeOutToClose(); + } + + return ( + +

      {messageToShow}

      +
      + ); + } +} + +MessageModalContainer.propTypes = { + infoMessage: PropTypes.string, + errorMessage: PropTypes.string, + close: PropTypes.func.isRequired +}; + +function mapStateToProps(state) { + const messageModalState = state.messageModal; + return { + infoMessage: messageModalState.infoMessage, + errorMessage: messageModalState.errorMessage + }; +} + +function mapDispatchToProps(dispatch) { + return { + ...bindActionCreators({ + close: messageModalActions.close + }, dispatch) + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(MessageModalContainer); diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ModuleLayout.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ModuleLayout.jsx new file mode 100644 index 00000000000..6ee59723c19 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ModuleLayout.jsx @@ -0,0 +1,62 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { bindActionCreators } from "redux"; +import { connect } from "react-redux"; +import folderPanelActions from "../actions/folderPanelActions"; +import AssetsPanelContainer from "./AssetsPanelContainer"; +import DialogModalContainer from "./DialogModalContainer"; +import MessageModalContainer from "./MessageModalContainer"; +import DropZone from "../containers/DropZoneContainer"; + +class ModuleLayout extends React.Component { + componentDidMount() { + const { folderPanelState, loadContent } = this.props; + this.props.loadContent(folderPanelState); + + window.addEventListener("popstate", + event => { + const state = event.state; + if (state && state.folderId) { + loadContent(folderPanelState, state.folderId); + } + else { + loadContent(folderPanelState, folderPanelState.homeFolderId); + } + } + ); + } + + render() { + return ( +
      + + + + + +
      + ); + } +} + +ModuleLayout.propTypes = { + loadContent: PropTypes.func, + folderPanelState: PropTypes.object +}; + +function mapStateToProps(state) { + const folderPanelState = state.folderPanel; + return { + folderPanelState + }; +} + +function mapDispatchToProps(dispatch) { + return { + ...bindActionCreators({ + loadContent: folderPanelActions.loadContent + }, dispatch) + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(ModuleLayout); diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ProgressBarOverwriteContainer.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ProgressBarOverwriteContainer.jsx new file mode 100644 index 00000000000..c0f766954b7 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ProgressBarOverwriteContainer.jsx @@ -0,0 +1,71 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { bindActionCreators } from "redux"; +import { connect } from "react-redux"; +import addAssetPanelActions from "../actions/addAssetPanelActions"; +import localizeService from "../services/localizeService.js"; + +class ProgressBarOverwriteContainer extends React.Component { + render() { + const {fileName, folderPanelState, overwriteFile, stopUpload, trackProgress, breadcrumbs} = this.props; + + function getFolderPath() { + let path = ""; + for (let i = 1; i < breadcrumbs.length; i++) { + path += breadcrumbs[i].folderName + "/"; + } + + return path; + } + + function overwriteClickHandler() { + overwriteFile(fileName, getFolderPath(), folderPanelState, trackProgress, true); + } + + function abortClickHandler() { + stopUpload(fileName); + } + + return ( + + + {localizeService.getString("Replace")} + {localizeService.getString("Keep")} + + ); + } +} + +ProgressBarOverwriteContainer.propTypes = { + fileName: PropTypes.string, + breadcrumbs: PropTypes.array, + file: PropTypes.object, + folderPanelState: PropTypes.object, + overwriteFile: PropTypes.func, + stopUpload: PropTypes.func, + trackProgress: PropTypes.func, + progress: PropTypes.object +}; + +function mapStateToProps(state) { + const folderPanelState = state.folderPanel; + const breadcrumbsState = state.breadcrumbs; + + return { + folderPanelState, + breadcrumbs: breadcrumbsState.breadcrumbs + }; +} + +function mapDispatchToProps(dispatch) { + return { + ...bindActionCreators({ + overwriteFile: addAssetPanelActions.overwriteFile.bind(addAssetPanelActions), + stopUpload: addAssetPanelActions.stopUpload, + trackProgress: addAssetPanelActions.trackProgress + }, dispatch) + }; +} + + +export default connect(mapStateToProps, mapDispatchToProps)(ProgressBarOverwriteContainer); \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ProgressContainer.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ProgressContainer.jsx new file mode 100644 index 00000000000..765ec90c4a1 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/ProgressContainer.jsx @@ -0,0 +1,93 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { connect } from "react-redux"; +import FileProgress from "../components/FileProgress"; +import localizeService from "../services/localizeService"; + +function isImage(url) { + if (!url) { + return false; + } + + const imageExtensions = ["JPG", "JPE", "BMP", "GIF", "PNG", "JPEG", "ICO"]; + let urlNoParameters = url.split("?")[0]; + let ext = urlNoParameters.split(".").reverse()[0].toUpperCase(); + for (let i = 0; i < imageExtensions.length; i++) { + if (imageExtensions[i] === ext) return true; + } + return false; +} + +class ProgressContainer extends React.Component { + isUploading(fileProgress) { + const {completed, alreadyExists, stopped, error} = fileProgress; + return !completed && !alreadyExists && !stopped && !error; + } + getImageUrl(fileProgress) { + const uploading = this.isUploading(fileProgress); + + if (uploading) { + return ""; + } + + if (isImage(fileProgress.path)) { + return fileProgress.path; + } + + return fileProgress.fileIconUrl; + } + + getMessage(fileProgress) { + const {error, stopped, completed} = fileProgress; + + if (error) { + return fileProgress.error; + } + + if (stopped) { + return localizeService.getString("FileUploadStoppedMessage"); + } + + if (completed) { + return localizeService.getString("FileUploadedMessage"); + } + + return null; + } + + render() { + const { progress } = this.props; + let output = []; + for (let fileName in progress) { + const fileProgress = progress[fileName]; + const {error, stopped, path, alreadyExists} = fileProgress; + const uploading = this.isUploading(fileProgress); + const imageUrl = this.getImageUrl(fileProgress); + const message = this.getMessage(fileProgress); + + output.push(); + } + + return ( +
      + { output } +
      + ); + } +} + +ProgressContainer.propTypes = { + progress: PropTypes.object, + uploaded: PropTypes.object +}; + +function mapStateToProps(state) { + const addAssetPanelState = state.addAssetPanel; + + return { + progress: addAssetPanelState.progress, + uploaded: addAssetPanelState.uploaded + }; +} + +export default connect(mapStateToProps)(ProgressContainer); \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/TopBarContainer.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/TopBarContainer.jsx new file mode 100644 index 00000000000..5dd5dce8d68 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/containers/TopBarContainer.jsx @@ -0,0 +1,166 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { bindActionCreators } from "redux"; +import { connect } from "react-redux"; +import folderPanelActions from "../actions/folderPanelActions"; +import topBarActions from "../actions/topBarActions"; +import localizeService from "../services/localizeService"; +import DropDown from "../../../../../../Dnn.AdminExperience/ClientSide/Dnn.React.Common/src/Dropdown"; +import FolderPicker from "../components/FolderSelector/FolderPicker"; +import debounce from "lodash/debounce"; + +const refreshSyncIcon = require("!raw-loader!../../../Images/redeploy.svg").default; + +class TopBarContainer extends React.Component { + componentWillMount() { + this.debouncedSearch = debounce(this.searchHandler.bind(this, true), 500); + } + + onChangeFolder(folder) { + const {folderPanelState, loadContent} = this.props; + const folderId = parseInt(folder.key); + loadContent(folderPanelState, folderId); + } + + searchHandler(checkLength) { + const {folderPanelState, changeSearchingValue, searchFiles, loadContent} = this.props; + const {currentFolderId} = folderPanelState; + const oldSearch = folderPanelState.search; + let search = this.props.search; + + search = checkLength && search.length < 3 ? "" : search; + + if (!oldSearch && !search) { + return; + } + + changeSearchingValue(search); + if (!search) { + loadContent(folderPanelState, currentFolderId); + } + else { + searchFiles(folderPanelState, search); + } + } + + onSearchChanged(event) { + this.props.changeSearchField(event.target.value); + this.debouncedSearch(); + } + + onSortingChange(option) { + const {changeSorting, loadContent, folderPanelState} = this.props; + const {currentFolderId} = folderPanelState; + const newFolderPanelState = { ...folderPanelState, sorting: option.value }; + + changeSorting(option.value); + loadContent(newFolderPanelState, currentFolderId); + } + + onRefreshSyncChange(folderPanelState, currentFolderId, option) { + switch (option.value) { + case "Refresh": + this.props.loadContent(folderPanelState, currentFolderId); + break; + + case "SyncThisFolder": + this.props.syncContent(folderPanelState, false); + break; + + case "SyncThisFolderAndSubfolders": + this.props.syncContent(folderPanelState, true); + break; + + default: + break; + } + } + + render() { + const {folderPanelState, search, userLogged, homeFolderId} = this.props; + const {currentFolderId, currentFolderName, sortOptions, sorting} = folderPanelState; + + return ( +
      +
      + {userLogged ? +
      + this.onRefreshSyncChange(folderPanelState, currentFolderId, option)} + withBorder={false} + fixedHeight={200} + label="" + prependWith={} + withIcon={false} /> + +
      + : {localizeService.getString("DisabledForAnonymousUsersMessage")} + } +
      +
      + +
      +
      + + + +
      +
      + ); + } +} + +TopBarContainer.propTypes = { + folderPanelState: PropTypes.object, + loadContent: PropTypes.func, + syncContent: PropTypes.func, + changeSearchingValue: PropTypes.func, + searchFiles: PropTypes.func, + changeSorting: PropTypes.func, + changeSearchField: PropTypes.func, + search: PropTypes.string, + userLogged: PropTypes.bool, + homeFolderId: PropTypes.number +}; + +function mapStateToProps(state) { + const moduleState = state.module; + const folderPanelState = state.folderPanel; + const topBarState = state.topBar; + + return { + folderPanelState, + search: topBarState.search || "", + userLogged: moduleState.userLogged, + homeFolderId: moduleState.homeFolderId + }; +} + +function mapDispatchToProps(dispatch) { + return { + ...bindActionCreators({ + loadContent: folderPanelActions.loadContent, + syncContent: folderPanelActions.syncContent, + searchFiles: folderPanelActions.searchFiles, + changeSearchingValue: folderPanelActions.changeSearchingValue, + changeSorting: folderPanelActions.changeSorting, + changeSearchField: topBarActions.changeSearchField + }, dispatch) + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(TopBarContainer); \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/globals/api.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/globals/api.js new file mode 100644 index 00000000000..29d53933aa6 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/globals/api.js @@ -0,0 +1,263 @@ +let tabId = -1; +let moduleId = -1; +let groupId = -1; +let moduleName = ""; +let extensionWhitelist = ""; +let validationCode = ""; + +const ANTIFORGERY_TOKEN_KEY = "__RequestVerificationToken"; + +function getAntiForgeryToken() { + let inputNodes = document.getElementsByTagName("input"); + inputNodes = Array.prototype.slice.call(inputNodes); + const antiforgeryTokenNodes = inputNodes.filter(function (inputNode) { + return inputNode.getAttribute("name") === ANTIFORGERY_TOKEN_KEY; + }); + + if (antiforgeryTokenNodes.length > 0) { + return antiforgeryTokenNodes[0].value; + } + + return ""; +} + +/** function to perform raw http request */ +function httpRequest(url, options) { + const headersObject = { + "ModuleId": moduleId, + "TabId": tabId, + "GroupId": groupId + }; + + if (options.headers) { + Object.assign(headersObject, options.headers); + } + + const antiforgeryToken = getAntiForgeryToken(); + if (antiforgeryToken) { + headersObject.RequestVerificationToken = antiforgeryToken; + } + + const headers = new Headers(headersObject); + options = Object.assign(options, { + credentials: "same-origin", + headers: headers + }); + + + return fetch(url, options).then(handleHttpResponse); +} + +function SAHttpRequest(url, options) { + // eslint-disable-next-line + const request = require("superagent"); + const { method, body, progressTracker } = options; + + const headersObject = { + "ModuleId": moduleId, + "TabId": tabId, + "GroupId": groupId + }; + + if (options.headers) { + Object.assign(headersObject, options.headers); + } + + const antiforgeryToken = getAntiForgeryToken(); + if (antiforgeryToken) { + headersObject.RequestVerificationToken = antiforgeryToken; + } + + return request(method, url).set(headersObject).send(body).on("progress", progressTracker) + .then(response => JSON.parse(response.text), handleSAHttpRequestFailure); +} + +function handleSAHttpRequestFailure(response) { + const error = new Error(response.status + " - An expected error has been received from the server."); + error.code = response.status; + throw error; +} + +/** function to handle http response */ +function handleHttpResponse(response) { + if (response.status >= 200 && response.status < 300) { + return response.json(); + } + + return response.json() + .then(function processErrorJson(json) { + const error = new Error(); + error.code = response.status; + error.data = json; + throw error; + } + , () => { + const error = new Error(response.status + " - An expected error has been received from the server."); + error.code = response.status; + throw error; + }); +} + +/** function to serialize query string object */ +function serializeQueryStringParameters(obj) { + let s = []; + for (let p in obj) { + if (obj.hasOwnProperty(p)) { + s.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); + } + } + return s.join("&"); +} + +/** + * @module api + */ +const api = { + /** initialize the api module. This call must be done before use any other method of the module + * @param {object} options - moduleId, tabId and moduleName are required + * */ + init(options) { + if (!options) { + throw new Error("The init method requires an options parameter with tabId, moduleId and moduleName"); + } + + if (typeof(options.moduleId) !== "number" || options.moduleId <= 0 ) { + throw new Error("The moduleId must be a number greater than 0."); + } + + if (typeof(options.moduleName) !== "string" || !options.moduleName ) { + throw new Error("The moduleName must be a string and it can't be empty. "); + } + + if (typeof(options.tabId) !== "number" || options.tabId <= 0 ) { + throw new Error("The tabId must be a number greater than 0"); + } + + moduleId = options.moduleId; + moduleName = options.moduleName; + tabId = options.tabId; + groupId = options.groupId; + extensionWhitelist = options.extensionWhitelist; + validationCode = options.validationCode; + }, + + getAntiForgeryToken() { + return getAntiForgeryToken(); + }, + + getServiceRoot(ignoreCurrentModuleApi) { + // eslint-disable-next-line no-undef + let serviceRoot = dnn.getVar("sf_siteRoot", "/"); + serviceRoot += "DesktopModules/"; + if (!ignoreCurrentModuleApi) { + serviceRoot += moduleName + "/API/"; + } + return serviceRoot; + }, + + getModuleRoot() { + // eslint-disable-next-line no-undef + let moduleRoot = dnn.getVar("sf_siteRoot", "/"); + moduleRoot += "DesktopModules/" + moduleName; + + return moduleRoot; + }, + + /** this function performs a get http request + * @param {string} url + * @param {object} query string object + * */ + get(url, queryString = null) { + + if (queryString) { + url += (url.indexOf("?") > 0 ? "&" : "?") + serializeQueryStringParameters(queryString); + } + + return httpRequest(url, { + method: "GET" + }); + }, + /** this function performs a post http request + * @param {string} url + * @param {object} body + * */ + post(url, body, headers) { + let data = null; + if (headers && headers["Content-Type"] === "multipart/form-data") { + let formData = new FormData(); + for (const name in body) { + formData.append(name, body[name]); + } + data = formData; + + delete headers["Content-Type"]; + } + + return httpRequest(url, { + method: "POST", + body: data || JSON.stringify(body), + headers: headers + }); + }, + /** Posta a primitive value (integer, string, etc.) + * @param {string} url + * @param {any} value + */ + postPrimitive(url, value) { + var urlencoded = new URLSearchParams(); + urlencoded.append("", value.toString()); + return httpRequest(url, { + method: "POST", + body: urlencoded, + headers: [{"Content-Type": "application/x-www-form-urlencoded"}], + }); + }, + /** this function performs a post http request + * @param {string} url + * @param {object} body + * */ + postFile(url, formData, progressTracker) { + return SAHttpRequest(url, { + method: "POST", + body: formData, + progressTracker + }); + + }, + /** this function performs a put http request + * @param {string} url + * @param {object} body + * */ + put(url, body) { + return httpRequest(url, { + method: "PUT", + body: JSON.stringify(body) + }); + }, + /** this function performs a delete http request + * @param {string} url + * @param {object} body + * */ + delete(url, body) { + return httpRequest(url, { + method: "DELETE", + body: JSON.stringify(body) + }); + }, + getHeadersObject() { + const headersObject = { + moduleId, + tabId, + groupId + }; + return headersObject; + }, + getWhitelistObject() { + const whitelistObject = { + extensionWhitelist, + validationCode + }; + return whitelistObject; + } +}; +export default api; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/globals/dnnSf.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/globals/dnnSf.js new file mode 100644 index 00000000000..5ef8f918664 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/globals/dnnSf.js @@ -0,0 +1,101 @@ +export default class DnnSf { + moduleRoot = ""; + controller = ""; + siteRoot = ""; + tabId = -1; + antiForgeryToken = ""; + + constructor() { + this.siteRoot = window.top.dnn.getVar("sf_siteRoot", "/"); + this.tabId = parseInt(window.top.dnn.getVar("sf_tabId", "-1")); + this.antiForgeryToken = window.top.document.querySelector("input[name=__RequestVerificationToken]").value; + } + + get = (method, params, success, failure, loading, beforeSend) => { + return this.call("GET", method, params, success, failure, loading, beforeSend, false, false); + } + + call = (httpMethod, method, params, success, failure, loading, beforeSend, sync, silence, postFile) => { + let url = this.getServiceRoot() + this.controller + "/" + method; + this.moduleRoot = "personaBar"; + this.controller = ""; + + return this.rawCall(httpMethod, url, params, success, failure, loading, beforeSend, sync, silence, postFile); + } + + getServiceRoot = () => { + return this.siteRoot + "API/" + this.moduleRoot + "/"; + } + + rawCall = (httpMethod, url, params, success, failure, loading, beforeSend, sync, silence, postFile) => { + let beforeCallback; + if (typeof beforeSend === "function") { + beforeCallback = (xhr) => { + this.setHeaders(xhr); + return beforeSend(xhr); + }; + } + else { + beforeCallback = this.setHeaders; + } + + let options = { + url: url, + beforeSend: beforeCallback, + type: httpMethod, + async: sync === false, + success: function (d) { + if (typeof loading === "function") { + loading(false); + } + + if (typeof success === "function") { + success(d || {}); + } + }, + error: function (xhr, status, err) { + if (typeof loading === "function") { + loading(false); + } + + if (typeof failure === "function") { + if (xhr) { + failure(xhr, err); + } + else { + failure(null, "Unknown error"); + } + } + } + }; + + if (httpMethod === "GET") { + options.data = params; + } else if (postFile) { + options.processData = false; + options.contentType = false; + options.data = params; + } + else { + options.contentType = "application/json; charset=UTF-8"; + options.data = JSON.stringify(params); + options.dataType = "json"; + } + + if (typeof loading === "function") { + loading(true); + } + + return window.$.ajax(options); + } + + setHeaders = (xhr) => { + if (this.tabId) { + xhr.setRequestHeader("TabId", this.tabId); + } + + if (this.antiForgeryToken.length > 0) { + xhr.setRequestHeader("RequestVerificaitonToken", this.antiForgeryToken); + } + } +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/globals/resourceManager.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/globals/resourceManager.js new file mode 100644 index 00000000000..97f7d10ca08 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/globals/resourceManager.js @@ -0,0 +1,35 @@ +import api from "./api"; +import globalActions from "../actions/globalActions"; +import localizeService from "../services/localizeService.js"; + +const resourceManager = { + init(options) { + api.init(options); + localizeService.init(options.resx); + require("../less/styles.less"); + + resourceManager.dispatch(globalActions.loadInitialParameters(options)); + const container = document.getElementById(options.containerId); + + this.render(container); + }, + + dispatch() { + throw new Error("dispatch method needs to be overwritten from the Redux store"); + }, + + render() { + throw new Error("render method needs to be overwritten from the Redux store"); + } + +}; + +if (typeof window.dnn === "undefined" || window.dnn === null) { + window.dnn = {}; +} +if (typeof window.dnn.ResourceManager === "undefined") { + window.dnn.ResourceManager = {}; +} +window.dnn.ResourceManager.instance = resourceManager; + +export default resourceManager; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/Assets.less b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/Assets.less new file mode 100644 index 00000000000..25d1e9df41a --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/Assets.less @@ -0,0 +1,1099 @@ +#Assets-panel { + @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) { + div#folder-picker div.selected-item { + margin-left: -20px; + } + } + #assets-header.socialpanelheader { + padding-bottom: 0; + padding: 0; + min-height: 103px; + max-height: 103px; + -webkit-box-sizing: border-box !important; + -moz-box-sizing: border-box !important; + box-sizing: border-box !important; + box-shadow: 0 1px 2px -1px rgba(0,0,0,.2); + position: relative; + } + #assets-header.socialpanelheader > h3 { + float: left; + margin: 14px 0 0 0; + } + #assets-header.socialpanelheader:after { + border: 0; + } + #assets-header.socialpanelheader > div.right-container > div { + float: right; + &:first-child { + margin-left: 12px; + } + } + #assets-header.socialpanelheader a.add-folder { + background-image: url('/DesktopModules/ResourceManager/Images/icon-add-folder.png'); + background-repeat: no-repeat; + background-position: center; + display: inline-block; + height: 32px; + padding: 0; + width: 32px; + } + #assets-header.socialpanelheader a.add-folder:hover { + background-color: #d9ecfa; + } + #assets-header.socialpanelheader .right-container { + position: absolute; + right: 0; + top: 50%; + transform: translate(0, -50%); + } + .rm-button.primary { + display: inline-block; + background-color: #1E88C3; + border: none; + border-radius: 3px; + padding: 0 16px; + height: 42px; + line-height: 42px; + text-align: center; + color: #FFFFFF; + box-sizing: border-box; + vertical-align: top; + min-width: 106px; + cursor: pointer; + } + .rm-button.secondary { + display: inline-block; + border: 1px solid #1E88C3; + border-radius: 3px; + padding: 0 16px; + height: 42px; + line-height: 42px; + text-align: center; + color: #1E88C3; + vertical-align: top; + box-sizing: border-box; + cursor: pointer; + min-width: 106px; + margin-right: 10px; + } + .rm-button.primary.normal, .rm-button.secondary.normal { + height: 35px; + line-height: 35px; + min-width: 92px; + } + #assets-header.socialpanelheader a { + cursor: pointer; + } + #assets-header.socialpanelheader div.folder-picker-container { + display: inline-block; + vertical-align: top; + } + .assets-body { + margin-top: 0; + position: relative; + } + .assets-body .header-container { + padding: 10px 0px; + height: 51px; + border-bottom: 1px solid #C8C8C8; + box-sizing: border-box; + } + .assets-body .header-container .assets-input { + margin-left: 5px; + box-shadow: none; + } + /*Reduce input placeholder font size*/ + .assets-body .header-container .assets-input::-webkit-input-placeholder { + font-size: 12px; + } + .assets-body .header-container .assets-input:-moz-placeholder { + font-size: 12px; + } + .assets-body .header-container .assets-input::-moz-placeholder { + font-size: 12px; + } + .assets-body .header-container input.assets-input:-ms-input-placeholder { + font-size: 12px; + min-width: 123px; + min-height: 16px; + } + .assets-body .header-container .assets-input, input, select, textarea { + border: 1px solid #ddd; + padding: 8px 16px; + border-radius: 3px; + background-color: #fff; + } + .assets-body .header-container input[type='search'].assets-input { + -webkit-appearance: none; + font-weight: bold; + padding-right: 29px; + margin: 0; + width: ~"calc(100% - 24px)"; + border: none; + background: none; + outline: none; + } + .assets-body .header-container .dnnDropDownList .selected-item { + border: 1px solid #ddd; + box-shadow: none; + background: #fff; + } + .assets-body .header-container .assets-input[type=search]::-webkit-search-cancel-button { + display: none; + } + .assets-body .header-container .assets-input[type=search]::-ms-clear { + display: none; + width: 0; + height: 0; + } + .assets-body .header-container a.search-button { + background-image: url('/DesktopModules/ResourceManager/Images/search.svg'); + background-repeat: no-repeat; + background-position: center; + display: inline-block; + width: 22px; + height: 20px; + right: 15px; + position: absolute; + top: 8px; + cursor: pointer; + } + + .assets-body .header-container a.sync-button { + background-image: url(/DesktopModules/ResourceManager/Images/redeploy.svg); + background-repeat: no-repeat; + background-position: center; + display: inline-block; + width: 22px; + height: 20px; + top: 7px; + position: absolute; + right: 0px; + cursor: pointer; + } + + .assets-body .header-container { + color: #46292b; + + .folder-picker-container, .sort-container { + height: 31px; + border-right: 1px solid #C8C8C8; + } + .folder-picker-container { + span { + display: block; + margin-top: 7px; + } + + .dnn-folder-selector { + border: none; + .selected-item { + padding: 7px 15px; + } + } + } + .sort-container { + .dnn-dropdown { + width: 100%; + background: none; + } + } + .refresh-sync-container { + display: flex; + justify-content: right; + .dnn-dropdown { + width: 33%; + background: none; + } + } + } + .assets-body .dnnDropDownList.rm-folder { + width: 100%; + vertical-align: top; + } + .assets-body .dnnDropDownList.rm-folder * { + box-sizing: border-box; + } + .assets-body .dnnDropDownList.rm-folder .selected-item { + border: none; + box-shadow: none; + background: none; + } + .assets-body .dnnDropDownList.rm-folder .selected-item a { + font-weight: bold; + padding: 7px 0; + border-left: none; + background: none; + position: relative; + color: #4B4E4F; + height: 32px; + } + .assets-body .dnnDropDownList.rm-folder .selected-item a:after { + content: ""; + display: block; + width: 0; + height: 0; + position: absolute; + right: 0; + top: 14px; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-top: 4px solid #4B4E4F; + } + .assets-body .dnnDropDownList.rm-folder .selected-item a.opened { + color: #1E88C3; + background: none; + } + .assets-body .dnnDropDownList.rm-folder .selected-item a.opened:after { + border-top-color: #1E88C3; + } + .assets-body .dt-container { + width: 267px; + background: #fff; + border: 1px solid #C8C8C8; + border-radius: 3px; + box-shadow: 0 0 20px 0 gba(0, 0, 0, .2); + top: 42px; + height: 330px; + .dt-header { + margin: 20px 20px 13px 20px; + background: none; + border: none; + box-shadow: none; + padding: 0; + } + .dt-header .sort-button { + display: none; + } + .dt-header .search-container { + margin: 0; + position: relative; + .search-input-container { + border: 1px solid #C8C8C8; + border-radius: 0; + padding: 0 32px 0 0; + input { + background-color: transparent; + border-radius: 0; + border: none; + } + } + .clear-button { + right: 32px; + border: none; + } + .search-button { + position: absolute; + right: 1px; + top: 1px; + width: 32px; + height: 32px; + background-image: url(/DesktopModules/ResourceManager/Images/search.png); + background-repeat: no-repeat; + background-position: center; + } + } + .dt-content { + margin: 65px 20px 0 20px; + border: 1px solid #C8C8C8; + height: 224px; + width: auto; + position: relative; + overflow: hidden; + } + ul.tv-nodes { + &.tv-root { + margin: 4px 4px 0 -10px; + } + li.tv-node { + list-style: none; + padding: 0 0 0 16px; + } + a.text { + background: url(/DesktopModules/ResourceManager/Images/folder.png) no-repeat 2px 0px; + border: 1px solid transparent; + color: #6F7273; + padding: 0 8px 0 24px; + text-decoration: none; + &.selected { + font-weight: bold; + } + } + a.text:hover { + text-decoration: none; + background-image: url(/DesktopModules/ResourceManager/Images/folder-hover.png); + color: #1E88C3; + border: 1px solid transparent; + } + a.icon { + text-decoration: none; + display: inline-block; + padding: 0; + height: 16px; + width: 16px; + border: 1px solid transparent; + outline: none; + vertical-align: middle; + cursor: pointer; + &.rm-expanded { + background: url(/DesktopModules/ResourceManager/Images/tree-sprite.png) no-repeat 0 -18px; + } + &.collapsed { + background: url(/DesktopModules/ResourceManager/Images/tree-sprite.png) no-repeat 0 -2px; + } + } + } + .dt-footer { + background: none; + margin: 10px 20px 20px 20px; + border: none; + } + .dt-footer .result { + margin: 10px 0 0 0; + } + .dt-footer .resizer { + display: none; + } + } + .select-destination-folder { + width: 500px; + margin: 30px auto 30px auto; + .dt-container { + width: 100%; + box-shadow: none; + border: none; + .dt-content { + margin-top: 20px; + } + } + } + .assets-body .header-container { + .search-box-container, .sort-container { + position: relative; + display: block; + float: left; + } + .folder-picker-container { + width: 40%; + } + .sort-container { + width: 20%; + } + .search-box-container { + width: 40%; + } + .rm-folder-picker-refresh-sync-container { + display: flex; + .rm-refresh-sync-dropdown { + border-right: 1px solid #C8C8C8; + .collapsible-label { + height: 30px; + span { + margin: 0; + } + svg { + fill: #777; + width: 22px; + height: auto; + } + } + } + } + } + .breadcrumbs-container { + position: absolute; + width: 100%; + font-size: 0; + line-height: 0; + text-transform: uppercase; + font-weight: bold; + left: 0; + bottom: 0; + + > div { + height: 20px; + line-height: 20px; + background: 0; + color: #1e88c3; + font-weight: bold; + text-transform: uppercase; + cursor: pointer; + + &:first-child:not(:last-child) { + padding-right: 16px; + position: relative; + display: inline-block; + } + + &:first-child:last-child { + width: 150px; + margin-left: 0; + } + + &:not(:first-child):not(:last-child) { + padding-right: 10px; + position: relative; + margin-left: 25px; + box-sizing: border-box; + } + + &:not(:last-child)::after { + content: ''; + position: absolute; + right: -15px; + top: 0; + width: 20px; + height: 32px; + background-image: url(/DesktopModules/ResourceManager/Images/arrow_forward.svg); + background-repeat: no-repeat; + background-position: center; + } + + &:last-child { + color: #1e88c3; + font-family: proxima_nova,Arial; + text-decoration: none; + font-size: 14px; + padding-right: 10px; + position: relative; + margin-left: 25px; + cursor: default; + } + } + + div { + display: inline-block; + height: 32px; + line-height: 32px; + font-family: proxima_nova,Arial; + text-decoration: none; + font-size: 14px; + max-width: 20%; + color: #4b4e4f; + + > span { + display: block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + } + div.rm-field { + position: relative; + display: inline-block; + margin: 32px 0 0 0; + min-width: 325px; + vertical-align: top; + } + div.rm-field.long { + margin-right: 340px; + } + div.rm-field.right { + min-width: 325px; + } + div.rm-field.hide { + visibility: hidden; + margin: 32px 0 0 0; + } + div.versioning { + margin: 20px 20px 0 0; + } + div.versioning > input { + vertical-align: middle; + margin-right: 5px; + } + div.rm-field > label { + display: block; + margin-bottom: 5px; + } + div.rm-field > input[type="text"], div.rm-field > select, div.rm-field > textarea { + width: 100%; + box-sizing: border-box; + min-height: 34px; + border: 1px solid #7F7F7F; + border-radius: 0; + } + div.rm-field > textarea#description { + min-height: 135px; + } + div.file-upload-panel { + margin: 1px 1px 30px 1px; + + .dnn-file-upload { + width: 100%; + box-sizing: border-box; + float:none; + margin:auto; + + span { + float: none; + } + } + } + .container-main .toolbar-main { + height: 70px; + width: 860px; + background-color: #e6e6e6; + } + .container-main .filter-results { + height: 50px; + width: 860px; + padding-bottom: 0px; + } + .page-title { + font-family: Arial, Helvetica, sans-serif; + font-size: 24px; + } + div.main-container { + margin-top: 16px; + position: relative; + overflow: auto; + } + div.item-container { + width: 100%; + overflow-y: auto; + overflow-x: visible; + } + div.item-container.empty { + .rm_infinite-scroll-container { + display: none; + } + } + div.item-container.empty:not(.loading) { + background-image: url(/DesktopModules/ResourceManager/Images/folder-empty-state-asset-manager.png); + background-repeat: no-repeat; + background-position: center 120px; + min-height: 465px; + } + div.item-container.empty.rm_search:not(.loading) { + background-image: url(/DesktopModules/ResourceManager/Images/search-glass-no-results.png); + } + div.item-container > div.empty-label { + display: none; + color: #aaa; + max-width: 250px; + text-align: center; + top: 240px; + position: relative; + margin-left: auto; + margin-right: auto; + } + div.item-container.empty:not(.rm_search):not(.loading) > div.empty-label.rm-folder { + display: block; + } + div.item-container.empty.rm_search:not(.loading) > div.empty-label.rm_search { + display: block; + top: 180px; + } + div.item-container > div.empty-label > span.empty-title { + font-size: 22px; + font-weight: bold; + display: block; + margin: 10px 0; + } + div.item-container > div.empty-label > span.empty-subtitle { + font-size: 15px; + } + div.item-container.drop-target { + border: 10px #0087c6 dashed; + padding: 0 0 5px 5px; + overflow: hidden; + } + .item-container .rm-card { + position: relative; + height: 212px; + width: 100%; + padding: 20px; + bottom: 0px; + font-family: "Proxima Nova-light", HelveticaNeue-Light, Arial-light, Helvetica, sans-serif; + -webkit-box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.30); + -moz-box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.30); + box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.30); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + background-color: #79bdd8; + color: #FFF; + font-size: 17px; + margin: 15px 0 5px 0; + float: left; + overflow: hidden; + transition: 0.2s; + box-sizing: border-box; + + &.rm-folder { + cursor: pointer; + } + } + div.item-container:not(.disabled) .rm-card:hover, div.item-container:not(.disabled) .rm-card.selected { + background-color: rgba(48, 137, 198, 1); + transition: 0.2s; + } + .item.highlight { + -webkit-animation: card-highlight 1.5s 1; + -moz-animation: card-highlight 1.5s 1; + animation: card-highlight 1.5s 1; + } + @-webkit-keyframes card-highlight { + 0% { + box-shadow: 0 0 0 0 rgba(0, 220, 0, 0); + } + 25% { + box-shadow: 0 0 5px 8px rgba(125, 226, 166, 1); + } + 50% { + box-shadow: 0 0 0 0 rgba(0, 220, 0, 0); + } + 75% { + box-shadow: 0 0 5px 8px rgba(125, 226, 166, 1); + } + 100% { + box-shadow: 0 0 0 0 rgba(0, 220, 0, 0); + } + } + @-moz-keyframes card-highlight { + 0% { + box-shadow: 0 0 0 0 rgba(0, 220, 0, 0); + } + 25% { + box-shadow: 0 0 5px 8px rgba(125, 226, 166, 1); + } + 50% { + box-shadow: 0 0 0 0 rgba(0, 220, 0, 0); + } + 75% { + box-shadow: 0 0 5px 8px rgba(125, 226, 166, 1); + } + 100% { + box-shadow: 0 0 0 0 rgba(0, 220, 0, 0); + } + } + @keyframes card-highlight { + 0% { + box-shadow: 0 0 0 0 rgba(0, 220, 0, 0); + } + 25% { + box-shadow: 0 0 5px 8px rgba(125, 226, 166, 1); + } + 50% { + box-shadow: 0 0 0 0 rgba(0, 220, 0, 0); + } + 75% { + box-shadow: 0 0 5px 8px rgba(125, 226, 166, 1); + } + 100% { + box-shadow: 0 0 0 0 rgba(0, 220, 0, 0); + } + } + .rm-card-container { + float: left; + width: 22%; + margin-right: 4%; + } + .rm-card-container:nth-of-type(4n){ + margin-right: 0; + } + .item.rm-card { + float: none; + } + .item.rm-card .card-icons { + height: 58px; + width: 53px; + position: absolute; + left: 0px; + top: 0px; + } + .item.rm-card .text-card { + position: absolute; + bottom: 22px; + width: 149px; + overflow: hidden; + word-wrap: break-word; + height: 30px; + line-height: 15px; + + p { + margin: 0; + } + } + .item.rm-card .text-card:before { + content: ""; + float: left; + width: 5px; + height: 30px; + } + .item.rm-card .text-card > *:first-child { + float: right; + width: 100%; + margin-left: -5px; + } + .item.rm-card .text-card:after { + content: "\02026"; + box-sizing: content-box; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + float: right; + position: relative; + top: -15px; + left: 100%; + width: 1em; + margin-left: -1em; + padding-right: 5px; + text-align: right; + background-color: rgba(121, 189, 216, 1); + transition: 0.2s; + } + div.item-container:not(.disabled) .rm-card:hover .text-card:after, div.item-container:not(.disabled) .rm-card.selected .text-card:after { + background-color: rgba(48, 137, 198, 1); + transition: 0.2s; + } + .item.rm-card .text-card font.highlight { + background-color: #CCCCCC; + } + .rm-circular { + width: 100%; + height: 100%; + border-radius: 50%; + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + border: 12px solid #79bdd8; + margin-right: auto; + margin-left: auto; + background-position: center center; + background-repeat: no-repeat; + background-color: #eeeeee; + box-sizing: border-box; + } + .rm-circular.rm-folder { + background-color: #9EDCEF; + } + .rm-card .image-center { + margin-right: auto; + margin-left: auto; + height: 110px; + width: 110px; + border: 2px white solid; + border-radius: 50%; + position: relative; + } + .rm-card .overlay-disabled { + height: 213px; + width: 190px; + position: absolute; + left: 0px; + top: 0px; + background-color: black; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + opacity: 0; + visibility: hidden; + -webkit-transition: visibility 0.2s linear, opacity 0.2s linear; + -moz-transition: visibility 0.2s linear, opacity 0.2s linear; + -o-transition: visibility 0.2s linear, opacity 0.2s linear; + } + div.item-container.disabled .rm-card { + cursor: auto; + } + div.item-container.disabled .rm-card .overlay-disabled { + opacity: 0.5; + visibility: visible; + } + .rm-card > div.rm-actions { + position: absolute; + right: -32px; + width: 32px; + background-color: #236F99; + top: 0; + bottom: 0; + transition: 0.2s; + + > div { + cursor: pointer; + } + } + .rm-card.selected > div.rm-actions, .rm-card:hover > div.rm-actions { + right: 0; + transition: 0.2s; + transition-delay: 0.4s; + } + .rm-card > div.unpublished { + position: absolute; + width: 32px; + height: 32px; + top: 6px; + left: 6px; + background-image: url(/DesktopModules/ResourceManager/Images/unpublished.svg); + } + .rm-card > div.rm-actions > div { + height: 32px; + background-position: center; + background-repeat: no-repeat; + position: absolute; + width: 100%; + background-size: 80%; + &.rm-edit { + top: 0; + background-image: url(/DesktopModules/ResourceManager/Images/edit.svg); + } + &.rm-link { + top: 32px; + background-image: url(/DesktopModules/ResourceManager/Images/clipboard.svg); + } + &.rm-download { + top: 96px; + background-image: url(/DesktopModules/ResourceManager/Images/download.svg); + } + &.rm-move { + top: 64px; + background-image: url(/DesktopModules/ResourceManager/Images/move.svg); + } + &.rm-delete { + background-image: url(/DesktopModules/ResourceManager/Images/delete.svg); + background-color: #195774; + bottom: 0; + } + } + .top-panel { + &.add-folder, &.manage-folder-types { + .animateHeight(970px, 0.5s); + .rm-button { + margin-bottom: 30px; + } + } + &.manage-folder-types { + h3{ + text-align: center; + } + table.folder-types{ + margin: 1em auto; + border: 1px solid gray; + th{ + text-transform: uppercase; + } + th, td { + padding: 1em 2em; + border-bottom: 1px solid gray; + button, a{ + border: none; + margin: 0; + padding: 0; + background-color: transparent; + svg{ + width: 1.5em; + height: auto; + } + } + } + } + } + } + + .folder-adding { + .folder-parent-label { + margin-right: 10px; + } + } + + .top-panel.add-folder > .folder-adding { + margin: 30px; + margin-bottom: 45px; + } + + .top-panel.add-asset { + .animateHeight(970px, 0.5s); + + .close { + float: none; + margin-bottom: 30px; + } + } + .details-panel { + border: none; + border-radius: 0; + padding: 30px; + } + div.item-details { + float: left; + margin: 0; + border-top: 2px solid #1E88C3; + border-bottom: 2px solid #1E88C3; + width: 100%; + padding: 25px 10px; + box-sizing: border-box; + overflow: hidden; + &.item-move{ + overflow: visible; + .dnn-folder-selector{ + border: 1px solid gray; + } + } + } + ul.tabControl { + background-color: #FFF; + border-radius: 0; + border: none; + border-bottom: 1px solid #ddd; + &> li { + text-transform: uppercase; + font-weight: bold; + padding: 10px 0; + margin: 0 20px; + &.selected { + border-bottom: 3px solid #1E88C3; + } + } + } + div.details-icon { + display: inline-block; + width: 50px; + height: 50px; + border-radius: 50%; + box-shadow: 0px 0px 0px 1px #79bdd8; + border: 5px solid #FFF; + background-position: center center; + background-repeat: no-repeat; + float: left; + margin: 0 15px 25px 0; + background-color: #eee; + } + div.details-icon.folder { + background-color: #9EDCEF; + background-size: 50%; + } + div.details-info { + padding-top: 12px; + position: relative; + } + div.details-field { + display: inline-block; + margin-bottom: 8px; + max-width: 200px; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: top; + &:first-child { + margin-right: 16px; + padding-right: 16px; + border-right: 1px solid #c8c8c8; + } + &.rm-url { + max-width: none; + } + } + div.details-field a { + color: #0087c6; + text-decoration: none; + } + div.details-field a:hover { + color: #2fa6eb; + } + div.details-field + div.vertical-separator { + margin: 0 16px; + border-left: 1px solid #e2e2e2; + display: inline; + height: 16px; + } + div.details-field + div.line-break { + clear: right; + } + div.details-field.right { + position: absolute; + right: 0; + top: 12px; + } + span.details-label { + font-weight: bold; + margin-right: 10px; + } + span.details-label.checkbox { + vertical-align: top; + line-height: 22px; + margin-right: 27px; + color: #46292b; + } + div.file-panel { + padding: 25px; + background-color: #fff; + } + div.separator { + clear: both; + border-bottom: 1px solid #C8C8C8; + margin-bottom: 8px; + } + label { + font-weight: bold; + } + label.formRequired::after { + content: "*"; + display: inline-block; + margin: 0 0 0 5px; + color: Red; + font-size: 16px; + line-height: 1em; + font-family: proxima_nova_semibold; + } + div.cancel { + width: 50%; + float: left; + margin: 10px 0 0 0; + position: relative; + } + div.cancel > a { + display: block; + float: right; + margin-right: 5px; + } + div.close { + width: 100%; + float: left; + text-align: center; + } + div.close > a { + margin-right: auto; + margin-left: auto; + } + div.save { + width: 50%; + float: left; + margin: 10px 0 0 0; + position: relative; + } + div.details-selector { + position: relative; + &> div { + margin: auto; + content: ''; + width: 0; + height: 0; + border-style: solid; + border-width: 8px 8px 0 8px; + border-color: #3089C6 transparent transparent transparent; + position: relative; + + } + } + + .rm-clear { + clear: both + } +} + +.dnn-slide-in-out-enter { + max-height: 0; +} + +.dnn-slide-in-out-enter.dnn-slide-in-out-enter-active { + max-height: 970px; + transition: max-height 500ms ease-in; +} + +.dnn-slide-in-out-leave { + max-height: 970px; +} + +.dnn-slide-in-out-leave.dnn-slide-in-out-leave-active { + max-height: 0; + transition: max-height 300ms ease-in; +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/button.less b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/button.less new file mode 100644 index 00000000000..97193fe185a --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/button.less @@ -0,0 +1,52 @@ +@import "~@dnnsoftware/dnn-react-common/styles/index"; + +button.rm-common-button { + border: 1px solid @curiousBlue; + height: 34px; + min-width: 100px; + padding: 0 22px; + font-size: 10pt; + color: @curiousBlue; + background: @white; + border-radius: 3px; + cursor: pointer; + font-family: Helvetica, Arial, sans-serif; + &:hover { + color: @cerulean; + border-color: @cerulean; + } + &:focus{ + outline: none; + } + &:active { + color: @matisse; + border-color: @matisse; + } + &:disabled { + color: @alto; + border-color: @alto; + cursor: not-allowed; + } + + &.large{ + height: 44px; + } + + &[role=primary] { + background: @curiousBlue; + border: none; + color: @white; + + &:hover { + background: @cerulean; + } + &:active { + background: @matisse; + } + &:disabled { + color: @mountainMist; + background: @mercury; + cursor: not-allowed; + } + } +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/components.less b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/components.less new file mode 100644 index 00000000000..522067ab022 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/components.less @@ -0,0 +1,183 @@ +.loading::after { + content: ""; + display: block; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(255,255,255,0.7) url(/DesktopModules/ResourceManager/Images/loading.gif) no-repeat center center; + z-index: 99999; +} + +.three-columns { + display: block; + width: 33%; + float: left; +} + +.dnn-dropdown { + height: 31px; + background-color: white; + + .collapsible-content { + margin: 0; + box-shadow: none; + width: 250px; + } + + ul, li { + margin: 0px; + list-style: none; + box-sizing: border-box; + } +} + +.rm-field .dnn-dropdown { + width: 100% +} + +label.rm-error { + color: red +} + +.file-upload-container { + .file-upload-panel { + position: relative; + border: 1px solid rgb(102, 102, 102); + padding: 10px; + margin-bottom: 30px; + min-height: 163px; + color: #959695; + transition: 200ms linear; + cursor: pointer; + + &:hover { + color: #FFF; + background-color: rgba(30,136,195,0.6); + } + + span { + overflow: hidden !important; + width: 140px !important; + display: block !important; + position: relative; + text-transform: none; + font-size: 14px; + padding-top: 95px; + text-align: center; + margin: 0 auto; + } + } + + .upload-file { + background-image: url(/DesktopModules/ResourceManager/Images/upload.svg); + height: 40px; + width: 40px; + display: block; + margin: 0 auto; + } + + span { + display: block; + text-align: center; + } +} + +.progresses-container { + margin: 20px 0; + max-height: 240px; + overflow-y: auto; +} + +.uploading-container { + overflow: hidden; + border-bottom: 1px solid #c8c8c8; + padding: 6px 0; + color: #0a85c3; + font-weight: bold; + font-family: proxima_nova,Arial; + font-size: 13px; + + .file-upload-thumbnail { + background: 0; + border-radius: 0; + border: 2px solid #0a85c3; + padding: 2px; + float: left; + position: relative; + height: 76px; + width: 76px; + line-height: 76px; + text-align: center; + + img { + max-height: 100%; + max-width: 100%; + } + } + .file-name-container, .progress-bar-container { + width: ~"calc(100% - 100px)"; + float: right; + } + .file-name-container { + span { + display: block; + width: 100%; + } + } + .progress-bar-container { + margin-top: 18px; + height: 5px; + background-color: #c7c7c7; + + .progress-bar { + background-color: #0a85c3; + height: 100%; + transition: 0.5s; + } + } + + &.rm-error { + color: red; + + .file-upload-thumbnail { + border: 2px solid #c8c8c8; + background-image: url(/DesktopModules/ResourceManager/Images/loader_failed.svg); + } + + .progress-bar { + background-color: red; + } + } + + &.rm-uploading { + .file-upload-thumbnail { + border: 2px solid #c8c8c8; + background: url(/DesktopModules/ResourceManager/Images/dnnanim.gif) no-repeat center; + } + } + + &.rm-stopped { + color: #777; + + .file-upload-thumbnail { + border: 2px solid #c8c8c8; + } + } +} + +.rm-error label { + color: red +} + +.dnn-switch-container { + display: inline-block; + float: none; + padding: 0; +} + +.dnn-dropdown .collapsible-label { + padding: 7px 15px; + box-sizing: border-box; +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/mixins.less b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/mixins.less new file mode 100644 index 00000000000..074cc2b804f --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/mixins.less @@ -0,0 +1,25 @@ +.border-box(){ + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.transition(@transition){ + -moz-transition: @transition; + -webkit-transition: @transition; + transition: @transition; +} + +.animateHeight(@max-Height, @duration){ + & { + max-height: 0; + overflow: hidden; + height: 100%; + .transition(max-height @duration ease); + } + + &.rm-expanded{ + max-height: @max-Height; + } + +} diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/modal.less b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/modal.less new file mode 100644 index 00000000000..e48020bd392 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/modal.less @@ -0,0 +1,29 @@ +.ReactModalPortal { + .modal-header { + background-color: #092836; + border: none; + + h3 { + color: white; + margin: 0; + } + } + + .rm-dialog-modal-label { + float: none; + width: 100%; + text-align: center; + label { + margin: 0; + } + } + + .rm-form-buttons-container { + text-align: center; + margin-top: 20px; + + .rm-common-button { + margin-left: 10px; + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/styles.less b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/styles.less new file mode 100644 index 00000000000..b813c111dc5 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/less/styles.less @@ -0,0 +1,9 @@ +@import "mixins.less"; + +.rm-container { + @import "Assets.less"; + @import "components.less"; +} + +@import "modal.less"; +@import "button.less"; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/main.jsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/main.jsx new file mode 100644 index 00000000000..24fd667c86c --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/main.jsx @@ -0,0 +1,21 @@ +import React from "react"; +import { render } from "react-dom"; +import { Provider } from "react-redux"; +import configureStore from "./store/configureStore"; +import resourceManager from "./globals/resourceManager"; +import App from "./components/App"; + +import "fetch-ie8"; +import "es6-shim"; + +const store = configureStore(); +resourceManager.dispatch = store.dispatch; +resourceManager.render = function (appContainer) { + render( + + + , + appContainer + ); +}; + diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/AddFolderPanel.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/AddFolderPanel.js new file mode 100644 index 00000000000..26c199c1867 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/AddFolderPanel.js @@ -0,0 +1,44 @@ +import addFolderPanelActionsTypes from "../action types/addFolderPanelActionsTypes"; +import folderPanelActionsTypes from "../action types/folderPanelActionsTypes"; + +const initialState = { + expanded: false +}; + +export default function addFolderPanelReducer(state = initialState, action) { + const data = action.data; + switch (action.type) { + case addFolderPanelActionsTypes.SHOW_ADD_FOLDER_PANEL: + return { ...state, expanded: true }; + case addFolderPanelActionsTypes.FOLDER_CREATED: + return { ...state, newFolderId: data.FolderID, expanded: false }; + case folderPanelActionsTypes.CLOSE_TOP_PANELS: + case addFolderPanelActionsTypes.HIDE_ADD_FOLDER_PANEL: { + let formData = { + name: "", + folderType: state.defaultFolderType + }; + let res = { ...state, formData, expanded: false, newFolderId: null }; + delete res.validationErrors; + + return res; + } + case addFolderPanelActionsTypes.FOLDER_MAPPINGS_LOADED: { + let defaultFolderType = data && data[0] ? data[0].FolderMappingID : null; + let formData = { ...state.formData, folderType: defaultFolderType }; + return { ...state, formData, folderMappings: data, defaultFolderType }; + } + case addFolderPanelActionsTypes.CHANGE_NAME: { + let formData = { ...state.formData, name: data }; + return { ...state, formData }; + } + case addFolderPanelActionsTypes.CHANGE_FOLDER_TYPE: { + let formData = { ...state.formData, folderType: data }; + return { ...state, formData }; + } + case addFolderPanelActionsTypes.SET_VALIDATION_ERRORS: + return { ...state, validationErrors: data }; + } + + return state; +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/addAssetPanel.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/addAssetPanel.js new file mode 100644 index 00000000000..a515cfcb4d2 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/addAssetPanel.js @@ -0,0 +1,47 @@ +import addAssetPanelActionsTypes from "../action types/addAssetPanelActionsTypes"; +import folderPanelActionsTypes from "../action types/folderPanelActionsTypes"; + +const initialState = { + expanded: false, + progress: {}, + uploadedFiles: [] +}; + +function mutateFileProgress(progress, fileProgress) { + return { ...progress, [fileProgress.fileName]: fileProgress }; +} + +export default function addFolderPanelReducer(state = initialState, action) { + const data = action.data; + switch (action.type) { + case addAssetPanelActionsTypes.SHOW_ADD_ASSET_PANEL: + return { ...state, expanded: true }; + case folderPanelActionsTypes.CLOSE_TOP_PANELS: + case addAssetPanelActionsTypes.HIDE_ADD_ASSET_PANEL: { + return { ...state, expanded: false }; + } + case addAssetPanelActionsTypes.RESET_PANEL: + return { ...state, error: null, progress: {}, uploadedFiles: [] }; + case addAssetPanelActionsTypes.ASSET_ADDED: { + let uploadedFiles = [ ...state.uploadedFiles, data ]; + let fileProgress = { ...state.progress[data.fileName], completed: true, path: data.path, fileIconUrl: data.fileIconUrl }; + return { ...state, uploadedFiles, progress: mutateFileProgress(state.progress, fileProgress) }; + } + case addAssetPanelActionsTypes.ASSET_ADDED_ERROR: { + const fileProgress = { ...state.progress[data.fileName], fileName: data.fileName, error: data.message}; + return { ...state, progress: mutateFileProgress(state.progress, fileProgress) }; + } + case addAssetPanelActionsTypes.UPDATE_PROGRESS: + return { ...state, progress: mutateFileProgress(state.progress, data) }; + case addAssetPanelActionsTypes.FILE_ALREADY_EXIST: { + const fileProgress = { ...state.progress[data.fileName], path: data.path, fileIconUrl: data.fileIconUrl, percent: 0, alreadyExists: true }; + return { ...state, progress: mutateFileProgress(state.progress, fileProgress) }; + } + case addAssetPanelActionsTypes.STOP_UPLOAD: { + const fileProgress = { ...state.progress[data], alreadyExists:false, stopped: true }; + return { ...state, progress: mutateFileProgress(state.progress, fileProgress) }; + } + } + + return state; +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/breadcrumbs.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/breadcrumbs.js new file mode 100644 index 00000000000..a78ef40d5d7 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/breadcrumbs.js @@ -0,0 +1,50 @@ +import globalActionsTypes from "../action types/globalActionsTypes"; +import folderPanelActionsTypes from "../action types/folderPanelActionsTypes"; + +const initialState = { + breadcrumbs: [] +}; + +export default function breadcrumbsReducer(state = initialState, action) { + const data = action.data; + switch (action.type) { + case globalActionsTypes.MODULE_PARAMETERS_LOADED : { + const {openFolderId} = data; + let breadcrumbs = initialState.breadcrumbs; + if (openFolderId) { + breadcrumbs = [{folderId: data.homeFolderId}]; + } + + return { ...state, breadcrumbs }; + } + case folderPanelActionsTypes.CONTENT_LOADED : { + let found = false; + const { folderId, folderName, folderPath, folderParentId } = data.folder; + let folderLoaded = { folderId, folderName: !folderName && !folderPath ? "Site Root" : folderName }; + let breadcrumbs = state.breadcrumbs.slice(); + + for (let i = 0; i < breadcrumbs.length; i++) { + let breadcrumb = breadcrumbs[i]; + if (breadcrumb.folderId === folderId) { + breadcrumbs = breadcrumbs.slice(0, i); + found = true; + break; + } + else if (breadcrumb.folderId === folderParentId) { + breadcrumbs = breadcrumbs.slice(0, i+1); + found = true; + break; + } + } + + if (!found) { + breadcrumbs = breadcrumbs.slice(0, 1); + } + + breadcrumbs.push(folderLoaded); + return { ...state, breadcrumbs }; + } + } + + return state; +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/dialogModal.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/dialogModal.js new file mode 100644 index 00000000000..7b2b4a81c73 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/dialogModal.js @@ -0,0 +1,23 @@ +import dialogModalActionsTypes from "../action types/dialogModalActionsTypes"; +import folderPanelActionsTypes from "../action types/folderPanelActionsTypes"; + +export default function dialogModalReducer(state = {}, action) { + const data = action.data; + + switch (action.type) { + case dialogModalActionsTypes.OPEN_DIALOG_MODAL : { + return Object.assign({}, state, data); + } + case dialogModalActionsTypes.CLOSE_DIALOG_MODAL : + case folderPanelActionsTypes.FOLDER_DELETED : + case folderPanelActionsTypes.DELETE_FOLDER_ERROR : { + let res = { ...state }; + delete res.dialogMessage; + delete res.yesFunction; + delete res.noFunction; + return res; + } + } + + return state; +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/folderPanel.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/folderPanel.js new file mode 100644 index 00000000000..e42b98f475a --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/folderPanel.js @@ -0,0 +1,58 @@ +import globalActionsTypes from "../action types/globalActionsTypes"; +import folderPanelActionsTypes from "../action types/folderPanelActionsTypes"; +import itemDetailsActionsTypes from "../action types/itemDetailsActionsTypes"; + +const initialState = { + loadedItems: 0, + numItems: 0, + sorting: "", + hasAddPermission: false +}; + +export default function folderPanelReducer(state = initialState, action) { + const data = action.data; + switch (action.type) { + case globalActionsTypes.MODULE_PARAMETERS_LOADED : { + return { ...state, homeFolderId: data.homeFolderId, currentFolderId: data.openFolderId || data.homeFolderId, + numItems: data.numItems, itemWidth: data.itemWidth, sortOptions: data.sortingOptions, sorting: data.sorting }; + } + case folderPanelActionsTypes.SET_LOADING : { + return { ...state, loading: data}; + } + case folderPanelActionsTypes.FILES_SEARCHED : { + let res = Object.assign({}, state, data); + delete res.newItem; + return { ...res, loadedItems: data.items.length }; + } + case folderPanelActionsTypes.CONTENT_LOADED : { + let res = Object.assign({}, state, data); + delete res.newItem; + delete res.search; + const {folder, items, hasAddPermission} = data; + const currentFolderName = !folder.folderName && !folder.folderPath ? "Root" : folder.folderName; + return { ...res, currentFolderId: folder.folderId, currentFolderName, loadedItems: items.length, hasAddPermission }; + } + case folderPanelActionsTypes.MORE_CONTENT_LOADED: { + let items = state.items.slice(); + items = items.concat(data.items); + return { ...state, items, loadedItems: items.length, hasAddPermission: data.hasAddPermission }; + } + case folderPanelActionsTypes.CHANGE_SEARCH: { + return { ...state, search: data }; + } + case itemDetailsActionsTypes.ITEM_SAVED : { + let itemUpdated = data; + let items = state.items.slice(); + let updatedItemIndex = items.findIndex(x => x.isFolder === itemUpdated.isFolder && x.itemId === itemUpdated.itemId); + + items[updatedItemIndex] = { ...items[updatedItemIndex], itemName: itemUpdated.itemName }; + + return { ...state, items }; + } + case folderPanelActionsTypes.CHANGE_SORTING : { + return { ...state, sorting: data }; + } + } + + return state; +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/infiniteScroll.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/infiniteScroll.js new file mode 100644 index 00000000000..0261e045f83 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/infiniteScroll.js @@ -0,0 +1,22 @@ +import infiniteScrollActionsTypes from "../action types/infiniteScrollActionsTypes"; +import folderPanelActionsTypes from "../action types/folderPanelActionsTypes"; + +const initialState = { + maxScrollTop: 0 +}; + +export default function dialogModalReducer(state = initialState, action) { + const data = action.data; + + switch (action.type) { + case infiniteScrollActionsTypes.SET_MAX_SCROLL_TOP : { + return { ...state, maxScrollTop: data}; + } + case folderPanelActionsTypes.CONTENT_LOADED : + case folderPanelActionsTypes.FILES_SEARCHED : { + return { ...state, maxScrollTop: 0 }; + } + } + + return state; +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/itemDetails.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/itemDetails.js new file mode 100644 index 00000000000..f9be76284df --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/itemDetails.js @@ -0,0 +1,51 @@ +import itemDetailsActionsTypes from "../action types/itemDetailsActionsTypes"; + +const initialState = { + maxScrollTop: 0 +}; + +export default function itemDetailsReducer(state = initialState, action) { + const data = action.data; + + switch (action.type) { + case itemDetailsActionsTypes.EDIT_ITEM: { + return { ...state, itemEditing: data }; + } + case itemDetailsActionsTypes.MOVE_ITEM: { + return { ...state, itemMoving: data }; + } + case itemDetailsActionsTypes.CHANGE_NAME: { + let itemEditing = { ...state.itemEditing, fileName: data, folderName: data}; + return { ...state, itemEditing }; + } + case itemDetailsActionsTypes.CHANGE_TITLE: { + let itemEditing = { ...state.itemEditing, title: data }; + return { ...state, itemEditing }; + } + case itemDetailsActionsTypes.CHANGE_DESCRIPTION: { + let itemEditing = { ...state.itemEditing, description: data }; + return { ...state, itemEditing }; + } + case itemDetailsActionsTypes.CHANGE_PERMISSIONS: { + let itemEditing = { ...state.itemEditing, permissions: data }; + return { ...state, itemEditing }; + } + case itemDetailsActionsTypes.SET_VALIDATION_ERRORS: { + return { ...state, validationErrors: data }; + } + case itemDetailsActionsTypes.ITEM_SAVED : + case itemDetailsActionsTypes.CANCEL_EDIT_ITEM: { + let res = { ...state }; + delete res.itemEditing; + return res; + } + case itemDetailsActionsTypes.ITEM_MOVED : + case itemDetailsActionsTypes.CANCEL_MOVE_ITEM : { + let res = { ...state }; + delete res.itemMoving; + return res; + } + } + + return state; +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/manageFolderTypesPanel.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/manageFolderTypesPanel.js new file mode 100644 index 00000000000..3e90e5c347d --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/manageFolderTypesPanel.js @@ -0,0 +1,20 @@ +import manageFolderTypesPanelActionTypes from "../action types/manageFolderTypesPanelActionsTypes"; +import folderPanelActionTypes from "../action types/folderPanelActionsTypes"; + +const initialState = { + expanded: false +}; + +export default function manageFolderTypesPanelReducer(state = initialState, action) { + switch (action.type) { + case manageFolderTypesPanelActionTypes.SHOW_MANAGE_FOLDER_TYPES_PANEL: + return { ...state, expanded: true }; + case folderPanelActionTypes.CLOSE_TOP_PANELS: + case manageFolderTypesPanelActionTypes.HIDE_MANAGE_FOLDER_TYPES_PANEL: + return { ...state, expanded: false }; + case manageFolderTypesPanelActionTypes.ADD_FOLDER_TYPE_URL_LOADED: + return { ...state, addFolderTypeUrl: action.data }; + } + + return state; +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/messageModal.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/messageModal.js new file mode 100644 index 00000000000..6f0fb9296a4 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/messageModal.js @@ -0,0 +1,34 @@ +import messageModalActionsTypes from "../action types/messageModalActionsTypes"; +import folderPanelActionsTypes from "../action types/folderPanelActionsTypes"; +import itemDetailsActionsTypes from "../action types/itemDetailsActionsTypes"; +import addFolderPanelActionsTypes from "../action types/addFolderPanelActionsTypes"; +import localizeService from "../services/localizeService"; + +export default function messageModalReducer(state = {}, action) { + const data = action.data; + + switch (action.type) { + case messageModalActionsTypes.CLOSE_MESSAGE_MODAL : { + let res = { ...state }; + delete res.infoMessage; + delete res.errorMessage; + return res; + } + case itemDetailsActionsTypes.EDIT_ITEM_ERROR : + case itemDetailsActionsTypes.SAVE_ITEM_ERROR : + case folderPanelActionsTypes.DELETE_FILE_ERROR: + case folderPanelActionsTypes.DELETE_FOLDER_ERROR: + case folderPanelActionsTypes.LOAD_CONTENT_ERROR : + case addFolderPanelActionsTypes.ADD_FOLDER_ERROR: { + return { ...state, infoMessage: data}; + } + case itemDetailsActionsTypes.ITEM_SAVED : { + return { ...state, infoMessage: localizeService.getString("ItemSavedMessage") }; + } + case folderPanelActionsTypes.URL_COPIED_TO_CLIPBOARD : { + return { ...state, infoMessage: localizeService.getString("UrlCopiedMessage") }; + } + } + + return state; +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/module.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/module.js new file mode 100644 index 00000000000..078b81b3f8a --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/module.js @@ -0,0 +1,20 @@ +import globalActionsTypes from "../action types/globalActionsTypes"; + +const initialState = { + isEditMode: false, + moduleId: -1, + moduleName: "", + tabId: -1, + portalId: -1, + isAdmin: false +}; + +export default function moduleReducer(state = initialState, action) { + const data = action.data; + + switch (action.type) { + case globalActionsTypes.MODULE_PARAMETERS_LOADED: + return Object.assign({}, state, data); + } + return state; +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/rootReducer.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/rootReducer.js new file mode 100644 index 00000000000..34e49f3c7b8 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/rootReducer.js @@ -0,0 +1,28 @@ +import { combineReducers } from "redux"; +import module from "./module"; +import folderPanel from "./folderPanel"; +import breadcrumbs from "./breadcrumbs"; +import addFolderPanel from "./addFolderPanel"; +import addAssetPanel from "./addAssetPanel"; +import dialogModal from "./dialogModal"; +import infiniteScroll from "./infiniteScroll"; +import messageModal from "./messageModal"; +import itemDetails from "./itemDetails"; +import topBar from "./topBar"; +import manageFolderTypesPanel from "./manageFolderTypesPanel"; + +const rootReducer = combineReducers({ + module, + folderPanel, + breadcrumbs, + addFolderPanel, + addAssetPanel, + dialogModal, + infiniteScroll, + messageModal, + itemDetails, + topBar, + manageFolderTypesPanel, +}); + +export default rootReducer; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/topBar.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/topBar.js new file mode 100644 index 00000000000..8ba386dcec3 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/reducers/topBar.js @@ -0,0 +1,17 @@ +import topBarActionsTypes from "../action types/topBarActionsTypes"; +import folderPanelActionsTypes from "../action types/folderPanelActionsTypes"; + +export default function topBarReducer(state = {}, action) { + const data = action.data; + + switch (action.type) { + case topBarActionsTypes.CHANGE_SEARCH_FIELD: { + return { ...state, search: data }; + } + case folderPanelActionsTypes.CONTENT_LOADED: { + return { ...state, search: undefined }; + } + } + + return state; +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/services/internalService.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/services/internalService.js new file mode 100644 index 00000000000..f08c1094e3b --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/services/internalService.js @@ -0,0 +1,28 @@ +import api from "../globals/api"; + +const API_PATH = "InternalServices/API/"; +const GET_FOLDERS_ENDPOINT = API_PATH + "ItemListService/GetFolders"; +const SEARCH_FOLDERS_ENDPOINT = API_PATH + "ItemListService/SearchFolders"; +const GET_FOLDER_DESCENDANT_ENDPOINT = API_PATH + "ItemListService/GetFolderDescendants"; + +function getUrl(endpoint) { + return api.getServiceRoot(true) + endpoint; +} + +function getFolders() { + return api.get(getUrl(GET_FOLDERS_ENDPOINT)); +} + +function searchFolders(searchText) { + return api.get(getUrl(SEARCH_FOLDERS_ENDPOINT), {searchText}); +} + +function getFolderDescendant(parentId) { + return api.get(getUrl(GET_FOLDER_DESCENDANT_ENDPOINT), {parentId}); +} + +export default { + getFolders, + searchFolders, + getFolderDescendant +}; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/services/itemsService.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/services/itemsService.js new file mode 100644 index 00000000000..97389ae4268 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/services/itemsService.js @@ -0,0 +1,159 @@ +import api from "../globals/api"; + +const GET_CONTENT_ENDPOINT = "Items/GetFolderContent"; +const SYNC_CONTENT_ENDPOINT = "Items/SyncFolderContent"; +const DOWNLOAD_FILE_ENDPOINT = "Items/Download"; +const FILE_DETAILS_ENDPOINT = "Items/GetFileDetails"; +const FOLDER_DETAILS_ENDPOINT = "Items/GetFolderDetails"; +const LOAD_FOLDER_MAPPINGS_ENDPOINT = "Items/GetFolderMappings"; +const ADD_FOLDER_ENDPOINT = "Items/CreateNewFolder"; +const DELETE_FOLDER_ENDPOINT = "Items/DeleteFolder"; +const DELETE_FILE_ENDPOINT = "Items/DeleteFile"; +const API_PATH = "InternalServices/API/"; +const FILE_UPLOAD = API_PATH + "FileUpload/UploadFromLocal"; +const SEARCH_FILES_ENDPOINT = "Items/Search"; +const SAVE_FILE_DETAILS_ENDPOINT = "Items/SaveFileDetails"; +const SAVE_FOLDER_DETAILS_ENDPOINT = "Items/SaveFolderDetails"; +const REMOVE_FOLDER_TYPE_ENDPOINT = "Items/RemoveFolderType"; +const ADD_FOLDER_TYPE_URL_ENDPOINT = "Items/GetAddFolderTypeUrl"; +const MOVE_FOLDER_URL_ENDPOINT = "Items/MoveFolder"; +const MOVE_FILE_URL_ENDPOINT = "Items/MoveFile"; + +function getUrl(endpoint, ignoreCurrentModuleAPI=false) { + return api.getServiceRoot(ignoreCurrentModuleAPI) + endpoint; +} + +function getContent(folderId, startIndex, numItems, sorting) { + return api.get(getUrl(GET_CONTENT_ENDPOINT), {folderId, startIndex, numItems, sorting}) + .then(response => { + return response; + }); +} + +function syncContent(folderId, numItems, sorting, recursive) { + return api.get(getUrl(SYNC_CONTENT_ENDPOINT), {folderId, numItems, sorting, recursive}) + .then(response => { + return response; + }); +} + +function getDownloadUrl(fileId) { + let {moduleId, tabId} = api.getHeadersObject(); + return getUrl(DOWNLOAD_FILE_ENDPOINT) + "?forceDownload=true&fileId=" + fileId + "&moduleId=" + moduleId + "&tabId=" + tabId; +} + +function loadFolderMappings() { + return (api.get(getUrl(LOAD_FOLDER_MAPPINGS_ENDPOINT))) + .then(response => { + return response; + }); +} + +function addFolder(data) { + return api.post(getUrl(ADD_FOLDER_ENDPOINT), data, { "Content-Type":"application/json" }); +} + +function deleteFolder(folderId) { + return api.post(getUrl(DELETE_FOLDER_ENDPOINT), {folderId}, { "Content-Type":"application/json" }); +} + +function deleteFile(fileId) { + return api.post(getUrl(DELETE_FILE_ENDPOINT), {fileId}, { "Content-Type":"application/json" }); +} + +function moveFolder(sourceFolderId, destinationFolderId) { + const data = { sourceFolderId, destinationFolderId } + return api.post(getUrl(MOVE_FOLDER_URL_ENDPOINT), data, { "Content-Type": "application/json" }); +} + +function moveFile(sourceFileId, destinationFolderId) { + const data = {sourceFileId, destinationFolderId}; + return api.post(getUrl(MOVE_FILE_URL_ENDPOINT), data, {"Content-Type": "application/json"}); +} + +function getFileDetails(fileId) { + return api.get(getUrl(FILE_DETAILS_ENDPOINT), {fileId}); +} + +function getFolderDetails(folderId) { + return api.get(getUrl(FOLDER_DETAILS_ENDPOINT), {folderId}); +} + +function uploadFile(file, folderPath, overwrite, trackProgress) { + const formData = new FormData(); + formData.append("postfile", file); + if (folderPath && typeof folderPath === "string") { + formData.append("folder", folderPath); + } + if (overwrite && typeof overwrite === "boolean") { + formData.append("overwrite", overwrite); + } + let {extensionWhitelist, validationCode} = api.getWhitelistObject(); + formData.append("filter", extensionWhitelist); + formData.append("validationCode", validationCode); + const url = getUrl(FILE_UPLOAD, true); + + return api.postFile(url, formData, trackProgress); +} + +function searchFiles(folderId, search, pageIndex, pageSize, sorting, culture) { + return api.get(getUrl(SEARCH_FILES_ENDPOINT), {folderId, search, pageIndex, pageSize, sorting, culture}) + .then(response => { + return response; + }); +} + +function getItemFullUrl(relativeUrl) { + return location.protocol + "//" + location.hostname + (location.port ? ":" + location.port : "") + relativeUrl; +} + +function getFolderUrl(folderId) { + return location.protocol + "//" + location.host + location.pathname + "?folderId=" + folderId; +} + +function getIconUrl(item) { + if (item.isFolder) { + return item.iconUrl; + } else { + return !item.thumbnailAvailable ? item.iconUrl : item.thumbnailUrl; + } +} + +function saveFileDetails(item) { + return api.post(getUrl(SAVE_FILE_DETAILS_ENDPOINT), item, { "Content-Type":"application/json" }); +} + +function saveFolderDetails(item) { + return api.post(getUrl(SAVE_FOLDER_DETAILS_ENDPOINT), item, { "Content-Type":"application/json" }); +} + +function removeFolderType(folderMappingId) { + return api.postPrimitive(getUrl(REMOVE_FOLDER_TYPE_ENDPOINT), folderMappingId.toString()); +} + +function getAddFolderTypeUrl() { + return api.get(getUrl(ADD_FOLDER_TYPE_URL_ENDPOINT)) +} + +export default { + getContent, + syncContent, + getDownloadUrl, + loadFolderMappings, + addFolder, + deleteFolder, + deleteFile, + getFileDetails, + getFolderDetails, + uploadFile, + searchFiles, + getItemFullUrl, + getFolderUrl, + getIconUrl, + saveFileDetails, + saveFolderDetails, + removeFolderType, + getAddFolderTypeUrl, + moveFolder, + moveFile, +}; \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/services/localizeService.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/services/localizeService.js new file mode 100644 index 00000000000..a2a3db54389 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/services/localizeService.js @@ -0,0 +1,19 @@ +let localization = {}; +let initialized = false; + +function init(localizedResources) { + localization = localizedResources; + initialized = true; +} + +function getString(key) { + if (!initialized) { + throw new Error("please call init method before use this method"); + } + return localization[key] || "[" + key + "]"; +} + +export default { + init, + getString +}; diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/store/configureStore.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/store/configureStore.js new file mode 100644 index 00000000000..e4c7fbe3a20 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/app/store/configureStore.js @@ -0,0 +1,21 @@ +import { createStore, applyMiddleware, compose } from "redux"; +import thunkMiddleware from "redux-thunk"; +import reduxImmutableStateInvariant from "redux-immutable-state-invariant"; +import rootReducer from "../reducers/rootReducer"; +import DevTools from "../containers/DevTools"; + +/* eslint-disable no-undef */ +const IS_PRODUCTION = process.env.NODE_ENV === "production"; + +export default function configureStore(initialState) { + const store = createStore( + rootReducer, + initialState, + compose( + IS_PRODUCTION ? + applyMiddleware(thunkMiddleware) : + applyMiddleware(thunkMiddleware, reduxImmutableStateInvariant()), DevTools.instrument() + ) + ); + return store; +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/package.json b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/package.json new file mode 100644 index 00000000000..a4c5fb1661d --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/package.json @@ -0,0 +1,71 @@ +{ + "name": "resource-library", + "version": "9.8.0", + "description": "Resource Library", + "private": true, + "scripts": { + "build": "set NODE_ENV=production&&webpack -p", + "debug": "set NODE_ENV=debug&&webpack -p", + "webpack": "webpack-dev-server -d --port 8080 --hot --inline --content-base dist/ --history-api-fallback", + "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", + "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer" + }, + "author": "", + "license": "MIT", + "devDependencies": { + "@babel/core": "^7.2.0", + "@babel/plugin-proposal-class-properties": "^7.10.4", + "@babel/plugin-transform-arrow-functions": "^7.10.4", + "@babel/preset-env": "^7.2.0", + "@babel/preset-react": "^7.0.0", + "@dnnsoftware/dnn-react-common": "9.8.0", + "babel-eslint": "^10.1.0", + "babel-loader": "8.0.6", + "babel-plugin-transform-object-assign": "6.22.0", + "babel-plugin-transform-object-rest-spread": "6.26.0", + "babel-plugin-transform-react-remove-prop-types": "0.4.24", + "babel-polyfill": "6.26.0", + "css-loader": "2.1.1", + "eslint": "5.8.0", + "eslint-loader": "2.1.1", + "eslint-plugin-babel": "5.3.0", + "eslint-plugin-filenames": "1.3.2", + "eslint-plugin-import": "2.21.2", + "eslint-plugin-react": "7.11.1", + "eslint-plugin-spellcheck": "0.0.11", + "prop-types": "^15.7.2", + "webpack": "4.43.0", + "webpack-bundle-size-analyzer": "3.1.0", + "webpack-cli": "3.3.11", + "webpack-dev-server": "3.11.0" + }, + "dependencies": { + "copy-to-clipboard": "^3.0.5", + "es6-shim": "0.35.0", + "fetch-ie8": "1.4.2", + "file-loader": "3.0.1", + "less": "3.9.0", + "less-loader": "5.0.0", + "lodash": "^4.17.4", + "raw-loader": "2.0.0", + "react": "^16.6.3", + "react-dom": "^16.6.3", + "react-dropzone": "6.2.4", + "react-height": "^3.0.1", + "react-hot-loader": "4.8.5", + "react-modal": "^3.5.1", + "react-motion": "^0.5.2", + "react-redux": "^5.1.1", + "react-tooltip": "^4.2.6", + "react-transition-group": "^1.2.0", + "redux": "^4.0.1", + "redux-devtools": "^3.5.0", + "redux-devtools-dock-monitor": "^1.1.3", + "redux-devtools-log-monitor": "^1.4.0", + "redux-immutable-state-invariant": "^2.1.0", + "redux-thunk": "^2.3.0", + "style-loader": "0.23.1", + "superagent": "^3.2.1", + "url-loader": "1.1.2" + } +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/webpack.config.js b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/webpack.config.js new file mode 100644 index 00000000000..94cbf632905 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/webpack.config.js @@ -0,0 +1,131 @@ +const webpack = require("webpack"); +const packageJson = require("./package.json"); +const path = require("path"); +const isProduction = process.env.NODE_ENV === "production"; +const settings = require("../../../../settings.local.json"); + +module.exports = { + entry: "./app/main.jsx", + optimization: { + minimize: isProduction + }, + output: { + path: + isProduction || settings.WebsitePath == "" + ? path.resolve( + __dirname, + "../scripts/" + ) + : settings.WebsitePath + + "\\DesktopModules\\ResourceManager\\scripts", + publicPath: isProduction ? "" : "http://localhost:8080/dist/", + filename: "resourceManager-bundle.js" + }, + devServer: { + disableHostCheck: !isProduction + }, + resolve: { + extensions: ["*", ".js", ".json", ".jsx"], + modules: [ + path.resolve("./src"), // Look in src first + path.resolve("./node_modules"), // Try local node_modules + path.resolve("../../../../node_modules") // Last fallback to workspaces node_modules + ] + }, + module: { + rules: [ + { + test: /\.(js|jsx)$/, + exclude: /node_modules/, + enforce: "pre", + loader: "eslint-loader", + options: { + fix: true + } + }, + { + test: /\.less$/, + use: [ + { + loader: "style-loader" // creates style nodes from JS strings + }, + { + loader: "css-loader", // translates CSS into CommonJS + options: { modules: "global" } + }, + { + loader: "less-loader" // compiles Less to CSS + } + ] + }, + { + test: /\.css$/, + use: [ + { + loader: "style-loader" + }, + { + loader: "css-loader", + options: { modules: "global" } + } + ] + }, + { + test: /\.(js|jsx)$/, + exclude: /node_modules/, + use: { + loader: "babel-loader", + options: { + presets: ["@babel/preset-env", "@babel/preset-react"] + } + } + }, + { + test: /\.(ttf|woff)$/, + use: { + loader: "url-loader?limit=8192" + } + }, + { + test: /\.(gif|png)$/, + use: { + loader: "url-loader?mimetype=image/png" + } + }, + { + test: /\.woff(2)?(\?v=[0-9].[0-9].[0-9])?$/, + use: { + loader: "url-loader?mimetype=application/font-woff" + } + }, + { + test: /\.(ttf|eot)(\?v=[0-9].[0-9].[0-9])?$/, + use: { + loader: "file-loader?name=[name].[ext]" + } + }, + { + test: /\.(svg)/, + use: { + loader: "raw-loader" + } + } + ] + }, + + plugins: isProduction + ? [ + new webpack.DefinePlugin({ + VERSION: JSON.stringify(packageJson.version), + "process.env": { + NODE_ENV: JSON.stringify("production") + } + }) + ] + : [ + new webpack.DefinePlugin({ + VERSION: JSON.stringify(packageJson.version) + }) + ], + devtool: "source-map" +}; diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/yarn.lock b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/yarn.lock new file mode 100644 index 00000000000..140d5c16a90 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/yarn.lock @@ -0,0 +1,6944 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.1.tgz#d5481c5095daa1c57e16e54c6f9198443afb49ff" + integrity sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw== + dependencies: + "@babel/highlight" "^7.10.1" + +"@babel/code-frame@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" + integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== + dependencies: + "@babel/highlight" "^7.10.4" + +"@babel/compat-data@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.10.1.tgz#b1085ffe72cd17bf2c0ee790fc09f9626011b2db" + integrity sha512-CHvCj7So7iCkGKPRFUfryXIkU2gSBw7VSZFYLsqVhrS47269VK2Hfi9S/YcublPMW8k1u2bQBlbDruoQEm4fgw== + dependencies: + browserslist "^4.12.0" + invariant "^2.2.4" + semver "^5.5.0" + +"@babel/core@^7.2.0": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.10.1.tgz#2a0ad0ea693601820defebad2140206503d89af3" + integrity sha512-u8XiZ6sMXW/gPmoP5ijonSUln4unazG291X0XAQ5h0s8qnAFr6BRRZGUEK+jtRWdmB0NTJQt7Uga25q8GetIIg== + dependencies: + "@babel/code-frame" "^7.10.1" + "@babel/generator" "^7.10.1" + "@babel/helper-module-transforms" "^7.10.1" + "@babel/helpers" "^7.10.1" + "@babel/parser" "^7.10.1" + "@babel/template" "^7.10.1" + "@babel/traverse" "^7.10.1" + "@babel/types" "^7.10.1" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.2" + lodash "^4.17.13" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.10.1.tgz#4d14458e539bcb04ffe34124143f5c489f2dbca9" + integrity sha512-AT0YPLQw9DI21tliuJIdplVfLHya6mcGa8ctkv7n4Qv+hYacJrKmNWIteAK1P9iyLikFIAkwqJ7HAOqIDLFfgA== + dependencies: + "@babel/types" "^7.10.1" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + +"@babel/generator@^7.11.0": + version "7.11.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.4.tgz#1ec7eec00defba5d6f83e50e3ee72ae2fee482be" + integrity sha512-Rn26vueFx0eOoz7iifCN2UHT6rGtnkSGWSoDRIy8jZN3B91PzeSULbswfLoOWuTuAcNwpG/mxy+uCTDnZ9Mp1g== + dependencies: + "@babel/types" "^7.11.0" + jsesc "^2.5.1" + source-map "^0.5.0" + +"@babel/helper-annotate-as-pure@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.1.tgz#f6d08acc6f70bbd59b436262553fb2e259a1a268" + integrity sha512-ewp3rvJEwLaHgyWGe4wQssC2vjks3E80WiUe2BpMb0KhreTjMROCbxXcEovTrbeGVdQct5VjQfrv9EgC+xMzCw== + dependencies: + "@babel/types" "^7.10.1" + +"@babel/helper-builder-binary-assignment-operator-visitor@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.1.tgz#0ec7d9be8174934532661f87783eb18d72290059" + integrity sha512-cQpVq48EkYxUU0xozpGCLla3wlkdRRqLWu1ksFMXA9CM5KQmyyRpSEsYXbao7JUkOw/tAaYKCaYyZq6HOFYtyw== + dependencies: + "@babel/helper-explode-assignable-expression" "^7.10.1" + "@babel/types" "^7.10.1" + +"@babel/helper-builder-react-jsx-experimental@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.10.1.tgz#9a7d58ad184d3ac3bafb1a452cec2bad7e4a0bc8" + integrity sha512-irQJ8kpQUV3JasXPSFQ+LCCtJSc5ceZrPFVj6TElR6XCHssi3jV8ch3odIrNtjJFRZZVbrOEfJMI79TPU/h1pQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.1" + "@babel/helper-module-imports" "^7.10.1" + "@babel/types" "^7.10.1" + +"@babel/helper-builder-react-jsx@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.10.1.tgz#a327f0cf983af5554701b1215de54a019f09b532" + integrity sha512-KXzzpyWhXgzjXIlJU1ZjIXzUPdej1suE6vzqgImZ/cpAsR/CC8gUcX4EWRmDfWz/cs6HOCPMBIJ3nKoXt3BFuw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.1" + "@babel/types" "^7.10.1" + +"@babel/helper-compilation-targets@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.10.1.tgz#ad6f69b4c3bae955081ef914a84e5878ffcaca63" + integrity sha512-YuF8IrgSmX/+MV2plPkjEnzlC2wf+gaok8ehMNN0jodF3/sejZauExqpEVGbJua62oaWoNYIXwz4RmAsVcGyHw== + dependencies: + "@babel/compat-data" "^7.10.1" + browserslist "^4.12.0" + invariant "^2.2.4" + levenary "^1.1.1" + semver "^5.5.0" + +"@babel/helper-create-class-features-plugin@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.1.tgz#6d8a45aafe492378d0e6fc0b33e5dea132eae21c" + integrity sha512-bwhdehBJZt84HuPUcP1HaTLuc/EywVS8rc3FgsEPDcivg+DCW+SHuLHVkYOmcBA1ZfI+Z/oZjQc/+bPmIO7uAA== + dependencies: + "@babel/helper-function-name" "^7.10.1" + "@babel/helper-member-expression-to-functions" "^7.10.1" + "@babel/helper-optimise-call-expression" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/helper-replace-supers" "^7.10.1" + "@babel/helper-split-export-declaration" "^7.10.1" + +"@babel/helper-create-class-features-plugin@^7.10.4": + version "7.10.5" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.5.tgz#9f61446ba80e8240b0a5c85c6fdac8459d6f259d" + integrity sha512-0nkdeijB7VlZoLT3r/mY3bUkw3T8WG/hNw+FATs/6+pG2039IJWjTYL0VTISqsNHMUTEnwbVnc89WIJX9Qed0A== + dependencies: + "@babel/helper-function-name" "^7.10.4" + "@babel/helper-member-expression-to-functions" "^7.10.5" + "@babel/helper-optimise-call-expression" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-replace-supers" "^7.10.4" + "@babel/helper-split-export-declaration" "^7.10.4" + +"@babel/helper-create-regexp-features-plugin@^7.10.1", "@babel/helper-create-regexp-features-plugin@^7.8.3": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.1.tgz#1b8feeab1594cbcfbf3ab5a3bbcabac0468efdbd" + integrity sha512-Rx4rHS0pVuJn5pJOqaqcZR4XSgeF9G/pO/79t+4r7380tXFJdzImFnxMU19f83wjSrmKHq6myrM10pFHTGzkUA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.1" + "@babel/helper-regex" "^7.10.1" + regexpu-core "^4.7.0" + +"@babel/helper-define-map@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.10.1.tgz#5e69ee8308648470dd7900d159c044c10285221d" + integrity sha512-+5odWpX+OnvkD0Zmq7panrMuAGQBu6aPUgvMzuMGo4R+jUOvealEj2hiqI6WhxgKrTpFoFj0+VdsuA8KDxHBDg== + dependencies: + "@babel/helper-function-name" "^7.10.1" + "@babel/types" "^7.10.1" + lodash "^4.17.13" + +"@babel/helper-explode-assignable-expression@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.10.1.tgz#e9d76305ee1162ca467357ae25df94f179af2b7e" + integrity sha512-vcUJ3cDjLjvkKzt6rHrl767FeE7pMEYfPanq5L16GRtrXIoznc0HykNW2aEYkcnP76P0isoqJ34dDMFZwzEpJg== + dependencies: + "@babel/traverse" "^7.10.1" + "@babel/types" "^7.10.1" + +"@babel/helper-function-name@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.1.tgz#92bd63829bfc9215aca9d9defa85f56b539454f4" + integrity sha512-fcpumwhs3YyZ/ttd5Rz0xn0TpIwVkN7X0V38B9TWNfVF42KEkhkAAuPCQ3oXmtTRtiPJrmZ0TrfS0GKF0eMaRQ== + dependencies: + "@babel/helper-get-function-arity" "^7.10.1" + "@babel/template" "^7.10.1" + "@babel/types" "^7.10.1" + +"@babel/helper-function-name@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a" + integrity sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ== + dependencies: + "@babel/helper-get-function-arity" "^7.10.4" + "@babel/template" "^7.10.4" + "@babel/types" "^7.10.4" + +"@babel/helper-get-function-arity@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz#7303390a81ba7cb59613895a192b93850e373f7d" + integrity sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw== + dependencies: + "@babel/types" "^7.10.1" + +"@babel/helper-get-function-arity@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2" + integrity sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A== + dependencies: + "@babel/types" "^7.10.4" + +"@babel/helper-hoist-variables@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.1.tgz#7e77c82e5dcae1ebf123174c385aaadbf787d077" + integrity sha512-vLm5srkU8rI6X3+aQ1rQJyfjvCBLXP8cAGeuw04zeAM2ItKb1e7pmVmLyHb4sDaAYnLL13RHOZPLEtcGZ5xvjg== + dependencies: + "@babel/types" "^7.10.1" + +"@babel/helper-member-expression-to-functions@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.1.tgz#432967fd7e12a4afef66c4687d4ca22bc0456f15" + integrity sha512-u7XLXeM2n50gb6PWJ9hoO5oO7JFPaZtrh35t8RqKLT1jFKj9IWeD1zrcrYp1q1qiZTdEarfDWfTIP8nGsu0h5g== + dependencies: + "@babel/types" "^7.10.1" + +"@babel/helper-member-expression-to-functions@^7.10.4", "@babel/helper-member-expression-to-functions@^7.10.5": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.11.0.tgz#ae69c83d84ee82f4b42f96e2a09410935a8f26df" + integrity sha512-JbFlKHFntRV5qKw3YC0CvQnDZ4XMwgzzBbld7Ly4Mj4cbFy3KywcR8NtNctRToMWJOVvLINJv525Gd6wwVEx/Q== + dependencies: + "@babel/types" "^7.11.0" + +"@babel/helper-module-imports@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.10.1.tgz#dd331bd45bccc566ce77004e9d05fe17add13876" + integrity sha512-SFxgwYmZ3HZPyZwJRiVNLRHWuW2OgE5k2nrVs6D9Iv4PPnXVffuEHy83Sfx/l4SqF+5kyJXjAyUmrG7tNm+qVg== + dependencies: + "@babel/types" "^7.10.1" + +"@babel/helper-module-transforms@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.10.1.tgz#24e2f08ee6832c60b157bb0936c86bef7210c622" + integrity sha512-RLHRCAzyJe7Q7sF4oy2cB+kRnU4wDZY/H2xJFGof+M+SJEGhZsb+GFj5j1AD8NiSaVBJ+Pf0/WObiXu/zxWpFg== + dependencies: + "@babel/helper-module-imports" "^7.10.1" + "@babel/helper-replace-supers" "^7.10.1" + "@babel/helper-simple-access" "^7.10.1" + "@babel/helper-split-export-declaration" "^7.10.1" + "@babel/template" "^7.10.1" + "@babel/types" "^7.10.1" + lodash "^4.17.13" + +"@babel/helper-optimise-call-expression@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.1.tgz#b4a1f2561870ce1247ceddb02a3860fa96d72543" + integrity sha512-a0DjNS1prnBsoKx83dP2falChcs7p3i8VMzdrSbfLhuQra/2ENC4sbri34dz/rWmDADsmF1q5GbfaXydh0Jbjg== + dependencies: + "@babel/types" "^7.10.1" + +"@babel/helper-optimise-call-expression@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz#50dc96413d594f995a77905905b05893cd779673" + integrity sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg== + dependencies: + "@babel/types" "^7.10.4" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.1", "@babel/helper-plugin-utils@^7.8.0": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz#ec5a5cf0eec925b66c60580328b122c01230a127" + integrity sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA== + +"@babel/helper-plugin-utils@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" + integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== + +"@babel/helper-regex@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.10.1.tgz#021cf1a7ba99822f993222a001cc3fec83255b96" + integrity sha512-7isHr19RsIJWWLLFn21ubFt223PjQyg1HY7CZEMRr820HttHPpVvrsIN3bUOo44DEfFV4kBXO7Abbn9KTUZV7g== + dependencies: + lodash "^4.17.13" + +"@babel/helper-remap-async-to-generator@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.10.1.tgz#bad6aaa4ff39ce8d4b82ccaae0bfe0f7dbb5f432" + integrity sha512-RfX1P8HqsfgmJ6CwaXGKMAqbYdlleqglvVtht0HGPMSsy2V6MqLlOJVF/0Qyb/m2ZCi2z3q3+s6Pv7R/dQuZ6A== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.1" + "@babel/helper-wrap-function" "^7.10.1" + "@babel/template" "^7.10.1" + "@babel/traverse" "^7.10.1" + "@babel/types" "^7.10.1" + +"@babel/helper-replace-supers@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.10.1.tgz#ec6859d20c5d8087f6a2dc4e014db7228975f13d" + integrity sha512-SOwJzEfpuQwInzzQJGjGaiG578UYmyi2Xw668klPWV5n07B73S0a9btjLk/52Mlcxa+5AdIYqws1KyXRfMoB7A== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.10.1" + "@babel/helper-optimise-call-expression" "^7.10.1" + "@babel/traverse" "^7.10.1" + "@babel/types" "^7.10.1" + +"@babel/helper-replace-supers@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz#d585cd9388ea06e6031e4cd44b6713cbead9e6cf" + integrity sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.10.4" + "@babel/helper-optimise-call-expression" "^7.10.4" + "@babel/traverse" "^7.10.4" + "@babel/types" "^7.10.4" + +"@babel/helper-simple-access@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.10.1.tgz#08fb7e22ace9eb8326f7e3920a1c2052f13d851e" + integrity sha512-VSWpWzRzn9VtgMJBIWTZ+GP107kZdQ4YplJlCmIrjoLVSi/0upixezHCDG8kpPVTBJpKfxTH01wDhh+jS2zKbw== + dependencies: + "@babel/template" "^7.10.1" + "@babel/types" "^7.10.1" + +"@babel/helper-split-export-declaration@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz#c6f4be1cbc15e3a868e4c64a17d5d31d754da35f" + integrity sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g== + dependencies: + "@babel/types" "^7.10.1" + +"@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.11.0": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f" + integrity sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg== + dependencies: + "@babel/types" "^7.11.0" + +"@babel/helper-validator-identifier@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz#5770b0c1a826c4f53f5ede5e153163e0318e94b5" + integrity sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw== + +"@babel/helper-validator-identifier@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" + integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== + +"@babel/helper-wrap-function@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.10.1.tgz#956d1310d6696257a7afd47e4c42dfda5dfcedc9" + integrity sha512-C0MzRGteVDn+H32/ZgbAv5r56f2o1fZSA/rj/TYo8JEJNHg+9BdSmKBUND0shxWRztWhjlT2cvHYuynpPsVJwQ== + dependencies: + "@babel/helper-function-name" "^7.10.1" + "@babel/template" "^7.10.1" + "@babel/traverse" "^7.10.1" + "@babel/types" "^7.10.1" + +"@babel/helpers@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.10.1.tgz#a6827b7cb975c9d9cef5fd61d919f60d8844a973" + integrity sha512-muQNHF+IdU6wGgkaJyhhEmI54MOZBKsFfsXFhboz1ybwJ1Kl7IHlbm2a++4jwrmY5UYsgitt5lfqo1wMFcHmyw== + dependencies: + "@babel/template" "^7.10.1" + "@babel/traverse" "^7.10.1" + "@babel/types" "^7.10.1" + +"@babel/highlight@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.1.tgz#841d098ba613ba1a427a2b383d79e35552c38ae0" + integrity sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg== + dependencies: + "@babel/helper-validator-identifier" "^7.10.1" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/highlight@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" + integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== + dependencies: + "@babel/helper-validator-identifier" "^7.10.4" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.10.1.tgz#2e142c27ca58aa2c7b119d09269b702c8bbad28c" + integrity sha512-AUTksaz3FqugBkbTZ1i+lDLG5qy8hIzCaAxEtttU6C0BtZZU9pkNZtWSVAht4EW9kl46YBiyTGMp9xTTGqViNg== + +"@babel/parser@^7.10.4", "@babel/parser@^7.11.0": + version "7.11.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.4.tgz#6fa1a118b8b0d80d0267b719213dc947e88cc0ca" + integrity sha512-MggwidiH+E9j5Sh8pbrX5sJvMcsqS5o+7iB42M9/k0CD63MjYbdP4nhSh7uB5wnv2/RVzTZFTxzF/kIa5mrCqA== + +"@babel/parser@^7.7.0": + version "7.10.2" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.10.2.tgz#871807f10442b92ff97e4783b9b54f6a0ca812d0" + integrity sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ== + +"@babel/plugin-proposal-async-generator-functions@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.1.tgz#6911af5ba2e615c4ff3c497fe2f47b35bf6d7e55" + integrity sha512-vzZE12ZTdB336POZjmpblWfNNRpMSua45EYnRigE2XsZxcXcIyly2ixnTJasJE4Zq3U7t2d8rRF7XRUuzHxbOw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/helper-remap-async-to-generator" "^7.10.1" + "@babel/plugin-syntax-async-generators" "^7.8.0" + +"@babel/plugin-proposal-class-properties@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.10.1.tgz#046bc7f6550bb08d9bd1d4f060f5f5a4f1087e01" + integrity sha512-sqdGWgoXlnOdgMXU+9MbhzwFRgxVLeiGBqTrnuS7LC2IBU31wSsESbTUreT2O418obpfPdGUR2GbEufZF1bpqw== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-proposal-class-properties@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.10.4.tgz#a33bf632da390a59c7a8c570045d1115cd778807" + integrity sha512-vhwkEROxzcHGNu2mzUC0OFFNXdZ4M23ib8aRRcJSsW8BZK9pQMD7QB7csl97NBbgGZO7ZyHUyKDnxzOaP4IrCg== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-proposal-dynamic-import@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.10.1.tgz#e36979dc1dc3b73f6d6816fc4951da2363488ef0" + integrity sha512-Cpc2yUVHTEGPlmiQzXj026kqwjEQAD9I4ZC16uzdbgWgitg/UHKHLffKNCQZ5+y8jpIZPJcKcwsr2HwPh+w3XA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" + +"@babel/plugin-proposal-json-strings@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.10.1.tgz#b1e691ee24c651b5a5e32213222b2379734aff09" + integrity sha512-m8r5BmV+ZLpWPtMY2mOKN7wre6HIO4gfIiV+eOmsnZABNenrt/kzYBwrh+KOfgumSWpnlGs5F70J8afYMSJMBg== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/plugin-syntax-json-strings" "^7.8.0" + +"@babel/plugin-proposal-nullish-coalescing-operator@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.10.1.tgz#02dca21673842ff2fe763ac253777f235e9bbf78" + integrity sha512-56cI/uHYgL2C8HVuHOuvVowihhX0sxb3nnfVRzUeVHTWmRHTZrKuAh/OBIMggGU/S1g/1D2CRCXqP+3u7vX7iA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" + +"@babel/plugin-proposal-numeric-separator@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.10.1.tgz#a9a38bc34f78bdfd981e791c27c6fdcec478c123" + integrity sha512-jjfym4N9HtCiNfyyLAVD8WqPYeHUrw4ihxuAynWj6zzp2gf9Ey2f7ImhFm6ikB3CLf5Z/zmcJDri6B4+9j9RsA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/plugin-syntax-numeric-separator" "^7.10.1" + +"@babel/plugin-proposal-object-rest-spread@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.10.1.tgz#cba44908ac9f142650b4a65b8aa06bf3478d5fb6" + integrity sha512-Z+Qri55KiQkHh7Fc4BW6o+QBuTagbOp9txE+4U1i79u9oWlf2npkiDx+Rf3iK3lbcHBuNy9UOkwuR5wOMH3LIQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/plugin-syntax-object-rest-spread" "^7.8.0" + "@babel/plugin-transform-parameters" "^7.10.1" + +"@babel/plugin-proposal-optional-catch-binding@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.10.1.tgz#c9f86d99305f9fa531b568ff5ab8c964b8b223d2" + integrity sha512-VqExgeE62YBqI3ogkGoOJp1R6u12DFZjqwJhqtKc2o5m1YTUuUWnos7bZQFBhwkxIFpWYJ7uB75U7VAPPiKETA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" + +"@babel/plugin-proposal-optional-chaining@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.10.1.tgz#15f5d6d22708629451a91be28f8facc55b0e818c" + integrity sha512-dqQj475q8+/avvok72CF3AOSV/SGEcH29zT5hhohqqvvZ2+boQoOr7iGldBG5YXTO2qgCgc2B3WvVLUdbeMlGA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/plugin-syntax-optional-chaining" "^7.8.0" + +"@babel/plugin-proposal-private-methods@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.10.1.tgz#ed85e8058ab0fe309c3f448e5e1b73ca89cdb598" + integrity sha512-RZecFFJjDiQ2z6maFprLgrdnm0OzoC23Mx89xf1CcEsxmHuzuXOdniEuI+S3v7vjQG4F5sa6YtUp+19sZuSxHg== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-proposal-unicode-property-regex@^7.10.1", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.1.tgz#dc04feb25e2dd70c12b05d680190e138fa2c0c6f" + integrity sha512-JjfngYRvwmPwmnbRZyNiPFI8zxCZb8euzbCG/LxyKdeTb59tVciKo9GK9bi6JYKInk1H11Dq9j/zRqIH4KigfQ== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-syntax-async-generators@^7.8.0": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.10.1.tgz#d5bc0645913df5b17ad7eda0fa2308330bde34c5" + integrity sha512-Gf2Yx/iRs1JREDtVZ56OrjjgFHCaldpTnuy9BHla10qyVT3YkIIGEtoDWhyop0ksu1GvNjHIoYRBqm3zoR1jyQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-syntax-dynamic-import@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" + integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-json-strings@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-jsx@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.10.1.tgz#0ae371134a42b91d5418feb3c8c8d43e1565d2da" + integrity sha512-+OxyOArpVFXQeXKLO9o+r2I4dIoVoy6+Uu0vKELrlweDM3QJADZj+Z+5ERansZqIZBcLj42vHnDI8Rz9BnRIuQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.1.tgz#25761ee7410bc8cf97327ba741ee94e4a61b7d99" + integrity sha512-uTd0OsHrpe3tH5gRPTxG8Voh99/WCU78vIm5NMRYPAqC8lR4vajt6KkCAknCHrx24vkPdd/05yfdGSB4EIY2mg== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-syntax-object-rest-spread@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-top-level-await@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.10.1.tgz#8b8733f8c57397b3eaa47ddba8841586dcaef362" + integrity sha512-hgA5RYkmZm8FTFT3yu2N9Bx7yVVOKYT6yEdXXo6j2JTm0wNxgqaGeQVaSHRjhfnQbX91DtjFB6McRFSlcJH3xQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-arrow-functions@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.10.1.tgz#cb5ee3a36f0863c06ead0b409b4cc43a889b295b" + integrity sha512-6AZHgFJKP3DJX0eCNJj01RpytUa3SOGawIxweHkNX2L6PYikOZmoh5B0d7hIHaIgveMjX990IAa/xK7jRTN8OA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-arrow-functions@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.10.4.tgz#e22960d77e697c74f41c501d44d73dbf8a6a64cd" + integrity sha512-9J/oD1jV0ZCBcgnoFWFq1vJd4msoKb/TCpGNFyyLt0zABdcvgK3aYikZ8HjzB14c26bc7E3Q1yugpwGy2aTPNA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-async-to-generator@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.10.1.tgz#e5153eb1a3e028f79194ed8a7a4bf55f862b2062" + integrity sha512-XCgYjJ8TY2slj6SReBUyamJn3k2JLUIiiR5b6t1mNCMSvv7yx+jJpaewakikp0uWFQSF7ChPPoe3dHmXLpISkg== + dependencies: + "@babel/helper-module-imports" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/helper-remap-async-to-generator" "^7.10.1" + +"@babel/plugin-transform-block-scoped-functions@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.10.1.tgz#146856e756d54b20fff14b819456b3e01820b85d" + integrity sha512-B7K15Xp8lv0sOJrdVAoukKlxP9N59HS48V1J3U/JGj+Ad+MHq+am6xJVs85AgXrQn4LV8vaYFOB+pr/yIuzW8Q== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-block-scoping@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.10.1.tgz#47092d89ca345811451cd0dc5d91605982705d5e" + integrity sha512-8bpWG6TtF5akdhIm/uWTyjHqENpy13Fx8chg7pFH875aNLwX8JxIxqm08gmAT+Whe6AOmaTeLPe7dpLbXt+xUw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + lodash "^4.17.13" + +"@babel/plugin-transform-classes@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.10.1.tgz#6e11dd6c4dfae70f540480a4702477ed766d733f" + integrity sha512-P9V0YIh+ln/B3RStPoXpEQ/CoAxQIhRSUn7aXqQ+FZJ2u8+oCtjIXR3+X0vsSD8zv+mb56K7wZW1XiDTDGiDRQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.1" + "@babel/helper-define-map" "^7.10.1" + "@babel/helper-function-name" "^7.10.1" + "@babel/helper-optimise-call-expression" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/helper-replace-supers" "^7.10.1" + "@babel/helper-split-export-declaration" "^7.10.1" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.10.1.tgz#59aa399064429d64dce5cf76ef9b90b7245ebd07" + integrity sha512-mqSrGjp3IefMsXIenBfGcPXxJxweQe2hEIwMQvjtiDQ9b1IBvDUjkAtV/HMXX47/vXf14qDNedXsIiNd1FmkaQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-destructuring@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.10.1.tgz#abd58e51337815ca3a22a336b85f62b998e71907" + integrity sha512-V/nUc4yGWG71OhaTH705pU8ZSdM6c1KmmLP8ys59oOYbT7RpMYAR3MsVOt6OHL0WzG7BlTU076va9fjJyYzJMA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-dotall-regex@^7.10.1", "@babel/plugin-transform-dotall-regex@^7.4.4": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.1.tgz#920b9fec2d78bb57ebb64a644d5c2ba67cc104ee" + integrity sha512-19VIMsD1dp02RvduFUmfzj8uknaO3uiHHF0s3E1OHnVsNj8oge8EQ5RzHRbJjGSetRnkEuBYO7TG1M5kKjGLOA== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-duplicate-keys@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.10.1.tgz#c900a793beb096bc9d4d0a9d0cde19518ffc83b9" + integrity sha512-wIEpkX4QvX8Mo9W6XF3EdGttrIPZWozHfEaDTU0WJD/TDnXMvdDh30mzUl/9qWhnf7naicYartcEfUghTCSNpA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-exponentiation-operator@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.10.1.tgz#279c3116756a60dd6e6f5e488ba7957db9c59eb3" + integrity sha512-lr/przdAbpEA2BUzRvjXdEDLrArGRRPwbaF9rvayuHRvdQ7lUTTkZnhZrJ4LE2jvgMRFF4f0YuPQ20vhiPYxtA== + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-for-of@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.10.1.tgz#ff01119784eb0ee32258e8646157ba2501fcfda5" + integrity sha512-US8KCuxfQcn0LwSCMWMma8M2R5mAjJGsmoCBVwlMygvmDUMkTCykc84IqN1M7t+agSfOmLYTInLCHJM+RUoz+w== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-function-name@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.10.1.tgz#4ed46fd6e1d8fde2a2ec7b03c66d853d2c92427d" + integrity sha512-//bsKsKFBJfGd65qSNNh1exBy5Y9gD9ZN+DvrJ8f7HXr4avE5POW6zB7Rj6VnqHV33+0vXWUwJT0wSHubiAQkw== + dependencies: + "@babel/helper-function-name" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-literals@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.10.1.tgz#5794f8da82846b22e4e6631ea1658bce708eb46a" + integrity sha512-qi0+5qgevz1NHLZroObRm5A+8JJtibb7vdcPQF1KQE12+Y/xxl8coJ+TpPW9iRq+Mhw/NKLjm+5SHtAHCC7lAw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-member-expression-literals@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.10.1.tgz#90347cba31bca6f394b3f7bd95d2bbfd9fce2f39" + integrity sha512-UmaWhDokOFT2GcgU6MkHC11i0NQcL63iqeufXWfRy6pUOGYeCGEKhvfFO6Vz70UfYJYHwveg62GS83Rvpxn+NA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-modules-amd@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.1.tgz#65950e8e05797ebd2fe532b96e19fc5482a1d52a" + integrity sha512-31+hnWSFRI4/ACFr1qkboBbrTxoBIzj7qA69qlq8HY8p7+YCzkCT6/TvQ1a4B0z27VeWtAeJd6pr5G04dc1iHw== + dependencies: + "@babel/helper-module-transforms" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-commonjs@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.10.1.tgz#d5ff4b4413ed97ffded99961056e1fb980fb9301" + integrity sha512-AQG4fc3KOah0vdITwt7Gi6hD9BtQP/8bhem7OjbaMoRNCH5Djx42O2vYMfau7QnAzQCa+RJnhJBmFFMGpQEzrg== + dependencies: + "@babel/helper-module-transforms" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/helper-simple-access" "^7.10.1" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-systemjs@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.1.tgz#9962e4b0ac6aaf2e20431ada3d8ec72082cbffb6" + integrity sha512-ewNKcj1TQZDL3YnO85qh9zo1YF1CHgmSTlRQgHqe63oTrMI85cthKtZjAiZSsSNjPQ5NCaYo5QkbYqEw1ZBgZA== + dependencies: + "@babel/helper-hoist-variables" "^7.10.1" + "@babel/helper-module-transforms" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-umd@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.10.1.tgz#ea080911ffc6eb21840a5197a39ede4ee67b1595" + integrity sha512-EIuiRNMd6GB6ulcYlETnYYfgv4AxqrswghmBRQbWLHZxN4s7mupxzglnHqk9ZiUpDI4eRWewedJJNj67PWOXKA== + dependencies: + "@babel/helper-module-transforms" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-named-capturing-groups-regex@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz#a2a72bffa202ac0e2d0506afd0939c5ecbc48c6c" + integrity sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.8.3" + +"@babel/plugin-transform-new-target@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.10.1.tgz#6ee41a5e648da7632e22b6fb54012e87f612f324" + integrity sha512-MBlzPc1nJvbmO9rPr1fQwXOM2iGut+JC92ku6PbiJMMK7SnQc1rytgpopveE3Evn47gzvGYeCdgfCDbZo0ecUw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-object-super@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.10.1.tgz#2e3016b0adbf262983bf0d5121d676a5ed9c4fde" + integrity sha512-WnnStUDN5GL+wGQrJylrnnVlFhFmeArINIR9gjhSeYyvroGhBrSAXYg/RHsnfzmsa+onJrTJrEClPzgNmmQ4Gw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/helper-replace-supers" "^7.10.1" + +"@babel/plugin-transform-parameters@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.1.tgz#b25938a3c5fae0354144a720b07b32766f683ddd" + integrity sha512-tJ1T0n6g4dXMsL45YsSzzSDZCxiHXAQp/qHrucOq5gEHncTA3xDxnd5+sZcoQp+N1ZbieAaB8r/VUCG0gqseOg== + dependencies: + "@babel/helper-get-function-arity" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-property-literals@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.10.1.tgz#cffc7315219230ed81dc53e4625bf86815b6050d" + integrity sha512-Kr6+mgag8auNrgEpbfIWzdXYOvqDHZOF0+Bx2xh4H2EDNwcbRb9lY6nkZg8oSjsX+DH9Ebxm9hOqtKW+gRDeNA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-react-display-name@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.10.1.tgz#e6a33f6d48dfb213dda5e007d0c7ff82b6a3d8ef" + integrity sha512-rBjKcVwjk26H3VX8pavMxGf33LNlbocMHdSeldIEswtQ/hrjyTG8fKKILW1cSkODyRovckN/uZlGb2+sAV9JUQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-react-jsx-development@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.10.1.tgz#1ac6300d8b28ef381ee48e6fec430cc38047b7f3" + integrity sha512-XwDy/FFoCfw9wGFtdn5Z+dHh6HXKHkC6DwKNWpN74VWinUagZfDcEJc3Y8Dn5B3WMVnAllX8Kviaw7MtC5Epwg== + dependencies: + "@babel/helper-builder-react-jsx-experimental" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/plugin-syntax-jsx" "^7.10.1" + +"@babel/plugin-transform-react-jsx-self@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.10.1.tgz#22143e14388d72eb88649606bb9e46f421bc3821" + integrity sha512-4p+RBw9d1qV4S749J42ZooeQaBomFPrSxa9JONLHJ1TxCBo3TzJ79vtmG2S2erUT8PDDrPdw4ZbXGr2/1+dILA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/plugin-syntax-jsx" "^7.10.1" + +"@babel/plugin-transform-react-jsx-source@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.10.1.tgz#30db3d4ee3cdebbb26a82a9703673714777a4273" + integrity sha512-neAbaKkoiL+LXYbGDvh6PjPG+YeA67OsZlE78u50xbWh2L1/C81uHiNP5d1fw+uqUIoiNdCC8ZB+G4Zh3hShJA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/plugin-syntax-jsx" "^7.10.1" + +"@babel/plugin-transform-react-jsx@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.10.1.tgz#91f544248ba131486decb5d9806da6a6e19a2896" + integrity sha512-MBVworWiSRBap3Vs39eHt+6pJuLUAaK4oxGc8g+wY+vuSJvLiEQjW1LSTqKb8OUPtDvHCkdPhk7d6sjC19xyFw== + dependencies: + "@babel/helper-builder-react-jsx" "^7.10.1" + "@babel/helper-builder-react-jsx-experimental" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/plugin-syntax-jsx" "^7.10.1" + +"@babel/plugin-transform-react-pure-annotations@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.10.1.tgz#f5e7c755d3e7614d4c926e144f501648a5277b70" + integrity sha512-mfhoiai083AkeewsBHUpaS/FM1dmUENHBMpS/tugSJ7VXqXO5dCN1Gkint2YvM1Cdv1uhmAKt1ZOuAjceKmlLA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-regenerator@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.10.1.tgz#10e175cbe7bdb63cc9b39f9b3f823c5c7c5c5490" + integrity sha512-B3+Y2prScgJ2Bh/2l9LJxKbb8C8kRfsG4AdPT+n7ixBHIxJaIG8bi8tgjxUMege1+WqSJ+7gu1YeoMVO3gPWzw== + dependencies: + regenerator-transform "^0.14.2" + +"@babel/plugin-transform-reserved-words@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.10.1.tgz#0fc1027312b4d1c3276a57890c8ae3bcc0b64a86" + integrity sha512-qN1OMoE2nuqSPmpTqEM7OvJ1FkMEV+BjVeZZm9V9mq/x1JLKQ4pcv8riZJMNN3u2AUGl0ouOMjRr2siecvHqUQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-shorthand-properties@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.10.1.tgz#e8b54f238a1ccbae482c4dce946180ae7b3143f3" + integrity sha512-AR0E/lZMfLstScFwztApGeyTHJ5u3JUKMjneqRItWeEqDdHWZwAOKycvQNCasCK/3r5YXsuNG25funcJDu7Y2g== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-spread@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.10.1.tgz#0c6d618a0c4461a274418460a28c9ccf5239a7c8" + integrity sha512-8wTPym6edIrClW8FI2IoaePB91ETOtg36dOkj3bYcNe7aDMN2FXEoUa+WrmPc4xa1u2PQK46fUX2aCb+zo9rfw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-sticky-regex@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.10.1.tgz#90fc89b7526228bed9842cff3588270a7a393b00" + integrity sha512-j17ojftKjrL7ufX8ajKvwRilwqTok4q+BjkknmQw9VNHnItTyMP5anPFzxFJdCQs7clLcWpCV3ma+6qZWLnGMA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/helper-regex" "^7.10.1" + +"@babel/plugin-transform-template-literals@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.1.tgz#914c7b7f4752c570ea00553b4284dad8070e8628" + integrity sha512-t7B/3MQf5M1T9hPCRG28DNGZUuxAuDqLYS03rJrIk2prj/UV7Z6FOneijhQhnv/Xa039vidXeVbvjK2SK5f7Gg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-typeof-symbol@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.10.1.tgz#60c0239b69965d166b80a84de7315c1bc7e0bb0e" + integrity sha512-qX8KZcmbvA23zDi+lk9s6hC1FM7jgLHYIjuLgULgc8QtYnmB3tAVIYkNoKRQ75qWBeyzcoMoK8ZQmogGtC/w0g== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-unicode-escapes@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.10.1.tgz#add0f8483dab60570d9e03cecef6c023aa8c9940" + integrity sha512-zZ0Poh/yy1d4jeDWpx/mNwbKJVwUYJX73q+gyh4bwtG0/iUlzdEu0sLMda8yuDFS6LBQlT/ST1SJAR6zYwXWgw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/plugin-transform-unicode-regex@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.10.1.tgz#6b58f2aea7b68df37ac5025d9c88752443a6b43f" + integrity sha512-Y/2a2W299k0VIUdbqYm9X2qS6fE0CUBhhiPpimK6byy7OJ/kORLlIX+J6UrjgNu5awvs62k+6RSslxhcvVw2Tw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + +"@babel/preset-env@^7.2.0": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.10.1.tgz#099e1b76379739bdcbfab3d548dc7e7edb2ac808" + integrity sha512-bGWNfjfXRLnqbN2T4lB3pMfoic8dkRrmHpVZamSFHzGy5xklyHTobZ28TVUD2grhE5WDnu67tBj8oslIhkiOMQ== + dependencies: + "@babel/compat-data" "^7.10.1" + "@babel/helper-compilation-targets" "^7.10.1" + "@babel/helper-module-imports" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/plugin-proposal-async-generator-functions" "^7.10.1" + "@babel/plugin-proposal-class-properties" "^7.10.1" + "@babel/plugin-proposal-dynamic-import" "^7.10.1" + "@babel/plugin-proposal-json-strings" "^7.10.1" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.10.1" + "@babel/plugin-proposal-numeric-separator" "^7.10.1" + "@babel/plugin-proposal-object-rest-spread" "^7.10.1" + "@babel/plugin-proposal-optional-catch-binding" "^7.10.1" + "@babel/plugin-proposal-optional-chaining" "^7.10.1" + "@babel/plugin-proposal-private-methods" "^7.10.1" + "@babel/plugin-proposal-unicode-property-regex" "^7.10.1" + "@babel/plugin-syntax-async-generators" "^7.8.0" + "@babel/plugin-syntax-class-properties" "^7.10.1" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" + "@babel/plugin-syntax-json-strings" "^7.8.0" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" + "@babel/plugin-syntax-numeric-separator" "^7.10.1" + "@babel/plugin-syntax-object-rest-spread" "^7.8.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" + "@babel/plugin-syntax-optional-chaining" "^7.8.0" + "@babel/plugin-syntax-top-level-await" "^7.10.1" + "@babel/plugin-transform-arrow-functions" "^7.10.1" + "@babel/plugin-transform-async-to-generator" "^7.10.1" + "@babel/plugin-transform-block-scoped-functions" "^7.10.1" + "@babel/plugin-transform-block-scoping" "^7.10.1" + "@babel/plugin-transform-classes" "^7.10.1" + "@babel/plugin-transform-computed-properties" "^7.10.1" + "@babel/plugin-transform-destructuring" "^7.10.1" + "@babel/plugin-transform-dotall-regex" "^7.10.1" + "@babel/plugin-transform-duplicate-keys" "^7.10.1" + "@babel/plugin-transform-exponentiation-operator" "^7.10.1" + "@babel/plugin-transform-for-of" "^7.10.1" + "@babel/plugin-transform-function-name" "^7.10.1" + "@babel/plugin-transform-literals" "^7.10.1" + "@babel/plugin-transform-member-expression-literals" "^7.10.1" + "@babel/plugin-transform-modules-amd" "^7.10.1" + "@babel/plugin-transform-modules-commonjs" "^7.10.1" + "@babel/plugin-transform-modules-systemjs" "^7.10.1" + "@babel/plugin-transform-modules-umd" "^7.10.1" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3" + "@babel/plugin-transform-new-target" "^7.10.1" + "@babel/plugin-transform-object-super" "^7.10.1" + "@babel/plugin-transform-parameters" "^7.10.1" + "@babel/plugin-transform-property-literals" "^7.10.1" + "@babel/plugin-transform-regenerator" "^7.10.1" + "@babel/plugin-transform-reserved-words" "^7.10.1" + "@babel/plugin-transform-shorthand-properties" "^7.10.1" + "@babel/plugin-transform-spread" "^7.10.1" + "@babel/plugin-transform-sticky-regex" "^7.10.1" + "@babel/plugin-transform-template-literals" "^7.10.1" + "@babel/plugin-transform-typeof-symbol" "^7.10.1" + "@babel/plugin-transform-unicode-escapes" "^7.10.1" + "@babel/plugin-transform-unicode-regex" "^7.10.1" + "@babel/preset-modules" "^0.1.3" + "@babel/types" "^7.10.1" + browserslist "^4.12.0" + core-js-compat "^3.6.2" + invariant "^2.2.2" + levenary "^1.1.1" + semver "^5.5.0" + +"@babel/preset-modules@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.3.tgz#13242b53b5ef8c883c3cf7dddd55b36ce80fbc72" + integrity sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" + "@babel/plugin-transform-dotall-regex" "^7.4.4" + "@babel/types" "^7.4.4" + esutils "^2.0.2" + +"@babel/preset-react@^7.0.0": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.10.1.tgz#e2ab8ae9a363ec307b936589f07ed753192de041" + integrity sha512-Rw0SxQ7VKhObmFjD/cUcKhPTtzpeviEFX1E6PgP+cYOhQ98icNqtINNFANlsdbQHrmeWnqdxA4Tmnl1jy5tp3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/plugin-transform-react-display-name" "^7.10.1" + "@babel/plugin-transform-react-jsx" "^7.10.1" + "@babel/plugin-transform-react-jsx-development" "^7.10.1" + "@babel/plugin-transform-react-jsx-self" "^7.10.1" + "@babel/plugin-transform-react-jsx-source" "^7.10.1" + "@babel/plugin-transform-react-pure-annotations" "^7.10.1" + +"@babel/runtime@^7.1.2": + version "7.9.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/@babel/runtime/-/@babel/runtime-7.9.2.tgz#d90df0583a3a252f09aaa619665367bae518db06" + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/runtime@^7.8.4": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.10.1.tgz#b6eb75cac279588d3100baecd1b9894ea2840822" + integrity sha512-nQbbCbQc9u/rpg1XCxoMYQTbSMVZjCDxErQ1ClCn9Pvcmv1lGads19ep0a2VsEiIJeHqjZley6EQGEC3Yo1xMA== + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/template@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.1.tgz#e167154a94cb5f14b28dc58f5356d2162f539811" + integrity sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig== + dependencies: + "@babel/code-frame" "^7.10.1" + "@babel/parser" "^7.10.1" + "@babel/types" "^7.10.1" + +"@babel/template@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278" + integrity sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA== + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/parser" "^7.10.4" + "@babel/types" "^7.10.4" + +"@babel/traverse@^7.10.1", "@babel/traverse@^7.7.0": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.10.1.tgz#bbcef3031e4152a6c0b50147f4958df54ca0dd27" + integrity sha512-C/cTuXeKt85K+p08jN6vMDz8vSV0vZcI0wmQ36o6mjbuo++kPMdpOYw23W2XH04dbRt9/nMEfA4W3eR21CD+TQ== + dependencies: + "@babel/code-frame" "^7.10.1" + "@babel/generator" "^7.10.1" + "@babel/helper-function-name" "^7.10.1" + "@babel/helper-split-export-declaration" "^7.10.1" + "@babel/parser" "^7.10.1" + "@babel/types" "^7.10.1" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + +"@babel/traverse@^7.10.4": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.11.0.tgz#9b996ce1b98f53f7c3e4175115605d56ed07dd24" + integrity sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg== + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/generator" "^7.11.0" + "@babel/helper-function-name" "^7.10.4" + "@babel/helper-split-export-declaration" "^7.11.0" + "@babel/parser" "^7.11.0" + "@babel/types" "^7.11.0" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.19" + +"@babel/types@^7.10.1", "@babel/types@^7.4.4": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.10.1.tgz#6886724d31c8022160a7db895e6731ca33483921" + integrity sha512-L2yqUOpf3tzlW9GVuipgLEcZxnO+96SzR6fjXMuxxNkIgFJ5+07mHCZ+HkHqaeZu8+3LKnNJJ1bKbjBETQAsrA== + dependencies: + "@babel/helper-validator-identifier" "^7.10.1" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + +"@babel/types@^7.10.4", "@babel/types@^7.11.0": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.0.tgz#2ae6bf1ba9ae8c3c43824e5861269871b206e90d" + integrity sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA== + dependencies: + "@babel/helper-validator-identifier" "^7.10.4" + lodash "^4.17.19" + to-fast-properties "^2.0.0" + +"@babel/types@^7.7.0": + version "7.10.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.10.2.tgz#30283be31cad0dbf6fb00bd40641ca0ea675172d" + integrity sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng== + dependencies: + "@babel/helper-validator-identifier" "^7.10.1" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + +"@dnnsoftware/dnn-react-common@9.7.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@dnnsoftware/dnn-react-common/-/dnn-react-common-2.1.2.tgz#8af42e5f4fe8075fb80b7f62d2b1f0893fe397d3" + integrity sha512-OvPmcaMGZbSnlxweT0jmhDe9lSiJYxNtHHht+mj8XHKts9g6/41RIP9EnCCbdaOt+bieuu15yG9EHI5aWHS++g== + dependencies: + interact.js "^1.2.8" + moment "^2.22.2" + raw-loader "0.5.1" + react-accessible-tooltip "^2.0.3" + react-collapse "^4.0.3" + react-custom-scrollbars "^4.2.1" + react-day-picker "^7.1.10" + react-height "^3.0.0" + react-modal "^3.5.1" + react-motion "^0.5.2" + react-scrollbar "^0.5.4" + react-slider "0.11.2" + react-tabs "2.3.0" + react-test-utils "0.0.1" + react-tooltip "^3.8.4" + react-widgets "^4.4.4" + redux-undo "^1.0.0-beta9" + scroll "^2.0.3" + shortid "^2.2.13" + throttle-debounce "^2.0.1" + +"@types/glob@^7.1.1": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.2.tgz#06ca26521353a545d94a0adc74f38a59d232c987" + integrity sha512-VgNIkxK+j7Nz5P7jvUZlRvhuPSmsEfS03b0alKcq5V/STUKAa3Plemsn5mrQUO7am6OErJ4rhGEGJbACclrtRA== + dependencies: + "@types/minimatch" "*" + "@types/node" "*" + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + +"@types/minimatch@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + +"@types/node@*": + version "14.0.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.13.tgz#ee1128e881b874c371374c1f72201893616417c9" + integrity sha512-rouEWBImiRaSJsVA+ITTFM6ZxibuAlTuNOCyxVbwreu6k6+ujs7DfnU9o+PShFhET78pMBl3eH+AGSI5eOTkPA== + +"@webassemblyjs/ast@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" + integrity sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA== + dependencies: + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" + +"@webassemblyjs/floating-point-hex-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4" + integrity sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA== + +"@webassemblyjs/helper-api-error@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2" + integrity sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw== + +"@webassemblyjs/helper-buffer@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00" + integrity sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA== + +"@webassemblyjs/helper-code-frame@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27" + integrity sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA== + dependencies: + "@webassemblyjs/wast-printer" "1.9.0" + +"@webassemblyjs/helper-fsm@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8" + integrity sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw== + +"@webassemblyjs/helper-module-context@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07" + integrity sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g== + dependencies: + "@webassemblyjs/ast" "1.9.0" + +"@webassemblyjs/helper-wasm-bytecode@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790" + integrity sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw== + +"@webassemblyjs/helper-wasm-section@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346" + integrity sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + +"@webassemblyjs/ieee754@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4" + integrity sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95" + integrity sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab" + integrity sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w== + +"@webassemblyjs/wasm-edit@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf" + integrity sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/helper-wasm-section" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-opt" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + "@webassemblyjs/wast-printer" "1.9.0" + +"@webassemblyjs/wasm-gen@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c" + integrity sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + +"@webassemblyjs/wasm-opt@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61" + integrity sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + +"@webassemblyjs/wasm-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e" + integrity sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + +"@webassemblyjs/wast-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914" + integrity sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/floating-point-hex-parser" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-code-frame" "1.9.0" + "@webassemblyjs/helper-fsm" "1.9.0" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/wast-printer@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899" + integrity sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" + "@xtuc/long" "4.2.2" + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + +accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: + version "1.3.7" + resolved "https://www.myget.org/F/dnn-software-public/npm/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + +acorn-jsx@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" + integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== + +acorn@^6.0.2, acorn@^6.4.1: + version "6.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" + integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== + +add-px-to-style@1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/add-px-to-style/-/add-px-to-style-1.0.0.tgz#d0c135441fa8014a8137904531096f67f28f263a" + +ajv-errors@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" + integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== + +ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" + integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== + +ajv@^6.1.0, ajv@^6.10.2, ajv@^6.5.3, ajv@^6.5.5: + version "6.12.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd" + integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-colors@^3.0.0: + version "3.2.4" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" + integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== + +ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + +ansi-html@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" + integrity sha1-gTWEAhliqenm/QOflA0S9WynhZ4= + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + dependencies: + color-convert "^1.9.0" + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +aproba@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +argparse@^1.0.7: + version "1.0.10" + resolved "https://www.myget.org/F/dnn-software-public/npm/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + +array-flatten@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" + integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== + +array-includes@^3.0.3, array-includes@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.1.tgz#cdd67e6852bdf9c1215460786732255ed2459348" + integrity sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0" + is-string "^1.0.5" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + +array.prototype.flat@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz#0de82b426b0318dbfdb940089e38b043d37f6c7b" + integrity sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + +asap@~2.0.3: + version "2.0.6" + resolved "https://www.myget.org/F/dnn-software-public/npm/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + +asn1.js@^4.0.0: + version "4.10.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +assert@^1.1.1: + version "1.5.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" + dependencies: + object-assign "^4.1.1" + util "0.10.3" + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + +async-each@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== + +async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== + +async@^2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + dependencies: + lodash "^4.17.14" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +atob@^2.1.2: + version "2.1.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + +attr-accept@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/attr-accept/-/attr-accept-1.1.3.tgz#48230c79f93790ef2775fcec4f0db0f5db41ca52" + integrity sha512-iT40nudw8zmCweivz6j58g+RT33I4KbaIvRUhjNmDwO2WmsQUxFEZZYZ5w3vXe5x5MX9D7mfvA/XaLOZYFR9EQ== + dependencies: + core-js "^2.5.0" + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.0.tgz#a17b3a8ea811060e74d47d306122400ad4497ae2" + integrity sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA== + +babel-eslint@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232" + integrity sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.7.0" + "@babel/traverse" "^7.7.0" + "@babel/types" "^7.7.0" + eslint-visitor-keys "^1.0.0" + resolve "^1.12.0" + +babel-loader@8.0.6: + version "8.0.6" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.0.6.tgz#e33bdb6f362b03f4bb141a0c21ab87c501b70dfb" + integrity sha512-4BmWKtBOBm13uoUwd08UwjZlaw3O9GWf456R9j+5YykFZ6LUIjIKLc0zEZf+hauxPOJs96C8k6FvYD09vWzhYw== + dependencies: + find-cache-dir "^2.0.0" + loader-utils "^1.0.2" + mkdirp "^0.5.1" + pify "^4.0.1" + +babel-plugin-dynamic-import-node@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" + integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== + dependencies: + object.assign "^4.1.0" + +babel-plugin-syntax-object-rest-spread@^6.8.0: + version "6.13.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + +babel-plugin-transform-object-assign@6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-assign/-/babel-plugin-transform-object-assign-6.22.0.tgz#f99d2f66f1a0b0d498e346c5359684740caa20ba" + integrity sha1-+Z0vZvGgsNSY40bFNZaEdAyqILo= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-object-rest-spread@6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" + integrity sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY= + dependencies: + babel-plugin-syntax-object-rest-spread "^6.8.0" + babel-runtime "^6.26.0" + +babel-plugin-transform-react-remove-prop-types@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.24.tgz#f2edaf9b4c6a5fbe5c1d678bfb531078c1555f3a" + integrity sha512-eqj0hVcJUR57/Ug2zE1Yswsw4LhuqqHhD+8v120T1cl3kjg76QwtyBrdIk4WVwK+lAhBJVYCd/v+4nc4y+8JsA== + +babel-polyfill@6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" + integrity sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM= + dependencies: + babel-runtime "^6.26.0" + core-js "^2.5.0" + regenerator-runtime "^0.10.5" + +babel-runtime@^6.2.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0, babel-runtime@^6.6.1: + version "6.26.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +base16@^1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/base16/-/base16-1.0.0.tgz#e297f60d7ec1014a7a971a39ebc8a98c0b681e70" + +base64-js@^1.0.2: + version "1.3.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + +base@^0.11.1: + version "0.11.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +batch@0.6.1: + version "0.6.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +big.js@^5.2.2: + version "5.2.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + +binary-extensions@^1.0.0: + version "1.13.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + +binary-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" + integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== + +bindings@^1.5.0: + version "1.5.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + dependencies: + file-uri-to-path "1.0.0" + +bluebird@^3.5.5: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0: + version "4.11.9" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" + integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== + +bn.js@^5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.2.tgz#c9686902d3c9a27729f43ab10f9d79c2004da7b0" + integrity sha512-40rZaf3bUNKTVYu9sIeeEGOg7g14Yvnj9kH7b50EiwX0Q7A6umbvfI5tvHaOERH0XigqKkfLkFQxzb4e6CIXnA== + +body-parser@1.19.0: + version "1.19.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" + dependencies: + bytes "3.1.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.7.2" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" + +bonjour@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" + integrity sha1-jokKGD2O6aI5OzhExpGkK897yfU= + dependencies: + array-flatten "^2.1.0" + deep-equal "^1.0.1" + dns-equal "^1.0.0" + dns-txt "^2.0.2" + multicast-dns "^6.0.1" + multicast-dns-service-types "^1.1.0" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://www.myget.org/F/dnn-software-public/npm/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^2.3.1, braces@^2.3.2: + version "2.3.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + +browserify-aes@^1.0.0, browserify-aes@^1.0.4: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" + integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.0.tgz#545d0b1b07e6b2c99211082bf1b12cce7a0b0e11" + integrity sha512-hEZC1KEeYuoHRqhGhTy6gWrpJA3ZDjFWv0DE61643ZnOXAKJb3u7yWcrU0mMc9SwAqK1n7myPGndkp0dFG7NFA== + dependencies: + bn.js "^5.1.1" + browserify-rsa "^4.0.1" + create-hash "^1.2.0" + create-hmac "^1.1.7" + elliptic "^6.5.2" + inherits "^2.0.4" + parse-asn1 "^5.1.5" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +browserify-zlib@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" + integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== + dependencies: + pako "~1.0.5" + +browserslist@^4.12.0, browserslist@^4.8.5: + version "4.12.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.12.0.tgz#06c6d5715a1ede6c51fc39ff67fd647f740b656d" + integrity sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg== + dependencies: + caniuse-lite "^1.0.30001043" + electron-to-chromium "^1.3.413" + node-releases "^1.1.53" + pkg-up "^2.0.0" + +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + +buffer-indexof@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" + integrity sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g== + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= + +buffer@^4.3.0: + version "4.9.2" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" + integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= + +bytes@3.0.0: + version "3.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + +bytes@3.1.0: + version "3.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" + +cacache@^12.0.2: + version "12.0.4" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" + integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ== + dependencies: + bluebird "^3.5.5" + chownr "^1.1.1" + figgy-pudding "^3.5.1" + glob "^7.1.4" + graceful-fs "^4.1.15" + infer-owner "^1.0.3" + lru-cache "^5.1.1" + mississippi "^3.0.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.3" + ssri "^6.0.1" + unique-filename "^1.1.1" + y18n "^4.0.0" + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +caller-path@^0.1.0: + version "0.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + dependencies: + callsites "^0.2.0" + +callsites@^0.2.0: + version "0.2.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + +camelcase@^5.0.0, camelcase@^5.2.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +caniuse-lite@^1.0.30001043: + version "1.0.30001066" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001066.tgz#0a8a58a10108f2b9bf38e7b65c237b12fd9c5f04" + integrity sha512-Gfj/WAastBtfxLws0RCh2sDbTK/8rJuSeZMecrSkNGYxPcv7EzblmDGfWQCFEQcSqYE2BRgQiJh8HOD07N5hIw== + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +chain-function@^1.0.0: + version "1.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/chain-function/-/chain-function-1.0.1.tgz#c63045e5b4b663fb86f1c6e186adaf1de402a1cc" + +chalk@2.4.2, chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + +chokidar@^2.1.8: + version "2.1.8" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" + integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== + dependencies: + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^3.1.0" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^3.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" + optionalDependencies: + fsevents "^1.2.7" + +chokidar@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.0.tgz#b30611423ce376357c765b9b8f904b9fba3c0be8" + integrity sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.4.0" + optionalDependencies: + fsevents "~2.1.2" + +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +chrome-trace-event@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" + integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== + dependencies: + tslib "^1.9.0" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +circular-json@^0.3.1: + version "0.3.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://www.myget.org/F/dnn-software-public/npm/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +classnames@^2.2.0, classnames@^2.2.6: + version "2.2.6" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" + integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q== + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + dependencies: + restore-cursor "^2.0.0" + +cli-width@^2.0.0: + version "2.2.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" + +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +clone@^2.1.1, clone@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + dependencies: + color-name "1.1.3" + +color-name@1.1.3: + version "1.1.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +commander@^2.19.0, commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= + +component-emitter@^1.2.0, component-emitter@^1.2.1: + version "1.3.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + +compressible@~2.0.16: + version "2.0.18" + resolved "https://www.myget.org/F/dnn-software-public/npm/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" + dependencies: + mime-db ">= 1.43.0 < 2" + +compression@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" + integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== + dependencies: + accepts "~1.3.5" + bytes "3.0.0" + compressible "~2.0.16" + debug "2.6.9" + on-headers "~1.0.2" + safe-buffer "5.1.2" + vary "~1.1.2" + +computed-style@~0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/computed-style/-/computed-style-0.1.4.tgz#7f344fd8584b2e425bedca4a1afc0e300bb05d74" + integrity sha1-fzRP2FhLLkJb7cpKGvwOMAuwXXQ= + +concat-map@0.0.1: + version "0.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@^1.5.0: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +config@^1.24.0: + version "1.31.0" + resolved "https://registry.yarnpkg.com/config/-/config-1.31.0.tgz#ab08aeba6536015d220cd0afe14b3e0501082542" + integrity sha512-Ep/l9Rd1J9IPueztJfpbOqVzuKHQh4ZODMNt9xqTYdBBNRXbV4oTu34kCkkfdRVcDq0ohtpaeXGgb+c0LQxFRA== + dependencies: + json5 "^1.0.1" + +connect-history-api-fallback@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" + integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== + +console-browserify@^1.1.0: + version "1.2.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= + +contains-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" + integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= + +content-disposition@0.5.3: + version "0.5.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + dependencies: + safe-buffer "5.1.2" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://www.myget.org/F/dnn-software-public/npm/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + +convert-source-map@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" + integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== + dependencies: + safe-buffer "~5.1.1" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://www.myget.org/F/dnn-software-public/npm/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + +cookie@0.4.0: + version "0.4.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" + +cookiejar@^2.1.0: + version "2.1.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" + +copy-concurrently@^1.0.0: + version "1.0.5" + resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" + integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== + dependencies: + aproba "^1.1.1" + fs-write-stream-atomic "^1.0.8" + iferr "^0.1.5" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.0" + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + +copy-to-clipboard@^3.0.5: + version "3.3.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/copy-to-clipboard/-/copy-to-clipboard-3.3.1.tgz#115aa1a9998ffab6196f93076ad6da3b913662ae" + dependencies: + toggle-selection "^1.0.6" + +core-js-compat@^3.6.2: + version "3.6.5" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.6.5.tgz#2a51d9a4e25dfd6e690251aa81f99e3c05481f1c" + integrity sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng== + dependencies: + browserslist "^4.8.5" + semver "7.0.0" + +core-js@^2.4.0, core-js@^2.5.0: + version "2.6.11" + resolved "https://www.myget.org/F/dnn-software-public/npm/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +create-ecdh@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" + integrity sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw== + dependencies: + bn.js "^4.1.0" + elliptic "^6.0.0" + +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +cross-spawn@6.0.5, cross-spawn@^6.0.0, cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +crypto-browserify@^3.11.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + +css-loader@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-2.1.1.tgz#d8254f72e412bb2238bb44dd674ffbef497333ea" + integrity sha512-OcKJU/lt232vl1P9EEDamhoO9iKY3tIjY5GU+XDLblAykTdgs6Ux9P1hTHve8nFKy5KPpOXOsVI/hIwi3841+w== + dependencies: + camelcase "^5.2.0" + icss-utils "^4.1.0" + loader-utils "^1.2.3" + normalize-path "^3.0.0" + postcss "^7.0.14" + postcss-modules-extract-imports "^2.0.0" + postcss-modules-local-by-default "^2.0.6" + postcss-modules-scope "^2.1.0" + postcss-modules-values "^2.0.0" + postcss-value-parser "^3.3.0" + schema-utils "^1.0.0" + +cssesc@^3.0.0: + version "3.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + +cyclist@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" + integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +date-arithmetic@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/date-arithmetic/-/date-arithmetic-3.1.0.tgz#1fcd03dbd504b9dbee2b9078c85a5f1c7d3cc2d3" + integrity sha1-H80D29UEudvuK5B4yFpfHH08wtM= + +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5: + version "3.2.6" + resolved "https://www.myget.org/F/dnn-software-public/npm/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + dependencies: + ms "^2.1.1" + +debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + +decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + +deep-equal@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" + integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g== + dependencies: + is-arguments "^1.0.4" + is-date-object "^1.0.1" + is-regex "^1.0.4" + object-is "^1.0.1" + object-keys "^1.1.1" + regexp.prototype.flags "^1.2.0" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +default-gateway@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-4.2.0.tgz#167104c7500c2115f6dd69b0a536bb8ed720552b" + integrity sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA== + dependencies: + execa "^1.0.0" + ip-regex "^2.1.0" + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://www.myget.org/F/dnn-software-public/npm/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +del@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/del/-/del-4.1.1.tgz#9e8f117222ea44a31ff3a156c049b99052a9f0b4" + integrity sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ== + dependencies: + "@types/glob" "^7.1.1" + globby "^6.1.0" + is-path-cwd "^2.0.0" + is-path-in-cwd "^2.0.0" + p-map "^2.0.0" + pify "^4.0.1" + rimraf "^2.6.3" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +depd@~1.1.2: + version "1.1.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + +des.js@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" + integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://www.myget.org/F/dnn-software-public/npm/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + +detect-file@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" + integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= + +detect-node@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c" + integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw== + +diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +dns-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" + integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0= + +dns-packet@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.1.tgz#12aa426981075be500b910eedcd0b47dd7deda5a" + integrity sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg== + dependencies: + ip "^1.1.0" + safe-buffer "^5.0.1" + +dns-txt@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/dns-txt/-/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6" + integrity sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY= + dependencies: + buffer-indexof "^1.0.0" + +doctrine@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + +dom-css@^2.0.0: + version "2.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/dom-css/-/dom-css-2.1.0.tgz#fdbc2d5a015d0a3e1872e11472bbd0e7b9e6a202" + dependencies: + add-px-to-style "1.0.0" + prefix-style "2.0.1" + to-camel-case "1.0.0" + +dom-helpers@^3.2.0, dom-helpers@^3.3.1, dom-helpers@^3.4.0: + version "3.4.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/dom-helpers/-/dom-helpers-3.4.0.tgz#e9b369700f959f62ecde5a6babde4bccd9169af8" + dependencies: + "@babel/runtime" "^7.1.2" + +dom-walk@^0.1.0: + version "0.1.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" + +domain-browser@^1.1.1: + version "1.2.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" + +duplexify@^3.4.2, duplexify@^3.6.0: + version "3.7.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" + integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + +electron-to-chromium@^1.3.413: + version "1.3.453" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.453.tgz#758a8565a64b7889b27132a51d2abb8b135c9d01" + integrity sha512-IQbCfjJR0NDDn/+vojTlq7fPSREcALtF8M1n01gw7nQghCtfFYrJ2dfhsp8APr8bANoFC8vRTFVXMOGpT0eetw== + +elliptic@^6.0.0, elliptic@^6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" + integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + +emojis-list@^3.0.0: + version "3.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +enhanced-resolve@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" + integrity sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng== + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.4.0" + tapable "^1.0.0" + +enhanced-resolve@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz#2937e2b8066cd0fe7ce0990a98f0d71a35189f66" + integrity sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA== + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.5.0" + tapable "^1.0.0" + +envify@~0.2.0: + version "0.2.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/envify/-/envify-0.2.0.tgz#645091cfaf1279f7f8364a893b0cf81c680ecbe0" + dependencies: + falafel "~0.2.1" + through "~2.3.4" + +errno@^0.1.1, errno@^0.1.3, errno@~0.1.7: + version "0.1.7" + resolved "https://www.myget.org/F/dnn-software-public/npm/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" + dependencies: + prr "~1.0.1" + +error-ex@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.17.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.5: + version "1.17.5" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9" + integrity sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg== + dependencies: + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.1.5" + is-regex "^1.0.5" + object-inspect "^1.7.0" + object-keys "^1.1.1" + object.assign "^4.1.0" + string.prototype.trimleft "^2.1.1" + string.prototype.trimright "^2.1.1" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +es6-shim@0.35.0: + version "0.35.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/es6-shim/-/es6-shim-0.35.0.tgz#272d927950889eabe299927cdc9c0010b7bfc00a" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://www.myget.org/F/dnn-software-public/npm/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +eslint-import-resolver-node@^0.3.3: + version "0.3.4" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" + integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA== + dependencies: + debug "^2.6.9" + resolve "^1.13.1" + +eslint-loader@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/eslint-loader/-/eslint-loader-2.1.1.tgz#2a9251523652430bfdd643efdb0afc1a2a89546a" + integrity sha512-1GrJFfSevQdYpoDzx8mEE2TDWsb/zmFuY09l6hURg1AeFIKQOvZ+vH0UPjzmd1CZIbfTV5HUkMeBmFiDBkgIsQ== + dependencies: + loader-fs-cache "^1.0.0" + loader-utils "^1.0.2" + object-assign "^4.0.1" + object-hash "^1.1.4" + rimraf "^2.6.1" + +eslint-module-utils@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz#579ebd094f56af7797d19c9866c9c9486629bfa6" + integrity sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA== + dependencies: + debug "^2.6.9" + pkg-dir "^2.0.0" + +eslint-plugin-babel@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-babel/-/eslint-plugin-babel-5.3.0.tgz#2e7f251ccc249326da760c1a4c948a91c32d0023" + integrity sha512-HPuNzSPE75O+SnxHIafbW5QB45r2w78fxqwK3HmjqIUoPfPzVrq6rD+CINU3yzoDSzEhUkX07VUphbF73Lth/w== + dependencies: + eslint-rule-composer "^0.3.0" + +eslint-plugin-filenames@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-filenames/-/eslint-plugin-filenames-1.3.2.tgz#7094f00d7aefdd6999e3ac19f72cea058e590cf7" + integrity sha512-tqxJTiEM5a0JmRCUYQmxw23vtTxrb2+a3Q2mMOPhFxvt7ZQQJmdiuMby9B/vUAuVMghyP7oET+nIf6EO6CBd/w== + dependencies: + lodash.camelcase "4.3.0" + lodash.kebabcase "4.1.1" + lodash.snakecase "4.1.1" + lodash.upperfirst "4.3.1" + +eslint-plugin-import@2.21.2: + version "2.21.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.21.2.tgz#8fef77475cc5510801bedc95f84b932f7f334a7c" + integrity sha512-FEmxeGI6yaz+SnEB6YgNHlQK1Bs2DKLM+YF+vuTk5H8J9CLbJLtlPvRFgZZ2+sXiKAlN5dpdlrWOjK8ZoZJpQA== + dependencies: + array-includes "^3.1.1" + array.prototype.flat "^1.2.3" + contains-path "^0.1.0" + debug "^2.6.9" + doctrine "1.5.0" + eslint-import-resolver-node "^0.3.3" + eslint-module-utils "^2.6.0" + has "^1.0.3" + minimatch "^3.0.4" + object.values "^1.1.1" + read-pkg-up "^2.0.0" + resolve "^1.17.0" + tsconfig-paths "^3.9.0" + +eslint-plugin-react@7.11.1: + version "7.11.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz#c01a7af6f17519457d6116aa94fc6d2ccad5443c" + integrity sha512-cVVyMadRyW7qsIUh3FHp3u6QHNhOgVrLQYdQEB1bPWBsgbNCHdFAeNMquBMCcZJu59eNthX053L70l7gRt4SCw== + dependencies: + array-includes "^3.0.3" + doctrine "^2.1.0" + has "^1.0.3" + jsx-ast-utils "^2.0.1" + prop-types "^15.6.2" + +eslint-plugin-spellcheck@0.0.11: + version "0.0.11" + resolved "https://registry.yarnpkg.com/eslint-plugin-spellcheck/-/eslint-plugin-spellcheck-0.0.11.tgz#f3fcff70a0446e1f04eacd5ebaa8cab23e691b4a" + integrity sha512-P8NCB9Y9u3PLSdW5PeVY6kcBR/WkP/FB3toik5ahaGc13s+Di+Op+ItinB89Z+61+IrXQX//qeGh1mgCGrp7LA== + dependencies: + globals "^11.3.0" + hunspell-spellchecker "^1.0.2" + lodash "^4.14.2" + +eslint-rule-composer@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9" + integrity sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg== + +eslint-scope@^4.0.0, eslint-scope@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" + integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^1.3.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" + integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== + +eslint@5.8.0: + version "5.8.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.8.0.tgz#91fbf24f6e0471e8fdf681a4d9dd1b2c9f28309b" + integrity sha512-Zok6Bru3y2JprqTNm14mgQ15YQu/SMDkWdnmHfFg770DIUlmMFd/gqqzCHekxzjHZJxXv3tmTpH0C1icaYJsRQ== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.5.3" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^2.1.0" + eslint-scope "^4.0.0" + eslint-utils "^1.3.1" + eslint-visitor-keys "^1.0.0" + espree "^4.0.0" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^11.7.0" + ignore "^4.0.6" + imurmurhash "^0.1.4" + inquirer "^6.1.0" + is-resolvable "^1.1.0" + js-yaml "^3.12.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.5" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + pluralize "^7.0.0" + progress "^2.0.0" + regexpp "^2.0.1" + require-uncached "^1.0.3" + semver "^5.5.1" + strip-ansi "^4.0.0" + strip-json-comments "^2.0.1" + table "^5.0.2" + text-table "^0.2.0" + +espree@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-4.1.0.tgz#728d5451e0fd156c04384a7ad89ed51ff54eb25f" + integrity sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w== + dependencies: + acorn "^6.0.2" + acorn-jsx "^5.0.0" + eslint-visitor-keys "^1.0.0" + +esprima@^4.0.0: + version "4.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + +esprima@substack/esprima#is-keyword: + version "1.1.0-dev" + resolved "https://codeload.github.com/substack/esprima/tar.gz/0a7f8489a11b44b019ce168506f535f22d0be290" + +esquery@^1.0.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57" + integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.1.0: + version "4.2.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + dependencies: + estraverse "^4.1.0" + +estraverse@^4.1.0, estraverse@^4.1.1: + version "4.3.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + +estraverse@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.1.0.tgz#374309d39fd935ae500e7b92e8a6b4c720e59642" + integrity sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + +etag@~1.8.1: + version "1.8.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + +eventemitter3@^4.0.0: + version "4.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/eventemitter3/-/eventemitter3-4.0.0.tgz#d65176163887ee59f386d64c82610b696a4a74eb" + +events@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.1.0.tgz#84279af1b34cb75aa88bf5ff291f6d0bd9b31a59" + integrity sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg== + +eventsource@^1.0.7: + version "1.0.7" + resolved "https://www.myget.org/F/dnn-software-public/npm/eventsource/-/eventsource-1.0.7.tgz#8fbc72c93fcd34088090bc0a4e64f4b5cee6d8d0" + dependencies: + original "^1.0.0" + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +exenv@^1.2.0: + version "1.2.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://www.myget.org/F/dnn-software-public/npm/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expand-tilde@^2.0.0, expand-tilde@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" + integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= + dependencies: + homedir-polyfill "^1.0.1" + +express@^4.17.1: + version "4.17.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" + integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.0" + content-disposition "0.5.3" + content-type "~1.0.4" + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" + safe-buffer "5.1.2" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@^3.0.0, extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://www.myget.org/F/dnn-software-public/npm/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +falafel@~0.2.1: + version "0.2.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/falafel/-/falafel-0.2.1.tgz#9efc51ce19ec5729086b22ae889e5d7d0e256601" + dependencies: + esprima substack/esprima#is-keyword + +fast-deep-equal@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" + integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +faye-websocket@^0.10.0: + version "0.10.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" + dependencies: + websocket-driver ">=0.5.1" + +faye-websocket@~0.11.1: + version "0.11.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" + dependencies: + websocket-driver ">=0.5.1" + +fetch-ie8@1.4.2: + version "1.4.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/fetch-ie8/-/fetch-ie8-1.4.2.tgz#6c02911a9265be12521d0464f98416fcddc0af2a" + +figgy-pudding@^3.5.1: + version "3.5.2" + resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" + integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + integrity sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E= + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + +file-loader@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-3.0.1.tgz#f8e0ba0b599918b51adfe45d66d1e771ad560faa" + integrity sha512-4sNIOXgtH/9WZq4NvlfU3Opn5ynUsqBwSLyM+I7UOwdGigTBYfVVQEwe/msZNX/j4pCJTIM14Fsw66Svo1oVrw== + dependencies: + loader-utils "^1.0.2" + schema-utils "^1.0.0" + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + +filesize@^3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" + integrity sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg== + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@~1.1.2: + version "1.1.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +find-cache-dir@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" + integrity sha1-yN765XyKUqinhPnjHFfHQumToLk= + dependencies: + commondir "^1.0.1" + mkdirp "^0.5.1" + pkg-dir "^1.0.0" + +find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== + dependencies: + commondir "^1.0.1" + make-dir "^2.0.0" + pkg-dir "^3.0.0" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +findup-sync@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" + integrity sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg== + dependencies: + detect-file "^1.0.0" + is-glob "^4.0.0" + micromatch "^3.0.4" + resolve-dir "^1.0.1" + +flat-cache@^1.2.1: + version "1.3.4" + resolved "https://www.myget.org/F/dnn-software-public/npm/flat-cache/-/flat-cache-1.3.4.tgz#2c2ef77525cc2929007dfffa1dd314aa9c9dee6f" + dependencies: + circular-json "^0.3.1" + graceful-fs "^4.1.2" + rimraf "~2.6.2" + write "^0.2.1" + +flush-write-stream@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" + integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== + dependencies: + inherits "^2.0.3" + readable-stream "^2.3.6" + +follow-redirects@^1.0.0: + version "1.11.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/follow-redirects/-/follow-redirects-1.11.0.tgz#afa14f08ba12a52963140fe43212658897bc0ecb" + dependencies: + debug "^3.0.0" + +for-in@^1.0.2: + version "1.0.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@^2.3.1: + version "2.5.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +formidable@^1.2.0: + version "1.2.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/formidable/-/formidable-1.2.2.tgz#bf69aea2972982675f00865342b982986f6b8dd9" + +forwarded@~0.1.2: + version "0.1.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + dependencies: + map-cache "^0.2.2" + +fresh@0.5.2: + version "0.5.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + +from2@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + +fs-write-stream-atomic@^1.0.8: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" + integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= + dependencies: + graceful-fs "^4.1.2" + iferr "^0.1.5" + imurmurhash "^0.1.4" + readable-stream "1 || 2" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.2.7: + version "1.2.13" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" + integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== + dependencies: + bindings "^1.5.0" + nan "^2.12.1" + +fsevents@~2.1.2: + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + +gensync@^1.0.0-beta.1: + version "1.0.0-beta.1" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" + integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-stream@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://www.myget.org/F/dnn-software-public/npm/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-parent@~5.1.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" + integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== + dependencies: + is-glob "^4.0.1" + +glob@^7.0.3, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: + version "7.1.6" + resolved "https://www.myget.org/F/dnn-software-public/npm/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global-modules@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== + dependencies: + global-prefix "^3.0.0" + +global-modules@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" + integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== + dependencies: + global-prefix "^1.0.1" + is-windows "^1.0.1" + resolve-dir "^1.0.0" + +global-prefix@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" + integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= + dependencies: + expand-tilde "^2.0.2" + homedir-polyfill "^1.0.1" + ini "^1.3.4" + is-windows "^1.0.1" + which "^1.2.14" + +global-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" + integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== + dependencies: + ini "^1.3.5" + kind-of "^6.0.2" + which "^1.3.1" + +global@^4.3.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" + integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== + dependencies: + min-document "^2.19.0" + process "^0.11.10" + +global@~4.3.0: + version "4.3.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" + dependencies: + min-document "^2.19.0" + process "~0.5.1" + +globals@^11.1.0, globals@^11.3.0, globals@^11.7.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globby@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" + integrity sha1-9abXDoOV4hyFj7BInWTfAkJNUGw= + dependencies: + array-union "^1.0.1" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2: + version "4.2.4" + resolved "https://www.myget.org/F/dnn-software-public/npm/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + +handle-thing@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" + integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== + dependencies: + ajv "^6.5.5" + har-schema "^2.0.0" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + +has-symbols@^1.0.0, has-symbols@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" + integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== + +has-value@^0.3.1: + version "0.3.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://www.myget.org/F/dnn-software-public/npm/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + +has-values@^1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hoist-non-react-statics@^3.3.0: + version "3.3.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" + dependencies: + react-is "^16.7.0" + +homedir-polyfill@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" + integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== + dependencies: + parse-passwd "^1.0.0" + +hosted-git-info@^2.1.4: + version "2.8.8" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" + integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== + +hpack.js@^2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" + integrity sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI= + dependencies: + inherits "^2.0.1" + obuf "^1.0.0" + readable-stream "^2.0.1" + wbuf "^1.1.0" + +html-entities@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.3.1.tgz#fb9a1a4b5b14c5daba82d3e34c6ae4fe701a0e44" + integrity sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA== + +http-deceiver@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" + integrity sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc= + +http-errors@1.7.2: + version "1.7.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-errors@~1.6.2: + version "1.6.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + +http-errors@~1.7.2: + version "1.7.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +"http-parser-js@>=0.4.0 <0.4.11": + version "0.4.10" + resolved "https://www.myget.org/F/dnn-software-public/npm/http-parser-js/-/http-parser-js-0.4.10.tgz#92c9c1374c35085f75db359ec56cc257cbb93fa4" + +http-proxy-middleware@0.19.1: + version "0.19.1" + resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a" + integrity sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q== + dependencies: + http-proxy "^1.17.0" + is-glob "^4.0.0" + lodash "^4.17.11" + micromatch "^3.1.10" + +http-proxy@^1.17.0: + version "1.18.1" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" + integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== + dependencies: + eventemitter3 "^4.0.0" + follow-redirects "^1.0.0" + requires-port "^1.0.0" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= + +humanize@0.0.9: + version "0.0.9" + resolved "https://www.myget.org/F/dnn-software-public/npm/humanize/-/humanize-0.0.9.tgz#1994ffaecdfe9c441ed2bdac7452b7bb4c9e41a4" + +hunspell-spellchecker@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/hunspell-spellchecker/-/hunspell-spellchecker-1.0.2.tgz#a10b0bd2fa00a65ab62a4c6b734ce496d318910e" + integrity sha1-oQsL0voAplq2Kkxrc0zkltMYkQ4= + +iconv-lite@0.4.24, iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://www.myget.org/F/dnn-software-public/npm/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + dependencies: + safer-buffer ">= 2.1.2 < 3" + +icss-replace-symbols@^1.1.0: + version "1.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" + +icss-utils@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-4.1.1.tgz#21170b53789ee27447c2f47dd683081403f9a467" + integrity sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA== + dependencies: + postcss "^7.0.14" + +ieee754@^1.1.4: + version "1.1.13" + resolved "https://www.myget.org/F/dnn-software-public/npm/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + +iferr@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" + integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= + +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +image-size@~0.5.0: + version "0.5.5" + resolved "https://www.myget.org/F/dnn-software-public/npm/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" + +import-local@2.0.0, import-local@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" + integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ== + dependencies: + pkg-dir "^3.0.0" + resolve-cwd "^2.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://www.myget.org/F/dnn-software-public/npm/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + +infer-owner@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" + integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://www.myget.org/F/dnn-software-public/npm/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.4" + resolved "https://www.myget.org/F/dnn-software-public/npm/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + +inherits@2.0.1: + version "2.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + +inherits@2.0.3: + version "2.0.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ini@^1.3.4, ini@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + +inquirer@^6.1.0: + version "6.5.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" + integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== + dependencies: + ansi-escapes "^3.2.0" + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^2.0.0" + lodash "^4.17.12" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^2.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" + +interact.js@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/interact.js/-/interact.js-1.2.8.tgz#b62bc004563b5c6f294b6b115b396205d843f60b" + integrity sha1-tivABFY7XG8pS2sRWzliBdhD9gs= + +internal-ip@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907" + integrity sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg== + dependencies: + default-gateway "^4.2.0" + ipaddr.js "^1.9.0" + +interpret@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" + integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== + +invariant@^2.1.0, invariant@^2.2.2, invariant@^2.2.4: + version "2.2.4" + resolved "https://www.myget.org/F/dnn-software-public/npm/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + dependencies: + loose-envify "^1.0.0" + +invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== + +ip-regex@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" + integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= + +ip@^1.1.0, ip@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" + integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= + +ipaddr.js@1.9.1, ipaddr.js@^1.9.0: + version "1.9.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + +is-absolute-url@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" + integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q== + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://www.myget.org/F/dnn-software-public/npm/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + dependencies: + kind-of "^6.0.0" + +is-arguments@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" + integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://www.myget.org/F/dnn-software-public/npm/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + +is-callable@^1.1.4, is-callable@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" + integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://www.myget.org/F/dnn-software-public/npm/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + dependencies: + kind-of "^6.0.0" + +is-date-object@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" + integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://www.myget.org/F/dnn-software-public/npm/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-path-cwd@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" + integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== + +is-path-in-cwd@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz#bfe2dca26c69f397265a4009963602935a053acb" + integrity sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ== + dependencies: + is-path-inside "^2.1.0" + +is-path-inside@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-2.1.0.tgz#7c9810587d659a40d27bcdb4d5616eab059494b2" + integrity sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg== + dependencies: + path-is-inside "^1.0.2" + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://www.myget.org/F/dnn-software-public/npm/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + dependencies: + isobject "^3.0.1" + +is-regex@^1.0.4, is-regex@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" + integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== + dependencies: + has "^1.0.3" + +is-resolvable@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" + integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-string@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" + integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== + +is-symbol@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + dependencies: + has-symbols "^1.0.1" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +is-windows@^1.0.1, is-windows@^1.0.2: + version "1.0.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + +is-wsl@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + +js-yaml@^3.12.0: + version "3.14.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" + integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + +json-parse-better-errors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + +json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +json3@^3.3.2: + version "3.3.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/json3/-/json3-3.3.3.tgz#7fc10e375fc5ae42c4705a5cc0aa6f62be305b81" + +json5@^1.0.1: + version "1.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + dependencies: + minimist "^1.2.0" + +json5@^2.1.2: + version "2.1.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" + integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA== + dependencies: + minimist "^1.2.5" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +jsx-ast-utils@^2.0.1: + version "2.3.0" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.3.0.tgz#edd727794ea284d7fda575015ed1b0cde0289ab6" + integrity sha512-3HNoc7nZ1hpZIKB3hJ7BlFRkzCx2BynRtfSwbkqZdpRdvAPsGMnzclPwrvDBS7/lalHTj21NwIeaEpysHBOudg== + dependencies: + array-includes "^3.1.1" + object.assign "^4.1.0" + +killable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892" + integrity sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg== + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + +lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== + dependencies: + invert-kv "^2.0.0" + +less-loader@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/less-loader/-/less-loader-5.0.0.tgz#498dde3a6c6c4f887458ee9ed3f086a12ad1b466" + integrity sha512-bquCU89mO/yWLaUq0Clk7qCsKhsF/TZpJUzETRvJa9KSVEL9SO3ovCvdEHISBhrC81OwC8QSVX7E0bzElZj9cg== + dependencies: + clone "^2.1.1" + loader-utils "^1.1.0" + pify "^4.0.1" + +less@3.9.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/less/-/less-3.9.0.tgz#b7511c43f37cf57dc87dffd9883ec121289b1474" + integrity sha512-31CmtPEZraNUtuUREYjSqRkeETFdyEHSEPAGq4erDlUXtda7pzNmctdljdIagSb589d/qXGWiiP31R5JVf+v0w== + dependencies: + clone "^2.1.2" + optionalDependencies: + errno "^0.1.1" + graceful-fs "^4.1.2" + image-size "~0.5.0" + mime "^1.4.1" + mkdirp "^0.5.0" + promise "^7.1.1" + request "^2.83.0" + source-map "~0.6.0" + +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== + +levenary@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/levenary/-/levenary-1.1.1.tgz#842a9ee98d2075aa7faeedbe32679e9205f46f77" + integrity sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ== + dependencies: + leven "^3.1.0" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +line-height@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/line-height/-/line-height-0.1.1.tgz#e86705fbf0a6f50607aed65500d69db2d9db37e2" + integrity sha1-6GcF+/Cm9QYHrtZVANadstnbN+I= + dependencies: + computed-style "~0.1.3" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +loader-fs-cache@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/loader-fs-cache/-/loader-fs-cache-1.0.3.tgz#f08657646d607078be2f0a032f8bd69dd6f277d9" + integrity sha512-ldcgZpjNJj71n+2Mf6yetz+c9bM4xpKtNds4LbqXzU/PTdeAX0g3ytnU1AJMEcTk2Lex4Smpe3Q/eCTsvUBxbA== + dependencies: + find-cache-dir "^0.1.1" + mkdirp "^0.5.1" + +loader-runner@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" + integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== + +loader-utils@1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" + integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== + dependencies: + big.js "^5.2.2" + emojis-list "^2.0.0" + json5 "^1.0.1" + +loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3: + version "1.4.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^1.0.1" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash.camelcase@4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= + +lodash.curry@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.curry/-/lodash.curry-4.1.1.tgz#248e36072ede906501d75966200a86dab8b23170" + integrity sha1-JI42By7ekGUB11lmIAqG2riyMXA= + +lodash.debounce@^3.1.1: + version "3.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/lodash.debounce/-/lodash.debounce-3.1.1.tgz#812211c378a94cc29d5aa4e3346cf0bfce3a7df5" + dependencies: + lodash._getnative "^3.0.0" + +lodash.debounce@^4.0.4: + version "4.0.8" + resolved "https://www.myget.org/F/dnn-software-public/npm/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + +lodash.flow@^3.3.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/lodash.flow/-/lodash.flow-3.5.0.tgz#87bf40292b8cf83e4e8ce1a3ae4209e20071675a" + integrity sha1-h79AKSuM+D5OjOGjrkIJ4gBxZ1o= + +lodash.kebabcase@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36" + integrity sha1-hImxyw0p/4gZXM7KRI/21swpXDY= + +lodash.snakecase@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" + integrity sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40= + +lodash.upperfirst@4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" + integrity sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984= + +lodash@^4.14.2, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0: + version "4.17.15" + resolved "https://www.myget.org/F/dnn-software-public/npm/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + +lodash@^4.17.19: + version "4.17.20" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" + integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== + +loglevel@^1.6.8: + version "1.6.8" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.8.tgz#8a25fb75d092230ecd4457270d80b54e28011171" + integrity sha512-bsU7+gc9AJ2SqpzxwU3+1fedl8zAntbtC5XYlt3s2j1hJcn2PsXSmgN8TaLG/J1/2mod4+cE/3vNL70/c1RNCA== + +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1, loose-envify@^1.4.0: + version "1.4.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +make-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + dependencies: + object-visit "^1.0.0" + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + +mem@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== + dependencies: + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" + +memory-fs@^0.4.0, memory-fs@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +memory-fs@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" + integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + +methods@^1.1.1, methods@~1.1.2: + version "1.1.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + +micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@1.44.0, "mime-db@>= 1.43.0 < 2": + version "1.44.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + +mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.27" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== + dependencies: + mime-db "1.44.0" + +mime@1.6.0, mime@^1.4.1: + version "1.6.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + +mime@^2.0.3, mime@^2.4.4: + version "2.4.6" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.6.tgz#e5b407c90db442f2beb5b162373d07b69affa4d1" + integrity sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA== + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + +mimic-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +min-document@^2.19.0: + version "2.19.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" + dependencies: + dom-walk "^0.1.0" + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://www.myget.org/F/dnn-software-public/npm/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + resolved "https://www.myget.org/F/dnn-software-public/npm/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + +mississippi@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" + integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== + dependencies: + concat-stream "^1.5.0" + duplexify "^3.4.2" + end-of-stream "^1.1.0" + flush-write-stream "^1.0.0" + from2 "^2.1.0" + parallel-transform "^1.1.0" + pump "^3.0.0" + pumpify "^1.3.3" + stream-each "^1.1.0" + through2 "^2.0.0" + +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3: + version "0.5.5" + resolved "https://www.myget.org/F/dnn-software-public/npm/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + dependencies: + minimist "^1.2.5" + +moment@^2.22.2: + version "2.26.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.26.0.tgz#5e1f82c6bafca6e83e808b30c8705eed0dcbd39a" + integrity sha512-oIixUO+OamkUkwjhAVE18rAMfRJNsNe/Stid/gwHSOfHrOtw9EhAY2AHvdKZ/k/MggcYELFCJz/Sn2pL8b8JMw== + +move-concurrently@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" + integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I= + dependencies: + aproba "^1.1.1" + copy-concurrently "^1.0.0" + fs-write-stream-atomic "^1.0.8" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.3" + +ms@2.0.0: + version "2.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +ms@2.1.1: + version "2.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + +ms@^2.1.1: + version "2.1.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + +multicast-dns-service-types@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" + integrity sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE= + +multicast-dns@^6.0.1: + version "6.2.3" + resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229" + integrity sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g== + dependencies: + dns-packet "^1.3.1" + thunky "^1.0.2" + +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + +nan@^2.12.1: + version "2.14.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" + +nanoid@^2.1.0: + version "2.1.11" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" + integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://www.myget.org/F/dnn-software-public/npm/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + +negotiator@0.6.2: + version "0.6.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + +neo-async@^2.5.0, neo-async@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" + integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +node-forge@0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.0.tgz#d624050edbb44874adca12bb9a52ec63cb782579" + integrity sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ== + +node-libs-browser@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" + integrity sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== + dependencies: + assert "^1.1.1" + browserify-zlib "^0.2.0" + buffer "^4.3.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.11.0" + domain-browser "^1.1.1" + events "^3.0.0" + https-browserify "^1.0.0" + os-browserify "^0.3.0" + path-browserify "0.0.1" + process "^0.11.10" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.3.3" + stream-browserify "^2.0.1" + stream-http "^2.7.2" + string_decoder "^1.0.0" + timers-browserify "^2.0.4" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.11.0" + vm-browserify "^1.0.1" + +node-releases@^1.1.53: + version "1.1.57" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.57.tgz#f6754ce225fad0611e61228df3e09232e017ea19" + integrity sha512-ZQmnWS7adi61A9JsllJ2gdj2PauElcjnOwTp2O011iGzoakTxUsDGSe+6vD7wXbKdqhSFymC0OSx35aAMhrSdw== + +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +object-assign@^4.0.1, object-assign@^4.1.1: + version "4.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-hash@^1.1.4: + version "1.3.1" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.3.1.tgz#fde452098a951cb145f039bb7d455449ddc126df" + integrity sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA== + +object-inspect@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" + integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== + +object-is@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.2.tgz#c5d2e87ff9e119f78b7a088441519e2eec1573b6" + integrity sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + dependencies: + isobject "^3.0.0" + +object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + dependencies: + isobject "^3.0.1" + +object.values@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" + integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + function-bind "^1.1.1" + has "^1.0.3" + +obuf@^1.0.0, obuf@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" + integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.2: + version "1.0.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + dependencies: + mimic-fn "^1.0.0" + +opn@^5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc" + integrity sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA== + dependencies: + is-wsl "^1.1.0" + +optionator@^0.8.2: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + +original@^1.0.0: + version "1.0.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" + dependencies: + url-parse "^1.4.3" + +os-browserify@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" + integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= + +os-locale@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== + dependencies: + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-limit@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-map@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" + integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== + +p-retry@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-3.0.1.tgz#316b4c8893e2c8dc1cfa891f406c4b422bebf328" + integrity sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w== + dependencies: + retry "^0.12.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +pako@~1.0.5: + version "1.0.11" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" + integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== + +parallel-transform@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc" + integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg== + dependencies: + cyclist "^1.0.1" + inherits "^2.0.3" + readable-stream "^2.1.5" + +parse-asn1@^5.0.0, parse-asn1@^5.1.5: + version "5.1.5" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.5.tgz#003271343da58dc94cace494faef3d2147ecea0e" + integrity sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ== + dependencies: + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + safe-buffer "^5.1.1" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + dependencies: + error-ex "^1.2.0" + +parse-key@^0.2.1: + version "0.2.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/parse-key/-/parse-key-0.2.1.tgz#7bcf76595536e36075664be4d687e4bdd910208f" + +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= + +parseurl@~1.3.2, parseurl@~1.3.3: + version "1.3.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + +path-browserify@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" + integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= + +path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://www.myget.org/F/dnn-software-public/npm/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= + dependencies: + pify "^2.0.0" + +pbkdf2@^3.0.3: + version "3.0.17" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" + integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +performance-now@^0.2.0: + version "0.2.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + +picomatch@^2.0.4, picomatch@^2.2.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + +pkg-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" + integrity sha1-ektQio1bstYp1EcFb/TpyTFM89Q= + dependencies: + find-up "^1.0.0" + +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= + dependencies: + find-up "^2.1.0" + +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + +pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" + integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= + dependencies: + find-up "^2.1.0" + +pluralize@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" + integrity sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow== + +portfinder@^1.0.26: + version "1.0.26" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.26.tgz#475658d56ca30bed72ac7f1378ed350bd1b64e70" + integrity sha512-Xi7mKxJHHMI3rIUrnm/jjUgwhbYMkp/XKEcZX3aG4BrumLpq3nmoQMX+ClYnDZnZ/New7IatC1no5RX0zo1vXQ== + dependencies: + async "^2.6.2" + debug "^3.1.1" + mkdirp "^0.5.1" + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + +postcss-modules-extract-imports@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz#818719a1ae1da325f9832446b01136eeb493cd7e" + integrity sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ== + dependencies: + postcss "^7.0.5" + +postcss-modules-local-by-default@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-2.0.6.tgz#dd9953f6dd476b5fd1ef2d8830c8929760b56e63" + integrity sha512-oLUV5YNkeIBa0yQl7EYnxMgy4N6noxmiwZStaEJUSe2xPMcdNc8WmBQuQCx18H5psYbVxz8zoHk0RAAYZXP9gA== + dependencies: + postcss "^7.0.6" + postcss-selector-parser "^6.0.0" + postcss-value-parser "^3.3.1" + +postcss-modules-scope@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz#385cae013cc7743f5a7d7602d1073a89eaae62ee" + integrity sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ== + dependencies: + postcss "^7.0.6" + postcss-selector-parser "^6.0.0" + +postcss-modules-values@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-2.0.0.tgz#479b46dc0c5ca3dc7fa5270851836b9ec7152f64" + integrity sha512-Ki7JZa7ff1N3EIMlPnGTZfUMe69FFwiQPnVSXC9mnn3jozCRBYIxiZd44yJOV2AmabOo4qFf8s0dC/+lweG7+w== + dependencies: + icss-replace-symbols "^1.1.0" + postcss "^7.0.6" + +postcss-selector-parser@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz#934cf799d016c83411859e09dcecade01286ec5c" + integrity sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg== + dependencies: + cssesc "^3.0.0" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-value-parser@^3.3.0, postcss-value-parser@^3.3.1: + version "3.3.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" + +postcss@^7.0.14, postcss@^7.0.5, postcss@^7.0.6: + version "7.0.31" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.31.tgz#332af45cb73e26c0ee2614d7c7fb02dfcc2bd6dd" + integrity sha512-a937VDHE1ftkjk+8/7nj/mrjtmkn69xxzJgRETXdAUU+IgOYPQNJF17haGWbeDxSyk++HA14UA98FurvPyBJOA== + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" + +prefix-style@2.0.1: + version "2.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/prefix-style/-/prefix-style-2.0.1.tgz#66bba9a870cfda308a5dc20e85e9120932c95a06" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + +private@^0.1.8: + version "0.1.8" + resolved "https://www.myget.org/F/dnn-software-public/npm/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + +process@~0.5.1: + version "0.5.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" + +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= + +promise@^7.1.1: + version "7.3.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" + dependencies: + asap "~2.0.3" + +prop-types-extra@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/prop-types-extra/-/prop-types-extra-1.1.1.tgz#58c3b74cbfbb95d304625975aa2f0848329a010b" + integrity sha512-59+AHNnHYCdiC+vMwY52WmvP5dM3QLeoumYuEyceQDi9aEhtwN9zIQ2ZNo25sMyXnbh32h+P1ezDsUpUH3JAew== + dependencies: + react-is "^16.3.2" + warning "^4.0.0" + +prop-types@^15.0.0, prop-types@^15.5.0, prop-types@^15.5.10, prop-types@^15.5.6, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: + version "15.7.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" + integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.8.1" + +proxy-addr@~2.0.5: + version "2.0.6" + resolved "https://www.myget.org/F/dnn-software-public/npm/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.9.1" + +prr@~1.0.1: + version "1.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + +psl@^1.1.28: + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + +public-encrypt@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" + integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + safe-buffer "^5.1.2" + +pump@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" + integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pumpify@^1.3.3: + version "1.5.1" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" + integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== + dependencies: + duplexify "^3.6.0" + inherits "^2.0.3" + pump "^2.0.0" + +punycode@1.3.2: + version "1.3.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + +punycode@^1.2.4: + version "1.4.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +pure-color@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/pure-color/-/pure-color-1.3.0.tgz#1fe064fb0ac851f0de61320a8bf796836422f33e" + integrity sha1-H+Bk+wrIUfDeYTIKi/eWg2Qi8z4= + +qs@6.7.0: + version "6.7.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" + +qs@^6.5.1: + version "6.9.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/qs/-/qs-6.9.3.tgz#bfadcd296c2d549f1dffa560619132c977f5008e" + +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= + +querystring@0.2.0: + version "0.2.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + +querystringify@^2.1.1: + version "2.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" + +raf@^3.1.0: + version "3.4.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" + dependencies: + performance-now "^2.1.0" + +rafl@~1.2.1: + version "1.2.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/rafl/-/rafl-1.2.2.tgz#fe930f758211020d47e38815f5196a8be4150740" + dependencies: + global "~4.3.0" + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + +range-parser@^1.2.1, range-parser@~1.2.1: + version "1.2.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + +raw-body@2.4.0: + version "2.4.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" + dependencies: + bytes "3.1.0" + http-errors "1.7.2" + iconv-lite "0.4.24" + unpipe "1.0.0" + +raw-loader@0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa" + integrity sha1-DD0L6u2KAclm2Xh793goElKpeao= + +raw-loader@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-2.0.0.tgz#e2813d9e1e3f80d1bbade5ad082e809679e20c26" + integrity sha512-kZnO5MoIyrojfrPWqrhFNLZemIAX8edMOCp++yC5RKxzFB3m92DqKNhKlU6+FvpOhWtvyh3jOaD7J6/9tpdIKg== + dependencies: + loader-utils "^1.1.0" + schema-utils "^1.0.0" + +react-accessible-tooltip@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/react-accessible-tooltip/-/react-accessible-tooltip-2.0.3.tgz#d676f23fda74c1df5733834869d27722a2649331" + integrity sha512-T/QPT8qBrrco+E8KQUuhtQAv46/B3Xpf+adLkKA2bofE/9db2wSaqr6XOlxO/Rx59dqt2V844kxrmT7WA2Q9kw== + +react-base16-styling@^0.5.1: + version "0.5.3" + resolved "https://registry.yarnpkg.com/react-base16-styling/-/react-base16-styling-0.5.3.tgz#3858f24e9c4dd8cbd3f702f3f74d581ca2917269" + integrity sha1-OFjyTpxN2MvT9wLz901YHKKRcmk= + dependencies: + base16 "^1.0.0" + lodash.curry "^4.0.1" + lodash.flow "^3.3.0" + pure-color "^1.2.0" + +react-collapse@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/react-collapse/-/react-collapse-4.0.3.tgz#b96de959ed0092a43534630b599a4753dd76d543" + integrity sha512-OO4NhtEqFtz+1ma31J1B7+ezdRnzHCZiTGSSd/Pxoks9hxrZYhzFEddeYt05A/1477xTtdrwo7xEa2FLJyWGCQ== + dependencies: + prop-types "^15.5.8" + +react-component-managers@^3.1.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/react-component-managers/-/react-component-managers-3.2.2.tgz#b02a965465a32118ffc967f59730618370432412" + integrity sha512-SqtB09hS1ir0koBNybvNbNAB3k/r7IbIGbXSxvkkTV0m50s+4oJ59KYsbPAQ/2DhE169Rc5V26d674EcGcDbGA== + dependencies: + prop-types "^15.6.1" + spy-on-component "^1.1.0" + +react-custom-scrollbars@^4.2.1: + version "4.2.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/react-custom-scrollbars/-/react-custom-scrollbars-4.2.1.tgz#830fd9502927e97e8a78c2086813899b2a8b66db" + dependencies: + dom-css "^2.0.0" + prop-types "^15.5.10" + raf "^3.1.0" + +react-day-picker@^7.1.10: + version "7.4.8" + resolved "https://registry.yarnpkg.com/react-day-picker/-/react-day-picker-7.4.8.tgz#675625240d3fae1b41c0a9d5177c968c8517c1d4" + integrity sha512-pp0hnxFVoRuBQcRdR1Hofw4CQtOCGVmzCNrscyvS0Q8NEc+UiYLEDqE5dk37bf0leSnBW4lheIt0CKKhuKzDVw== + dependencies: + prop-types "^15.6.2" + +react-dock@^0.2.4: + version "0.2.4" + resolved "https://registry.yarnpkg.com/react-dock/-/react-dock-0.2.4.tgz#e727dc7550b3b73116635dcb9c0e04d0b7afe17c" + integrity sha1-5yfcdVCztzEWY13LnA4E0Lev4Xw= + dependencies: + lodash.debounce "^3.1.1" + prop-types "^15.5.8" + +react-dom@^16.6.3: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.13.1.tgz#c1bd37331a0486c078ee54c4740720993b2e0e7f" + integrity sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + scheduler "^0.19.1" + +react-dropzone@6.2.4: + version "6.2.4" + resolved "https://registry.yarnpkg.com/react-dropzone/-/react-dropzone-6.2.4.tgz#6a63f7eb5fdd0ed5d85b0c8c3b8ecc3d3bb661fe" + integrity sha512-fkG/Nxalhai12FdNw9RZ6dIr1SctmRXWekkSoOKAhNDAECwDg4HWKuvvZVkEAedGNeAgmkQRVoqNfT8uje1zfg== + dependencies: + attr-accept "^1.1.3" + prop-types "^15.6.2" + +react-height@^3.0.0, react-height@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/react-height/-/react-height-3.0.1.tgz#2252652fb59468254751224ef1e94a2bb6e90d20" + integrity sha512-tduavxh0UamJoK3MTguUxz7zu+hpuZ1m7JivfGKXUF1Wx8D5lURsDkrxzE5TfpzDOXEeqswH7n/P0wfKRUjYAQ== + dependencies: + prop-types "^15.5.8" + +react-hot-loader@4.8.5: + version "4.8.5" + resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.8.5.tgz#9fb383345f8f059ed160c084f985744047e374d9" + integrity sha512-9Stc+7C2p23O9iOB78t+fKNxSxNfgXJpwsiToRuZZe7rNFJ0IMCyesXF2ls70XIxAzgnU36FzfW9c9mXhTz2xQ== + dependencies: + fast-levenshtein "^2.0.6" + global "^4.3.0" + hoist-non-react-statics "^3.3.0" + loader-utils "^1.1.0" + lodash "^4.17.11" + prop-types "^15.6.1" + react-lifecycles-compat "^3.0.4" + shallowequal "^1.0.2" + source-map "^0.7.3" + +react-is@^16.3.2, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1: + version "16.13.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + +react-json-tree@^0.11.0: + version "0.11.2" + resolved "https://registry.yarnpkg.com/react-json-tree/-/react-json-tree-0.11.2.tgz#af70199fcbc265699ade2aec492465c51608f95e" + integrity sha512-aYhUPj1y5jR3ZQ+G3N7aL8FbTyO03iLwnVvvEikLcNFqNTyabdljo9xDftZndUBFyyyL0aK3qGO9+8EilILHUw== + dependencies: + babel-runtime "^6.6.1" + prop-types "^15.5.8" + react-base16-styling "^0.5.1" + +react-lifecycles-compat@^3.0.0, react-lifecycles-compat@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" + integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== + +react-modal@^3.5.1: + version "3.11.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/react-modal/-/react-modal-3.11.2.tgz#bad911976d4add31aa30dba8a41d11e21c4ac8a4" + dependencies: + exenv "^1.2.0" + prop-types "^15.5.10" + react-lifecycles-compat "^3.0.0" + warning "^4.0.3" + +react-motion@^0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/react-motion/-/react-motion-0.5.2.tgz#0dd3a69e411316567927917c6626551ba0607316" + integrity sha512-9q3YAvHoUiWlP3cK0v+w1N5Z23HXMj4IF4YuvjvWegWqNPfLXsOBE/V7UvQGpXxHFKRQQcNcVQE31g9SB/6qgQ== + dependencies: + performance-now "^0.2.0" + prop-types "^15.5.8" + raf "^3.1.0" + +react-pure-render@^1.0.2: + version "1.0.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/react-pure-render/-/react-pure-render-1.0.2.tgz#9d8a928c7f2c37513c2d064e57b3e3c356e9fabb" + +react-redux@^5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.1.2.tgz#b19cf9e21d694422727bf798e934a916c4080f57" + integrity sha512-Ns1G0XXc8hDyH/OcBHOxNgQx9ayH3SPxBnFCOidGKSle8pKihysQw2rG/PmciUQRoclhVBO8HMhiRmGXnDja9Q== + dependencies: + "@babel/runtime" "^7.1.2" + hoist-non-react-statics "^3.3.0" + invariant "^2.2.4" + loose-envify "^1.1.0" + prop-types "^15.6.1" + react-is "^16.6.0" + react-lifecycles-compat "^3.0.0" + +react-scrollbar@^0.5.4: + version "0.5.6" + resolved "https://registry.yarnpkg.com/react-scrollbar/-/react-scrollbar-0.5.6.tgz#bd57b45714f8d70e56813fe299d7fb3a2e42a27b" + integrity sha512-TsSLsuovOlxmfTxY9bRjRUfQjycvfs73L4gz7yE+2D8Qs7U3zhwbGS0lj0JScCDipcyn7EX66LsaI00cU3aRSQ== + dependencies: + config "^1.24.0" + line-height "^0.1.1" + react-motion "^0.5.2" + +react-slider@0.11.2: + version "0.11.2" + resolved "https://registry.yarnpkg.com/react-slider/-/react-slider-0.11.2.tgz#ae014e1454c3cdd5f28b5c2495b2a08abd9971e6" + integrity sha512-y49ZwJJ7OcPdihgt71xYI8GRdAzpFuSLQR8b+cKotutxqf8MAEPEtqvWKlg+3ZQRe5PMN6oWbIb7wEYDF8XhNQ== + +react-tabs@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/react-tabs/-/react-tabs-2.3.0.tgz#0c37e786f288d369824acd06a96bd1818ab8b0dc" + integrity sha512-pYaefgVy76/36AMEP+B8YuVVzDHa3C5UFZ3REU78zolk0qMxEhKvUFofvDCXyLZwf0RZjxIfiwok1BEb18nHyA== + dependencies: + classnames "^2.2.0" + prop-types "^15.5.0" + +react-test-utils@0.0.1: + version "0.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/react-test-utils/-/react-test-utils-0.0.1.tgz#cd69a37c3e4d726e3497e325462a32785a19c026" + dependencies: + envify "~0.2.0" + react "~0.8.0" + +react-tooltip@^3.8.4: + version "3.11.6" + resolved "https://www.myget.org/F/dnn-software-public/npm/react-tooltip/-/react-tooltip-3.11.6.tgz#4f9735a2a4aa50580af351ce23e74a56f41afc0c" + dependencies: + prop-types "^15.6.0" + +react-tooltip@^4.2.6: + version "4.2.6" + resolved "https://registry.yarnpkg.com/react-tooltip/-/react-tooltip-4.2.6.tgz#a3d5f0d1b0c597c0852ba09c5e2af0019b7cfc70" + integrity sha512-KX/zCsPFCI8RuulzBX86U+Ur7FvgGNRBdb7dUu0ndo8Urinn48nANq9wfq4ABlehweQjPzLl7XdNAtLKza+I3w== + dependencies: + prop-types "^15.7.2" + uuid "^7.0.3" + +react-transition-group@^1.2.0: + version "1.2.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/react-transition-group/-/react-transition-group-1.2.1.tgz#e11f72b257f921b213229a774df46612346c7ca6" + dependencies: + chain-function "^1.0.0" + dom-helpers "^3.2.0" + loose-envify "^1.3.1" + prop-types "^15.5.6" + warning "^3.0.0" + +react-transition-group@^2.4.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.9.0.tgz#df9cdb025796211151a436c69a8f3b97b5b07c8d" + integrity sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg== + dependencies: + dom-helpers "^3.4.0" + loose-envify "^1.4.0" + prop-types "^15.6.2" + react-lifecycles-compat "^3.0.4" + +react-widgets@^4.4.4: + version "4.5.0" + resolved "https://registry.yarnpkg.com/react-widgets/-/react-widgets-4.5.0.tgz#dbbb913b05ecd8de1b47af7aad00750be4ff88f1" + integrity sha512-e/Y9kyLL0xqMQ3vIf3CwLxhGYkqfMGJn98xZ+U98pwZ6JTAY2KSaVA1clx6iE+6/zBdEe8cNOEiTwjZrx5FE/w== + dependencies: + classnames "^2.2.6" + date-arithmetic "^3.1.0" + dom-helpers "^3.3.1" + invariant "^2.2.4" + prop-types-extra "^1.0.1" + react-component-managers "^3.1.0" + react-lifecycles-compat "^3.0.4" + react-transition-group "^2.4.0" + uncontrollable "^5.0.0" + warning "^3.0.0" + +react@^16.6.3: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e" + integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + +react@~0.8.0: + version "0.8.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/react/-/react-0.8.0.tgz#9aef0dbc3e05b44d96139cdbdaa5d727b0506e1e" + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: + version "2.3.7" + resolved "https://www.myget.org/F/dnn-software-public/npm/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.0.6, readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdirp@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + +readdirp@~3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.4.0.tgz#9fdccdf9e9155805449221ac645e8303ab5b9ada" + integrity sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ== + dependencies: + picomatch "^2.2.1" + +redux-devtools-dock-monitor@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/redux-devtools-dock-monitor/-/redux-devtools-dock-monitor-1.1.3.tgz#1205e823c82536570aac8551a1c4b70972cba6aa" + integrity sha512-yAXzoI0lpjv19CxVuw8RECeFWUVdyzayqnkX8ePZyeXV2ZgIk4T+rKx82Wk+REP1y3rl8o1/oFDq4B7EobOqMg== + dependencies: + babel-runtime "^6.2.0" + parse-key "^0.2.1" + prop-types "^15.5.8" + react-dock "^0.2.4" + react-pure-render "^1.0.2" + +redux-devtools-instrument@^1.9.0: + version "1.9.6" + resolved "https://registry.yarnpkg.com/redux-devtools-instrument/-/redux-devtools-instrument-1.9.6.tgz#6b412595f74b9d48cfd4ecc13e585b1588ed6e7e" + integrity sha512-MwvY4cLEB2tIfWWBzrUR02UM9qRG2i7daNzywRvabOSVdvAY7s9BxSwMmVRH1Y/7QWjplNtOwgT0apKhHg2Qew== + dependencies: + lodash "^4.2.0" + symbol-observable "^1.0.2" + +redux-devtools-log-monitor@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/redux-devtools-log-monitor/-/redux-devtools-log-monitor-1.4.0.tgz#716b9580eda2a331cd359a36aa09e3a1602a854b" + integrity sha1-cWuVgO2iozHNNZo2qgnjoWAqhUs= + dependencies: + lodash.debounce "^4.0.4" + prop-types "^15.0.0" + react-json-tree "^0.11.0" + react-pure-render "^1.0.2" + redux-devtools-themes "^1.0.0" + +redux-devtools-themes@^1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/redux-devtools-themes/-/redux-devtools-themes-1.0.0.tgz#c482dce3c5373976045f40134907d9dcb3ae3d5d" + dependencies: + base16 "^1.0.0" + +redux-devtools@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/redux-devtools/-/redux-devtools-3.5.0.tgz#d69ab76d4f0f8abdf6d24bcf5954d7a1aa2b6827" + integrity sha512-pGU8TZNvWxPaCCE432AGm6H6alQbAz80gQM5CzM3SjX9/oSNu/HPF17xFdPQJOXasqyih1Gv167kZDTRe7r0iQ== + dependencies: + lodash "^4.2.0" + prop-types "^15.5.7" + redux-devtools-instrument "^1.9.0" + +redux-immutable-state-invariant@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/redux-immutable-state-invariant/-/redux-immutable-state-invariant-2.1.0.tgz#308fd3cc7415a0e7f11f51ec997b6379c7055ce1" + integrity sha512-3czbDKs35FwiBRsx/3KabUk5zSOoTXC+cgVofGkpBNv3jQcqIe5JrHcF5AmVt7B/4hyJ8MijBIpCJ8cife6yJg== + dependencies: + invariant "^2.1.0" + json-stringify-safe "^5.0.1" + +redux-thunk@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.3.0.tgz#51c2c19a185ed5187aaa9a2d08b666d0d6467622" + integrity sha512-km6dclyFnmcvxhAcrQV2AkZmPQjzPDjgVlQtR0EQjxZPyJ0BnMf3in1ryuR8A2qU0HldVRfxYXbFSKlI3N7Slw== + +redux-undo@^1.0.0-beta9: + version "1.0.1" + resolved "https://registry.yarnpkg.com/redux-undo/-/redux-undo-1.0.1.tgz#8d989d6c326e6718f4471042e90a5b8b6f3317eb" + integrity sha512-0yFPT+FUgwxCEiS0Mg5T1S4tkgjR8h6sJRY9CW4EMsbJOf1SxO289TbJmlzhRouCHacdDF+powPjrjLHoJYxWQ== + +redux@^4.0.1: + version "4.0.5" + resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.5.tgz#4db5de5816e17891de8a80c424232d06f051d93f" + integrity sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w== + dependencies: + loose-envify "^1.4.0" + symbol-observable "^1.2.0" + +regenerate-unicode-properties@^8.2.0: + version "8.2.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec" + dependencies: + regenerate "^1.4.0" + +regenerate@^1.4.0: + version "1.4.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" + +regenerator-runtime@^0.10.5: + version "0.10.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" + integrity sha1-M2w+/BIgrc7dosn6tntaeVWjNlg= + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + +regenerator-runtime@^0.13.4: + version "0.13.5" + resolved "https://www.myget.org/F/dnn-software-public/npm/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697" + +regenerator-transform@^0.14.2: + version "0.14.4" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.4.tgz#5266857896518d1616a78a0479337a30ea974cc7" + integrity sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw== + dependencies: + "@babel/runtime" "^7.8.4" + private "^0.1.8" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regexp.prototype.flags@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75" + integrity sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== + +regexpu-core@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938" + integrity sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ== + dependencies: + regenerate "^1.4.0" + regenerate-unicode-properties "^8.2.0" + regjsgen "^0.5.1" + regjsparser "^0.6.4" + unicode-match-property-ecmascript "^1.0.4" + unicode-match-property-value-ecmascript "^1.2.0" + +regjsgen@^0.5.1: + version "0.5.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/regjsgen/-/regjsgen-0.5.1.tgz#48f0bf1a5ea205196929c0d9798b42d1ed98443c" + +regjsparser@^0.6.4: + version "0.6.4" + resolved "https://www.myget.org/F/dnn-software-public/npm/regjsparser/-/regjsparser-0.6.4.tgz#a769f8684308401a66e9b529d2436ff4d0666272" + dependencies: + jsesc "~0.5.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + +repeat-string@^1.6.1: + version "1.6.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +request@^2.83.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +require-uncached@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + integrity sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM= + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= + dependencies: + resolve-from "^3.0.0" + +resolve-dir@^1.0.0, resolve-dir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" + integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= + dependencies: + expand-tilde "^2.0.0" + global-modules "^1.0.0" + +resolve-from@^1.0.0: + version "1.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + +resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.3.2: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +ret@~0.1.10: + version "0.1.15" + resolved "https://www.myget.org/F/dnn-software-public/npm/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= + +rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +rimraf@~2.6.2: + version "2.6.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + dependencies: + glob "^7.1.3" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +run-async@^2.2.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + +run-queue@^1.0.0, run-queue@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" + integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= + dependencies: + aproba "^1.1.1" + +rxjs@^6.4.0: + version "6.5.5" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" + integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== + dependencies: + tslib "^1.9.0" + +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + +safe-buffer@>=5.1.0: + version "5.2.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +scheduler@^0.19.1: + version "0.19.1" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196" + integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + +schema-utils@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" + integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== + dependencies: + ajv "^6.1.0" + ajv-errors "^1.0.0" + ajv-keywords "^3.1.0" + +scroll@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/scroll/-/scroll-2.0.3.tgz#0951b785544205fd17753bc3d294738ba16fc2ab" + integrity sha512-3ncZzf8gUW739h3LeS68nSssO60O+GGjT3SxzgofQmT8PIoyHzebql9HHPJopZX8iT6TKOdwaWFMqL6LzUN3DQ== + dependencies: + rafl "~1.2.1" + +select-hose@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" + integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= + +selfsigned@^1.10.7: + version "1.10.7" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.7.tgz#da5819fd049d5574f28e88a9bcc6dbc6e6f3906b" + integrity sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA== + dependencies: + node-forge "0.9.0" + +"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" + integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== + +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +send@0.17.1: + version "0.17.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +serialize-javascript@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-3.1.0.tgz#8bf3a9170712664ef2561b44b691eafe399214ea" + integrity sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg== + dependencies: + randombytes "^2.1.0" + +serve-index@^1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" + integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= + dependencies: + accepts "~1.3.4" + batch "0.6.1" + debug "2.6.9" + escape-html "~1.0.3" + http-errors "~1.6.2" + mime-types "~2.1.17" + parseurl "~1.3.2" + +serve-static@1.14.1: + version "1.14.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +setimmediate@^1.0.4: + version "1.0.5" + resolved "https://www.myget.org/F/dnn-software-public/npm/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shallowequal@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" + integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + +shortid@^2.2.13: + version "2.2.15" + resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.15.tgz#2b902eaa93a69b11120373cd42a1f1fe4437c122" + integrity sha512-5EaCy2mx2Jgc/Fdn9uuDuNIIfWBpzY4XIlhoqtXF6qsf+/+SGZ+FxDdX/ZsMZiWupIWNqAEmiNY4RC+LSmCeOw== + dependencies: + nanoid "^2.1.0" + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== + +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== + dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" + is-fullwidth-code-point "^2.0.0" + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +sockjs-client@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.4.0.tgz#c9f2568e19c8fd8173b4997ea3420e0bb306c7d5" + integrity sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g== + dependencies: + debug "^3.2.5" + eventsource "^1.0.7" + faye-websocket "~0.11.1" + inherits "^2.0.3" + json3 "^3.3.2" + url-parse "^1.4.3" + +sockjs@0.3.20: + version "0.3.20" + resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.20.tgz#b26a283ec562ef8b2687b44033a4eeceac75d855" + integrity sha512-SpmVOVpdq0DJc0qArhF3E5xsxvaiqGNb73XfgBpK1y3UD5gs8DSo8aCTsuT5pX8rssdc2NDIzANwP9eCAiSdTA== + dependencies: + faye-websocket "^0.10.0" + uuid "^3.4.0" + websocket-driver "0.6.5" + +source-list-map@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" + integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== + +source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@~0.5.12: + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + +source-map@^0.5.0, source-map@^0.5.6: + version "0.5.7" + resolved "https://www.myget.org/F/dnn-software-public/npm/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@^0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" + integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== + +spdx-correct@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.5" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" + integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== + +spdy-transport@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" + integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== + dependencies: + debug "^4.1.0" + detect-node "^2.0.4" + hpack.js "^2.1.6" + obuf "^1.1.2" + readable-stream "^3.0.6" + wbuf "^1.7.3" + +spdy@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.2.tgz#b74f466203a3eda452c02492b91fb9e84a27677b" + integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== + dependencies: + debug "^4.1.0" + handle-thing "^2.0.0" + http-deceiver "^1.2.7" + select-hose "^2.0.0" + spdy-transport "^3.0.0" + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + dependencies: + extend-shallow "^3.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +spy-on-component@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/spy-on-component/-/spy-on-component-1.1.3.tgz#7052dac3f82e7ac8627933088ba0106ec47603d5" + integrity sha512-a7jgnoBSdkcDWIQQwtEgUq4etajwG6+wGIjfC9ARUKwKOdHxJd+utgHTgLn81ETizpsw4xddUS3W8VePedtaIQ== + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +ssri@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" + integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== + dependencies: + figgy-pudding "^3.5.1" + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + +stream-browserify@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" + integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-each@^1.1.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" + integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== + dependencies: + end-of-stream "^1.1.0" + stream-shift "^1.0.0" + +stream-http@^2.7.2: + version "2.8.3" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" + integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.3.6" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +stream-shift@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" + integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== + +string-width@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string.prototype.trimend@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" + integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string.prototype.trimleft@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz#4408aa2e5d6ddd0c9a80739b087fbc067c03b3cc" + integrity sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + string.prototype.trimstart "^1.0.0" + +string.prototype.trimright@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz#c76f1cef30f21bbad8afeb8db1511496cfb0f2a3" + integrity sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + string.prototype.trimend "^1.0.0" + +string.prototype.trimstart@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" + integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string_decoder@^1.0.0, string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-json-comments@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +style-loader@0.23.1: + version "0.23.1" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.1.tgz#cb9154606f3e771ab6c4ab637026a1049174d925" + integrity sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg== + dependencies: + loader-utils "^1.1.0" + schema-utils "^1.0.0" + +superagent@^3.2.1: + version "3.8.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/superagent/-/superagent-3.8.3.tgz#460ea0dbdb7d5b11bc4f78deba565f86a178e128" + dependencies: + component-emitter "^1.2.0" + cookiejar "^2.1.0" + debug "^3.1.0" + extend "^3.0.0" + form-data "^2.3.1" + formidable "^1.2.0" + methods "^1.1.1" + mime "^1.4.1" + qs "^6.5.1" + readable-stream "^2.3.5" + +supports-color@6.1.0, supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== + dependencies: + has-flag "^3.0.0" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + dependencies: + has-flag "^3.0.0" + +symbol-observable@^1.0.2, symbol-observable@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" + integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== + +table@^5.0.2: + version "5.4.6" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" + integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== + dependencies: + ajv "^6.10.2" + lodash "^4.17.14" + slice-ansi "^2.1.0" + string-width "^3.0.0" + +tapable@^1.0.0, tapable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== + +terser-webpack-plugin@^1.4.3: + version "1.4.4" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.4.tgz#2c63544347324baafa9a56baaddf1634c8abfc2f" + integrity sha512-U4mACBHIegmfoEe5fdongHESNJWqsGU+W0S/9+BmYGVQDw1+c2Ow05TpMhxjPK1sRb7cuYq1BPl1e5YHJMTCqA== + dependencies: + cacache "^12.0.2" + find-cache-dir "^2.1.0" + is-wsl "^1.1.0" + schema-utils "^1.0.0" + serialize-javascript "^3.1.0" + source-map "^0.6.1" + terser "^4.1.2" + webpack-sources "^1.4.0" + worker-farm "^1.7.0" + +terser@^4.1.2: + version "4.7.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.7.0.tgz#15852cf1a08e3256a80428e865a2fa893ffba006" + integrity sha512-Lfb0RiZcjRDXCC3OSHJpEkxJ9Qeqs6mp2v4jf2MHfy8vGERmVDuvjXdd/EnP5Deme5F2yBRBymKmKHCBg2echw== + dependencies: + commander "^2.20.0" + source-map "~0.6.1" + source-map-support "~0.5.12" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + +throttle-debounce@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-2.1.0.tgz#257e648f0a56bd9e54fe0f132c4ab8611df4e1d5" + integrity sha512-AOvyNahXQuU7NN+VVvOOX+uW6FPaWdAOdRP5HfwYxAfCzXTFKRMoIMk+n+po318+ktcChx+F1Dd91G3YHeMKyg== + +through2@^2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + +through@^2.3.6, through@~2.3.4: + version "2.3.8" + resolved "https://www.myget.org/F/dnn-software-public/npm/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +thunky@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" + integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== + +timers-browserify@^2.0.4: + version "2.0.11" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f" + integrity sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ== + dependencies: + setimmediate "^1.0.4" + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= + +to-camel-case@1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/to-camel-case/-/to-camel-case-1.0.0.tgz#1a56054b2f9d696298ce66a60897322b6f423e46" + dependencies: + to-space-case "^1.0.0" + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +to-no-case@^1.0.0: + version "1.0.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/to-no-case/-/to-no-case-1.0.2.tgz#c722907164ef6b178132c8e69930212d1b4aa16a" + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +to-space-case@^1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/to-space-case/-/to-space-case-1.0.0.tgz#b052daafb1b2b29dc770cea0163e5ec0ebc9fc17" + dependencies: + to-no-case "^1.0.0" + +toggle-selection@^1.0.6: + version "1.0.6" + resolved "https://www.myget.org/F/dnn-software-public/npm/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32" + +toidentifier@1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + +tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tsconfig-paths@^3.9.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b" + integrity sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.0" + strip-bom "^3.0.0" + +tslib@^1.9.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" + integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== + +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +type-check@~0.3.2: + version "0.3.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +type-is@~1.6.17, type-is@~1.6.18: + version "1.6.18" + resolved "https://www.myget.org/F/dnn-software-public/npm/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://www.myget.org/F/dnn-software-public/npm/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +uncontrollable@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/uncontrollable/-/uncontrollable-5.1.0.tgz#7e9a1c50ea24e3c78b625e52d21ff3f758c7bd59" + integrity sha512-5FXYaFANKaafg4IVZXUNtGyzsnYEvqlr9wQ3WpZxFpEUxl29A3H6Q4G1Dnnorvq9TGOGATBApWR4YpLAh+F5hw== + dependencies: + invariant "^2.2.4" + +unicode-canonical-property-names-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://www.myget.org/F/dnn-software-public/npm/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" + +unicode-match-property-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://www.myget.org/F/dnn-software-public/npm/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" + dependencies: + unicode-canonical-property-names-ecmascript "^1.0.4" + unicode-property-aliases-ecmascript "^1.0.4" + +unicode-match-property-value-ecmascript@^1.2.0: + version "1.2.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz#0d91f600eeeb3096aa962b1d6fc88876e64ea531" + +unicode-property-aliases-ecmascript@^1.0.4: + version "1.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz#dd57a99f6207bedff4628abefb94c50db941c8f4" + +union-value@^1.0.0: + version "1.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + +uniq@^1.0.1: + version "1.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + +unique-filename@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" + integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== + dependencies: + unique-slug "^2.0.0" + +unique-slug@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" + integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== + dependencies: + imurmurhash "^0.1.4" + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +upath@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== + +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + dependencies: + punycode "^2.1.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + +url-loader@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-1.1.2.tgz#b971d191b83af693c5e3fea4064be9e1f2d7f8d8" + integrity sha512-dXHkKmw8FhPqu8asTc1puBfe3TehOCo2+RmOOev5suNCIYBcT626kxiWg1NBVkwc4rO8BGa7gP70W7VXuqHrjg== + dependencies: + loader-utils "^1.1.0" + mime "^2.0.3" + schema-utils "^1.0.0" + +url-parse@^1.4.3: + version "1.4.7" + resolved "https://www.myget.org/F/dnn-software-public/npm/url-parse/-/url-parse-1.4.7.tgz#a8a83535e8c00a316e403a5db4ac1b9b853ae278" + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +use@^3.1.0: + version "3.1.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +util@0.10.3: + version "0.10.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + dependencies: + inherits "2.0.1" + +util@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" + integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== + dependencies: + inherits "2.0.3" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + +uuid@^3.3.2, uuid@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +uuid@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" + integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== + +v8-compile-cache@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe" + integrity sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +vary@~1.1.2: + version "1.1.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +vm-browserify@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" + integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== + +warning@^3.0.0: + version "3.0.0" + resolved "https://www.myget.org/F/dnn-software-public/npm/warning/-/warning-3.0.0.tgz#32e5377cb572de4ab04753bdf8821c01ed605b7c" + dependencies: + loose-envify "^1.0.0" + +warning@^4.0.0, warning@^4.0.3: + version "4.0.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3" + dependencies: + loose-envify "^1.0.0" + +watchpack-chokidar2@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/watchpack-chokidar2/-/watchpack-chokidar2-2.0.0.tgz#9948a1866cbbd6cb824dea13a7ed691f6c8ddff0" + integrity sha512-9TyfOyN/zLUbA288wZ8IsMZ+6cbzvsNyEzSBp6e/zkifi6xxbl8SmQ/CxQq32k8NNqrdVEVUVSEf56L4rQ/ZxA== + dependencies: + chokidar "^2.1.8" + +watchpack@^1.6.1: + version "1.7.2" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.2.tgz#c02e4d4d49913c3e7e122c3325365af9d331e9aa" + integrity sha512-ymVbbQP40MFTp+cNMvpyBpBtygHnPzPkHqoIwRRj/0B8KhqQwV8LaKjtbaxF2lK4vl8zN9wCxS46IFCU5K4W0g== + dependencies: + graceful-fs "^4.1.2" + neo-async "^2.5.0" + optionalDependencies: + chokidar "^3.4.0" + watchpack-chokidar2 "^2.0.0" + +wbuf@^1.1.0, wbuf@^1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" + integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== + dependencies: + minimalistic-assert "^1.0.0" + +webpack-bundle-size-analyzer@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/webpack-bundle-size-analyzer/-/webpack-bundle-size-analyzer-3.1.0.tgz#ff4a4a17d34b8858b56eecb87826365395264669" + integrity sha512-8WlTT6uuCxZgZYNnCB0pRGukWRGH+Owg+HsqQUe1Zexakdno1eDYO+lE7ihBo9G0aCCZCJa8JWjYr9eLYfZrBA== + dependencies: + commander "^2.19.0" + filesize "^3.6.1" + humanize "0.0.9" + +webpack-cli@3.3.11: + version "3.3.11" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.11.tgz#3bf21889bf597b5d82c38f215135a411edfdc631" + integrity sha512-dXlfuml7xvAFwYUPsrtQAA9e4DOe58gnzSxhgrO/ZM/gyXTBowrsYeubyN4mqGhYdpXMFNyQ6emjJS9M7OBd4g== + dependencies: + chalk "2.4.2" + cross-spawn "6.0.5" + enhanced-resolve "4.1.0" + findup-sync "3.0.0" + global-modules "2.0.0" + import-local "2.0.0" + interpret "1.2.0" + loader-utils "1.2.3" + supports-color "6.1.0" + v8-compile-cache "2.0.3" + yargs "13.2.4" + +webpack-dev-middleware@^3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz#0019c3db716e3fa5cecbf64f2ab88a74bab331f3" + integrity sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw== + dependencies: + memory-fs "^0.4.1" + mime "^2.4.4" + mkdirp "^0.5.1" + range-parser "^1.2.1" + webpack-log "^2.0.0" + +webpack-dev-server@3.11.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.11.0.tgz#8f154a3bce1bcfd1cc618ef4e703278855e7ff8c" + integrity sha512-PUxZ+oSTxogFQgkTtFndEtJIPNmml7ExwufBZ9L2/Xyyd5PnOL5UreWe5ZT7IU25DSdykL9p1MLQzmLh2ljSeg== + dependencies: + ansi-html "0.0.7" + bonjour "^3.5.0" + chokidar "^2.1.8" + compression "^1.7.4" + connect-history-api-fallback "^1.6.0" + debug "^4.1.1" + del "^4.1.1" + express "^4.17.1" + html-entities "^1.3.1" + http-proxy-middleware "0.19.1" + import-local "^2.0.0" + internal-ip "^4.3.0" + ip "^1.1.5" + is-absolute-url "^3.0.3" + killable "^1.0.1" + loglevel "^1.6.8" + opn "^5.5.0" + p-retry "^3.0.1" + portfinder "^1.0.26" + schema-utils "^1.0.0" + selfsigned "^1.10.7" + semver "^6.3.0" + serve-index "^1.9.1" + sockjs "0.3.20" + sockjs-client "1.4.0" + spdy "^4.0.2" + strip-ansi "^3.0.1" + supports-color "^6.1.0" + url "^0.11.0" + webpack-dev-middleware "^3.7.2" + webpack-log "^2.0.0" + ws "^6.2.1" + yargs "^13.3.2" + +webpack-log@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-2.0.0.tgz#5b7928e0637593f119d32f6227c1e0ac31e1b47f" + integrity sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg== + dependencies: + ansi-colors "^3.0.0" + uuid "^3.3.2" + +webpack-sources@^1.4.0, webpack-sources@^1.4.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" + integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== + dependencies: + source-list-map "^2.0.0" + source-map "~0.6.1" + +webpack@4.43.0: + version "4.43.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.43.0.tgz#c48547b11d563224c561dad1172c8aa0b8a678e6" + integrity sha512-GW1LjnPipFW2Y78OOab8NJlCflB7EFskMih2AHdvjbpKMeDJqEgSx24cXXXiPS65+WSwVyxtDsJH6jGX2czy+g== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/wasm-edit" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + acorn "^6.4.1" + ajv "^6.10.2" + ajv-keywords "^3.4.1" + chrome-trace-event "^1.0.2" + enhanced-resolve "^4.1.0" + eslint-scope "^4.0.3" + json-parse-better-errors "^1.0.2" + loader-runner "^2.4.0" + loader-utils "^1.2.3" + memory-fs "^0.4.1" + micromatch "^3.1.10" + mkdirp "^0.5.3" + neo-async "^2.6.1" + node-libs-browser "^2.2.1" + schema-utils "^1.0.0" + tapable "^1.1.3" + terser-webpack-plugin "^1.4.3" + watchpack "^1.6.1" + webpack-sources "^1.4.1" + +websocket-driver@0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.6.5.tgz#5cb2556ceb85f4373c6d8238aa691c8454e13a36" + integrity sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY= + dependencies: + websocket-extensions ">=0.1.1" + +websocket-driver@>=0.5.1: + version "0.7.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" + dependencies: + http-parser-js ">=0.4.0 <0.4.11" + safe-buffer ">=5.1.0" + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@^1.2.14, which@^1.2.9, which@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://www.myget.org/F/dnn-software-public/npm/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + +worker-farm@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" + integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== + dependencies: + errno "~0.1.7" + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +write@^0.2.1: + version "0.2.1" + resolved "https://www.myget.org/F/dnn-software-public/npm/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + +ws@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" + integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== + dependencies: + async-limiter "~1.0.0" + +xtend@^4.0.0, xtend@~4.0.1: + version "4.0.2" + resolved "https://www.myget.org/F/dnn-software-public/npm/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + +y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yargs-parser@^13.1.0, yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs@13.2.4: + version "13.2.4" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" + integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.0" + +yargs@^13.3.2: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.dnn b/DNN Platform/Modules/ResourceManager/ResourceManager.dnn new file mode 100644 index 00000000000..efb7572b945 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.dnn @@ -0,0 +1,100 @@ + + + + Resource Manager + This module allows you to manage files on the server + ~/Images/icon_filemanager_32px.gif + + DNN + .NET Foundation + https://dnncommunity.org + info@dnncommunity.org + + + + + 09.02.00 + + + + + DesktopModules\ResourceManager + + + + + + + + DesktopModules/ResourceManager + + Resources.zip + + + + + + ResourceManager + ResourceManager + + + + ResourceManager + 0 + + + + DesktopModules/ResourceManager/View.ascx + False + + View + + + 0 + + + Settings + DesktopModules/ResourceManager/Settings.ascx + False + ResourceManager Settings + Edit + + + 0 + + + EditFolderMapping + DesktopModules/ResourceManager/EditFolderMapping.ascx + True + Edit Folder Mapping + Edit + + + 0 + True + + + + + + + + + + Dnn.Modules.ResourceManager.dll + bin + + + + + + + diff --git a/DNN Platform/Modules/ResourceManager/Scripts/dnn.Localization.js b/DNN Platform/Modules/ResourceManager/Scripts/dnn.Localization.js new file mode 100644 index 00000000000..a54e9227ac7 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Scripts/dnn.Localization.js @@ -0,0 +1,362 @@ +/* + * DotNetNuke® - http://www.dotnetnuke.com + * Copyright (c) 2002-2020 + * by DotNetNuke Corporation + * All Rights Reserved + */ + +/*** + * @class Localization + * + * Check if window storage is avaible, get resources settings, check resources timestamp, return sotred resources + * or request for new resources, store it if can and return resources + * + * @depends dnn.jquery.js + * + * @param {object} options: { + * {string} service + * {string} controller + * {string} resxName, name for store data, normally MyResourcesResx + * + * {object} resourceSettings: { + * {object} local, if defined, the remote request is not needed and the values for culture an timestamp are set here. + * { + * {string} culture, if defined, contains the current culture, so the + * {string} resxTimeStamp, if defined, contains the current culture + * }, + * {string} method, method name to obtain resource settings + * {string} methodType (get), get or post + * {object} data (null), add parameters to request (get or post) + * {string} paramNames: { name of parameters returned by the server + * {string} culture (culture), name for culture parameter + * {string} resxTimeStamp (resxTimeStamp), name for timestamp parameter + * }, + * {function} callback200(data) (null), callback to call after resource settings request for status 200, + data will return an object {culture: 'culture', resxTimeStamp: number} + * {function} callbackError (null), callback to call after resource settigs request for status not 200 + * }, + * + * {object} resources: { + * {string} method: method name to obtain resources + * {string} methodType (get), get or post + * {object} data (null), add parameters to request (get or post) + * {string} paramName (localization), name of parameter for returned data (if null, then resx are directly in the response). + * {function} callback200(data) (null), callback to call after resource request or storage load for status 200, + * normally you want use this callback to assign your resources, + data will return an object {localization: {resource_name: 'resource value'}} + * {function} callbackError (null), callback to call after resource request or storage load for status not 200 + * } + * } + * + */ + +// Namespace +window.dnn = window.dnn || {}; +window.dnn.utils = window.dnn.utils || {}; + +if (typeof window.dnn.utils.Localization === "undefined") { + (function IIFE() { + var LocalizationClass; + + LocalizationClass = (function IIFE() { + 'use strict'; + + //var this.options, this.resourceSettings; + + var detectStorage, + getStoredData, + setStoredData, + compareTimeStamp, + getServiceUrl, + getResourcesSettings, + getResourcesSettings200, + getResources, + getResources200, + updateCulture, + copyOtherSettings; + + /* Class properties */ + Localization["class"] = 'Localization'; + Localization.type = 'Class'; + Localization.storageAllowed = false; + + /* Private Constants and Properties */ + //this.options = {}; + + /* Constructor */ + function Localization(options) { + //console.log('~Localization'); + this.options = {}; + + // Defaults + if (!options.service || typeof options.service !== 'string') throw 'No service provided'; + this.options.service = options.service; + + if (!options.controller || typeof options.controller !== 'string') throw 'No controller provided'; + this.options.controller = options.controller; + + if (!options.resxName) throw 'No resxName provided'; + this.options.resxName = options.resxName; + + this.options.culture = options.culture || ''; + + this.options.key = this.options.resxName + this.options.culture; + this.options.keyTS = this.options.resxName + 'TimeStamp' + this.options.culture; + + this.options.key = this.options.resxName; + this.options.keyTS = this.options.resxName + 'TimeStamp' + this.options.culture; + + if (this.options.culture !== '') { + this.options.key += '.' + this.options.culture; + this.options.keyTS += '.' + this.options.culture; + } + + // Resource Settings + if (!options.resourceSettings || typeof options.resourceSettings !== 'object') + throw 'No resourceSettings provided'; + this.options.resourceSettings = options.resourceSettings; + + if (this.options.resourceSettings.local) { + if (!this.options.resourceSettings.local.culture || + !this.options.resourceSettings.local.resxTimeStamp) { + throw 'No local resourceSettings provided'; + } + options.resourceSettings.paramNames = options.resourceSettings.paramNames || {}; + } else { + if (!options.resourceSettings.method || typeof options.resourceSettings.method !== 'string') + throw 'No method for get resource settings provided'; + this.options.resourceSettings.method = options.resourceSettings.method; + + this.options.resourceSettings.methodType = options.resourceSettings.methodType || 'get'; + + if (!options.resourceSettings.paramNames || + typeof options.resourceSettings.paramNames !== 'object') { + options.resourceSettings.paramNames = {}; + } + + this.options.resourceSettings.params = this.options.resourceSettings.params || {}; + this.options.resourceSettings.callback200 = options.resourceSettings.callback200 || null; + this.options.resourceSettings.callbackError = options.resourceSettings.callbackError || null; + } + options.resourceSettings.paramNames.culture = options.resourceSettings.paramNames.culture || 'culture'; + options.resourceSettings.paramNames.resxTimeStamp = + options.resourceSettings.paramNames.resxTimeStamp || 'resxTimeStamp'; + this.options.resourceSettings.paramName = options.resourceSettings.paramNames; + + // Resources + if (!options.resources || typeof options.resources !== 'object') throw 'No resources provided'; + this.options.resources = options.resources; + + if (!options.resources.method || typeof options.resources.method !== 'string') + throw 'No method for get resource settings provided'; + this.options.resources.method = options.resources.method; + + this.options.resources.methodType = options.resources.methodType || 'get'; + + this.options.resources.params = this.options.resources.params || {}; + this.options.resources.callback200 = options.resources.callback200 || null; + this.options.resources.callbackError = options.resources.callbackError || null; + + detectStorage.call(this); + if (this.options.resourceSettings.local) { + getResourcesSettings200.call(this, this.options.resourceSettings.local); + } else { + getResourcesSettings.call(this); + } + } + + /* Private Methods */ + detectStorage = function() { + var fail, uid; + try { + uid = new Date(); + (Localization.storageAllowed = window.localStorage).setItem(uid, uid); + fail = Localization.storageAllowed.getItem(uid) !== uid + ''; + Localization.storageAllowed.removeItem(uid); + Localization.storageAllowed = fail ? false : true; + } catch (ex) { + Localization.storageAllowed = false; + } + }; + + getStoredData = function() { + + var stored; + if (!Localization.storageAllowed) return false; + + try { + stored = JSON.parse(window.localStorage.getItem(this.options.key)); + } catch (err) { + stored = {}; + window.localStorage.removeItem(this.options.key); + } + return { + storedTS: window.localStorage.getItem(this.options.keyTS), + stored: stored + }; + }; + + setStoredData = function(stored, storedTS) { + if (!Localization.storageAllowed) return false; + + try { + window.localStorage.setItem(this.options.key, JSON.stringify(stored)); + window.localStorage.setItem(this.options.keyTS, storedTS); + } catch (ex) { + if (ex.name === "QuotaExceededError") { + console.log("Local Storage might be full."); + } + console.log(ex); + if (window.localStorage[this.options.key]) { + window.localStorage.removeItem(this.options.key); + } + if (window.localStorage[this.options.keyTS]) { + window.localStorage.removeItem(this.options.keyTS); + } + return false; + } + }; + + compareTimeStamp = function(storedTS) { + if (!Localization.storageAllowed) return false; + return getStoredData.call(this).storedTS + '' === storedTS + ''; + }; + + getServiceUrl = function(method) { + return $.dnnSF().getServiceRoot(this.options.service) + this.options.controller + '/' + method; + }; + + getResourcesSettings = function() { + var self = this; + $.ajax({ + url: getServiceUrl.call(self, this.options.resourceSettings.method), + type: this.options.resourceSettings.methodType, + data: this.options.resourceSettings.data, + beforeSend: $.dnnSF().setModuleHeaders, + complete: null, // Study this case + success: function(data) { + getResourcesSettings200.call(self, data); + }, + error: this.options.resourceSettings.callbackError + }); + }; + + copyOtherSettings = function(settings, otherSettings) { + return $.extend(settings, otherSettings); + }; + + getResourcesSettings200 = function(data) { + + this.resourceSettings = { + culture: null, + resxTimeStamp: null + }; + + // Not browser storage allowed and no callback for this request + if (!Localization.storageAllowed && typeof this.options.resourceSettings.callback200 !== 'function') { + this.resourceSettings.culture = data[this.options.resourceSettings.paramNames.culture]; + updateCulture.call(this, this.resourceSettings.culture); + getResources.call(this); + return; + } + + if (!data[this.options.resourceSettings.paramNames.culture]) { + throw 'No culture from server'; + } + if (!data[this.options.resourceSettings.paramNames.resxTimeStamp]) { + throw 'No resxTimeStamp from server'; + } + + this.resourceSettings.culture = data[this.options.resourceSettings.paramNames.culture]; + updateCulture.call(this, this.resourceSettings.culture); + this.resourceSettings.resxTimeStamp = data[this.options.resourceSettings.paramNames.resxTimeStamp]; + + this.resourceSettings = copyOtherSettings(this.resourceSettings, data); + + if (typeof this.options.resourceSettings.callback200 === 'function') { + this.options.resourceSettings.callback200(this.resourceSettings); + + // Not browser storage allowed but callback for this request: callback and getResources + if (!Localization.storageAllowed) { + getResources.call(this); + return; + } + } + + // Return data from local or get new + if (this.resourceSettings.culture && this.resourceSettings.resxTimeStamp) { + if (compareTimeStamp.call(this, this.resourceSettings.resxTimeStamp)) { + if (typeof this.options.resources.callback200 === 'function') + this.options.resources.callback200({ localization: getStoredData.call(this).stored }); + } else { + getResources.call(this); + } + } else { + getResources.call(this); + } + + if (typeof this.options.resourceSettings.callback200 === 'function') { + this.options.resourceSettings.callback200(this.resourceSettings); + } + }; + + getResources = function() { + var self = this; + this.options.resources.data = this.options.resources.data || {}; + this.options.resources.data.culture = this.resourceSettings.culture; + + $.ajax({ + url: getServiceUrl.call(self, this.options.resources.method), + type: this.options.resources.methodType, + data: this.options.resources.data, + beforeSend: $.dnnSF().setModuleHeaders, + complete: null, // Study this case + success: function(data) { + getResources200.call(self, data); + }, + error: this.options.resources.callbackError + }); + }; + + // If called, need store data + getResources200 = function(data) { + var resData; + resData = { localization: null }; + + if (this.options.resources.paramName) { + if (!data[this.options.resources.paramName]) { + throw 'No localization from server'; + } else { + resData.localization = data[this.options.resources.paramName]; + } + } else if (!data) { + throw 'No localization from server'; + } else { + resData.localization = data; + } + + if (resData.localization && this.resourceSettings.resxTimeStamp) + setStoredData.call(this, resData.localization, this.resourceSettings.resxTimeStamp); + + if (typeof this.options.resources.callback200 === 'function') + this.options.resources.callback200(resData); + }; + + updateCulture = function(culture) { + if (culture != this.options.culture) { + this.options.culture = this.resourceSettings.culture; + } + this.options.key = this.options.resxName + '.' + this.options.culture; + this.options.keyTS = this.options.resxName + 'TimeStamp.' + this.options.culture; + }; + + /* test-code */ + /* end-test-code */ + + return Localization; + })(); + + window.dnn.utils.Localization = LocalizationClass; + + }).call(this); +} diff --git a/DNN Platform/Modules/ResourceManager/Services/Attributes/ResourceManagerExceptionFilter.cs b/DNN Platform/Modules/ResourceManager/Services/Attributes/ResourceManagerExceptionFilter.cs new file mode 100644 index 00000000000..ebb9859df77 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Services/Attributes/ResourceManagerExceptionFilter.cs @@ -0,0 +1,46 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Services.Attributes +{ + using System.Net; + using System.Net.Http; + using System.Web.Http.Filters; + + using Dnn.Modules.ResourceManager.Exceptions; + + /// + /// A custom for the resource manager. + /// + public class ResourceManagerExceptionFilter : ExceptionFilterAttribute + { + /// + public override void OnException(HttpActionExecutedContext actionExecutedContext) + { + if (actionExecutedContext.Exception == null) + { + return; + } + + var exception = actionExecutedContext.Exception; + + if (exception is FolderPermissionNotMetException) + { + actionExecutedContext.Response = actionExecutedContext.Request.CreateResponse( + HttpStatusCode.Forbidden, + new { message = exception.Message }); + return; + } + + if (exception is NotFoundException) + { + actionExecutedContext.Response = actionExecutedContext.Request.CreateResponse( + HttpStatusCode.NotFound, + new { message = exception.Message }); + return; + } + + throw exception; + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Services/Dto/CreateNewFolderRequest.cs b/DNN Platform/Modules/ResourceManager/Services/Dto/CreateNewFolderRequest.cs new file mode 100644 index 00000000000..988bb1026aa --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Services/Dto/CreateNewFolderRequest.cs @@ -0,0 +1,31 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Services.Dto +{ + /// + /// Represents a request to create a new folder. + /// + public class CreateNewFolderRequest + { + /// + /// Gets or sets the new folder name. + /// + public string FolderName { get; set; } + + /// + /// Gets or sets he parent folder id for the new folder. + /// + public int ParentFolderId { get; set; } + + /// + /// Gets or sets the folder mapping id. + /// + public int FolderMappingId { get; set; } + + /// + /// Gets or sets the mapped name. + /// + public string MappedName { get; set; } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Services/Dto/DeleteFileRequest.cs b/DNN Platform/Modules/ResourceManager/Services/Dto/DeleteFileRequest.cs new file mode 100644 index 00000000000..619913407f1 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Services/Dto/DeleteFileRequest.cs @@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Services.Dto +{ + /// + /// Represents a request to delete a file. + /// + public class DeleteFileRequest + { + /// + /// Gets or sets the id of the file to delete. + /// + public int FileId { get; set; } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Services/Dto/DeleteFolderRequest.cs b/DNN Platform/Modules/ResourceManager/Services/Dto/DeleteFolderRequest.cs new file mode 100644 index 00000000000..f8ae9d79688 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Services/Dto/DeleteFolderRequest.cs @@ -0,0 +1,21 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Services.Dto +{ + /// + /// Represents a request to delete a folder. + /// + public class DeleteFolderRequest + { + /// + /// Gets or sets the id of the folder to delete. + /// + public int FolderId { get; set; } + + /// + /// Gets or sets a value indicating whether an unlink is allowed. + /// + public bool UnlinkAllowedStatus { get; set; } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Services/Dto/FileDetailsRequest.cs b/DNN Platform/Modules/ResourceManager/Services/Dto/FileDetailsRequest.cs new file mode 100644 index 00000000000..cc1b9fccfff --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Services/Dto/FileDetailsRequest.cs @@ -0,0 +1,37 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Services.Dto +{ + using System.Runtime.Serialization; + + /// + /// Represents a request to get file details. + /// + public class FileDetailsRequest + { + /// + /// Gets or sets the id of the file. + /// + [DataMember(Name = "fileId")] + public int FileId { get; set; } + + /// + /// Gets or sets the file name. + /// + [DataMember(Name = "fileName")] + public string FileName { get; set; } + + /// + /// Gets or sets the file title. + /// + [DataMember(Name = "title")] + public string Title { get; set; } + + /// + /// Gets or sets the description of the file. + /// + [DataMember(Name = "description")] + public string Description { get; set; } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Services/Dto/FolderDetailsRequest.cs b/DNN Platform/Modules/ResourceManager/Services/Dto/FolderDetailsRequest.cs new file mode 100644 index 00000000000..9798af3e3a9 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Services/Dto/FolderDetailsRequest.cs @@ -0,0 +1,31 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Services.Dto +{ + using System.Runtime.Serialization; + + /// + /// Represents a request for folder details. + /// + public class FolderDetailsRequest + { + /// + /// Gets or sets the id of the folder. + /// + [DataMember(Name = "folderId")] + public int FolderId { get; set; } + + /// + /// Gets or sets the name of the folder. + /// + [DataMember(Name = "folderName")] + public string FolderName { get; set; } + + /// + /// Gets or sets the . + /// + [DataMember(Name = "permissions")] + public FolderPermissions Permissions { get; set; } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Services/Dto/FolderPermissions.cs b/DNN Platform/Modules/ResourceManager/Services/Dto/FolderPermissions.cs new file mode 100644 index 00000000000..518730fb04b --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Services/Dto/FolderPermissions.cs @@ -0,0 +1,88 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Services.Dto +{ + using System.Linq; + + using Dnn.Modules.ResourceManager.Components; + + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Security.Permissions; + + /// + /// Provides information about folder permissions. + /// + public class FolderPermissions : Permissions + { + /// + /// Initializes a new instance of the class. + /// + public FolderPermissions() + : base(false) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// A vlaue indicating whether the permissions definitions need to be loaded. + public FolderPermissions(bool needDefinitions) + : base(needDefinitions) + { + foreach (var role in PermissionProvider.Instance().ImplicitRolesForFolders(PortalSettings.Current.PortalId)) + { + this.EnsureRole(role, true, true); + } + } + + /// + /// Initializes a new instance of the class. + /// + /// A value indicating whether the permission definitions need to be loaded. + /// A colleciton of folder permissions. + public FolderPermissions(bool needDefinitions, FolderPermissionCollection permissions) + : base(needDefinitions) + { + foreach (var role in PermissionProvider.Instance().ImplicitRolesForFolders(PortalSettings.Current.PortalId)) + { + this.EnsureRole(role, true, true); + } + + foreach (FolderPermissionInfo permission in permissions) + { + if (permission.UserID != Null.NullInteger) + { + this.AddUserPermission(permission); + } + else + { + this.AddRolePermission(permission); + } + + this.RolePermissions = + this.RolePermissions.OrderByDescending(p => p.Locked) + .ThenByDescending(p => p.IsDefault) + .ThenBy(p => p.RoleName) + .ToList(); + this.UserPermissions = this.UserPermissions.OrderBy(p => p.DisplayName).ToList(); + } + } + + /// + protected override void LoadPermissionDefinitions() + { + foreach (PermissionInfo permission in PermissionController.GetPermissionsByFolder()) + { + this.PermissionDefinitions.Add(new Permission + { + PermissionId = permission.PermissionID, + PermissionName = permission.PermissionName, + FullControl = PermissionHelper.IsFullControl(permission), + View = PermissionHelper.IsViewPermission(permission), + }); + } + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Services/Dto/MoveFileRequest.cs b/DNN Platform/Modules/ResourceManager/Services/Dto/MoveFileRequest.cs new file mode 100644 index 00000000000..5dbc8188617 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Services/Dto/MoveFileRequest.cs @@ -0,0 +1,22 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + +namespace Dnn.Modules.ResourceManager.Services.Dto +{ + /// + /// Represents a request to move a file into a folder. + /// + public class MoveFileRequest + { + /// + /// Gets or sets the id of the file to move. + /// + public int SourceFileId { get; set; } + + /// + /// Gets or sets the id of the folder to move the file into. + /// + public int DestinationFolderId { get; set; } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Services/Dto/MoveFolderRequest.cs b/DNN Platform/Modules/ResourceManager/Services/Dto/MoveFolderRequest.cs new file mode 100644 index 00000000000..1f45a1c1a96 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Services/Dto/MoveFolderRequest.cs @@ -0,0 +1,22 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + +namespace Dnn.Modules.ResourceManager.Services.Dto +{ + /// + /// Represents a request to move a folder to another folder. + /// + public class MoveFolderRequest + { + /// + /// Gets or sets the id of the folder to move. + /// + public int SourceFolderId { get; set; } + + /// + /// Gets or sets the id of the folder into which to move the source folder. + /// + public int DestinationFolderId { get; set; } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Services/Dto/Permission.cs b/DNN Platform/Modules/ResourceManager/Services/Dto/Permission.cs new file mode 100644 index 00000000000..007e65cadbb --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Services/Dto/Permission.cs @@ -0,0 +1,56 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Services.Dto +{ + using System.Runtime.Serialization; + + /// + /// Defines one specific permission. + /// + [DataContract] + public class Permission + { + /// + /// Gets or sets the id of the permission. + /// + [DataMember(Name = "permissionId")] + public int PermissionId { get; set; } + + /// + /// Gets or sets the permission name. + /// + [DataMember(Name = "permissionName")] + public string PermissionName { get; set; } + + /// + /// Gets or sets the permission key. + /// + [DataMember(Name = "permissionKey")] + public string PermissionKey { get; set; } + + /// + /// Gets or sets the permission code. + /// + [DataMember(Name = "permissionCode")] + public string PermissionCode { get; set; } + + /// + /// Gets or sets a value indicating whether the target of the permission has full control over the resource. + /// + [DataMember(Name = "fullControl")] + public bool FullControl { get; set; } + + /// + /// Gets or sets a value indicating whether the target of the permission can view the resource. + /// + [DataMember(Name = "view")] + public bool View { get; set; } + + /// + /// Gets or sets a value indicating whether the target of the permission has access to the resource. + /// + [DataMember(Name = "allowAccess")] + public bool AllowAccess { get; set; } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Services/Dto/Permissions.cs b/DNN Platform/Modules/ResourceManager/Services/Dto/Permissions.cs new file mode 100644 index 00000000000..f1c9e578b87 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Services/Dto/Permissions.cs @@ -0,0 +1,65 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Services.Dto +{ + using System.Collections.Generic; + using System.Runtime.Serialization; + + using Dnn.Modules.ResourceManager.Components; + + /// + /// Represents a permissions set. + /// + [DataContract] + public abstract class Permissions + { + /// + /// Initializes a new instance of the class. + /// + protected Permissions() + : this(false) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// A value indicating whether the permissions need to be loaded. + protected Permissions(bool needDefinitions) + { + this.RolePermissions = new List(); + this.UserPermissions = new List(); + + if (needDefinitions) + { + this.PermissionDefinitions = new List(); + this.LoadPermissionDefinitions(); + this.EnsureDefaultRoles(); + } + } + + /// + /// Gets or sets the list of permissions definitions. + /// + [DataMember(Name = "permissionDefinitions")] + public IList PermissionDefinitions { get; set; } + + /// + /// Gets or sets a list of role based permissions. + /// + [DataMember(Name = "rolePermissions")] + public IList RolePermissions { get; set; } + + /// + /// Gets or sets a list of user based permissions. + /// + [DataMember(Name = "userPermissions")] + public IList UserPermissions { get; set; } + + /// + /// Loads the permissions definitions. + /// + protected abstract void LoadPermissionDefinitions(); + } +} diff --git a/DNN Platform/Modules/ResourceManager/Services/Dto/RolePermission.cs b/DNN Platform/Modules/ResourceManager/Services/Dto/RolePermission.cs new file mode 100644 index 00000000000..2553aa5c40b --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Services/Dto/RolePermission.cs @@ -0,0 +1,53 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Services.Dto +{ + using System.Collections.Generic; + using System.Runtime.Serialization; + + /// + /// Represents a role based permission. + /// + [DataContract] + public class RolePermission + { + /// + /// Initializes a new instance of the class. + /// + public RolePermission() + { + this.Permissions = new List(); + } + + /// + /// Gets or sets the id of the role. + /// + [DataMember(Name = "roleId")] + public int RoleId { get; set; } + + /// + /// Gets or sets the name of the role. + /// + [DataMember(Name = "roleName")] + public string RoleName { get; set; } + + /// + /// Gets or sets the list of permissions. + /// + [DataMember(Name = "permissions")] + public IList Permissions { get; set; } + + /// + /// Gets or sets a value indicating whether this permission is locked. + /// + [DataMember(Name = "locked")] + public bool Locked { get; set; } + + /// + /// Gets or sets a value indicating whether this is a default permission. + /// + [DataMember(Name = "default")] + public bool IsDefault { get; set; } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Services/Dto/ThumbnailDownloadRequest.cs b/DNN Platform/Modules/ResourceManager/Services/Dto/ThumbnailDownloadRequest.cs new file mode 100644 index 00000000000..a8a84c3c8cd --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Services/Dto/ThumbnailDownloadRequest.cs @@ -0,0 +1,31 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Services.Dto +{ + /// + /// Represents a request to download a thumbnail. + /// + public class ThumbnailDownloadRequest + { + /// + /// Gets or sets the id of the file. + /// + public int FileId { get; set; } + + /// + /// Gets or sets the width of the thumbnail. + /// + public int Width { get; set; } + + /// + /// Gets or sets the height of the thumbnail. + /// + public int Height { get; set; } + + /// + /// Gets or sets an optional version number. + /// + public int? Version { get; set; } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Services/Dto/UserPermission.cs b/DNN Platform/Modules/ResourceManager/Services/Dto/UserPermission.cs new file mode 100644 index 00000000000..93aa206f038 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Services/Dto/UserPermission.cs @@ -0,0 +1,41 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Services.Dto +{ + using System.Collections.Generic; + using System.Runtime.Serialization; + + /// + /// Represents a permission for a user. + /// + [DataContract] + public class UserPermission + { + /// + /// Initializes a new instance of the class. + /// + public UserPermission() + { + this.Permissions = new List(); + } + + /// + /// Gets or sets the id of the user. + /// + [DataMember(Name = "userId")] + public int UserId { get; set; } + + /// + /// Gets or sets the user display name. + /// + [DataMember(Name = "displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets the list of permissions for the user. + /// + [DataMember(Name = "permissions")] + public IList Permissions { get; set; } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Services/ItemsController.cs b/DNN Platform/Modules/ResourceManager/Services/ItemsController.cs new file mode 100644 index 00000000000..24696025b4c --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Services/ItemsController.cs @@ -0,0 +1,572 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Services +{ + using System; + using System.IO; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Net.Http.Headers; + using System.Web; + using System.Web.Http; + + using Dnn.Modules.ResourceManager.Components; + using Dnn.Modules.ResourceManager.Helpers; + using Dnn.Modules.ResourceManager.Services.Attributes; + using Dnn.Modules.ResourceManager.Services.Dto; + + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Icons; + using DotNetNuke.Security; + using DotNetNuke.Security.Permissions; + using DotNetNuke.Services.Assets; + using DotNetNuke.Services.FileSystem; + using DotNetNuke.UI.Modules; + using DotNetNuke.Web.Api; + + using CreateNewFolderRequest = Dnn.Modules.ResourceManager.Services.Dto.CreateNewFolderRequest; + + /// + /// Expose any services via this class. You can keep services in separate classes or all together in one service class. + /// + [ResourceManagerExceptionFilter] + [DnnExceptionFilter] + [SupportedModules("ResourceManager")] + [DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.View)] + public class ItemsController : DnnApiController + { + private readonly IFolderMappingController folderMappingController = FolderMappingController.Instance; + private readonly IModuleControlPipeline modulePipeline; + + /// + /// Initializes a new instance of the class. + /// + /// + /// An instance of an used to hook into the + /// EditUrl of the webforms folders provider settings UI. + /// + public ItemsController(IModuleControlPipeline modulePipeline) + { + this.modulePipeline = modulePipeline; + } + + /// + /// Gets the content for a specific folder. + /// + /// The id of the folder. + /// The page number to get. + /// How many items to get per page. + /// How to sort the list. + /// + /// An object containing the folder information, a list of the folder contents and the permissions relating to that folder. + /// + [HttpGet] + public HttpResponseMessage GetFolderContent(int folderId, int startIndex, int numItems, string sorting) + { + ContentPage p; + var groupId = this.FindGroupId(this.Request); + var moduleId = this.Request.FindModuleId(); + var moduleMode = new SettingsManager(moduleId, groupId).Mode; + var permissionsManager = PermissionsManager.Instance; + + p = ItemsManager.Instance.GetFolderContent(folderId, startIndex, numItems, sorting, moduleMode); + + return this.Request.CreateResponse(HttpStatusCode.OK, new + { + folder = new + { + folderId = p.Folder.FolderID, + folderName = p.Folder.FolderName, + folderMappingId = p.Folder.FolderMappingID, + folderPath = p.Folder.FolderPath, + folderParentId = p.Folder.ParentID, + }, + items = p.Items.Select(this.GetItemViewModel), + totalCount = p.TotalCount, + hasAddFilesPermission = permissionsManager.HasAddFilesPermission(moduleMode, folderId), + hasAddFoldersPermission = permissionsManager.HasAddFoldersPermission(moduleMode, folderId), + hasDeletePermission = permissionsManager.HasDeletePermission(moduleMode, folderId), + hasManagePermission = permissionsManager.HasManagePermission(moduleMode, folderId), + }); + } + + /// + /// Syncs the folder content. + /// + /// The folder id. + /// The number of items. + /// The sorting. + /// If true sync recursively. + /// The http response message. + [HttpGet] + public HttpResponseMessage SyncFolderContent(int folderId, int numItems, string sorting, bool recursive) + { + var folder = FolderManager.Instance.GetFolder(folderId); + FolderManager.Instance.Synchronize(folder.PortalID, folder.FolderPath, recursive, true); + return this.GetFolderContent(folderId, 0, numItems, sorting); + } + + /// + /// Download thumbnail. + /// + /// The thumbnail download request. + /// The http repsonse message. + [HttpGet] + public HttpResponseMessage ThumbnailDownLoad([FromUri] ThumbnailDownloadRequest item) + { + var file = FileManager.Instance.GetFile(item.FileId); + if (file == null || !PermissionsManager.Instance.HasGetFileContentPermission(file.FolderId)) + { + return this.Request.CreateResponse(HttpStatusCode.NotFound, new { Message = "File doesn't exist." }); + } + + var thumbnailsManager = ThumbnailsManager.Instance; + var result = new HttpResponseMessage(HttpStatusCode.OK); + var thumbnail = thumbnailsManager.GetThumbnailContent(file, item.Width, item.Height, true); + result.Content = thumbnail.Content; + result.Content.Headers.ContentType = new MediaTypeHeaderValue(thumbnail.ContentType); + return result; + } + + /// + /// Downloads a file. + /// + /// The id of the file to download. + /// + /// A value indicating whether to force the download. + /// When true, will download the file as an attachment and ensures the browser won't just render the file if supported. + /// When false, the browser may render the file instead of downloading it for some formats like pdf or images. + /// + /// The actual requested file. + [HttpGet] + public HttpResponseMessage Download(int fileId, bool forceDownload) + { + var result = new HttpResponseMessage(HttpStatusCode.OK); + var streamContent = ItemsManager.Instance.GetFileContent(fileId, out var fileName, out var contentType); + result.Content = new StreamContent(streamContent); + result.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); + result.Content.Headers.ContentDisposition = + new ContentDispositionHeaderValue(forceDownload ? "attachment" : "inline") { FileName = fileName }; + return result; + } + + /// + /// Gets a list of folder mappings. + /// + /// + /// A list of folder mapping including information such as if the folder mapping is default or not + /// and a url to edit the folder mapping using the provider settings UI. + /// + [HttpGet] + public HttpResponseMessage GetFolderMappings() + { + var isSuperTab = this.PortalSettings.ActiveTab != null && this.PortalSettings.ActiveTab.IsSuperTab; + + var moduleContext = this.GetModuleContext(); + var mappings = FolderMappingController.Instance.GetFolderMappings( + isSuperTab && this.UserInfo.IsSuperUser ? + Null.NullInteger : + this.PortalSettings.PortalId); + + var r = from m in mappings + select new + { + m.FolderMappingID, + m.MappingName, + m.FolderProviderType, + IsDefault = + m.MappingName == "Standard" || m.MappingName == "Secure" || m.MappingName == "Database", + editUrl = this.UserInfo.IsAdmin ? + moduleContext.EditUrl( + "ItemID", + m.FolderMappingID.ToString(), + "EditFolderMapping", + "mid", + this.ActiveModule.ModuleID.ToString()) + : + string.Empty, + }; + + return this.Request.CreateResponse(HttpStatusCode.OK, r); + } + + /// + /// Gets a url to add a new folder type. + /// + /// A url to the folder providers control that allows adding a new folder type. + [HttpGet] + [DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.Admin)] + public HttpResponseMessage GetAddFolderTypeUrl() + { + var moduleContext = this.GetModuleContext(); + return this.Request.CreateResponse( + HttpStatusCode.OK, + moduleContext.EditUrl( + "ItemID", + "-1", + "EditFolderMapping", + "mid", + this.ActiveModule.ModuleID.ToString())); + } + + /// + /// Removes a folder type. + /// + /// The id of an existing folder mapping. + /// The id of the recently remove folder type. + [HttpPost] + [DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.Admin)] + [ValidateAntiForgeryToken] + public HttpResponseMessage RemoveFolderType([FromBody] int folderMappingId) + { + this.folderMappingController.DeleteFolderMapping(this.PortalSettings.PortalId, folderMappingId); + return this.Request.CreateResponse(HttpStatusCode.OK, folderMappingId); + } + + /// + /// Attempts to create a new folder. + /// + /// The request to add a new folder, . + /// Information about the new folder. + [HttpPost] + [ValidateAntiForgeryToken] + public HttpResponseMessage CreateNewFolder(CreateNewFolderRequest request) + { + var groupId = this.FindGroupId(this.Request); + var moduleId = this.Request.FindModuleId(); + var moduleMode = new SettingsManager(moduleId, groupId).Mode; + var parentFolder = FolderManager.Instance.GetFolder(request.ParentFolderId); + var folderMappingId = string.IsNullOrWhiteSpace(parentFolder.FolderPath) + ? request.FolderMappingId + : parentFolder.FolderMappingID; + + var folder = ItemsManager.Instance.CreateNewFolder(request.FolderName, request.ParentFolderId, folderMappingId, request.MappedName, moduleMode); + + return this.Request.CreateResponse( + HttpStatusCode.OK, + new + { + folder.FolderID, + folder.FolderName, + IconUrl = GetFolderIconUrl(this.PortalSettings.PortalId, folder.FolderMappingID), + folder.FolderMappingID, + }); + } + + /// + /// Attempts to delete a folder. + /// + /// The request to delete a folder, . + /// Ok if succedded. + [HttpPost] + [ValidateAntiForgeryToken] + public HttpResponseMessage DeleteFolder(DeleteFolderRequest request) + { + var groupId = this.FindGroupId(this.Request); + var moduleId = this.Request.FindModuleId(); + var moduleMode = new SettingsManager(moduleId, groupId).Mode; + + ItemsManager.Instance.DeleteFolder(request.FolderId, request.UnlinkAllowedStatus, moduleMode); + return this.Request.CreateResponse(HttpStatusCode.OK, new { Status = 0 }); + } + + /// + /// Attempts to delete a file. + /// + /// The file deletion request, . + /// OK if succeeded. + [HttpPost] + [ValidateAntiForgeryToken] + public HttpResponseMessage DeleteFile(DeleteFileRequest request) + { + var groupId = this.FindGroupId(this.Request); + var moduleId = this.Request.FindModuleId(); + var moduleMode = new SettingsManager(moduleId, groupId).Mode; + + ItemsManager.Instance.DeleteFile(request.FileId, moduleMode, groupId); + return this.Request.CreateResponse(HttpStatusCode.OK, new { Status = 0 }); + } + + /// + /// Performs file search in a folder. + /// + /// The id of the folder. + /// The search term. + /// The page index to get. + /// How many items per page. + /// How to sort the results. + /// The culture requested. + /// A list of the found resources together with the total count of found resources. + [HttpGet] + public HttpResponseMessage Search(int folderId, string search, int pageIndex, int pageSize, string sorting, string culture) + { + var folder = FolderManager.Instance.GetFolder(folderId); + if (folder == null) + { + throw new Exception(LocalizationHelper.GetString("FolderDoesNotExist.Error")); + } + + var groupId = this.FindGroupId(this.Request); + var moduleId = this.Request.FindModuleId(); + var moduleMode = new SettingsManager(moduleId, groupId).Mode; + + var searchResults = SearchController.Instance.SearchFolderContent(moduleId, folder, true, search, pageIndex, pageSize, sorting, moduleMode, out int totalHits); + + var items = (from file in searchResults + select this.GetItemViewModel(file)).ToArray(); + + return this.Request.CreateResponse(HttpStatusCode.OK, new + { + items, + totalCount = totalHits, + }); + } + + /// + /// Gets details about a file. + /// + /// The id of the file to get the details from. + /// Detailed information about the file. + [HttpGet] + [AllowAnonymous] + public HttpResponseMessage GetFileDetails(int fileId) + { + var file = FileManager.Instance.GetFile(fileId); + if (file == null) + { + return this.Request.CreateResponse(HttpStatusCode.NotFound, new { }); + } + + var folder = FolderManager.Instance.GetFolder(file.FolderId); + if (!FolderPermissionController.CanViewFolder((FolderInfo)folder)) + { + return this.Request.CreateResponse( + HttpStatusCode.InternalServerError, + new { message = LocalizationHelper.GetString("UserHasNoPermissionToReadFileProperties.Error") }); + } + + var createdBy = file.CreatedByUser(this.PortalSettings.PortalId); + var lastModifiedBy = file.LastModifiedByUser(this.PortalSettings.PortalId); + + return this.Request.CreateResponse(HttpStatusCode.OK, new + { + fileId = file.FileId, + fileName = file.FileName, + title = file.Title, + description = file.Description ?? string.Empty, + size = string.Format(new FileSizeFormatProvider(), "{0:fs}", file.Size), + createdOnDate = file.CreatedOnDate.ToShortDateString(), + createdBy = createdBy != null ? createdBy.Username : string.Empty, + lastModifiedOnDate = file.LastModifiedOnDate.ToShortDateString(), + lastModifiedBy = lastModifiedBy != null ? lastModifiedBy.Username : string.Empty, + url = FileManager.Instance.GetUrl(file), + }); + } + + /// + /// Attempts to save new details about a file. + /// + /// The new file details, . + /// OK if the request succeeded. + [HttpPost] + [ValidateAntiForgeryToken] + public HttpResponseMessage SaveFileDetails(FileDetailsRequest fileDetails) + { + var file = FileManager.Instance.GetFile(fileDetails.FileId); + if (file == null) + { + return this.Request.CreateResponse(HttpStatusCode.NotFound, new { message = "File doesn't exist." }); + } + + var folder = FolderManager.Instance.GetFolder(file.FolderId); + if (!FolderPermissionController.CanManageFolder((FolderInfo)folder)) + { + return this.Request.CreateResponse( + HttpStatusCode.InternalServerError, + new { message = LocalizationHelper.GetString("UserHasNoPermissionToManageFileProperties.Error") }); + } + + ItemsManager.Instance.SaveFileDetails(file, fileDetails); + + return this.Request.CreateResponse(HttpStatusCode.OK, new { Status = 0 }); + } + + /// + /// Gets details about a folder. + /// + /// The id of the folder from which to get the details. + /// Detailed information about the folder. + [HttpGet] + public HttpResponseMessage GetFolderDetails(int folderId) + { + var folder = FolderManager.Instance.GetFolder(folderId); + + if (!FolderPermissionController.CanManageFolder((FolderInfo)folder)) + { + return this.Request.CreateResponse( + HttpStatusCode.InternalServerError, + new { message = LocalizationHelper.GetString("UserHasNoPermissionToManageFolder.Error") }); + } + + var createdBy = folder.CreatedByUser(this.PortalSettings.PortalId); + var lastModifiedBy = folder.LastModifiedByUser(this.PortalSettings.PortalId); + + return this.Request.CreateResponse(HttpStatusCode.OK, new + { + folderId = folder.FolderID, + folderName = folder.FolderName, + createdOnDate = folder.CreatedOnDate.ToShortDateString(), + createdBy = createdBy != null ? createdBy.Username : string.Empty, + lastModifiedOnDate = folder.LastModifiedOnDate.ToShortDateString(), + lastModifiedBy = lastModifiedBy != null ? lastModifiedBy.Username : string.Empty, + type = FolderMappingController.Instance.GetFolderMapping(folder.FolderMappingID).MappingName, + isVersioned = folder.IsVersioned, + permissions = new FolderPermissions(true, folder.FolderPermissions), + }); + } + + /// + /// Attempts to save new details about a folder. + /// + /// The new folder details, . + /// OK if the request succeeded. + [HttpPost] + [ValidateAntiForgeryToken] + public HttpResponseMessage SaveFolderDetails(FolderDetailsRequest folderDetails) + { + var folder = FolderManager.Instance.GetFolder(folderDetails.FolderId); + if (folder == null) + { + return this.Request.CreateResponse(HttpStatusCode.NotFound, new { message = "Folder doesn't exist." }); + } + + if (!FolderPermissionController.CanManageFolder((FolderInfo)folder)) + { + return this.Request.CreateResponse( + HttpStatusCode.InternalServerError, + new { message = LocalizationHelper.GetString("UserHasNoPermissionToManageFolder.Error") }); + } + + ItemsManager.Instance.SaveFolderDetails(folder, folderDetails); + + return this.Request.CreateResponse(HttpStatusCode.OK, new { Status = 0 }); + } + + /// + /// Gets available sorting options. + /// + /// A list of values and labels to populate the search sorting dropdown. + [HttpGet] + public HttpResponseMessage GetSortOptions() + { + var sortOptions = new[] + { + new { value = "LastModifiedOnDate", label = LocalizationHelper.GetString("LastModifiedOnDate") }, + new { value = "CreatedOnDate", label = LocalizationHelper.GetString("CreatedOnDate") }, + new { value = "ItemName", label= LocalizationHelper.GetString("ItemName") }, + }; + return this.Request.CreateResponse(HttpStatusCode.OK, sortOptions); + } + + /// + /// Attempts to move a file into a folder. + /// + /// The file move request, . + /// A 0 status code if succeeded. + [HttpPost] + [ValidateAntiForgeryToken] + public HttpResponseMessage MoveFile(MoveFileRequest moveFileRequest) + { + var groupId = this.FindGroupId(this.Request); + var moduleId = this.Request.FindModuleId(); + var moduleMode = new SettingsManager(moduleId, groupId).Mode; + + ItemsManager.Instance.MoveFile(moveFileRequest.SourceFileId, moveFileRequest.DestinationFolderId, moduleMode, groupId); + return this.Request.CreateResponse(HttpStatusCode.OK, new { Status = 0 }); + } + + /// + /// Attempts to move a folder into another folder. + /// + /// The folder move request, . + /// A 0 status code if succeeded. + [HttpPost] + [ValidateAntiForgeryToken] + public HttpResponseMessage MoveFolder(MoveFolderRequest moveFolderRequest) + { + var groupId = this.FindGroupId(this.Request); + var moduleId = this.Request.FindModuleId(); + var moduleMode = new SettingsManager(moduleId, groupId).Mode; + + ItemsManager.Instance.MoveFolder(moveFolderRequest.SourceFolderId, moveFolderRequest.DestinationFolderId, moduleMode, groupId); + return this.Request.CreateResponse(HttpStatusCode.OK, new { Status = 0 }); + } + + private static string GetFileIconUrl(string extension) + { + if (!string.IsNullOrEmpty(extension) && File.Exists(HttpContext.Current.Server.MapPath(IconController.IconURL("Ext" + extension, "32x32", "Standard")))) + { + return IconController.IconURL("Ext" + extension, "32x32", "Standard"); + } + + return IconController.IconURL("ExtFile", "32x32", "Standard"); + } + + private static string GetFolderIconUrl(int portalId, int folderMappingId) + { + var url = Globals.ApplicationPath + "/" + Constants.ModulePath + "images/icon-asset-manager-{0}-folder.png"; + + var folderMapping = FolderMappingController.Instance.GetFolderMapping(portalId, folderMappingId); + var name = folderMapping != null && File.Exists(HttpContext.Current.Server.MapPath(folderMapping.ImageUrl)) + ? folderMapping.FolderProviderType.Replace("FolderProvider", string.Empty) + : "standard"; + + return string.Format(url, name.ToLower()); + } + + private int FindGroupId(HttpRequestMessage request) + { + var headers = request.Headers; + int groupId; + int.TryParse(headers.GetValues("GroupId").FirstOrDefault(), out groupId); + return groupId; + } + + private object GetItemViewModel(object item) + { + var folder = item as IFolderInfo; + if (folder != null) + { + return new + { + isFolder = true, + itemId = folder.FolderID, + itemName = folder.FolderName, + iconUrl = GetFolderIconUrl(this.PortalSettings.PortalId, folder.FolderMappingID), + }; + } + + var thumbnailsManager = ThumbnailsManager.Instance; + var file = item as IFileInfo; + return new + { + isFolder = false, + itemId = file.FileId, + itemName = file.FileName, + path = FileManager.Instance.GetUrl(file), + iconUrl = GetFileIconUrl(file.Extension), + thumbnailAvailable = thumbnailsManager.ThumbnailAvailable(file.FileName), + thumbnailUrl = thumbnailsManager.ThumbnailUrl(this.ActiveModule.ModuleID, file.FileId, 110, 110), + }; + } + + private ModuleInstanceContext GetModuleContext() + { + IModuleControl moduleControl = this.modulePipeline.CreateModuleControl(this.ActiveModule) as IModuleControl; + return new ModuleInstanceContext(moduleControl); + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Services/LocalizationController.cs b/DNN Platform/Modules/ResourceManager/Services/LocalizationController.cs new file mode 100644 index 00000000000..4ed50621784 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Services/LocalizationController.cs @@ -0,0 +1,49 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Services +{ + using System.Net; + using System.Net.Http; + using System.Web.Http; + + using Dnn.Modules.ResourceManager.Components; + using DotNetNuke.Web.Api; + using DotNetNuke.Web.Api.Internal; + + /// + /// Provides localization web services. + /// + [DnnAuthorize] + [DnnExceptionFilter] + public class LocalizationController : DnnApiController + { + private readonly ILocalizationController localizationController; + + /// + /// Initializes a new instance of the class. + /// + public LocalizationController() + { + this.localizationController = Components.LocalizationController.Instance; + } + + /// + /// Gets a dictionary of the resource manager localization values. + /// + /// The culture for which to get the localized texts. + /// + /// A dictionary of the keys and values where the key is the localization key + /// and the value is the localized text for the requested culture. + /// + [HttpGet] + [AllowAnonymous] + [DnnPageEditor] + public HttpResponseMessage GetResources(string culture) + { + return this.Request.CreateResponse( + HttpStatusCode.OK, + this.localizationController.GetLocalizedDictionary(Constants.ViewResourceFileName, culture, Constants.ResourceManagerLocalization)); + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Services/RouteMapper.cs b/DNN Platform/Modules/ResourceManager/Services/RouteMapper.cs new file mode 100644 index 00000000000..14da26b9596 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Services/RouteMapper.cs @@ -0,0 +1,17 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager.Services +{ + using DotNetNuke.Web.Api; + + /// + public class RouteMapper : IServiceRouteMapper + { + /// + public void RegisterRoutes(IMapRoute mapRouteManager) + { + mapRouteManager.MapHttpRoute("ResourceManager", "default", "{controller}/{action}", new[] { "Dnn.Modules.ResourceManager.Services" }); + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Settings.ascx b/DNN Platform/Modules/ResourceManager/Settings.ascx new file mode 100644 index 00000000000..f4a0f230aff --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Settings.ascx @@ -0,0 +1,22 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Settings.ascx.cs" Inherits="Dnn.Modules.ResourceManager.Settings" %> +<%@ Register TagName="label" TagPrefix="dnn" Src="~/controls/labelcontrol.ascx" %> +<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.UI.WebControls" Assembly="DotNetNuke.Web" %> + +

      <%=LocalizeString("BasicSettings")%>

      +
      +
      + + + +
      +
      +
      +
      + + +
      +
      + + + + diff --git a/DNN Platform/Modules/ResourceManager/Settings.ascx.cs b/DNN Platform/Modules/ResourceManager/Settings.ascx.cs new file mode 100644 index 00000000000..239c1760a8c --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Settings.ascx.cs @@ -0,0 +1,77 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager +{ + using System; + using System.Linq; + using System.Web.UI.WebControls; + + using Dnn.Modules.ResourceManager.Components.Common; + using DotNetNuke.Entities.Modules; + using DotNetNuke.Services.FileSystem; + + using Constants = Dnn.Modules.ResourceManager.Components.Constants; + using DnnExceptions = DotNetNuke.Services.Exceptions.Exceptions; + + /// + /// Provides module settings control. + /// + public partial class Settings : ModuleSettingsBase + { + /// + public override void LoadSettings() + { + try + { + if (this.Page.IsPostBack) + { + return; + } + + var displayTypesValues = Enum.GetValues(typeof(Constants.ModuleModes)).Cast(); + var displayTypes = displayTypesValues.Select(t => new ListItem(Utils.GetEnumDescription(t), ((int)t).ToString())).ToArray(); + + this.ddlMode.Items.AddRange(displayTypes); + + this.ddlMode.SelectedValue = this.Settings.Contains(Constants.ModeSettingName) + ? this.Settings[Constants.ModeSettingName].ToString() + : Constants.DefaultMode.ToString(); + + IFolderInfo homeFolder = null; + if (this.Settings.Contains(Constants.HomeFolderSettingName)) + { + int.TryParse(this.Settings[Constants.HomeFolderSettingName].ToString(), out var homeFolderId); + homeFolder = FolderManager.Instance.GetFolder(homeFolderId); + } + + if (homeFolder == null) + { + homeFolder = FolderManager.Instance.GetFolder(this.PortalId, string.Empty); + } + + this.ddlFolder.SelectedFolder = homeFolder; + } + catch (Exception exc) + { + DnnExceptions.ProcessModuleLoadException(this, exc); + } + } + + /// + public override void UpdateSettings() + { + try + { + var modules = new ModuleController(); + + modules.UpdateModuleSetting(this.ModuleId, Constants.ModeSettingName, this.ddlMode.SelectedValue); + modules.UpdateModuleSetting(this.ModuleId, Constants.HomeFolderSettingName, this.ddlFolder.SelectedFolder.FolderID.ToString()); + } + catch (Exception exc) + { + DnnExceptions.ProcessModuleLoadException(this, exc); + } + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/Settings.ascx.designer.cs b/DNN Platform/Modules/ResourceManager/Settings.ascx.designer.cs new file mode 100644 index 00000000000..c21897ffb89 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/Settings.ascx.designer.cs @@ -0,0 +1,51 @@ +//------------------------------------------------------------------------------ +// +// 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 Dnn.Modules.ResourceManager { + + + public partial class Settings { + + /// + /// lblMode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.UserControl lblMode; + + /// + /// ddlMode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlMode; + + /// + /// lblHomeFolder control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.UserControl lblHomeFolder; + + /// + /// ddlFolder control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DotNetNuke.Web.UI.WebControls.DnnFolderDropDownList ddlFolder; + } +} diff --git a/DNN Platform/Modules/ResourceManager/View.ascx b/DNN Platform/Modules/ResourceManager/View.ascx new file mode 100644 index 00000000000..18ab9657d6f --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/View.ascx @@ -0,0 +1,63 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="View.ascx.cs" Inherits="Dnn.Modules.ResourceManager.View" %> +<% + DotNetNuke.Web.Client.ClientResourceManagement.ClientResourceManager.RegisterScript(this.Page, "~/js/dnn.servicesframework.js"); +%> + + + + + diff --git a/DNN Platform/Modules/ResourceManager/View.ascx.cs b/DNN Platform/Modules/ResourceManager/View.ascx.cs new file mode 100644 index 00000000000..b643a9b61e9 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/View.ascx.cs @@ -0,0 +1,222 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace Dnn.Modules.ResourceManager +{ + using System; + using System.Collections.Generic; + using System.Linq; + + using Dnn.Modules.ResourceManager.Components; + using Dnn.Modules.ResourceManager.Exceptions; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Modules; + using DotNetNuke.Framework.JavaScriptLibraries; + using DotNetNuke.Services.FileSystem; + using DotNetNuke.Web.Client.ClientResourceManagement; + + using DnnExceptions = DotNetNuke.Services.Exceptions.Exceptions; + + /// + /// Provides the module view capabilities. + /// + public partial class View : PortalModuleBase + { + private readonly string bundleJsPath; + private int? gid; + private int? folderId; + private string extensionWhitelist; + private string validationCode; + + /// + /// Initializes a new instance of the class. + /// + public View() + { + this.bundleJsPath = Constants.ModulePath + "Scripts/resourceManager-bundle.js"; + } + + /// + /// Gets the group id. + /// + public int GroupId + { + get + { + if (this.gid.HasValue) + { + return this.gid.Value; + } + + if (!int.TryParse(this.Request.QueryString["groupid"], out var id)) + { + id = Null.NullInteger; + } + + this.gid = id; + return this.gid.Value; + } + } + + /// + /// Gets the list of allowed file extensions. + /// + public string ExtensionWhitelist + { + get + { + if (string.IsNullOrEmpty(this.extensionWhitelist)) + { + this.extensionWhitelist = FileManager.Instance.WhiteList.ToStorageString(); + } + + return this.extensionWhitelist; + } + } + + /// + /// Gets the file upload validation code. + /// + public string ValidationCode + { + get + { + if (string.IsNullOrEmpty(this.validationCode)) + { + var parameters = new List() { this.ExtensionWhitelist.Split(',').Select(i => i.Trim()).ToList() }; + parameters.Add(this.PortalSettings.UserInfo.UserID); + if (!this.PortalSettings.UserInfo.IsSuperUser) + { + parameters.Add(this.PortalSettings.PortalId); + } + + this.validationCode = ValidationUtils.ComputeValidationCode(parameters); + } + + return this.validationCode; + } + } + + /// + /// Gets the culture code used for localization. + /// + protected string ResxCulture => LocalizationController.Instance.CultureName; + + /// + /// Gets the timestamp of the localization resource file. + /// + protected string ResxTimeStamp => + LocalizationController.Instance.GetResxTimeStamp(Constants.ViewResourceFileName, Constants.ResourceManagerLocalization).ToString(); + + /// + /// Gets the id of the home folder. + /// + protected int HomeFolderId => new SettingsManager(this.ModuleId, this.GroupId).HomeFolderId; + + /// + /// Gets a value indicating whether the user is logged in. + /// + protected bool UserLogged => this.UserId > 0; + + /// + /// Gets a value indicating whether the currently logged in user is an administrator. + /// + protected bool IsAdmin => this.UserInfo.IsAdmin; + + /// + /// Gets how many items to show per page. + /// + protected int FolderPanelNumItems => Constants.ItemsPerPage; + + /// + /// Gets the width of each item in the resource grid. + /// + protected int ItemWidth => Constants.ItemWidth; + + /// + /// Gets the maximum allowed upload size. + /// + protected long MaxUploadSize => Config.GetMaxUploadSize(); + + /// + /// Gets a json serialized object defining the possible sort fields. + /// + protected string SortingFields => Json.Serialize(Constants.SortingFields); + + /// + /// Gets the default sort field key. + /// + protected string DefaultSortingField => Constants.DefaultSortingField; + + /// + /// Gets a human readable representation of the maximum upload size. + /// + protected string MaxUploadSizeHumanReadable + => string.Format(new FileSizeFormatProvider(), "{0:fs}", this.MaxUploadSize); + + /// + /// Gets the id of the currently open folder. + /// + protected int OpenFolderId => this.FolderId.GetValueOrDefault(); + + /// + /// Gets the path of the currently open folder. + /// + protected string OpenFolderPath + { + get + { + if (!this.FolderId.HasValue) + { + return string.Empty; + } + + var folder = FolderManager.Instance.GetFolder(this.FolderId.Value); + var folderPathElements = folder.FolderPath.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); + return Json.Serialize(folderPathElements); + } + } + + /// + /// Gets the id of the url path requested folder id. + /// + private int? FolderId + { + get + { + if (!this.folderId.HasValue) + { + if (int.TryParse(this.Request.QueryString["folderId"], out var id)) + { + this.folderId = id; + } + } + + return this.folderId; + } + } + + /// + /// Handles the page load event. + /// + /// The sender of the event. + /// The event arguments. + protected void Page_Load(object sender, EventArgs e) + { + try + { + JavaScript.RequestRegistration(CommonJs.DnnPlugins); + ClientResourceManager.RegisterScript(this.Page, Constants.ModulePath + "Scripts/dnn.Localization.js"); + ClientResourceManager.RegisterScript(this.Page, this.bundleJsPath); + } + catch (ModeValidationException exc) + { + DnnExceptions.ProcessModuleLoadException(this.LocalizeString(exc.Message), this, exc); + } + catch (Exception exc) + { + DnnExceptions.ProcessModuleLoadException(exc.Message, this, exc); + } + } + } +} diff --git a/DNN Platform/Modules/ResourceManager/View.ascx.designer.cs b/DNN Platform/Modules/ResourceManager/View.ascx.designer.cs new file mode 100644 index 00000000000..b40a177565f --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/View.ascx.designer.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 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 Dnn.Modules.ResourceManager { + + + public partial class View { + + /// + /// ResourceManagerContainer control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel ResourceManagerContainer; + } +} diff --git a/DNN Platform/Modules/ResourceManager/module.css b/DNN Platform/Modules/ResourceManager/module.css new file mode 100644 index 00000000000..e4221112863 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/module.css @@ -0,0 +1,3 @@ +.ReactModalPortal .modal-header { + padding: 0; +} \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/packages.config b/DNN Platform/Modules/ResourceManager/packages.config new file mode 100644 index 00000000000..4378e2e21f4 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/web.Debug.config b/DNN Platform/Modules/ResourceManager/web.Debug.config new file mode 100644 index 00000000000..fae9cfefa97 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/web.Debug.config @@ -0,0 +1,30 @@ + + + + + + + + + + \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/web.Release.config b/DNN Platform/Modules/ResourceManager/web.Release.config new file mode 100644 index 00000000000..da6e960b8d1 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/web.Release.config @@ -0,0 +1,31 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/DNN Platform/Modules/ResourceManager/web.config b/DNN Platform/Modules/ResourceManager/web.config new file mode 100644 index 00000000000..f919ed44340 --- /dev/null +++ b/DNN Platform/Modules/ResourceManager/web.config @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/DNN Platform/Providers/AuthenticationProviders/DotNetNuke.Authentication.Facebook/Facebook_Auth.dnn b/DNN Platform/Providers/AuthenticationProviders/DotNetNuke.Authentication.Facebook/Facebook_Auth.dnn index fc1d900419f..8ffde321830 100644 --- a/DNN Platform/Providers/AuthenticationProviders/DotNetNuke.Authentication.Facebook/Facebook_Auth.dnn +++ b/DNN Platform/Providers/AuthenticationProviders/DotNetNuke.Authentication.Facebook/Facebook_Auth.dnn @@ -1,6 +1,6 @@ - + DotNetNuke Facebook Authentication Project The DotNetNuke Facebook Authentication Project is an Authentication provider for DotNetNuke that uses Facebook authentication to authenticate users. diff --git a/DNN Platform/Providers/AuthenticationProviders/DotNetNuke.Authentication.Google/Google_Auth.dnn b/DNN Platform/Providers/AuthenticationProviders/DotNetNuke.Authentication.Google/Google_Auth.dnn index e352c6cfdc0..714c1fe52d8 100644 --- a/DNN Platform/Providers/AuthenticationProviders/DotNetNuke.Authentication.Google/Google_Auth.dnn +++ b/DNN Platform/Providers/AuthenticationProviders/DotNetNuke.Authentication.Google/Google_Auth.dnn @@ -1,6 +1,6 @@ - + DotNetNuke Google Authentication Project The DotNetNuke Google Authentication Project is an Authentication provider for DotNetNuke that uses Google authentication to authenticate users. diff --git a/DNN Platform/Providers/AuthenticationProviders/DotNetNuke.Authentication.LiveConnect/Live_Auth.dnn b/DNN Platform/Providers/AuthenticationProviders/DotNetNuke.Authentication.LiveConnect/Live_Auth.dnn index 7fddb75a889..1d62303568b 100644 --- a/DNN Platform/Providers/AuthenticationProviders/DotNetNuke.Authentication.LiveConnect/Live_Auth.dnn +++ b/DNN Platform/Providers/AuthenticationProviders/DotNetNuke.Authentication.LiveConnect/Live_Auth.dnn @@ -1,6 +1,6 @@ - + DotNetNuke Live Authentication Project The DotNetNuke Live Authentication Project is an Authentication provider for DotNetNuke that uses diff --git a/DNN Platform/Providers/AuthenticationProviders/DotNetNuke.Authentication.Twitter/Twitter_Auth.dnn b/DNN Platform/Providers/AuthenticationProviders/DotNetNuke.Authentication.Twitter/Twitter_Auth.dnn index 85d916b8fc9..e71e91b48ca 100644 --- a/DNN Platform/Providers/AuthenticationProviders/DotNetNuke.Authentication.Twitter/Twitter_Auth.dnn +++ b/DNN Platform/Providers/AuthenticationProviders/DotNetNuke.Authentication.Twitter/Twitter_Auth.dnn @@ -1,6 +1,6 @@ - + DotNetNuke Twitter Authentication Project The DotNetNuke Twitter Authentication Project is an Authentication provider for DotNetNuke that uses diff --git a/DNN Platform/Providers/CachingProviders/DotNetNuke.Providers.Caching.SimpleWebFarmCachingProvider/SimpleWebFarmCachingProvider.dnn b/DNN Platform/Providers/CachingProviders/DotNetNuke.Providers.Caching.SimpleWebFarmCachingProvider/SimpleWebFarmCachingProvider.dnn index cc243c54ce7..0a6b2f35601 100644 --- a/DNN Platform/Providers/CachingProviders/DotNetNuke.Providers.Caching.SimpleWebFarmCachingProvider/SimpleWebFarmCachingProvider.dnn +++ b/DNN Platform/Providers/CachingProviders/DotNetNuke.Providers.Caching.SimpleWebFarmCachingProvider/SimpleWebFarmCachingProvider.dnn @@ -1,6 +1,6 @@  - + DotNetNuke Simple Web Farm Caching Provider DotNetNuke Simple Web Farm Caching Provider diff --git a/DNN Platform/Providers/ClientCapabilityProviders/Provider.AspNetCCP/AspNetClientCapabilityProvider.dnn b/DNN Platform/Providers/ClientCapabilityProviders/Provider.AspNetCCP/AspNetClientCapabilityProvider.dnn index 39839fa11c2..f4ebe1bea24 100644 --- a/DNN Platform/Providers/ClientCapabilityProviders/Provider.AspNetCCP/AspNetClientCapabilityProvider.dnn +++ b/DNN Platform/Providers/ClientCapabilityProviders/Provider.AspNetCCP/AspNetClientCapabilityProvider.dnn @@ -1,6 +1,6 @@ - + DotNetNuke ASP.NET Client Capability Provider ASP.NET Device Detection / Client Capability Provider ~/Providers/ClientCapabilityProviders/AspNetClientCapabilityProvider/Images/mobiledevicedet_32X32.png diff --git a/DNN Platform/Providers/FolderProviders/FolderProviders.dnn b/DNN Platform/Providers/FolderProviders/FolderProviders.dnn index 9d9a936d97d..827a8b3126d 100644 --- a/DNN Platform/Providers/FolderProviders/FolderProviders.dnn +++ b/DNN Platform/Providers/FolderProviders/FolderProviders.dnn @@ -1,6 +1,6 @@  - + DotNetNuke Folder Providers Azure Folder Providers for DotNetNuke. diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/.gitignore b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/.gitignore new file mode 100644 index 00000000000..b3c99aa04af --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/.gitignore @@ -0,0 +1,30 @@ +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates +*.local.sln +*.sln.GhostDoc.xml + +## Ignore VS2015/Roslyn artifacts +.vs/ + +obj/ +bin/ +[Pp]ackages/ + +############ +## Windows +############ + +# Windows image file caches +Thumbs.db + +# Folder config file +Desktop.ini diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Browser.aspx.de-DE.resx b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Browser.aspx.de-DE.resx new file mode 100644 index 00000000000..209098500be --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Browser.aspx.de-DE.resx @@ -0,0 +1,425 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Private + + + + False + + + True + + + Fenster Schliessen + + + OK + + + Enthaltene Dateien: + + + Aktueller Ordner: + + + Ordner: + + + Ausgewählte Datei Herunterladen + + + Datei Herunterladen + + + Neue Datei Hochladen + + + Datei Hochladen + + + Sie sind nicht Autorisiert! + + + Nicht erlaubter Dateityp! + + + Nicht erlaubter Dateityp! + + + Sie haben keine Berechtigung für diesen Ordner! + + + Keine Datei ausgewählt. + + + Hochladen Abbrechen + + + Hochladen + + + Seite wählen: + + + Neuen Unterordner erstellen + + + Neuen Ordner erstellen + + + Die ausgewählte Datei löschen + + + Datei löschen + + + Erstellen + + + Aspektverhältnis beibehalten + + + Menschenfreundliche URL + + + Abbrechen + + + Erstellen! + + + Editieren Sie das ausgewählte Bild + + + Bild Editor + + + Neue Höhe: + + + Neuer Dateiname: + + + Neue Breite: + + + Sind Sie sicher das Sie diese Datei löschen möchten? + + + Bildqualität (Komprimierung): + + + Zuschneiden + + + Bearbeiten Abbrechen + + + Neues Bild erstellen + + + Größe ändern + + + Drehen + + + Zoomen + + + Original Bild (Größe An das Fenster angepasst!) + + + Vorschau des neuen Bildes (Größe An das Fenster angepasst!) + + + Vorschau löschen + + + Hier sehen Sie eine Vorschau des Bearbeiteten Bildes + + + Original: + + + Andere Tools: + + + Vorschau: + + + Bild Editor : Größe ändern + + + Bild Editor : Zuschneiden, Zoomen & Drehen + + + Zeige Vorschau + + + Abbrechen + + + Neuer Ordner Name: + + + Wählen Sie einen Seitenanker. + + + Anzahl wie oft auf diesen Link geklickt wurde speichern? + + + Absolute URL - <em>'http://www.MyWebsite.com/Images/MyImage.jpg'</em> + + + Url Typ wählen: + + + Gesicherte URL - <em>'/LinkClick.aspx?fileticket=xyz'</em> + + + Relative URL - <em>'/Images/MyImage.jpg'</em> + + + Bitte Warten... + + + Lade Seite und parse Seitenanker. + + + Tab Optionen: + + + Zusätzlicher Sprachparameter: + + + Keine + + + Datei Link + + + Seiten Link + + + Detailansicht + + + Zeigt alle Dateien, mit Bildvorschau, Dateinamen und Datei Informationen + + + Iconansicht + + + Zeigt alle Dateien, mit Bild Vorschau als Kacheln. + + + Listenansicht + + + Zeigt alle Dateien, mit einer kleineren Bildvorschau, Dateinamen und Datei Informationen + + + Erste Seite + + + Gehe zu + + + Letzte Seite + + + Nächste Seite + + + Vorherige Seite + + + Dateiliste von A-Z Sortieren + + + Aufsteigend Sortieren + + + Dateiliste von Z-A Sortieren + + + Absteigend Sortieren + + + Absolute Gesicherte URL - <em>'http://www.MyWebsite.com/LinkClick.aspx?fileticket=xyz'</em> + + + Benuzt: {0} von {1} + + + [unbegrenzt] + + + Ordner mit Datenbank synchronisieren + + + Ordner Sync + + + Das Datei Limit ist {0} MB. <br /> Die erlaubten Dateitypen sind: "{1}" + + + Datei ist zu groß zum hochladen. + + + Datei überschreiben wenn existiert, ansonsten wird eine neue Datei erzeugt? + + + Uploaded File is bigger then the allowed file size! + + + Add file(s)... + + + Drop file(s) here + + + Start upload(s) + + + Root + + + Root Folder + + + Image + + + Link + + + Created + + + Browser-Modus: {0} + + + Size + + \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Browser.aspx.pl-PL.resx b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Browser.aspx.pl-PL.resx new file mode 100644 index 00000000000..58be3307c6d --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Browser.aspx.pl-PL.resx @@ -0,0 +1,408 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Bezwzględny adres URL - <em>'http://www.MyWebsite.com/Images/MyImage.jpg'</em> + + + Na pewno usunąć plik? + + + Zachowaj proporcje + + + Przyjazny adres URL + + + Zamknij okno + + + Utwórz nowy podfolder + + + Utwórz nowy folder + + + Anuluj + + + Utwórz teraz + + + Przytnij + + + Anuluj edycję + + + Utwórz nowy obraz + + + Usuń zaznaczony plik + + + Usuń plik + + + Pobierz wybrany plik + + + Pobierz plik + + + Zmień rozmiar + + + Anuluj zmianę rozmiaru + + + Zmień rozmiar teraz + + + Edytuj wybrany plik + + + Edytor obrazów + + + Obróć + + + Wyślij nowy plik + + + Wyślij plik + + + Anuluj wysyłanie + + + Wyślij teraz + + + Przybliż + + + Widok szczegółowy + + + Wyświetla każdy plik z dużym podglądem, nazwą pliku i informacjami + + + Brak autoryzacji! + + + Niedozwolone rozszerzenie pliku! + + + Niedozwolone rozszerzenie pliku! + + + Brak autoryzacji do wyświetlenia folderu! + + + Brak wybranych plików. + + + Opcje kart: + + + Odnośnik pliku + + + Limit wielkości pliku wynosi {0} MB. + + + Plik jest za duży, aby go wysłać. + + + Pierwsza strona + + + Przejdź do + + + Widok ikon + + + Wyświetla wszystkie pliki z podglądem jako kafelki + + + Pierwotny obraz (dopasowany do ekranu) + + + Podgląd zmienionego obrazu (dopasowany do ekranu) + + + Wybierz kotwicę strony: + + + Dodatkowy parametr językowy: + + + Ostatnia strona + + + Wybierz stronę: + + + Wyczyść podgląd + + + Zawarte pliki: + + + Tutaj znajduje się nowy zmieniony obraz + + + Bieżący katalog: + + + Nowa wysokość: + + + Jakość obrazu (kompresja): + + + Nazwa nowego folderu: + + + Pierwotny: + + + Inne narzędzia: + + + Podgląd: + + + Edytor obrazów: zmiana rozmiaru + + + Edytor obrazów: przycinanie, przybliżenie i obracanie + + + Wyświetl podgląd + + + Katalogi: + + + Nowa nazwa pliku: + + + Wybierz rodzaj adresu URL: + + + Nowa szerokość + + + Widok listy + + + Wyświetla podgląd obrazu, nazwę pliku i informacje o pliku + + + Bezwzględny bezpieczny adres URL - <em>'http://www.MyWebsite.com/LinkClick.aspx?fileticket=xyz'</em> + + + Bezpieczny adres URL - <em>'/LinkClick.aspx?fileticket=xyz'</em> + + + Następna strona + + + Brak + + + Odnośnik strony + + + Poprzednia strona + + + Względny adres URL - <em>'/Images/MyImage.jpg'</em> + + + Sortuj listę plików wg. nazw w kolejności rosnącej + + + Sortuj rosnąco + + + Sortuj pliki wg. nazw w kolejności malejącej + + + Sortuj malejąco + + + Użyte miejsce: {0} z {1} + + + Synchronizuj folder z bazą danych + + + Zsynchronizuj folder + + + Śledzić liczbę kliknięć odnośnika? + + + [bez ograniczeń] + + + Proszę czekać... + + + Wczytywanie strony i przetwarzanie kotwic... + + + Override File if exists, otherwise a new File with underscore _1 will be created? + + + Uploaded File is bigger then the allowed file size! + + + Add file(s)... + + + Drop file(s) here + + + Start upload(s) + + + Root Folder + + + Image + + + Link + + + Created + + + Browser-Modus: {0} + + + Size + + \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Browser.aspx.resx b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Browser.aspx.resx new file mode 100644 index 00000000000..e6491e7ba18 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Browser.aspx.resx @@ -0,0 +1,437 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Private + + + + False + + + True + + + Close Window + + + OK + + + Contained Files: + + + Current Directory: + + + Directories: + + + Download the selected file. + + + Download File + + + Upload a new file. + + + Upload File + + + The user does not have permission to perform this task. + + + This file extension is not permitted. + + + This file extension is not permitted. + + + The user does not have permission to view this folder. + + + No file selected. + + + Cancel Upload + + + Upload Now + + + Choose URL Type: + + + Choose a Page: + + + Create a new sub folder + + + Create New Folder + + + Delete the selected file. + + + Delete File + + + Create Now + + + Maintain Aspect Ratio + + + Human Friendly URL + + + Cancel Resize + + + Resize Now + + + Edit the selected image. + + + Image Editor + + + New Height: + + + New File Name: + + + New Width: + + + Are you sure you want to delete this file? + + + Image Quality (Compression): + + + Crop + + + Edit Cancel + + + Create New Image + + + Resize + + + Rotate + + + Zoom + + + Original Image (Scaled to Fit Screen) + + + Preview of the Resized Image (Scaled to Fit Screen) + + + Clear Preview + + + Here you will see the edited new image + + + Original: + + + Other Tools: + + + Preview: + + + Image Editor : Resize + + + Image Editor : Crop, Zoom & Rotate + + + Show Preview + + + Cancel + + + New Folder Name: + + + Select an Page Anchor: + + + Track Number of Times This Link Is Clicked: + + + Absolute URL - <em>'http://www.MyWebsite.com/Images/MyImage.jpg'</em> + + + Relative Secured URL - <em>'/LinkClick.aspx?fileticket=xyz'</em> + + + Relative URL - <em>'/Images/MyImage.jpg'</em> + + + Please Wait... + + + Loading Page and Parsing Anchors. + + + Tab Options: + + + Aditional Language Parameter: + + + None + + + File Link + + + Page Link + + + Detail View + + + Shows Every File With an Large Image Preview, Filename and File Information. + + + Icons View + + + Shows All Files With Image Preview as Tiles. + + + List View + + + Shows Small Image Preview, Filename and File Information. + + + First Page + + + Go To + + + Last Page + + + Next Page + + + Previous Page + + + Sort file list by file names in ascending order. + + + Sort Ascending + + + Sort file list by file names in descending order. + + + Sort Descending + + + Absolute Secured URL - <em>'http://www.MyWebsite.com/LinkClick.aspx?fileticket=xyz'</em> + + + Space Used: {0} of {1} + + + [unlimited] + + + Synchronize Folder with Database + + + Synchronize Folder + + + The File Upload Limit is {0} MB. <br /> The Allowed Filetypes are: "{1}" + + + File is too big to upload. + + + Override file if it already exists, otherwise a new file with underscore _1 will be created? + + + Uploaded file is bigger then the allowed file size. + + + Add file(s)... + + + Drop file(s) here + + + Start upload(s) + + + Root Folder + + + Image + + + Link + + + Created + + + Browser-Modus: {0} + + + Size + + + Date + + + Sort file list by file create date in ascending order. + + + Sort By Ascending Date + + + Sort file list by file create date in descending order. + + + Sort By Descending Date + + \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Browser.aspx.ru-RU.resx b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Browser.aspx.ru-RU.resx new file mode 100644 index 00000000000..1f3ce56b24f --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Browser.aspx.ru-RU.resx @@ -0,0 +1,421 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Private + + + + False + + + True + + + Закрыть окно + + + Да + + + Содержит файлы: + + + Текущая папка: + + + Папки: + + + Скачать выбранный файл. + + + Скачать файл + + + Выгрузить новый файл. + + + Выгрузить файл + + + У пользователя нет разрешений на выполнение этой задачи. + + + Запрещенное расширение имени файла. + + + Запрещенное расширение имени файла. + + + У Вас недостаточно прав для просмотра этой папки. + + + Не выбран файл. + + + Отменить выгрузку + + + Выгрузить сейчас + + + Выберите тип URL: + + + Выберите страницу: + + + Новая подпапка + + + Новая папка + + + Удалить выбранный файл. + + + Удалить файл + + + Создать сейчас + + + Сохранять соотношение сторон + + + Человеко понимаемый URL + + + Отменить изменение размера + + + Изменить размер сейчас + + + Редактирование выбранного изображения. + + + Редактор изображений + + + Новая высота: + + + Новое имя файла: + + + Новая ширина: + + + Уверены, что хотите удалить этот файл? + + + Качество изображения (степень сжатия): + + + Обрезать + + + Отменить редактирование + + + Новое изображение + + + Изменить размер + + + Повернуть + + + Масштабировать + + + Исходное изображение (масштабировано под экран) + + + Предпросмотр изображения измененного размера (масштабировано под экран) + + + Очистить предпросмотр + + + Здесь Вы сможете увидеть новое отредактированное изображение + + + Оригинал: + + + Другие инструменты: + + + Предпросмотр: + + + Редактор изображений: Изменить размер + + + Редактор изображений: Обрезать, Масштабировать и Повернуть + + + Показать предпросмотр + + + Отмена + + + Имя новой папки: + + + Выберите якорь на странице: + + + Учитывать число кликов: + + + Абсолютный URL - <em>'http://www.MyWebsite.com/Images/MyImage.jpg'</em> + + + Относительный защищенный URL - <em>'/LinkClick.aspx?fileticket=xyz'</em> + + + Относительный URL - <em>'/Images/MyImage.jpg'</em> + + + Подождите, пожалуйста... + + + Загружаю страницу и разбираю якоря. + + + Настройки вкладок: + + + Дополнительный параметр языка: + + + Нет + + + Ссылка на файл + + + Ссылка на страницу + + + Подробно + + + Каждый файл отображается с большим значком предпросмотра изображения, именем файла и другой информацией о файле. + + + Значки + + + Все файлы отображаются с предпросмотром изображения в виде плитки. + + + Список + + + Файлы отображаются с малельким значком предпросмотра изрображения, именем файла и информацией о файле. + + + Первая + + + Перейти к + + + Последняя + + + След. + + + Пред. + + + Сортировать список файлов по имени файла, в порядке возрастания. + + + По возрастанию + + + Сортировать список файлов по имени файла, в порядке убывания. + + + По убыванию + + + Абсолютный защищенный URL - <em>'http://www.MyWebsite.com/LinkClick.aspx?fileticket=xyz'</em> + + + Место на диске: {0} of {1} + + + [без ограничений] + + + Синхронизировать папку с базой данных + + + Синхронизировать папку + + + Максимальный размер выгружаемого файла {0} Мб. <br /> Разрешенные типы файлов: "{1}" + + + Файл слишком большой для выгрузки. + + + Перезаписать файл, если существует, или создать файл с именем, к которому будет добавлено _1? + + + Размер выгружаемого файла больше, чем максимально разрешенный. + + + Добавить файл(ы)... + + + Перетащите файл(ы) сюда + + + Начать выгрузку(и) + + Корневая папка + + + Изображение + + + Ссылка + + + Создан + + + Режим: {0} + + + Размер + + diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/EditorConfigManager.ascx.de-DE.resx b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/EditorConfigManager.ascx.de-DE.resx new file mode 100644 index 00000000000..93faa6be556 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/EditorConfigManager.ascx.de-DE.resx @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Private + + + + False + + + True + + + Provides configuration options for HTML Editor Provider. + + + CKEditor Provider Config Manager + + + HTML Editor Manager + + \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/EditorConfigManager.ascx.pl-PL.resx b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/EditorConfigManager.ascx.pl-PL.resx new file mode 100644 index 00000000000..352a968b469 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/EditorConfigManager.ascx.pl-PL.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Menedżer konfiguracji dostawcy CKEditor + + + Provides configuration options for HTML Editor Provider. + + + HTML Editor Manager + + \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/EditorConfigManager.ascx.resx b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/EditorConfigManager.ascx.resx new file mode 100644 index 00000000000..e94fae208a9 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/EditorConfigManager.ascx.resx @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Private + + + + False + + + True + + + HTML Editor Manager + + + Provides configuration options for HTML Editor Provider. + + + CKEditor Provider Config Manager + + \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/EditorConfigManager.ascx.ru-RU.resx b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/EditorConfigManager.ascx.ru-RU.resx new file mode 100644 index 00000000000..3e9838edd88 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/EditorConfigManager.ascx.ru-RU.resx @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Private + + + + False + + + True + + + Управление редактором HTML + + + Предоставляет возможность изменения настроек поставщика редактора HTML. + + + Настройки поставщика CKEditor + + diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Options.aspx.de-DE.resx b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Options.aspx.de-DE.resx new file mode 100644 index 00000000000..39477858678 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Options.aspx.de-DE.resx @@ -0,0 +1,521 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Private + + + + False + + + True + + + Schliessen + + + Speichern + + + Informationen + + + Modul Instanz: + + + Modulname: + + + Modultyp: + + + Einstellungen + + + Benutzername: + + + Sie sind nicht Berechtigt diese Seite zu betrachten! + + + Seite: + + + Bearbeite Einstellungen für ... + + + Erlaubte Gruppen: + + + Datei Browser: + + + Datei Browser + + + Editor Bereich CSS: + + + Portalname: + + + Editor Styles + + + Toolbars: + + + Einstellungen Entfernen + + + Einstellungen gespeichert, Laden Sie die Seite neu um die Änderungen zu sehen! + + + Einstellungen gelöscht + + + Blank Text: + + + Gruppe + + + Toolbar auswählen: + + + Editor Optionen + + + Haupt Einstellungen + + + Unterordner für nicht Admins benutzen (..\Portals\0\userfiles\username)? + + + Editor Vorlagen + + + Editor Vorlagen Datei: + + + Eigene Config Datei: + + + Neue Toolbar Set hinzufügen + + + Editieren abbrechen + + + Ausgewählte Toolbar löschen + + + Ausgewählte Toolbar bearbeiten + + + Eigene Toolbars + + + Eigene Toolbarliste: + + + Toolbar Name: + + + Verfügbare Buttons: + + + Toolbar Set speichern + + + jQuery Adapter benutzen? + + + Editor Höhe ('px' oder '%') : + + + Editor Breite ('px' oder '%') : + + + Einstellungen Importieren/Exportieren.... + + + Standard Bildverkleinerungs Höhe: + + + Standard Bildverkleinerungs Breite: + + + Exportieren + + + Importieren + + + Falsche XML Datei! + + + Aktuelle Editor Einstellungen Exportiert + + + Editor Einstellungen Importiert für + + + SyntaxHighlighter Js Link injezieren? + + + Standard Upload Ordner: + + + Standard Browser Start Ordner: + + + Auto. Thumbnails für Vorschaubilder erstellen: + + + Seiten Link Tab zuerst anzeigen: + + + Anker Auswahl anzeigen (Finded autom. alle Anker auf der gewählen Seite): + + + Default Upload Folder: + + + Standard Datei Listen Ansicht: + + + Einstellungen Exportieren + + + Einstellungen Importieren + + + Exportieren + + + Importieren + + + Dateien pro Seite (0=Keine Seiten): + + + Optionen nur für aktuelle(s) {0} löschen. + + + {0} Optionen löschen + + + Alle Optionen für aktuelle(s) {0} löschen. + + + Alle {0} Optionen löschen + + + Neue Gruppe erstellen + + + Neue Gruppe zum Toolbar Set hinzufügen? + + + Diese Toolbar Gruppe löschen? + + + Diesen Toolbar Button entfernen? + + + Anklicken um diesen Gruppen Namen zu ändern + + + Neue Gruppe + + + Gruppen Name Speichern + + + Toolbar Set Priorität: + + + Toolbar Gruppen: + + + CodeMirror Theme (Source Syntax Highlighting): + + + Skin + + + <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript support, like yours, you should still see the contents (HTML data) and you should be able to edit it normally, without a rich editor interface. + + + Editor Konfig. + + + Die Editor Einstellungen für die Modul Instanzen können nur auf der Seite auf der sich die Modul Instanz befindet aufgerufen werden. + + + CKEditor Provider Config Manager + + + Einstellungen nur für dieses Portal anzeigen oder alle Portal? + + + Bitte Warten... + + + Lädt Einstellungen. + + + Nur dieses Portal + + + Enthällt Modul Einstellungen + + + Enthällt keine Modul Einstellungen + + + Enthällt Seiten Einstellungen + + + Enthällt keine Seiten Einstellungen + + + Enthällt Portal Einstellungen + + + Enthällt keine Portal Einstellungen + + + Icon Legende + + + <strong>Info:</strong> Die Einstellungen unten sind nur für Experten, bitte nehmen Sie nur veränderungen vor wenn Sie wissen was sie tun. Um mehr über die Einstellungen zu erfahren besuchen Sie die <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html"><strong>CKEditor JavaScript API Documentation Page</strong></a>. Sie können die Einstellungen leer lassen, dann werden wenn der Editor geladen wird die standard Einstellungen verwendet. + + + Modul + + + Seite + + + Portal + + + Löscht alle Modulinstanz Einstellungen alller Module auf dieser Seite + + + Alle Moduleinstellungen der Seite löschen + + + Löscht alle Seiteneinstellungen der Seiten unterhalb dieser Seite + + + Alle Unterseiten Eintellungen löschen + + + Zeilenumbruch + + + Zeilenumbruch hinzufügen + + + Neuen Zeilenumbruch zum Toolbar Set hinzufügen + + + Relative URL + + + Absolute URL + + + Relative Gesicherte URL + + + Absolute Gesicherte URL + + + Standard Link Mode + + + Detailansicht + + + Iconansicht + + + Listenansicht + + + Der Standard Text der Angezeigt wenn kein Inhalt vorhanden ist. + + + Wählen Sie einen Artikel: + + + Wählen Sie die Seite und die NewsArticle Modul Instanz: + + + Sie müssen einen Toolbar Namen angeben + + + Neue Toolbar Set "{0}" erstellt! + + + Ausgewählte Toolbar Set wurde gelöscht! + + + Toolbar Set gespeichert! + + + Eigene JS Datei + + + Datei beim hochladen überschreiben wenn existiert, ansonsten wird eine neue Datei erzeugt? + + + Kopiert die aktuellen Einstellungen für alle Unterseiten + + + Einstellungen für Unterseiten kopieren + + + Settings copied to all Child Pages. + + + Upload File Size Limit + + + Upload File Limits: + + + CKEditor wird geladen... + + + Alle Portale + + + Enthält Host-Einstellungen + + + Enthält keine Host-Einstellungen + + \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Options.aspx.pl-PL.resx b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Options.aspx.pl-PL.resx new file mode 100644 index 00000000000..7538bd8200b --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Options.aspx.pl-PL.resx @@ -0,0 +1,504 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Dodaj złamanie wiersza + + + Dodaj nowe złamanie wiersza do zestawu pasków narzędziowych + + + Dodaj nowy zestaw pasków narzędziowych + + + Niepoprawny plik XML! + + + Domyślny tekst do wyświetlenia, gdy zawartość jest pusta podczas wczytywania zawartości modułu. + + + Przeglądaj folder główny: + + + Zamknij + + + Zapisz + + + Anuluj edycję + + + Motyw CodeMirror (podkreślanie składni): + + + Stwórz nową grupę + + + Dodać nową grupę do zestawu pasków narzędziowych? + + + Względne adresy URL + + + Bezwzględne adresy URL + + + Względne bezpieczne adresy URL + + + Bezwzględne bezpieczne adresy URL + + + Domyślny tryb podłączania odnośników + + + Usunąć tę grupę pasków narzędziowych? + + + Usuń wybrany zestaw paska narzędziowego + + + Usuń ten przycisk z paska narzędziowego? + + + Widok szczegółów + + + Kliknij, aby zmodyfikować nazwę grupy + + + <strong>Informacje:</strong> Ustawienia poniżej są tylko dla bardzo doświadczonych użytkowników, należy je zmieniać tylko wtedy, gdy naprawdę wiemy co robimy. Więcej informacji znajduje się na <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html"><strong>stronie dokumentacji API JavaScript CKEditor</strong></a>. Ustawienia można zostawić puste, aby wczytać domyślny zestaw ustawień przy uruchomieniu edytora. + + + Edytuj wybrany zestaw paska narzędziowego + + + Brak autoryzacji do wyświetlenia tej strony! + + + Wyeksportowano ustawienia bieżące + + + Wyeksportuj teraz + + + Rozmiar strony z listą plików (0 = bez stronicowania): + + + Domyślny tryb wyświetlania listy plików: + + + Legenda ikon + + + Widok ikon + + + Zaimportowane ustawienia edytora dla + + + Zaimportuj teraz + + + Automatycznie twórz miniaturki do podglądu: + + + Tekst, gdy pusto: + + + Zezwolone role: + + + Przeglądarka plików + + + Używaj podfolderów dla nie-adminów (..\Portals\0\userfiles\nazwa_użytkownika)? + + + Ustawienia przeglądarki plików + + + CSS edytora: + + + Własny plik konfiguracji + + + Własne paski narzędziowe + + + Konfiguracja edytora + + + Informacje + + + Wysokość edytora (piksele lub procent) + + + Zaimportuj/Wyeksportuj bieżące ustawienia... + + + Ustawienia zapisane. Odśwież edytor lub wczytaj stronę ponownie, aby wyświetlić zmiany! + + + Ustawienia usunięte + + + Dołączać odnośnik do SyntaxHighlighter Js? + + + Główne ustawienia + + + Instancja modułu: + + + Nazwa modułu: + + + Typ modułu: + + + Strona: + + + Nazwa witryny: + + + Domyślna wysokość obrazka po zmniejszeniu: + + + Domyślna szerokość obrazka po zmniejszeniu: + + + Rola + + + Wybierz pasek narzędziowy + + + Zmień ustawienia dla... + + + Ustawienia + + + Wyświetl najpierw zakładkę z odnośnikami: + + + Motyw + + + Style edytora + + + Szablony edytora + + + Plik szablonu edytora: + + + Lista własnych pasków narzędziowych: + + + Priorytet zestawu pasków narzędziowych: + + + Paski narzędziowe: + + + Nazwa paska narzędziowego: + + + Dostępne przyciski dla pasków: + + + Nazwa użytkownika: + + + Użyj wybierania kotwicy (automatycznie odnajduje wszystkie kotwice na wybranej stronie): + + + Użyć adaptera jQuery? + + + Szerokość edytora (pikseli lub procent) + + + Widok listy + + + Eksportuj + + + Importuj + + + Usuń ustawienia + + + Ustawienia edytora dla instancji modułu mogą być wyświetlane i wczytywane tylko z tej instancji modułu! + + + Zawiera ustawienia modułu + + + Menedżer konfiguracji dostawcy CKEditor + + + Moduł + + + Nie zawiera ustawień dla modułu + + + Nowa grupa + + + Wybierz artykuł: + + + Wybierz stronę i instancję modułu artykułów: + + + <strong>CKEditor wymaga obsługi JavaScript do działania</strong>. W przypadku braku obsługi JavaScript nadal można przeglądać treść w postaci kodu HTML i można go modyfikować, ale bez zaawansowanego interfejsu. + + + Własne opcje edytora + + + Strona + + + Zawiera ustawienia dla strony + + + Nie zawiera ustawień dla strony + + + Witryna + + + Zawiera ustawienia dla witryny + + + Nie zawiera ustawień dla witryny + + + Tylko dla tej witryny + + + Wyświetlać tylko ustawienia dla tej witryny, czy dla wszystkich? + + + Usuwa ustawienie tylko dla bieżącej {0}. + + + Usuń ustawienia dla {0} + + + Usuwa ustawienia {0} z całej witryny + + + Usuwa wszystkie ustawienia dla {0} + + + Usuwa wszystkie ustawienia dla modułów na bieżącej stronie + + + Usuń wszystkie ustawienia dla modułów na stronie + + + Usuwa wszystkie ustawienia dla stron podrzędnych strony bieżącej + + + Usuń wszystkie ustawienia dla stron podrzędnych + + + Złamanie wiersza + + + Zapisz nazwę grupy + + + Zapisz zestaw paska narzędziowego + + + Eksporter ustawień + + + Importer ustawień + + + Grupy pasków narzędziowych: + + + Domyślny folder wysyłania: + + + Proszę czekać... + + + Wczytywanie strony opcji. + + + Należy wprowadzić nazwę dla paska narzędziowego + + + Stworzono nowy zestaw pasków narzędziowych "{0}"! + + + Wybrany zestaw pasków narzędziowych został usunięty! + + + Zestaw pasków narzędziowych zapisany! + + + Override File if exists on upload, otherwise a new File with underscore _1 will be created? + + + Copy current Page Settings to all Child Pages + + + Copy Settings to Child Pages + + + Settings copied to all Child Pages. + + + Upload File Size Limit + + + Upload File Limits: + + + Wszystkie portale + + + Zawiera ustawienia hosta + + + Nie zawiera żadnych ustawień hosta + + + + + \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Options.aspx.resx b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Options.aspx.resx new file mode 100644 index 00000000000..ba83d77ad5a --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Options.aspx.resx @@ -0,0 +1,515 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Private + + + + False + + + True + + + Informations + + + Module Type: + + + Module Name: + + + Module Instance: + + + User Name: + + + Settings + + + Save + + + Close + + + The user does not have permissions to view this page. + + + Page: + + + Modify Settings for ... + + + Allowed Roles: + + + File Browser: + + + File Browser Settings + + + Editor Area CSS: + + + Site Name: + + + Editor Styles + + + Toolbars: + + + Remove Settings + + + Settings saved. Refresh the Editor or reload the page to see the changes. + + + Settings deleted + + + Blank Text: + + + Role + + + Select a Toolbar + + + Custom Editor Options + + + Main Settings + + + Use Subdirs for non Admins (..\Portals\0\userfiles\username): + + + Editor Templates + + + Editor Templates File: + + + Custom Config File: + + + Add a new Toolbar Set + + + Cancel Edit + + + Delete the selected Toolbar Set + + + Edit the selected Toolbar Set + + + Custom Toolbars + + + Custom Toolbars List: + + + Toolbar Name: + + + Available Toolbar Buttons + + + Save the Toolbar Set + + + Use jQuery Adapter? + + + Editor Height (px' or '%') : + + + Editor Width ('px' or '%') : + + + Import/Export Current Settings... + + + Default Image Resize Height: + + + Default Image Resize Width: + + + Export + + + Import + + + Incorrect or bad XML file. + + + Current Editor Settings Exported + + + Editor Settings Imported for + + + Inject Link to SyntaxHighlighter JS: + + + Default Upload Folder: + + + Browser Root Folder: + + + Auto Create Image Thumbnails for Preview: + + + Show Page Links Tab First: + + + Use Anchor Selector (Automatically Finds All Anchors on the Selected Page): + + + Default File List View Mode: + + + Settings Exporter + + + Settings Importer + + + Export Now + + + Import Now + + + File List Page Size (0=Non Paging): + + + Removes the Setting for the Current {0} only. + + + Remove {0} Settings + + + Removes the {0} settings of the entire site. + + + Remove All {0} Settings + + + Create New Group + + + Add New Group to Toolbar Set? + + + Delete this Toolbar Group? + + + Remove this Toolbar Button? + + + Click to Edit this Group Name + + + New Group + + + Save Group Name + + + Toolbar Set Priority: + + + Toolbar Groups + + + CodeMirror Theme (for Source Syntax Highlighting): + + + Skin: + + + <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript support, like yours, you should still see the contents (HTML data) and you should be able to edit it normally, without a rich editor interface. + + + Editor Config + + + The Editor Settings for an Module Instance can only be viewed and loaded from within the Module Instance. + + + CKEditor Provider Config Manager + + + Show Settings Only for This Site or for All Sites? + + + This Site Only + + + Please Wait... + + + Loading Options Page. + + + Contains Module Settings + + + Contains No Module Settings + + + Contains Page Settings + + + Contains No Page Settings + + + Contains Site Settings + + + Contains No Site Settings + + + Icon Legend + + + <strong>Information:</strong> The Settings below are only for Experts, please modify them only if you are know what you are doing. To find out more about the Settings below visit the <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html"><strong>CKEditor JavaScript API Documentation Page</strong></a>. You can leave the Settings blank to load the default Settings, when the Editor is loaded. + + + Module + + + Page + + + Site + + + Remove Settings of all Modules on the Current Page + + + Remove All Module Settings on Page + + + Removes all child page settings for the current page. + + + Remove All Child Page Settings + + + Row Break + + + Add Row Break + + + Add New Row Break to the Toolbar Set + + + Relative URL + + + Absolute URL + + + Relative Secured URL + + + Absolute Secured URL + + + Default Link Mode: + + + Detail View + + + Icons View + + + List View + + + This is the default text displayed when the content of the module is empty. + + + Select an Article: + + + Select the Page and the News Articles Module Instance: + + + You must enter a toolbar name. + + + New toolbar set "{0}" created. + + + Selected toolbar set deleted. + + + Toolbar set saved. + + + Custom JS File: + + + Override File If Exists on Upload, Otherwise a New File With Underscore _1 Will Be Created: + + + Copy current page dettings to all child pages. + + + Copy Settings to Child Pages + + + Settings copied to all child pages. + + + Upload File Size Limit + + + Upload File Limits + + + All Portals + + + Contains Host Settings + + + Contains No Host Settings + + \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Options.aspx.ru-RU.resx b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Options.aspx.ru-RU.resx new file mode 100644 index 00000000000..40341006d77 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/App_LocalResources/Options.aspx.ru-RU.resx @@ -0,0 +1,515 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Private + + + + False + + + True + + + Информация + + + Тип модуля: + + + Имя модуля: + + + Экземпляр модуля: + + + Имя пользователя: + + + Настройки + + + Сохранить + + + Закрыть + + + У Вас недостаточно прав для просмотра этой страницы. + + + Страница: + + + Изменить настройки ... + + + Разрешенные роли: + + + Браузер файлов: + + + Настройки браузера файлов + + + CSS области редактора: + + + Название сайта: + + + Стили редактора + + + Панели инструментов: + + + Удаление настроек + + + Настройки сохранены. Обновите редактор или перезагрузите страницу, чтобы увидеть изменения. + + + Настройки удалены + + + Пустой текст: + + + Роль + + + Выберите панель инструментов + + + Пользовательские настройки редактора + + + Главные настройки + + + Использовать подпапки для не-администраторов (..\Portals\0\userfiles\username): + + + Шаблона редактора + + + Файл шаблонов редактора: + + + Пользовательский файл настроек: + + + Новый набор панелей инструментов + + + Отменить редактирование + + + Удалить выбранный набор панелей инструментов + + + Редактировать набор панелей инструментов + + + Пользовательские панели инструментов + + + Список пользовательских панелей инструментов: + + + Название панели: + + + Доступные кнопки + + + Сохранить набор панелей + + + Использовать адаптор jQuery? + + + Высота редактора ('px' или '%') : + + + Ширина редактора ('px' или '%') : + + + Импорт/экспорт текущих настроек... + + + Высота изображений по-умолчанию: + + + Ширина изображений по-умолчанию: + + + Экспорт + + + Импорт + + + Неверный или плохой файл XML. + + + Текущие настройки редактора экспортированы + + + Настройки редактора импортированы для + + + Добавить ссылку на SyntaxHighlighter JS: + + + Папка выгрузки по-умолчанию: + + + Корневая папка браузера файлов: + + + Создавать миниатюры изображений для предпросмотра: + + + Показывать вкладку ссылок на страницы первой: + + + Использовать выбор якорей (автоматически находит все якоря на выбранной странице): + + + Режим списка файлов по-умолчанию: + + + Экспорт настроек + + + Импорт настроек + + + Экспортировать сейчас + + + Импортировать сейчас + + + Размер страницы списка файлов (0=не разбивать на страницы): + + + Настройки будут удалены только для текущего {0}. + + + Удалить настройки {0} + + + Удалить настройки {0} для всего сайта. + + + Удалить настройки {0} + + + Новая группа + + + Добавить новую группу в набор панелей? + + + Удалить эту группу панелей? + + + Удалить эту кнопку? + + + Нажмите для изменения названия группы + + + Новая группа + + + Сохранить название группы + + + Приоритет набора панелей: + + + Группы панелей + + + Тема CodeMirror (для подсветки исходного кода): + + + Шаблон оформления: + + + <strong>Работа CKEditor требует использования JavaScript</strong>. В браузере без поддержки или с выключенным JavaScript, как в Вашем случае, Вы должны видеть содержимое (в формате HTML), а также редактировать его - но без пользовательского интерфейса редактора. + + + Настройки редактора + + + Настройки редактора для экземпляра модуля могут быть просмотрены и загружены только из этого экземпляра модуля. + + + Настройки поставщика CKEditor + + + Показывать настройки только для этого сайта, или для всех сайтов? + + + Только сайт + + + Подождите, пожалуйста... + + + Загружаю страницу настроек. + + + Содержит настройки модуля + + + Не содержит настроек модуля + + + Содержит настройки страницы + + + Не содержит настроек страницы + + + Содержит настройки сайта + + + Не содержит настроек сайта + + + Легенда + + + <strong>Информация:</strong> Расположенные ниже настройки предназначены только для очень опытных пользователей, так что меняйте что-нибудь в них только в том случае, если Вы точно знаете, что делаете. Для получения подробной информации об этих настройках, посетите <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html"><strong>страницу документации CKEditor JavaScript API</strong></a>. Вы можете оставить эти настройки пустыми, чтобы загрузить настройки по-умолчанию тогда, когда редактор будет загружаться. + + + Модуль + + + Страница + + + Сайт + + + Удалить настройки всех модулей на текущей странице + + + Удалить настройки всех модулей на странице + + + Удаление всех настроек дочерних страниц текущей страницы. + + + Удалить настройки дочерних страниц + + + Разделитель строк + + + Добавить разделитель строк + + + Добавить новый разделитель строк в набор панелей + + + Относительный URL + + + Абсолютный URL + + + Относительный защищенный URL + + + Абсолютный защищенный URL + + + Режим ссылок по-умолчанию: + + + Подробно + + + Значки + + + Список + + + Это текст, отображаемый по-умолчанию, когда содержимое модуля отсутствует. + + + Выберите статью: + + + Выберите страницу и экземпляр модуля News Articles: + + + Укажите название панели инструментов. + + + Создан набор панелей "{0}". + + + Выбранный набор панелей удален. + + + Набор панелей сохранен. + + + Пользовательский файл JS: + + + Перезаписать файл при выгрузке, если он существует, или создать файл с именем, к которому будет добавлено _1: + + + Копировать настройки текущей страницы для подчиненных. + + + Копировать настройки для подчиненных + + + Настройки скопированы для всех подчиненных страниц. + + + Максимальный размер файла для выгрузки + + + Ограничения для выгружаемых файлов + + + Все порталы + + + Содержит настройки хоста + + + Не содержит настроек хоста + + diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.aspx b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.aspx new file mode 100644 index 00000000000..a6cd327d89d --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.aspx @@ -0,0 +1,438 @@ +<%@ Page language="c#" Codebehind="Browser.aspx.cs" AutoEventWireup="True" Inherits="DNNConnect.CKEditorProvider.Browser.Browser" %> +<%@ Register TagPrefix="dnn" Assembly="DotNetNuke.Web" Namespace="DotNetNuke.Web.UI.WebControls" %> +<%@ Register TagPrefix="wnet" Namespace="DNNConnect.CKEditorProvider.Controls" Assembly="DNNConnect.CKEditorProvider" %> + + + + + + DNNConnect.CKEditorProvider.FileBrowser + + + + + +
      + +
      +

      +
      +
      + + + + + + + + + + + + + + +
      + + +
      + +
      +
      + + + + + + + + + + + + + + + +
      + + +
      + + + + + +
      + + + + + + +
      +
      +
      + +

      +
      + + + + + +
      +
      + +
      +
      + +  px  + +  px +   +
      +
      +
      +
      +   + +
      +
      +   +  % +
      +
      +   + +
      +
      +
      + +
      +   + +
      +
      + +
      +
      +
      + Show Preview  +
      +
      + Clear Preview  +
      +
      +
      +
      + + + + + + + + + + +
      +
      + +
      +
      +
      + + +
      +
      +
      + +

      + + +
      +
      + +
      +
      +
      + + + + +
      +
      +
      + +
      +
      +
      + + + + + + + + + + + + +
      + + + Create Folder Create New Folder + + + Sync Folder Synchronize Folder + + + + + + Upload File Upload File + +   + Download File Download File + +   + Delete File Delete File + +   + Image Resizer Image Resizer + + +
      +
      +
      + +
      + +
      +   + DetailView  + ListView  + IconsView | + Sort Ascending  + Sort Descending  + Sort By Date Ascending  + Sort By Date Descending +
      + +
      + + +
        + + +
      • + + + <%# DataBinder.Eval(Container.DataItem, "Info").ToString()%> + +
      • +
        + +
      • + + + <%# DataBinder.Eval(Container.DataItem, "Info").ToString()%> + +
      • +
        + +
      + +
      +
      + +
      +
      +
      + + + + + + +
      + + + + + + +
      +
      + +   +
      + + + +
      + + + + diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.aspx.cs b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.aspx.cs new file mode 100644 index 00000000000..369a2ed82fd --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.aspx.cs @@ -0,0 +1,3261 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + +using System; +using System.Collections.Generic; +using System.Data; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Drawing.Imaging; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Text.RegularExpressions; +using System.Web; +using System.Web.Script.Services; +using System.Web.Services; +using System.Web.UI; +using System.Web.UI.HtmlControls; +using System.Web.UI.WebControls; +using DNNConnect.CKEditorProvider.Constants; +using DNNConnect.CKEditorProvider.Controls; +using DNNConnect.CKEditorProvider.Objects; +using DNNConnect.CKEditorProvider.Utilities; +using DotNetNuke.Common.Utilities; +using DotNetNuke.Entities.Host; +using DotNetNuke.Entities.Portals; +using DotNetNuke.Entities.Tabs; +using DotNetNuke.Entities.Users; +using DotNetNuke.Framework.JavaScriptLibraries; +using DotNetNuke.Framework.Providers; +using DotNetNuke.Security.Permissions; +using DotNetNuke.Security.Roles; +using DotNetNuke.Services.FileSystem; +using DotNetNuke.Services.Localization; +using DotNetNuke.UI.Utilities; +using Microsoft.JScript; +using Convert = System.Convert; +using Encoder = System.Drawing.Imaging.Encoder; +using Globals = DotNetNuke.Common.Globals; +using Image = System.Drawing.Image; +using DNNConnect.CKEditorProvider.Helper; + +namespace DNNConnect.CKEditorProvider.Browser +{ + /// + /// The browser. + /// + [ScriptService] + public partial class Browser : Page + { + #region Constants and Fields + + private const string fileItemDisplayFormat = + "{2}
      {0}: {3}
      {1}: {4}"; + /// + /// The Image or Link that is selected inside the Editor. + /// + private static string ckFileUrl; + + /// + /// The allowed flash extensions. + /// + private static readonly ISet AllowedFlashExtensions = new HashSet(new[] { "swf", "flv", "mp3" }, StringComparer.OrdinalIgnoreCase); + + /// + /// The allowed image extensions. + /// + private static readonly ISet AllowedImageExtensions = new HashSet(new[] { "bmp", "gif", "jpeg", "jpg", "png", "svg" }, StringComparer.OrdinalIgnoreCase); + + /// + /// The request. + /// + private readonly HttpRequest request = HttpContext.Current.Request; + + /// + /// Current Settings Base + /// + private EditorProviderSettings currentSettings = new EditorProviderSettings(); + + /// + /// The _portal settings. + /// + private PortalSettings _portalSettings; + + /// + /// The extension white list. + /// + private FileExtensionWhitelist extensionWhiteList; + + /// + /// The browser modus + /// + private string browserModus; + + #endregion + + #region Properties + + /// + /// Gets or sets the accept file types. + /// + /// + /// The accept file types. + /// + public string AcceptFileTypes + { + get + { + return ViewState["AcceptFileTypes"] != null ? ViewState["AcceptFileTypes"].ToString() : ".*"; + } + + set + { + ViewState["AcceptFileTypes"] = value; + } + } + + /// + /// Gets Current Language from Url + /// + protected string LanguageCode + { + get + { + return !string.IsNullOrEmpty(request.QueryString["lang"]) + ? request.QueryString["lang"] + : "en-US"; + } + } + + /// + /// Gets the Name for the Current Resource file name + /// + /// + /// The resource executable file. + /// + protected string ResXFile + { + get + { + string[] page = Request.ServerVariables["SCRIPT_NAME"].Split('/'); + + string fileRoot = string.Format( + "{0}/{1}/{2}.resx", + TemplateSourceDirectory.Replace("/DNNConnect.CKE/Browser", "/DNNConnect.CKE"), + Localization.LocalResourceDirectory, + page[page.GetUpperBound(0)]); + + return fileRoot; + } + } + + /// + /// Gets the maximum size of the upload. + /// + /// + /// The maximum size of the upload. + /// + protected long MaxUploadSize + { + get + { + return currentSettings.UploadFileSizeLimit > 0 + && currentSettings.UploadFileSizeLimit <= Utility.GetMaxUploadSize() + ? currentSettings.UploadFileSizeLimit + : Utility.GetMaxUploadSize(); + } + } + + /// + /// Gets the get folder information identifier. + /// + /// + /// The get folder information identifier. + /// + protected int CurrentFolderId + { + get + { + if (ViewState["CurrentFolderId"] != null) + { + return Convert.ToInt32(ViewState["CurrentFolderId"]); + } + + return StartingDir().FolderID; + } + set + { + ViewState["CurrentFolderId"] = value; + } + } + + /// + /// Gets or sets the files table. + /// + /// + /// The files table. + /// + private DataTable FilesTable + { + get + { + return ViewState["FilesTable"] as DataTable; + } + + set + { + ViewState["FilesTable"] = value; + } + } + + /// + /// Gets or sets a value indicating whether [sort files Ascending]. + /// + /// + /// true if [sort files Ascending]. + /// + private bool SortFilesAscending + { + get + { + return ViewState["SortFilesAscending"] != null && (bool)ViewState["SortFilesAscending"]; + } + + set + { + ViewState["SortFilesAscending"] = value; + FilesTable = null; + } + } + + /// + /// Gets or sets a value indicating whether [sort files descending]. + /// + /// + /// true if [sort files descending]. + /// + private bool SortFilesDescending + { + get + { + return ViewState["SortFilesDescending"] != null && (bool)ViewState["SortFilesDescending"]; + } + + set + { + ViewState["SortFilesDescending"] = value; + FilesTable = null; + } + } + + /// + /// Gets or sets a value indicating whether [sort files by Ascending Date]. + /// + /// + /// true if [sort files by ascending date]. + /// + private bool SortFilesDateAscending + { + get + { + return ViewState["SortFilesDateAscending"] != null && (bool)ViewState["SortFilesDateAscending"]; + } + + set + { + ViewState["SortFilesDateAscending"] = value; + FilesTable = null; + } + } + + /// + /// Gets or sets a value indicating whether [sort files by descending Date]. + /// + /// + /// true if [sort files by descending date]; otherwise sort by ascending Date. + /// + private bool SortFilesDateDescending + { + get + { + return ViewState["SortFilesDateDescending"] != null && (bool)ViewState["SortFilesDateDescending"]; + } + + set + { + ViewState["SortFilesDateDescending"] = value; + FilesTable = null; + } + } + + #endregion + + #region Public Methods + + /// + /// Set the file url from JavaScript to code + /// + /// + /// The file url. + /// + [WebMethod] + public static void SetFile(string fileUrl) + { + ckFileUrl = fileUrl; + } + + /// + /// Get all Files and Put them in a DataTable for the GridView + /// + /// The current folder info. + /// + /// The File Table + /// + public DataTable GetFiles(IFolderInfo currentFolderInfo) + { + var sizeResx = Localization.GetString("Size.Text", ResXFile, LanguageCode); + var createdResx = Localization.GetString("Created.Text", ResXFile, LanguageCode); + + var filesTable = new DataTable(); + + filesTable.Columns.Add(new DataColumn("FileName", typeof(string))); + filesTable.Columns.Add(new DataColumn("PictureURL", typeof(string))); + filesTable.Columns.Add(new DataColumn("Info", typeof(string))); + filesTable.Columns.Add(new DataColumn("FileId", typeof(int))); + + HttpRequest httpRequest = HttpContext.Current.Request; + + var type = "Link"; + + if (!string.IsNullOrEmpty(httpRequest.QueryString["Type"])) + { + type = httpRequest.QueryString["Type"]; + } + + //Get the files + var files = FolderManager.Instance.GetFiles(currentFolderInfo).ToList(); + + if(SortFilesAscending) + { + Utility.SortAscending(files, item => item.FileName); + } + + if (SortFilesDescending) + { + Utility.SortDescending(files, item => item.FileName); + } + + if (SortFilesDateAscending) + { + Utility.SortAscending(files, item => item.CreatedOnDate); + } + + if (SortFilesDateDescending) + { + Utility.SortDescending(files, item => item.CreatedOnDate); + } + + foreach (var fileItem in files) + { + var item = fileItem; + + var name = fileItem.FileName; + var extension = fileItem.Extension; + + if (currentFolderInfo.IsProtected) + { + name = GetFileNameCleaned(name); + extension = Path.GetExtension(name); + } + + switch (type) + { + case "Image": + { + if (AllowedImageExtensions.Contains(extension)) + { + var dr = filesTable.NewRow(); + + dr["PictureURL"] = FileManager.Instance.GetUrl(fileItem); + dr["FileName"] = name; + dr["FileId"] = item.FileId; + + dr["Info"] = + string.Format(fileItemDisplayFormat, + sizeResx, + createdResx, + name, + fileItem.Size, + fileItem.LastModificationTime); + + filesTable.Rows.Add(dr); + } + } + + break; + case "Flash": + { + if (AllowedFlashExtensions.Contains(extension)) + { + var dr = filesTable.NewRow(); + + dr["PictureURL"] = "images/types/swf.png"; + + dr["Info"] = + string.Format(fileItemDisplayFormat, + sizeResx, + createdResx, + name, + fileItem.Size, + fileItem.LastModificationTime); + + dr["FileName"] = name; + dr["FileId"] = item.FileId; + + filesTable.Rows.Add(dr); + } + } + + break; + + default: + { + if (extension.StartsWith(".")) + { + extension = extension.Replace(".", string.Empty); + } + + if (extension.Count() <= 1 || !extensionWhiteList.IsAllowedExtension(extension)) + { + continue; + } + + DataRow dr = filesTable.NewRow(); + + var imageExtension = string.Format("images/types/{0}.png", extension); + + if (File.Exists(MapPath(imageExtension))) + { + dr["PictureURL"] = imageExtension; + } + else + { + dr["PictureURL"] = "images/types/unknown.png"; + } + + if (AllowedImageExtensions.Any(sAllowImgExt => name.EndsWith(sAllowImgExt, StringComparison.OrdinalIgnoreCase))) + { + dr["PictureUrl"] = FileManager.Instance.GetUrl(fileItem); + } + + dr["FileName"] = name; + dr["FileId"] = fileItem.FileId; + + dr["Info"] = + string.Format(fileItemDisplayFormat, + sizeResx, + createdResx, + name, + fileItem.Size, + fileItem.LastModificationTime); + + filesTable.Rows.Add(dr); + } + + break; + } + } + + return filesTable; + } + + #endregion + + #region Methods + + /// + /// Register JavaScripts and CSS + /// + /// + /// The Event Args. + /// + protected override void OnPreRender(EventArgs e) + { + LoadFavIcon(); + + var jqueryScriptLink = new HtmlGenericControl("script"); + + jqueryScriptLink.Attributes["type"] = "text/javascript"; + jqueryScriptLink.Attributes["src"] = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; + + favicon.Controls.Add(jqueryScriptLink); + + var jqueryUiScriptLink = new HtmlGenericControl("script"); + + jqueryUiScriptLink.Attributes["type"] = "text/javascript"; + jqueryUiScriptLink.Attributes["src"] = "//ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"; + + favicon.Controls.Add(jqueryUiScriptLink); + + var jqueryImageSliderScriptLink = new HtmlGenericControl("script"); + + jqueryImageSliderScriptLink.Attributes["type"] = "text/javascript"; + jqueryImageSliderScriptLink.Attributes["src"] = ResolveUrl("js/jquery.ImageSlider.js"); + + favicon.Controls.Add(jqueryImageSliderScriptLink); + + var jqueryImageResizerScriptLink = new HtmlGenericControl("script"); + + jqueryImageResizerScriptLink.Attributes["type"] = "text/javascript"; + jqueryImageResizerScriptLink.Attributes["src"] = ResolveUrl("js/jquery.cropzoom.js"); + + favicon.Controls.Add(jqueryImageResizerScriptLink); + + var jqueryCropZoomScriptLink = new HtmlGenericControl("script"); + + jqueryCropZoomScriptLink.Attributes["type"] = "text/javascript"; + jqueryCropZoomScriptLink.Attributes["src"] = ResolveUrl("js/jquery.ImageResizer.js"); + + favicon.Controls.Add(jqueryCropZoomScriptLink); + + var jqueryPageMetodScriptLink = new HtmlGenericControl("script"); + + jqueryPageMetodScriptLink.Attributes["type"] = "text/javascript"; + jqueryPageMetodScriptLink.Attributes["src"] = ResolveUrl("js/jquery.pagemethod.js"); + + favicon.Controls.Add(jqueryPageMetodScriptLink); + + var jqueryFileUploadScriptLink = new HtmlGenericControl("script"); + + jqueryFileUploadScriptLink.Attributes["type"] = "text/javascript"; + jqueryFileUploadScriptLink.Attributes["src"] = ResolveUrl("js/jquery.fileupload.comb.min.js"); + + favicon.Controls.Add(jqueryFileUploadScriptLink); + + var objCssLink = new HtmlGenericSelfClosing("link"); + + objCssLink.Attributes["rel"] = "stylesheet"; + objCssLink.Attributes["type"] = "text/css"; + objCssLink.Attributes["href"] = "//ajax.googleapis.com/ajax/libs/jqueryui/1/themes/blitzer/jquery-ui.css"; + + favicon.Controls.Add(objCssLink); + + GetSelectedImageOrLink(); + + base.OnPreRender(e); + } + + /// + /// Close Browser Window + /// + /// The sender. + /// The instance containing the event data. + protected void CmdCloseClick(object sender, EventArgs e) + { + if (!panLinkMode.Visible && panPageMode.Visible) + { + if (dnntreeTabs.SelectedNode == null) + { + return; + } + + var tabController = new TabController(); + + var selectTab = tabController.GetTab( + int.Parse(dnntreeTabs.SelectedValue), _portalSettings.PortalId, true); + + string fileName = null; + var domainName = string.Format("http://{0}", Globals.GetDomainName(Request, true)); + + // Add Language Parameter ?! + var localeSelected = LanguageRow.Visible && LanguageList.SelectedIndex > 0; + + var friendlyUrl = localeSelected + ? Globals.FriendlyUrl( + selectTab, + string.Format( + "{0}&language={1}", + Globals.ApplicationURL(selectTab.TabID), + LanguageList.SelectedValue), + _portalSettings) + : Globals.FriendlyUrl( + selectTab, Globals.ApplicationURL(selectTab.TabID), _portalSettings); + + var locale = localeSelected + ? string.Format("language/{0}/", LanguageList.SelectedValue) + : string.Empty; + + // Relative or Absolute Url + switch (rblLinkType.SelectedValue) + { + case "relLnk": + { + if (chkHumanFriendy.Checked) + { + fileName = friendlyUrl; + + fileName = + Globals.ResolveUrl( + Regex.Replace(fileName, domainName, "~", RegexOptions.IgnoreCase)); + } + else + { + fileName = + Globals.ResolveUrl( + string.Format("~/tabid/{0}/{1}Default.aspx", selectTab.TabID, locale)); + } + + break; + } + + case "absLnk": + { + if (chkHumanFriendy.Checked) + { + fileName = friendlyUrl; + + fileName = Regex.Replace( + fileName, domainName, string.Format("{0}", domainName), RegexOptions.IgnoreCase); + } + else + { + fileName = string.Format( + "{2}/tabid/{0}/{1}Default.aspx", selectTab.TabID, locale, domainName); + } + } + + break; + } + + // Add Page Anchor if one is selected + if (AnchorList.SelectedIndex > 0 && AnchorList.Items.Count > 1) + { + fileName = string.Format("{0}#{1}", fileName, AnchorList.SelectedItem.Text); + } + + Response.Write(""); + + Response.End(); + } + else if (panLinkMode.Visible && !panPageMode.Visible) + { + if (!string.IsNullOrEmpty(lblFileName.Text) && !string.IsNullOrEmpty(FileId.Text)) + { + var fileInfo = FileManager.Instance.GetFile(int.Parse(FileId.Text)); + + var filePath = FileManager.Instance.GetUrl(fileInfo); + + if (rblLinkType.SelectedValue.Equals("absLnk", StringComparison.InvariantCultureIgnoreCase)) + filePath = BuildAbsoluteUrl(filePath); + + + Response.Write(""); + + Response.End(); + } + else + { + Response.Write(""); + + Response.End(); + } + } + } + + /// + /// Gets the java script code. + /// + /// Name of the file. + /// The file URL. + /// if set to true [is page link]. + /// + /// Returns the java script code + /// + protected virtual string GetJavaScriptCode(string fileName, string fileUrl, bool isPageLink) + { + + if (!string.IsNullOrEmpty(fileUrl) && !string.IsNullOrEmpty(fileName)) + { + //If we have both, combine them + fileUrl = !fileUrl.EndsWith("/") + ? string.Format("{0}/{1}", fileUrl, fileName) + : string.Format("{0}{1}", fileUrl, fileName); + } + else if(string.IsNullOrEmpty(fileUrl)) + { + //If no URL, default to the file name + fileUrl = fileName; + } + + if (!fileUrl.Contains("?") && !isPageLink) + { + fileUrl = GlobalObject.escape(fileUrl); + + if (fileUrl.Contains("%3A")) + { + fileUrl = fileUrl.Replace("%3A", ":"); + } + + if (fileUrl.Contains(".aspx%23")) + { + fileUrl = fileUrl.Replace("aspx%23", "aspx#"); + } + } + + HttpRequest httpRequest = HttpContext.Current.Request; + + // string _CKEditorName = httpRequest.QueryString["CKEditor"]; + string funcNum = httpRequest.QueryString["CKEditorFuncNum"]; + + string errorMsg = string.Empty; + + funcNum = Regex.Replace(funcNum, @"[^0-9]", string.Empty, RegexOptions.None); + + return + string.Format( + "var E = window.top.opener;E.CKEDITOR.tools.callFunction({0},'{1}','{2}') ;self.close();", + funcNum, + fileUrl.Replace("'", "\\'"), + errorMsg.Replace("'", "\\'")); + } + + /// + /// Gets the java script upload code. + /// + /// The file name. + /// The file url. + /// + /// Returns the formatted java script block + /// + protected virtual string GetJsUploadCode(string fileName, string fileUrl) + { + fileUrl = string.Format(!fileUrl.EndsWith("/") ? "{0}/{1}" : "{0}{1}", fileUrl, fileName); + + var httpRequest = HttpContext.Current.Request; + + // var _CKEditorName = request.QueryString["CKEditor"]; + var funcNum = httpRequest.QueryString["CKEditorFuncNum"]; + + var errorMsg = string.Empty; + + funcNum = Regex.Replace(funcNum, @"[^0-9]", string.Empty, RegexOptions.None); + + return string.Format( + "var E = window.parent;E['CKEDITOR'].tools.callFunction({0},'{1}','{2}') ;", + funcNum, + GlobalObject.escape(fileUrl), + errorMsg.Replace("'", "\\'")); + } + + /// + /// Handles the Page Changed event of the Pager FileLinks control. + /// + /// The source of the event. + /// The instance containing the event data. + protected void PagerFileLinks_PageChanged(object sender, EventArgs e) + { + ShowFilesIn(GetCurrentFolder(), true); + + // Reset selected file + SetDefaultLinkTypeText(); + + FileId.Text = null; + lblFileName.Text = null; + } + + /// + /// Sorts the Files in ascending order + /// + /// The source of the event. + /// The instance containing the event data. + protected void SortAscendingClick(object sender, EventArgs e) + { + SortFilesAscending = true; + SortFilesDescending = false; + SortFilesDateAscending = false; + SortFilesDateDescending = false; + + SetSortButtonClasses(); + + ShowFilesIn(GetCurrentFolder(), true); + + // Reset selected file + SetDefaultLinkTypeText(); + + FileId.Text = null; + lblFileName.Text = null; + } + + /// + /// Sorts the Files in descending order + /// + /// The source of the event. + /// The instance containing the event data. + protected void SortDescendingClick(object sender, EventArgs e) + { + SortFilesAscending = false; + SortFilesDescending = true; + SortFilesDateAscending = false; + SortFilesDateDescending = false; + + SetSortButtonClasses(); + + ShowFilesIn(GetCurrentFolder(), true); + + // Reset selected file + SetDefaultLinkTypeText(); + + FileId.Text = null; + lblFileName.Text = null; + } + + /// + /// Sorts the Files by Date in ascending order + /// + /// The source of the event. + /// The instance containing the event data. + protected void SortByDateAscendingClick(object sender, EventArgs e) + { + SortFilesAscending = false; + SortFilesDescending = false; + SortFilesDateAscending = true; + SortFilesDateDescending = false; + + SetSortButtonClasses(); + + ShowFilesIn(GetCurrentFolder(), true); + + // Reset selected file + SetDefaultLinkTypeText(); + + FileId.Text = null; + lblFileName.Text = null; + } + + /// + /// Sorts the Files by Date in descending order + /// + /// The source of the event. + /// The instance containing the event data. + protected void SortByDateDescendingClick(object sender, EventArgs e) + { + SortFilesAscending = false; + SortFilesDescending = false; + SortFilesDateAscending = false; + SortFilesDateDescending = true; + + SetSortButtonClasses(); + + ShowFilesIn(GetCurrentFolder(), true); + + // Reset selected file + SetDefaultLinkTypeText(); + + FileId.Text = null; + lblFileName.Text = null; + } + + /// + /// Sets the sort button classes. + /// + private void SetSortButtonClasses() + { + SortAscending.CssClass = !SortFilesAscending ? "ButtonNormal" : "ButtonSelected"; + SortDescending.CssClass = !SortFilesDescending ? "ButtonNormal" : "ButtonSelected"; + SortByDateAscending.CssClass = !SortFilesDateAscending ? "ButtonNormal" : "ButtonSelected"; + SortByDateDescending.CssClass = !SortFilesDateDescending ? "ButtonNormal" : "ButtonSelected"; + } + + /// + /// Raises the event to initialize the page. + /// + /// An that contains the event data. + protected override void OnInit(EventArgs e) + { + // CODEGEN: This call is required by the ASP.NET Web Form Designer. + InitializeComponent(); + base.OnInit(e); + } + + /// + /// Handles the Load event of the Page control. + /// + /// The source of the event. + /// The instance containing the event data. + protected void Page_Load(object sender, EventArgs e) + { + JavaScript.RequestRegistration(CommonJs.jQuery); + + SetSortButtonClasses(); + + extensionWhiteList = Host.AllowedExtensionWhitelist; + + if (!string.IsNullOrEmpty(request.QueryString["mode"])) + { + currentSettings.SettingMode = + (SettingsMode)Enum.Parse(typeof(SettingsMode), request.QueryString["mode"]); + } + + ProviderConfiguration providerConfiguration = ProviderConfiguration.GetProviderConfiguration("htmlEditor"); + Provider objProvider = (Provider)providerConfiguration.Providers[providerConfiguration.DefaultProvider]; + + var settingsDictionary = EditorController.GetEditorHostSettings(); + + var portalRoles = RoleController.Instance.GetRoles(_portalSettings.PortalId); + + switch (currentSettings.SettingMode) + { + case SettingsMode.Default: + // Load Default Settings + currentSettings = SettingsUtil.GetDefaultSettings( + _portalSettings, + _portalSettings.HomeDirectoryMapPath, + objProvider.Attributes["ck_configFolder"], + portalRoles); + break; + case SettingsMode.Host: + currentSettings = SettingsUtil.LoadEditorSettingsByKey( + _portalSettings, + currentSettings, + settingsDictionary, + "DNNCKH#", + portalRoles); + break; + case SettingsMode.Portal: + currentSettings = SettingsUtil.LoadEditorSettingsByKey( + _portalSettings, + currentSettings, + settingsDictionary, + $"DNNCKP#{request.QueryString["PortalID"]}#", + portalRoles); + break; + case SettingsMode.Page: + currentSettings = SettingsUtil.LoadEditorSettingsByKey( + _portalSettings, + currentSettings, + settingsDictionary, + $"DNNCKT#{request.QueryString["tabid"]}#", + portalRoles); + break; + case SettingsMode.ModuleInstance: + currentSettings = SettingsUtil.LoadModuleSettings( + _portalSettings, + currentSettings, + $"DNNCKMI#{request.QueryString["mid"]}#INS#{request.QueryString["ckId"]}#", + int.Parse(request.QueryString["mid"]), + portalRoles); + break; + } + + // set current Upload file size limit + currentSettings.UploadFileSizeLimit = SettingsUtil.GetCurrentUserUploadSize( + currentSettings, + _portalSettings, + HttpContext.Current.Request); + + if (currentSettings.BrowserMode.Equals(BrowserType.StandardBrowser) + && HttpContext.Current.Request.IsAuthenticated) + { + string command = null; + + try + { + if (request.QueryString["Command"] != null) + { + command = request.QueryString["Command"]; + } + } + catch (Exception) + { + command = null; + } + + try + { + if (request.QueryString["Type"] != null) + { + browserModus = request.QueryString["Type"]; + var browserModusText = Localization.GetString("lblBrowserModus.Text", ResXFile, LanguageCode); + var browserModusTypeKey = string.Format("BrowserModus.{0}.Text", browserModus); + var browserModusTypeText = Localization.GetString(browserModusTypeKey, ResXFile, LanguageCode); + lblModus.Text = string.Format(browserModusText, browserModusTypeText); + + if (!IsPostBack) + { + AcceptFileTypes = GetAcceptedFileTypes(); + + title.InnerText = string.Format("{0} - DNNConnect.CKEditorProvider.FileBrowser", lblModus.Text); + + AnchorList.Visible = currentSettings.UseAnchorSelector; + LabelAnchor.Visible = currentSettings.UseAnchorSelector; + + ListViewState.Value = currentSettings.FileListViewMode.ToString(); + + // Set default link mode + switch (currentSettings.DefaultLinkMode) + { + case LinkMode.RelativeURL: + rblLinkType.SelectedValue = "relLink"; + break; + case LinkMode.AbsoluteURL: + rblLinkType.SelectedValue = "absLnk"; + break; + } + + switch (browserModus) + { + case "Link": + BrowserMode.Visible = true; + + if (currentSettings.ShowPageLinksTabFirst) + { + BrowserMode.SelectedValue = "page"; + panLinkMode.Visible = false; + panPageMode.Visible = true; + + lblModus.Text = string.Format( + "Browser-Modus: {0}", + string.Format("Page {0}", browserModus)); + title.InnerText = string.Format( + "{0} - DNNConnect.CKEditorProvider.FileBrowser", + lblModus.Text); + + RenderTabs(); + } + else + { + BrowserMode.SelectedValue = "file"; + panPageMode.Visible = false; + } + + break; + case "Image": + BrowserMode.Visible = false; + panPageMode.Visible = false; + break; + case "Flash": + BrowserMode.Visible = false; + panPageMode.Visible = false; + break; + default: + BrowserMode.Visible = false; + panPageMode.Visible = false; + break; + } + } + } + } + catch (Exception) + { + browserModus = null; + } + + if (command != null) + { + if (!command.Equals("FileUpload") && !command.Equals("FlashUpload") + && !command.Equals("ImageUpload")) + { + return; + } + + var uploadedFile = + HttpContext.Current.Request.Files[HttpContext.Current.Request.Files.AllKeys[0]]; + + if (uploadedFile != null) + { + UploadFile(uploadedFile, command); + } + } + else + { + if (!IsPostBack) + { + OverrideFile.Checked = currentSettings.OverrideFileOnUpload; + + SetLanguage(); + + GetLanguageList(); + + var startFolder = StartingDir(); + + FillFolderTree(startFolder); + + bool folderSelected = false; + + if (!string.IsNullOrEmpty(ckFileUrl)) + { + try + { + folderSelected = SelectFolderFile(ckFileUrl); + ckFileUrl = null; + } + catch (Exception) + { + folderSelected = false; + ckFileUrl = null; + } + } + + if (!folderSelected) + { + var folderName = !string.IsNullOrEmpty(startFolder.FolderPath) ? + startFolder.FolderPath : Localization.GetString("RootFolder.Text", ResXFile, LanguageCode); + lblCurrentDir.Text = folderName; + + ShowFilesIn(startFolder); + } + } + + FillQualityPrecentages(); + } + } + else + { + var errorScript = string.Format( + "javascript:alert('{0}');self.close();", + Localization.GetString("Error1.Text", ResXFile, LanguageCode)); + + Response.Write(""); + + Response.End(); + } + } + + /// + /// Show Create New Folder Panel + /// + /// The source of the event. + /// The instance containing the event data. + protected void Create_Click(object sender, EventArgs e) + { + panCreate.Visible = true; + + if (panUploadDiv.Visible) + { + panUploadDiv.Visible = false; + } + + if (panThumb.Visible) + { + panThumb.Visible = false; + } + } + + /// + /// Synchronize Current Folder With the Database + /// + /// The source of the event. + /// The instance containing the event data. + protected void Syncronize_Click(object sender, EventArgs e) + { + var currentFolderInfo = GetCurrentFolder(); + + FolderManager.Instance.Synchronize(_portalSettings.PortalId, currentFolderInfo.FolderPath, false, true); + + // Reload Folder + ShowFilesIn(GetCurrentFolder()); + } + + /// + /// Delete Selected File + /// + /// The source of the event. + /// The instance containing the event data. + protected void Delete_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(FileId.Text)) + { + return; + } + + var deleteFile = FileManager.Instance.GetFile(int.Parse(FileId.Text)); + + var thumbFolder = Path.Combine(GetCurrentFolder().PhysicalPath, "_thumbs"); + + var thumbPath = + Path.Combine(thumbFolder, lblFileName.Text).Replace( + lblFileName.Text.Substring(lblFileName.Text.LastIndexOf(".", StringComparison.Ordinal)), ".png"); + + try + { + FileManager.Instance.DeleteFile(deleteFile); + + // Also Delete Thumbnail?); + if (File.Exists(thumbPath)) + { + File.Delete(thumbPath); + } + } + catch (Exception exception) + { + Response.Write(""); + } + finally + { + ShowFilesIn(GetCurrentFolder()); + + SetDefaultLinkTypeText(); + + FileId.Text = null; + lblFileName.Text = null; + } + } + + /// + /// Download selected File + /// + /// + /// The sender. + /// + /// + /// The EventArgs e. + /// + protected void Download_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(FileId.Text)) + { + return; + } + + var downloadFile = FileManager.Instance.GetFile(int.Parse(FileId.Text)); + + FileManager.Instance.WriteFileToResponse(downloadFile, ContentDisposition.Attachment); + } + + /// + /// Opens the Re-sizing Panel + /// + /// The source of the event. + /// The instance containing the event data. + protected void Resizer_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(lblFileName.Text)) + { + return; + } + + // Hide Link Panel and show Image Editor + panThumb.Visible = true; + panImagePreview.Visible = true; + panImageEdHead.Visible = true; + + imgOriginal.Visible = true; + + cmdRotate.Visible = true; + cmdCrop.Visible = true; + cmdZoom.Visible = true; + cmdResize2.Visible = false; + + panLinkMode.Visible = false; + BrowserMode.Visible = false; + + lblResizeHeader.Text = Localization.GetString("lblResizeHeader.Text", ResXFile, LanguageCode); + title.InnerText = string.Format("{0} - DNNConnect.CKEditorProvider.FileBrowser", lblResizeHeader.Text); + + // Hide all Unwanted Elements from the Image Editor + cmdClose.Visible = false; + panInfo.Visible = false; + + panImageEditor.Visible = false; + lblCropInfo.Visible = false; + + var fileInfo = FileManager.Instance.GetFile(GetCurrentFolder(), lblFileName.Text); + string sFilePath = FileManager.Instance.GetUrl(fileInfo); + + string sFileNameNoExt = Path.GetFileNameWithoutExtension(fileInfo.FileName); + + txtThumbName.Text = string.Format("{0}_resized", sFileNameNoExt); + + if (!AllowedImageExtensions.Contains(fileInfo.Extension)) + { + return; + } + + var fs = FileManager.Instance.GetFileContent(fileInfo); + + Image image = Image.FromStream(fs); + + StringBuilder sbScript1 = new StringBuilder(); + + // Show Preview Images + imgOriginal.ImageUrl = sFilePath; + imgResized.ImageUrl = sFilePath; + + int w = image.Width; + int h = image.Height; + + int longestDimension = (w > h) ? w : h; + int shortestDimension = (w < h) ? w : h; + + float factor = ((float)longestDimension) / shortestDimension; + + double newWidth = 400; + double newHeight = 300 / factor; + + if (w < h) + { + newWidth = 400 / factor; + newHeight = 300; + } + + if (newWidth > image.Width) + { + newWidth = image.Width; + } + + if (newHeight > image.Height) + { + newHeight = image.Height; + } + + int iDefaultWidth, iDefaultHeight; + + if (currentSettings.ResizeWidth > 0) + { + iDefaultWidth = currentSettings.ResizeWidth; + + // Check if Default Value is greater the Image Value + if (iDefaultWidth > image.Width) + { + iDefaultWidth = image.Width; + } + } + else + { + iDefaultWidth = (int)newWidth; + } + + if (currentSettings.ResizeHeight > 0) + { + iDefaultHeight = currentSettings.ResizeHeight; + + // Check if Default Value is greater the Image Value + if (iDefaultHeight > image.Height) + { + iDefaultHeight = image.Height; + } + } + else + { + iDefaultHeight = (int)newHeight; + } + + txtHeight.Text = iDefaultHeight.ToString(); + txtWidth.Text = iDefaultWidth.ToString(); + + imgOriginal.Height = (int)newHeight; + imgOriginal.Width = (int)newWidth; + + imgResized.Height = iDefaultHeight; + imgResized.Width = iDefaultWidth; + + imgOriginal.ToolTip = Localization.GetString("imgOriginal.Text", ResXFile, LanguageCode); + imgOriginal.AlternateText = imgOriginal.ToolTip; + + imgResized.ToolTip = Localization.GetString("imgResized.Text", ResXFile, LanguageCode); + imgResized.AlternateText = imgResized.ToolTip; + + sbScript1.Append("ResizeMe('#imgResized', 360, 300);"); + + ////////////// + sbScript1.AppendFormat( + "SetupSlider('#SliderWidth', 1, {0}, 1, 'horizontal', {1}, '#txtWidth');", image.Width, iDefaultWidth); + sbScript1.AppendFormat( + "SetupSlider('#SliderHeight', 1, {0}, 1, 'vertical', {1}, '#txtHeight');", image.Height, iDefaultHeight); + + Page.ClientScript.RegisterStartupScript(GetType(), "SliderScript", sbScript1.ToString(), true); + + image.Dispose(); + } + + /// + /// Show Upload Controls + /// + /// + /// The sender. + /// + /// + /// The e. + /// + protected void Upload_Click(object sender, EventArgs e) + { + panUploadDiv.Visible = true; + + if (panCreate.Visible) + { + panCreate.Visible = false; + } + + if (panThumb.Visible) + { + panThumb.Visible = false; + } + } + + /// + /// Formats a MapPath into relative MapUrl + /// + /// + /// MapPath Input string + /// + /// + /// The output URL string + /// + private static string MapUrl(string sPath) + { + string sAppPath = HttpContext.Current.Server.MapPath("~"); + + string sUrl = string.Format( + "{0}", + HttpContext.Current.Request.ApplicationPath + sPath.Replace(sAppPath, string.Empty).Replace("\\", "/")); + + return sUrl; + } + + /// + /// Get File Name without .resources extension + /// + /// File Name + /// Cleaned File Name + private static string GetFileNameCleaned(string fileName) + { + return fileName.Replace(".resources", string.Empty); + } + + /// + /// The get encoder. + /// + /// + /// The format. + /// + /// + /// The Encoder + /// + private static ImageCodecInfo GetEncoder(ImageFormat format) + { + ImageCodecInfo[] codecs = ImageCodecInfo.GetImageDecoders(); + + return codecs.FirstOrDefault(codec => codec.FormatID == format.Guid); + } + + /// + /// Get Folder Icon. + /// + /// The folder id. + /// + /// Returns if folder is Secure + /// + private string GetFolderIcon(int folderId) + { + var folderInfo = FolderManager.Instance.GetFolder(folderId); + return GetFolderIcon(folderInfo); + } + + /// + /// Get Folder Icon. + /// + /// The folder info. + private string GetFolderIcon(IFolderInfo folderInfo) + { + if (folderInfo == null || string.IsNullOrEmpty(folderInfo.FolderPath)) + { + return "Images/folder.gif"; + } + + switch (folderInfo.StorageLocation) + { + case (int)FolderController.StorageLocationTypes.InsecureFileSystem: + return "Images/folder.gif"; + case (int)FolderController.StorageLocationTypes.SecureFileSystem: + return "Images/folderLocked.gif"; + case (int)FolderController.StorageLocationTypes.DatabaseSecure: + return "Images/folderdb.gif"; + default: + var folderMapping = FolderMappingController.Instance.GetFolderMapping(folderInfo.PortalID, folderInfo.FolderMappingID); + if (folderMapping != null) + { + return folderMapping.ImageUrl; + } + + return "Images/folder.gif"; + } + } + + /// + /// Hide Create Items if User has no write access to the Current Folder + /// + /// The folder id to check + /// if set to true [is file selected]. + private void CheckFolderAccess(int folderId, bool isFileSelected) + { + var hasWriteAccess = Utility.CheckIfUserHasFolderWriteAccess(folderId, _portalSettings); + + cmdUpload.Enabled = hasWriteAccess; + cmdCreate.Enabled = hasWriteAccess; + Syncronize.Enabled = hasWriteAccess; + cmdDelete.Enabled = hasWriteAccess && isFileSelected; + cmdResizer.Enabled = hasWriteAccess && isFileSelected; + cmdDownload.Enabled = isFileSelected; + + cmdUpload.CssClass = hasWriteAccess ? "LinkNormal" : "LinkDisabled"; + cmdCreate.CssClass = hasWriteAccess ? "LinkNormal" : "LinkDisabled"; + Syncronize.CssClass = hasWriteAccess ? "LinkNormal" : "LinkDisabled"; + cmdDelete.CssClass = hasWriteAccess && isFileSelected ? "LinkNormal" : "LinkDisabled"; + cmdResizer.CssClass = hasWriteAccess && isFileSelected ? "LinkNormal" : "LinkDisabled"; + cmdDownload.CssClass = isFileSelected ? "LinkNormal" : "LinkDisabled"; + } + + /// + /// Set Folder Permission + /// + /// The Folder Id. + private void SetFolderPermission(int folderId) + { + var folder = FolderManager.Instance.GetFolder(folderId); + + SetFolderPermission(folder); + } + + /// + /// Set Folder Permission + /// + /// The folder info. + private void SetFolderPermission(IFolderInfo folderInfo) + { + FolderManager.Instance.CopyParentFolderPermissions(folderInfo); + } + + /// + /// Set Folder Permission for the Current User + /// + /// The folder info. + /// The current user info. + private void SetUserFolderPermission(IFolderInfo folderInfo, UserInfo currentUserInfo) + { + if (FolderPermissionController.CanManageFolder((FolderInfo)folderInfo)) + { + return; + } + + foreach ( + var folderPermission in from PermissionInfo permission in PermissionController.GetPermissionsByFolder() + where + permission.PermissionKey.ToUpper() == "READ" + || permission.PermissionKey.ToUpper() == "WRITE" + || permission.PermissionKey.ToUpper() == "BROWSE" + select + new FolderPermissionInfo(permission) + { + FolderID = folderInfo.FolderID, + UserID = currentUserInfo.UserID, + RoleID = Convert.ToInt32(Globals.glbRoleNothing), + AllowAccess = true + }) + { + folderInfo.FolderPermissions.Add(folderPermission, true); + } + + FolderPermissionController.SaveFolderPermissions((FolderInfo)folderInfo); + } + + /// + /// Sets the default link type text. + /// + private void SetDefaultLinkTypeText() + { + rblLinkType.Items[0].Text = Localization.GetString("relLnk.Text", ResXFile, LanguageCode); + rblLinkType.Items[1].Text = Localization.GetString("absLnk.Text", ResXFile, LanguageCode); + } + + /// + /// Fill the Folder TreeView with all (Sub)Directories + /// + /// The current folder information. + private void FillFolderTree(IFolderInfo currentFolderInfo) + { + FoldersTree.Nodes.Clear(); + + var folderName = !string.IsNullOrEmpty(currentFolderInfo.FolderPath) ? + currentFolderInfo.FolderPath : Localization.GetString("RootFolder.Text", ResXFile, LanguageCode); + + TreeNode folderNode = new TreeNode + { + Text = folderName, + Value = currentFolderInfo.FolderID.ToString(), + ImageUrl = GetFolderIcon(currentFolderInfo) + //ExpandedImageUrl = "Images/folderOpen.gif" + }; + + FoldersTree.Nodes.Add(folderNode); + + // gets the list of folders the specified user has read permissions and transfrom into dictionary: + // Key = parrent folder id + // Value = list of child folders + // this will let us possible to create folders tree much faster on a recursion below + var readableFolders = FolderManager.Instance.GetFolders(UserController.Instance.GetCurrentUserInfo()) + .GroupBy(folder => folder.ParentID) + .ToDictionary(key => key.Key, value => value?.Select(folder => folder) ?? Enumerable.Empty()); + + // get all folders where parrent folder is current one + if (!readableFolders.TryGetValue(currentFolderInfo.FolderID, out IEnumerable folders)) + { + return; + } + + foreach (TreeNode node in + folders.Cast().Select(folder => RenderFolder(folder, readableFolders)).Where(node => node != null)) + { + folderNode.ChildNodes.Add(node); + } + } + + /// + /// Fill Quality Values 1-100 % + /// + private void FillQualityPrecentages() + { + for (int i = 00; i < 101; i++) + { + dDlQuality.Items.Add(new ListItem { Text = i.ToString(), Value = i.ToString() }); + } + + dDlQuality.Items[100].Selected = true; + } + + /// + /// The get portal settings. + /// + /// + /// Current Portal Settings + /// + private PortalSettings GetPortalSettings() + { + int iTabId = 0, iPortalId = 0; + + PortalSettings portalSettings; + + try + { + if (request.QueryString["tabid"] != null) + { + iTabId = int.Parse(request.QueryString["tabid"]); + } + + if (request.QueryString["PortalID"] != null) + { + iPortalId = int.Parse(request.QueryString["PortalID"]); + } + + string sDomainName = Globals.GetDomainName(Request, true); + + string sPortalAlias = PortalAliasController.GetPortalAliasByPortal(iPortalId, sDomainName); + + PortalAliasInfo objPortalAliasInfo = PortalAliasController.Instance.GetPortalAlias(sPortalAlias); + + portalSettings = new PortalSettings(iTabId, objPortalAliasInfo); + } + catch (Exception) + { + portalSettings = (PortalSettings)HttpContext.Current.Items["PortalSettings"]; + } + + return portalSettings; + } + + /// + /// Get the Current Starting Directory + /// + /// + /// Returns the Starting Directory. + /// + private IFolderInfo StartingDir() + { + IFolderInfo startingFolderInfo = null; + + if (!currentSettings.BrowserRootDirId.Equals(-1)) + { + // var rootFolder = new FolderController().GetFolderInfo(this._portalSettings.PortalId, this.currentSettings.BrowserRootDirId); + var rootFolder = FolderManager.Instance.GetFolder(currentSettings.BrowserRootDirId); + + if (rootFolder != null) + { + startingFolderInfo = rootFolder; + } + } + else + { + startingFolderInfo = FolderManager.Instance.GetFolder(_portalSettings.PortalId, string.Empty); + } + + if (Utility.IsInRoles(_portalSettings.AdministratorRoleName, _portalSettings)) + { + return startingFolderInfo; + } + + if (currentSettings.SubDirs) + { + startingFolderInfo = GetUserFolderInfo(startingFolderInfo.PhysicalPath); + } + else + { + return startingFolderInfo; + } + + if (Directory.Exists(startingFolderInfo.PhysicalPath)) + { + return startingFolderInfo; + } + + var folderStart = startingFolderInfo.PhysicalPath; + + folderStart = + folderStart.Substring(_portalSettings.HomeDirectoryMapPath.Length).Replace( + "\\", "/"); + + startingFolderInfo = FolderManager.Instance.AddFolder(_portalSettings.PortalId, folderStart); + + Directory.CreateDirectory(startingFolderInfo.PhysicalPath); + + SetFolderPermission(startingFolderInfo); + + return startingFolderInfo; + } + + /// + /// Gets the user folder Info. + /// + /// The Starting Directory. + /// Returns the user folder path + private IFolderInfo GetUserFolderInfo(string startingDir) + { + IFolderInfo userFolderInfo; + + var userFolderPath = Path.Combine(startingDir, "userfiles"); + + // Create "userfiles" folder if not exists + if (!Directory.Exists(userFolderPath)) + { + var folderStart = userFolderPath; + + folderStart = folderStart.Substring(_portalSettings.HomeDirectoryMapPath.Length).Replace("\\", "/"); + + userFolderInfo = FolderManager.Instance.AddFolder(_portalSettings.PortalId, folderStart); + + Directory.CreateDirectory(userFolderPath); + + SetFolderPermission(userFolderInfo); + } + + // Create user folder based on the user id + userFolderPath = Path.Combine( + userFolderPath, + string.Format("{0}\\", UserController.Instance.GetCurrentUserInfo().UserID)); + + if (!Directory.Exists(userFolderPath)) + { + var folderStart = userFolderPath; + + folderStart = folderStart.Substring(_portalSettings.HomeDirectoryMapPath.Length).Replace("\\", "/"); + + userFolderInfo = FolderManager.Instance.AddFolder(_portalSettings.PortalId, folderStart); + + Directory.CreateDirectory(userFolderPath); + + SetFolderPermission(userFolderInfo); + + SetUserFolderPermission(userFolderInfo, UserController.Instance.GetCurrentUserInfo()); + } + else + { + userFolderInfo = Utility.ConvertFilePathToFolderInfo(userFolderPath, _portalSettings); + + // make sure the user has the correct permissions set + SetUserFolderPermission(userFolderInfo, UserController.Instance.GetCurrentUserInfo()); + } + + return userFolderInfo; + } + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + _portalSettings = GetPortalSettings(); + + cmdCancel.Click += Cancel_Click; + cmdUploadNow.Click += UploadNow_Click; + cmdUploadCancel.Click += UploadCancel_Click; + cmdCreateFolder.Click += CreateFolder_Click; + cmdCreateCancel.Click += CreateCancel_Click; + cmdResizeCancel.Click += ResizeCancel_Click; + cmdResizeNow.Click += ResizeNow_Click; + cmdRotate.Click += Rotate_Click; + cmdCrop.Click += Rotate_Click; + cmdZoom.Click += Rotate_Click; + cmdResize2.Click += Resizer_Click; + cmdCropCancel.Click += ResizeCancel_Click; + cmdCropNow.Click += CropNow_Click; + + BrowserMode.SelectedIndexChanged += BrowserMode_SelectedIndexChanged; + dnntreeTabs.SelectedNodeChanged += TreeTabs_NodeClick; + + // this.FoldersTree.SelectedNodeChanged += new EventHandler(FoldersTree_SelectedNodeChanged); + FoldersTree.SelectedNodeChanged += FoldersTree_NodeClick; + + FilesList.ItemCommand += FilesList_ItemCommand; + } + + /// + /// Load Favicon from Current Portal Home Directory + /// + private void LoadFavIcon() + { + if (!File.Exists(Path.Combine(_portalSettings.HomeDirectoryMapPath, "favicon.ico"))) + { + return; + } + + var faviconUrl = Path.Combine(_portalSettings.HomeDirectory, "favicon.ico"); + + var objLink = new HtmlGenericSelfClosing("link"); + + objLink.Attributes["rel"] = "shortcut icon"; + objLink.Attributes["href"] = faviconUrl; + + favicon.Controls.Add(objLink); + } + + /// + /// Render all Directories and sub directories recursive + /// + /// The folder Info. + /// The list of folders that the current user has READ access + /// + /// TreeNode List + /// + private TreeNode RenderFolder(FolderInfo folderInfo, IDictionary> readableFolders) + { + TreeNode tnFolder = new TreeNode + { + Text = folderInfo.FolderName, + Value = folderInfo.FolderID.ToString(), + ImageUrl = GetFolderIcon(folderInfo) + }; + + if (!readableFolders.TryGetValue(folderInfo.FolderID, out IEnumerable folders)) + { + return tnFolder; + } + + foreach (TreeNode node in + folders.Cast().Select(folder => RenderFolder(folder, readableFolders)).Where(node => node != null)) + { + tnFolder.ChildNodes.Add(node); + } + + return tnFolder; + } + + /// + /// Gets the language list, and sets the default locale if Content Localization is Enabled + /// + private void GetLanguageList() + { + foreach ( + var languageListItem in + new LocaleController().GetLocales(_portalSettings.PortalId) + .Values.Select( + language => new ListItem { Text = language.Text, Value = language.Code })) + { + LanguageList.Items.Add(languageListItem); + } + + if (LanguageList.Items.Count.Equals(1)) + { + LanguageRow.Visible = false; + } + else + { + // Set default locale and remove no locale if Content Localization is Enabled + if (!_portalSettings.ContentLocalizationEnabled) + { + return; + } + + var currentTab = new TabController().GetTab( + int.Parse(request.QueryString["tabid"]), _portalSettings.PortalId, false); + + if (currentTab == null || string.IsNullOrEmpty(currentTab.CultureCode)) + { + return; + } + + LanguageList.Items.RemoveAt(0); + + var currentTabCultureItem = LanguageList.Items.FindByValue(currentTab.CultureCode); + + if (currentTabCultureItem != null) + { + currentTabCultureItem.Selected = true; + } + } + } + + /// + /// Load the Portal Tabs for the Page Links TreeView Selector + /// + private void RenderTabs() + { + if (dnntreeTabs.Nodes.Count > 0) + { + return; + } + + var allPortalTabsList = TabController.GetPortalTabs(this._portalSettings.PortalId, -1, false, null, true, false, true, true, false); + var allPortalTabs = new HashSet(allPortalTabsList); + + Func getNodeId = x => x.TabID; + Func getParentId = x => x.ParentId; + Func getNodeText = x => x.TabName; + Func getNodeValue = x => x.TabID.ToString(); + Func getParentIdCheck = x => x != -1; + Func getNodeImageURL = x => + string.IsNullOrWhiteSpace(x.IconFile) + ? "Images/Page.gif" + : this.ResolveUrl(x.IconFile); + + TreeViewHelper tvh = new TreeViewHelper(); + tvh.LoadNodes(allPortalTabs, dnntreeTabs.Nodes, getNodeId, getParentId, getNodeText, getNodeValue, getNodeImageURL, getParentIdCheck); + } + + /// + /// Scroll to a Selected File or Uploaded File + /// + /// + /// The element Id. + /// + private void ScrollToSelectedFile(string elementId) + { + StringBuilder sbScript1 = new StringBuilder(); + + sbScript1.AppendFormat("document.getElementById('{0}').scrollIntoView();", elementId); + + Page.ClientScript.RegisterStartupScript( + GetType(), string.Format("ScrollToSelected{0}", Guid.NewGuid()), sbScript1.ToString(), true); + } + + /// + /// Select a folder and the file inside the Browser + /// + /// + /// The file url. + /// + /// + /// if folder was selected + /// + private bool SelectFolderFile(string fileUrl) + { + var fileName = fileUrl.Substring(fileUrl.LastIndexOf("/", StringComparison.Ordinal) + 1); + + if (fileName.StartsWith("LinkClick") || + fileUrl.StartsWith("http:") || + fileUrl.StartsWith("https:") || + fileUrl.StartsWith("mailto:")) + { + ckFileUrl = null; + return false; + } + + var selectedDir = MapPath(fileUrl).Replace(fileName, string.Empty); + + if (!Directory.Exists(selectedDir)) + { + ckFileUrl = null; + return false; + } + + lblCurrentDir.Text = selectedDir; + + var newDir = lblCurrentDir.Text; + + TreeNode tnNewFolder = FoldersTree.FindNode(newDir); + + if (tnNewFolder != null) + { + tnNewFolder.Selected = true; + tnNewFolder.Expand(); + tnNewFolder.Expanded = true; + } + + ShowFilesIn(newDir); + + GoToSelectedFile(fileName); + + return true; + } + + /// + /// JS Code that gets the selected File Url + /// + private void GetSelectedImageOrLink() + { + var scriptSelected = new StringBuilder(); + + scriptSelected.Append("var editor = window.top.opener;"); + scriptSelected.Append("if (typeof(CKEDITOR) !== 'undefined') {"); + scriptSelected.AppendFormat( + "var selection = CKEDITOR.instances.{0}.getSelection(),", request.QueryString["CKEditor"]); + scriptSelected.Append("element = selection.getStartElement();"); + + scriptSelected.Append("if( element.getName() == 'img')"); + scriptSelected.Append("{"); + + scriptSelected.Append("var imageUrl = element.getAttribute('src');"); + + scriptSelected.Append("if (element.getAttribute('src') && imageUrl.indexOf('LinkClick') == -1 && imageUrl.indexOf('http:') == -1 && imageUrl.indexOf('https:') == -1) {"); + scriptSelected.Append( + "jQuery.PageMethod('Browser.aspx', 'SetFile', function(message){if (location.href.indexOf('reload')==-1) location.replace(location.href+'&reload=true');}, null, 'fileUrl', imageUrl);"); + + scriptSelected.Append("} else {"); + scriptSelected.Append("if (location.href.indexOf('reload')==-1) location.replace(location.href+'&reload=true');"); + + scriptSelected.Append("} }"); + scriptSelected.Append("else if (element.getName() == 'a')"); + scriptSelected.Append("{"); + + scriptSelected.Append("var fileUrl = element.getAttribute('href');"); + + scriptSelected.Append("if (element.getAttribute('href') && fileUrl.indexOf('LinkClick') == -1 && fileUrl.indexOf('http:') == -1 && fileUrl.indexOf('https:') == -1) {"); + + scriptSelected.Append( + "jQuery.PageMethod('Browser.aspx', 'SetFile', function(message){if (location.href.indexOf('reload')==-1) location.replace(location.href+'&reload=true');}, null, 'fileUrl', fileUrl);"); + scriptSelected.Append("} else {"); + scriptSelected.Append("if (location.href.indexOf('reload')==-1) location.replace(location.href+'&reload=true');"); + + scriptSelected.Append("} }"); + + scriptSelected.Append("}"); + + Page.ClientScript.RegisterStartupScript( + GetType(), "GetSelectedImageLink", scriptSelected.ToString(), true); + } + + /// + /// Set Language for all Controls on this Page + /// + private void SetLanguage() + { + // Buttons + cmdResizeCancel.Text = Localization.GetString("cmdResizeCancel.Text", ResXFile, LanguageCode); + cmdResizeNow.Text = Localization.GetString("cmdResizeNow.Text", ResXFile, LanguageCode); + cmdUploadCancel.Text = Localization.GetString("cmdUploadCancel.Text", ResXFile, LanguageCode); + cmdCancel.Text = Localization.GetString("cmdCancel.Text", ResXFile, LanguageCode); + cmdClose.Text = Localization.GetString("cmdClose.Text", ResXFile, LanguageCode); + cmdCreateFolder.Text = Localization.GetString("cmdCreateFolder.Text", ResXFile, LanguageCode); + cmdCreateCancel.Text = Localization.GetString("cmdCreateCancel.Text", ResXFile, LanguageCode); + cmdCrop.Text = Localization.GetString("cmdCrop.Text", ResXFile, LanguageCode); + cmdZoom.Text = Localization.GetString("cmdZoom.Text", ResXFile, LanguageCode); + cmdRotate.Text = Localization.GetString("cmdRotate.Text", ResXFile, LanguageCode); + cmdResize2.Text = Localization.GetString("cmdResize2.Text", ResXFile, LanguageCode); + cmdCropNow.Text = Localization.GetString("cmdCropNow.Text", ResXFile, LanguageCode); + cmdCropCancel.Text = Localization.GetString("cmdCropCancel.Text", ResXFile, LanguageCode); + + // Labels + lblConFiles.Text = Localization.GetString("lblConFiles.Text", ResXFile, LanguageCode); + lblCurrent.Text = Localization.GetString("lblCurrent.Text", ResXFile, LanguageCode); + lblSubDirs.Text = Localization.GetString("lblSubDirs.Text", ResXFile, LanguageCode); + lblUrlType.Text = Localization.GetString("lblUrlType.Text", ResXFile, LanguageCode); + rblLinkType.ToolTip = Localization.GetString("lblUrlType.Text", ResXFile, LanguageCode); + lblChoosetab.Text = Localization.GetString("lblChoosetab.Text", ResXFile, LanguageCode); + lblHeight.Text = Localization.GetString("lblHeight.Text", ResXFile, LanguageCode); + lblWidth.Text = Localization.GetString("lblWidth.Text", ResXFile, LanguageCode); + lblThumbName.Text = Localization.GetString("lblThumbName.Text", ResXFile, LanguageCode); + lblImgQuality.Text = Localization.GetString("lblImgQuality.Text", ResXFile, LanguageCode); + lblResizeHeader.Text = Localization.GetString("lblResizeHeader.Text", ResXFile, LanguageCode); + lblOtherTools.Text = Localization.GetString("lblOtherTools.Text", ResXFile, LanguageCode); + lblCropImageName.Text = Localization.GetString("lblThumbName.Text", ResXFile, LanguageCode); + lblCropInfo.Text = Localization.GetString("lblCropInfo.Text", ResXFile, LanguageCode); + lblShowPreview.Text = Localization.GetString("lblShowPreview.Text", ResXFile, LanguageCode); + lblClearPreview.Text = Localization.GetString("lblClearPreview.Text", ResXFile, LanguageCode); + lblOriginal.Text = Localization.GetString("lblOriginal.Text", ResXFile, LanguageCode); + lblPreview.Text = Localization.GetString("lblPreview.Text", ResXFile, LanguageCode); + lblNewFoldName.Text = Localization.GetString("lblNewFoldName.Text", ResXFile, LanguageCode); + LabelAnchor.Text = Localization.GetString("LabelAnchor.Text", ResXFile, LanguageCode); + NewFolderTitle.Text = Localization.GetString("cmdCreate.Text", ResXFile, LanguageCode); + UploadTitle.Text = Localization.GetString("cmdUpload.Text", ResXFile, LanguageCode); + AddFiles.Text = Localization.GetString("AddFiles.Text", ResXFile, LanguageCode); + Wait.Text = Localization.GetString("Wait.Text", ResXFile, LanguageCode); + WaitMessage.Text = Localization.GetString("WaitMessage.Text", ResXFile, LanguageCode); + ExtraTabOptions.Text = Localization.GetString("ExtraTabOptions.Text", ResXFile, LanguageCode); + LabelTabLanguage.Text = Localization.GetString("LabelTabLanguage.Text", ResXFile, LanguageCode); + + MaximumUploadSizeInfo.Text = + string.Format( + Localization.GetString("FileSizeRestriction", ResXFile, LanguageCode), + MaxUploadSize / (1024 * 1024), + AcceptFileTypes.Replace("|", ",")); + + // RadioButtonList + BrowserMode.Items[0].Text = Localization.GetString("FileLink.Text", ResXFile, LanguageCode); + BrowserMode.Items[1].Text = Localization.GetString("PageLink.Text", ResXFile, LanguageCode); + + // DropDowns + LanguageList.Items[0].Text = Localization.GetString("None.Text", ResXFile, LanguageCode); + AnchorList.Items[0].Text = Localization.GetString("None.Text", ResXFile, LanguageCode); + + // CheckBoxes + chkAspect.Text = Localization.GetString("chkAspect.Text", ResXFile, LanguageCode); + chkHumanFriendy.Text = Localization.GetString("chkHumanFriendy.Text", ResXFile, LanguageCode); + OverrideFile.Text = Localization.GetString("OverrideFile.Text", ResXFile, LanguageCode); + + // LinkButtons (with Image) + Syncronize.Text = string.Format( + "\"{0}\"", + Localization.GetString("Syncronize.Text", ResXFile, LanguageCode), + Localization.GetString("Syncronize.Help", ResXFile, LanguageCode)); + Syncronize.ToolTip = Localization.GetString("Syncronize.Help", ResXFile, LanguageCode); + + cmdCreate.Text = string.Format( + "\"{0}\"", + Localization.GetString("cmdCreate.Text", ResXFile, LanguageCode), + Localization.GetString("cmdCreate.Help", ResXFile, LanguageCode)); + cmdCreate.ToolTip = Localization.GetString("cmdCreate.Help", ResXFile, LanguageCode); + + cmdDownload.Text = + string.Format( + "\"{0}\"", + Localization.GetString("cmdDownload.Text", ResXFile, LanguageCode), + Localization.GetString("cmdDownload.Help", ResXFile, LanguageCode)); + cmdDownload.ToolTip = Localization.GetString("cmdDownload.Help", ResXFile, LanguageCode); + + cmdUpload.Text = string.Format( + "\"{0}\"", + Localization.GetString("cmdUpload.Text", ResXFile, LanguageCode), + Localization.GetString("cmdUpload.Help", ResXFile, LanguageCode)); + cmdUpload.ToolTip = Localization.GetString("cmdUpload.Help", ResXFile, LanguageCode); + + cmdDelete.Text = string.Format( + "\"{0}\"", + Localization.GetString("cmdDelete.Text", ResXFile, LanguageCode), + Localization.GetString("cmdDelete.Help", ResXFile, LanguageCode)); + cmdDelete.ToolTip = Localization.GetString("cmdDelete.Help", ResXFile, LanguageCode); + + cmdResizer.Text = string.Format( + "\"{0}\"", + Localization.GetString("cmdResizer.Text", ResXFile, LanguageCode), + Localization.GetString("cmdResizer.Help", ResXFile, LanguageCode)); + cmdResizer.ToolTip = Localization.GetString("cmdResizer.Help", ResXFile, LanguageCode); + + const string SwitchContent = + "\"{1}\"{1}"; + + SwitchDetailView.Text = string.Format( + SwitchContent, + "DetailView", + Localization.GetString("DetailView.Text", ResXFile, LanguageCode), + Localization.GetString("DetailViewTitle.Text", ResXFile, LanguageCode)); + SwitchDetailView.ToolTip = Localization.GetString("DetailViewTitle.Text", ResXFile, LanguageCode); + + SwitchListView.Text = string.Format( + SwitchContent, + "ListView", + Localization.GetString("ListView.Text", ResXFile, LanguageCode), + Localization.GetString("ListViewTitle.Text", ResXFile, LanguageCode)); + SwitchListView.ToolTip = Localization.GetString("ListViewTitle.Text", ResXFile, LanguageCode); + + SwitchIconsView.Text = string.Format( + SwitchContent, + "IconsView", + Localization.GetString("IconsView.Text", ResXFile, LanguageCode), + Localization.GetString("IconsViewTitle.Text", ResXFile, LanguageCode)); + SwitchIconsView.ToolTip = Localization.GetString("IconsViewTitle.Text", ResXFile, LanguageCode); + + SortAscending.Text = string.Format( + "\"{0}\"", + Localization.GetString("SortAscending.Text", ResXFile, LanguageCode), + Localization.GetString("SortAscending.Help", ResXFile, LanguageCode)); + SortAscending.ToolTip = Localization.GetString("SortAscending.Help", ResXFile, LanguageCode); + + SortDescending.Text = string.Format( + "\"{0}\"", + Localization.GetString("SortDescending.Text", ResXFile, LanguageCode), + Localization.GetString("SortDescending.Help", ResXFile, LanguageCode)); + SortDescending.ToolTip = Localization.GetString("SortDescending.Help", ResXFile, LanguageCode); + + SortByDateAscending.Text = string.Format( + "\"{0}\"{2}", + Localization.GetString("SortByDateAscending.Text", ResXFile, LanguageCode), + Localization.GetString("SortByDateAscending.Help", ResXFile, LanguageCode), + Localization.GetString("SortByDate.Text", ResXFile, LanguageCode)); + SortByDateAscending.ToolTip = Localization.GetString("SortByDateAscending.Help", ResXFile, LanguageCode); + + SortByDateDescending.Text = string.Format( + "\"{0}\"{2}", + Localization.GetString("SortByDateDescending.Text", ResXFile, LanguageCode), + Localization.GetString("SortByDateDescending.Help", ResXFile, LanguageCode), + Localization.GetString("SortByDate.Text", ResXFile, LanguageCode)); + SortByDateDescending.ToolTip = Localization.GetString("SortByDateDescending.Help", ResXFile, LanguageCode); + + ClientAPI.AddButtonConfirm(cmdDelete, Localization.GetString("AreYouSure.Text", ResXFile, LanguageCode)); + + SetDefaultLinkTypeText(); + } + + /// + /// Goes to selected file. + /// + /// Name of the file. + private void GoToSelectedFile(string fileName) + { + // Find the File inside the Repeater + foreach (RepeaterItem item in FilesList.Items) + { + HtmlGenericControl listRow = (HtmlGenericControl)item.FindControl("ListRow"); + + switch (item.ItemType) + { + case ListItemType.Item: + listRow.Attributes["class"] = "FilesListRow"; + break; + case ListItemType.AlternatingItem: + listRow.Attributes["class"] = "FilesListRowAlt"; + break; + } + + if (listRow.Attributes["title"] != fileName) + { + continue; + } + + listRow.Attributes["class"] += " Selected"; + + LinkButton fileListItem = (LinkButton)item.FindControl("FileListItem"); + + if (fileListItem == null) + { + return; + } + + int fileId = Convert.ToInt32(fileListItem.CommandArgument); + + var fileInfo = FileManager.Instance.GetFile(fileId); + + ShowFileHelpUrl(fileInfo.FileName, fileInfo); + + ScrollToSelectedFile(fileListItem.ClientID); + } + } + + /// + /// Show Preview for the URLs + /// + /// + /// Selected FileName + /// + /// + /// The file Info. + /// + private void ShowFileHelpUrl(string fileName, IFileInfo fileInfo) + { + try + { + SetDefaultLinkTypeText(); + + // Enable Buttons + CheckFolderAccess(fileInfo.FolderId, true); + + var folder = FolderManager.Instance.GetFolder(fileInfo.FolderId); + + rblLinkType.Items[0].Selected = true; + + var isAllowedExtension = AllowedImageExtensions.Contains(Path.GetExtension(fileName).TrimStart('.')); + + + cmdResizer.Enabled = cmdResizer.Enabled && isAllowedExtension; + cmdResizer.CssClass = cmdResizer.Enabled ? "LinkNormal" : "LinkDisabled"; + + FileId.Text = fileInfo.FileId.ToString(); + lblFileName.Text = fileName; + var providerFileUrl = FileManager.Instance.GetUrl(fileInfo); + + // Relative Url (Or provider default) + rblLinkType.Items[0].Text = Regex.Replace(rblLinkType.Items[0].Text, "/Images/MyImage.jpg", providerFileUrl, RegexOptions.IgnoreCase); + + // Absolute Url + rblLinkType.Items[1].Text = Regex.Replace(rblLinkType.Items[1].Text, "http://www.MyWebsite.com/Images/MyImage.jpg", BuildAbsoluteUrl(providerFileUrl), RegexOptions.IgnoreCase); + } + catch (Exception) + { + SetDefaultLinkTypeText(); + } + } + + private string BuildAbsoluteUrl(string fileUrl) + { + if (fileUrl.StartsWith("http", StringComparison.InvariantCultureIgnoreCase)) + return fileUrl; + + return string.Format( + "{0}://{1}{2}", + HttpContext.Current.Request.Url.Scheme, + HttpContext.Current.Request.Url.Authority, + fileUrl); + } + + /// + /// Shows the files in directory. + /// + /// The directory. + /// if set to true [pager changed]. + protected void ShowFilesIn(string directory, bool pagerChanged = false) + { + var currentFolderInfo = Utility.ConvertFilePathToFolderInfo(directory, _portalSettings); + + ShowFilesIn(currentFolderInfo, pagerChanged); + } + + /// + /// Shows the files in directory. + /// + /// The current folder information. + /// if set to true [pager changed]. + private void ShowFilesIn(IFolderInfo currentFolderInfo, bool pagerChanged = false) + { + CheckFolderAccess(currentFolderInfo.FolderID, false); + + if (!pagerChanged) + { + FilesTable = GetFiles(currentFolderInfo); + + GetDiskSpaceUsed(); + } + else + { + if (FilesTable == null) + { + FilesTable = GetFiles(currentFolderInfo); + } + } + + var filesPagedDataSource = new PagedDataSource { DataSource = FilesTable.DefaultView }; + + if (currentSettings.FileListPageSize > 0) + { + filesPagedDataSource.AllowPaging = true; + filesPagedDataSource.PageSize = currentSettings.FileListPageSize; + filesPagedDataSource.CurrentPageIndex = pagerChanged ? PagerFileLinks.CurrentPageIndex : 0; + } + + PagerFileLinks.PageCount = filesPagedDataSource.PageCount; + PagerFileLinks.RessourceFile = ResXFile; + PagerFileLinks.LanguageCode = LanguageCode; + + PagerFileLinks.Visible = filesPagedDataSource.PageCount > 1; + + // this.FilesList.DataSource = this.GetFiles(directory); + FilesList.DataSource = filesPagedDataSource; + FilesList.DataBind(); + } + + /// + /// Uploads a File + /// + /// + /// The Uploaded File + /// + /// + /// The Upload Command Type + /// + private void UploadFile(HttpPostedFile file, string command) + { + var fileName = Path.GetFileName(file.FileName).Trim(); + + if (!string.IsNullOrEmpty(fileName)) + { + // Replace dots in the name with underscores (only one dot can be there... security issue). + fileName = Regex.Replace(fileName, @"\.(?![^.]*$)", "_", RegexOptions.None); + + // Check for Illegal Chars + if (Utility.ValidateFileName(fileName)) + { + fileName = Utility.CleanFileName(fileName); + } + + // Convert Unicode Chars + fileName = Utility.ConvertUnicodeChars(fileName); + } + else + { + return; + } + + // Check if file is to big for that user + if (currentSettings.UploadFileSizeLimit > 0 + && file.ContentLength > currentSettings.UploadFileSizeLimit) + { + Page.ClientScript.RegisterStartupScript( + GetType(), + "errorcloseScript", + string.Format( + "javascript:alert('{0}')", + Localization.GetString("FileToBigMessage.Text", ResXFile, LanguageCode)), + true); + + Response.End(); + + return; + } + + if (fileName.Length > 220) + { + fileName = fileName.Substring(fileName.Length - 220); + } + + string sExtension = Path.GetExtension(file.FileName); + sExtension = sExtension.TrimStart('.'); + + bool bAllowUpl = false; + + switch (command) + { + case "FlashUpload": + if (AllowedFlashExtensions.Contains(sExtension)) + { + bAllowUpl = true; + } + + break; + case "ImageUpload": + if (AllowedImageExtensions.Contains(sExtension)) + { + bAllowUpl = true; + } + + break; + case "FileUpload": + if (extensionWhiteList.IsAllowedExtension(sExtension)) + { + bAllowUpl = true; + } + + break; + } + + if (bAllowUpl) + { + string sFileNameNoExt = Path.GetFileNameWithoutExtension(fileName); + + int iCounter = 0; + + var uploadPhysicalPath = StartingDir().PhysicalPath; + + var currentFolderInfo = GetCurrentFolder(); + + if (!currentSettings.UploadDirId.Equals(-1) && !currentSettings.SubDirs) + { + var uploadFolder = FolderManager.Instance.GetFolder(currentSettings.UploadDirId); + + if (uploadFolder != null) + { + uploadPhysicalPath = uploadFolder.PhysicalPath; + + currentFolderInfo = uploadFolder; + } + } + + string sFilePath = Path.Combine(uploadPhysicalPath, fileName); + + if (File.Exists(sFilePath)) + { + iCounter++; + fileName = string.Format("{0}_{1}{2}", sFileNameNoExt, iCounter, Path.GetExtension(file.FileName)); + + FileManager.Instance.AddFile(currentFolderInfo, fileName, file.InputStream); + } + else + { + FileManager.Instance.AddFile(currentFolderInfo, fileName, file.InputStream); + } + + Response.Write(""); + Response.End(); + } + else + { + Page.ClientScript.RegisterStartupScript( + GetType(), + "errorcloseScript", + string.Format( + "javascript:alert('{0}')", + Localization.GetString("Error2.Text", ResXFile, LanguageCode)), + true); + + Response.End(); + } + } + + /// + /// Exit Dialog + /// + /// + /// The sender. + /// + /// + /// The e. + /// + private void Cancel_Click(object sender, EventArgs e) + { + Page.ClientScript.RegisterStartupScript( + GetType(), "closeScript", "javascript:self.close();", true); + } + + /// + /// Hide Create New Folder Panel + /// + /// + /// The sender. + /// + /// + /// The e. + /// + private void CreateCancel_Click(object sender, EventArgs e) + { + panCreate.Visible = false; + } + + /// + /// Create a New Sub Folder + /// + /// The source of the event. + /// The instance containing the event data. + private void CreateFolder_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(tbFolderName.Text)) + { + if (Utility.ValidatePath(tbFolderName.Text)) + { + tbFolderName.Text = Utility.CleanPath(tbFolderName.Text); + } + + tbFolderName.Text = Utility.CleanPath(tbFolderName.Text); + var newFolderId = Null.NullInteger; + + try + { + var portalId = _portalSettings.PortalId; + var currentFolder = GetCurrentFolder(); + var newFolderPath = string.Format("{0}{1}/", currentFolder.FolderPath, tbFolderName.Text); + + var folderMapping = FolderMappingController.Instance.GetFolderMapping(currentFolder.FolderMappingID); + + if (!FolderManager.Instance.FolderExists(portalId, newFolderPath)) + { + var newFolder = FolderManager.Instance.AddFolder(folderMapping, newFolderPath); + newFolderId = newFolder.FolderID; + SetFolderPermission(newFolder.FolderID); + lblCurrentDir.Text = newFolder.FolderPath; + } + } + catch (Exception exception) + { + Response.Write(""); + } + finally + { + FillFolderTree(StartingDir()); + + if (newFolderId > Null.NullInteger) + { + TreeNode tnNewFolder = FindNodeByValue(FoldersTree, newFolderId.ToString()); + + if (tnNewFolder != null) + { + tnNewFolder.Selected = true; + CurrentFolderId = newFolderId; + + var expandNode = tnNewFolder.Parent; + while (expandNode != null) + { + expandNode.Expand(); + expandNode = expandNode.Parent; + } + } + } + + ShowFilesIn(GetCurrentFolder()); + } + } + + panCreate.Visible = false; + } + + /// + /// Save the New Cropped Image + /// + /// The source of the event. + /// The instance containing the event data. + private void CropNow_Click(object sender, EventArgs e) + { + // Hide Image Editor Panels + panImagePreview.Visible = false; + panImageEdHead.Visible = false; + panImageEditor.Visible = false; + panThumb.Visible = false; + + // Show Link Panel + panLinkMode.Visible = true; + cmdClose.Visible = true; + panInfo.Visible = true; + + if (browserModus.Equals("Link")) + { + BrowserMode.Visible = true; + } + + title.InnerText = string.Format("{0} - DNNConnect.CKEditorProvider.FileBrowser", lblModus.Text); + + // Add new file to database + var currentFolderInfo = GetCurrentFolder(); + + FolderManager.Instance.Synchronize(_portalSettings.PortalId, currentFolderInfo.FolderPath, false, true); + + ShowFilesIn(GetCurrentFolder()); + + string sExtension = Path.GetExtension(lblFileName.Text); + + GoToSelectedFile(string.Format("{0}{1}", txtCropImageName.Text, sExtension)); + } + + /// + /// Hide Image Re-sizing Panel + /// + /// The source of the event. + /// The instance containing the event data. + private void ResizeCancel_Click(object sender, EventArgs e) + { + // Hide Image Editor Panels + panImagePreview.Visible = false; + panImageEdHead.Visible = false; + panImageEditor.Visible = false; + panThumb.Visible = false; + + // Show Link Panel + panLinkMode.Visible = true; + cmdClose.Visible = true; + panInfo.Visible = true; + title.InnerText = string.Format("{0} - DNNConnect.CKEditorProvider.FileBrowser", lblModus.Text); + + if (browserModus.Equals("Link")) + { + BrowserMode.Visible = true; + } + } + + /// + /// Resize Image based on User Input + /// + /// The source of the event. + /// The instance containing the event data. + private void ResizeNow_Click(object sender, EventArgs e) + { + var file = FileManager.Instance.GetFile(GetCurrentFolder(), lblFileName.Text); + string resizedFileName; + + using (var fileStream = FileManager.Instance.GetFileContent(file)) + { + var oldImage = Image.FromStream(fileStream); + int newWidth, newHeight; + + if (!int.TryParse(txtWidth.Text, out newWidth)) + { + newWidth = oldImage.Width; + } + + if (!int.TryParse(txtHeight.Text, out newHeight)) + { + newHeight = oldImage.Height; + } + + if (!string.IsNullOrEmpty(txtThumbName.Text)) + { + resizedFileName = $"{txtThumbName.Text}.{file.Extension}"; + } + else + { + resizedFileName = $"{Path.GetFileNameWithoutExtension(file.FileName)}_resized.{file.Extension}"; + } + + // Create an Resized Thumbnail + if (chkAspect.Checked) + { + var finalHeight = Math.Abs(oldImage.Height*newWidth/oldImage.Width); + + if (finalHeight > newHeight) + { + // Height resize if necessary + newWidth = oldImage.Width*newHeight/oldImage.Height; + finalHeight = newHeight; + } + + newHeight = finalHeight; + } + + var counter = 0; + while (FileManager.Instance.FileExists(GetCurrentFolder(), resizedFileName)) + { + counter++; + var fileNameWithoutExtension = Path.GetFileNameWithoutExtension(resizedFileName); + resizedFileName = $"{fileNameWithoutExtension}_{counter}.{file.Extension}"; + } + + // Add Compression to Jpeg Images + if (oldImage.RawFormat.Equals(ImageFormat.Jpeg)) + { + ImageCodecInfo jpgEncoder = GetEncoder(oldImage.RawFormat); + + Encoder myEncoder = Encoder.Quality; + EncoderParameters encodeParams = new EncoderParameters(1); + EncoderParameter encodeParam = new EncoderParameter(myEncoder, long.Parse(dDlQuality.SelectedValue)); + encodeParams.Param[0] = encodeParam; + + using (Bitmap dst = new Bitmap(newWidth, newHeight)) + { + using (Graphics g = Graphics.FromImage(dst)) + { + g.SmoothingMode = SmoothingMode.AntiAlias; + g.InterpolationMode = InterpolationMode.HighQualityBicubic; + g.DrawImage(oldImage, 0, 0, dst.Width, dst.Height); + } + + using (var stream = new MemoryStream()) + { + dst.Save(stream, jpgEncoder, encodeParams); + FileManager.Instance.AddFile(GetCurrentFolder(), resizedFileName, stream); + } + } + } + else + { + // Finally Create a new Resized Image + using (Image newImage = oldImage.GetThumbnailImage(newWidth, newHeight, null, IntPtr.Zero)) + { + var imageFormat = oldImage.RawFormat; + oldImage.Dispose(); + using (var stream = new MemoryStream()) + { + newImage.Save(stream, imageFormat); + FileManager.Instance.AddFile(GetCurrentFolder(), resizedFileName, stream); + } + } + } + } + + // Add new file to database + var currentFolderInfo = GetCurrentFolder(); + + FolderManager.Instance.Synchronize(_portalSettings.PortalId, currentFolderInfo.FolderPath, false, true); + + // Hide Image Editor Panels + panImagePreview.Visible = false; + panImageEdHead.Visible = false; + panImageEditor.Visible = false; + panThumb.Visible = false; + + // Show Link Panel + panLinkMode.Visible = true; + cmdClose.Visible = true; + panInfo.Visible = true; + title.InnerText = string.Format("{0} - DNNConnect.CKEditorProvider.FileBrowser", lblModus.Text); + + if (browserModus.Equals("Link")) + { + BrowserMode.Visible = true; + } + + ShowFilesIn(GetCurrentFolder()); + + GoToSelectedFile(resizedFileName); + } + + /// + /// Hide Resize Panel and Show CropZoom Panel + /// + /// + /// The sender. + /// + /// + /// The Event Args e. + /// + private void Rotate_Click(object sender, EventArgs e) + { + panThumb.Visible = false; + panImageEditor.Visible = true; + + imgOriginal.Visible = false; + + lblCropInfo.Visible = true; + + cmdRotate.Visible = false; + cmdCrop.Visible = false; + cmdZoom.Visible = false; + cmdResize2.Visible = true; + + lblResizeHeader.Text = Localization.GetString("lblResizeHeader2.Text", ResXFile, LanguageCode); + title.InnerText = string.Format("{0} - DNNConnect.CKEditorProvider.FileBrowser", lblResizeHeader.Text); + + var file = FileManager.Instance.GetFile(GetCurrentFolder(), lblFileName.Text); + string sFilePath = FileManager.Instance.GetUrl(file); + + string sFileNameNoExt = Path.GetFileNameWithoutExtension(file.FileName); + txtCropImageName.Text = string.Format("{0}_Crop", sFileNameNoExt); + + StringBuilder sbCropZoom = new StringBuilder(); + + sbCropZoom.Append("jQuery(document).ready(function () {"); + + sbCropZoom.Append("jQuery('#imgResized').hide();"); + + sbCropZoom.Append("var cropzoom = jQuery('#ImageOriginal').cropzoom({"); + sbCropZoom.Append("width: 400,"); + sbCropZoom.Append("height: 300,"); + sbCropZoom.Append("bgColor: '#CCC',"); + sbCropZoom.Append("enableRotation: true,"); + sbCropZoom.Append("enableZoom: true,"); + + sbCropZoom.Append("selector: {"); + + sbCropZoom.Append("w:100,"); + sbCropZoom.Append("h:80,"); + sbCropZoom.Append("showPositionsOnDrag: true,"); + sbCropZoom.Append("showDimetionsOnDrag: true,"); + sbCropZoom.Append("bgInfoLayer: '#FFF',"); + sbCropZoom.Append("infoFontSize: 10,"); + sbCropZoom.Append("infoFontColor: 'blue',"); + sbCropZoom.Append("showPositionsOnDrag: true,"); + sbCropZoom.Append("showDimetionsOnDrag: true,"); + sbCropZoom.Append("maxHeight: null,"); + sbCropZoom.Append("maxWidth: null,"); + sbCropZoom.Append("centered: true,"); + sbCropZoom.Append("borderColor: 'blue',"); + sbCropZoom.Append("borderColorHover: '#9eda29'"); + + sbCropZoom.Append("},"); + + sbCropZoom.Append("image: {"); + sbCropZoom.AppendFormat("source: '{0}',", sFilePath); + sbCropZoom.AppendFormat("width: {0},", file.Width); + sbCropZoom.AppendFormat("height: {0},", file.Height); + sbCropZoom.Append("minZoom: 10,"); + sbCropZoom.Append("maxZoom: 150"); + sbCropZoom.Append("}"); + sbCropZoom.Append("});"); + + // Preview Button + sbCropZoom.Append("jQuery('#PreviewCrop').click(function () {"); + + sbCropZoom.Append("jQuery('#lblCropInfo').hide();"); + sbCropZoom.Append( + "jQuery('#imgResized').attr('src', 'ProcessImage.ashx?fileId=" + file.FileId + "&' + cropzoom.PreviewParams()).show();"); + + sbCropZoom.Append("ResizeMe('#imgResized', 360, 300);"); + + sbCropZoom.Append("});"); + + // Reset Button + sbCropZoom.Append("jQuery('#ClearCrop').click(function(){"); + sbCropZoom.Append("jQuery('#imgResized').hide();"); + sbCropZoom.Append("jQuery('#lblCropInfo').show();"); + sbCropZoom.Append("cropzoom.restore();"); + sbCropZoom.Append("});"); + + // Save Button + sbCropZoom.Append("jQuery('#CropNow').click(function(e) {"); + sbCropZoom.Append("e.preventDefault();"); + sbCropZoom.Append( + "cropzoom.send('ProcessImage.ashx', 'POST', { newFileName: jQuery('#txtCropImageName').val(), saveFile: true, fileId: " + file.FileId + " }, function(){ javascript: __doPostBack('cmdCropNow', ''); });"); + sbCropZoom.Append("});"); + + sbCropZoom.Append("});"); + + Page.ClientScript.RegisterStartupScript( + GetType(), string.Format("CropZoomScript{0}", Guid.NewGuid()), sbCropZoom.ToString(), true); + } + + /// + /// Cancel Upload - Hide Upload Controls + /// + /// + /// The sender. + /// + /// + /// The Event Args e. + /// + private void UploadCancel_Click(object sender, EventArgs e) + { + panUploadDiv.Visible = false; + } + + /// + /// Upload Selected File + /// + /// The source of the event. + /// The instance containing the event data. + private void UploadNow_Click(object sender, EventArgs e) + { + FilesTable = null; + ShowFilesIn(GetCurrentFolder()); + + panUploadDiv.Visible = false; + } + + /// + /// Show Preview of the Page links + /// + /// The source of the event. + /// The instance containing the event data. + private void TreeTabs_NodeClick(object sender, EventArgs eventArgs) + { + if (dnntreeTabs.SelectedNode == null) + { + return; + } + + SetDefaultLinkTypeText(); + + var tabController = new TabController(); + + var selectTab = tabController.GetTab( + int.Parse(dnntreeTabs.SelectedValue), _portalSettings.PortalId, true); + + string sDomainName = string.Format("http://{0}", Globals.GetDomainName(Request, true)); + + // Add Language Parameter ?! + var localeSelected = LanguageRow.Visible && LanguageList.SelectedIndex > 0; + + if (chkHumanFriendy.Checked) + { + var fileName = localeSelected + ? Globals.FriendlyUrl( + selectTab, + string.Format( + "{0}&language={1}", + Globals.ApplicationURL(selectTab.TabID), + LanguageList.SelectedValue), + _portalSettings) + : Globals.FriendlyUrl( + selectTab, Globals.ApplicationURL(selectTab.TabID), _portalSettings); + + // Relative Url + fileName = Globals.ResolveUrl(Regex.Replace(fileName, sDomainName, "~", RegexOptions.IgnoreCase)); + + rblLinkType.Items[0].Text = Regex.Replace( + rblLinkType.Items[0].Text, + "/Images/MyImage.jpg", + Globals.ResolveUrl(Regex.Replace(fileName, sDomainName, "~", RegexOptions.IgnoreCase)), + RegexOptions.IgnoreCase); + + // Absolute Url + rblLinkType.Items[1].Text = Regex.Replace( + rblLinkType.Items[1].Text, + "http://www.MyWebsite.com/Images/MyImage.jpg", + Regex.Replace(fileName, sDomainName, string.Format("{0}", sDomainName), RegexOptions.IgnoreCase), + RegexOptions.IgnoreCase); + } + else + { + string locale = localeSelected ? string.Format("language/{0}/", LanguageList.SelectedValue) : string.Empty; + + // Relative Url + rblLinkType.Items[0].Text = Regex.Replace( + rblLinkType.Items[0].Text, + "/Images/MyImage.jpg", + Globals.ResolveUrl(string.Format("~/tabid/{0}/{1}Default.aspx", selectTab.TabID, locale)), + RegexOptions.IgnoreCase); + + // Absolute Url + rblLinkType.Items[1].Text = Regex.Replace( + rblLinkType.Items[1].Text, + "http://www.MyWebsite.com/Images/MyImage.jpg", + string.Format("{2}/tabid/{0}/{1}Default.aspx", selectTab.TabID, locale, sDomainName), + RegexOptions.IgnoreCase); + } + + if (currentSettings.UseAnchorSelector) + { + FindAnchorsOnTab(selectTab); + } + + Page.ClientScript.RegisterStartupScript( + GetType(), + string.Format("hideLoadingScript{0}", Guid.NewGuid()), + "jQuery('#panelLoading').hide();", + true); + } + + /// + /// Find and List all Anchors from the Selected Page. + /// + /// + /// The selected tab. + /// + private void FindAnchorsOnTab(TabInfo selectedTab) + { + // Clear Item list first... + AnchorList.Items.Clear(); + + var noneText = Localization.GetString("None.Text", ResXFile, LanguageCode); + + try + { + var wc = new WebClient(); + + var tabUrl = selectedTab.FullUrl; + + if (tabUrl.StartsWith("/")) + { + tabUrl = string.Format( + "{0}://{1}{2}", + HttpContext.Current.Request.Url.Scheme, + HttpContext.Current.Request.Url.Authority, + tabUrl); + } + + var page = wc.DownloadString(tabUrl); + + foreach (LinkItem i in AnchorFinder.ListAll(page).Where(i => !string.IsNullOrEmpty(i.Anchor))) + { + AnchorList.Items.Add(i.Anchor); + } + + // Add No Anchor item + AnchorList.Items.Insert(0, noneText); + } + catch (Exception) + { + // Add No Anchor item + AnchorList.Items.Add(noneText); + } + } + + /// + /// Show Info for Selected File + /// + /// The source of the event. + /// The instance containing the event data. + private void FilesList_ItemCommand(object source, RepeaterCommandEventArgs e) + { + foreach (RepeaterItem item in FilesList.Items) + { + var listRowItem = (HtmlGenericControl)item.FindControl("ListRow"); + + switch (item.ItemType) + { + case ListItemType.Item: + listRowItem.Attributes["class"] = "FilesListRow"; + break; + case ListItemType.AlternatingItem: + listRowItem.Attributes["class"] = "FilesListRowAlt"; + break; + } + } + + var listRow = (HtmlGenericControl)e.Item.FindControl("ListRow"); + listRow.Attributes["class"] += " Selected"; + + var fileListItem = (LinkButton)e.Item.FindControl("FileListItem"); + + if (fileListItem == null) + { + return; + } + + int fileId = Convert.ToInt32(fileListItem.CommandArgument); + + var currentFile = FileManager.Instance.GetFile(fileId); + + ShowFileHelpUrl(currentFile.FileName, currentFile); + + ScrollToSelectedFile(fileListItem.ClientID); + } + + /// + /// Switch Browser in Link Modus between Link and Page Mode + /// + /// The source of the event. + /// The instance containing the event data. + private void BrowserMode_SelectedIndexChanged(object sender, EventArgs e) + { + switch (BrowserMode.SelectedValue) + { + case "file": + panLinkMode.Visible = true; + panPageMode.Visible = false; + lblModus.Text = string.Format("Browser-Modus: {0}", browserModus); + break; + case "page": + panLinkMode.Visible = false; + panPageMode.Visible = true; + lblModus.Text = string.Format("Browser-Modus: {0}", string.Format("Page {0}", browserModus)); + + RenderTabs(); + break; + } + + title.InnerText = string.Format("{0} - DNNConnect.CKEditorProvider.FileBrowser", lblModus.Text); + + SetDefaultLinkTypeText(); + } + + + /// + /// Load Files of Selected Folder + /// + /// The source of the event. + /// The instance containing the event data. + private void FoldersTree_NodeClick(object sender, EventArgs eventArgs) + { + var folderId = Convert.ToInt32(FoldersTree.SelectedNode.Value); + var folder = FolderManager.Instance.GetFolder(folderId); + + var folderName = !string.IsNullOrEmpty(folder.FolderPath) ? + folder.FolderPath : Localization.GetString("RootFolder.Text", ResXFile, LanguageCode); + lblCurrentDir.Text = folderName; + + CurrentFolderId = folderId; + + ShowFilesIn(folder); + + // Reset selected file + SetDefaultLinkTypeText(); + + FileId.Text = null; + lblFileName.Text = null; + + // Expand Sub folders (if) exists + FoldersTree.SelectedNode.Expanded = true; + } + + /// + /// Gets the disk space used. + /// + private void GetDiskSpaceUsed() + { + var spaceAvailable = _portalSettings.HostSpace.Equals(0) + ? Localization.GetString("UnlimitedSpace.Text", ResXFile, LanguageCode) + : string.Format("{0}MB", _portalSettings.HostSpace); + + var spaceUsed = new PortalController().GetPortalSpaceUsedBytes(_portalSettings.PortalId); + + string usedSpace; + + string[] suffix = { "B", "KB", "MB", "GB", "TB" }; + + var index = 0; + + double spaceUsedDouble = spaceUsed; + + if (spaceUsed > 1024) + { + for (index = 0; (spaceUsed / 1024) > 0; index++, spaceUsed /= 1024) + { + spaceUsedDouble = spaceUsed / 1024.0; + } + + usedSpace = string.Format("{0:0.##}{1}", spaceUsedDouble, suffix[index]); + } + else + { + usedSpace = string.Format("{0:0.##}{1}", spaceUsedDouble, suffix[index]); + } + + FileSpaceUsedLabel.Text = + string.Format( + Localization.GetString("SpaceUsed.Text", ResXFile, LanguageCode), + usedSpace, + spaceAvailable); + } + + /// Gets the accepted file types. + private string GetAcceptedFileTypes() + { + switch (browserModus) + { + case "Flash": + return string.Join("|", AllowedFlashExtensions); + case "Image": + return string.Join("|", AllowedImageExtensions); + default: + return extensionWhiteList.ToStorageString().Replace(",", "|"); + } + } + + private IFolderInfo GetCurrentFolder() + { + return FolderManager.Instance.GetFolder(CurrentFolderId); + } + + private TreeNode FindNodeByValue(TreeView tree, string value) + { + return FindNodeByValue(tree.Nodes, value); + } + + private TreeNode FindNodeByValue(TreeNodeCollection nodes, string value) + { + TreeNode foundNode = null; + foreach (TreeNode node in nodes) + { + if (node.Value == value) + { + foundNode = node; + } + else if (node.ChildNodes.Count > 0) + { + foundNode = FindNodeByValue(node.ChildNodes, value); + } + + if (foundNode != null) + { + break; + } + } + + return foundNode; + } + + #endregion + } +} diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.aspx.designer.cs b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.aspx.designer.cs new file mode 100644 index 00000000000..e00829ae862 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.aspx.designer.cs @@ -0,0 +1,863 @@ +//------------------------------------------------------------------------------ +// +// 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 DNNConnect.CKEditorProvider.Browser +{ + + + public partial class Browser + { + + /// + /// title control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl title; + + /// + /// favicon control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.PlaceHolder favicon; + + /// + /// fBrowser control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm fBrowser; + + /// + /// scriptManager1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.ScriptManager scriptManager1; + + /// + /// lblModus control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblModus; + + /// + /// BrowserMode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RadioButtonList BrowserMode; + + /// + /// panPageMode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel panPageMode; + + /// + /// lblChoosetab control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblChoosetab; + + /// + /// dnntreeTabs control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TreeView dnntreeTabs; + + /// + /// ExtraTabOptions control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label ExtraTabOptions; + + /// + /// chkHumanFriendy control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkHumanFriendy; + + /// + /// LabelAnchor control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label LabelAnchor; + + /// + /// AnchorList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList AnchorList; + + /// + /// LanguageRow control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlTableRow LanguageRow; + + /// + /// LabelTabLanguage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label LabelTabLanguage; + + /// + /// LanguageList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList LanguageList; + + /// + /// panImageEdHead control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel panImageEdHead; + + /// + /// lblResizeHeader control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblResizeHeader; + + /// + /// lblOtherTools control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblOtherTools; + + /// + /// cmdCrop control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdCrop; + + /// + /// cmdZoom control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdZoom; + + /// + /// cmdRotate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdRotate; + + /// + /// cmdResize2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdResize2; + + /// + /// panThumb control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel panThumb; + + /// + /// lblWidth control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblWidth; + + /// + /// txtWidth control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtWidth; + + /// + /// lblHeight control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblHeight; + + /// + /// txtHeight control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtHeight; + + /// + /// chkAspect control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkAspect; + + /// + /// lblThumbName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblThumbName; + + /// + /// txtThumbName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtThumbName; + + /// + /// lblImgQuality control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblImgQuality; + + /// + /// dDlQuality control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList dDlQuality; + + /// + /// cmdResizeNow control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdResizeNow; + + /// + /// cmdResizeCancel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdResizeCancel; + + /// + /// panImageEditor control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel panImageEditor; + + /// + /// lblCropImageName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblCropImageName; + + /// + /// txtCropImageName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtCropImageName; + + /// + /// cmdCropNow control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdCropNow; + + /// + /// cmdCropCancel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdCropCancel; + + /// + /// lblShowPreview control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblShowPreview; + + /// + /// lblClearPreview control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblClearPreview; + + /// + /// panImagePreview control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel panImagePreview; + + /// + /// lblOriginal control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblOriginal; + + /// + /// lblPreview control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblPreview; + + /// + /// imgOriginal control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image imgOriginal; + + /// + /// lblCropInfo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblCropInfo; + + /// + /// imgResized control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image imgResized; + + /// + /// panLinkMode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel panLinkMode; + + /// + /// lblCurrent control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblCurrent; + + /// + /// lblCurrentDir control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblCurrentDir; + + /// + /// panUploadDiv control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel panUploadDiv; + + /// + /// UploadTitle control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label UploadTitle; + + /// + /// AddFiles control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label AddFiles; + + /// + /// OverrideFile control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox OverrideFile; + + /// + /// MaximumUploadSizeInfo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label MaximumUploadSizeInfo; + + /// + /// cmdUploadNow control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdUploadNow; + + /// + /// cmdUploadCancel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdUploadCancel; + + /// + /// panCreate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel panCreate; + + /// + /// NewFolderTitle control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label NewFolderTitle; + + /// + /// lblNewFoldName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblNewFoldName; + + /// + /// tbFolderName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox tbFolderName; + + /// + /// cmdCreateFolder control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdCreateFolder; + + /// + /// cmdCreateCancel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdCreateCancel; + + /// + /// cmdCreate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton cmdCreate; + + /// + /// Syncronize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton Syncronize; + + /// + /// cmdUpload control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton cmdUpload; + + /// + /// cmdDownload control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton cmdDownload; + + /// + /// cmdDelete control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton cmdDelete; + + /// + /// cmdResizer control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton cmdResizer; + + /// + /// lblSubDirs control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblSubDirs; + + /// + /// FoldersTree control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TreeView FoldersTree; + + /// + /// FileSpaceUsedLabel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label FileSpaceUsedLabel; + + /// + /// lblConFiles control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblConFiles; + + /// + /// SwitchDetailView control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label SwitchDetailView; + + /// + /// SwitchListView control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label SwitchListView; + + /// + /// SwitchIconsView control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label SwitchIconsView; + + /// + /// SortAscending control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton SortAscending; + + /// + /// SortDescending control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton SortDescending; + + /// + /// SortByDateAscending control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton SortByDateAscending; + + /// + /// SortByDateDescending control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton SortByDateDescending; + + /// + /// ListViewState control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField ListViewState; + + /// + /// FilesList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Repeater FilesList; + + /// + /// PagerFileLinks control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::DNNConnect.CKEditorProvider.Controls.Pager PagerFileLinks; + + /// + /// panInfo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel panInfo; + + /// + /// FileId control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label FileId; + + /// + /// lblFileName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblFileName; + + /// + /// lblUrlType control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblUrlType; + + /// + /// rblLinkType control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RadioButtonList rblLinkType; + + /// + /// cmdClose control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdClose; + + /// + /// cmdCancel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button cmdCancel; + + /// + /// panelLoading control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel panelLoading; + + /// + /// Wait control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Wait; + + /// + /// WaitMessage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label WaitMessage; + } +} diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.aspx.resx b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.aspx.resx new file mode 100644 index 00000000000..295a710ca6d --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.aspx.resx @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Private + + + + False + + + True + + + Cancel + + + OK + + + Contained Files: + + + Current Directory: + + + Subdirectories: + + + Cancel Upload + + + Upload Now + + \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.comb.css b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.comb.css new file mode 100644 index 00000000000..636fbdea0f0 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.comb.css @@ -0,0 +1,521 @@ +body {background-color:#fff;font-family: Arial, Verdana;color: #333;font-size:small;overflow:auto;} +a {color:#C00; text-decoration: none;} +a:hover {color:#900;} + +.LinkDisabled, .LinkDisabled:hover { + color:#999; zoom: 1; + -webkit-filter: alpha(opacity=30); + -moz-filter: alpha(opacity=30); + -o-filter: alpha(opacity=30); + filter: alpha(opacity=30); + -ms-opacity: 0.3; + opacity: 0.3; +} + +.ui-widget-content {font-size:small!important;} +.ui-tabs li a {font-size:85%!important;} + +hr {color: #d9d9d9;background-color: #d9d9d9;height:0;border: 1px solid #d9d9d9;} +h1 {font-weight: bold;margin: 0;font-size:medium;font-family:Arial, Helvetica, sans-serif; color:#333} +img {border:0} +#BrowserContainer { + margin-bottom:10px; + -moz-min-width:800px; + -ms-min-width:800px; + -o-min-width:800px; + -webkit-min-width:800px; + min-width:800px;width:800px; +} + +#panelLoading, #panUploadDiv, #panCreate{margin:0 5px 0 5px; padding:3px} +#panLinkMode, #panPageMode {margin: 10px 0 10px 0;} +#panPageMode table td {vertical-align:top;} + +.PanelSubDivs {margin-top:5px;margin-left:5px;} + +#lblCurrentDir {margin-top:5px;display:block;width:783px;padding:3px;} + +.LinkModeTable td, .LinkModeTable th {padding: 2px;margin: 2px;} +.LinkModeTable td {vertical-align:top;} + +#BrowserMode label {display:block;width:10em; float:right;font-weight:bold; cursor: pointer; padding: 2px;} +#BrowserMode input {display:block;float:left;cursor: pointer; margin: 10px; position:absolute;left:-99px;top:-99px;} + +#BrowserMode td:hover {cursor:pointer;} + +.OverrideFile { + margin: 5px; +} + +/* File Space Used Label */ +.fileSpaceUsedLabel {font-style:italic;display:inline-block;padding-top:13px} + +.maximumFileUploadInfo { + font-style:italic; + padding:10px; + -ms-word-break: break-all; + -moz-word-break:break-all; + -o-word-break:break-all; + word-break:break-all +} + +/******************************************/ +/* FilesBox Main Styles*/ +#FilesBox { + border: 1px solid #ccc; -moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; height: 285px; + -moz-min-width:524px; + -ms-min-width:524px; + -o-min-width:524px; + -webkit-min-width:524px; + min-width:524px;width:524px; float: left; overflow: auto;padding: 5px;margin-bottom:5px;margin-top:5px +} + +#FilesBox ul {list-style:none;margin:0;padding:0;} + +#FilesBox ul a {width:100%;display:block;color:#333;} + +#FilesBox .FileName {font-weight: bold;} + +/********************************************/ + +/* FilesBox View : Detail View */ +.FilesDetailView .FilesListRow, +.FilesDetailView .FilesListRowAlt {padding: 4px 0 4px 0;margin:6px} +.FilesDetailView .FilesListRowAlt { + background-color:#efefef;-moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + +/* Selected Row */ +.FilesDetailView .Selected { + background-color: #999; -moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + +/* Hover Row in the Files Box */ +.FilesDetailView li:hover { + cursor:pointer;background-color: #d1d1d1!important;-moz-transition: color .15s linear,background-color .15s linear;-webkit-transition: color .15s linear,background-color .15s linear; + -ms-transition: color .15s linear,background-color .15s linear; + -o-transition: color .15s linear,background-color .15s linear; + transition: color .15s linear,background-color .15s linear;-moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + +/* Resize Image Preview */ +.FilesDetailView .FilePreview {max-width:80px;padding-left:10px} + +/* Files Info */ +.FilesDetailView .ItemInfo {display:inline-table; vertical-align:top; padding-left:10px} + +/********************************************/ +/* FilesBox View : List View */ +.FilesListView .FilesListRow, +.FilesListView .FilesListRowAlt {padding: 4px 0 4px 0;margin:6px} +.FilesListView .FilesListRowAlt { + background-color:#efefef;-moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + +/* Selected Row */ +.FilesListView .Selected { + background-color: #999; -moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + + +/* Hover Row in the Files Box */ +.FilesListView li:hover { + cursor:pointer;background-color: #d1d1d1!important;-moz-transition: color .15s linear,background-color .15s linear;-webkit-transition: color .15s linear,background-color .15s linear; + -ms-transition: color .15s linear,background-color .15s linear; + -o-transition: color .15s linear,background-color .15s linear; + transition: color .15s linear,background-color .15s linear;-moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + +/* Resize Image Preview */ +.FilesListView .FilePreview {padding-left:10px;max-width:16px;} + +/* Files Info */ +.FilesListView .ItemInfo {display:inline-table; vertical-align:top; padding-left:10px} +.FilesListView .ItemInfo br {display:none;} +.FilesListView .FileInfo {padding-left: 1px;} +.FilesListView .FileInfo::before {content: ' - ';} + +/********************************************/ + +/* FilesBox View : Icons View */ +.FilesIconsView {margin:4px;padding:4px;} + +/* Item List Item */ +.FilesIconsView .FilesListRow, +.FilesIconsView .FilesListRowAlt {padding: 0;margin:1px;width:80px;height:80px;float:left;} + +/* Selected Row */ +.FilesIconsView .Selected { + background-color: #999; -moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + +/* Item Link */ +.FilesIconsView .FilesListItem {display:block;margin:4px;padding:4px;} + +/* Hover Row in the Files Box */ +.FilesIconsView li:hover { + cursor:pointer;background-color: #d1d1d1!important;-moz-transition: color .15s linear,background-color .15s linear;-webkit-transition: color .15s linear,background-color .15s linear; + -ms-transition: color .15s linear,background-color .15s linear; + -o-transition: color .15s linear,background-color .15s linear; + transition: color .15s linear,background-color .15s linear;-moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + +/* Resize Image Preview */ +.FilesIconsView .FilesListItem .FilePreview {max-width:48px;max-height:48px;padding-left:10px} + +/* Files Info */ +.FilesIconsView .ItemInfo { + vertical-align:bottom;text-align:center;display:block;width:70px;font-size:10px;overflow: hidden; + -moz-text-overflow: ellipsis; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + -moz-binding: url('assets/xml/ellipsis.xml#ellipsis'); +} + +.FilesIconsView .ItemInfo br, +.FilesIconsView .FileInfo {display:none} +/********************************************/ + + +/* FilesList Pager */ +.PagerTable {width:540px;} + +.PagerTable .PagerFirstColumn {float:left;width:180px} +.PagerTable .PagerNumbersColumn {width:180px;padding-top:4px;} +.PagerTable .PagerLastColumn {width:180px} +.PagerTable .PagerLastColumn .FilesPager {float:right;padding-top:2px;width:150px} + +.FilesPager{border:0; margin:0; padding:0;} + +.FilesPager li{ border:0; margin:0; padding:0; font-size:11px; list-style:none; margin-right:2px; } +.FilesPager li a{ margin-right:2px; } + +.FilesPager a:link, +.FilesPager a:visited { + float:left;padding:3px 6px; color: black;border:1px solid #999;background-color:#e4e4e4;background: -webkit-gradient(linear, left top, left bottom, from(#e4e4e4), to(#999)); + background: -moz-linear-gradient(top, #e4e4e4, #999);background: -o-linear-gradient(top, #e4e4e4, #999);-moz-border-radius: 5px;-webkit-border-radius: 5px;-o-border-radius: 5px; + -ms-border-radius: 5px; + border-radius: 5px;-moz-transition: color .15s linear,background-color .15s linear;-webkit-transition: color .15s linear,background-color .15s linear; + -ms-transition: color .15s linear,background-color .15s linear; + -o-transition: color .15s linear,background-color .15s linear; + transition: color .15s linear,background-color .15s linear;cursor:pointer +} + +.FilesPager a:hover{ color: white; background:#e4e4e4;background: -webkit-gradient(linear, left top, left bottom, from(#757575), to(#4b4b4b)); + background: -moz-linear-gradient(top, #757575, #4b4b4b);background: -o-linear-gradient(top, #757575, #4b4b4b); } + +.FilesPager .ActivePage a { color:white; display:block;background: -webkit-gradient(linear, left top, left bottom, from(#757575), to(#4b4b4b)); + background: -moz-linear-gradient(top, #757575, #4b4b4b);background: -o-linear-gradient(top, #757575, #4b4b4b); } + +.FilesPager .ActivePage a:hover { color: black;border:1px solid black;background-color:#e4e4e4;background: -webkit-gradient(linear, left top, left bottom, from(#e4e4e4), to(#999)); + background: -moz-linear-gradient(top, #e4e4e4, #999);background: -o-linear-gradient(top, #e4e4e4, #999); } + +/******************/ + + +#FoldersBox { + border: 1px solid #ccc; -moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; height: 285px; + -moz-min-width:248px; + -ms-min-width:248px; + -o-min-width:248px; + -webkit-min-width:248px; + min-width:248px;width:248px; float: left; overflow: auto;padding: 5px;margin-top:8px +} + +#FoldersBox a {color:Black;} + +#TabsBox { + border: 1px solid #ccc;-moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; height: 300px; + -moz-min-width:248px; + -ms-min-width:248px; + -o-min-width:248px; + -webkit-min-width:248px; + min-width:248px; padding: 5px; float: left; overflow: auto; +} + +#TabsBox a {color:Black;} + + +#SliderWidth { width:385px;position:absolute; top:505px; left:25px; border: 1px solid #666;} +#SliderHeight { height:248px;position:absolute; top:244px; left:13px; border: 1px solid #666;} +.ui-slider-vertical .ui-slider-handle, .ui-slider-horizontal .ui-slider-handle {border: 1px solid #666!important; background: #CCC!important;} + +#ImageTable {width:100%} +#ImageTable td {vertical-align:top;width:50%;padding: 2px;margin: 2px;} +#ImageOriginal { + background-color:#fff;border: 1px solid #ccc; -moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; height: 300px;width:400px; padding: 5px; float: right; +} + +.ImagePreview { + border: 1px solid #ccc; -moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; height: 300px;width:360px; padding: 5px; float: left; +} + +#lblCropInfo { width: 230px;margin: 75px auto 0 auto; display:block;} + +#CropButtons {padding-top:25px;} +#PreviewCrop, #ClearCrop {color: #9eda29; font-weight:bold; text-decoration:underline;float: left;padding: 5px;width: auto;cursor: pointer;} + +.Toolbar {padding: 15px 5px;} + +/* ModalDialog for Upload Dialog and Create Folder Dialog */ +.MessageBox{ position: absolute;z-index: 100;text-align: left; display:block;top: 96px; left: 220px;} + +.MessageBox .modalHeader:hover { + cursor: move; +} + +.ModalDialog .popup { + position:relative; + border:3px solid #000000; + border:3px solid rgba(0,0,0,0); + -webkit-border-radius:5px; + -moz-border-radius:5px; + -ms-border-radius:5px; + border-radius:5px; + -webkit-box-shadow:0 0 18px #000000; + -moz-box-shadow:0 0 18px #000000; + -ms-box-shadow:0 0 18px #000000; + box-shadow:0 0 18px #000000; + box-shadow:0 0 18px rgba(0,0,0,0.4); + width:390px +} + +.ModalDialog .DialogContent { + display:table;width: 370px; padding: 10px;background: #fff;-webkit-border-radius:4px;-moz-border-radius:4px; + -ms-border-radius:4px; + border-radius:4px; +} + +.ModalDialog .modalHeader {text-align:center;font-size: 12.5pt;} +.ModalDialog input[type="file"]{width:100%;} +* html .ModalDialog .modalInner {padding-top:10px} +*:first-child+html .ModalDialog .modalInner {padding-top:10px} + +.ModalDialog_overlayBG { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + z-index: 99; +} + +.MessageBox input[type="text"] { + border:1px solid #ccc; background:#e4e4e4!important;margin-top:5px;-moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + +.ModalFooter {float:right} + +.LoadingContent h3 {background: url(../js/ckeditor/4.5.3/images/loading.gif) no-repeat 102px 5px;height:20px} +.LoadingMessage {text-align:center} + +#cmdCreate img, +#Syncronize img, +#cmdUpload img, +#cmdDownload img, +#cmdDelete img, +#cmdResizer img, +.ButtonNormal img, +.ButtonSelected img, +#SwitchDetailView img, +#SwitchListView img, +#SwitchIconsView img {vertical-align:middle} + +.ButtonSelected img { + border: 1px solid #C00; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -o-border-radius: 5px; + -ms-border-radius: 5px; + border-radius: 5px; + padding: 2px; +} + +.ButtonNormal {border: none;} + +/* Multi Upload Control */ +#UploadFilesBox { + -moz-min-width:480px; + -ms-min-width:480px; + -o-min-width:480px; + -webkit-min-width:480px; + min-width:480px; + width:480px; + float: left; + overflow: auto; + padding: 5px; + margin-bottom:5px; + margin-top: 5px; + height: 275px; + border-top: 1px dotted grey; + border-bottom: 1px dotted grey; +} +#dropzone { + width: auto; + padding: 10px 0; + text-align: center; + margin: 20px auto; +} + +.UploadFiles .progress { + height:5px +} +#panUploadDiv .ModalDialog .DialogContent { + width: 460px; +} + +#panUploadDiv .ModalDialog .popup { + width: 510px; +} + +#panUploadDiv .MessageBox { + left: 150px; + top: 56px +} +.UploadFiles .preview { + -moz-min-width: 80px; + -ms-min-width: 80px; + -o-min-width: 80px; + -webkit-min-width: 80px; + min-width: 80px; + display: block; +} +.UploadFiles .name { + width: 288px; + -ms-word-break: break-all; + -moz-word-break:break-all; + -o-word-break:break-all; + word-break: break-all; + font-weight: bold; +} +.UploadFiles .size { + font-style:italic; +} +.UploadFiles .error { + color:red +} + + +@charset "UTF-8"; +/* + * jQuery File Upload Plugin CSS 1.3.0 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +.fileinput-button { + position: relative; + overflow: hidden; +} +.fileinput-button input { + position: absolute; + top: 0; + right: 0; + margin: 0; + opacity: 0; + -ms-filter: 'alpha(opacity=0)'; + font-size: 200px; + direction: ltr; + cursor: pointer; +} + +/* Fixes for IE < 8 */ +@media screen\9 { + .fileinput-button input { + filter: alpha(opacity=0); + font-size: 100%; + height: 100%; + } +} + +@charset "UTF-8"; +/* + * jQuery File Upload UI Plugin CSS 9.0.0 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2010, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +.fileupload-buttonbar .btn, +.fileupload-buttonbar .toggle { + margin-bottom: 5px; +} +.progress-animated .progress-bar, +.progress-animated .bar { + background: url("Images/progressbar.gif") !important; + filter: none; +} +.fileupload-process { + float: right; + display: none; +} +.fileupload-processing .fileupload-process, +.files .processing .preview { + display: block; + width: 32px; + height: 32px; + background: url("../js/ckeditor/4.5.3/images/loading.gif") center no-repeat; + background-size: contain; +} +.files audio, +.files video { + max-width: 300px; +} + +@media (max-width: 767px) { + .fileupload-buttonbar .toggle, + .files .toggle, + .files .btn span { + display: none; + } + .files .name { + width: 80px; + word-wrap: break-word; + } + .files audio, + .files video { + max-width: 80px; + } + .files img, + .files canvas { + max-width: 100%; + } +} + diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.comb.css.bundle b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.comb.css.bundle new file mode 100644 index 00000000000..6135206ea75 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.comb.css.bundle @@ -0,0 +1,19 @@ + + + + + true + + false + + true + + + + + + /Browser/Browser.css + /Browser/jquery.fileupload.css + /Browser/jquery.fileupload-ui.css + + \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.comb.min.css b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.comb.min.css new file mode 100644 index 00000000000..ac573918af7 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.comb.min.css @@ -0,0 +1 @@ +body{background-color:#fff;font-family:Arial,Verdana;color:#333;font-size:small;overflow:auto}a{color:#c00;text-decoration:none}a:hover{color:#900}.LinkDisabled,.LinkDisabled:hover{color:#999;zoom:1;-webkit-filter:alpha(opacity=30);-moz-filter:alpha(opacity=30);-o-filter:alpha(opacity=30);filter:alpha(opacity=30);-ms-opacity:.3;opacity:.3}.ui-widget-content{font-size:small!important}.ui-tabs li a{font-size:85%!important}hr{color:#d9d9d9;background-color:#d9d9d9;height:0;border:1px solid #d9d9d9}h1{font-weight:bold;margin:0;font-size:medium;font-family:Arial,Helvetica,sans-serif;color:#333}img{border:0}#BrowserContainer{margin-bottom:10px;-moz-min-width:800px;-ms-min-width:800px;-o-min-width:800px;-webkit-min-width:800px;min-width:800px;width:800px}#panelLoading,#panUploadDiv,#panCreate{margin:0 5px 0 5px;padding:3px}#panLinkMode,#panPageMode{margin:10px 0 10px 0}#panPageMode table td{vertical-align:top}.PanelSubDivs{margin-top:5px;margin-left:5px}#lblCurrentDir{margin-top:5px;display:block;width:783px;padding:3px}.LinkModeTable td,.LinkModeTable th{padding:2px;margin:2px}.LinkModeTable td{vertical-align:top}#BrowserMode label{display:block;width:10em;float:right;font-weight:bold;cursor:pointer;padding:2px}#BrowserMode input{display:block;float:left;cursor:pointer;margin:10px;position:absolute;left:-99px;top:-99px}#BrowserMode td:hover{cursor:pointer}.OverrideFile{margin:5px}.fileSpaceUsedLabel{font-style:italic;display:inline-block;padding-top:13px}.maximumFileUploadInfo{font-style:italic;padding:10px;-ms-word-break:break-all;-moz-word-break:break-all;-o-word-break:break-all;word-break:break-all}#FilesBox{border:1px solid #ccc;-moz-border-radius:.4em;-webkit-border-radius:.4em;-ms-border-radius:.4em;border-radius:.4em;height:285px;-moz-min-width:524px;-ms-min-width:524px;-o-min-width:524px;-webkit-min-width:524px;min-width:524px;width:524px;float:left;overflow:auto;padding:5px;margin-bottom:5px;margin-top:5px}#FilesBox ul{list-style:none;margin:0;padding:0}#FilesBox ul a{width:100%;display:block;color:#333}#FilesBox .FileName{font-weight:bold}.FilesDetailView .FilesListRow,.FilesDetailView .FilesListRowAlt{padding:4px 0 4px 0;margin:6px}.FilesDetailView .FilesListRowAlt{background-color:#efefef;-moz-border-radius:.4em;-webkit-border-radius:.4em;-ms-border-radius:.4em;border-radius:.4em}.FilesDetailView .Selected{background-color:#999;-moz-border-radius:.4em;-webkit-border-radius:.4em;-ms-border-radius:.4em;border-radius:.4em}.FilesDetailView li:hover{cursor:pointer;background-color:#d1d1d1!important;-moz-transition:color .15s linear,background-color .15s linear;-webkit-transition:color .15s linear,background-color .15s linear;-ms-transition:color .15s linear,background-color .15s linear;-o-transition:color .15s linear,background-color .15s linear;transition:color .15s linear,background-color .15s linear;-moz-border-radius:.4em;-webkit-border-radius:.4em;-ms-border-radius:.4em;border-radius:.4em}.FilesDetailView .FilePreview{max-width:80px;padding-left:10px}.FilesDetailView .ItemInfo{display:inline-table;vertical-align:top;padding-left:10px}.FilesListView .FilesListRow,.FilesListView .FilesListRowAlt{padding:4px 0 4px 0;margin:6px}.FilesListView .FilesListRowAlt{background-color:#efefef;-moz-border-radius:.4em;-webkit-border-radius:.4em;-ms-border-radius:.4em;border-radius:.4em}.FilesListView .Selected{background-color:#999;-moz-border-radius:.4em;-webkit-border-radius:.4em;-ms-border-radius:.4em;border-radius:.4em}.FilesListView li:hover{cursor:pointer;background-color:#d1d1d1!important;-moz-transition:color .15s linear,background-color .15s linear;-webkit-transition:color .15s linear,background-color .15s linear;-ms-transition:color .15s linear,background-color .15s linear;-o-transition:color .15s linear,background-color .15s linear;transition:color .15s linear,background-color .15s linear;-moz-border-radius:.4em;-webkit-border-radius:.4em;-ms-border-radius:.4em;border-radius:.4em}.FilesListView .FilePreview{padding-left:10px;max-width:16px}.FilesListView .ItemInfo{display:inline-table;vertical-align:top;padding-left:10px}.FilesListView .ItemInfo br{display:none}.FilesListView .FileInfo{padding-left:1px}.FilesListView .FileInfo::before{content:' - '}.FilesIconsView{margin:4px;padding:4px}.FilesIconsView .FilesListRow,.FilesIconsView .FilesListRowAlt{padding:0;margin:1px;width:80px;height:80px;float:left}.FilesIconsView .Selected{background-color:#999;-moz-border-radius:.4em;-webkit-border-radius:.4em;-ms-border-radius:.4em;border-radius:.4em}.FilesIconsView .FilesListItem{display:block;margin:4px;padding:4px}.FilesIconsView li:hover{cursor:pointer;background-color:#d1d1d1!important;-moz-transition:color .15s linear,background-color .15s linear;-webkit-transition:color .15s linear,background-color .15s linear;-ms-transition:color .15s linear,background-color .15s linear;-o-transition:color .15s linear,background-color .15s linear;transition:color .15s linear,background-color .15s linear;-moz-border-radius:.4em;-webkit-border-radius:.4em;-ms-border-radius:.4em;border-radius:.4em}.FilesIconsView .FilesListItem .FilePreview{max-width:48px;max-height:48px;padding-left:10px}.FilesIconsView .ItemInfo{vertical-align:bottom;text-align:center;display:block;width:70px;font-size:10px;overflow:hidden;-moz-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;-moz-binding:url('assets/xml/ellipsis.xml#ellipsis')}.FilesIconsView .ItemInfo br,.FilesIconsView .FileInfo{display:none}.PagerTable{width:540px}.PagerTable .PagerFirstColumn{float:left;width:180px}.PagerTable .PagerNumbersColumn{width:180px;padding-top:4px}.PagerTable .PagerLastColumn{width:180px}.PagerTable .PagerLastColumn .FilesPager{float:right;padding-top:2px;width:150px}.FilesPager{border:0;margin:0;padding:0}.FilesPager li{border:0;margin:0;padding:0;font-size:11px;list-style:none;margin-right:2px}.FilesPager li a{margin-right:2px}.FilesPager a:link,.FilesPager a:visited{float:left;padding:3px 6px;color:#000;border:1px solid #999;background-color:#e4e4e4;background:-webkit-gradient(linear,left top,left bottom,from(#e4e4e4),to(#999));background:-moz-linear-gradient(top,#e4e4e4,#999);background:-o-linear-gradient(top,#e4e4e4,#999);-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;border-radius:5px;-moz-transition:color .15s linear,background-color .15s linear;-webkit-transition:color .15s linear,background-color .15s linear;-ms-transition:color .15s linear,background-color .15s linear;-o-transition:color .15s linear,background-color .15s linear;transition:color .15s linear,background-color .15s linear;cursor:pointer}.FilesPager a:hover{color:#fff;background:#e4e4e4;background:-webkit-gradient(linear,left top,left bottom,from(#757575),to(#4b4b4b));background:-moz-linear-gradient(top,#757575,#4b4b4b);background:-o-linear-gradient(top,#757575,#4b4b4b)}.FilesPager .ActivePage a{color:#fff;display:block;background:-webkit-gradient(linear,left top,left bottom,from(#757575),to(#4b4b4b));background:-moz-linear-gradient(top,#757575,#4b4b4b);background:-o-linear-gradient(top,#757575,#4b4b4b)}.FilesPager .ActivePage a:hover{color:#000;border:1px solid #000;background-color:#e4e4e4;background:-webkit-gradient(linear,left top,left bottom,from(#e4e4e4),to(#999));background:-moz-linear-gradient(top,#e4e4e4,#999);background:-o-linear-gradient(top,#e4e4e4,#999)}#FoldersBox{border:1px solid #ccc;-moz-border-radius:.4em;-webkit-border-radius:.4em;-ms-border-radius:.4em;border-radius:.4em;height:285px;-moz-min-width:248px;-ms-min-width:248px;-o-min-width:248px;-webkit-min-width:248px;min-width:248px;width:248px;float:left;overflow:auto;padding:5px;margin-top:8px}#FoldersBox a{color:#000}#TabsBox{border:1px solid #ccc;-moz-border-radius:.4em;-webkit-border-radius:.4em;-ms-border-radius:.4em;border-radius:.4em;height:300px;-moz-min-width:248px;-ms-min-width:248px;-o-min-width:248px;-webkit-min-width:248px;min-width:248px;padding:5px;float:left;overflow:auto}#TabsBox a{color:#000}#SliderWidth{width:385px;position:absolute;top:505px;left:25px;border:1px solid #666}#SliderHeight{height:248px;position:absolute;top:244px;left:13px;border:1px solid #666}.ui-slider-vertical .ui-slider-handle,.ui-slider-horizontal .ui-slider-handle{border:1px solid #666!important;background:#ccc!important}#ImageTable{width:100%}#ImageTable td{vertical-align:top;width:50%;padding:2px;margin:2px}#ImageOriginal{background-color:#fff;border:1px solid #ccc;-moz-border-radius:.4em;-webkit-border-radius:.4em;-ms-border-radius:.4em;border-radius:.4em;height:300px;width:400px;padding:5px;float:right}.ImagePreview{border:1px solid #ccc;-moz-border-radius:.4em;-webkit-border-radius:.4em;-ms-border-radius:.4em;border-radius:.4em;height:300px;width:360px;padding:5px;float:left}#lblCropInfo{width:230px;margin:75px auto 0 auto;display:block}#CropButtons{padding-top:25px}#PreviewCrop,#ClearCrop{color:#9eda29;font-weight:bold;text-decoration:underline;float:left;padding:5px;width:auto;cursor:pointer}.Toolbar{padding:15px 5px}.MessageBox{position:absolute;z-index:100;text-align:left;display:block;top:96px;left:220px}.MessageBox .modalHeader:hover{cursor:move}.ModalDialog .popup{position:relative;border:3px solid #000;border:3px solid rgba(0,0,0,0);-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 0 18px #000;-moz-box-shadow:0 0 18px #000;-ms-box-shadow:0 0 18px #000;box-shadow:0 0 18px #000;box-shadow:0 0 18px rgba(0,0,0,.4);width:390px}.ModalDialog .DialogContent{display:table;width:370px;padding:10px;background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px}.ModalDialog .modalHeader{text-align:center;font-size:12.5pt}.ModalDialog input[type="file"]{width:100%}* html .ModalDialog .modalInner{padding-top:10px}*:first-child+html .ModalDialog .modalInner{padding-top:10px}.ModalDialog_overlayBG{position:absolute;top:0;left:0;height:100%;width:100%;z-index:99}.MessageBox input[type="text"]{border:1px solid #ccc;background:#e4e4e4!important;margin-top:5px;-moz-border-radius:.4em;-webkit-border-radius:.4em;-ms-border-radius:.4em;border-radius:.4em}.ModalFooter{float:right}.LoadingContent h3{background:url(../js/ckeditor/4.5.3/images/loading.gif) no-repeat 102px 5px;height:20px}.LoadingMessage{text-align:center}#cmdCreate img,#Syncronize img,#cmdUpload img,#cmdDownload img,#cmdDelete img,#cmdResizer img,.ButtonNormal img,.ButtonSelected img,#SwitchDetailView img,#SwitchListView img,#SwitchIconsView img{vertical-align:middle}.ButtonSelected img{border:1px solid #c00;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;border-radius:5px;padding:2px}.ButtonNormal{border:none}#UploadFilesBox{-moz-min-width:480px;-ms-min-width:480px;-o-min-width:480px;-webkit-min-width:480px;min-width:480px;width:480px;float:left;overflow:auto;padding:5px;margin-bottom:5px;margin-top:5px;height:275px;border-top:1px dotted grey;border-bottom:1px dotted grey}#dropzone{width:auto;padding:10px 0;text-align:center;margin:20px auto}.UploadFiles .progress{height:5px}#panUploadDiv .ModalDialog .DialogContent{width:460px}#panUploadDiv .ModalDialog .popup{width:510px}#panUploadDiv .MessageBox{left:150px;top:56px}.UploadFiles .preview{-moz-min-width:80px;-ms-min-width:80px;-o-min-width:80px;-webkit-min-width:80px;min-width:80px;display:block}.UploadFiles .name{width:288px;-ms-word-break:break-all;-moz-word-break:break-all;-o-word-break:break-all;word-break:break-all;font-weight:bold}.UploadFiles .size{font-style:italic}.UploadFiles .error{color:red}@charset "UTF-8";.fileinput-button{position:relative;overflow:hidden}.fileinput-button input{position:absolute;top:0;right:0;margin:0;opacity:0;-ms-filter:'alpha(opacity=0)';font-size:200px;direction:ltr;cursor:pointer}@media screen\9{.fileinput-button input{filter:alpha(opacity=0);font-size:100%;height:100%}}@charset "UTF-8";.fileupload-buttonbar .btn,.fileupload-buttonbar .toggle{margin-bottom:5px}.progress-animated .progress-bar,.progress-animated .bar{background:url("Images/progressbar.gif") !important;filter:none}.fileupload-process{float:right;display:none}.fileupload-processing .fileupload-process,.files .processing .preview{display:block;width:32px;height:32px;background:url("../js/ckeditor/4.5.3/images/loading.gif") center no-repeat;background-size:contain}.files audio,.files video{max-width:300px}@media(max-width:767px){.fileupload-buttonbar .toggle,.files .toggle,.files .btn span{display:none}.files .name{width:80px;word-wrap:break-word}.files audio,.files video{max-width:80px}.files img,.files canvas{max-width:100%}} \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.css b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.css new file mode 100644 index 00000000000..fd280b7b1ca --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Browser.css @@ -0,0 +1,427 @@ +body {background-color:#fff;font-family: Arial, Verdana;color: #333;font-size:small;overflow:auto;} +a {color:#C00; text-decoration: none;} +a:hover {color:#900;} + +.LinkDisabled, .LinkDisabled:hover { + color:#999; zoom: 1; + -webkit-filter: alpha(opacity=30); + -moz-filter: alpha(opacity=30); + -o-filter: alpha(opacity=30); + filter: alpha(opacity=30); + -ms-opacity: 0.3; + opacity: 0.3; +} + +.ui-widget-content {font-size:small!important;} +.ui-tabs li a {font-size:85%!important;} + +hr {color: #d9d9d9;background-color: #d9d9d9;height:0;border: 1px solid #d9d9d9;} +h1 {font-weight: bold;margin: 0;font-size:medium;font-family:Arial, Helvetica, sans-serif; color:#333} +img {border:0} +#BrowserContainer { + margin-bottom:10px; + -moz-min-width:800px; + -ms-min-width:800px; + -o-min-width:800px; + -webkit-min-width:800px; + min-width:800px;width:800px; +} + +#panelLoading, #panUploadDiv, #panCreate{margin:0 5px 0 5px; padding:3px} +#panLinkMode, #panPageMode {margin: 10px 0 10px 0;} +#panPageMode table td {vertical-align:top;} + +.PanelSubDivs {margin-top:5px;margin-left:5px;} + +#lblCurrentDir {margin-top:5px;display:block;width:783px;padding:3px;} + +.LinkModeTable td, .LinkModeTable th {padding: 2px;margin: 2px;} +.LinkModeTable td {vertical-align:top;} + +#BrowserMode label {display:block;width:10em; float:right;font-weight:bold; cursor: pointer; padding: 2px;} +#BrowserMode input {display:block;float:left;cursor: pointer; margin: 10px; position:absolute;left:-99px;top:-99px;} + +#BrowserMode td:hover {cursor:pointer;} + +.OverrideFile { + margin: 5px; +} + +/* File Space Used Label */ +.fileSpaceUsedLabel {font-style:italic;display:inline-block;padding-top:13px} + +.maximumFileUploadInfo { + font-style:italic; + padding:10px; + -ms-word-break: break-all; + -moz-word-break:break-all; + -o-word-break:break-all; + word-break:break-all +} + +/******************************************/ +/* FilesBox Main Styles*/ +#FilesBox { + border: 1px solid #ccc; -moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; height: 285px; + -moz-min-width:524px; + -ms-min-width:524px; + -o-min-width:524px; + -webkit-min-width:524px; + min-width:524px;width:524px; float: left; overflow: auto;padding: 5px;margin-bottom:5px;margin-top:5px +} + +#FilesBox ul {list-style:none;margin:0;padding:0;} + +#FilesBox ul a {width:100%;display:block;color:#333;} + +#FilesBox .FileName {font-weight: bold;} + +/********************************************/ + +/* FilesBox View : Detail View */ +.FilesDetailView .FilesListRow, +.FilesDetailView .FilesListRowAlt {padding: 4px 0 4px 0;margin:6px} +.FilesDetailView .FilesListRowAlt { + background-color:#efefef;-moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + +/* Selected Row */ +.FilesDetailView .Selected { + background-color: #999; -moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + +/* Hover Row in the Files Box */ +.FilesDetailView li:hover { + cursor:pointer;background-color: #d1d1d1!important;-moz-transition: color .15s linear,background-color .15s linear;-webkit-transition: color .15s linear,background-color .15s linear; + -ms-transition: color .15s linear,background-color .15s linear; + -o-transition: color .15s linear,background-color .15s linear; + transition: color .15s linear,background-color .15s linear;-moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + +/* Resize Image Preview */ +.FilesDetailView .FilePreview {max-width:80px;padding-left:10px} + +/* Files Info */ +.FilesDetailView .ItemInfo {display:inline-table; vertical-align:top; padding-left:10px} + +/********************************************/ +/* FilesBox View : List View */ +.FilesListView .FilesListRow, +.FilesListView .FilesListRowAlt {padding: 4px 0 4px 0;margin:6px} +.FilesListView .FilesListRowAlt { + background-color:#efefef;-moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + +/* Selected Row */ +.FilesListView .Selected { + background-color: #999; -moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + + +/* Hover Row in the Files Box */ +.FilesListView li:hover { + cursor:pointer;background-color: #d1d1d1!important;-moz-transition: color .15s linear,background-color .15s linear;-webkit-transition: color .15s linear,background-color .15s linear; + -ms-transition: color .15s linear,background-color .15s linear; + -o-transition: color .15s linear,background-color .15s linear; + transition: color .15s linear,background-color .15s linear;-moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + +/* Resize Image Preview */ +.FilesListView .FilePreview {padding-left:10px;max-width:16px;} + +/* Files Info */ +.FilesListView .ItemInfo {display:inline-table; vertical-align:top; padding-left:10px} +.FilesListView .ItemInfo br {display:none;} +.FilesListView .FileInfo {padding-left: 1px;} +.FilesListView .FileInfo::before {content: ' - ';} + +/********************************************/ + +/* FilesBox View : Icons View */ +.FilesIconsView {margin:4px;padding:4px;} + +/* Item List Item */ +.FilesIconsView .FilesListRow, +.FilesIconsView .FilesListRowAlt {padding: 0;margin:1px;width:80px;height:80px;float:left;} + +/* Selected Row */ +.FilesIconsView .Selected { + background-color: #999; -moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + +/* Item Link */ +.FilesIconsView .FilesListItem {display:block;margin:4px;padding:4px;} + +/* Hover Row in the Files Box */ +.FilesIconsView li:hover { + cursor:pointer;background-color: #d1d1d1!important;-moz-transition: color .15s linear,background-color .15s linear;-webkit-transition: color .15s linear,background-color .15s linear; + -ms-transition: color .15s linear,background-color .15s linear; + -o-transition: color .15s linear,background-color .15s linear; + transition: color .15s linear,background-color .15s linear;-moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + +/* Resize Image Preview */ +.FilesIconsView .FilesListItem .FilePreview {max-width:48px;max-height:48px;padding-left:10px} + +/* Files Info */ +.FilesIconsView .ItemInfo { + vertical-align:bottom;text-align:center;display:block;width:70px;font-size:10px;overflow: hidden; + -moz-text-overflow: ellipsis; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + -moz-binding: url('assets/xml/ellipsis.xml#ellipsis'); +} + +.FilesIconsView .ItemInfo br, +.FilesIconsView .FileInfo {display:none} +/********************************************/ + + +/* FilesList Pager */ +.PagerTable {width:540px;} + +.PagerTable .PagerFirstColumn {float:left;width:180px} +.PagerTable .PagerNumbersColumn {width:180px;padding-top:4px;} +.PagerTable .PagerLastColumn {width:180px} +.PagerTable .PagerLastColumn .FilesPager {float:right;padding-top:2px;width:150px} + +.FilesPager{border:0; margin:0; padding:0;} + +.FilesPager li{ border:0; margin:0; padding:0; font-size:11px; list-style:none; margin-right:2px; } +.FilesPager li a{ margin-right:2px; } + +.FilesPager a:link, +.FilesPager a:visited { + float:left;padding:3px 6px; color: black;border:1px solid #999;background-color:#e4e4e4;background: -webkit-gradient(linear, left top, left bottom, from(#e4e4e4), to(#999)); + background: -moz-linear-gradient(top, #e4e4e4, #999);background: -o-linear-gradient(top, #e4e4e4, #999);-moz-border-radius: 5px;-webkit-border-radius: 5px;-o-border-radius: 5px; + -ms-border-radius: 5px; + border-radius: 5px;-moz-transition: color .15s linear,background-color .15s linear;-webkit-transition: color .15s linear,background-color .15s linear; + -ms-transition: color .15s linear,background-color .15s linear; + -o-transition: color .15s linear,background-color .15s linear; + transition: color .15s linear,background-color .15s linear;cursor:pointer +} + +.FilesPager a:hover{ color: white; background:#e4e4e4;background: -webkit-gradient(linear, left top, left bottom, from(#757575), to(#4b4b4b)); + background: -moz-linear-gradient(top, #757575, #4b4b4b);background: -o-linear-gradient(top, #757575, #4b4b4b); } + +.FilesPager .ActivePage a { color:white; display:block;background: -webkit-gradient(linear, left top, left bottom, from(#757575), to(#4b4b4b)); + background: -moz-linear-gradient(top, #757575, #4b4b4b);background: -o-linear-gradient(top, #757575, #4b4b4b); } + +.FilesPager .ActivePage a:hover { color: black;border:1px solid black;background-color:#e4e4e4;background: -webkit-gradient(linear, left top, left bottom, from(#e4e4e4), to(#999)); + background: -moz-linear-gradient(top, #e4e4e4, #999);background: -o-linear-gradient(top, #e4e4e4, #999); } + +/******************/ + + +#FoldersBox { + border: 1px solid #ccc; -moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; height: 285px; + -moz-min-width:248px; + -ms-min-width:248px; + -o-min-width:248px; + -webkit-min-width:248px; + min-width:248px;width:248px; float: left; overflow: auto;padding: 5px;margin-top:8px +} + +#FoldersBox a {color:Black;} + +#FoldersTree img{ width: 16px;height: 16px; } + +#TabsBox { + border: 1px solid #ccc;-moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; height: 300px; + -moz-min-width:248px; + -ms-min-width:248px; + -o-min-width:248px; + -webkit-min-width:248px; + min-width:248px; padding: 5px; float: left; overflow: auto; +} + +#TabsBox a {color:Black;} + + +#SliderWidth { width:385px;position:absolute; top:505px; left:25px; border: 1px solid #666;} +#SliderHeight { height:248px;position:absolute; top:244px; left:13px; border: 1px solid #666;} +.ui-slider-vertical .ui-slider-handle, .ui-slider-horizontal .ui-slider-handle {border: 1px solid #666!important; background: #CCC!important;} + +#ImageTable {width:100%} +#ImageTable td {vertical-align:top;width:50%;padding: 2px;margin: 2px;} +#ImageOriginal { + background-color:#fff;border: 1px solid #ccc; -moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; height: 300px;width:400px; padding: 5px; float: right; +} + +.ImagePreview { + border: 1px solid #ccc; -moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; height: 300px;width:360px; padding: 5px; float: left; +} + +#lblCropInfo { width: 230px;margin: 75px auto 0 auto; display:block;} + +#CropButtons {padding-top:25px;} +#PreviewCrop, #ClearCrop {color: #9eda29; font-weight:bold; text-decoration:underline;float: left;padding: 5px;width: auto;cursor: pointer;} + +.Toolbar {padding: 15px 5px;} + +/* ModalDialog for Upload Dialog and Create Folder Dialog */ +.MessageBox{ position: absolute;z-index: 100;text-align: left; display:block;top: 96px; left: 220px;} + +.MessageBox .modalHeader:hover { + cursor: move; +} + +.ModalDialog .popup { + position:relative; + border:3px solid #000000; + border:3px solid rgba(0,0,0,0); + -webkit-border-radius:5px; + -moz-border-radius:5px; + -ms-border-radius:5px; + border-radius:5px; + -webkit-box-shadow:0 0 18px #000000; + -moz-box-shadow:0 0 18px #000000; + -ms-box-shadow:0 0 18px #000000; + box-shadow:0 0 18px #000000; + box-shadow:0 0 18px rgba(0,0,0,0.4); + width:390px +} + +.ModalDialog .DialogContent { + display:table;width: 370px; padding: 10px;background: #fff;-webkit-border-radius:4px;-moz-border-radius:4px; + -ms-border-radius:4px; + border-radius:4px; +} + +.ModalDialog .modalHeader {text-align:center;font-size: 12.5pt;} +.ModalDialog input[type="file"]{width:100%;} +* html .ModalDialog .modalInner {padding-top:10px} +*:first-child+html .ModalDialog .modalInner {padding-top:10px} + +.ModalDialog_overlayBG { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + z-index: 99; +} + +.MessageBox input[type="text"] { + border:1px solid #ccc; background:#e4e4e4!important;margin-top:5px;-moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; + -ms-border-radius: 0.4em; + border-radius: 0.4em; +} + +.ModalFooter {float:right} + +.LoadingContent h3 {background: url(../js/ckeditor/4.5.3/images/loading.gif) no-repeat 102px 5px;height:20px} +.LoadingMessage {text-align:center} + +#cmdCreate img, +#Syncronize img, +#cmdUpload img, +#cmdDownload img, +#cmdDelete img, +#cmdResizer img, +.ButtonNormal img, +.ButtonSelected img, +#SwitchDetailView img, +#SwitchListView img, +#SwitchIconsView img {vertical-align:middle} + +.ButtonSelected img { + border: 1px solid #C00; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -o-border-radius: 5px; + -ms-border-radius: 5px; + border-radius: 5px; + padding: 2px; +} + +.ButtonNormal {border: none;} + +/* Multi Upload Control */ +#UploadFilesBox { + -moz-min-width:480px; + -ms-min-width:480px; + -o-min-width:480px; + -webkit-min-width:480px; + min-width:480px; + width:480px; + float: left; + overflow: auto; + padding: 5px; + margin-bottom:5px; + margin-top: 5px; + height: 275px; + border-top: 1px dotted grey; + border-bottom: 1px dotted grey; +} +#dropzone { + width: auto; + padding: 10px 0; + text-align: center; + margin: 20px auto; +} + +.UploadFiles .progress { + height:5px +} +#panUploadDiv .ModalDialog .DialogContent { + width: 460px; +} + +#panUploadDiv .ModalDialog .popup { + width: 510px; +} + +#panUploadDiv .MessageBox { + left: 150px; + top: 56px +} +.UploadFiles .preview { + -moz-min-width: 80px; + -ms-min-width: 80px; + -o-min-width: 80px; + -webkit-min-width: 80px; + min-width: 80px; + display: block; +} +.UploadFiles .name { + width: 288px; + -ms-word-break: break-all; + -moz-word-break:break-all; + -o-word-break:break-all; + word-break: break-all; + font-weight: bold; +} +.UploadFiles .size { + font-style:italic; +} +.UploadFiles .error { + color:red +} + diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/FileUploader.ashx b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/FileUploader.ashx new file mode 100644 index 00000000000..07acbe43adc --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/FileUploader.ashx @@ -0,0 +1 @@ +<%@ WebHandler Language="C#" CodeBehind="FileUploader.ashx.cs" Class="DNNConnect.CKEditorProvider.Browser.FileUploader" %> diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/FileUploader.ashx.cs b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/FileUploader.ashx.cs new file mode 100644 index 00000000000..c7020b3aec1 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/FileUploader.ashx.cs @@ -0,0 +1,246 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.RegularExpressions; +using System.Web; +using System.Web.Script.Serialization; +using DNNConnect.CKEditorProvider.Objects; +using DNNConnect.CKEditorProvider.Utilities; +using DotNetNuke.Entities.Users; +using DotNetNuke.Services.FileSystem; + +namespace DNNConnect.CKEditorProvider.Browser +{ + + /// + /// The File Upload Handler + /// + public class FileUploader : IHttpHandler + { + /// + /// The JavaScript Serializer + /// + private readonly JavaScriptSerializer js = new JavaScriptSerializer(); + + /// + /// Gets a value indicating whether another request can use the instance. + /// + public bool IsReusable + { + get + { + return false; + } + } + + /// + /// Gets a value indicating whether [override files]. + /// + /// + /// true if [override files]; otherwise, false. + /// + private bool OverrideFiles + { + get + { + return HttpContext.Current.Request["overrideFiles"].Equals("1") + || HttpContext.Current.Request["overrideFiles"].Equals( + "true", + StringComparison.InvariantCultureIgnoreCase); + } + } + + /// + /// Gets the storage folder. + /// + /// + /// The storage folder. + /// + private IFolderInfo StorageFolder + { + get + { + return FolderManager.Instance.GetFolder(Convert.ToInt32(HttpContext.Current.Request["storageFolderID"])); + } + } + + /* + /// + /// Gets the storage folder. + /// + /// + /// The storage folder. + /// + private PortalSettings PortalSettings + { + get + { + return new PortalSettings(Convert.ToInt32(HttpContext.Current.Request["portalID"])); + } + }*/ + + /// + /// Enables processing of HTTP Web requests by a custom HttpHandler that implements the interface. + /// + /// An object that provides references to the intrinsic server objects (for example, Request, Response, Session, and Server) used to service HTTP requests. + public void ProcessRequest(HttpContext context) + { + context.Response.AddHeader("Pragma", "no-cache"); + context.Response.AddHeader("Cache-Control", "private, no-cache"); + + HandleMethod(context); + } + + /// + /// Returns the options. + /// + /// The context. + private static void ReturnOptions(HttpContext context) + { + context.Response.AddHeader("Allow", "DELETE,GET,HEAD,POST,PUT,OPTIONS"); + context.Response.StatusCode = 200; + } + + /// + /// Handle request based on method + /// + /// The context. + private void HandleMethod(HttpContext context) + { + switch (context.Request.HttpMethod) + { + case "HEAD": + case "GET": + /*if (GivenFilename(context)) + { + this.DeliverFile(context); + } + else + { + ListCurrentFiles(context); + }*/ + + break; + + case "POST": + case "PUT": + UploadFile(context); + break; + + case "OPTIONS": + ReturnOptions(context); + break; + + default: + context.Response.ClearHeaders(); + context.Response.StatusCode = 405; + break; + } + } + + /// + /// Uploads the file. + /// + /// The context. + private void UploadFile(HttpContext context) + { + var statuses = new List(); + + UploadWholeFile(context, statuses); + + WriteJsonIframeSafe(context, statuses); + } + + /// + /// Uploads the whole file. + /// + /// The context. + /// The statuses. + private void UploadWholeFile(HttpContext context, List statuses) + { + for (int i = 0; i < context.Request.Files.Count; i++) + { + var file = context.Request.Files[i]; + + var fileName = Path.GetFileName(file.FileName); + + if (!string.IsNullOrEmpty(fileName)) + { + // Replace dots in the name with underscores (only one dot can be there... security issue). + fileName = Regex.Replace(fileName, @"\.(?![^.]*$)", "_", RegexOptions.None); + + // Check for Illegal Chars + if (Utility.ValidateFileName(fileName)) + { + fileName = Utility.CleanFileName(fileName); + } + + // Convert Unicode Chars + fileName = Utility.ConvertUnicodeChars(fileName); + } + else + { + throw new HttpRequestValidationException("File does not have a name"); + } + + if (fileName.Length > 220) + { + fileName = fileName.Substring(fileName.Length - 220); + } + + var fileNameNoExtenstion = Path.GetFileNameWithoutExtension(fileName); + + // Rename File if Exists + if (!OverrideFiles) + { + var counter = 0; + + while (File.Exists(Path.Combine(StorageFolder.PhysicalPath, fileName))) + { + counter++; + fileName = string.Format( + "{0}_{1}{2}", + fileNameNoExtenstion, + counter, + Path.GetExtension(file.FileName)); + } + } + + var fileManager = FileManager.Instance; + var contentType = fileManager.GetContentType(Path.GetExtension(fileName)); + var userId = UserController.Instance.GetCurrentUserInfo().UserID; + fileManager.AddFile(StorageFolder, fileName, file.InputStream, OverrideFiles, true, contentType, userId); + + var fullName = Path.GetFileName(fileName); + statuses.Add(new FilesUploadStatus(fullName, file.ContentLength)); + } + } + + /// + /// Writes the JSON iFrame safe. + /// + /// The context. + /// The statuses. + private void WriteJsonIframeSafe(HttpContext context, List statuses) + { + context.Response.AddHeader("Vary", "Accept"); + try + { + context.Response.ContentType = context.Request["HTTP_ACCEPT"].Contains("application/json") + ? "application/json" + : "text/plain"; + } + catch + { + context.Response.ContentType = "text/plain"; + } + + var jsonObj = js.Serialize(statuses.ToArray()); + context.Response.Write(jsonObj); + } + } +} \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/AscendingArrow.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/AscendingArrow.png new file mode 100644 index 00000000000..a64b349a49d Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/AscendingArrow.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/Clear.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/Clear.png new file mode 100644 index 00000000000..99cabe47eb0 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/Clear.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/CreateFolder.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/CreateFolder.png new file mode 100644 index 00000000000..44482e87f00 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/CreateFolder.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/DeleteFile.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/DeleteFile.png new file mode 100644 index 00000000000..599d62852a0 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/DeleteFile.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/DescendingArrow.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/DescendingArrow.png new file mode 100644 index 00000000000..80f0d40d2bb Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/DescendingArrow.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/DetailView.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/DetailView.png new file mode 100644 index 00000000000..89a3358a7ab Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/DetailView.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/DialogBackground.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/DialogBackground.png new file mode 100644 index 00000000000..7f1fdb7914e Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/DialogBackground.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/DownloadButton.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/DownloadButton.png new file mode 100644 index 00000000000..c18078714ba Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/DownloadButton.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/IconsView.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/IconsView.png new file mode 100644 index 00000000000..08a29950261 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/IconsView.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/ListView.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/ListView.png new file mode 100644 index 00000000000..5a3e4f25b2f Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/ListView.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/Page.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/Page.gif new file mode 100644 index 00000000000..1b5448962ed Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/Page.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/Preview.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/Preview.png new file mode 100644 index 00000000000..8a31adab544 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/Preview.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/ResizeImage.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/ResizeImage.png new file mode 100644 index 00000000000..e3483f6121c Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/ResizeImage.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/SortAscending.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/SortAscending.png new file mode 100644 index 00000000000..1ea86fc2921 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/SortAscending.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/SortDescending.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/SortDescending.png new file mode 100644 index 00000000000..104d1e1c205 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/SortDescending.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/SyncFolder.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/SyncFolder.png new file mode 100644 index 00000000000..958cdcabc4b Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/SyncFolder.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/UploadButton.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/UploadButton.png new file mode 100644 index 00000000000..3e9402794a0 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/UploadButton.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/folder.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/folder.gif new file mode 100644 index 00000000000..ba436c645df Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/folder.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/folderLocked.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/folderLocked.gif new file mode 100644 index 00000000000..1196016fe90 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/folderLocked.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/folderOpen.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/folderOpen.gif new file mode 100644 index 00000000000..c9d9550a275 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/folderOpen.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/folderOpenLocked.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/folderOpenLocked.gif new file mode 100644 index 00000000000..f55e65f1179 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/folderOpenLocked.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/folderdb.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/folderdb.gif new file mode 100644 index 00000000000..4299ad54111 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/folderdb.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/loading.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/loading.gif new file mode 100644 index 00000000000..90f28cbdbb3 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/loading.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/minus.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/minus.gif new file mode 100644 index 00000000000..a1f4a42d781 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/minus.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/plus.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/plus.gif new file mode 100644 index 00000000000..693c5bdf1ee Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/plus.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/progressbar.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/progressbar.gif new file mode 100644 index 00000000000..fbcce6bc9ab Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/progressbar.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/7z.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/7z.png new file mode 100644 index 00000000000..b776f83b824 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/7z.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Css.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Css.png new file mode 100644 index 00000000000..3b22de3103f Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Css.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Divx.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Divx.png new file mode 100644 index 00000000000..196aed21aba Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Divx.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Dll.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Dll.png new file mode 100644 index 00000000000..081f0d904d2 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Dll.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Dmg.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Dmg.png new file mode 100644 index 00000000000..23c2910b33c Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Dmg.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Doc.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Doc.png new file mode 100644 index 00000000000..b91b8199291 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Doc.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Dvf.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Dvf.png new file mode 100644 index 00000000000..62bbb95aa4d Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Dvf.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Eps.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Eps.png new file mode 100644 index 00000000000..24fce066810 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Eps.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Exe.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Exe.png new file mode 100644 index 00000000000..c9cec757044 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Exe.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Fla.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Fla.png new file mode 100644 index 00000000000..98123fe01ce Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Fla.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Flv.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Flv.png new file mode 100644 index 00000000000..a9630d7f9c3 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Flv.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Gz.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Gz.png new file mode 100644 index 00000000000..d4517e1c16b Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Gz.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Html.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Html.png new file mode 100644 index 00000000000..d86548cd524 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Html.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Iso.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Iso.png new file mode 100644 index 00000000000..a0453af96c8 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Iso.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Jar.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Jar.png new file mode 100644 index 00000000000..383aea4fa1e Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Jar.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Log.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Log.png new file mode 100644 index 00000000000..d222bd68aa8 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Log.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/M4b.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/M4b.png new file mode 100644 index 00000000000..d56c4d47a22 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/M4b.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/M4p.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/M4p.png new file mode 100644 index 00000000000..55d6371c74d Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/M4p.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/M4v.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/M4v.png new file mode 100644 index 00000000000..c7b0b1f7e9a Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/M4v.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mcd.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mcd.png new file mode 100644 index 00000000000..c268b87dff8 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mcd.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mdb.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mdb.png new file mode 100644 index 00000000000..7b7b83611d0 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mdb.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mid.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mid.png new file mode 100644 index 00000000000..4d3e4828366 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mid.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mov.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mov.png new file mode 100644 index 00000000000..a05c7efd9bd Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mov.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mp2.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mp2.png new file mode 100644 index 00000000000..bbc5f049c67 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mp2.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mp4.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mp4.png new file mode 100644 index 00000000000..a197fd4b9cf Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mp4.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mpeg.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mpeg.png new file mode 100644 index 00000000000..d5d3c4ebc95 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mpeg.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mpg.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mpg.png new file mode 100644 index 00000000000..948b6431806 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mpg.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Msi.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Msi.png new file mode 100644 index 00000000000..97a8a3b191a Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Msi.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mswmm.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mswmm.png new file mode 100644 index 00000000000..d70aaa75ba3 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Mswmm.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Ogg.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Ogg.png new file mode 100644 index 00000000000..ed25e7f6cc5 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Ogg.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Pdf.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Pdf.png new file mode 100644 index 00000000000..03ade911974 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Pdf.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Png.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Png.png new file mode 100644 index 00000000000..76230d30605 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Png.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Pps.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Pps.png new file mode 100644 index 00000000000..ea5eae0f1c5 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Pps.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Ps.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Ps.png new file mode 100644 index 00000000000..27987575d9b Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Ps.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Psd.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Psd.png new file mode 100644 index 00000000000..b98ff860153 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Psd.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Pst.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Pst.png new file mode 100644 index 00000000000..4f5f61f424e Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Pst.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Ptb.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Ptb.png new file mode 100644 index 00000000000..a3568dd4d5f Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Ptb.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Pub.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Pub.png new file mode 100644 index 00000000000..4a71c01b604 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Pub.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Ram.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Ram.png new file mode 100644 index 00000000000..c8e10a7e302 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Ram.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Rar.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Rar.png new file mode 100644 index 00000000000..4bfaf31ba2f Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Rar.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Rm.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Rm.png new file mode 100644 index 00000000000..a0d693e16a0 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Rm.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Rmvb.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Rmvb.png new file mode 100644 index 00000000000..712825773c8 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Rmvb.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Rtf.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Rtf.png new file mode 100644 index 00000000000..cae2c95cff0 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Rtf.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Swf.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Swf.png new file mode 100644 index 00000000000..dd514a138ae Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Swf.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Tgz.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Tgz.png new file mode 100644 index 00000000000..57609903013 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Tgz.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Tif.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Tif.png new file mode 100644 index 00000000000..c7d4da88f74 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Tif.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Tmp.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Tmp.png new file mode 100644 index 00000000000..c3d20e36259 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Tmp.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Torrent.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Torrent.png new file mode 100644 index 00000000000..6e8003c4244 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Torrent.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Ttf.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Ttf.png new file mode 100644 index 00000000000..dda399e3df4 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Ttf.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Txt.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Txt.png new file mode 100644 index 00000000000..a7580600dd4 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Txt.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Vcard.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Vcard.png new file mode 100644 index 00000000000..952a1285972 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Vcard.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Vcd.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Vcd.png new file mode 100644 index 00000000000..76ce88d51a8 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Vcd.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Video.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Video.png new file mode 100644 index 00000000000..46531e8b802 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Video.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Vob.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Vob.png new file mode 100644 index 00000000000..e0a68587be3 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Vob.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Wav.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Wav.png new file mode 100644 index 00000000000..a8d7b142d7d Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Wav.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Wma.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Wma.png new file mode 100644 index 00000000000..79235c9e2ea Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Wma.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Wmv.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Wmv.png new file mode 100644 index 00000000000..9df18aa63ed Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Wmv.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Wps.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Wps.png new file mode 100644 index 00000000000..c06be46a368 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Wps.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Xls.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Xls.png new file mode 100644 index 00000000000..7a6b3cecf28 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Xls.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Xml.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Xml.png new file mode 100644 index 00000000000..bb2ff689120 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Xml.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Xpi.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Xpi.png new file mode 100644 index 00000000000..8fa90fa35fc Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Xpi.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Zip.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Zip.png new file mode 100644 index 00000000000..3b1b54fd454 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/Zip.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/mime.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/mime.png new file mode 100644 index 00000000000..48457ddd3ef Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/mime.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/resource.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/resource.png new file mode 100644 index 00000000000..491d9a8a47c Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/resource.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/unknown.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/unknown.png new file mode 100644 index 00000000000..d030bf59ad8 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/Images/types/unknown.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/ProcessImage.ashx b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/ProcessImage.ashx new file mode 100644 index 00000000000..3d00cd7abe8 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/ProcessImage.ashx @@ -0,0 +1 @@ +<%@ WebHandler Language="C#" CodeBehind="ProcessImage.ashx.cs" Class="DNNConnect.CKEditorProvider.Browser.ProcessImage" %> diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/ProcessImage.ashx.cs b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/ProcessImage.ashx.cs new file mode 100644 index 00000000000..87a917b9bea --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/ProcessImage.ashx.cs @@ -0,0 +1,331 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + +using System; +using System.Drawing; +using System.Drawing.Imaging; +using System.IO; +using System.Web; +using DotNetNuke.Common.Utilities; +using DotNetNuke.Entities.Portals; +using DotNetNuke.Security.Permissions; +using DotNetNuke.Services.Exceptions; +using DotNetNuke.Services.FileSystem; + +namespace DNNConnect.CKEditorProvider.Browser +{ + + /// + /// The process image. + /// + public class ProcessImage : IHttpHandler + { + #region Properties + + /// + /// Gets a value indicating whether IsReusable. + /// + public bool IsReusable + { + get + { + return false; + } + } + + #endregion + + #region Public Methods + + /// + /// The get thumb abort. + /// + /// + /// Returns abort. + /// + public bool GetThumbAbort() + { + return false; + } + + #endregion + + #region Implemented Interfaces + + #region IHttpHandler + + /// + /// The process request. + /// + /// + /// The context. + /// + public void ProcessRequest(HttpContext context) + { + float imageH = float.Parse(context.Request["imageH"]); + float imageW = float.Parse(context.Request["imageW"]); + float angle = float.Parse(context.Request["imageRotate"]); + int sourceImageId = int.Parse(context.Request["fileId"]); + float imageX = float.Parse(context.Request["imageX"]); + float imageY = float.Parse(context.Request["imageY"]); + float selectorH = float.Parse(context.Request["selectorH"]); + float selectorW = float.Parse(context.Request["selectorW"]); + float selectorX = float.Parse(context.Request["selectorX"]); + float selectorY = float.Parse(context.Request["selectorY"]); + float viewPortH = float.Parse(context.Request["viewPortH"]); + float viewPortW = float.Parse(context.Request["viewPortW"]); + + bool bSaveFile; + + try + { + bSaveFile = bool.Parse(context.Request["saveFile"]); + } + catch (Exception) + { + bSaveFile = false; + } + + string sNewFileName = null; + + if (!string.IsNullOrEmpty(context.Request["newFileName"])) + { + sNewFileName = context.Request["newFileName"]; + } + + float pWidth = imageW; + float pHeight = imageH; + + var file = FileManager.Instance.GetFile(sourceImageId); + if (file == null) + { + return; + + } + + Bitmap img = (Bitmap)Image.FromStream(FileManager.Instance.GetFileContent(file)); + + // Resize + Bitmap imageP = ResizeImage(img, Convert.ToInt32(pWidth), Convert.ToInt32(pHeight)); + + // Rotate if angle is not 0.00 or 360 + if (angle > 0.0F && angle < 360.00F) + { + imageP = (Bitmap)RotateImage(imageP, angle); + pWidth = imageP.Width; + pHeight = imageP.Height; + } + + // Calculate Coords of the Image into the ViewPort + float srcX; + float dstX; + float srcY; + float dstY; + + if (pWidth > viewPortW) + { + srcX = Math.Abs(imageX - Math.Abs((imageW - pWidth) / 2)); + dstX = 0; + } + else + { + srcX = 0; + dstX = imageX + ((imageW - pWidth) / 2); + } + + if (pHeight > viewPortH) + { + srcY = Math.Abs(imageY - Math.Abs((imageH - pHeight) / 2)); + dstY = 0; + } + else + { + srcY = 0; + dstY = imageY + ((imageH - pHeight) / 2); + } + + // Get Image viewed into the ViewPort + imageP = ImageCopy(imageP, dstX, dstY, srcX, srcY, viewPortW, viewPortH); + + // Get Selector Portion + imageP = ImageCopy(imageP, 0, 0, selectorX, selectorY, selectorW, selectorH); + + if (bSaveFile) + { + context.Response.ContentType = "text/plain"; + + var sourceFolder = FolderManager.Instance.GetFolder(file.FolderId); + if (PortalSettings.Current != null + && !HasWritePermission(sourceFolder.FolderPath)) + { + throw new SecurityException("You don't have write permission to save files under this folder."); + } + + using (var stream = new MemoryStream()) + { + var fileName = GenerateName(file, sNewFileName); + imageP.Save(stream, img.RawFormat); + FileManager.Instance.AddFile(sourceFolder, fileName, stream); + } + } + else + { + context.Response.ContentType = "image/jpeg"; + imageP.Save(context.Response.OutputStream, ImageFormat.Jpeg); + } + + imageP.Dispose(); + img.Dispose(); + } + + private bool HasWritePermission(string relativePath) + { + var portalId = PortalSettings.Current.PortalId; + return FolderPermissionController.HasFolderPermission(portalId, relativePath, "WRITE"); + } + + #endregion + + #endregion + + #region Methods + + /// + /// Generats the New File Path + /// + /// + /// New File Name for the Image + /// + /// + /// The Full Path of the Original Image + /// + /// + /// The generate name. + /// + private static string GenerateName(IFileInfo file, string sNewFileName) + { + string sNewFilePath = !string.IsNullOrEmpty(sNewFileName) + ? $"{CleanName(sNewFileName)}.{file.Extension}" + : $"{Path.GetFileNameWithoutExtension(sNewFileName)}_crop.{file.Extension}"; + + int iCounter = 0; + + var folder = FolderManager.Instance.GetFolder(file.FolderId); + while (FileManager.Instance.FileExists(folder, sNewFilePath)) + { + iCounter++; + + string sFileNameNoExt = Path.GetFileNameWithoutExtension(sNewFilePath); + sNewFilePath = $"{sFileNameNoExt}_{iCounter}.{file.Extension}"; + } + + return sNewFilePath; + } + + /// + /// The image copy. + /// + /// + /// The src bitmap. + /// + /// + /// The dst x. + /// + /// + /// The dst y. + /// + /// + /// The src x. + /// + /// + /// The src y. + /// + /// + /// The dst width. + /// + /// + /// The dst height. + /// + /// + /// Returns the copied Bitmap + /// + private static Bitmap ImageCopy( + Image srcBitmap, float dstX, float dstY, float srcX, float srcY, float dstWidth, float dstHeight) + { + // Create the new bitmap and associated graphics object + RectangleF sourceRec = new RectangleF(srcX, srcY, dstWidth, dstHeight); + RectangleF destRec = new RectangleF(dstX, dstY, dstWidth, dstHeight); + Bitmap bmp = new Bitmap(Convert.ToInt32(dstWidth), Convert.ToInt32(dstHeight)); + Graphics g = Graphics.FromImage(bmp); + + g.DrawImage(srcBitmap, destRec, sourceRec, GraphicsUnit.Pixel); + g.Dispose(); + + return bmp; + } + + /// + /// Method to rotate an image either clockwise or counter-clockwise + /// + /// + /// the image to be rotated + /// + /// + /// the angle (in degrees). + /// Positive values will rotate clockwise + /// negative values will rotate counter-clockwise + /// + /// + /// Returns the Rotated Image + /// + private static Image RotateImage(Image img, double rotationAngle) + { + Bitmap returnBitmap = new Bitmap(img.Width, img.Height + 1); + + Graphics g = Graphics.FromImage(returnBitmap); + + g.TranslateTransform((float)img.Width / 2, (float)img.Height / 2); + g.RotateTransform((float)rotationAngle); + g.TranslateTransform(-(float)img.Width / 2, -(float)img.Height / 2); + + g.DrawImage(img, img.Width / 2 - img.Height / 2, img.Height / 2 - img.Width / 2, img.Height, img.Width); + + return returnBitmap; + } + + /// + /// The resize image. + /// + /// + /// The img. + /// + /// + /// The width. + /// + /// + /// The height. + /// + /// + /// Returns the Resized Bitmap + /// + private Bitmap ResizeImage(Image img, int width, int height) + { + Image.GetThumbnailImageAbort callback = GetThumbAbort; + return (Bitmap)img.GetThumbnailImage(width, height, callback, IntPtr.Zero); + } + + private static string CleanName(string name) + { + name = name.Replace("\\", "/"); + if (name.Contains("/")) + { + name = name.Substring(name.LastIndexOf('/') + 1); + } + + return name; + } + + #endregion + } +} \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/jquery.fileupload-ui.css b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/jquery.fileupload-ui.css new file mode 100644 index 00000000000..cefd04a236b --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/jquery.fileupload-ui.css @@ -0,0 +1,57 @@ +@charset "UTF-8"; +/* + * jQuery File Upload UI Plugin CSS 9.0.0 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2010, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +.fileupload-buttonbar .btn, +.fileupload-buttonbar .toggle { + margin-bottom: 5px; +} +.progress-animated .progress-bar, +.progress-animated .bar { + background: url("Images/progressbar.gif") !important; + filter: none; +} +.fileupload-process { + float: right; + display: none; +} +.fileupload-processing .fileupload-process, +.files .processing .preview { + display: block; + width: 32px; + height: 32px; + background: url("../js/ckeditor/4.5.3/images/loading.gif") center no-repeat; + background-size: contain; +} +.files audio, +.files video { + max-width: 300px; +} + +@media (max-width: 767px) { + .fileupload-buttonbar .toggle, + .files .toggle, + .files .btn span { + display: none; + } + .files .name { + width: 80px; + word-wrap: break-word; + } + .files audio, + .files video { + max-width: 80px; + } + .files img, + .files canvas { + max-width: 100%; + } +} diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/jquery.fileupload.css b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/jquery.fileupload.css new file mode 100644 index 00000000000..fb6044d34fd --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/jquery.fileupload.css @@ -0,0 +1,36 @@ +@charset "UTF-8"; +/* + * jQuery File Upload Plugin CSS 1.3.0 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +.fileinput-button { + position: relative; + overflow: hidden; +} +.fileinput-button input { + position: absolute; + top: 0; + right: 0; + margin: 0; + opacity: 0; + -ms-filter: 'alpha(opacity=0)'; + font-size: 200px; + direction: ltr; + cursor: pointer; +} + +/* Fixes for IE < 8 */ +@media screen\9 { + .fileinput-button input { + filter: alpha(opacity=0); + font-size: 100%; + height: 100%; + } +} diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/js/Browser.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/js/Browser.js new file mode 100644 index 00000000000..1f351cbc1e9 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/js/Browser.js @@ -0,0 +1,48 @@ +(function($) { + $.browser = {}; + (function() { + $.browser.msie = false; + $.browser.version = 0; + if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) { + $.browser.msie = true; + $.browser.version = RegExp.$1; + } + })(); + + window.SwitchView = function(n) { + $("#ListViewState").val(n); + var t = $("#FilesBox ul"); + t.attr("class", "Files" + n); + $(".SwitchDetailView").css("font-weight", "normal"); + $(".SwitchListView").css("font-weight", "normal"); + $(".SwitchIconsView").css("font-weight", "normal"); + $(".Switch" + n).css("font-weight", "bold"); + }; + + $(document).ready(function () { + $("#BrowserMode input:checked").parent("td").addClass("SelectedPager"); + $("#dnntreeTabs li .rtIn, #dnntreeTabs li .rtImg").click(function() { + $("#panelLoading").show(); + }); + SwitchView($("#ListViewState").val()); + $('input[type="submit"],.LinkNormal,.LinkDisabled').button(), $(".Toolbar").buttonset(); + $("#txtWidth,#txtHeight").spinner({ + min: 0, + max: 640, + step: 1, + spin: function(event, ui) { + $(this).trigger('change'); + } + }); + $("#BrowserMode td").addClass("ui-state-default ui-corner-top"); + $("#BrowserMode label").addClass("ui-tabs-anchor"); + $(".SelectedPager").addClass("ui-tabs-active ui-state-active ui-state-focus"); + $("#BrowserMode td").hover(function () { + $(this).addClass("ui-state-hover"); + }, function() { + $(this).removeClass("ui-state-hover"); + }); + + $("#panUploadDiv .MessageBox").draggable({ cursor: "move", handle: "div.modalHeader" }); + }); +}(jQuery)); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/js/jquery.ImageResizer.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/js/jquery.ImageResizer.js new file mode 100644 index 00000000000..a1680408711 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/js/jquery.ImageResizer.js @@ -0,0 +1,22 @@ +function ResizeMe(element, maxWidth, maxHeight) { + $(element).each(function () { + $(this).load(function () { + $(this).css("width", "auto").css("height", "auto"); + $(this).removeAttr("width").removeAttr("height"); + var width = $(this).width(); + var height = $(this).height(); + if (width > maxWidth) { + var ratio = maxWidth / width; + $(this).css("width", maxWidth); + $(this).css("height", height * ratio); + height = height * ratio + } + if (height > maxHeight) { + var ratio = maxHeight / height; + $(this).css("height", maxHeight); + $(this).css("width", width * ratio); + width = width * ratio + } + }) + }) +} \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/js/jquery.ImageSlider.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/js/jquery.ImageSlider.js new file mode 100644 index 00000000000..742a33e7689 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/js/jquery.ImageSlider.js @@ -0,0 +1,78 @@ +var maxWidth = 360; +var maxHeight = 300; +var ratio = 100; +function SetupSlider(sliderId, minimumValue, maximumValue, inStepsOf, orientationValue, valueValue, inputControlClass) { + jQuery(sliderId).slider({ + min: minimumValue, + max: maximumValue, + step: inStepsOf, + orientation: orientationValue, + value: valueValue, + slide: function (event, ui) { + jQuery(inputControlClass).val(ui.value); + SetPreview(inputControlClass, ui.value) + } + }); + jQuery(inputControlClass).val(jQuery(sliderId).slider("value")) +} +function SetSliderValue(sliderId, textBoxControl) { + var amount = textBoxControl.value; + var minimum = jQuery(sliderId).slider("min"); + var maximum = jQuery(sliderId).slider("max"); + if (amount > minimum || amount < maximum) { + jQuery(sliderId).slider('option', 'value', amount) + } +} +function SetPreview(inputClass, Value) { + var height = jQuery("#imgOriginal").css("height"); + var width = jQuery("#imgOriginal").css("width"); + if (inputClass == '#txtWidth') { + width = Value; + if (width > maxWidth) { + ratio = maxWidth / width; + jQuery('#imgResized').css("width", maxWidth); + jQuery('#imgResized').css("height", height * ratio); + height = height * ratio + } else { + jQuery('#imgResized').css("width", width) + } + } + if (inputClass == '#txtHeight') { + height = Value; + if (height > maxHeight) { + ratio = maxHeight / height; + jQuery('#imgResized').css("height", maxHeight); + jQuery('#imgResized').css("width", width * ratio); + width = width * ratio + } else { + jQuery('#imgResized').css("height", height) + } + } +} +function ChangedSliderW(textControl) { + var width = textControl.value; + var height = jQuery("#imgOriginal").css("height"); + jQuery("#SliderWidth").slider('option', 'value', textControl.value); + if (width > maxWidth) { + ratio = maxWidth / width; + jQuery('#imgResized').css("width", maxWidth); + jQuery('#imgResized').css("height", height * ratio); + height = height * ratio; + width = width * ratio + } else { + jQuery('#imgResized').css("width", width) + } +} +function ChangedSliderH(textControl) { + jQuery("#SliderHeight").slider('option', 'value', textControl.value); + var height = textControl.value; + var width = jQuery("#imgOriginal").css("width"); + if (height > maxHeight) { + ratio = maxHeight / height; + jQuery('#imgResized').css("height", maxHeight); + jQuery('#imgResized').css("width", width * ratio); + width = width * ratio + } else { + jQuery('#imgResized').css("height", height) + } +} \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/js/jquery.cropzoom.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/js/jquery.cropzoom.js new file mode 100644 index 00000000000..92b79088e3f --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/js/jquery.cropzoom.js @@ -0,0 +1,487 @@ +(function (n) { + function t(n) { + return n.nodeType == 1 && n.namespaceURI == "http://www.w3.org/2000/svg" + } + var r, u, f, e, i, o; + n.fn.cropzoom = function (t) { + return this.each(function () { + function p(n) { + n.position.top > 0 && (i("image").posY = 0), n.position.left > 0 && (i("image").posX = 0); + var t = -(i("image").h - n.helper.parent().parent().height()), + r = -(i("image").w - n.helper.parent().parent().width()); + n.position.top < t && (i("image").posY = t), n.position.left < r && (i("image").posX = r), s() + } + function d() { + var n = r.image.source.split("."); + return n[n.length - 1] + } + function w() { + i("image").scaleX = r.width / i("image").w, i("image").scaleY = r.height / i("image").h + } + function g() { + var u, f, n, t; + r.image.startZoom != 0 ? (u = r.image.width * Math.abs(r.image.startZoom) / 100, f = r.image.height * Math.abs(r.image.startZoom) / 100, i("image").h = f, i("image").w = u, i("image").posY != 0 && i("image").posX != 0 && (i("image").posY = i("image").h > r.height ? Math.abs(r.height / 2 - i("image").h / 2) : r.height / 2 - i("image").h / 2, i("image").posX = i("image").w > r.width ? Math.abs(r.width / 2 - i("image").w / 2) : r.width / 2 - i("image").w / 2)) : (n = i("image").scaleX, t = i("image").scaleY, t < n ? (i("image").h = r.height, i("image").w = Math.round(i("image").w * t)) : (i("image").h = Math.round(i("image").h * n), i("image").w = r.width)), i("image").w < r.width && i("image").h < r.height && (r.image.snapToContainer = !1), s() + } + function s() { + var t = "", + r = ""; + n(function () { + ft(), n.support.opacity ? (t = "rotate(" + i("image").rotation + "," + (i("image").posX + i("image").w / 2) + "," + (i("image").posY + i("image").h / 2) + ")", r = " translate(" + i("image").posX + "," + i("image").posY + ")", t += r, n(f).attr("transform", t)) : n.support.leadingWhitespace ? (t = "rotate(" + i("image").rotation + "deg)", n(f).css({ + msTransform: t, + top: i("image").posY, + left: i("image").posX + })) : (t = i("image").rotation, n(f).css({ + rotation: t, + top: i("image").posY, + left: i("image").posX + })) + }) + } + function nt() { + var t = n("
      ").attr("id", "rotationContainer").mouseover(function () { + n(this).css("opacity", 1) + }).mouseout(function () { + n(this).css("opacity", .6) + }), + e = n("
      ").attr("id", "rotationMin").html("0"), + o = n("
      ").attr("id", "rotationMax").html("360"), + f = n("
      ").attr("id", "rotationSlider"), + c = "vertical", + h = Math.abs(360 - r.image.rotation); + r.expose.slidersOrientation == "horizontal" && (c = "horizontal", h = r.image.rotation), f.slider({ + orientation: c, + value: h, + range: "max", + min: 0, + max: 360, + step: r.rotationSteps > 360 || r.rotationSteps < 0 ? 1 : r.rotationSteps, + slide: function (n, t) { + if (i("image").rotation = h == 360 ? Math.abs(360 - t.value) : Math.abs(t.value), s(), r.image.onRotate != null) r.image.onRotate(f, i("image").rotation) + } + }), t.append(e), t.append(f), t.append(o), r.expose.rotationElement != "" ? (f.addClass(r.expose.slidersOrientation), t.addClass(r.expose.slidersOrientation), e.addClass(r.expose.slidersOrientation), o.addClass(r.expose.slidersOrientation), n(r.expose.rotationElement).empty().append(t)) : (f.addClass("vertical"), t.addClass("vertical"), e.addClass("vertical"), o.addClass("vertical"), t.css({ + position: "absolute", + top: 5, + left: 5, + opacity: .6 + }), u.append(t)) + } + function tt() { + var t = n("
      ").attr("id", "zoomContainer").mouseover(function () { + n(this).css("opacity", 1) + }).mouseout(function () { + n(this).css("opacity", .6) + }), + o = n("
      ").attr("id", "zoomMin").html("-<\/b>"), + h = n("
      ").attr("id", "zoomMax").html("+<\/b>"), + e = n("
      ").attr("id", "zoomSlider"); + e.slider({ + orientation: r.expose.zoomElement != "" ? r.expose.slidersOrientation : "vertical", + value: r.image.startZoom != 0 ? r.image.startZoom : it(i("image")), + min: r.image.useStartZoomAsMinZoom ? r.image.startZoom : r.image.minZoom, + max: r.image.maxZoom, + step: r.zoomSteps > r.image.maxZoom || r.zoomSteps < 0 ? 1 : r.zoomSteps, + slide: function (t, u) { + var l = r.expose.slidersOrientation == "vertical" ? r.image.maxZoom - u.value : u.value, + e = r.image.width * Math.abs(l) / 100, + o = r.image.height * Math.abs(l) / 100; + n.support.opacity ? (n(f).attr("width", e + "px"), n(f).attr("height", o + "px")) : n(f).css({ + width: e + "px", + height: o + "px" + }); + var h = i("image").w / 2 - e / 2, + c = i("image").h / 2 - o / 2, + a = h > 0 ? i("image").posX + Math.abs(h) : i("image").posX - Math.abs(h), + v = c > 0 ? i("image").posY + Math.abs(c) : i("image").posY - Math.abs(c); + if (i("image").posX = a, i("image").posY = v, i("image").w = e, i("image").h = o, w(), s(), r.image.onZoom != null) r.image.onZoom(f, i("image")) + } + }), r.slidersOrientation == "vertical" ? (t.append(h), t.append(e), t.append(o)) : (t.append(o), t.append(e), t.append(h)), r.expose.zoomElement != "" ? (o.addClass(r.expose.slidersOrientation), h.addClass(r.expose.slidersOrientation), e.addClass(r.expose.slidersOrientation), t.addClass(r.expose.slidersOrientation), n(r.expose.zoomElement).empty().append(t)) : (o.addClass("vertical"), h.addClass("vertical"), e.addClass("vertical"), t.addClass("vertical"), t.css({ + position: "absolute", + top: 5, + right: 5, + opacity: .6 + }), u.append(t)) + } + function it() { + return i("image").w > i("image").h ? r.image.maxZoom - i("image").w * 100 / r.image.width : r.image.maxZoom - i("image").h * 100 / r.image.height + } + function rt() { + r.selector.centered && (i("selector").y = r.height / 2 - i("selector").h / 2, i("selector").x = r.width / 2 - i("selector").w / 2), e = n("
      ").attr("id", u[0].id + "_selector").css({ + width: i("selector").w, + height: i("selector").h, + top: i("selector").y + "px", + left: i("selector").x + "px", + border: "1px dashed " + r.selector.borderColor, + position: "absolute", + cursor: "move" + }).mouseover(function () { + n(this).css({ + border: "1px dashed " + r.selector.borderColorHover + }) + }).mouseout(function () { + n(this).css({ + border: "1px dashed " + r.selector.borderColor + }) + }), e.draggable({ + containment: "parent", + iframeFix: !0, + refreshPositions: !0, + drag: function (n, t) { + if (i("selector").x = t.position.left, i("selector").y = t.position.top, a(t), l(), r.selector.onSelectorDrag != null) r.selector.onSelectorDrag(e, i("selector")) + }, + stop: function () { + if (r.selector.hideOverlayOnDragAndResize && b(), r.selector.onSelectorDragStop != null) r.selector.onSelectorDragStop(e, i("selector")) + } + }), e.resizable({ + aspectRatio: r.selector.aspectRatio, + maxHeight: r.selector.maxHeight, + maxWidth: r.selector.maxWidth, + minHeight: r.selector.h, + minWidth: r.selector.w, + containment: "parent", + resize: function (n, t) { + if (i("selector").w = e.width(), i("selector").h = e.height(), a(t), l(), r.selector.onSelectorResize != null) r.selector.onSelectorResize(e, i("selector")) + }, + stop: function () { + if (r.selector.hideOverlayOnDragAndResize && b(), r.selector.onSelectorResizeStop != null) r.selector.onSelectorResizeStop(e, i("selector")) + } + }), l(e), u.append(e) + } + function l() { + var t = null, + u = !1; + t = e.find("#infoSelector").length > 0 ? e.find("#infoSelector") : n("
      ").attr("id", "infoSelector").css({ + position: "absolute", + top: 0, + left: 0, + background: r.selector.bgInfoLayer, + opacity: .6, + "font-size": r.selector.infoFontSize + "px", + "font-family": "Arial", + color: r.selector.infoFontColor, + width: "100%" + }), r.selector.showPositionsOnDrag && (t.html("X:" + Math.round(i("selector").x) + "px - Y:" + Math.round(i("selector").y) + "px"), u = !0), r.selector.showDimetionsOnDrag && (u ? t.html(t.html() + " | W:" + i("selector").w + "px - H:" + i("selector").h + "px") : t.html("W:" + i("selector").w + "px - H:" + i("selector").h + "px")), e.append(t) + } + function ut() { + n.each(["t", "b", "l", "r"], function () { + var t = n("
      ").attr("id", this).css({ + overflow: "hidden", + background: r.overlayColor, + opacity: .6, + position: "absolute", + "z-index": 2, + visibility: "visible" + }); + u.append(t) + }) + } + function a(n) { + u.find("#t").css({ + display: "block", + width: r.width, + height: n.position.top, + left: 0, + top: 0 + }), u.find("#b").css({ + display: "block", + width: r.width, + height: r.height, + top: n.position.top + e.height() + "px", + left: 0 + }), u.find("#l").css({ + display: "block", + left: 0, + top: n.position.top, + width: n.position.left, + height: e.height() + }), u.find("#r").css({ + display: "block", + top: n.position.top, + left: n.position.left + e.width() + "px", + width: r.width, + height: e.height() + "px" + }) + } + function b() { + u.find("#t").hide(), u.find("#b").hide(), u.find("#l").hide(), u.find("#r").hide() + } + function v(n, t) { + u.data(n, t) + } + function i(n) { + return u.data(n) + } + function ft() { + var r = i("image").rotation * Math.PI / 180, + n = Math.sin(r), + t = Math.cos(r), + u = t * i("image").w, + f = n * i("image").w, + e = -n * i("image").h, + o = t * i("image").h, + s = t * i("image").w - n * i("image").h, + h = n * i("image").w + t * i("image").h, + c = Math.min(0, u, e, s), + a = Math.max(0, u, e, s), + l = Math.min(0, f, o, h), + v = Math.max(0, f, o, h); + i("image").rotW = a - c, i("image").rotH = v - l, i("image").rotY = l, i("image").rotX = c + } + function et() { + var u = n("
      <\/td> <\/td> <\/td> <\/tr>
      <\/td> <\/td> <\/td> <\/tr>
      <\/td> <\/td> <\/td> <\/tr> <\/table>"), + t = [], + i; + for (t.push(n("
      ").addClass("mvn_no mvn")), t.push(n("
      ").addClass("mvn_n mvn")), t.push(n("
      ").addClass("mvn_ne mvn")), t.push(n("
      ").addClass("mvn_o mvn")), t.push(n("
      ").addClass("mvn_c")), t.push(n("
      ").addClass("mvn_e mvn")), t.push(n("
      ").addClass("mvn_so mvn")), t.push(n("
      ").addClass("mvn_s mvn")), t.push(n("
      ").addClass("mvn_se mvn")), i = 0; i < t.length; i++) t[i].mousedown(function () { + k(this) + }).mouseup(function () { + clearTimeout(h) + }).mouseout(function () { + clearTimeout(h) + }), u.find("td:eq(" + i + ")").append(t[i]), n(r.expose.elementMovement).empty().append(u) + } + function k(t) { + if (n(t).hasClass("mvn_no") ? (i("image").posX = i("image").posX - r.expose.movementSteps, i("image").posY = i("image").posY - r.expose.movementSteps) : n(t).hasClass("mvn_n") ? i("image").posY = i("image").posY - r.expose.movementSteps : n(t).hasClass("mvn_ne") ? (i("image").posX = i("image").posX + r.expose.movementSteps, i("image").posY = i("image").posY - r.expose.movementSteps) : n(t).hasClass("mvn_o") ? i("image").posX = i("image").posX - r.expose.movementSteps : n(t).hasClass("mvn_c") ? (i("image").posX = r.width / 2 - i("image").w / 2, i("image").posY = r.height / 2 - i("image").h / 2) : n(t).hasClass("mvn_e") ? i("image").posX = i("image").posX + r.expose.movementSteps : n(t).hasClass("mvn_so") ? (i("image").posX = i("image").posX - r.expose.movementSteps, i("image").posY = i("image").posY + r.expose.movementSteps) : n(t).hasClass("mvn_s") ? i("image").posY = i("image").posY + r.expose.movementSteps : n(t).hasClass("mvn_se") && (i("image").posX = i("image").posX + r.expose.movementSteps, i("image").posY = i("image").posY + r.expose.movementSteps), r.image.snapToContainer) { + i("image").posY > 0 && (i("image").posY = 0), i("image").posX > 0 && (i("image").posX = 0); + var f = -(i("image").h - u.height()), + e = -(i("image").w - u.width()); + i("image").posY < f && (i("image").posY = f), i("image").posX < e && (i("image").posX = e) + } + s(), h = setTimeout(function () { + k(t) + }, 100) + } + var u = null, + h = null, + e = null, + f = null, + o = null, + r = n.extend(!0, { + width: 500, + height: 375, + bgColor: "#000", + overlayColor: "#000", + selector: { + x: 0, + y: 0, + w: 229, + h: 100, + aspectRatio: !1, + centered: !1, + borderColor: "yellow", + borderColorHover: "red", + bgInfoLayer: "#FFF", + infoFontSize: 10, + infoFontColor: "blue", + showPositionsOnDrag: !0, + showDimetionsOnDrag: !0, + maxHeight: null, + maxWidth: null, + startWithOverlay: !1, + hideOverlayOnDragAndResize: !0, + onSelectorDrag: null, + onSelectorDragStop: null, + onSelectorResize: null, + onSelectorResizeStop: null + }, + image: { + source: "", + rotation: 0, + width: 0, + height: 0, + minZoom: 10, + maxZoom: 150, + startZoom: 0, + x: 0, + y: 0, + useStartZoomAsMinZoom: !1, + snapToContainer: !1, + onZoom: null, + onRotate: null, + onImageDrag: null + }, + enableRotation: !0, + enableZoom: !0, + zoomSteps: 1, + rotationSteps: 5, + expose: { + slidersOrientation: "vertical", + zoomElement: "", + rotationElement: "", + elementMovement: "", + movementSteps: 5 + } + }, t), + c, y; + if (!n.isFunction(n.fn.draggable) || !n.isFunction(n.fn.resizable) || !n.isFunction(n.fn.slider)) { + alert("You must include ui.draggable, ui.resizable and ui.slider to use cropZoom"); + return + } + if (r.image.source == "" || r.image.width == 0 || r.image.height == 0) { + alert("You must set the source, witdth and height of the image element"); + return + } + return u = n(this), v("options", r), u.empty(), u.css({ + width: r.width, + height: r.height, + "background-color": r.bgColor, + overflow: "hidden", + position: "relative", + border: "2px solid #333" + }), v("image", { + h: r.image.height, + w: r.image.width, + posY: r.image.y, + posX: r.image.x, + scaleX: 0, + scaleY: 0, + rotation: r.image.rotation, + source: r.image.source, + bounds: [0, 0, 0, 0], + id: "image_to_crop_" + u[0].id + }), w(), g(), v("selector", { + x: r.selector.x, + y: r.selector.y, + w: r.selector.maxWidth != null ? r.selector.w > r.selector.maxWidth ? r.selector.maxWidth : r.selector.w : r.selector.w, + h: r.selector.maxHeight != null ? r.selector.h > r.selector.maxHeight ? r.selector.maxHeight : r.selector.h : r.selector.h + }), n.support.opacity ? (o = u[0].ownerDocument.createElementNS("http://www.w3.org/2000/svg", "svg"), o.setAttribute("id", "k"), o.setAttribute("width", r.width), o.setAttribute("height", r.height), o.setAttribute("preserveAspectRatio", "none"), f = u[0].ownerDocument.createElementNS("http://www.w3.org/2000/svg", "image"), f.setAttributeNS("http://www.w3.org/1999/xlink", "href", r.image.source), f.setAttribute("width", i("image").w), f.setAttribute("height", i("image").h), f.setAttribute("preserveAspectRatio", "none"), n(f).attr("x", 0), n(f).attr("y", 0), o.appendChild(f)) : (u[0].ownerDocument.namespaces.add("v", "urn:schemas-microsoft-com:vml", "#default#VML"), n(window).load(function () { + u[0].ownerDocument.namespaces.add("v", "urn:schemas-microsoft-com:vml", "#default#VML") + }), o = n("
      ").attr("id", "k").css({ + width: r.width, + height: r.height, + position: "absolute" + }), f = n.support.leadingWhitespace ? document.createElement("img") : document.createElement("v:image"), f.setAttribute("src", r.image.source), f.setAttribute("class", "vml"), f.setAttribute("gamma", "0"), n(f).css({ + position: "absolute", + left: i("image").posX, + top: i("image").posY, + width: i("image").w, + height: i("image").h + }), f.setAttribute("coordsize", "21600,21600"), f.outerHTML = f.outerHTML, c = d(), (c == "png" || c == "gif") && (f.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + r.image.source + "',sizingMethod='scale');"), o.append(f)), u.append(o), s(), n(f).draggable({ + refreshPositions: !0, + start: function () {}, + drag: function (t, u) { + if (n.support.opacity ? (i("image").posY = u.position.top - n(document).scrollTop() + (i("image").rotH - i("image").h) / 2, i("image").posX = u.position.left - n(document).scrollLeft() + (i("image").rotW - i("image").w) / 2) : (i("image").posY = u.position.top, i("image").posX = u.position.left), r.image.snapToContainer ? p(u) : s(), r.image.onImageDrag != null) r.image.onImageDrag(f) + }, + stop: function (n, t) { + r.image.snapToContainer && p(t) + } + }), rt(), u.find(".ui-icon-gripsmall-diagonal-se").css({ + background: "#FFF", + border: "1px solid #000", + width: 8, + height: 8 + }), ut(), r.selector.startWithOverlay && (y = { + position: { + top: e.position().top, + left: e.position().left + } + }, a(y)), r.enableZoom && tt(), r.enableRotation && nt(), r.expose.elementMovement != "" && et(), n.fn.cropzoom.getParameters = function (t, i) { + var r = t.data("image"), + u = t.data("selector"), + f = { + viewPortW: t.width(), + viewPortH: t.height(), + imageX: r.posX, + imageY: r.posY, + imageRotate: r.rotation, + imageW: r.w, + imageH: r.h, + imageSource: r.source, + selectorX: u.x, + selectorY: u.y, + selectorW: u.w, + selectorH: u.h + }; + return n.extend(f, i) + }, n.fn.cropzoom.getSelf = function () { + return u + }, this + }) + }, r = n.fn.addClass, n.fn.addClass = function (i) { + return i = i || "", this.each(function () { + if (t(this)) { + var u = this; + n.each(i.split(/\s+/), function (t, i) { + var r = u.className ? u.className.baseVal : u.getAttribute("class"); + n.inArray(i, r.split(/\s+/)) == -1 && (r += (r ? " " : "") + i, u.className ? u.className.baseVal = r : u.setAttribute("class", r)) + }) + } else r.apply(n(this), [i]) + }) + }, u = n.fn.removeClass, n.fn.removeClass = function (i) { + return i = i || "", this.each(function () { + if (t(this)) { + var r = this; + n.each(i.split(/\s+/), function (t, i) { + var u = r.className ? r.className.baseVal : r.getAttribute("class"); + u = n.grep(u.split(/\s+/), function (n) { + return n != i + }).join(" "), r.className ? r.className.baseVal = u : r.setAttribute("class", u) + }) + } else u.apply(n(this), [i]) + }) + }, f = n.fn.toggleClass, n.fn.toggleClass = function (i, r) { + return this.each(function () { + t(this) ? (typeof r != "boolean" && (r = !n(this).hasClass(i)), n(this)[(r ? "add" : "remove") + "Class"](i)) : f.apply(n(this), [i, r]) + }) + }, e = n.fn.hasClass, n.fn.hasClass = function (i) { + i = i || ""; + var r = !1; + return this.each(function () { + if (t(this)) { + var u = (this.className ? this.className.baseVal : this.getAttribute("class")).split(/\s+/); + r = n.inArray(i, u) > -1 + } else r = e.apply(n(this), [i]); + return !r + }), r + }, i = n.fn.attr, n.fn.attr = function (r, u, f) { + var o, e; + return typeof r == "string" && u === undefined ? (o = i.apply(this, [r, u, f]), o && o.baseVal ? o.baseVal.valueAsString : o) : (e = r, typeof r == "string" && (e = {}, e[r] = u), this.each(function () { + if (t(this)) for (var o in e) this.setAttribute(o, typeof e[o] == "function" ? e[o]() : e[o]); + else i.apply(n(this), [r, u, f]) + })) + }, o = n.fn.removeAttr, n.fn.removeAttr = function (i) { + return this.each(function () { + t(this) ? this[i] && this[i].baseVal ? this[i].baseVal.value = "" : this.setAttribute(i, "") : o.apply(n(this), [i]) + }) + }, n.fn.extend({ + setSelector: function (t, i, r, u, f) { + var e = n(this); + f != undefined && f == !0 ? e.find("#" + e[0].id + "_selector").animate({ + top: i, + left: t, + width: r, + height: u + }, "slow") : e.find("#" + e[0].id + "_selector").css({ + top: i, + left: t, + width: r, + height: u + }), e.data("selector", { + x: t, + y: i, + w: r, + h: u + }) + }, + restore: function () { + var i = n(this), + t = i.data("options"); + i.empty(), i.data("image", {}), i.data("selector", {}), t.expose.zoomElement != "" && n(t.expose.zoomElement).empty(), t.expose.rotationElement != "" && n(t.expose.rotationElement).empty(), t.expose.elementMovement != "" && n(t.expose.elementMovement).empty(), i.cropzoom(t) + }, + send: function (t, i, r, u) { + var f = n(this); + n.ajax({ + url: t, + type: i, + data: f.cropzoom.getParameters(f, r), + success: function (n) { + f.data("imageResult", n), u !== undefined && u != null && u(n) + } + }) + }, + PreviewParams: function () { + var i = n(this), + t = i.data("image"), + r = i.data("selector"); + return "viewPortW=" + i.width() + "&viewPortH=" + i.height() + "&imageX=" + t.posX + "&imageY=" + t.posY + "&imageRotate=" + t.rotation + "&imageW=" + t.w + "&imageH=" + t.h + "&imageSource=" + t.source + "&selectorX=" + r.x + "&selectorY=" + r.y + "&selectorW=" + r.w + "&selectorH=" + r.h + } + }) +})(jQuery) \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/js/jquery.fileupload.comb.min.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/js/jquery.fileupload.comb.min.js new file mode 100644 index 00000000000..09909838fcc --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/js/jquery.fileupload.comb.min.js @@ -0,0 +1 @@ +(function(n){var t=function(n,i){var r=/[^\w\-\.:]/.test(n)?new Function(t.arg+",tmpl","var _e=tmpl.encode"+t.helper+",_s='"+n.replace(t.regexp,t.func)+"';return _s;"):t.cache[n]=t.cache[n]||t(t.load(n));return i?r(i,t):function(n){return r(n,t)}};t.cache={};t.load=function(n){return document.getElementById(n).innerHTML};t.regexp=/([\s'\\])(?!(?:[^{]|\{(?!%))*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g;t.func=function(n,t,i,r,u,f){return t?{"\n":"\\n","\r":"\\r","\t":"\\t"," ":" "}[t]||"\\"+t:i?i==="="?"'+_e("+r+")+'":"'+("+r+"==null?'':"+r+")+'":u?"';":f?"_s+='":void 0};t.encReg=/[<>&"'\x00]/g;t.encMap={"<":"<",">":">","&":"&",'"':""","'":"'"};t.encode=function(n){return(n==null?"":""+n).replace(t.encReg,function(n){return t.encMap[n]||""})};t.arg="o";t.helper=",print=function(s,e){_s+=e?(s==null?'':s):_e(s);},include=function(s,d){_s+=tmpl(s,d);}";typeof define=="function"&&define.amd?define(function(){return t}):n.tmpl=t})(this),function(n){var t=function(n,i,r){var u=document.createElement("img"),f,e;if(u.onerror=i,u.onload=function(){!e||r&&r.noRevoke||t.revokeObjectURL(e);i&&i(t.scale(u,r))},t.isInstanceOf("Blob",n)||t.isInstanceOf("File",n))f=e=t.createObjectURL(n),u._type=n.type;else if(typeof n=="string")f=n,r&&r.crossOrigin&&(u.crossOrigin=r.crossOrigin);else return!1;return f?(u.src=f,u):t.readFile(n,function(n){var t=n.target;t&&t.result?u.src=t.result:i&&i(n)})},i=window.createObjectURL&&window||window.URL&&URL.revokeObjectURL&&URL||window.webkitURL&&webkitURL;t.isInstanceOf=function(n,t){return Object.prototype.toString.call(t)==="[object "+n+"]"};t.transformCoordinates=function(){return};t.getTransformedOptions=function(n,t){var r=t.aspectRatio,i,u,f,e;if(!r)return t;i={};for(u in t)t.hasOwnProperty(u)&&(i[u]=t[u]);return i.crop=!0,f=n.naturalWidth||n.width,e=n.naturalHeight||n.height,f/e>r?(i.maxWidth=e*r,i.maxHeight=e):(i.maxWidth=f,i.maxHeight=f/r),i};t.renderImageToCanvas=function(n,t,i,r,u,f,e,o,s,h){return n.getContext("2d").drawImage(t,i,r,u,f,e,o,s,h),n};t.hasCanvasOption=function(n){return n.canvas||n.crop||n.aspectRatio};t.scale=function(n,i){i=i||{};var h=document.createElement("canvas"),w=n.getContext||t.hasCanvasOption(i)&&h.getContext,a=n.naturalWidth||n.width,v=n.naturalHeight||n.height,r=a,u=v,f,e,y,p,o,s,c,l,b,k=function(){var n=Math.max((y||r)/r,(p||u)/u);n>1&&(r=r*n,u=u*n)},d=function(){var n=Math.min((f||r)/r,(e||u)/u);n<1&&(r=r*n,u=u*n)};return(w&&(i=t.getTransformedOptions(n,i),c=i.left||0,l=i.top||0,i.sourceWidth?(o=i.sourceWidth,i.right!==undefined&&i.left===undefined&&(c=a-o-i.right)):o=a-c-(i.right||0),i.sourceHeight?(s=i.sourceHeight,i.bottom!==undefined&&i.top===undefined&&(l=v-s-i.bottom)):s=v-l-(i.bottom||0),r=o,u=s),f=i.maxWidth,e=i.maxHeight,y=i.minWidth,p=i.minHeight,w&&f&&e&&i.crop?(r=f,u=e,b=o/s-f/e,b<0?(s=e*o/f,i.top===undefined&&i.bottom===undefined&&(l=(v-s)/2)):b>0&&(o=f*s/e,i.left===undefined&&i.right===undefined&&(c=(a-o)/2))):((i.contain||i.cover)&&(y=f=f||y,p=e=e||p),i.cover?(d(),k()):(k(),d())),w)?(h.width=r,h.height=u,t.transformCoordinates(h,i),t.renderImageToCanvas(h,n,c,l,o,s,0,0,r,u)):(n.width=r,n.height=u,n)};t.createObjectURL=function(n){return i?i.createObjectURL(n):!1};t.revokeObjectURL=function(n){return i?i.revokeObjectURL(n):!1};t.readFile=function(n,t,i){if(window.FileReader){var r=new FileReader;if(r.onload=r.onerror=t,i=i||"readAsDataURL",r[i])return r[i](n),r}return!1};typeof define=="function"&&define.amd?define(function(){return t}):n.loadImage=t}(this),function(n){typeof define=="function"&&define.amd?define(["load-image"],n):n(window.loadImage)}(function(n){if(window.navigator&&window.navigator.platform&&/iP(hone|od|ad)/.test(window.navigator.platform)){var t=n.renderImageToCanvas;n.detectSubsampling=function(n){var t,i;return n.width*n.height>1048576?(t=document.createElement("canvas"),t.width=t.height=1,i=t.getContext("2d"),i.drawImage(n,-n.width+1,0),i.getImageData(0,0,1,1).data[3]===0):!1};n.detectVerticalSquash=function(n,t){var r=n.naturalHeight||n.height,f=document.createElement("canvas"),o=f.getContext("2d"),s,u,e,i,h;for(t&&(r/=2),f.width=1,f.height=r,o.drawImage(n,0,0),s=o.getImageData(0,0,1,r).data,u=0,e=r,i=r;i>u;)h=s[(i-1)*4+3],h===0?e=i:u=i,i=e+u>>1;return i/r||1};n.renderImageToCanvas=function(i,r,u,f,e,o,s,h,c,l){if(r._type==="image/jpeg"){var k=i.getContext("2d"),v=document.createElement("canvas"),a=1024,d=v.getContext("2d"),y,p,w,b;if(v.width=a,v.height=a,k.save(),y=n.detectSubsampling(r),y&&(u/=2,f/=2,e/=2,o/=2),p=n.detectVerticalSquash(r,y),y||p!==1){for(f*=p,c=Math.ceil(a*c/e),l=Math.ceil(a*l/o/p),h=0,b=0;b8)){o>4&&(t.width=e,t.height=f);switch(o){case 2:u.translate(f,0);u.scale(-1,1);break;case 3:u.translate(f,e);u.rotate(Math.PI);break;case 4:u.translate(0,e);u.scale(1,-1);break;case 5:u.rotate(.5*Math.PI);u.scale(1,-1);break;case 6:u.rotate(.5*Math.PI);u.translate(0,-e);break;case 7:u.rotate(.5*Math.PI);u.translate(f,-e);u.scale(-1,1);break;case 8:u.rotate(-.5*Math.PI);u.translate(-f,0)}}};n.getTransformedOptions=function(t,i){var u=r.call(n,t,i),o=u.orientation,f,e;if(!o||o>8||o===1)return u;f={};for(e in u)u.hasOwnProperty(e)&&(f[e]=u[e]);switch(u.orientation){case 2:f.left=u.right;f.right=u.left;break;case 3:f.left=u.right;f.top=u.bottom;f.right=u.left;f.bottom=u.top;break;case 4:f.top=u.bottom;f.bottom=u.top;break;case 5:f.left=u.top;f.top=u.left;f.right=u.bottom;f.bottom=u.right;break;case 6:f.left=u.top;f.top=u.right;f.right=u.bottom;f.bottom=u.left;break;case 7:f.left=u.bottom;f.top=u.right;f.right=u.top;f.bottom=u.left;break;case 8:f.left=u.bottom;f.top=u.left;f.right=u.top;f.bottom=u.right}return u.orientation>4&&(f.maxWidth=u.maxHeight,f.maxHeight=u.maxWidth,f.minWidth=u.minHeight,f.minHeight=u.minWidth,f.sourceWidth=u.sourceHeight,f.sourceHeight=u.sourceWidth),f}}),function(n){typeof define=="function"&&define.amd?define(["load-image"],n):n(window.loadImage)}(function(n){var t=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice);n.blobSlice=t&&function(){var n=this.slice||this.webkitSlice||this.mozSlice;return n.apply(this,arguments)};n.metaDataParsers={jpeg:{65505:[]}};n.parseMetaData=function(t,i,r){r=r||{};var f=this,e=r.maxMetaDataSize||262144,u={},o=!(window.DataView&&t&&t.size>=12&&t.type==="image/jpeg"&&n.blobSlice);(o||!n.readFile(n.blobSlice.call(t,0,e),function(t){if(t.target.error){console.log(t.target.error);i(u);return}var h=t.target.result,o=new DataView(h),e=2,y=o.byteLength-4,c=e,s,l,a,v;if(o.getUint16(0)===65496){while(e=65504&&s<=65519||s===65534){if(l=o.getUint16(e+2)+2,e+l>o.byteLength){console.log("Invalid meta data: Invalid segment size.");break}if(a=n.metaDataParsers.jpeg[s],a)for(v=0;v6&&(u.imageHead=h.slice?h.slice(0,c):new Uint8Array(h).subarray(0,c))}else console.log("Invalid JPEG file: Missing JPEG marker.");i(u)},"readAsArrayBuffer"))&&i(u)}}),function(n){typeof define=="function"&&define.amd?define(["load-image","load-image-meta"],n):n(window.loadImage)}(function(n){n.ExifMap=function(){return this};n.ExifMap.prototype.map={Orientation:274};n.ExifMap.prototype.get=function(n){return this[n]||this[this.map[n]]};n.getExifThumbnail=function(n,t,i){var u,r,f;if(!i||t+i>n.byteLength){console.log("Invalid Exif data: Invalid thumbnail data.");return}for(u=[],r=0;r4?i+t.getUint32(r+8,e):r+8,c+l>t.byteLength){console.log("Invalid Exif data: Invalid data offset.");return}if(f===1)return s.getValue(t,c,e);for(h=[],o=0;on.byteLength){console.log("Invalid Exif data: Invalid directory offset.");return}if(e=n.getUint16(i,r),o=i+2+12*e,o+4>n.byteLength){console.log("Invalid Exif data: Invalid directory size.");return}for(f=0;ft.byteLength){console.log("Invalid Exif data: Invalid segment size.");return}if(t.getUint16(i+8)!==0){console.log("Invalid Exif data: Missing byte alignment offset.");return}switch(t.getUint16(e)){case 18761:o=!0;break;case 19789:o=!1;break;default:console.log("Invalid Exif data: Invalid byte alignment marker.");return}if(t.getUint16(e+2,o)!==42){console.log("Invalid Exif data: Missing TIFF marker.");return}s=t.getUint32(e+4,o);u.exif=new n.ExifMap;s=n.parseExifTags(t,e,e+s,o,u);s&&!f.disableExifThumbnail&&(h={exif:{}},s=n.parseExifTags(t,e,e+s,o,h),h.exif[513]&&(u.exif.Thumbnail=n.getExifThumbnail(t,e+h.exif[513],h.exif[514])));u.exif[34665]&&!f.disableExifSub&&n.parseExifTags(t,e,e+u.exif[34665],o,u);u.exif[34853]&&!f.disableExifGps&&n.parseExifTags(t,e,e+u.exif[34853],o,u)}}};n.metaDataParsers.jpeg[65505].push(n.parseExifData)}),function(n){typeof define=="function"&&define.amd?define(["load-image","load-image-exif"],n):n(window.loadImage)}(function(n){n.ExifMap.prototype.tags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright",36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",42240:"Gamma",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"PhotographicSensitivity",34856:"OECF",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:"LensSpecification",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"};n.ExifMap.prototype.stringValues={ExposureProgram:{0:"Undefined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Undefined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},ComponentsConfiguration:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"},Orientation:{1:"top-left",2:"top-right",3:"bottom-right",4:"bottom-left",5:"left-top",6:"right-top",7:"right-bottom",8:"left-bottom"}};n.ExifMap.prototype.getText=function(n){var t=this.get(n);switch(n){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":case"Orientation":return this.stringValues[n][t];case"ExifVersion":case"FlashpixVersion":return String.fromCharCode(t[0],t[1],t[2],t[3]);case"ComponentsConfiguration":return this.stringValues[n][t[0]]+this.stringValues[n][t[1]]+this.stringValues[n][t[2]]+this.stringValues[n][t[3]];case"GPSVersionID":return t[0]+"."+t[1]+"."+t[2]+"."+t[3]}return String(t)},function(n){var t=n.tags,r=n.map;for(var i in t)t.hasOwnProperty(i)&&(r[t[i]]=i)}(n.ExifMap.prototype);n.ExifMap.prototype.getAll=function(){var i={},t,n;for(t in this)this.hasOwnProperty(t)&&(n=this.tags[t],n&&(i[n]=this.getText(n)));return i}});!function(n){var t=n.HTMLCanvasElement&&n.HTMLCanvasElement.prototype,r=n.Blob&&function(){try{return Boolean(new Blob)}catch(n){return!1}}(),f=r&&n.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(n){return!1}}(),u=n.BlobBuilder||n.WebKitBlobBuilder||n.MozBlobBuilder||n.MSBlobBuilder,i=(r||u)&&n.atob&&n.ArrayBuffer&&n.Uint8Array&&function(n){var i,e,o,t,s,h;for(i=n.split(",")[0].indexOf("base64")>=0?atob(n.split(",")[1]):decodeURIComponent(n.split(",")[1]),e=new ArrayBuffer(i.length),o=new Uint8Array(e),t=0;t<\/form>');r.attr("accept-charset",i.formAcceptCharset);f=/\?/.test(i.url)?"&":"?";i.type==="DELETE"?(i.url=i.url+f+"_method=DELETE",i.type="POST"):i.type==="PUT"?(i.url=i.url+f+"_method=PUT",i.type="POST"):i.type==="PATCH"&&(i.url=i.url+f+"_method=PATCH",i.type="POST");t+=1;u=n('');return b.join("")})}},fileButton:function(b,a,d){var f=this;if(!(3>arguments.length)){h.call(this,a);a.validate&&(this.validate=a.validate);var c=CKEDITOR.tools.extend({},a),e=c.onClick;c.className=(c.className?c.className+" ":"")+"cke_dialog_ui_button";c.onClick=function(c){var d=a["for"];if(!e||e.call(this,c)!==false){b.getContentElement(d[0],d[1]).submit();this.disable()}};b.on("load",function(){b.getContentElement(a["for"][0], +a["for"][1])._.buttons.push(f)});CKEDITOR.ui.dialog.button.call(this,b,c,d)}},html:function(){var b=/^\s*<[\w:]+\s+([^>]*)?>/,a=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,d=/\/$/;return function(f,c,e){if(!(3>arguments.length)){var k=[],g=c.html;"<"!=g.charAt(0)&&(g=""+g+"");var i=c.focus;if(i){var j=this.focus;this.focus=function(){("function"==typeof i?i:j).call(this);this.fire("focus")};c.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this, +f,c,k,"span",null,null,"");k=k.join("").match(b);g=g.match(a)||["","",""];d.test(g[1])&&(g[1]=g[1].slice(0,-1),g[2]="/"+g[2]);e.push([g[1]," ",k[1]||"",g[2]].join(""))}}}(),fieldset:function(b,a,d,f,c){var e=c.label;this._={children:a};CKEDITOR.ui.dialog.uiElement.call(this,b,c,f,"fieldset",null,null,function(){var a=[];e&&a.push(""+e+"");for(var b=0;ba.getChildCount()?(new CKEDITOR.dom.text(b,CKEDITOR.document)).appendTo(a):a.getChild(0).$.nodeValue=b;return this},getLabel:function(){var b=CKEDITOR.document.getById(this._.labelId);return!b||1>b.getChildCount()?"":b.getChild(0).getText()},eventProcessors:o},!0);CKEDITOR.ui.dialog.button.prototype= +CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return!this._.disabled?this.fire("click",{dialog:this._.dialog}):!1},enable:function(){this._.disabled=!1;var b=this.getElement();b&&b.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors, +{onClick:function(b,a){this.on("click",function(){a.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},focus:function(){var b=this.selectParentTab();setTimeout(function(){var a=b.getInputElement();a&&a.$.focus()},0)},select:function(){var b=this.selectParentTab(); +setTimeout(function(){var a=b.getInputElement();a&&(a.$.focus(),a.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(b){if(this.bidi){var a=b&&b.charAt(0);(a="‪"==a?"ltr":"‫"==a?"rtl":null)&&(b=b.slice(1));this.setDirectionMarker(a)}b||(b="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},getValue:function(){var b=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&b){var a=this.getDirectionMarker();a&&(b=("ltr"==a?"‪":"‫")+ +b)}return b},setDirectionMarker:function(b){var a=this.getInputElement();b?a.setAttributes({dir:b,"data-cke-dir-marker":b}):this.getDirectionMarker()&&a.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},n,!0);CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()}, +add:function(b,a,d){var f=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),c=this.getInputElement().$;f.$.text=b;f.$.value=void 0===a||null===a?b:a;void 0===d||null===d?CKEDITOR.env.ie?c.add(f.$):c.add(f.$,null):c.add(f.$,d);return this},remove:function(b){this.getInputElement().$.remove(b);return this},clear:function(){for(var b=this.getInputElement().$;0', +'
      diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/scayt/LICENSE.md b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/scayt/LICENSE.md new file mode 100644 index 00000000000..610c807808b --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/scayt/LICENSE.md @@ -0,0 +1,28 @@ +Software License Agreement +========================== + +**CKEditor SCAYT Plugin** +Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved. + +Licensed under the terms of any of the following licenses at your choice: + +* GNU General Public License Version 2 or later (the "GPL"): + http://www.gnu.org/licenses/gpl.html + +* GNU Lesser General Public License Version 2.1 or later (the "LGPL"): + http://www.gnu.org/licenses/lgpl.html + +* Mozilla Public License Version 1.1 or later (the "MPL"): + http://www.mozilla.org/MPL/MPL-1.1.html + +You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice. + +Sources of Intellectual Property Included in this plugin +-------------------------------------------------------- + +Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission. + +Trademarks +---------- + +CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders. diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/scayt/README.md b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/scayt/README.md new file mode 100644 index 00000000000..1b3de25d38a --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/scayt/README.md @@ -0,0 +1,25 @@ +CKEditor SCAYT Plugin +===================== + +This plugin brings Spell Check As You Type (SCAYT) into up to CKEditor 4+. + +SCAYT is a "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution. + +Installation +------------ + +1. Clone/copy this repository contents in a new "plugins/scayt" folder in your CKEditor installation. +2. Enable the "scayt" plugin in the CKEditor configuration file (config.js): + + config.extraPlugins = 'scayt'; + +That's all. SCAYT will appear on the editor toolbar and will be ready to use. + +License +------- + +Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). + +See LICENSE.md for more information. + +Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/). diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/scayt/dialogs/options.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/scayt/dialogs/options.js new file mode 100644 index 00000000000..8178e1affa3 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/scayt/dialogs/options.js @@ -0,0 +1,17 @@ +CKEDITOR.dialog.add("scaytDialog",function(f){var g=f.scayt,k='

      '+g.getLocal("version")+g.getVersion()+"

      "+g.getLocal("text_copyrights")+"

      ",l=CKEDITOR.document,i={isChanged:function(){return null===this.newLang||this.currentLang===this.newLang?!1:!0},currentLang:g.getLang(),newLang:null,reset:function(){this.currentLang=g.getLang();this.newLang=null},id:"lang"},k=[{id:"options",label:g.getLocal("tab_options"),onShow:function(){},elements:[{type:"vbox", +id:"scaytOptions",children:function(){var a=g.getApplicationConfig(),e=[],c={"ignore-all-caps-words":"label_allCaps","ignore-domain-names":"label_ignoreDomainNames","ignore-words-with-mixed-cases":"label_mixedCase","ignore-words-with-numbers":"label_mixedWithDigits"},d;for(d in a){var b={type:"checkbox"};b.id=d;b.label=g.getLocal(c[d]);e.push(b)}return e}(),onShow:function(){this.getChild();for(var a=f.scayt,e=0;e
      ',onShow:function(){var a=f.scayt.getLang();l.getById("scaytLang_"+a).$.checked=!0}}]}]},{id:"dictionaries",label:g.getLocal("tab_dictionaries"), +elements:[{type:"vbox",id:"rightCol_col__left",children:[{type:"html",id:"dictionaryNote",html:""},{type:"text",id:"dictionaryName",label:g.getLocal("label_fieldNameDic")||"Dictionary name",onShow:function(a){var e=a.sender,c=f.scayt;setTimeout(function(){e.getContentElement("dictionaries","dictionaryNote").getElement().setText("");null!=c.getUserDictionaryName()&&""!=c.getUserDictionaryName()&&e.getContentElement("dictionaries","dictionaryName").setValue(c.getUserDictionaryName())},0)}},{type:"hbox", +id:"notExistDic",align:"left",style:"width:auto;",widths:["50%","50%"],children:[{type:"button",id:"createDic",label:g.getLocal("btn_createDic"),title:g.getLocal("btn_createDic"),onClick:function(){var a=this.getDialog(),e=j,c=f.scayt,d=a.getContentElement("dictionaries","dictionaryName").getValue();c.createUserDictionary(d,function(b){b.error||e.toggleDictionaryButtons.call(a,!0);b.dialog=a;b.command="create";b.name=d;f.fire("scaytUserDictionaryAction",b)},function(b){b.dialog=a;b.command="create"; +b.name=d;f.fire("scaytUserDictionaryActionError",b)})}},{type:"button",id:"restoreDic",label:g.getLocal("btn_restoreDic"),title:g.getLocal("btn_restoreDic"),onClick:function(){var a=this.getDialog(),e=f.scayt,c=j,d=a.getContentElement("dictionaries","dictionaryName").getValue();e.restoreUserDictionary(d,function(b){b.dialog=a;b.error||c.toggleDictionaryButtons.call(a,!0);b.command="restore";b.name=d;f.fire("scaytUserDictionaryAction",b)},function(b){b.dialog=a;b.command="restore";b.name=d;f.fire("scaytUserDictionaryActionError", +b)})}}]},{type:"hbox",id:"existDic",align:"left",style:"width:auto;",widths:["50%","50%"],children:[{type:"button",id:"removeDic",label:g.getLocal("btn_deleteDic"),title:g.getLocal("btn_deleteDic"),onClick:function(){var a=this.getDialog(),e=f.scayt,c=j,d=a.getContentElement("dictionaries","dictionaryName"),b=d.getValue();e.removeUserDictionary(b,function(e){d.setValue("");e.error||c.toggleDictionaryButtons.call(a,!1);e.dialog=a;e.command="remove";e.name=b;f.fire("scaytUserDictionaryAction",e)},function(c){c.dialog= +a;c.command="remove";c.name=b;f.fire("scaytUserDictionaryActionError",c)})}},{type:"button",id:"renameDic",label:g.getLocal("btn_renameDic"),title:g.getLocal("btn_renameDic"),onClick:function(){var a=this.getDialog(),e=f.scayt,c=a.getContentElement("dictionaries","dictionaryName").getValue();e.renameUserDictionary(c,function(d){d.dialog=a;d.command="rename";d.name=c;f.fire("scaytUserDictionaryAction",d)},function(d){d.dialog=a;d.command="rename";d.name=c;f.fire("scaytUserDictionaryActionError",d)})}}]}, +{type:"html",id:"dicInfo",html:'
      '+g.getLocal("text_descriptionDic")+"
      "}]}]},{id:"about",label:g.getLocal("tab_about"),elements:[{type:"html",id:"about",style:"margin: 5px 5px;",html:'
      '+k+"
      "}]}];f.on("scaytUserDictionaryAction",function(a){var e=SCAYT.prototype.UILib,c=a.data.dialog,d=c.getContentElement("dictionaries","dictionaryNote").getElement(),b=a.editor.scayt,f;void 0=== +a.data.error?(f=b.getLocal("message_success_"+a.data.command+"Dic"),f=f.replace("%s",a.data.name),d.setText(f),e.css(d.$,{color:"blue"})):(""===a.data.name?d.setText(b.getLocal("message_info_emptyDic")):(f=b.getLocal("message_error_"+a.data.command+"Dic"),f=f.replace("%s",a.data.name),d.setText(f)),e.css(d.$,{color:"red"}),null!=b.getUserDictionaryName()&&""!=b.getUserDictionaryName()?c.getContentElement("dictionaries","dictionaryName").setValue(b.getUserDictionaryName()):c.getContentElement("dictionaries", +"dictionaryName").setValue(""))});f.on("scaytUserDictionaryActionError",function(a){var e=SCAYT.prototype.UILib,c=a.data.dialog,d=c.getContentElement("dictionaries","dictionaryNote").getElement(),b=a.editor.scayt,f;""===a.data.name?d.setText(b.getLocal("message_info_emptyDic")):(f=b.getLocal("message_error_"+a.data.command+"Dic"),f=f.replace("%s",a.data.name),d.setText(f));e.css(d.$,{color:"red"});null!=b.getUserDictionaryName()&&""!=b.getUserDictionaryName()?c.getContentElement("dictionaries","dictionaryName").setValue(b.getUserDictionaryName()): +c.getContentElement("dictionaries","dictionaryName").setValue("")});var j={title:g.getLocal("text_title"),resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:340,minHeight:260,onLoad:function(){if(0!=f.config.scayt_uiTabs[1]){var a=j,e=a.getLangBoxes.call(this);e.getParent().setStyle("white-space","normal");a.renderLangList(e);this.definition.minWidth=this.getSize().width;this.resize(this.definition.minWidth,this.definition.minHeight)}},onCancel:function(){i.reset()},onHide:function(){f.unlockSelection()}, +onShow:function(){f.fire("scaytDialogShown",this);if(0!=f.config.scayt_uiTabs[2]){var a=f.scayt,e=this.getContentElement("dictionaries","dictionaryName"),c=this.getContentElement("dictionaries","existDic").getElement().getParent(),d=this.getContentElement("dictionaries","notExistDic").getElement().getParent();c.hide();d.hide();null!=a.getUserDictionaryName()&&""!=a.getUserDictionaryName()?(this.getContentElement("dictionaries","dictionaryName").setValue(a.getUserDictionaryName()),c.show()):(e.setValue(""), +d.show())}},onOk:function(){var a=j,e=f.scayt;this.getContentElement("options","scaytOptions");a=a.getChangedOption.call(this);e.commitOption({changedOptions:a})},toggleDictionaryButtons:function(a){var e=this.getContentElement("dictionaries","existDic").getElement().getParent(),c=this.getContentElement("dictionaries","notExistDic").getElement().getParent();a?(e.show(),c.hide()):(e.hide(),c.show())},getChangedOption:function(){var a={};if(1==f.config.scayt_uiTabs[0])for(var e=this.getContentElement("options", +"scaytOptions").getChild(),c=0;c'),g=new CKEDITOR.dom.element("label"),h=f.scayt;c.setStyles({"white-space":"normal",position:"relative", +"padding-bottom":"2px"});b.on("click",function(a){i.newLang=a.sender.getValue()});g.appendText(a);g.setAttribute("for",d);c.append(b);c.append(g);e===h.getLang()&&(b.setAttribute("checked",!0),b.setAttribute("defaultChecked","defaultChecked"));return c},renderLangList:function(a){var e=a.find("#left-col-"+f.name).getItem(0),a=a.find("#right-col-"+f.name).getItem(0),c=g.getLangList(),d={},b=[],i=0,h;for(h in c.ltr)d[h]=c.ltr[h];for(h in c.rtl)d[h]=c.rtl[h];for(h in d)b.push([h,d[h]]);b.sort(function(a, +c){var b=0;a[1]>c[1]?b=1:a[1]'+a.options+"",'"],l=h.length,a=0;a');var m="cke_smile_label_"+a+"_"+CKEDITOR.tools.getNextNumber();d.push('");a%g==g-1&&d.push("")}if(a");d.push("")}d.push("
      "); +e={type:"html",id:"smileySelector",html:d.join(""),onLoad:function(a){i=a.sender},focus:function(){var a=this;setTimeout(function(){a.getElement().getElementsByTag("a").getItem(0).focus()},0)},onClick:k,style:"width: 100%; border-collapse: separate;"};return{title:f.lang.smiley.title,minWidth:270,minHeight:120,contents:[{id:"tab1",label:"",title:"",expand:!0,padding:0,elements:[e]}],buttons:[CKEDITOR.dialog.cancelButton]}}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/angel_smile.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/angel_smile.gif new file mode 100644 index 00000000000..21f81a2fab5 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/angel_smile.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/angel_smile.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/angel_smile.png new file mode 100644 index 00000000000..559e5e71a34 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/angel_smile.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/angry_smile.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/angry_smile.gif new file mode 100644 index 00000000000..c912d99ba78 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/angry_smile.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/angry_smile.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/angry_smile.png new file mode 100644 index 00000000000..c05d2be3a79 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/angry_smile.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/broken_heart.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/broken_heart.gif new file mode 100644 index 00000000000..4162a7b24df Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/broken_heart.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/broken_heart.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/broken_heart.png new file mode 100644 index 00000000000..b584504ce74 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/broken_heart.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/confused_smile.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/confused_smile.gif new file mode 100644 index 00000000000..0e420cba4af Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/confused_smile.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/confused_smile.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/confused_smile.png new file mode 100644 index 00000000000..e0b8e5c6f11 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/confused_smile.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/cry_smile.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/cry_smile.gif new file mode 100644 index 00000000000..b5133427828 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/cry_smile.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/cry_smile.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/cry_smile.png new file mode 100644 index 00000000000..a1891a34281 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/cry_smile.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/devil_smile.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/devil_smile.gif new file mode 100644 index 00000000000..9b2a10055be Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/devil_smile.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/devil_smile.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/devil_smile.png new file mode 100644 index 00000000000..53247a8835b Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/devil_smile.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/embaressed_smile.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/embaressed_smile.gif new file mode 100644 index 00000000000..8d39f252bb7 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/embaressed_smile.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/embarrassed_smile.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/embarrassed_smile.gif new file mode 100644 index 00000000000..8d39f252bb7 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/embarrassed_smile.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/embarrassed_smile.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/embarrassed_smile.png new file mode 100644 index 00000000000..34904b66677 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/embarrassed_smile.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/envelope.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/envelope.gif new file mode 100644 index 00000000000..5294ec488db Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/envelope.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/envelope.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/envelope.png new file mode 100644 index 00000000000..cd62f77516f Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/envelope.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/heart.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/heart.gif new file mode 100644 index 00000000000..160be8eff86 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/heart.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/heart.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/heart.png new file mode 100644 index 00000000000..4298daaf8ff Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/heart.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/kiss.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/kiss.gif new file mode 100644 index 00000000000..ffb23db05a7 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/kiss.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/kiss.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/kiss.png new file mode 100644 index 00000000000..c9eef6ef775 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/kiss.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/lightbulb.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/lightbulb.gif new file mode 100644 index 00000000000..ceb6e2d9ea3 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/lightbulb.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/lightbulb.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/lightbulb.png new file mode 100644 index 00000000000..769239decfe Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/lightbulb.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/omg_smile.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/omg_smile.gif new file mode 100644 index 00000000000..3177355fe8a Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/omg_smile.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/omg_smile.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/omg_smile.png new file mode 100644 index 00000000000..d23c454fa98 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/omg_smile.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/regular_smile.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/regular_smile.gif new file mode 100644 index 00000000000..fdcf5c33e39 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/regular_smile.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/regular_smile.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/regular_smile.png new file mode 100644 index 00000000000..0f2649b78af Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/regular_smile.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/sad_smile.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/sad_smile.gif new file mode 100644 index 00000000000..cca0729dd5f Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/sad_smile.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/sad_smile.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/sad_smile.png new file mode 100644 index 00000000000..f20f3bf3c09 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/sad_smile.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/shades_smile.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/shades_smile.gif new file mode 100644 index 00000000000..7d93474c32a Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/shades_smile.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/shades_smile.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/shades_smile.png new file mode 100644 index 00000000000..fdaa28b786c Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/shades_smile.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/teeth_smile.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/teeth_smile.gif new file mode 100644 index 00000000000..44c3799690e Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/teeth_smile.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/teeth_smile.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/teeth_smile.png new file mode 100644 index 00000000000..d51e33c5919 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/teeth_smile.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/thumbs_down.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/thumbs_down.gif new file mode 100644 index 00000000000..5c8bee300d7 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/thumbs_down.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/thumbs_down.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/thumbs_down.png new file mode 100644 index 00000000000..71dc09d666b Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/thumbs_down.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/thumbs_up.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/thumbs_up.gif new file mode 100644 index 00000000000..9cc37029a9d Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/thumbs_up.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/thumbs_up.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/thumbs_up.png new file mode 100644 index 00000000000..bfdce6672a8 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/thumbs_up.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/tongue_smile.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/tongue_smile.gif new file mode 100644 index 00000000000..81e05b0f6ad Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/tongue_smile.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/tongue_smile.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/tongue_smile.png new file mode 100644 index 00000000000..a05ea08082f Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/tongue_smile.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/tounge_smile.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/tounge_smile.gif new file mode 100644 index 00000000000..81e05b0f6ad Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/tounge_smile.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/whatchutalkingabout_smile.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/whatchutalkingabout_smile.gif new file mode 100644 index 00000000000..eef4fc00ab2 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/whatchutalkingabout_smile.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/whatchutalkingabout_smile.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/whatchutalkingabout_smile.png new file mode 100644 index 00000000000..f9714d1b3ba Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/whatchutalkingabout_smile.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/wink_smile.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/wink_smile.gif new file mode 100644 index 00000000000..6d3d64bd126 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/wink_smile.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/wink_smile.png b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/wink_smile.png new file mode 100644 index 00000000000..7c99c3fc54c Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/smiley/images/wink_smile.png differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/_translationstatus.txt b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/_translationstatus.txt new file mode 100644 index 00000000000..3ad20f5f7cc --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/_translationstatus.txt @@ -0,0 +1,20 @@ +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license + +cs.js Found: 118 Missing: 0 +cy.js Found: 118 Missing: 0 +de.js Found: 118 Missing: 0 +el.js Found: 16 Missing: 102 +eo.js Found: 118 Missing: 0 +et.js Found: 31 Missing: 87 +fa.js Found: 24 Missing: 94 +fi.js Found: 23 Missing: 95 +fr.js Found: 118 Missing: 0 +hr.js Found: 23 Missing: 95 +it.js Found: 118 Missing: 0 +nb.js Found: 118 Missing: 0 +nl.js Found: 118 Missing: 0 +no.js Found: 118 Missing: 0 +tr.js Found: 118 Missing: 0 +ug.js Found: 39 Missing: 79 +zh-cn.js Found: 118 Missing: 0 diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/af.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/af.js new file mode 100644 index 00000000000..27bb9013bab --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/af.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","af",{euro:"Euroteken",lsquo:"Linker enkelkwotasie",rsquo:"Regter enkelkwotasie",ldquo:"Linker dubbelkwotasie",rdquo:"Regter dubbelkwotasie",ndash:"Kortkoppelteken",mdash:"Langkoppelteken",iexcl:"Omgekeerdeuitroepteken",cent:"Centteken",pound:"Pondteken",curren:"Geldeenheidteken",yen:"Yenteken",brvbar:"Gebreekte balk",sect:"Afdeelingsteken",uml:"Deelteken",copy:"Kopieregteken",ordf:"Vroulikekenteken",laquo:"Linkgeoorienteerde aanhaalingsteken",not:"Verbodeteken", +reg:"Regestrasieteken",macr:"Lengteteken",deg:"Gradeteken",sup2:"Kwadraatteken",sup3:"Kubiekteken",acute:"Akuutaksentteken",micro:"Mikroteken",para:"Pilcrow sign",middot:"Middle dot",cedil:"Cedilla",sup1:"Superscript one",ordm:"Masculine ordinal indicator",raquo:"Right-pointing double angle quotation mark",frac14:"Vulgar fraction one quarter",frac12:"Vulgar fraction one half",frac34:"Vulgar fraction three quarters",iquest:"Inverted question mark",Agrave:"Latin capital letter A with grave accent", +Aacute:"Latin capital letter A with acute accent",Acirc:"Latin capital letter A with circumflex",Atilde:"Latin capital letter A with tilde",Auml:"Latin capital letter A with diaeresis",Aring:"Latin capital letter A with ring above",AElig:"Latin Capital letter Æ",Ccedil:"Latin capital letter C with cedilla",Egrave:"Latin capital letter E with grave accent",Eacute:"Latin capital letter E with acute accent",Ecirc:"Latin capital letter E with circumflex",Euml:"Latin capital letter E with diaeresis",Igrave:"Latin capital letter I with grave accent", +Iacute:"Latin capital letter I with acute accent",Icirc:"Latin capital letter I with circumflex",Iuml:"Latin capital letter I with diaeresis",ETH:"Latin capital letter Eth",Ntilde:"Latin capital letter N with tilde",Ograve:"Latin capital letter O with grave accent",Oacute:"Latin capital letter O with acute accent",Ocirc:"Latin capital letter O with circumflex",Otilde:"Latin capital letter O with tilde",Ouml:"Latin capital letter O with diaeresis",times:"Multiplication sign",Oslash:"Latin capital letter O with stroke", +Ugrave:"Latin capital letter U with grave accent",Uacute:"Latin capital letter U with acute accent",Ucirc:"Latin capital letter U with circumflex",Uuml:"Latin capital letter U with diaeresis",Yacute:"Latin capital letter Y with acute accent",THORN:"Latin capital letter Thorn",szlig:"Latin small letter sharp s",agrave:"Latin small letter a with grave accent",aacute:"Latin small letter a with acute accent",acirc:"Latin small letter a with circumflex",atilde:"Latin small letter a with tilde",auml:"Latin small letter a with diaeresis", +aring:"Latin small letter a with ring above",aelig:"Latin small letter æ",ccedil:"Latin small letter c with cedilla",egrave:"Latin small letter e with grave accent",eacute:"Latin small letter e with acute accent",ecirc:"Latin small letter e with circumflex",euml:"Latin small letter e with diaeresis",igrave:"Latin small letter i with grave accent",iacute:"Latin small letter i with acute accent",icirc:"Latin small letter i with circumflex",iuml:"Latin small letter i with diaeresis",eth:"Latin small letter eth", +ntilde:"Latin small letter n with tilde",ograve:"Latin small letter o with grave accent",oacute:"Latin small letter o with acute accent",ocirc:"Latin small letter o with circumflex",otilde:"Latin small letter o with tilde",ouml:"Latin small letter o with diaeresis",divide:"Division sign",oslash:"Latin small letter o with stroke",ugrave:"Latin small letter u with grave accent",uacute:"Latin small letter u with acute accent",ucirc:"Latin small letter u with circumflex",uuml:"Latin small letter u with diaeresis", +yacute:"Latin small letter y with acute accent",thorn:"Latin small letter thorn",yuml:"Latin small letter y with diaeresis",OElig:"Latin capital ligature OE",oelig:"Latin small ligature oe",372:"Latin capital letter W with circumflex",374:"Latin capital letter Y with circumflex",373:"Latin small letter w with circumflex",375:"Latin small letter y with circumflex",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Horizontal ellipsis", +trade:"Trade mark sign",9658:"Black right-pointing pointer",bull:"Bullet",rarr:"Rightwards arrow",rArr:"Rightwards double arrow",hArr:"Left right double arrow",diams:"Black diamond suit",asymp:"Almost equal to"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ar.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ar.js new file mode 100644 index 00000000000..8c3cc20235c --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ar.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","ar",{euro:"رمز اليورو",lsquo:"علامة تنصيص فردية علي اليسار",rsquo:"علامة تنصيص فردية علي اليمين",ldquo:"علامة تنصيص مزدوجة علي اليسار",rdquo:"علامة تنصيص مزدوجة علي اليمين",ndash:"En dash",mdash:"Em dash",iexcl:"علامة تعجب مقلوبة",cent:"رمز السنت",pound:"رمز الاسترليني",curren:"رمز العملة",yen:"رمز الين",brvbar:"شريط مقطوع",sect:"رمز القسم",uml:"Diaeresis",copy:"علامة حقوق الطبع",ordf:"Feminine ordinal indicator",laquo:"Left-pointing double angle quotation mark", +not:"ليست علامة",reg:"علامة مسجّلة",macr:"Macron",deg:"Degree sign",sup2:"Superscript two",sup3:"Superscript three",acute:"Acute accent",micro:"Micro sign",para:"Pilcrow sign",middot:"Middle dot",cedil:"Cedilla",sup1:"Superscript one",ordm:"Masculine ordinal indicator",raquo:"Right-pointing double angle quotation mark",frac14:"Vulgar fraction one quarter",frac12:"Vulgar fraction one half",frac34:"Vulgar fraction three quarters",iquest:"علامة الإستفهام غير صحيحة",Agrave:"Latin capital letter A with grave accent", +Aacute:"Latin capital letter A with acute accent",Acirc:"Latin capital letter A with circumflex",Atilde:"Latin capital letter A with tilde",Auml:"Latin capital letter A with diaeresis",Aring:"Latin capital letter A with ring above",AElig:"Latin Capital letter Æ",Ccedil:"Latin capital letter C with cedilla",Egrave:"Latin capital letter E with grave accent",Eacute:"Latin capital letter E with acute accent",Ecirc:"Latin capital letter E with circumflex",Euml:"Latin capital letter E with diaeresis",Igrave:"Latin capital letter I with grave accent", +Iacute:"Latin capital letter I with acute accent",Icirc:"Latin capital letter I with circumflex",Iuml:"Latin capital letter I with diaeresis",ETH:"Latin capital letter Eth",Ntilde:"Latin capital letter N with tilde",Ograve:"Latin capital letter O with grave accent",Oacute:"Latin capital letter O with acute accent",Ocirc:"Latin capital letter O with circumflex",Otilde:"Latin capital letter O with tilde",Ouml:"Latin capital letter O with diaeresis",times:"Multiplication sign",Oslash:"Latin capital letter O with stroke", +Ugrave:"Latin capital letter U with grave accent",Uacute:"Latin capital letter U with acute accent",Ucirc:"Latin capital letter U with circumflex",Uuml:"Latin capital letter U with diaeresis",Yacute:"Latin capital letter Y with acute accent",THORN:"Latin capital letter Thorn",szlig:"Latin small letter sharp s",agrave:"Latin small letter a with grave accent",aacute:"Latin small letter a with acute accent",acirc:"Latin small letter a with circumflex",atilde:"Latin small letter a with tilde",auml:"Latin small letter a with diaeresis", +aring:"Latin small letter a with ring above",aelig:"Latin small letter æ",ccedil:"Latin small letter c with cedilla",egrave:"Latin small letter e with grave accent",eacute:"Latin small letter e with acute accent",ecirc:"Latin small letter e with circumflex",euml:"Latin small letter e with diaeresis",igrave:"Latin small letter i with grave accent",iacute:"Latin small letter i with acute accent",icirc:"Latin small letter i with circumflex",iuml:"Latin small letter i with diaeresis",eth:"Latin small letter eth", +ntilde:"Latin small letter n with tilde",ograve:"Latin small letter o with grave accent",oacute:"Latin small letter o with acute accent",ocirc:"Latin small letter o with circumflex",otilde:"Latin small letter o with tilde",ouml:"Latin small letter o with diaeresis",divide:"Division sign",oslash:"Latin small letter o with stroke",ugrave:"Latin small letter u with grave accent",uacute:"Latin small letter u with acute accent",ucirc:"Latin small letter u with circumflex",uuml:"Latin small letter u with diaeresis", +yacute:"Latin small letter y with acute accent",thorn:"Latin small letter thorn",yuml:"Latin small letter y with diaeresis",OElig:"Latin capital ligature OE",oelig:"Latin small ligature oe",372:"Latin capital letter W with circumflex",374:"Latin capital letter Y with circumflex",373:"Latin small letter w with circumflex",375:"Latin small letter y with circumflex",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Horizontal ellipsis", +trade:"Trade mark sign",9658:"Black right-pointing pointer",bull:"Bullet",rarr:"Rightwards arrow",rArr:"Rightwards double arrow",hArr:"Left right double arrow",diams:"Black diamond suit",asymp:"Almost equal to"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/bg.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/bg.js new file mode 100644 index 00000000000..74cc149f6c6 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/bg.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","bg",{euro:"Евро знак",lsquo:"Лява маркировка за цитат",rsquo:"Дясна маркировка за цитат",ldquo:"Лява двойна кавичка за цитат",rdquo:"Дясна двойна кавичка за цитат",ndash:"\\\\",mdash:"/",iexcl:"Обърната питанка",cent:"Знак за цент",pound:"Знак за паунд",curren:"Валутен знак",yen:"Знак за йена",brvbar:"Прекъсната линия",sect:"Знак за секция",uml:"Diaeresis",copy:"Знак за Copyright",ordf:"Feminine ordinal indicator",laquo:"Left-pointing double angle quotation mark", +not:"Not sign",reg:"Registered sign",macr:"Macron",deg:"Degree sign",sup2:"Superscript two",sup3:"Superscript three",acute:"Acute accent",micro:"Micro sign",para:"Pilcrow sign",middot:"Middle dot",cedil:"Cedilla",sup1:"Superscript one",ordm:"Masculine ordinal indicator",raquo:"Right-pointing double angle quotation mark",frac14:"Vulgar fraction one quarter",frac12:"Vulgar fraction one half",frac34:"Vulgar fraction three quarters",iquest:"Inverted question mark",Agrave:"Latin capital letter A with grave accent", +Aacute:"Latin capital letter A with acute accent",Acirc:"Latin capital letter A with circumflex",Atilde:"Latin capital letter A with tilde",Auml:"Latin capital letter A with diaeresis",Aring:"Latin capital letter A with ring above",AElig:"Latin Capital letter Æ",Ccedil:"Latin capital letter C with cedilla",Egrave:"Latin capital letter E with grave accent",Eacute:"Latin capital letter E with acute accent",Ecirc:"Latin capital letter E with circumflex",Euml:"Latin capital letter E with diaeresis",Igrave:"Latin capital letter I with grave accent", +Iacute:"Latin capital letter I with acute accent",Icirc:"Latin capital letter I with circumflex",Iuml:"Latin capital letter I with diaeresis",ETH:"Latin capital letter Eth",Ntilde:"Latin capital letter N with tilde",Ograve:"Latin capital letter O with grave accent",Oacute:"Latin capital letter O with acute accent",Ocirc:"Latin capital letter O with circumflex",Otilde:"Latin capital letter O with tilde",Ouml:"Latin capital letter O with diaeresis",times:"Multiplication sign",Oslash:"Latin capital letter O with stroke", +Ugrave:"Latin capital letter U with grave accent",Uacute:"Latin capital letter U with acute accent",Ucirc:"Latin capital letter U with circumflex",Uuml:"Latin capital letter U with diaeresis",Yacute:"Latin capital letter Y with acute accent",THORN:"Latin capital letter Thorn",szlig:"Latin small letter sharp s",agrave:"Latin small letter a with grave accent",aacute:"Latin small letter a with acute accent",acirc:"Latin small letter a with circumflex",atilde:"Latin small letter a with tilde",auml:"Latin small letter a with diaeresis", +aring:"Latin small letter a with ring above",aelig:"Latin small letter æ",ccedil:"Latin small letter c with cedilla",egrave:"Latin small letter e with grave accent",eacute:"Latin small letter e with acute accent",ecirc:"Latin small letter e with circumflex",euml:"Latin small letter e with diaeresis",igrave:"Latin small letter i with grave accent",iacute:"Latin small letter i with acute accent",icirc:"Latin small letter i with circumflex",iuml:"Latin small letter i with diaeresis",eth:"Latin small letter eth", +ntilde:"Latin small letter n with tilde",ograve:"Latin small letter o with grave accent",oacute:"Latin small letter o with acute accent",ocirc:"Latin small letter o with circumflex",otilde:"Latin small letter o with tilde",ouml:"Latin small letter o with diaeresis",divide:"Division sign",oslash:"Latin small letter o with stroke",ugrave:"Latin small letter u with grave accent",uacute:"Latin small letter u with acute accent",ucirc:"Latin small letter u with circumflex",uuml:"Latin small letter u with diaeresis", +yacute:"Latin small letter y with acute accent",thorn:"Latin small letter thorn",yuml:"Latin small letter y with diaeresis",OElig:"Latin capital ligature OE",oelig:"Latin small ligature oe",372:"Latin capital letter W with circumflex",374:"Latin capital letter Y with circumflex",373:"Latin small letter w with circumflex",375:"Latin small letter y with circumflex",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Horizontal ellipsis", +trade:"Trade mark sign",9658:"Black right-pointing pointer",bull:"Bullet",rarr:"Rightwards arrow",rArr:"Rightwards double arrow",hArr:"Left right double arrow",diams:"Black diamond suit",asymp:"Almost equal to"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ca.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ca.js new file mode 100644 index 00000000000..46dcb0ae0aa --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ca.js @@ -0,0 +1,14 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","ca",{euro:"Símbol d'euro",lsquo:"Signe de cometa simple esquerra",rsquo:"Signe de cometa simple dreta",ldquo:"Signe de cometa doble esquerra",rdquo:"Signe de cometa doble dreta",ndash:"Guió",mdash:"Guió baix",iexcl:"Signe d'exclamació inversa",cent:"Símbol de percentatge",pound:"Símbol de lliura",curren:"Símbol de moneda",yen:"Símbol de Yen",brvbar:"Barra trencada",sect:"Símbol de secció",uml:"Dièresi",copy:"Símbol de Copyright",ordf:"Indicador ordinal femení", +laquo:"Signe de cometes angulars esquerra",not:"Símbol de negació",reg:"Símbol registrat",macr:"Macron",deg:"Símbol de grau",sup2:"Superíndex dos",sup3:"Superíndex tres",acute:"Accent agut",micro:"Símbol de micro",para:"Símbol de calderó",middot:"Punt volat",cedil:"Ce trencada",sup1:"Superíndex u",ordm:"Indicador ordinal masculí",raquo:"Signe de cometes angulars dreta",frac14:"Fracció vulgar un quart",frac12:"Fracció vulgar una meitat",frac34:"Fracció vulgar tres quarts",iquest:"Símbol d'interrogació invertit", +Agrave:"Lletra majúscula llatina A amb accent greu",Aacute:"Lletra majúscula llatina A amb accent agut",Acirc:"Lletra majúscula llatina A amb circumflex",Atilde:"Lletra majúscula llatina A amb titlla",Auml:"Lletra majúscula llatina A amb dièresi",Aring:"Lletra majúscula llatina A amb anell superior",AElig:"Lletra majúscula llatina Æ",Ccedil:"Lletra majúscula llatina C amb ce trencada",Egrave:"Lletra majúscula llatina E amb accent greu",Eacute:"Lletra majúscula llatina E amb accent agut",Ecirc:"Lletra majúscula llatina E amb circumflex", +Euml:"Lletra majúscula llatina E amb dièresi",Igrave:"Lletra majúscula llatina I amb accent greu",Iacute:"Lletra majúscula llatina I amb accent agut",Icirc:"Lletra majúscula llatina I amb circumflex",Iuml:"Lletra majúscula llatina I amb dièresi",ETH:"Lletra majúscula llatina Eth",Ntilde:"Lletra majúscula llatina N amb titlla",Ograve:"Lletra majúscula llatina O amb accent greu",Oacute:"Lletra majúscula llatina O amb accent agut",Ocirc:"Lletra majúscula llatina O amb circumflex",Otilde:"Lletra majúscula llatina O amb titlla", +Ouml:"Lletra majúscula llatina O amb dièresi",times:"Símbol de multiplicació",Oslash:"Lletra majúscula llatina O amb barra",Ugrave:"Lletra majúscula llatina U amb accent greu",Uacute:"Lletra majúscula llatina U amb accent agut",Ucirc:"Lletra majúscula llatina U amb circumflex",Uuml:"Lletra majúscula llatina U amb dièresi",Yacute:"Lletra majúscula llatina Y amb accent agut",THORN:"Lletra majúscula llatina Thorn",szlig:"Lletra minúscula llatina sharp s",agrave:"Lletra minúscula llatina a amb accent greu", +aacute:"Lletra minúscula llatina a amb accent agut",acirc:"Lletra minúscula llatina a amb circumflex",atilde:"Lletra minúscula llatina a amb titlla",auml:"Lletra minúscula llatina a amb dièresi",aring:"Lletra minúscula llatina a amb anell superior",aelig:"Lletra minúscula llatina æ",ccedil:"Lletra minúscula llatina c amb ce trencada",egrave:"Lletra minúscula llatina e amb accent greu",eacute:"Lletra minúscula llatina e amb accent agut",ecirc:"Lletra minúscula llatina e amb circumflex",euml:"Lletra minúscula llatina e amb dièresi", +igrave:"Lletra minúscula llatina i amb accent greu",iacute:"Lletra minúscula llatina i amb accent agut",icirc:"Lletra minúscula llatina i amb circumflex",iuml:"Lletra minúscula llatina i amb dièresi",eth:"Lletra minúscula llatina eth",ntilde:"Lletra minúscula llatina n amb titlla",ograve:"Lletra minúscula llatina o amb accent greu",oacute:"Lletra minúscula llatina o amb accent agut",ocirc:"Lletra minúscula llatina o amb circumflex",otilde:"Lletra minúscula llatina o amb titlla",ouml:"Lletra minúscula llatina o amb dièresi", +divide:"Símbol de divisió",oslash:"Lletra minúscula llatina o amb barra",ugrave:"Lletra minúscula llatina u amb accent greu",uacute:"Lletra minúscula llatina u amb accent agut",ucirc:"Lletra minúscula llatina u amb circumflex",uuml:"Lletra minúscula llatina u amb dièresi",yacute:"Lletra minúscula llatina y amb accent agut",thorn:"Lletra minúscula llatina thorn",yuml:"Lletra minúscula llatina y amb dièresi",OElig:"Lligadura majúscula llatina OE",oelig:"Lligadura minúscula llatina oe",372:"Lletra majúscula llatina W amb circumflex", +374:"Lletra majúscula llatina Y amb circumflex",373:"Lletra minúscula llatina w amb circumflex",375:"Lletra minúscula llatina y amb circumflex",sbquo:"Signe de cita simple baixa-9",8219:"Signe de cita simple alta-invertida-9",bdquo:"Signe de cita doble baixa-9",hellip:"Punts suspensius",trade:"Símbol de marca registrada",9658:"Punter negre apuntant cap a la dreta",bull:"Vinyeta",rarr:"Fletxa cap a la dreta",rArr:"Doble fletxa cap a la dreta",hArr:"Doble fletxa esquerra dreta",diams:"Vestit negre diamant", +asymp:"Gairebé igual a"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/cs.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/cs.js new file mode 100644 index 00000000000..c8d129ef3b3 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/cs.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","cs",{euro:"Znak eura",lsquo:"Počáteční uvozovka jednoduchá",rsquo:"Koncová uvozovka jednoduchá",ldquo:"Počáteční uvozovka dvojitá",rdquo:"Koncová uvozovka dvojitá",ndash:"En pomlčka",mdash:"Em pomlčka",iexcl:"Obrácený vykřičník",cent:"Znak centu",pound:"Znak libry",curren:"Znak měny",yen:"Znak jenu",brvbar:"Přerušená svislá čára",sect:"Znak oddílu",uml:"Přehláska",copy:"Znak copyrightu",ordf:"Ženský indikátor rodu",laquo:"Znak dvojitých lomených uvozovek vlevo", +not:"Logistický zápor",reg:"Znak registrace",macr:"Pomlčka nad",deg:"Znak stupně",sup2:"Dvojka jako horní index",sup3:"Trojka jako horní index",acute:"Čárka nad vpravo",micro:"Znak mikro",para:"Znak odstavce",middot:"Tečka uprostřed",cedil:"Ocásek vlevo",sup1:"Jednička jako horní index",ordm:"Mužský indikátor rodu",raquo:"Znak dvojitých lomených uvozovek vpravo",frac14:"Obyčejný zlomek jedna čtvrtina",frac12:"Obyčejný zlomek jedna polovina",frac34:"Obyčejný zlomek tři čtvrtiny",iquest:"Znak obráceného otazníku", +Agrave:"Velké písmeno latinky A s čárkou nad vlevo",Aacute:"Velké písmeno latinky A s čárkou nad vpravo",Acirc:"Velké písmeno latinky A s vokáněm",Atilde:"Velké písmeno latinky A s tildou",Auml:"Velké písmeno latinky A s dvěma tečkami",Aring:"Velké písmeno latinky A s kroužkem nad",AElig:"Velké písmeno latinky Ae",Ccedil:"Velké písmeno latinky C s ocáskem vlevo",Egrave:"Velké písmeno latinky E s čárkou nad vlevo",Eacute:"Velké písmeno latinky E s čárkou nad vpravo",Ecirc:"Velké písmeno latinky E s vokáněm", +Euml:"Velké písmeno latinky E s dvěma tečkami",Igrave:"Velké písmeno latinky I s čárkou nad vlevo",Iacute:"Velké písmeno latinky I s čárkou nad vpravo",Icirc:"Velké písmeno latinky I s vokáněm",Iuml:"Velké písmeno latinky I s dvěma tečkami",ETH:"Velké písmeno latinky Eth",Ntilde:"Velké písmeno latinky N s tildou",Ograve:"Velké písmeno latinky O s čárkou nad vlevo",Oacute:"Velké písmeno latinky O s čárkou nad vpravo",Ocirc:"Velké písmeno latinky O s vokáněm",Otilde:"Velké písmeno latinky O s tildou", +Ouml:"Velké písmeno latinky O s dvěma tečkami",times:"Znak násobení",Oslash:"Velké písmeno latinky O přeškrtnuté",Ugrave:"Velké písmeno latinky U s čárkou nad vlevo",Uacute:"Velké písmeno latinky U s čárkou nad vpravo",Ucirc:"Velké písmeno latinky U s vokáněm",Uuml:"Velké písmeno latinky U s dvěma tečkami",Yacute:"Velké písmeno latinky Y s čárkou nad vpravo",THORN:"Velké písmeno latinky Thorn",szlig:"Malé písmeno latinky ostré s",agrave:"Malé písmeno latinky a s čárkou nad vlevo",aacute:"Malé písmeno latinky a s čárkou nad vpravo", +acirc:"Malé písmeno latinky a s vokáněm",atilde:"Malé písmeno latinky a s tildou",auml:"Malé písmeno latinky a s dvěma tečkami",aring:"Malé písmeno latinky a s kroužkem nad",aelig:"Malé písmeno latinky ae",ccedil:"Malé písmeno latinky c s ocáskem vlevo",egrave:"Malé písmeno latinky e s čárkou nad vlevo",eacute:"Malé písmeno latinky e s čárkou nad vpravo",ecirc:"Malé písmeno latinky e s vokáněm",euml:"Malé písmeno latinky e s dvěma tečkami",igrave:"Malé písmeno latinky i s čárkou nad vlevo",iacute:"Malé písmeno latinky i s čárkou nad vpravo", +icirc:"Malé písmeno latinky i s vokáněm",iuml:"Malé písmeno latinky i s dvěma tečkami",eth:"Malé písmeno latinky eth",ntilde:"Malé písmeno latinky n s tildou",ograve:"Malé písmeno latinky o s čárkou nad vlevo",oacute:"Malé písmeno latinky o s čárkou nad vpravo",ocirc:"Malé písmeno latinky o s vokáněm",otilde:"Malé písmeno latinky o s tildou",ouml:"Malé písmeno latinky o s dvěma tečkami",divide:"Znak dělení",oslash:"Malé písmeno latinky o přeškrtnuté",ugrave:"Malé písmeno latinky u s čárkou nad vlevo", +uacute:"Malé písmeno latinky u s čárkou nad vpravo",ucirc:"Malé písmeno latinky u s vokáněm",uuml:"Malé písmeno latinky u s dvěma tečkami",yacute:"Malé písmeno latinky y s čárkou nad vpravo",thorn:"Malé písmeno latinky thorn",yuml:"Malé písmeno latinky y s dvěma tečkami",OElig:"Velká ligatura latinky OE",oelig:"Malá ligatura latinky OE",372:"Velké písmeno latinky W s vokáněm",374:"Velké písmeno latinky Y s vokáněm",373:"Malé písmeno latinky w s vokáněm",375:"Malé písmeno latinky y s vokáněm",sbquo:"Dolní 9 uvozovka jednoduchá", +8219:"Horní obrácená 9 uvozovka jednoduchá",bdquo:"Dolní 9 uvozovka dvojitá",hellip:"Trojtečkový úvod",trade:"Obchodní značka",9658:"Černý ukazatel směřující vpravo",bull:"Kolečko",rarr:"Šipka vpravo",rArr:"Dvojitá šipka vpravo",hArr:"Dvojitá šipka vlevo a vpravo",diams:"Černé piky",asymp:"Téměř se rovná"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/cy.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/cy.js new file mode 100644 index 00000000000..b873ac927ad --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/cy.js @@ -0,0 +1,14 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","cy",{euro:"Arwydd yr Ewro",lsquo:"Dyfynnod chwith unigol",rsquo:"Dyfynnod dde unigol",ldquo:"Dyfynnod chwith dwbl",rdquo:"Dyfynnod dde dwbl",ndash:"Cysylltnod en",mdash:"Cysylltnod em",iexcl:"Ebychnod gwrthdro",cent:"Arwydd sent",pound:"Arwydd punt",curren:"Arwydd arian cyfred",yen:"Arwydd yen",brvbar:"Bar toriedig",sect:"Arwydd adran",uml:"Didolnod",copy:"Arwydd hawlfraint",ordf:"Dangosydd benywaidd",laquo:"Dyfynnod dwbl ar ongl i'r chwith",not:"Arwydd Nid", +reg:"Arwydd cofrestredig",macr:"Macron",deg:"Arwydd gradd",sup2:"Dau uwchsgript",sup3:"Tri uwchsgript",acute:"Acen ddyrchafedig",micro:"Arwydd micro",para:"Arwydd pilcrow",middot:"Dot canol",cedil:"Sedila",sup1:"Un uwchsgript",ordm:"Dangosydd gwrywaidd",raquo:"Dyfynnod dwbl ar ongl i'r dde",frac14:"Ffracsiwn cyffredin un cwarter",frac12:"Ffracsiwn cyffredin un hanner",frac34:"Ffracsiwn cyffredin tri chwarter",iquest:"Marc cwestiwn gwrthdroëdig",Agrave:"Priflythyren A Lladinaidd gydag acen ddisgynedig", +Aacute:"Priflythyren A Lladinaidd gydag acen ddyrchafedig",Acirc:"Priflythyren A Lladinaidd gydag acen grom",Atilde:"Priflythyren A Lladinaidd gyda thild",Auml:"Priflythyren A Lladinaidd gyda didolnod",Aring:"Priflythyren A Lladinaidd gyda chylch uwchben",AElig:"Priflythyren Æ Lladinaidd",Ccedil:"Priflythyren C Lladinaidd gyda sedila",Egrave:"Priflythyren E Lladinaidd gydag acen ddisgynedig",Eacute:"Priflythyren E Lladinaidd gydag acen ddyrchafedig",Ecirc:"Priflythyren E Lladinaidd gydag acen grom", +Euml:"Priflythyren E Lladinaidd gyda didolnod",Igrave:"Priflythyren I Lladinaidd gydag acen ddisgynedig",Iacute:"Priflythyren I Lladinaidd gydag acen ddyrchafedig",Icirc:"Priflythyren I Lladinaidd gydag acen grom",Iuml:"Priflythyren I Lladinaidd gyda didolnod",ETH:"Priflythyren Eth",Ntilde:"Priflythyren N Lladinaidd gyda thild",Ograve:"Priflythyren O Lladinaidd gydag acen ddisgynedig",Oacute:"Priflythyren O Lladinaidd gydag acen ddyrchafedig",Ocirc:"Priflythyren O Lladinaidd gydag acen grom",Otilde:"Priflythyren O Lladinaidd gyda thild", +Ouml:"Priflythyren O Lladinaidd gyda didolnod",times:"Arwydd lluosi",Oslash:"Priflythyren O Lladinaidd gyda strôc",Ugrave:"Priflythyren U Lladinaidd gydag acen ddisgynedig",Uacute:"Priflythyren U Lladinaidd gydag acen ddyrchafedig",Ucirc:"Priflythyren U Lladinaidd gydag acen grom",Uuml:"Priflythyren U Lladinaidd gyda didolnod",Yacute:"Priflythyren Y Lladinaidd gydag acen ddyrchafedig",THORN:"Priflythyren Thorn",szlig:"Llythyren s fach Lladinaidd siarp ",agrave:"Llythyren a fach Lladinaidd gydag acen ddisgynedig", +aacute:"Llythyren a fach Lladinaidd gydag acen ddyrchafedig",acirc:"Llythyren a fach Lladinaidd gydag acen grom",atilde:"Llythyren a fach Lladinaidd gyda thild",auml:"Llythyren a fach Lladinaidd gyda didolnod",aring:"Llythyren a fach Lladinaidd gyda chylch uwchben",aelig:"Llythyren æ fach Lladinaidd",ccedil:"Llythyren c fach Lladinaidd gyda sedila",egrave:"Llythyren e fach Lladinaidd gydag acen ddisgynedig",eacute:"Llythyren e fach Lladinaidd gydag acen ddyrchafedig",ecirc:"Llythyren e fach Lladinaidd gydag acen grom", +euml:"Llythyren e fach Lladinaidd gyda didolnod",igrave:"Llythyren i fach Lladinaidd gydag acen ddisgynedig",iacute:"Llythyren i fach Lladinaidd gydag acen ddyrchafedig",icirc:"Llythyren i fach Lladinaidd gydag acen grom",iuml:"Llythyren i fach Lladinaidd gyda didolnod",eth:"Llythyren eth fach",ntilde:"Llythyren n fach Lladinaidd gyda thild",ograve:"Llythyren o fach Lladinaidd gydag acen ddisgynedig",oacute:"Llythyren o fach Lladinaidd gydag acen ddyrchafedig",ocirc:"Llythyren o fach Lladinaidd gydag acen grom", +otilde:"Llythyren o fach Lladinaidd gyda thild",ouml:"Llythyren o fach Lladinaidd gyda didolnod",divide:"Arwydd rhannu",oslash:"Llythyren o fach Lladinaidd gyda strôc",ugrave:"Llythyren u fach Lladinaidd gydag acen ddisgynedig",uacute:"Llythyren u fach Lladinaidd gydag acen ddyrchafedig",ucirc:"Llythyren u fach Lladinaidd gydag acen grom",uuml:"Llythyren u fach Lladinaidd gyda didolnod",yacute:"Llythyren y fach Lladinaidd gydag acen ddisgynedig",thorn:"Llythyren o fach Lladinaidd gyda strôc",yuml:"Llythyren y fach Lladinaidd gyda didolnod", +OElig:"Priflythyren cwlwm OE Lladinaidd ",oelig:"Priflythyren cwlwm oe Lladinaidd ",372:"Priflythyren W gydag acen grom",374:"Priflythyren Y gydag acen grom",373:"Llythyren w fach gydag acen grom",375:"Llythyren y fach gydag acen grom",sbquo:"Dyfynnod sengl 9-isel",8219:"Dyfynnod sengl 9-uchel cildro",bdquo:"Dyfynnod dwbl 9-isel",hellip:"Coll geiriau llorweddol",trade:"Arwydd marc masnachol",9658:"Pwyntydd du i'r dde",bull:"Bwled",rarr:"Saeth i'r dde",rArr:"Saeth ddwbl i'r dde",hArr:"Saeth ddwbl i'r chwith", +diams:"Siwt diemwnt du",asymp:"Bron yn hafal iddo"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/da.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/da.js new file mode 100644 index 00000000000..c1c6c3c207a --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/da.js @@ -0,0 +1,11 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","da",{euro:"Euro-tegn",lsquo:"Venstre enkelt anførselstegn",rsquo:"Højre enkelt anførselstegn",ldquo:"Venstre dobbelt anførselstegn",rdquo:"Højre dobbelt anførselstegn",ndash:"Bindestreg",mdash:"Tankestreg",iexcl:"Omvendt udråbstegn",cent:"Cent-tegn",pound:"Pund-tegn",curren:"Kurs-tegn",yen:"Yen-tegn",brvbar:"Brudt streg",sect:"Paragraftegn",uml:"Umlaut",copy:"Copyright-tegn",ordf:"Feminin ordinal indikator",laquo:"Venstre dobbel citations-vinkel",not:"Negation", +reg:"Registreret varemærke tegn",macr:"Macron",deg:"Grad-tegn",sup2:"Superscript to",sup3:"Superscript tre",acute:"Prim-tegn",micro:"Mikro-tegn",para:"Pilcrow-tegn",middot:"Punkt-tegn",cedil:"Cedille",sup1:"Superscript et",ordm:"Maskulin ordinal indikator",raquo:"Højre dobbel citations-vinkel",frac14:"En fjerdedel",frac12:"En halv",frac34:"En tredjedel",iquest:"Omvendt udråbstegn",Agrave:"Stort A med accent grave",Aacute:"Stort A med accent aigu",Acirc:"Stort A med cirkumfleks",Atilde:"Stort A med tilde", +Auml:"Stort A med umlaut",Aring:"Stort Å",AElig:"Stort Æ",Ccedil:"Stort C med cedille",Egrave:"Stort E med accent grave",Eacute:"Stort E med accent aigu",Ecirc:"Stort E med cirkumfleks",Euml:"Stort E med umlaut",Igrave:"Stort I med accent grave",Iacute:"Stort I med accent aigu",Icirc:"Stort I med cirkumfleks",Iuml:"Stort I med umlaut",ETH:"Stort Ð (edd)",Ntilde:"Stort N med tilde",Ograve:"Stort O med accent grave",Oacute:"Stort O med accent aigu",Ocirc:"Stort O med cirkumfleks",Otilde:"Stort O med tilde", +Ouml:"Stort O med umlaut",times:"Gange-tegn",Oslash:"Stort Ø",Ugrave:"Stort U med accent grave",Uacute:"Stort U med accent aigu",Ucirc:"Stort U med cirkumfleks",Uuml:"Stort U med umlaut",Yacute:"Stort Y med accent aigu",THORN:"Stort Thorn",szlig:"Lille eszett",agrave:"Lille a med accent grave",aacute:"Lille a med accent aigu",acirc:"Lille a med cirkumfleks",atilde:"Lille a med tilde",auml:"Lille a med umlaut",aring:"Lilla å",aelig:"Lille æ",ccedil:"Lille c med cedille",egrave:"Lille e med accent grave", +eacute:"Lille e med accent aigu",ecirc:"Lille e med cirkumfleks",euml:"Lille e med umlaut",igrave:"Lille i med accent grave",iacute:"Lille i med accent aigu",icirc:"Lille i med cirkumfleks",iuml:"Lille i med umlaut",eth:"Lille ð (edd)",ntilde:"Lille n med tilde",ograve:"Lille o med accent grave",oacute:"Lille o med accent aigu",ocirc:"Lille o med cirkumfleks",otilde:"Lille o med tilde",ouml:"Lille o med umlaut",divide:"Divisions-tegn",oslash:"Lille ø",ugrave:"Lille u med accent grave",uacute:"Lille u med accent aigu", +ucirc:"Lille u med cirkumfleks",uuml:"Lille u med umlaut",yacute:"Lille y med accent aigu",thorn:"Lille thorn",yuml:"Lille y med umlaut",OElig:"Stort Æ",oelig:"Lille æ",372:"Stort W med cirkumfleks",374:"Stort Y med cirkumfleks",373:"Lille w med cirkumfleks",375:"Lille y med cirkumfleks",sbquo:"Lavt enkelt 9-komma citationstegn",8219:"Højt enkelt 9-komma citationstegn",bdquo:"Dobbelt 9-komma citationstegn",hellip:"Tre horizontale prikker",trade:"Varemærke-tegn",9658:"Sort højre pil",bull:"Punkt", +rarr:"Højre pil",rArr:"Højre dobbelt pil",hArr:"Venstre højre dobbelt pil",diams:"Sort diamant",asymp:"Næsten lig med"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/de.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/de.js new file mode 100644 index 00000000000..84e86309042 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/de.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","de",{euro:"Euro Zeichen",lsquo:"Hochkomma links",rsquo:"Hochkomma rechts",ldquo:"Anführungszeichen links",rdquo:"Anführungszeichen rechts",ndash:"Kleiner Strich",mdash:"Mittlerer Strich",iexcl:"Invertiertes Ausrufezeichen",cent:"Cent-Zeichen",pound:"Pfund-Zeichen",curren:"Währungszeichen",yen:"Yen",brvbar:"Gestrichelte Linie",sect:"Paragrafenzeichen",uml:"Diäresis",copy:"Copyright-Zeichen",ordf:"Feminine ordinal Anzeige",laquo:"Nach links zeigenden Doppel-Winkel Anführungszeichen", +not:"Not-Zeichen",reg:"Registriert-Zeichen",macr:"Längezeichen",deg:"Grad-Zeichen",sup2:"Hoch 2",sup3:"Hoch 3",acute:"Akzentzeichen ",micro:"Mikro-Zeichen",para:"Pilcrow-Zeichen",middot:"Mittelpunkt",cedil:"Cedilla",sup1:"Hoch 1",ordm:"Männliche Ordnungszahl Anzeige",raquo:"Nach rechts zeigenden Doppel-Winkel Anführungszeichen",frac14:"ein Viertel",frac12:"Hälfte",frac34:"Dreiviertel",iquest:"Umgekehrtes Fragezeichen",Agrave:"Lateinischer Buchstabe A mit AkzentGrave",Aacute:"Lateinischer Buchstabe A mit Akutakzent", +Acirc:"Lateinischer Buchstabe A mit Zirkumflex",Atilde:"Lateinischer Buchstabe A mit Tilde",Auml:"Lateinischer Buchstabe A mit Trema",Aring:"Lateinischer Buchstabe A mit Ring oben",AElig:"Lateinischer Buchstabe Æ",Ccedil:"Lateinischer Buchstabe C mit Cedille",Egrave:"Lateinischer Buchstabe E mit AkzentGrave",Eacute:"Lateinischer Buchstabe E mit Akutakzent",Ecirc:"Lateinischer Buchstabe E mit Zirkumflex",Euml:"Lateinischer Buchstabe E Trema",Igrave:"Lateinischer Buchstabe I mit AkzentGrave",Iacute:"Lateinischer Buchstabe I mit Akutakzent", +Icirc:"Lateinischer Buchstabe I mit Zirkumflex",Iuml:"Lateinischer Buchstabe I mit Trema",ETH:"Lateinischer Buchstabe Eth",Ntilde:"Lateinischer Buchstabe N mit Tilde",Ograve:"Lateinischer Buchstabe O mit AkzentGrave",Oacute:"Lateinischer Buchstabe O mit Akutakzent",Ocirc:"Lateinischer Buchstabe O mit Zirkumflex",Otilde:"Lateinischer Buchstabe O mit Tilde",Ouml:"Lateinischer Buchstabe O mit Trema",times:"Multiplikation",Oslash:"Lateinischer Buchstabe O durchgestrichen",Ugrave:"Lateinischer Buchstabe U mit Akzentgrave", +Uacute:"Lateinischer Buchstabe U mit Akutakzent",Ucirc:"Lateinischer Buchstabe U mit Zirkumflex",Uuml:"Lateinischer Buchstabe a mit Trema",Yacute:"Lateinischer Buchstabe a mit Akzent",THORN:"Lateinischer Buchstabe mit Dorn",szlig:"Kleiner lateinischer Buchstabe scharfe s",agrave:"Kleiner lateinischer Buchstabe a mit Accent grave",aacute:"Kleiner lateinischer Buchstabe a mit Akut",acirc:"Lateinischer Buchstabe a mit Zirkumflex",atilde:"Lateinischer Buchstabe a mit Tilde",auml:"Kleiner lateinischer Buchstabe a mit Trema", +aring:"Kleiner lateinischer Buchstabe a mit Ring oben",aelig:"Lateinischer Buchstabe æ",ccedil:"Kleiner lateinischer Buchstabe c mit Cedille",egrave:"Kleiner lateinischer Buchstabe e mit Accent grave",eacute:"Kleiner lateinischer Buchstabe e mit Akut",ecirc:"Kleiner lateinischer Buchstabe e mit Zirkumflex",euml:"Kleiner lateinischer Buchstabe e mit Trema",igrave:"Kleiner lateinischer Buchstabe i mit AkzentGrave",iacute:"Kleiner lateinischer Buchstabe i mit Akzent",icirc:"Kleiner lateinischer Buchstabe i mit Zirkumflex", +iuml:"Kleiner lateinischer Buchstabe i mit Trema",eth:"Kleiner lateinischer Buchstabe eth",ntilde:"Kleiner lateinischer Buchstabe n mit Tilde",ograve:"Kleiner lateinischer Buchstabe o mit Accent grave",oacute:"Kleiner lateinischer Buchstabe o mit Akzent",ocirc:"Kleiner lateinischer Buchstabe o mit Zirkumflex",otilde:"Lateinischer Buchstabe i mit Tilde",ouml:"Kleiner lateinischer Buchstabe o mit Trema",divide:"Divisionszeichen",oslash:"Kleiner lateinischer Buchstabe o durchgestrichen",ugrave:"Kleiner lateinischer Buchstabe u mit Accent grave", +uacute:"Kleiner lateinischer Buchstabe u mit Akut",ucirc:"Kleiner lateinischer Buchstabe u mit Zirkumflex",uuml:"Kleiner lateinischer Buchstabe u mit Trema",yacute:"Kleiner lateinischer Buchstabe y mit Akut",thorn:"Kleiner lateinischer Buchstabe Dorn",yuml:"Kleiner lateinischer Buchstabe y mit Trema",OElig:"Lateinischer Buchstabe Ligatur OE",oelig:"Kleiner lateinischer Buchstabe Ligatur OE",372:"Lateinischer Buchstabe W mit Zirkumflex",374:"Lateinischer Buchstabe Y mit Zirkumflex",373:"Kleiner lateinischer Buchstabe w mit Zirkumflex", +375:"Kleiner lateinischer Buchstabe y mit Zirkumflex",sbquo:"Tiefergestelltes Komma",8219:"Rumgedrehtes Komma",bdquo:"Doppeltes Anführungszeichen unten",hellip:"horizontale Auslassungspunkte",trade:"Handelszeichen",9658:"Dreickspfeil rechts",bull:"Bullet",rarr:"Pfeil rechts",rArr:"Doppelpfeil rechts",hArr:"Doppelpfeil links",diams:"Karo",asymp:"Ungefähr"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/el.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/el.js new file mode 100644 index 00000000000..b31e8f4eb23 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/el.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","el",{euro:"Σύμβολο Ευρώ",lsquo:"Αριστερός χαρακτήρας μονού εισαγωγικού",rsquo:"Δεξιός χαρακτήρας μονού εισαγωγικού",ldquo:"Αριστερός χαρακτήρας ευθύγραμμων εισαγωγικών",rdquo:"Δεξιός χαρακτήρας ευθύγραμμων εισαγωγικών",ndash:"Παύλα en",mdash:"Παύλα em",iexcl:"Ανάποδο θαυμαστικό",cent:"Σύμβολο σεντ",pound:"Σύμβολο λίρας",curren:"Σύμβολο συναλλαγματικής μονάδας",yen:"Σύμβολο Γιεν",brvbar:"Σπασμένη μπάρα",sect:"Σύμβολο τμήματος",uml:"Διαίρεση",copy:"Σύμβολο πνευματικών δικαιωμάτων", +ordf:"Θηλυκός τακτικός δείκτης",laquo:"Γωνιώδη εισαγωγικά αριστερής κατάδειξης",not:"Σύμβολο άρνησης",reg:"Σύμβολο σημάτων κατατεθέν",macr:"Μακρόν",deg:"Σύμβολο βαθμού",sup2:"Εκτεθειμένο δύο",sup3:"Εκτεθειμένο τρία",acute:"Οξεία",micro:"Σύμβολο μικρού",para:"Σύμβολο παραγράφου",middot:"Μέση τελεία",cedil:"Υπογεγραμμένη",sup1:"Εκτεθειμένο ένα",ordm:"Αρσενικός τακτικός δείκτης",raquo:"Γωνιώδη εισαγωγικά δεξιάς κατάδειξης",frac14:"Γνήσιο κλάσμα ενός τετάρτου",frac12:"Γνήσιο κλάσμα ενός δεύτερου",frac34:"Γνήσιο κλάσμα τριών τετάρτων", +iquest:"Ανάποδο θαυμαστικό",Agrave:"Λατινικό κεφαλαίο γράμμα A με βαρεία",Aacute:"Λατινικό κεφαλαίο γράμμα A με οξεία",Acirc:"Λατινικό κεφαλαίο γράμμα A με περισπωμένη",Atilde:"Λατινικό κεφαλαίο γράμμα A με περισπωμένη",Auml:"Λατινικό κεφαλαίο γράμμα A με διαλυτικά",Aring:"Λατινικό κεφαλαίο γράμμα A με δακτύλιο επάνω",AElig:"Λατινικό κεφαλαίο γράμμα Æ",Ccedil:"Λατινικό κεφαλαίο γράμμα C με υπογεγραμμένη",Egrave:"Λατινικό κεφαλαίο γράμμα E με βαρεία",Eacute:"Λατινικό κεφαλαίο γράμμα E με οξεία",Ecirc:"Λατινικό κεφαλαίο γράμμα Ε με περισπωμένη ", +Euml:"Λατινικό κεφαλαίο γράμμα Ε με διαλυτικά",Igrave:"Λατινικό κεφαλαίο γράμμα I με βαρεία",Iacute:"Λατινικό κεφαλαίο γράμμα I με οξεία",Icirc:"Λατινικό κεφαλαίο γράμμα I με περισπωμένη",Iuml:"Λατινικό κεφαλαίο γράμμα I με διαλυτικά ",ETH:"Λατινικό κεφαλαίο γράμμα Eth",Ntilde:"Λατινικό κεφαλαίο γράμμα N με περισπωμένη",Ograve:"Λατινικό κεφαλαίο γράμμα O με βαρεία",Oacute:"Λατινικό κεφαλαίο γράμμα O με οξεία",Ocirc:"Λατινικό κεφαλαίο γράμμα O με περισπωμένη ",Otilde:"Λατινικό κεφαλαίο γράμμα O με περισπωμένη", +Ouml:"Λατινικό κεφαλαίο γράμμα O με διαλυτικά",times:"Σύμβολο πολλαπλασιασμού",Oslash:"Λατινικό κεφαλαίο γράμμα O με μολυβιά",Ugrave:"Λατινικό κεφαλαίο γράμμα U με βαρεία",Uacute:"Λατινικό κεφαλαίο γράμμα U με οξεία",Ucirc:"Λατινικό κεφαλαίο γράμμα U με περισπωμένη",Uuml:"Λατινικό κεφαλαίο γράμμα U με διαλυτικά",Yacute:"Λατινικό κεφαλαίο γράμμα Y με οξεία",THORN:"Λατινικό κεφαλαίο γράμμα Thorn",szlig:"Λατινικό μικρό γράμμα απότομο s",agrave:"Λατινικό μικρό γράμμα a με βαρεία",aacute:"Λατινικό μικρό γράμμα a με οξεία", +acirc:"Λατινικό μικρό γράμμα a με περισπωμένη",atilde:"Λατινικό μικρό γράμμα a με περισπωμένη",auml:"Λατινικό μικρό γράμμα a με διαλυτικά",aring:"Λατινικό μικρό γράμμα a με δακτύλιο πάνω",aelig:"Λατινικό μικρό γράμμα æ",ccedil:"Λατινικό μικρό γράμμα c με υπογεγραμμένη",egrave:"Λατινικό μικρό γράμμα ε με βαρεία",eacute:"Λατινικό μικρό γράμμα e με οξεία",ecirc:"Λατινικό μικρό γράμμα e με περισπωμένη",euml:"Λατινικό μικρό γράμμα e με διαλυτικά",igrave:"Λατινικό μικρό γράμμα i με βαρεία",iacute:"Λατινικό μικρό γράμμα i με οξεία", +icirc:"Λατινικό μικρό γράμμα i με περισπωμένη",iuml:"Λατινικό μικρό γράμμα i με διαλυτικά",eth:"Λατινικό μικρό γράμμα eth",ntilde:"Λατινικό μικρό γράμμα n με περισπωμένη",ograve:"Λατινικό μικρό γράμμα o με βαρεία",oacute:"Λατινικό μικρό γράμμα o με οξεία ",ocirc:"Λατινικό πεζό γράμμα o με περισπωμένη",otilde:"Λατινικό μικρό γράμμα o με περισπωμένη ",ouml:"Λατινικό μικρό γράμμα o με διαλυτικά",divide:"Σύμβολο διαίρεσης",oslash:"Λατινικό μικρό γράμμα o με περισπωμένη",ugrave:"Λατινικό μικρό γράμμα u με βαρεία", +uacute:"Λατινικό μικρό γράμμα u με οξεία",ucirc:"Λατινικό μικρό γράμμα u με περισπωμένη",uuml:"Λατινικό μικρό γράμμα u με διαλυτικά",yacute:"Λατινικό μικρό γράμμα y με οξεία",thorn:"Λατινικό μικρό γράμμα thorn",yuml:"Λατινικό μικρό γράμμα y με διαλυτικά",OElig:"Λατινικό κεφαλαίο σύμπλεγμα ΟΕ",oelig:"Λατινικό μικρό σύμπλεγμα oe",372:"Λατινικό κεφαλαίο γράμμα W με περισπωμένη",374:"Λατινικό κεφαλαίο γράμμα Y με περισπωμένη",373:"Λατινικό μικρό γράμμα w με περισπωμένη",375:"Λατινικό μικρό γράμμα y με περισπωμένη", +sbquo:"Ενιαίο χαμηλο -9 εισαγωγικό ",8219:"Ενιαίο υψηλο ανεστραμμένο-9 εισαγωγικό ",bdquo:"Διπλό χαμηλό-9 εισαγωγικό ",hellip:"Οριζόντια αποσιωπητικά",trade:"Σύμβολο εμπορικού κατατεθέν",9658:"Μαύρος δείκτης που δείχνει προς τα δεξιά",bull:"Κουκκίδα",rarr:"Δεξί βελάκι",rArr:"Διπλό δεξί βελάκι",hArr:"Διπλό βελάκι αριστερά-δεξιά",diams:"Μαύρο διαμάντι",asymp:"Σχεδόν ίσο με"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/en-gb.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/en-gb.js new file mode 100644 index 00000000000..08de5616f30 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/en-gb.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","en-gb",{euro:"Euro sign",lsquo:"Left single quotation mark",rsquo:"Right single quotation mark",ldquo:"Left double quotation mark",rdquo:"Right double quotation mark",ndash:"En dash",mdash:"Em dash",iexcl:"Inverted exclamation mark",cent:"Cent sign",pound:"Pound sign",curren:"Currency sign",yen:"Yen sign",brvbar:"Broken bar",sect:"Section sign",uml:"Diaeresis",copy:"Copyright sign",ordf:"Feminine ordinal indicator",laquo:"Left-pointing double angle quotation mark", +not:"Not sign",reg:"Registered sign",macr:"Macron",deg:"Degree sign",sup2:"Superscript two",sup3:"Superscript three",acute:"Acute accent",micro:"Micro sign",para:"Pilcrow sign",middot:"Middle dot",cedil:"Cedilla",sup1:"Superscript one",ordm:"Masculine ordinal indicator",raquo:"Right-pointing double angle quotation mark",frac14:"Vulgar fraction one quarter",frac12:"Vulgar fraction one half",frac34:"Vulgar fraction three quarters",iquest:"Inverted question mark",Agrave:"Latin capital letter A with grave accent", +Aacute:"Latin capital letter A with acute accent",Acirc:"Latin capital letter A with circumflex",Atilde:"Latin capital letter A with tilde",Auml:"Latin capital letter A with diaeresis",Aring:"Latin capital letter A with ring above",AElig:"Latin Capital letter Æ",Ccedil:"Latin capital letter C with cedilla",Egrave:"Latin capital letter E with grave accent",Eacute:"Latin capital letter E with acute accent",Ecirc:"Latin capital letter E with circumflex",Euml:"Latin capital letter E with diaeresis",Igrave:"Latin capital letter I with grave accent", +Iacute:"Latin capital letter I with acute accent",Icirc:"Latin capital letter I with circumflex",Iuml:"Latin capital letter I with diaeresis",ETH:"Latin capital letter Eth",Ntilde:"Latin capital letter N with tilde",Ograve:"Latin capital letter O with grave accent",Oacute:"Latin capital letter O with acute accent",Ocirc:"Latin capital letter O with circumflex",Otilde:"Latin capital letter O with tilde",Ouml:"Latin capital letter O with diaeresis",times:"Multiplication sign",Oslash:"Latin capital letter O with stroke", +Ugrave:"Latin capital letter U with grave accent",Uacute:"Latin capital letter U with acute accent",Ucirc:"Latin capital letter U with circumflex",Uuml:"Latin capital letter U with diaeresis",Yacute:"Latin capital letter Y with acute accent",THORN:"Latin capital letter Thorn",szlig:"Latin small letter sharp s",agrave:"Latin small letter a with grave accent",aacute:"Latin small letter a with acute accent",acirc:"Latin small letter a with circumflex",atilde:"Latin small letter a with tilde",auml:"Latin small letter a with diaeresis", +aring:"Latin small letter a with ring above",aelig:"Latin small letter æ",ccedil:"Latin small letter c with cedilla",egrave:"Latin small letter e with grave accent",eacute:"Latin small letter e with acute accent",ecirc:"Latin small letter e with circumflex",euml:"Latin small letter e with diaeresis",igrave:"Latin small letter i with grave accent",iacute:"Latin small letter i with acute accent",icirc:"Latin small letter i with circumflex",iuml:"Latin small letter i with diaeresis",eth:"Latin small letter eth", +ntilde:"Latin small letter n with tilde",ograve:"Latin small letter o with grave accent",oacute:"Latin small letter o with acute accent",ocirc:"Latin small letter o with circumflex",otilde:"Latin small letter o with tilde",ouml:"Latin small letter o with diaeresis",divide:"Division sign",oslash:"Latin small letter o with stroke",ugrave:"Latin small letter u with grave accent",uacute:"Latin small letter u with acute accent",ucirc:"Latin small letter u with circumflex",uuml:"Latin small letter u with diaeresis", +yacute:"Latin small letter y with acute accent",thorn:"Latin small letter thorn",yuml:"Latin small letter y with diaeresis",OElig:"Latin capital ligature OE",oelig:"Latin small ligature oe",372:"Latin capital letter W with circumflex",374:"Latin capital letter Y with circumflex",373:"Latin small letter w with circumflex",375:"Latin small letter y with circumflex",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Horizontal ellipsis", +trade:"Trade mark sign",9658:"Black right-pointing pointer",bull:"Bullet",rarr:"Rightwards arrow",rArr:"Rightwards double arrow",hArr:"Left right double arrow",diams:"Black diamond suit",asymp:"Almost equal to"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/en.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/en.js new file mode 100644 index 00000000000..418406d261d --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/en.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","en",{euro:"Euro sign",lsquo:"Left single quotation mark",rsquo:"Right single quotation mark",ldquo:"Left double quotation mark",rdquo:"Right double quotation mark",ndash:"En dash",mdash:"Em dash",iexcl:"Inverted exclamation mark",cent:"Cent sign",pound:"Pound sign",curren:"Currency sign",yen:"Yen sign",brvbar:"Broken bar",sect:"Section sign",uml:"Diaeresis",copy:"Copyright sign",ordf:"Feminine ordinal indicator",laquo:"Left-pointing double angle quotation mark", +not:"Not sign",reg:"Registered sign",macr:"Macron",deg:"Degree sign",sup2:"Superscript two",sup3:"Superscript three",acute:"Acute accent",micro:"Micro sign",para:"Pilcrow sign",middot:"Middle dot",cedil:"Cedilla",sup1:"Superscript one",ordm:"Masculine ordinal indicator",raquo:"Right-pointing double angle quotation mark",frac14:"Vulgar fraction one quarter",frac12:"Vulgar fraction one half",frac34:"Vulgar fraction three quarters",iquest:"Inverted question mark",Agrave:"Latin capital letter A with grave accent", +Aacute:"Latin capital letter A with acute accent",Acirc:"Latin capital letter A with circumflex",Atilde:"Latin capital letter A with tilde",Auml:"Latin capital letter A with diaeresis",Aring:"Latin capital letter A with ring above",AElig:"Latin Capital letter Æ",Ccedil:"Latin capital letter C with cedilla",Egrave:"Latin capital letter E with grave accent",Eacute:"Latin capital letter E with acute accent",Ecirc:"Latin capital letter E with circumflex",Euml:"Latin capital letter E with diaeresis",Igrave:"Latin capital letter I with grave accent", +Iacute:"Latin capital letter I with acute accent",Icirc:"Latin capital letter I with circumflex",Iuml:"Latin capital letter I with diaeresis",ETH:"Latin capital letter Eth",Ntilde:"Latin capital letter N with tilde",Ograve:"Latin capital letter O with grave accent",Oacute:"Latin capital letter O with acute accent",Ocirc:"Latin capital letter O with circumflex",Otilde:"Latin capital letter O with tilde",Ouml:"Latin capital letter O with diaeresis",times:"Multiplication sign",Oslash:"Latin capital letter O with stroke", +Ugrave:"Latin capital letter U with grave accent",Uacute:"Latin capital letter U with acute accent",Ucirc:"Latin capital letter U with circumflex",Uuml:"Latin capital letter U with diaeresis",Yacute:"Latin capital letter Y with acute accent",THORN:"Latin capital letter Thorn",szlig:"Latin small letter sharp s",agrave:"Latin small letter a with grave accent",aacute:"Latin small letter a with acute accent",acirc:"Latin small letter a with circumflex",atilde:"Latin small letter a with tilde",auml:"Latin small letter a with diaeresis", +aring:"Latin small letter a with ring above",aelig:"Latin small letter æ",ccedil:"Latin small letter c with cedilla",egrave:"Latin small letter e with grave accent",eacute:"Latin small letter e with acute accent",ecirc:"Latin small letter e with circumflex",euml:"Latin small letter e with diaeresis",igrave:"Latin small letter i with grave accent",iacute:"Latin small letter i with acute accent",icirc:"Latin small letter i with circumflex",iuml:"Latin small letter i with diaeresis",eth:"Latin small letter eth", +ntilde:"Latin small letter n with tilde",ograve:"Latin small letter o with grave accent",oacute:"Latin small letter o with acute accent",ocirc:"Latin small letter o with circumflex",otilde:"Latin small letter o with tilde",ouml:"Latin small letter o with diaeresis",divide:"Division sign",oslash:"Latin small letter o with stroke",ugrave:"Latin small letter u with grave accent",uacute:"Latin small letter u with acute accent",ucirc:"Latin small letter u with circumflex",uuml:"Latin small letter u with diaeresis", +yacute:"Latin small letter y with acute accent",thorn:"Latin small letter thorn",yuml:"Latin small letter y with diaeresis",OElig:"Latin capital ligature OE",oelig:"Latin small ligature oe",372:"Latin capital letter W with circumflex",374:"Latin capital letter Y with circumflex",373:"Latin small letter w with circumflex",375:"Latin small letter y with circumflex",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Horizontal ellipsis", +trade:"Trade mark sign",9658:"Black right-pointing pointer",bull:"Bullet",rarr:"Rightwards arrow",rArr:"Rightwards double arrow",hArr:"Left right double arrow",diams:"Black diamond suit",asymp:"Almost equal to"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/eo.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/eo.js new file mode 100644 index 00000000000..c5803d54d5a --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/eo.js @@ -0,0 +1,12 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","eo",{euro:"Eŭrosigno",lsquo:"Supra 6-citilo",rsquo:"Supra 9-citilo",ldquo:"Supra 66-citilo",rdquo:"Supra 99-citilo",ndash:"Streketo",mdash:"Substreko",iexcl:"Renversita krisigno",cent:"Cendosigno",pound:"Pundosigno",curren:"Monersigno",yen:"Enosigno",brvbar:"Rompita vertikala streko",sect:"Kurba paragrafo",uml:"Tremao",copy:"Kopirajtosigno",ordf:"Adjektiva numerfinaĵo",laquo:"Duobla malplio-citilo",not:"Negohoko",reg:"Registrita marko",macr:"Superstreko",deg:"Gradosigno", +sup2:"Supra indico 2",sup3:"Supra indico 3",acute:"Dekstra korno",micro:"Mikrosigno",para:"Rekta paragrafo",middot:"Meza punkto",cedil:"Zoeto",sup1:"Supra indico 1",ordm:"Substantiva numerfinaĵo",raquo:"Duobla plio-citilo",frac14:"Kvaronosigno",frac12:"Duonosigno",frac34:"Trikvaronosigno",iquest:"renversita demandosigno",Agrave:"Latina ĉeflitero A kun liva korno",Aacute:"Latina ĉeflitero A kun dekstra korno",Acirc:"Latina ĉeflitero A kun ĉapelo",Atilde:"Latina ĉeflitero A kun tildo",Auml:"Latina ĉeflitero A kun tremao", +Aring:"Latina ĉeflitero A kun superringo",AElig:"Latina ĉeflitera ligaturo Æ",Ccedil:"Latina ĉeflitero C kun zoeto",Egrave:"Latina ĉeflitero E kun liva korno",Eacute:"Latina ĉeflitero E kun dekstra korno",Ecirc:"Latina ĉeflitero E kun ĉapelo",Euml:"Latina ĉeflitero E kun tremao",Igrave:"Latina ĉeflitero I kun liva korno",Iacute:"Latina ĉeflitero I kun dekstra korno",Icirc:"Latina ĉeflitero I kun ĉapelo",Iuml:"Latina ĉeflitero I kun tremao",ETH:"Latina ĉeflitero islanda edo",Ntilde:"Latina ĉeflitero N kun tildo", +Ograve:"Latina ĉeflitero O kun liva korno",Oacute:"Latina ĉeflitero O kun dekstra korno",Ocirc:"Latina ĉeflitero O kun ĉapelo",Otilde:"Latina ĉeflitero O kun tildo",Ouml:"Latina ĉeflitero O kun tremao",times:"Multipliko",Oslash:"Latina ĉeflitero O trastrekita",Ugrave:"Latina ĉeflitero U kun liva korno",Uacute:"Latina ĉeflitero U kun dekstra korno",Ucirc:"Latina ĉeflitero U kun ĉapelo",Uuml:"Latina ĉeflitero U kun tremao",Yacute:"Latina ĉeflitero Y kun dekstra korno",THORN:"Latina ĉeflitero islanda dorno", +szlig:"Latina etlitero germana sozo (akra s)",agrave:"Latina etlitero a kun liva korno",aacute:"Latina etlitero a kun dekstra korno",acirc:"Latina etlitero a kun ĉapelo",atilde:"Latina etlitero a kun tildo",auml:"Latina etlitero a kun tremao",aring:"Latina etlitero a kun superringo",aelig:"Latina etlitera ligaturo æ",ccedil:"Latina etlitero c kun zoeto",egrave:"Latina etlitero e kun liva korno",eacute:"Latina etlitero e kun dekstra korno",ecirc:"Latina etlitero e kun ĉapelo",euml:"Latina etlitero e kun tremao", +igrave:"Latina etlitero i kun liva korno",iacute:"Latina etlitero i kun dekstra korno",icirc:"Latina etlitero i kun ĉapelo",iuml:"Latina etlitero i kun tremao",eth:"Latina etlitero islanda edo",ntilde:"Latina etlitero n kun tildo",ograve:"Latina etlitero o kun liva korno",oacute:"Latina etlitero o kun dekstra korno",ocirc:"Latina etlitero o kun ĉapelo",otilde:"Latina etlitero o kun tildo",ouml:"Latina etlitero o kun tremao",divide:"Dividosigno",oslash:"Latina etlitero o trastrekita",ugrave:"Latina etlitero u kun liva korno", +uacute:"Latina etlitero u kun dekstra korno",ucirc:"Latina etlitero u kun ĉapelo",uuml:"Latina etlitero u kun tremao",yacute:"Latina etlitero y kun dekstra korno",thorn:"Latina etlitero islanda dorno",yuml:"Latina etlitero y kun tremao",OElig:"Latina ĉeflitera ligaturo Œ",oelig:"Latina etlitera ligaturo œ",372:"Latina ĉeflitero W kun ĉapelo",374:"Latina ĉeflitero Y kun ĉapelo",373:"Latina etlitero w kun ĉapelo",375:"Latina etlitero y kun ĉapelo",sbquo:"Suba 9-citilo",8219:"Supra renversita 9-citilo", +bdquo:"Suba 99-citilo",hellip:"Tripunkto",trade:"Varmarka signo",9658:"Nigra sago dekstren",bull:"Bulmarko",rarr:"Sago dekstren",rArr:"Duobla sago dekstren",hArr:"Duobla sago maldekstren",diams:"Nigra kvadrato",asymp:"Preskaŭ egala"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/es.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/es.js new file mode 100644 index 00000000000..e91f1a0ac52 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/es.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","es",{euro:"Símbolo de euro",lsquo:"Comilla simple izquierda",rsquo:"Comilla simple derecha",ldquo:"Comilla doble izquierda",rdquo:"Comilla doble derecha",ndash:"Guión corto",mdash:"Guión medio largo",iexcl:"Signo de admiración invertido",cent:"Símbolo centavo",pound:"Símbolo libra",curren:"Símbolo moneda",yen:"Símbolo yen",brvbar:"Barra vertical rota",sect:"Símbolo sección",uml:"Diéresis",copy:"Signo de derechos de autor",ordf:"Indicador ordinal femenino",laquo:"Abre comillas angulares", +not:"Signo negación",reg:"Signo de marca registrada",macr:"Guión alto",deg:"Signo de grado",sup2:"Superíndice dos",sup3:"Superíndice tres",acute:"Acento agudo",micro:"Signo micro",para:"Signo de pi",middot:"Punto medio",cedil:"Cedilla",sup1:"Superíndice uno",ordm:"Indicador orginal masculino",raquo:"Cierra comillas angulares",frac14:"Fracción ordinaria de un quarto",frac12:"Fracción ordinaria de una mitad",frac34:"Fracción ordinaria de tres cuartos",iquest:"Signo de interrogación invertido",Agrave:"Letra A latina mayúscula con acento grave", +Aacute:"Letra A latina mayúscula con acento agudo",Acirc:"Letra A latina mayúscula con acento circunflejo",Atilde:"Letra A latina mayúscula con tilde",Auml:"Letra A latina mayúscula con diéresis",Aring:"Letra A latina mayúscula con aro arriba",AElig:"Letra Æ latina mayúscula",Ccedil:"Letra C latina mayúscula con cedilla",Egrave:"Letra E latina mayúscula con acento grave",Eacute:"Letra E latina mayúscula con acento agudo",Ecirc:"Letra E latina mayúscula con acento circunflejo",Euml:"Letra E latina mayúscula con diéresis", +Igrave:"Letra I latina mayúscula con acento grave",Iacute:"Letra I latina mayúscula con acento agudo",Icirc:"Letra I latina mayúscula con acento circunflejo",Iuml:"Letra I latina mayúscula con diéresis",ETH:"Letra Eth latina mayúscula",Ntilde:"Letra N latina mayúscula con tilde",Ograve:"Letra O latina mayúscula con acento grave",Oacute:"Letra O latina mayúscula con acento agudo",Ocirc:"Letra O latina mayúscula con acento circunflejo",Otilde:"Letra O latina mayúscula con tilde",Ouml:"Letra O latina mayúscula con diéresis", +times:"Signo de multiplicación",Oslash:"Letra O latina mayúscula con barra inclinada",Ugrave:"Letra U latina mayúscula con acento grave",Uacute:"Letra U latina mayúscula con acento agudo",Ucirc:"Letra U latina mayúscula con acento circunflejo",Uuml:"Letra U latina mayúscula con diéresis",Yacute:"Letra Y latina mayúscula con acento agudo",THORN:"Letra Thorn latina mayúscula",szlig:"Letra s latina fuerte pequeña",agrave:"Letra a latina pequeña con acento grave",aacute:"Letra a latina pequeña con acento agudo", +acirc:"Letra a latina pequeña con acento circunflejo",atilde:"Letra a latina pequeña con tilde",auml:"Letra a latina pequeña con diéresis",aring:"Letra a latina pequeña con aro arriba",aelig:"Letra æ latina pequeña",ccedil:"Letra c latina pequeña con cedilla",egrave:"Letra e latina pequeña con acento grave",eacute:"Letra e latina pequeña con acento agudo",ecirc:"Letra e latina pequeña con acento circunflejo",euml:"Letra e latina pequeña con diéresis",igrave:"Letra i latina pequeña con acento grave", +iacute:"Letra i latina pequeña con acento agudo",icirc:"Letra i latina pequeña con acento circunflejo",iuml:"Letra i latina pequeña con diéresis",eth:"Letra eth latina pequeña",ntilde:"Letra n latina pequeña con tilde",ograve:"Letra o latina pequeña con acento grave",oacute:"Letra o latina pequeña con acento agudo",ocirc:"Letra o latina pequeña con acento circunflejo",otilde:"Letra o latina pequeña con tilde",ouml:"Letra o latina pequeña con diéresis",divide:"Signo de división",oslash:"Letra o latina minúscula con barra inclinada", +ugrave:"Letra u latina pequeña con acento grave",uacute:"Letra u latina pequeña con acento agudo",ucirc:"Letra u latina pequeña con acento circunflejo",uuml:"Letra u latina pequeña con diéresis",yacute:"Letra u latina pequeña con acento agudo",thorn:"Letra thorn latina minúscula",yuml:"Letra y latina pequeña con diéresis",OElig:"Diptongo OE latino en mayúscula",oelig:"Diptongo oe latino en minúscula",372:"Letra W latina mayúscula con acento circunflejo",374:"Letra Y latina mayúscula con acento circunflejo", +373:"Letra w latina pequeña con acento circunflejo",375:"Letra y latina pequeña con acento circunflejo",sbquo:"Comilla simple baja-9",8219:"Comilla simple alta invertida-9",bdquo:"Comillas dobles bajas-9",hellip:"Puntos suspensivos horizontales",trade:"Signo de marca registrada",9658:"Apuntador negro apuntando a la derecha",bull:"Viñeta",rarr:"Flecha a la derecha",rArr:"Flecha doble a la derecha",hArr:"Flecha izquierda derecha doble",diams:"Diamante negro",asymp:"Casi igual a"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/et.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/et.js new file mode 100644 index 00000000000..2a208837b3e --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/et.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","et",{euro:"Euromärk",lsquo:"Alustav ühekordne jutumärk",rsquo:"Lõpetav ühekordne jutumärk",ldquo:"Alustav kahekordne jutumärk",rdquo:"Lõpetav kahekordne jutumärk",ndash:"Enn-kriips",mdash:"Emm-kriips",iexcl:"Pööratud hüüumärk",cent:"Sendimärk",pound:"Naela märk",curren:"Valuutamärk",yen:"Jeeni märk",brvbar:"Katkestatud kriips",sect:"Lõigu märk",uml:"Täpid",copy:"Autoriõiguse märk",ordf:"Feminine ordinal indicator",laquo:"Left-pointing double angle quotation mark", +not:"Ei-märk",reg:"Registered sign",macr:"Macron",deg:"Kraadimärk",sup2:"Ülaindeks kaks",sup3:"Ülaindeks kolm",acute:"Acute accent",micro:"Mikro-märk",para:"Pilcrow sign",middot:"Keskpunkt",cedil:"Cedilla",sup1:"Ülaindeks üks",ordm:"Masculine ordinal indicator",raquo:"Right-pointing double angle quotation mark",frac14:"Vulgar fraction one quarter",frac12:"Vulgar fraction one half",frac34:"Vulgar fraction three quarters",iquest:"Inverted question mark",Agrave:"Latin capital letter A with grave accent", +Aacute:"Latin capital letter A with acute accent",Acirc:"Latin capital letter A with circumflex",Atilde:"Ladina suur A tildega",Auml:"Latin capital letter A with diaeresis",Aring:"Latin capital letter A with ring above",AElig:"Latin Capital letter Æ",Ccedil:"Latin capital letter C with cedilla",Egrave:"Latin capital letter E with grave accent",Eacute:"Latin capital letter E with acute accent",Ecirc:"Latin capital letter E with circumflex",Euml:"Latin capital letter E with diaeresis",Igrave:"Latin capital letter I with grave accent", +Iacute:"Latin capital letter I with acute accent",Icirc:"Latin capital letter I with circumflex",Iuml:"Latin capital letter I with diaeresis",ETH:"Latin capital letter Eth",Ntilde:"Latin capital letter N with tilde",Ograve:"Latin capital letter O with grave accent",Oacute:"Latin capital letter O with acute accent",Ocirc:"Latin capital letter O with circumflex",Otilde:"Latin capital letter O with tilde",Ouml:"Täppidega ladina suur O",times:"Multiplication sign",Oslash:"Latin capital letter O with stroke", +Ugrave:"Latin capital letter U with grave accent",Uacute:"Latin capital letter U with acute accent",Ucirc:"Kandilise katusega suur ladina U",Uuml:"Täppidega ladina suur U",Yacute:"Latin capital letter Y with acute accent",THORN:"Latin capital letter Thorn",szlig:"Ladina väike terav s",agrave:"Latin small letter a with grave accent",aacute:"Latin small letter a with acute accent",acirc:"Kandilise katusega ladina väike a",atilde:"Tildega ladina väike a",auml:"Täppidega ladina väike a",aring:"Latin small letter a with ring above", +aelig:"Latin small letter æ",ccedil:"Latin small letter c with cedilla",egrave:"Latin small letter e with grave accent",eacute:"Latin small letter e with acute accent",ecirc:"Latin small letter e with circumflex",euml:"Latin small letter e with diaeresis",igrave:"Latin small letter i with grave accent",iacute:"Latin small letter i with acute accent",icirc:"Latin small letter i with circumflex",iuml:"Latin small letter i with diaeresis",eth:"Latin small letter eth",ntilde:"Latin small letter n with tilde", +ograve:"Latin small letter o with grave accent",oacute:"Latin small letter o with acute accent",ocirc:"Latin small letter o with circumflex",otilde:"Latin small letter o with tilde",ouml:"Latin small letter o with diaeresis",divide:"Jagamismärk",oslash:"Latin small letter o with stroke",ugrave:"Latin small letter u with grave accent",uacute:"Latin small letter u with acute accent",ucirc:"Latin small letter u with circumflex",uuml:"Latin small letter u with diaeresis",yacute:"Latin small letter y with acute accent", +thorn:"Latin small letter thorn",yuml:"Latin small letter y with diaeresis",OElig:"Latin capital ligature OE",oelig:"Latin small ligature oe",372:"Latin capital letter W with circumflex",374:"Latin capital letter Y with circumflex",373:"Latin small letter w with circumflex",375:"Latin small letter y with circumflex",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Horizontal ellipsis",trade:"Kaubamärgi märk",9658:"Black right-pointing pointer", +bull:"Kuul",rarr:"Nool paremale",rArr:"Topeltnool paremale",hArr:"Topeltnool vasakule",diams:"Black diamond suit",asymp:"Ligikaudu võrdne"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/fa.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/fa.js new file mode 100644 index 00000000000..c3efb3ce402 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/fa.js @@ -0,0 +1,12 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","fa",{euro:"نشان یورو",lsquo:"علامت نقل قول تکی چپ",rsquo:"علامت نقل قول تکی راست",ldquo:"علامت نقل قول دوتایی چپ",rdquo:"علامت نقل قول دوتایی راست",ndash:"خط تیره En",mdash:"خط تیره Em",iexcl:"علامت تعجب وارونه",cent:"نشان سنت",pound:"نشان پوند",curren:"نشان ارز",yen:"نشان ین",brvbar:"نوار شکسته",sect:"نشان بخش",uml:"نشان سواگیری",copy:"نشان کپی رایت",ordf:"شاخص ترتیبی مونث",laquo:"اشاره چپ مکرر برای زاویه علامت نقل قول",not:"نشان ثبت نشده",reg:"نشان ثبت شده", +macr:"نشان خط بالای حرف",deg:"نشان درجه",sup2:"بالانویس دو",sup3:"بالانویس سه",acute:"لهجه غلیظ",micro:"نشان مایکرو",para:"نشان محل بند",middot:"نقطه میانی",cedil:"سدیل",sup1:"بالانویس 1",ordm:"شاخص ترتیبی مذکر",raquo:"نشان زاویه‌دار دوتایی نقل قول راست چین",frac14:"واحد عامیانه 1/4",frac12:"واحد عامینه نصف",frac34:"واحد عامیانه 3/4",iquest:"علامت سوال معکوس",Agrave:"حرف A بزرگ لاتین با تلفظ غلیظ",Aacute:"حرف A بزرگ لاتین با تلفظ شدید",Acirc:"حرف A بزرگ لاتین با دور",Atilde:"حرف A بزرگ لاتین با صدای کامی", +Auml:"حرف A بزرگ لاتین با نشان سواگیری",Aring:"حرف A بزرگ لاتین با حلقه بالا",AElig:"حرف Æ بزرگ لاتین",Ccedil:"حرف C بزرگ لاتین با نشان سواگیری",Egrave:"حرف E بزرگ لاتین با تلفظ درشت",Eacute:"حرف E بزرگ لاتین با تلفظ زیر",Ecirc:"حرف E بزرگ لاتین با خمان",Euml:"حرف E بزرگ لاتین با نشان سواگیری",Igrave:"حرف I بزرگ لاتین با تلفظ درشت",Iacute:"حرف I بزرگ لاتین با تلفظ ریز",Icirc:"حرف I بزرگ لاتین با خمان",Iuml:"حرف I بزرگ لاتین با نشان سواگیری",ETH:"حرف لاتین بزرگ واکه ترتیبی",Ntilde:"حرف N بزرگ لاتین با مد", +Ograve:"حرف O بزرگ لاتین با تلفظ درشت",Oacute:"حرف O بزرگ لاتین با تلفظ ریز",Ocirc:"حرف O بزرگ لاتین با خمان",Otilde:"حرف O بزرگ لاتین با مد",Ouml:"حرف O بزرگ لاتین با نشان سواگیری",times:"نشان ضربدر",Oslash:"حرف O بزرگ لاتین با میان خط",Ugrave:"حرف U بزرگ لاتین با تلفظ درشت",Uacute:"حرف U بزرگ لاتین با تلفظ ریز",Ucirc:"حرف U بزرگ لاتین با خمان",Uuml:"حرف U بزرگ لاتین با نشان سواگیری",Yacute:"حرف Y بزرگ لاتین با تلفظ ریز",THORN:"حرف بزرگ لاتین خاردار",szlig:"حرف کوچک لاتین شارپ s",agrave:"حرف a کوچک لاتین با تلفظ درشت", +aacute:"حرف a کوچک لاتین با تلفظ ریز",acirc:"حرف a کوچک لاتین با خمان",atilde:"حرف a کوچک لاتین با صدای کامی",auml:"حرف a کوچک لاتین با نشان سواگیری",aring:"حرف a کوچک لاتین گوشواره دار",aelig:"حرف کوچک لاتین æ",ccedil:"حرف c کوچک لاتین با نشان سدیل",egrave:"حرف e کوچک لاتین با تلفظ درشت",eacute:"حرف e کوچک لاتین با تلفظ ریز",ecirc:"حرف e کوچک لاتین با خمان",euml:"حرف e کوچک لاتین با نشان سواگیری",igrave:"حرف i کوچک لاتین با تلفظ درشت",iacute:"حرف i کوچک لاتین با تلفظ ریز",icirc:"حرف i کوچک لاتین با خمان", +iuml:"حرف i کوچک لاتین با نشان سواگیری",eth:"حرف کوچک لاتین eth",ntilde:"حرف n کوچک لاتین با صدای کامی",ograve:"حرف o کوچک لاتین با تلفظ درشت",oacute:"حرف o کوچک لاتین با تلفظ زیر",ocirc:"حرف o کوچک لاتین با خمان",otilde:"حرف o کوچک لاتین با صدای کامی",ouml:"حرف o کوچک لاتین با نشان سواگیری",divide:"نشان بخش",oslash:"حرف o کوچک لاتین با میان خط",ugrave:"حرف u کوچک لاتین با تلفظ درشت",uacute:"حرف u کوچک لاتین با تلفظ ریز",ucirc:"حرف u کوچک لاتین با خمان",uuml:"حرف u کوچک لاتین با نشان سواگیری",yacute:"حرف y کوچک لاتین با تلفظ ریز", +thorn:"حرف کوچک لاتین خاردار",yuml:"حرف y کوچک لاتین با نشان سواگیری",OElig:"بند بزرگ لاتین OE",oelig:"بند کوچک لاتین oe",372:"حرف W بزرگ لاتین با خمان",374:"حرف Y بزرگ لاتین با خمان",373:"حرف w کوچک لاتین با خمان",375:"حرف y کوچک لاتین با خمان",sbquo:"نشان نقل قول تکی زیر-9",8219:"نشان نقل قول تکی high-reversed-9",bdquo:"نقل قول دوتایی پایین-9",hellip:"حذف افقی",trade:"نشان تجاری",9658:"نشانگر سیاه جهت راست",bull:"گلوله",rarr:"فلش راست",rArr:"فلش دوتایی راست",hArr:"فلش دوتایی چپ راست",diams:"نشان الماس سیاه", +asymp:"تقریبا برابر با"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/fi.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/fi.js new file mode 100644 index 00000000000..79f4a7d9b51 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/fi.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","fi",{euro:"Euron merkki",lsquo:"Vasen yksittäinen lainausmerkki",rsquo:"Oikea yksittäinen lainausmerkki",ldquo:"Vasen kaksoislainausmerkki",rdquo:"Oikea kaksoislainausmerkki",ndash:"En dash",mdash:"Em dash",iexcl:"Inverted exclamation mark",cent:"Sentin merkki",pound:"Punnan merkki",curren:"Valuuttamerkki",yen:"Yenin merkki",brvbar:"Broken bar",sect:"Section sign",uml:"Diaeresis",copy:"Copyright sign",ordf:"Feminine ordinal indicator",laquo:"Left-pointing double angle quotation mark", +not:"Not sign",reg:"Rekisteröity merkki",macr:"Macron",deg:"Asteen merkki",sup2:"Yläindeksi kaksi",sup3:"Yläindeksi kolme",acute:"Acute accent",micro:"Mikron merkki",para:"Pilcrow sign",middot:"Middle dot",cedil:"Cedilla",sup1:"Yläindeksi yksi",ordm:"Masculine ordinal indicator",raquo:"Right-pointing double angle quotation mark",frac14:"Vulgar fraction one quarter",frac12:"Vulgar fraction one half",frac34:"Vulgar fraction three quarters",iquest:"Ylösalaisin oleva kysymysmerkki",Agrave:"Latin capital letter A with grave accent", +Aacute:"Latin capital letter A with acute accent",Acirc:"Latin capital letter A with circumflex",Atilde:"Latin capital letter A with tilde",Auml:"Latin capital letter A with diaeresis",Aring:"Latin capital letter A with ring above",AElig:"Latin Capital letter Æ",Ccedil:"Latin capital letter C with cedilla",Egrave:"Latin capital letter E with grave accent",Eacute:"Latin capital letter E with acute accent",Ecirc:"Latin capital letter E with circumflex",Euml:"Latin capital letter E with diaeresis",Igrave:"Latin capital letter I with grave accent", +Iacute:"Latin capital letter I with acute accent",Icirc:"Latin capital letter I with circumflex",Iuml:"Latin capital letter I with diaeresis",ETH:"Latin capital letter Eth",Ntilde:"Latin capital letter N with tilde",Ograve:"Latin capital letter O with grave accent",Oacute:"Latin capital letter O with acute accent",Ocirc:"Latin capital letter O with circumflex",Otilde:"Latin capital letter O with tilde",Ouml:"Latin capital letter O with diaeresis",times:"Kertomerkki",Oslash:"Latin capital letter O with stroke", +Ugrave:"Latin capital letter U with grave accent",Uacute:"Latin capital letter U with acute accent",Ucirc:"Latin capital letter U with circumflex",Uuml:"Latin capital letter U with diaeresis",Yacute:"Latin capital letter Y with acute accent",THORN:"Latin capital letter Thorn",szlig:"Latin small letter sharp s",agrave:"Latin small letter a with grave accent",aacute:"Latin small letter a with acute accent",acirc:"Latin small letter a with circumflex",atilde:"Latin small letter a with tilde",auml:"Latin small letter a with diaeresis", +aring:"Latin small letter a with ring above",aelig:"Latin small letter æ",ccedil:"Latin small letter c with cedilla",egrave:"Latin small letter e with grave accent",eacute:"Latin small letter e with acute accent",ecirc:"Latin small letter e with circumflex",euml:"Latin small letter e with diaeresis",igrave:"Latin small letter i with grave accent",iacute:"Latin small letter i with acute accent",icirc:"Latin small letter i with circumflex",iuml:"Latin small letter i with diaeresis",eth:"Latin small letter eth", +ntilde:"Latin small letter n with tilde",ograve:"Latin small letter o with grave accent",oacute:"Latin small letter o with acute accent",ocirc:"Latin small letter o with circumflex",otilde:"Latin small letter o with tilde",ouml:"Latin small letter o with diaeresis",divide:"Jakomerkki",oslash:"Latin small letter o with stroke",ugrave:"Latin small letter u with grave accent",uacute:"Latin small letter u with acute accent",ucirc:"Latin small letter u with circumflex",uuml:"Latin small letter u with diaeresis", +yacute:"Latin small letter y with acute accent",thorn:"Latin small letter thorn",yuml:"Latin small letter y with diaeresis",OElig:"Latin capital ligature OE",oelig:"Latin small ligature oe",372:"Latin capital letter W with circumflex",374:"Latin capital letter Y with circumflex",373:"Latin small letter w with circumflex",375:"Latin small letter y with circumflex",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Horizontal ellipsis", +trade:"Tavaramerkki merkki",9658:"Black right-pointing pointer",bull:"Bullet",rarr:"Nuoli oikealle",rArr:"Kaksoisnuoli oikealle",hArr:"Kaksoisnuoli oikealle ja vasemmalle",diams:"Black diamond suit",asymp:"Noin"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/fr-ca.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/fr-ca.js new file mode 100644 index 00000000000..24a0d0da907 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/fr-ca.js @@ -0,0 +1,10 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","fr-ca",{euro:"Symbole Euro",lsquo:"Guillemet simple ouvrant",rsquo:"Guillemet simple fermant",ldquo:"Guillemet double ouvrant",rdquo:"Guillemet double fermant",ndash:"Tiret haut",mdash:"Tiret",iexcl:"Point d'exclamation inversé",cent:"Symbole de cent",pound:"Symbole de Livre Sterling",curren:"Symbole monétaire",yen:"Symbole du Yen",brvbar:"Barre scindée",sect:"Symbole de section",uml:"Tréma",copy:"Symbole de copyright",ordf:"Indicateur ordinal féminin",laquo:"Guillemet français ouvrant", +not:"Indicateur de négation",reg:"Symbole de marque déposée",macr:"Macron",deg:"Degré",sup2:"Exposant 2",sup3:"Exposant 3",acute:"Accent aigüe",micro:"Symbole micro",para:"Paragraphe",middot:"Point médian",cedil:"Cédille",sup1:"Exposant 1",ordm:"Indicateur ordinal masculin",raquo:"Guillemet français fermant",frac14:"Un quart",frac12:"Une demi",frac34:"Trois quart",iquest:"Point d'interrogation inversé",Agrave:"A accent grave",Aacute:"A accent aigüe",Acirc:"A circonflexe",Atilde:"A tilde",Auml:"A tréma", +Aring:"A avec un rond au dessus",AElig:"Æ majuscule",Ccedil:"C cédille",Egrave:"E accent grave",Eacute:"E accent aigüe",Ecirc:"E accent circonflexe",Euml:"E tréma",Igrave:"I accent grave",Iacute:"I accent aigüe",Icirc:"I accent circonflexe",Iuml:"I tréma",ETH:"Lettre majuscule islandaise ED",Ntilde:"N tilde",Ograve:"O accent grave",Oacute:"O accent aigüe",Ocirc:"O accent circonflexe",Otilde:"O tilde",Ouml:"O tréma",times:"Symbole de multiplication",Oslash:"O barré",Ugrave:"U accent grave",Uacute:"U accent aigüe", +Ucirc:"U accent circonflexe",Uuml:"U tréma",Yacute:"Y accent aigüe",THORN:"Lettre islandaise Thorn majuscule",szlig:"Lettre minuscule allemande s dur",agrave:"a accent grave",aacute:"a accent aigüe",acirc:"a accent circonflexe",atilde:"a tilde",auml:"a tréma",aring:"a avec un cercle au dessus",aelig:"æ",ccedil:"c cédille",egrave:"e accent grave",eacute:"e accent aigüe",ecirc:"e accent circonflexe",euml:"e tréma",igrave:"i accent grave",iacute:"i accent aigüe",icirc:"i accent circonflexe",iuml:"i tréma", +eth:"Lettre minuscule islandaise ED",ntilde:"n tilde",ograve:"o accent grave",oacute:"o accent aigüe",ocirc:"O accent circonflexe",otilde:"O tilde",ouml:"O tréma",divide:"Symbole de division",oslash:"o barré",ugrave:"u accent grave",uacute:"u accent aigüe",ucirc:"u accent circonflexe",uuml:"u tréma",yacute:"y accent aigüe",thorn:"Lettre islandaise thorn minuscule",yuml:"y tréma",OElig:"ligature majuscule latine Œ",oelig:"ligature minuscule latine œ",372:"W accent circonflexe",374:"Y accent circonflexe", +373:"w accent circonflexe",375:"y accent circonflexe",sbquo:"Guillemet simple fermant",8219:"Guillemet-virgule supérieur culbuté",bdquo:"Guillemet-virgule double inférieur",hellip:"Points de suspension",trade:"Symbole de marque déposée",9658:"Flèche noire pointant vers la droite",bull:"Puce",rarr:"Flèche vers la droite",rArr:"Flèche double vers la droite",hArr:"Flèche double vers la gauche",diams:"Carreau",asymp:"Presque égal"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/fr.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/fr.js new file mode 100644 index 00000000000..b224b1e05dc --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/fr.js @@ -0,0 +1,11 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","fr",{euro:"Symbole Euro",lsquo:"Guillemet simple ouvrant",rsquo:"Guillemet simple fermant",ldquo:"Guillemet double ouvrant",rdquo:"Guillemet double fermant",ndash:"Tiret haut",mdash:"Tiret cadratin",iexcl:"Point d'exclamation inversé",cent:"Symbole Cent",pound:"Symbole Livre Sterling",curren:"Symbole monétaire",yen:"Symbole Yen",brvbar:"Barre verticale scindée",sect:"Section",uml:"Tréma",copy:"Symbole Copyright",ordf:"Indicateur ordinal féminin",laquo:"Guillemet français ouvrant", +not:"Crochet de négation",reg:"Marque déposée",macr:"Macron",deg:"Degré",sup2:"Exposant 2",sup3:"\\tExposant 3",acute:"Accent aigu",micro:"Omicron",para:"Paragraphe",middot:"Point médian",cedil:"Cédille",sup1:"\\tExposant 1",ordm:"Indicateur ordinal masculin",raquo:"Guillemet français fermant",frac14:"Un quart",frac12:"Un demi",frac34:"Trois quarts",iquest:"Point d'interrogation inversé",Agrave:"A majuscule accent grave",Aacute:"A majuscule accent aigu",Acirc:"A majuscule accent circonflexe",Atilde:"A majuscule avec caron", +Auml:"A majuscule tréma",Aring:"A majuscule avec un rond au-dessus",AElig:"Æ majuscule ligaturés",Ccedil:"C majuscule cédille",Egrave:"E majuscule accent grave",Eacute:"E majuscule accent aigu",Ecirc:"E majuscule accent circonflexe",Euml:"E majuscule tréma",Igrave:"I majuscule accent grave",Iacute:"I majuscule accent aigu",Icirc:"I majuscule accent circonflexe",Iuml:"I majuscule tréma",ETH:"Lettre majuscule islandaise ED",Ntilde:"N majuscule avec caron",Ograve:"O majuscule accent grave",Oacute:"O majuscule accent aigu", +Ocirc:"O majuscule accent circonflexe",Otilde:"O majuscule avec caron",Ouml:"O majuscule tréma",times:"Multiplication",Oslash:"O majuscule barré",Ugrave:"U majuscule accent grave",Uacute:"U majuscule accent aigu",Ucirc:"U majuscule accent circonflexe",Uuml:"U majuscule tréma",Yacute:"Y majuscule accent aigu",THORN:"Lettre islandaise Thorn majuscule",szlig:"Lettre minuscule allemande s dur",agrave:"a minuscule accent grave",aacute:"a minuscule accent aigu",acirc:"a minuscule accent circonflexe",atilde:"a minuscule avec caron", +auml:"a minuscule tréma",aring:"a minuscule avec un rond au-dessus",aelig:"æ minuscule ligaturés",ccedil:"c minuscule cédille",egrave:"e minuscule accent grave",eacute:"e minuscule accent aigu",ecirc:"e minuscule accent circonflexe",euml:"e minuscule tréma",igrave:"i minuscule accent grave",iacute:"i minuscule accent aigu",icirc:"i minuscule accent circonflexe",iuml:"i minuscule tréma",eth:"Lettre minuscule islandaise ED",ntilde:"n minuscule avec caron",ograve:"o minuscule accent grave",oacute:"o minuscule accent aigu", +ocirc:"o minuscule accent circonflexe",otilde:"o minuscule avec caron",ouml:"o minuscule tréma",divide:"Division",oslash:"o minuscule barré",ugrave:"u minuscule accent grave",uacute:"u minuscule accent aigu",ucirc:"u minuscule accent circonflexe",uuml:"u minuscule tréma",yacute:"y minuscule accent aigu",thorn:"Lettre islandaise thorn minuscule",yuml:"y minuscule tréma",OElig:"ligature majuscule latine Œ",oelig:"ligature minuscule latine œ",372:"W majuscule accent circonflexe",374:"Y majuscule accent circonflexe", +373:"w minuscule accent circonflexe",375:"y minuscule accent circonflexe",sbquo:"Guillemet simple fermant (anglais)",8219:"Guillemet-virgule supérieur culbuté",bdquo:"Guillemet-virgule double inférieur",hellip:"Points de suspension",trade:"Marque commerciale (trade mark)",9658:"Flèche noire pointant vers la droite",bull:"Gros point médian",rarr:"Flèche vers la droite",rArr:"Double flèche vers la droite",hArr:"Double flèche vers la gauche",diams:"Carreau noir",asymp:"Presque égal"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/gl.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/gl.js new file mode 100644 index 00000000000..797ecc53260 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/gl.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","gl",{euro:"Símbolo do euro",lsquo:"Comiña simple esquerda",rsquo:"Comiña simple dereita",ldquo:"Comiñas dobres esquerda",rdquo:"Comiñas dobres dereita",ndash:"Guión",mdash:"Raia",iexcl:"Signo de admiración invertido",cent:"Símbolo do centavo",pound:"Símbolo da libra",curren:"Símbolo de moeda",yen:"Símbolo do yen",brvbar:"Barra vertical rota",sect:"Símbolo de sección",uml:"Diérese",copy:"Símbolo de dereitos de autoría",ordf:"Indicador ordinal feminino",laquo:"Comiñas latinas, apertura", +not:"Signo negación",reg:"Símbolo de marca rexistrada",macr:"Guión alto",deg:"Signo de grao",sup2:"Superíndice dous",sup3:"Superíndice tres",acute:"Acento agudo",micro:"Signo de micro",para:"Signo de pi",middot:"Punto medio",cedil:"Cedilla",sup1:"Superíndice un",ordm:"Indicador ordinal masculino",raquo:"Comiñas latinas, peche",frac14:"Fracción ordinaria de un cuarto",frac12:"Fracción ordinaria de un medio",frac34:"Fracción ordinaria de tres cuartos",iquest:"Signo de interrogación invertido",Agrave:"Letra A latina maiúscula con acento grave", +Aacute:"Letra A latina maiúscula con acento agudo",Acirc:"Letra A latina maiúscula con acento circunflexo",Atilde:"Letra A latina maiúscula con til",Auml:"Letra A latina maiúscula con diérese",Aring:"Letra A latina maiúscula con aro enriba",AElig:"Letra Æ latina maiúscula",Ccedil:"Letra C latina maiúscula con cedilla",Egrave:"Letra E latina maiúscula con acento grave",Eacute:"Letra E latina maiúscula con acento agudo",Ecirc:"Letra E latina maiúscula con acento circunflexo",Euml:"Letra E latina maiúscula con diérese", +Igrave:"Letra I latina maiúscula con acento grave",Iacute:"Letra I latina maiúscula con acento agudo",Icirc:"Letra I latina maiúscula con acento circunflexo",Iuml:"Letra I latina maiúscula con diérese",ETH:"Letra Ed latina maiúscula",Ntilde:"Letra N latina maiúscula con til",Ograve:"Letra O latina maiúscula con acento grave",Oacute:"Letra O latina maiúscula con acento agudo",Ocirc:"Letra O latina maiúscula con acento circunflexo",Otilde:"Letra O latina maiúscula con til",Ouml:"Letra O latina maiúscula con diérese", +times:"Signo de multiplicación",Oslash:"Letra O latina maiúscula con barra transversal",Ugrave:"Letra U latina maiúscula con acento grave",Uacute:"Letra U latina maiúscula con acento agudo",Ucirc:"Letra U latina maiúscula con acento circunflexo",Uuml:"Letra U latina maiúscula con diérese",Yacute:"Letra Y latina maiúscula con acento agudo",THORN:"Letra Thorn latina maiúscula",szlig:"Letra s latina forte minúscula",agrave:"Letra a latina minúscula con acento grave",aacute:"Letra a latina minúscula con acento agudo", +acirc:"Letra a latina minúscula con acento circunflexo",atilde:"Letra a latina minúscula con til",auml:"Letra a latina minúscula con diérese",aring:"Letra a latina minúscula con aro enriba",aelig:"Letra æ latina minúscula",ccedil:"Letra c latina minúscula con cedilla",egrave:"Letra e latina minúscula con acento grave",eacute:"Letra e latina minúscula con acento agudo",ecirc:"Letra e latina minúscula con acento circunflexo",euml:"Letra e latina minúscula con diérese",igrave:"Letra i latina minúscula con acento grave", +iacute:"Letra i latina minúscula con acento agudo",icirc:"Letra i latina minúscula con acento circunflexo",iuml:"Letra i latina minúscula con diérese",eth:"Letra ed latina minúscula",ntilde:"Letra n latina minúscula con til",ograve:"Letra o latina minúscula con acento grave",oacute:"Letra o latina minúscula con acento agudo",ocirc:"Letra o latina minúscula con acento circunflexo",otilde:"Letra o latina minúscula con til",ouml:"Letra o latina minúscula con diérese",divide:"Signo de división",oslash:"Letra o latina minúscula con barra transversal", +ugrave:"Letra u latina minúscula con acento grave",uacute:"Letra u latina minúscula con acento agudo",ucirc:"Letra u latina minúscula con acento circunflexo",uuml:"Letra u latina minúscula con diérese",yacute:"Letra y latina minúscula con acento agudo",thorn:"Letra Thorn latina minúscula",yuml:"Letra y latina minúscula con diérese",OElig:"Ligadura OE latina maiúscula",oelig:"Ligadura oe latina minúscula",372:"Letra W latina maiúscula con acento circunflexo",374:"Letra Y latina maiúscula con acento circunflexo", +373:"Letra w latina minúscula con acento circunflexo",375:"Letra y latina minúscula con acento circunflexo",sbquo:"Comiña simple baixa, de apertura",8219:"Comiña simple alta, de peche",bdquo:"Comiñas dobres baixas, de apertura",hellip:"Elipse, puntos suspensivos",trade:"Signo de marca rexistrada",9658:"Apuntador negro apuntando á dereita",bull:"Viñeta",rarr:"Frecha á dereita",rArr:"Frecha dobre á dereita",hArr:"Frecha dobre da esquerda á dereita",diams:"Diamante negro",asymp:"Case igual a"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/he.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/he.js new file mode 100644 index 00000000000..75935897607 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/he.js @@ -0,0 +1,12 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","he",{euro:"יורו",lsquo:"סימן ציטוט יחיד שמאלי",rsquo:"סימן ציטוט יחיד ימני",ldquo:"סימן ציטוט כפול שמאלי",rdquo:"סימן ציטוט כפול ימני",ndash:"קו מפריד קצר",mdash:"קו מפריד ארוך",iexcl:"סימן קריאה הפוך",cent:"סנט",pound:"פאונד",curren:"מטבע",yen:"ין",brvbar:"קו שבור",sect:"סימן מקטע",uml:"שתי נקודות אופקיות (Diaeresis)",copy:"סימן זכויות יוצרים (Copyright)",ordf:"סימן אורדינאלי נקבי",laquo:"סימן ציטוט זווית כפולה לשמאל",not:"סימן שלילה מתמטי",reg:"סימן רשום", +macr:"מקרון (הגיה ארוכה)",deg:"מעלות",sup2:"2 בכתיב עילי",sup3:"3 בכתיב עילי",acute:"סימן דגוש (Acute)",micro:"מיקרו",para:"סימון פסקה",middot:"נקודה אמצעית",cedil:"סדיליה",sup1:"1 בכתיב עילי",ordm:"סימן אורדינאלי זכרי",raquo:"סימן ציטוט זווית כפולה לימין",frac14:"רבע בשבר פשוט",frac12:"חצי בשבר פשוט",frac34:"שלושה רבעים בשבר פשוט",iquest:"סימן שאלה הפוך",Agrave:"אות לטינית A עם גרש (Grave)",Aacute:"Latin capital letter A with acute accent",Acirc:"Latin capital letter A with circumflex",Atilde:"Latin capital letter A with tilde", +Auml:"Latin capital letter A with diaeresis",Aring:"Latin capital letter A with ring above",AElig:"אות לטינית Æ גדולה",Ccedil:"Latin capital letter C with cedilla",Egrave:"אות לטינית E עם גרש (Grave)",Eacute:"Latin capital letter E with acute accent",Ecirc:"Latin capital letter E with circumflex",Euml:"Latin capital letter E with diaeresis",Igrave:"אות לטינית I עם גרש (Grave)",Iacute:"Latin capital letter I with acute accent",Icirc:"Latin capital letter I with circumflex",Iuml:"Latin capital letter I with diaeresis", +ETH:"אות לטינית Eth גדולה",Ntilde:"Latin capital letter N with tilde",Ograve:"אות לטינית O עם גרש (Grave)",Oacute:"Latin capital letter O with acute accent",Ocirc:"Latin capital letter O with circumflex",Otilde:"Latin capital letter O with tilde",Ouml:"Latin capital letter O with diaeresis",times:"סימן כפל",Oslash:"Latin capital letter O with stroke",Ugrave:"אות לטינית U עם גרש (Grave)",Uacute:"Latin capital letter U with acute accent",Ucirc:"Latin capital letter U with circumflex",Uuml:"Latin capital letter U with diaeresis", +Yacute:"Latin capital letter Y with acute accent",THORN:"אות לטינית Thorn גדולה",szlig:"אות לטינית s חדה קטנה",agrave:"אות לטינית a עם גרש (Grave)",aacute:"Latin small letter a with acute accent",acirc:"Latin small letter a with circumflex",atilde:"Latin small letter a with tilde",auml:"Latin small letter a with diaeresis",aring:"Latin small letter a with ring above",aelig:"אות לטינית æ קטנה",ccedil:"Latin small letter c with cedilla",egrave:"אות לטינית e עם גרש (Grave)",eacute:"Latin small letter e with acute accent", +ecirc:"Latin small letter e with circumflex",euml:"Latin small letter e with diaeresis",igrave:"אות לטינית i עם גרש (Grave)",iacute:"Latin small letter i with acute accent",icirc:"Latin small letter i with circumflex",iuml:"Latin small letter i with diaeresis",eth:"אות לטינית eth קטנה",ntilde:"Latin small letter n with tilde",ograve:"אות לטינית o עם גרש (Grave)",oacute:"Latin small letter o with acute accent",ocirc:"Latin small letter o with circumflex",otilde:"Latin small letter o with tilde",ouml:"Latin small letter o with diaeresis", +divide:"סימן חלוקה",oslash:"Latin small letter o with stroke",ugrave:"אות לטינית u עם גרש (Grave)",uacute:"Latin small letter u with acute accent",ucirc:"Latin small letter u with circumflex",uuml:"Latin small letter u with diaeresis",yacute:"Latin small letter y with acute accent",thorn:"אות לטינית thorn קטנה",yuml:"Latin small letter y with diaeresis",OElig:"Latin capital ligature OE",oelig:"Latin small ligature oe",372:"Latin capital letter W with circumflex",374:"Latin capital letter Y with circumflex", +373:"Latin small letter w with circumflex",375:"Latin small letter y with circumflex",sbquo:"סימן ציטוט נמוך יחיד",8219:"סימן ציטוט",bdquo:"סימן ציטוט נמוך כפול",hellip:"שלוש נקודות",trade:"סימן טריידמארק",9658:"סמן שחור לצד ימין",bull:"תבליט (רשימה)",rarr:"חץ לימין",rArr:"חץ כפול לימין",hArr:"חץ כפול לימין ושמאל",diams:"יהלום מלא",asymp:"כמעט שווה"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/hr.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/hr.js new file mode 100644 index 00000000000..65754321391 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/hr.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","hr",{euro:"Euro znak",lsquo:"Lijevi jednostruki navodnik",rsquo:"Desni jednostruki navodnik",ldquo:"Lijevi dvostruki navodnik",rdquo:"Desni dvostruki navodnik",ndash:"En crtica",mdash:"Em crtica",iexcl:"Naopaki uskličnik",cent:"Cent znak",pound:"Funta znak",curren:"Znak valute",yen:"Yen znak",brvbar:"Potrgana prečka",sect:"Znak odjeljka",uml:"Prijeglasi",copy:"Copyright znak",ordf:"Feminine ordinal indicator",laquo:"Lijevi dvostruki uglati navodnik",not:"Not znak", +reg:"Registered znak",macr:"Macron",deg:"Stupanj znak",sup2:"Superscript two",sup3:"Superscript three",acute:"Acute accent",micro:"Mikro znak",para:"Pilcrow sign",middot:"Srednja točka",cedil:"Cedilla",sup1:"Superscript one",ordm:"Masculine ordinal indicator",raquo:"Desni dvostruku uglati navodnik",frac14:"Vulgar fraction one quarter",frac12:"Vulgar fraction one half",frac34:"Vulgar fraction three quarters",iquest:"Naopaki upitnik",Agrave:"Veliko latinsko slovo A s akcentom",Aacute:"Latinično veliko slovo A sa oštrim naglaskom", +Acirc:"Latin capital letter A with circumflex",Atilde:"Latin capital letter A with tilde",Auml:"Latin capital letter A with diaeresis",Aring:"Latin capital letter A with ring above",AElig:"Latin Capital letter Æ",Ccedil:"Latin capital letter C with cedilla",Egrave:"Latin capital letter E with grave accent",Eacute:"Latin capital letter E with acute accent",Ecirc:"Latin capital letter E with circumflex",Euml:"Latin capital letter E with diaeresis",Igrave:"Latin capital letter I with grave accent",Iacute:"Latin capital letter I with acute accent", +Icirc:"Latin capital letter I with circumflex",Iuml:"Latin capital letter I with diaeresis",ETH:"Latin capital letter Eth",Ntilde:"Latin capital letter N with tilde",Ograve:"Latin capital letter O with grave accent",Oacute:"Latin capital letter O with acute accent",Ocirc:"Latin capital letter O with circumflex",Otilde:"Latin capital letter O with tilde",Ouml:"Latin capital letter O with diaeresis",times:"Multiplication sign",Oslash:"Latin capital letter O with stroke",Ugrave:"Latin capital letter U with grave accent", +Uacute:"Latin capital letter U with acute accent",Ucirc:"Latin capital letter U with circumflex",Uuml:"Latin capital letter U with diaeresis",Yacute:"Latin capital letter Y with acute accent",THORN:"Latin capital letter Thorn",szlig:"Latin small letter sharp s",agrave:"Latin small letter a with grave accent",aacute:"Latin small letter a with acute accent",acirc:"Latin small letter a with circumflex",atilde:"Latin small letter a with tilde",auml:"Latin small letter a with diaeresis",aring:"Latin small letter a with ring above", +aelig:"Latin small letter æ",ccedil:"Latin small letter c with cedilla",egrave:"Latin small letter e with grave accent",eacute:"Latin small letter e with acute accent",ecirc:"Latin small letter e with circumflex",euml:"Latin small letter e with diaeresis",igrave:"Latin small letter i with grave accent",iacute:"Latin small letter i with acute accent",icirc:"Latin small letter i with circumflex",iuml:"Latin small letter i with diaeresis",eth:"Latin small letter eth",ntilde:"Latin small letter n with tilde", +ograve:"Latin small letter o with grave accent",oacute:"Latin small letter o with acute accent",ocirc:"Latin small letter o with circumflex",otilde:"Latin small letter o with tilde",ouml:"Latin small letter o with diaeresis",divide:"Division sign",oslash:"Latin small letter o with stroke",ugrave:"Latin small letter u with grave accent",uacute:"Latin small letter u with acute accent",ucirc:"Latin small letter u with circumflex",uuml:"Latin small letter u with diaeresis",yacute:"Latin small letter y with acute accent", +thorn:"Latin small letter thorn",yuml:"Latin small letter y with diaeresis",OElig:"Latin capital ligature OE",oelig:"Latin small ligature oe",372:"Latin capital letter W with circumflex",374:"Latin capital letter Y with circumflex",373:"Latin small letter w with circumflex",375:"Latin small letter y with circumflex",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Horizontal ellipsis",trade:"Trade mark sign",9658:"Black right-pointing pointer", +bull:"Bullet",rarr:"Rightwards arrow",rArr:"Rightwards double arrow",hArr:"Left right double arrow",diams:"Black diamond suit",asymp:"Almost equal to"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/hu.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/hu.js new file mode 100644 index 00000000000..44554839d02 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/hu.js @@ -0,0 +1,12 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","hu",{euro:"Euró jel",lsquo:"Bal szimpla idézőjel",rsquo:"Jobb szimpla idézőjel",ldquo:"Bal dupla idézőjel",rdquo:"Jobb dupla idézőjel",ndash:"Rövid gondolatjel",mdash:"Hosszú gondolatjel",iexcl:"Fordított felkiáltójel",cent:"Cent jel",pound:"Font jel",curren:"Valuta jel",yen:"Yen jel",brvbar:"Hosszú kettőspont",sect:"Paragrafus jel",uml:"Kettős hangzó jel",copy:"Szerzői jog jel",ordf:"Női sorrend mutatója",laquo:"Balra mutató duplanyíl",not:"Feltételes kötőjel", +reg:"Bejegyzett védjegy jele",macr:"Hosszúsági jel",deg:"Fok jel",sup2:"Négyzeten jel",sup3:"Köbön jel",acute:"Éles ékezet",micro:"Mikro-jel",para:"Bekezdés jel",middot:"Közép pont",cedil:"Cédille",sup1:"Elsőn jel",ordm:"Férfi sorrend mutatója",raquo:"Jobbra mutató duplanyíl",frac14:"Egy negyed jel",frac12:"Egy ketted jel",frac34:"Három negyed jel",iquest:"Fordított kérdőjel",Agrave:"Latin nagy A fordított ékezettel",Aacute:"Latin nagy A normál ékezettel",Acirc:"Latin nagy A hajtott ékezettel",Atilde:"Latin nagy A hullámjellel", +Auml:"Latin nagy A kettőspont ékezettel",Aring:"Latin nagy A gyűrű ékezettel",AElig:"Latin nagy Æ betű",Ccedil:"Latin nagy C cedillával",Egrave:"Latin nagy E fordított ékezettel",Eacute:"Latin nagy E normál ékezettel",Ecirc:"Latin nagy E hajtott ékezettel",Euml:"Latin nagy E dupla kettőspont ékezettel",Igrave:"Latin nagy I fordított ékezettel",Iacute:"Latin nagy I normál ékezettel",Icirc:"Latin nagy I hajtott ékezettel",Iuml:"Latin nagy I kettőspont ékezettel",ETH:"Latin nagy Eth betű",Ntilde:"Latin nagy N hullámjellel", +Ograve:"Latin nagy O fordított ékezettel",Oacute:"Latin nagy O normál ékezettel",Ocirc:"Latin nagy O hajtott ékezettel",Otilde:"Latin nagy O hullámjellel",Ouml:"Latin nagy O kettőspont ékezettel",times:"Szorzás jel",Oslash:"Latin O betű áthúzással",Ugrave:"Latin nagy U fordított ékezettel",Uacute:"Latin nagy U normál ékezettel",Ucirc:"Latin nagy U hajtott ékezettel",Uuml:"Latin nagy U kettőspont ékezettel",Yacute:"Latin nagy Y normál ékezettel",THORN:"Latin nagy Thorn betű",szlig:"Latin kis s betű", +agrave:"Latin kis a fordított ékezettel",aacute:"Latin kis a normál ékezettel",acirc:"Latin kis a hajtott ékezettel",atilde:"Latin kis a hullámjellel",auml:"Latin kis a kettőspont ékezettel",aring:"Latin kis a gyűrű ékezettel",aelig:"Latin kis æ betű",ccedil:"Latin kis c cedillával",egrave:"Latin kis e fordított ékezettel",eacute:"Latin kis e normál ékezettel",ecirc:"Latin kis e hajtott ékezettel",euml:"Latin kis e dupla kettőspont ékezettel",igrave:"Latin kis i fordított ékezettel",iacute:"Latin kis i normál ékezettel", +icirc:"Latin kis i hajtott ékezettel",iuml:"Latin kis i kettőspont ékezettel",eth:"Latin kis eth betű",ntilde:"Latin kis n hullámjellel",ograve:"Latin kis o fordított ékezettel",oacute:"Latin kis o normál ékezettel",ocirc:"Latin kis o hajtott ékezettel",otilde:"Latin kis o hullámjellel",ouml:"Latin kis o kettőspont ékezettel",divide:"Osztásjel",oslash:"Latin kis o betű áthúzással",ugrave:"Latin kis u fordított ékezettel",uacute:"Latin kis u normál ékezettel",ucirc:"Latin kis u hajtott ékezettel", +uuml:"Latin kis u kettőspont ékezettel",yacute:"Latin kis y normál ékezettel",thorn:"Latin kis thorn jel",yuml:"Latin kis y kettőspont ékezettel",OElig:"Latin nagy OE-jel",oelig:"Latin kis oe-jel",372:"Latin nagy W hajtott ékezettel",374:"Latin nagy Y hajtott ékezettel",373:"Latin kis w hajtott ékezettel",375:"Latin kis y hajtott ékezettel",sbquo:"Nyitó nyomdai szimpla idézőjel",8219:"Záró nyomdai záró idézőjel",bdquo:"Nyitó nyomdai dupla idézőjel",hellip:"Három pont",trade:"Kereskedelmi védjegy jele", +9658:"Jobbra mutató fekete mutató",bull:"Golyó",rarr:"Jobbra mutató nyíl",rArr:"Jobbra mutató duplanyíl",hArr:"Bal-jobb duplanyíl",diams:"Fekete gyémánt jel",asymp:"Majdnem egyenlő jel"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/id.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/id.js new file mode 100644 index 00000000000..1b4bd679519 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/id.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","id",{euro:"Tanda Euro",lsquo:"Left single quotation mark",rsquo:"Right single quotation mark",ldquo:"Left double quotation mark",rdquo:"Right double quotation mark",ndash:"En dash",mdash:"Em dash",iexcl:"Inverted exclamation mark",cent:"Cent sign",pound:"Pound sign",curren:"Currency sign",yen:"Tanda Yen",brvbar:"Broken bar",sect:"Section sign",uml:"Diaeresis",copy:"Tanda Hak Cipta",ordf:"Feminine ordinal indicator",laquo:"Left-pointing double angle quotation mark", +not:"Not sign",reg:"Tanda Telah Terdaftar",macr:"Macron",deg:"Degree sign",sup2:"Superscript two",sup3:"Superscript three",acute:"Acute accent",micro:"Micro sign",para:"Pilcrow sign",middot:"Middle dot",cedil:"Cedilla",sup1:"Superscript one",ordm:"Masculine ordinal indicator",raquo:"Right-pointing double angle quotation mark",frac14:"Vulgar fraction one quarter",frac12:"Vulgar fraction one half",frac34:"Vulgar fraction three quarters",iquest:"Inverted question mark",Agrave:"Latin capital letter A with grave accent", +Aacute:"Latin capital letter A with acute accent",Acirc:"Latin capital letter A with circumflex",Atilde:"Latin capital letter A with tilde",Auml:"Latin capital letter A with diaeresis",Aring:"Latin capital letter A with ring above",AElig:"Latin Capital letter Æ",Ccedil:"Latin capital letter C with cedilla",Egrave:"Latin capital letter E with grave accent",Eacute:"Latin capital letter E with acute accent",Ecirc:"Latin capital letter E with circumflex",Euml:"Latin capital letter E with diaeresis",Igrave:"Latin capital letter I with grave accent", +Iacute:"Latin capital letter I with acute accent",Icirc:"Latin capital letter I with circumflex",Iuml:"Latin capital letter I with diaeresis",ETH:"Latin capital letter Eth",Ntilde:"Latin capital letter N with tilde",Ograve:"Latin capital letter O with grave accent",Oacute:"Latin capital letter O with acute accent",Ocirc:"Latin capital letter O with circumflex",Otilde:"Latin capital letter O with tilde",Ouml:"Latin capital letter O with diaeresis",times:"Multiplication sign",Oslash:"Latin capital letter O with stroke", +Ugrave:"Latin capital letter U with grave accent",Uacute:"Latin capital letter U with acute accent",Ucirc:"Latin capital letter U with circumflex",Uuml:"Latin capital letter U with diaeresis",Yacute:"Latin capital letter Y with acute accent",THORN:"Latin capital letter Thorn",szlig:"Latin small letter sharp s",agrave:"Latin small letter a with grave accent",aacute:"Latin small letter a with acute accent",acirc:"Latin small letter a with circumflex",atilde:"Latin small letter a with tilde",auml:"Latin small letter a with diaeresis", +aring:"Latin small letter a with ring above",aelig:"Latin small letter æ",ccedil:"Latin small letter c with cedilla",egrave:"Latin small letter e with grave accent",eacute:"Latin small letter e with acute accent",ecirc:"Latin small letter e with circumflex",euml:"Latin small letter e with diaeresis",igrave:"Latin small letter i with grave accent",iacute:"Latin small letter i with acute accent",icirc:"Latin small letter i with circumflex",iuml:"Latin small letter i with diaeresis",eth:"Latin small letter eth", +ntilde:"Latin small letter n with tilde",ograve:"Latin small letter o with grave accent",oacute:"Latin small letter o with acute accent",ocirc:"Latin small letter o with circumflex",otilde:"Latin small letter o with tilde",ouml:"Latin small letter o with diaeresis",divide:"Division sign",oslash:"Latin small letter o with stroke",ugrave:"Latin small letter u with grave accent",uacute:"Latin small letter u with acute accent",ucirc:"Latin small letter u with circumflex",uuml:"Latin small letter u with diaeresis", +yacute:"Latin small letter y with acute accent",thorn:"Latin small letter thorn",yuml:"Latin small letter y with diaeresis",OElig:"Latin capital ligature OE",oelig:"Latin small ligature oe",372:"Latin capital letter W with circumflex",374:"Latin capital letter Y with circumflex",373:"Latin small letter w with circumflex",375:"Latin small letter y with circumflex",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Horizontal ellipsis", +trade:"Trade mark sign",9658:"Black right-pointing pointer",bull:"Bullet",rarr:"Rightwards arrow",rArr:"Rightwards double arrow",hArr:"Left right double arrow",diams:"Black diamond suit",asymp:"Almost equal to"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/it.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/it.js new file mode 100644 index 00000000000..6b090973eec --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/it.js @@ -0,0 +1,14 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","it",{euro:"Simbolo Euro",lsquo:"Virgoletta singola sinistra",rsquo:"Virgoletta singola destra",ldquo:"Virgolette aperte",rdquo:"Virgolette chiuse",ndash:"Trattino",mdash:"Trattino lungo",iexcl:"Punto esclavamativo invertito",cent:"Simbolo Cent",pound:"Simbolo Sterlina",curren:"Simbolo Moneta",yen:"Simbolo Yen",brvbar:"Barra interrotta",sect:"Simbolo di sezione",uml:"Dieresi",copy:"Simbolo Copyright",ordf:"Indicatore ordinale femminile",laquo:"Virgolette basse aperte", +not:"Nessun segno",reg:"Simbolo Registrato",macr:"Macron",deg:"Simbolo Grado",sup2:"Apice Due",sup3:"Apice Tre",acute:"Accento acuto",micro:"Simbolo Micro",para:"Simbolo Paragrafo",middot:"Punto centrale",cedil:"Cediglia",sup1:"Apice Uno",ordm:"Indicatore ordinale maschile",raquo:"Virgolette basse chiuse",frac14:"Frazione volgare un quarto",frac12:"Frazione volgare un mezzo",frac34:"Frazione volgare tre quarti",iquest:"Punto interrogativo invertito",Agrave:"Lettera maiuscola latina A con accento grave", +Aacute:"Lettera maiuscola latina A con accento acuto",Acirc:"Lettera maiuscola latina A con accento circonflesso",Atilde:"Lettera maiuscola latina A con tilde",Auml:"Lettera maiuscola latina A con dieresi",Aring:"Lettera maiuscola latina A con anello sopra",AElig:"Lettera maiuscola latina AE",Ccedil:"Lettera maiuscola latina C con cediglia",Egrave:"Lettera maiuscola latina E con accento grave",Eacute:"Lettera maiuscola latina E con accento acuto",Ecirc:"Lettera maiuscola latina E con accento circonflesso", +Euml:"Lettera maiuscola latina E con dieresi",Igrave:"Lettera maiuscola latina I con accento grave",Iacute:"Lettera maiuscola latina I con accento acuto",Icirc:"Lettera maiuscola latina I con accento circonflesso",Iuml:"Lettera maiuscola latina I con dieresi",ETH:"Lettera maiuscola latina Eth",Ntilde:"Lettera maiuscola latina N con tilde",Ograve:"Lettera maiuscola latina O con accento grave",Oacute:"Lettera maiuscola latina O con accento acuto",Ocirc:"Lettera maiuscola latina O con accento circonflesso", +Otilde:"Lettera maiuscola latina O con tilde",Ouml:"Lettera maiuscola latina O con dieresi",times:"Simbolo di moltiplicazione",Oslash:"Lettera maiuscola latina O barrata",Ugrave:"Lettera maiuscola latina U con accento grave",Uacute:"Lettera maiuscola latina U con accento acuto",Ucirc:"Lettera maiuscola latina U con accento circonflesso",Uuml:"Lettera maiuscola latina U con accento circonflesso",Yacute:"Lettera maiuscola latina Y con accento acuto",THORN:"Lettera maiuscola latina Thorn",szlig:"Lettera latina minuscola doppia S", +agrave:"Lettera minuscola latina a con accento grave",aacute:"Lettera minuscola latina a con accento acuto",acirc:"Lettera minuscola latina a con accento circonflesso",atilde:"Lettera minuscola latina a con tilde",auml:"Lettera minuscola latina a con dieresi",aring:"Lettera minuscola latina a con anello superiore",aelig:"Lettera minuscola latina ae",ccedil:"Lettera minuscola latina c con cediglia",egrave:"Lettera minuscola latina e con accento grave",eacute:"Lettera minuscola latina e con accento acuto", +ecirc:"Lettera minuscola latina e con accento circonflesso",euml:"Lettera minuscola latina e con dieresi",igrave:"Lettera minuscola latina i con accento grave",iacute:"Lettera minuscola latina i con accento acuto",icirc:"Lettera minuscola latina i con accento circonflesso",iuml:"Lettera minuscola latina i con dieresi",eth:"Lettera minuscola latina eth",ntilde:"Lettera minuscola latina n con tilde",ograve:"Lettera minuscola latina o con accento grave",oacute:"Lettera minuscola latina o con accento acuto", +ocirc:"Lettera minuscola latina o con accento circonflesso",otilde:"Lettera minuscola latina o con tilde",ouml:"Lettera minuscola latina o con dieresi",divide:"Simbolo di divisione",oslash:"Lettera minuscola latina o barrata",ugrave:"Lettera minuscola latina u con accento grave",uacute:"Lettera minuscola latina u con accento acuto",ucirc:"Lettera minuscola latina u con accento circonflesso",uuml:"Lettera minuscola latina u con dieresi",yacute:"Lettera minuscola latina y con accento acuto",thorn:"Lettera minuscola latina thorn", +yuml:"Lettera minuscola latina y con dieresi",OElig:"Legatura maiuscola latina OE",oelig:"Legatura minuscola latina oe",372:"Lettera maiuscola latina W con accento circonflesso",374:"Lettera maiuscola latina Y con accento circonflesso",373:"Lettera minuscola latina w con accento circonflesso",375:"Lettera minuscola latina y con accento circonflesso",sbquo:"Singola virgoletta bassa low-9",8219:"Singola virgoletta bassa low-9 inversa",bdquo:"Doppia virgoletta bassa low-9",hellip:"Ellissi orizzontale", +trade:"Simbolo TM",9658:"Puntatore nero rivolto verso destra",bull:"Punto",rarr:"Freccia verso destra",rArr:"Doppia freccia verso destra",hArr:"Doppia freccia sinistra destra",diams:"Simbolo nero diamante",asymp:"Quasi uguale a"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ja.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ja.js new file mode 100644 index 00000000000..b32e8902976 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ja.js @@ -0,0 +1,9 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","ja",{euro:"ユーロ記号",lsquo:"左シングル引用符",rsquo:"右シングル引用符",ldquo:"左ダブル引用符",rdquo:"右ダブル引用符",ndash:"半角ダッシュ",mdash:"全角ダッシュ",iexcl:"逆さ感嘆符",cent:"セント記号",pound:"ポンド記号",curren:"通貨記号",yen:"円記号",brvbar:"上下に分かれた縦棒",sect:"節記号",uml:"分音記号(ウムラウト)",copy:"著作権表示記号",ordf:"女性序数標識",laquo:" 始め二重山括弧引用記号",not:"論理否定記号",reg:"登録商標記号",macr:"長音符",deg:"度記号",sup2:"上つき2, 2乗",sup3:"上つき3, 3乗",acute:"揚音符",micro:"ミクロン記号",para:"段落記号",middot:"中黒",cedil:"セディラ",sup1:"上つき1",ordm:"男性序数標識",raquo:"終わり二重山括弧引用記号", +frac14:"四分の一",frac12:"二分の一",frac34:"四分の三",iquest:"逆疑問符",Agrave:"抑音符つき大文字A",Aacute:"揚音符つき大文字A",Acirc:"曲折アクセントつき大文字A",Atilde:"チルダつき大文字A",Auml:"分音記号つき大文字A",Aring:"リングつき大文字A",AElig:"AとEの合字",Ccedil:"セディラつき大文字C",Egrave:"抑音符つき大文字E",Eacute:"揚音符つき大文字E",Ecirc:"曲折アクセントつき大文字E",Euml:"分音記号つき大文字E",Igrave:"抑音符つき大文字I",Iacute:"揚音符つき大文字I",Icirc:"曲折アクセントつき大文字I",Iuml:"分音記号つき大文字I",ETH:"[アイスランド語]大文字ETH",Ntilde:"チルダつき大文字N",Ograve:"抑音符つき大文字O",Oacute:"揚音符つき大文字O",Ocirc:"曲折アクセントつき大文字O",Otilde:"チルダつき大文字O",Ouml:" 分音記号つき大文字O", +times:"乗算記号",Oslash:"打ち消し線つき大文字O",Ugrave:"抑音符つき大文字U",Uacute:"揚音符つき大文字U",Ucirc:"曲折アクセントつき大文字U",Uuml:"分音記号つき大文字U",Yacute:"揚音符つき大文字Y",THORN:"[アイスランド語]大文字THORN",szlig:"ドイツ語エスツェット",agrave:"抑音符つき小文字a",aacute:"揚音符つき小文字a",acirc:"曲折アクセントつき小文字a",atilde:"チルダつき小文字a",auml:"分音記号つき小文字a",aring:"リングつき小文字a",aelig:"aとeの合字",ccedil:"セディラつき小文字c",egrave:"抑音符つき小文字e",eacute:"揚音符つき小文字e",ecirc:"曲折アクセントつき小文字e",euml:"分音記号つき小文字e",igrave:"抑音符つき小文字i",iacute:"揚音符つき小文字i",icirc:"曲折アクセントつき小文字i",iuml:"分音記号つき小文字i",eth:"アイスランド語小文字eth", +ntilde:"チルダつき小文字n",ograve:"抑音符つき小文字o",oacute:"揚音符つき小文字o",ocirc:"曲折アクセントつき小文字o",otilde:"チルダつき小文字o",ouml:"分音記号つき小文字o",divide:"除算記号",oslash:"打ち消し線つき小文字o",ugrave:"抑音符つき小文字u",uacute:"揚音符つき小文字u",ucirc:"曲折アクセントつき小文字u",uuml:"分音記号つき小文字u",yacute:"揚音符つき小文字y",thorn:"アイスランド語小文字thorn",yuml:"分音記号つき小文字y",OElig:"OとEの合字",oelig:"oとeの合字",372:"曲折アクセントつき大文字W",374:"曲折アクセントつき大文字Y",373:"曲折アクセントつき小文字w",375:"曲折アクセントつき小文字y",sbquo:"シングル下引用符",8219:"左右逆の左引用符",bdquo:"ダブル下引用符",hellip:"三点リーダ",trade:"商標記号",9658:"右黒三角ポインタ",bull:"黒丸", +rarr:"右矢印",rArr:"右二重矢印",hArr:"左右二重矢印",diams:"ダイヤ",asymp:"漸近"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/km.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/km.js new file mode 100644 index 00000000000..8d6a3d161d2 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/km.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","km",{euro:"សញ្ញា​អឺរ៉ូ",lsquo:"Left single quotation mark",rsquo:"Right single quotation mark",ldquo:"Left double quotation mark",rdquo:"Right double quotation mark",ndash:"En dash",mdash:"Em dash",iexcl:"Inverted exclamation mark",cent:"សញ្ញា​សេន",pound:"សញ្ញា​ផោន",curren:"សញ្ញា​រូបិយបណ្ណ",yen:"សញ្ញា​យ៉េន",brvbar:"Broken bar",sect:"Section sign",uml:"Diaeresis",copy:"សញ្ញា​រក្សា​សិទ្ធិ",ordf:"Feminine ordinal indicator",laquo:"Left-pointing double angle quotation mark", +not:"Not sign",reg:"Registered sign",macr:"Macron",deg:"សញ្ញា​ដឺក្រេ",sup2:"Superscript two",sup3:"Superscript three",acute:"Acute accent",micro:"សញ្ញា​មីក្រូ",para:"Pilcrow sign",middot:"Middle dot",cedil:"Cedilla",sup1:"Superscript one",ordm:"Masculine ordinal indicator",raquo:"Right-pointing double angle quotation mark",frac14:"Vulgar fraction one quarter",frac12:"Vulgar fraction one half",frac34:"Vulgar fraction three quarters",iquest:"Inverted question mark",Agrave:"Latin capital letter A with grave accent", +Aacute:"Latin capital letter A with acute accent",Acirc:"Latin capital letter A with circumflex",Atilde:"Latin capital letter A with tilde",Auml:"Latin capital letter A with diaeresis",Aring:"Latin capital letter A with ring above",AElig:"Latin Capital letter Æ",Ccedil:"Latin capital letter C with cedilla",Egrave:"Latin capital letter E with grave accent",Eacute:"Latin capital letter E with acute accent",Ecirc:"Latin capital letter E with circumflex",Euml:"Latin capital letter E with diaeresis",Igrave:"Latin capital letter I with grave accent", +Iacute:"Latin capital letter I with acute accent",Icirc:"Latin capital letter I with circumflex",Iuml:"Latin capital letter I with diaeresis",ETH:"Latin capital letter Eth",Ntilde:"Latin capital letter N with tilde",Ograve:"Latin capital letter O with grave accent",Oacute:"Latin capital letter O with acute accent",Ocirc:"Latin capital letter O with circumflex",Otilde:"Latin capital letter O with tilde",Ouml:"Latin capital letter O with diaeresis",times:"Multiplication sign",Oslash:"Latin capital letter O with stroke", +Ugrave:"Latin capital letter U with grave accent",Uacute:"Latin capital letter U with acute accent",Ucirc:"Latin capital letter U with circumflex",Uuml:"Latin capital letter U with diaeresis",Yacute:"Latin capital letter Y with acute accent",THORN:"Latin capital letter Thorn",szlig:"Latin small letter sharp s",agrave:"Latin small letter a with grave accent",aacute:"Latin small letter a with acute accent",acirc:"Latin small letter a with circumflex",atilde:"Latin small letter a with tilde",auml:"Latin small letter a with diaeresis", +aring:"Latin small letter a with ring above",aelig:"Latin small letter æ",ccedil:"Latin small letter c with cedilla",egrave:"Latin small letter e with grave accent",eacute:"Latin small letter e with acute accent",ecirc:"Latin small letter e with circumflex",euml:"Latin small letter e with diaeresis",igrave:"Latin small letter i with grave accent",iacute:"Latin small letter i with acute accent",icirc:"Latin small letter i with circumflex",iuml:"Latin small letter i with diaeresis",eth:"Latin small letter eth", +ntilde:"Latin small letter n with tilde",ograve:"Latin small letter o with grave accent",oacute:"Latin small letter o with acute accent",ocirc:"Latin small letter o with circumflex",otilde:"Latin small letter o with tilde",ouml:"Latin small letter o with diaeresis",divide:"Division sign",oslash:"Latin small letter o with stroke",ugrave:"Latin small letter u with grave accent",uacute:"Latin small letter u with acute accent",ucirc:"Latin small letter u with circumflex",uuml:"Latin small letter u with diaeresis", +yacute:"Latin small letter y with acute accent",thorn:"Latin small letter thorn",yuml:"Latin small letter y with diaeresis",OElig:"Latin capital ligature OE",oelig:"Latin small ligature oe",372:"Latin capital letter W with circumflex",374:"Latin capital letter Y with circumflex",373:"Latin small letter w with circumflex",375:"Latin small letter y with circumflex",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Horizontal ellipsis", +trade:"Trade mark sign",9658:"Black right-pointing pointer",bull:"Bullet",rarr:"Rightwards arrow",rArr:"Rightwards double arrow",hArr:"Left right double arrow",diams:"Black diamond suit",asymp:"Almost equal to"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ko.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ko.js new file mode 100644 index 00000000000..77207edf1fa --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ko.js @@ -0,0 +1,10 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","ko",{euro:"유로화 기호",lsquo:"왼쪽 외 따옴표",rsquo:"오른쪽 외 따옴표",ldquo:"왼쪽 쌍 따옴표",rdquo:"오른쪽 쌍 따옴표",ndash:"반각 대시",mdash:"전각 대시",iexcl:"반전된 느낌표",cent:"센트 기호",pound:"파운드화 기호",curren:"커런시 기호",yen:"위안화 기호",brvbar:"Broken bar",sect:"섹션 기호",uml:"분음 부호",copy:"저작권 기호",ordf:"Feminine ordinal indicator",laquo:"왼쪽 쌍꺽쇠 인용 부호",not:"금지 기호",reg:"등록 기호",macr:"장음 기호",deg:"도 기호",sup2:"위첨자 2",sup3:"위첨자 3",acute:"양음 악센트 부호",micro:"마이크로 기호",para:"단락 기호",middot:"가운데 점",cedil:"세디유",sup1:"위첨자 1", +ordm:"Masculine ordinal indicator",raquo:"오른쪽 쌍꺽쇠 인용 부호",frac14:"분수 사분의 일",frac12:"분수 이분의 일",frac34:"분수 사분의 삼",iquest:"뒤집힌 물음표",Agrave:"억음 부호가 있는 라틴 대문자 A",Aacute:"양음 악센트 부호가 있는 라틴 대문자 A",Acirc:"곡절 악센트 부호가 있는 라틴 대문자 A",Atilde:"틸데가 있는 라틴 대문자 A",Auml:"분음 기호가 있는 라틴 대문자 A",Aring:"윗고리가 있는 라틴 대문자 A",AElig:"라틴 대문자 Æ",Ccedil:"세디유가 있는 라틴 대문자 C",Egrave:"억음 부호가 있는 라틴 대문자 E",Eacute:"양음 악센트 부호가 있는 라틴 대문자 E",Ecirc:"곡절 악센트 부호가 있는 라틴 대문자 E",Euml:"분음 기호가 있는 라틴 대문자 E",Igrave:"억음 부호가 있는 라틴 대문자 I",Iacute:"양음 악센트 부호가 있는 라틴 대문자 I", +Icirc:"곡절 악센트 부호가 있는 라틴 대문자 I",Iuml:"분음 기호가 있는 라틴 대문자 I",ETH:"라틴 대문자 Eth",Ntilde:"틸데가 있는 라틴 대문자 N",Ograve:"억음 부호가 있는 라틴 대문자 O",Oacute:"양음 부호가 있는 라틴 대문자 O",Ocirc:"곡절 악센트 부호가 있는 라틴 대문자 O",Otilde:"틸데가 있는 라틴 대문자 O",Ouml:"분음 기호가 있는 라틴 대문자 O",times:"곱하기 기호",Oslash:"사선이 있는 라틴 대문자 O",Ugrave:"억음 부호가 있는 라틴 대문자 U",Uacute:"양음 부호가 있는 라틴 대문자 U",Ucirc:"곡절 악센트 부호가 있는 라틴 대문자 U",Uuml:"분음 기호가 있는 라틴 대문자 U",Yacute:"양음 부호가 있는 라틴 대문자 Y",THORN:"라틴 대문자 Thorn",szlig:"라틴 소문자 sharp s",agrave:"억음 부호가 있는 라틴 소문자 a",aacute:"양음 부호가 있는 라틴 소문자 a", +acirc:"곡절 악센트 부호가 있는 라틴 소문자 a",atilde:"틸데가 있는 라틴 소문자 a",auml:"분음 기호가 있는 라틴 소문자 a",aring:"윗고리가 있는 라틴 소문자 a",aelig:"라틴 소문자 æ",ccedil:"세디유가 있는 라틴 소문자 c",egrave:"억음 부호가 있는 라틴 소문자 e",eacute:"양음 부호가 있는 라틴 소문자 e",ecirc:"곡절 악센트 부호가 있는 라틴 소문자 e",euml:"분음 기호가 있는 라틴 소문자 e",igrave:"억음 부호가 있는 라틴 소문자 i",iacute:"양음 부호가 있는 라틴 소문자 i",icirc:"곡절 악센트 부호가 있는 라틴 소문자 i",iuml:"분음 기호가 있는 라틴 소문자 i",eth:"라틴 소문자 eth",ntilde:"틸데가 있는 라틴 소문자 n",ograve:"억음 부호가 있는 라틴 소문자 o",oacute:"양음 부호가 있는 라틴 소문자 o",ocirc:"곡절 악센트 부호가 있는 라틴 소문자 o", +otilde:"틸데가 있는 라틴 소문자 o",ouml:"분음 기호가 있는 라틴 소문자 o",divide:"나누기 기호",oslash:"사선이 있는 라틴 소문자 o",ugrave:"억음 부호가 있는 라틴 소문자 u",uacute:"양음 부호가 있는 라틴 소문자 u",ucirc:"곡절 악센트 부호가 있는 라틴 소문자 u",uuml:"분음 기호가 있는 라틴 소문자 u",yacute:"양음 부호가 있는 라틴 소문자 y",thorn:"라틴 소문자 thorn",yuml:"분음 기호가 있는 라틴 소문자 y",OElig:"라틴 대문합자 OE",oelig:"라틴 소문합자 oe",372:"곡절 악센트 부호가 있는 라틴 대문자 W",374:"곡절 악센트 부호가 있는 라틴 대문자 Y",373:"곡절 악센트 부호가 있는 라틴 소문자 w",375:"곡절 악센트 부호가 있는 라틴 소문자 y",sbquo:"외 아래-9 인용 부호",8219:"외 위쪽-뒤집힌-9 인용 부호",bdquo:"쌍 아래-9 인용 부호",hellip:"수평 생략 부호", +trade:"상표 기호",9658:"검정 오른쪽 포인터",bull:"큰 점",rarr:"오른쪽 화살표",rArr:"오른쪽 두 줄 화살표",hArr:"양쪽 두 줄 화살표",diams:"검정 다이아몬드",asymp:"근사"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ku.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ku.js new file mode 100644 index 00000000000..5bed679015c --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ku.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","ku",{euro:"نیشانەی یۆرۆ",lsquo:"نیشانەی فاریزەی سەرووژێری تاکی چەپ",rsquo:"نیشانەی فاریزەی سەرووژێری تاکی ڕاست",ldquo:"نیشانەی فاریزەی سەرووژێری دووهێندەی چه‌پ",rdquo:"نیشانەی فاریزەی سەرووژێری دووهێندەی ڕاست",ndash:"تەقەڵی کورت",mdash:"تەقەڵی درێژ",iexcl:"نیشانەی هەڵەوگێڕی سەرسوڕهێنەر",cent:"نیشانەی سەنت",pound:"نیشانەی پاوەند",curren:"نیشانەی دراو",yen:"نیشانەی یەنی ژاپۆنی",brvbar:"شریتی ئەستوونی پچڕاو",sect:"نیشانەی دوو s لەسەریەک",uml:"خاڵ",copy:"نیشانەی مافی چاپ", +ordf:"هێڵ لەسەر پیتی a",laquo:"دوو تیری بەدووایەکی چەپ",not:"نیشانەی نەخێر",reg:"نیشانەی R لەناو بازنەدا",macr:"ماکڕۆن",deg:"نیشانەی پلە",sup2:"سەرنووسی دوو",sup3:"سەرنووسی سێ",acute:"لاری تیژ",micro:"نیشانەی u لق درێژی چەپی خواروو",para:"نیشانەی پەڕەگراف",middot:"ناوەڕاستی خاڵ",cedil:"نیشانەی c ژێر چووکرە",sup1:"سەرنووسی یەک",ordm:"هێڵ لەژێر پیتی o",raquo:"دوو تیری بەدووایەکی ڕاست",frac14:"یەک لەسەر چووار",frac12:"یەک لەسەر دوو",frac34:"سێ لەسەر چووار",iquest:"هێمای هەڵەوگێری پرسیار",Agrave:"پیتی لاتینی A-ی گەورە لەگەڵ ڕوومەتداری لار", +Aacute:"پیتی لاتینی A-ی گەورە لەگەڵ ڕوومەتداری تیژ",Acirc:"پیتی لاتینی A-ی گەورە لەگەڵ نیشانە لەسەری",Atilde:"پیتی لاتینی A-ی گەورە لەگەڵ زەڕە",Auml:"پیتی لاتینی A-ی گەورە لەگەڵ نیشانە لەسەری",Aring:"پیتی لاتینی گەورەی Å",AElig:"پیتی لاتینی گەورەی Æ",Ccedil:"پیتی لاتینی C-ی گەورە لەگەڵ ژێر چووکرە",Egrave:"پیتی لاتینی E-ی گەورە لەگەڵ ڕوومەتداری لار",Eacute:"پیتی لاتینی E-ی گەورە لەگەڵ ڕوومەتداری تیژ",Ecirc:"پیتی لاتینی E-ی گەورە لەگەڵ نیشانە لەسەری",Euml:"پیتی لاتینی E-ی گەورە لەگەڵ نیشانە لەسەری", +Igrave:"پیتی لاتینی I-ی گەورە لەگەڵ ڕوومەتداری لار",Iacute:"پیتی لاتینی I-ی گەورە لەگەڵ ڕوومەتداری تیژ",Icirc:"پیتی لاتینی I-ی گەورە لەگەڵ نیشانە لەسەری",Iuml:"پیتی لاتینی I-ی گەورە لەگەڵ نیشانە لەسەری",ETH:"پیتی لاتینی E-ی گەورەی",Ntilde:"پیتی لاتینی N-ی گەورە لەگەڵ زەڕە",Ograve:"پیتی لاتینی O-ی گەورە لەگەڵ ڕوومەتداری لار",Oacute:"پیتی لاتینی O-ی گەورە لەگەڵ ڕوومەتداری تیژ",Ocirc:"پیتی لاتینی O-ی گەورە لەگەڵ نیشانە لەسەری",Otilde:"پیتی لاتینی O-ی گەورە لەگەڵ زەڕە",Ouml:"پیتی لاتینی O-ی گەورە لەگەڵ نیشانە لەسەری", +times:"نیشانەی لێکدان",Oslash:"پیتی لاتینی گەورەی Ø لەگەڵ هێمای دڵ وەستان",Ugrave:"پیتی لاتینی U-ی گەورە لەگەڵ ڕوومەتداری لار",Uacute:"پیتی لاتینی U-ی گەورە لەگەڵ ڕوومەتداری تیژ",Ucirc:"پیتی لاتینی U-ی گەورە لەگەڵ نیشانە لەسەری",Uuml:"پیتی لاتینی U-ی گەورە لەگەڵ نیشانە لەسەری",Yacute:"پیتی لاتینی Y-ی گەورە لەگەڵ ڕوومەتداری تیژ",THORN:"پیتی لاتینی دڕکی گەورە",szlig:"پیتی لاتنی نووک تیژی s",agrave:"پیتی لاتینی a-ی بچووک لەگەڵ ڕوومەتداری لار",aacute:"پیتی لاتینی a-ی بچووك لەگەڵ ڕوومەتداری تیژ",acirc:"پیتی لاتینی a-ی بچووك لەگەڵ نیشانە لەسەری", +atilde:"پیتی لاتینی a-ی بچووك لەگەڵ زەڕە",auml:"پیتی لاتینی a-ی بچووك لەگەڵ نیشانە لەسەری",aring:"پیتی لاتینی å-ی بچووك",aelig:"پیتی لاتینی æ-ی بچووك",ccedil:"پیتی لاتینی c-ی بچووك لەگەڵ ژێر چووکرە",egrave:"پیتی لاتینی e-ی بچووك لەگەڵ ڕوومەتداری لار",eacute:"پیتی لاتینی e-ی بچووك لەگەڵ ڕوومەتداری تیژ",ecirc:"پیتی لاتینی e-ی بچووك لەگەڵ نیشانە لەسەری",euml:"پیتی لاتینی e-ی بچووك لەگەڵ نیشانە لەسەری",igrave:"پیتی لاتینی i-ی بچووك لەگەڵ ڕوومەتداری لار",iacute:"پیتی لاتینی i-ی بچووك لەگەڵ ڕوومەتداری تیژ", +icirc:"پیتی لاتینی i-ی بچووك لەگەڵ نیشانە لەسەری",iuml:"پیتی لاتینی i-ی بچووك لەگەڵ نیشانە لەسەری",eth:"پیتی لاتینی e-ی بچووك",ntilde:"پیتی لاتینی n-ی بچووك لەگەڵ زەڕە",ograve:"پیتی لاتینی o-ی بچووك لەگەڵ ڕوومەتداری لار",oacute:"پیتی لاتینی o-ی بچووك له‌گەڵ ڕوومەتداری تیژ",ocirc:"پیتی لاتینی o-ی بچووك لەگەڵ نیشانە لەسەری",otilde:"پیتی لاتینی o-ی بچووك لەگەڵ زەڕە",ouml:"پیتی لاتینی o-ی بچووك لەگەڵ نیشانە لەسەری",divide:"نیشانەی دابەش",oslash:"پیتی لاتینی گەورەی ø لەگەڵ هێمای دڵ وەستان",ugrave:"پیتی لاتینی u-ی بچووك لەگەڵ ڕوومەتداری لار", +uacute:"پیتی لاتینی u-ی بچووك لەگەڵ ڕوومەتداری تیژ",ucirc:"پیتی لاتینی u-ی بچووك لەگەڵ نیشانە لەسەری",uuml:"پیتی لاتینی u-ی بچووك لەگەڵ نیشانە لەسەری",yacute:"پیتی لاتینی y-ی بچووك لەگەڵ ڕوومەتداری تیژ",thorn:"پیتی لاتینی دڕکی بچووك",yuml:"پیتی لاتینی y-ی بچووك لەگەڵ نیشانە لەسەری",OElig:"پیتی لاتینی گەورەی پێکەوەنووسراوی OE",oelig:"پیتی لاتینی بچووکی پێکەوەنووسراوی oe",372:"پیتی لاتینی W-ی گەورە لەگەڵ نیشانە لەسەری",374:"پیتی لاتینی Y-ی گەورە لەگەڵ نیشانە لەسەری",373:"پیتی لاتینی w-ی بچووکی لەگەڵ نیشانە لەسەری", +375:"پیتی لاتینی y-ی بچووکی لەگەڵ نیشانە لەسەری",sbquo:"نیشانەی فاریزەی نزم",8219:"نیشانەی فاریزەی بەرزی پێچەوانە",bdquo:"دوو فاریزەی تەنیش یەك",hellip:"ئاسۆیی بازنە",trade:"نیشانەی بازرگانی",9658:"ئاراستەی ڕەشی دەستی ڕاست",bull:"فیشەك",rarr:"تیری دەستی ڕاست",rArr:"دووتیری دەستی ڕاست",hArr:"دوو تیری ڕاست و چەپ",diams:"ڕەشی پاقڵاوەیی",asymp:"نیشانەی یەکسانە"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/lt.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/lt.js new file mode 100644 index 00000000000..f575dfd4149 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/lt.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","lt",{euro:"Euro ženklas",lsquo:"Left single quotation mark",rsquo:"Right single quotation mark",ldquo:"Left double quotation mark",rdquo:"Right double quotation mark",ndash:"En dash",mdash:"Em dash",iexcl:"Inverted exclamation mark",cent:"Cento ženklas",pound:"Svaro ženklas",curren:"Valiutos ženklas",yen:"Jenos ženklas",brvbar:"Broken bar",sect:"Section sign",uml:"Diaeresis",copy:"Copyright sign",ordf:"Feminine ordinal indicator",laquo:"Left-pointing double angle quotation mark", +not:"Ne ženklas",reg:"Registered sign",macr:"Makronas",deg:"Laipsnio ženklas",sup2:"Superscript two",sup3:"Superscript three",acute:"Acute accent",micro:"Mikro ženklas",para:"Pilcrow sign",middot:"Vidurinis taškas",cedil:"Cedilla",sup1:"Superscript one",ordm:"Masculine ordinal indicator",raquo:"Right-pointing double angle quotation mark",frac14:"Vulgar fraction one quarter",frac12:"Vulgar fraction one half",frac34:"Vulgar fraction three quarters",iquest:"Inverted question mark",Agrave:"Latin capital letter A with grave accent", +Aacute:"Latin capital letter A with acute accent",Acirc:"Latin capital letter A with circumflex",Atilde:"Latin capital letter A with tilde",Auml:"Latin capital letter A with diaeresis",Aring:"Latin capital letter A with ring above",AElig:"Latin Capital letter Æ",Ccedil:"Latin capital letter C with cedilla",Egrave:"Latin capital letter E with grave accent",Eacute:"Latin capital letter E with acute accent",Ecirc:"Latin capital letter E with circumflex",Euml:"Latin capital letter E with diaeresis",Igrave:"Latin capital letter I with grave accent", +Iacute:"Latin capital letter I with acute accent",Icirc:"Latin capital letter I with circumflex",Iuml:"Latin capital letter I with diaeresis",ETH:"Latin capital letter Eth",Ntilde:"Latin capital letter N with tilde",Ograve:"Latin capital letter O with grave accent",Oacute:"Latin capital letter O with acute accent",Ocirc:"Latin capital letter O with circumflex",Otilde:"Latin capital letter O with tilde",Ouml:"Latin capital letter O with diaeresis",times:"Multiplication sign",Oslash:"Latin capital letter O with stroke", +Ugrave:"Latin capital letter U with grave accent",Uacute:"Latin capital letter U with acute accent",Ucirc:"Latin capital letter U with circumflex",Uuml:"Latin capital letter U with diaeresis",Yacute:"Latin capital letter Y with acute accent",THORN:"Latin capital letter Thorn",szlig:"Latin small letter sharp s",agrave:"Latin small letter a with grave accent",aacute:"Latin small letter a with acute accent",acirc:"Latin small letter a with circumflex",atilde:"Latin small letter a with tilde",auml:"Latin small letter a with diaeresis", +aring:"Latin small letter a with ring above",aelig:"Latin small letter æ",ccedil:"Latin small letter c with cedilla",egrave:"Latin small letter e with grave accent",eacute:"Latin small letter e with acute accent",ecirc:"Latin small letter e with circumflex",euml:"Latin small letter e with diaeresis",igrave:"Latin small letter i with grave accent",iacute:"Latin small letter i with acute accent",icirc:"Latin small letter i with circumflex",iuml:"Latin small letter i with diaeresis",eth:"Latin small letter eth", +ntilde:"Latin small letter n with tilde",ograve:"Latin small letter o with grave accent",oacute:"Latin small letter o with acute accent",ocirc:"Latin small letter o with circumflex",otilde:"Latin small letter o with tilde",ouml:"Latin small letter o with diaeresis",divide:"Division sign",oslash:"Latin small letter o with stroke",ugrave:"Latin small letter u with grave accent",uacute:"Latin small letter u with acute accent",ucirc:"Latin small letter u with circumflex",uuml:"Latin small letter u with diaeresis", +yacute:"Latin small letter y with acute accent",thorn:"Latin small letter thorn",yuml:"Latin small letter y with diaeresis",OElig:"Latin capital ligature OE",oelig:"Latin small ligature oe",372:"Latin capital letter W with circumflex",374:"Latin capital letter Y with circumflex",373:"Latin small letter w with circumflex",375:"Latin small letter y with circumflex",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Horizontal ellipsis", +trade:"Trade mark sign",9658:"Black right-pointing pointer",bull:"Bullet",rarr:"Rightwards arrow",rArr:"Rightwards double arrow",hArr:"Left right double arrow",diams:"Black diamond suit",asymp:"Almost equal to"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/lv.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/lv.js new file mode 100644 index 00000000000..7ea58a00fba --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/lv.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","lv",{euro:"Euro zīme",lsquo:"Kreisā vienkārtīga pēdiņa",rsquo:"Labā vienkārtīga pēdiņa",ldquo:"Kreisā dubult pēdiņa",rdquo:"Labā dubult pēdiņa",ndash:"En svītra",mdash:"Em svītra",iexcl:"Apgriezta izsaukuma zīme",cent:"Centu naudas zīme",pound:"Sterliņu mārciņu naudas zīme",curren:"Valūtas zīme",yen:"Jenu naudas zīme",brvbar:"Vertikāla pārrauta līnija",sect:"Paragrāfa zīme",uml:"Diakritiska zīme",copy:"Autortiesību zīme",ordf:"Sievišķas kārtas rādītājs", +laquo:"Kreisā dubult stūra pēdiņu zīme",not:"Neparakstīts",reg:"Reģistrēta zīme",macr:"Garumzīme",deg:"Grādu zīme",sup2:"Augšraksts divi",sup3:"Augšraksts trīs",acute:"Akūta uzsvara zīme",micro:"Mikro zīme",para:"Rindkopas zīme ",middot:"Vidējs punkts",cedil:"Āķītis zem burta",sup1:"Augšraksts viens",ordm:"Vīrišķīgas kārtas rādītājs",raquo:"Labā dubult stūra pēdiņu zīme",frac14:"Vulgāra frakcija 1/4",frac12:"Vulgāra frakcija 1/2",frac34:"Vulgāra frakcija 3/4",iquest:"Apgriezta jautājuma zīme",Agrave:"Lielais latīņu burts A ar uzsvara zīmi", +Aacute:"Lielais latīņu burts A ar akūtu uzsvara zīmi",Acirc:"Lielais latīņu burts A ar diakritisku zīmi",Atilde:"Lielais latīņu burts A ar tildi ",Auml:"Lielais latīņu burts A ar diakritisko zīmi",Aring:"Lielais latīņu burts A ar aplīti augšā",AElig:"Lielais latīņu burts Æ",Ccedil:"Lielais latīņu burts C ar āķīti zem burta",Egrave:"Lielais latīņu burts E ar apostrofu",Eacute:"Lielais latīņu burts E ar akūtu uzsvara zīmi",Ecirc:"Lielais latīņu burts E ar diakritisko zīmi",Euml:"Lielais latīņu burts E ar diakritisko zīmi", +Igrave:"Lielais latīņu burts I ar uzsvaras zīmi",Iacute:"Lielais latīņu burts I ar akūtu uzsvara zīmi",Icirc:"Lielais latīņu burts I ar diakritisko zīmi",Iuml:"Lielais latīņu burts I ar diakritisko zīmi",ETH:"Lielais latīņu burts Eth",Ntilde:"Lielais latīņu burts N ar tildi",Ograve:"Lielais latīņu burts O ar uzsvara zīmi",Oacute:"Lielais latīņu burts O ar akūto uzsvara zīmi",Ocirc:"Lielais latīņu burts O ar diakritisko zīmi",Otilde:"Lielais latīņu burts O ar tildi",Ouml:"Lielais latīņu burts O ar diakritisko zīmi", +times:"Reizināšanas zīme ",Oslash:"Lielais latīņu burts O ar iesvītrojumu",Ugrave:"Lielais latīņu burts U ar uzsvaras zīmi",Uacute:"Lielais latīņu burts U ar akūto uzsvars zīmi",Ucirc:"Lielais latīņu burts U ar diakritisko zīmi",Uuml:"Lielais latīņu burts U ar diakritisko zīmi",Yacute:"Lielais latīņu burts Y ar akūto uzsvaras zīmi",THORN:"Lielais latīņu burts torn",szlig:"Mazs latīņu burts ar ligatūru",agrave:"Mazs latīņu burts a ar uzsvara zīmi",aacute:"Mazs latīņu burts a ar akūto uzsvara zīmi", +acirc:"Mazs latīņu burts a ar diakritisko zīmi",atilde:"Mazs latīņu burts a ar tildi",auml:"Mazs latīņu burts a ar diakritisko zīmi",aring:"Mazs latīņu burts a ar aplīti augšā",aelig:"Mazs latīņu burts æ",ccedil:"Mazs latīņu burts c ar āķīti zem burta",egrave:"Mazs latīņu burts e ar uzsvara zīmi ",eacute:"Mazs latīņu burts e ar akūtu uzsvara zīmi",ecirc:"Mazs latīņu burts e ar diakritisko zīmi",euml:"Mazs latīņu burts e ar diakritisko zīmi",igrave:"Mazs latīņu burts i ar uzsvara zīmi ",iacute:"Mazs latīņu burts i ar akūtu uzsvara zīmi", +icirc:"Mazs latīņu burts i ar diakritisko zīmi",iuml:"Mazs latīņu burts i ar diakritisko zīmi",eth:"Mazs latīņu burts eth",ntilde:"Mazs latīņu burts n ar tildi",ograve:"Mazs latīņu burts o ar uzsvara zīmi ",oacute:"Mazs latīņu burts o ar akūtu uzsvara zīmi",ocirc:"Mazs latīņu burts o ar diakritisko zīmi",otilde:"Mazs latīņu burts o ar tildi",ouml:"Mazs latīņu burts o ar diakritisko zīmi",divide:"Dalīšanas zīme",oslash:"Mazs latīņu burts o ar iesvītrojumu",ugrave:"Mazs latīņu burts u ar uzsvara zīmi ", +uacute:"Mazs latīņu burts u ar akūtu uzsvara zīmi",ucirc:"Mazs latīņu burts u ar diakritisko zīmi",uuml:"Mazs latīņu burts u ar diakritisko zīmi",yacute:"Mazs latīņu burts y ar akūtu uzsvaras zīmi",thorn:"Mazs latīņu burts torns",yuml:"Mazs latīņu burts y ar diakritisko zīmi",OElig:"Liela latīņu ligatūra OE",oelig:"Maza latīņu ligatūra oe",372:"Liels latīņu burts W ar diakritisko zīmi ",374:"Liels latīņu burts Y ar diakritisko zīmi ",373:"Mazs latīņu burts w ar diakritisko zīmi ",375:"Mazs latīņu burts y ar diakritisko zīmi ", +sbquo:"Mazas-9 vienkārtīgas pēdiņas",8219:"Lielas-9 vienkārtīgas apgrieztas pēdiņas",bdquo:"Mazas-9 dubultas pēdiņas",hellip:"Horizontāli daudzpunkti",trade:"Preču zīmes zīme",9658:"Melns pa labi pagriezts radītājs",bull:"Lode",rarr:"Bulta pa labi",rArr:"Dubulta Bulta pa labi",hArr:"Bulta pa kreisi",diams:"Dubulta Bulta pa kreisi",asymp:"Gandrīz vienāds ar"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/nb.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/nb.js new file mode 100644 index 00000000000..f9fd879f5a6 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/nb.js @@ -0,0 +1,11 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","nb",{euro:"Eurosymbol",lsquo:"Venstre enkelt anførselstegn",rsquo:"Høyre enkelt anførselstegn",ldquo:"Venstre dobbelt anførselstegn",rdquo:"Høyre anførsesltegn",ndash:"Kort tankestrek",mdash:"Lang tankestrek",iexcl:"Omvendt utropstegn",cent:"Centsymbol",pound:"Pundsymbol",curren:"Valutategn",yen:"Yensymbol",brvbar:"Brutt loddrett strek",sect:"Paragraftegn",uml:"Tøddel",copy:"Copyrighttegn",ordf:"Feminin ordensindikator",laquo:"Venstre anførselstegn",not:"Negasjonstegn", +reg:"Registrert varemerke-tegn",macr:"Makron",deg:"Gradsymbol",sup2:"Hevet totall",sup3:"Hevet tretall",acute:"Akutt aksent",micro:"Mikrosymbol",para:"Avsnittstegn",middot:"Midtstilt prikk",cedil:"Cedille",sup1:"Hevet ettall",ordm:"Maskulin ordensindikator",raquo:"Høyre anførselstegn",frac14:"Fjerdedelsbrøk",frac12:"Halvbrøk",frac34:"Tre fjerdedelers brøk",iquest:"Omvendt spørsmålstegn",Agrave:"Stor A med grav aksent",Aacute:"Stor A med akutt aksent",Acirc:"Stor A med cirkumfleks",Atilde:"Stor A med tilde", +Auml:"Stor A med tøddel",Aring:"Stor Å",AElig:"Stor Æ",Ccedil:"Stor C med cedille",Egrave:"Stor E med grav aksent",Eacute:"Stor E med akutt aksent",Ecirc:"Stor E med cirkumfleks",Euml:"Stor E med tøddel",Igrave:"Stor I med grav aksent",Iacute:"Stor I med akutt aksent",Icirc:"Stor I med cirkumfleks",Iuml:"Stor I med tøddel",ETH:"Stor Edd/stungen D",Ntilde:"Stor N med tilde",Ograve:"Stor O med grav aksent",Oacute:"Stor O med akutt aksent",Ocirc:"Stor O med cirkumfleks",Otilde:"Stor O med tilde",Ouml:"Stor O med tøddel", +times:"Multiplikasjonstegn",Oslash:"Stor Ø",Ugrave:"Stor U med grav aksent",Uacute:"Stor U med akutt aksent",Ucirc:"Stor U med cirkumfleks",Uuml:"Stor U med tøddel",Yacute:"Stor Y med akutt aksent",THORN:"Stor Thorn",szlig:"Liten dobbelt-s/Eszett",agrave:"Liten a med grav aksent",aacute:"Liten a med akutt aksent",acirc:"Liten a med cirkumfleks",atilde:"Liten a med tilde",auml:"Liten a med tøddel",aring:"Liten å",aelig:"Liten æ",ccedil:"Liten c med cedille",egrave:"Liten e med grav aksent",eacute:"Liten e med akutt aksent", +ecirc:"Liten e med cirkumfleks",euml:"Liten e med tøddel",igrave:"Liten i med grav aksent",iacute:"Liten i med akutt aksent",icirc:"Liten i med cirkumfleks",iuml:"Liten i med tøddel",eth:"Liten edd/stungen d",ntilde:"Liten n med tilde",ograve:"Liten o med grav aksent",oacute:"Liten o med akutt aksent",ocirc:"Liten o med cirkumfleks",otilde:"Liten o med tilde",ouml:"Liten o med tøddel",divide:"Divisjonstegn",oslash:"Liten ø",ugrave:"Liten u med grav aksent",uacute:"Liten u med akutt aksent",ucirc:"Liten u med cirkumfleks", +uuml:"Liten u med tøddel",yacute:"Liten y med akutt aksent",thorn:"Liten thorn",yuml:"Liten y med tøddel",OElig:"Stor ligatur av O og E",oelig:"Liten ligatur av o og e",372:"Stor W med cirkumfleks",374:"Stor Y med cirkumfleks",373:"Liten w med cirkumfleks",375:"Liten y med cirkumfleks",sbquo:"Enkelt lavt 9-anførselstegn",8219:"Enkelt høyt reversert 9-anførselstegn",bdquo:"Dobbelt lavt 9-anførselstegn",hellip:"Ellipse",trade:"Varemerkesymbol",9658:"Svart høyrevendt peker",bull:"Tykk interpunkt",rarr:"Høyrevendt pil", +rArr:"Dobbel høyrevendt pil",hArr:"Dobbel venstrevendt pil",diams:"Svart ruter",asymp:"Omtrent likhetstegn"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/nl.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/nl.js new file mode 100644 index 00000000000..ba75bf39512 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/nl.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","nl",{euro:"Euro-teken",lsquo:"Linker enkel aanhalingsteken",rsquo:"Rechter enkel aanhalingsteken",ldquo:"Linker dubbel aanhalingsteken",rdquo:"Rechter dubbel aanhalingsteken",ndash:"En dash",mdash:"Em dash",iexcl:"Omgekeerd uitroepteken",cent:"Cent-teken",pound:"Pond-teken",curren:"Valuta-teken",yen:"Yen-teken",brvbar:"Gebroken streep",sect:"Paragraaf-teken",uml:"Trema",copy:"Copyright-teken",ordf:"Vrouwelijk ordinaal",laquo:"Linker guillemet",not:"Ongelijk-teken", +reg:"Geregistreerd handelsmerk-teken",macr:"Macron",deg:"Graden-teken",sup2:"Superscript twee",sup3:"Superscript drie",acute:"Accent aigu",micro:"Micro-teken",para:"Alinea-teken",middot:"Halfhoge punt",cedil:"Cedille",sup1:"Superscript een",ordm:"Mannelijk ordinaal",raquo:"Rechter guillemet",frac14:"Breuk kwart",frac12:"Breuk half",frac34:"Breuk driekwart",iquest:"Omgekeerd vraagteken",Agrave:"Latijnse hoofdletter A met een accent grave",Aacute:"Latijnse hoofdletter A met een accent aigu",Acirc:"Latijnse hoofdletter A met een circonflexe", +Atilde:"Latijnse hoofdletter A met een tilde",Auml:"Latijnse hoofdletter A met een trema",Aring:"Latijnse hoofdletter A met een corona",AElig:"Latijnse hoofdletter Æ",Ccedil:"Latijnse hoofdletter C met een cedille",Egrave:"Latijnse hoofdletter E met een accent grave",Eacute:"Latijnse hoofdletter E met een accent aigu",Ecirc:"Latijnse hoofdletter E met een circonflexe",Euml:"Latijnse hoofdletter E met een trema",Igrave:"Latijnse hoofdletter I met een accent grave",Iacute:"Latijnse hoofdletter I met een accent aigu", +Icirc:"Latijnse hoofdletter I met een circonflexe",Iuml:"Latijnse hoofdletter I met een trema",ETH:"Latijnse hoofdletter Eth",Ntilde:"Latijnse hoofdletter N met een tilde",Ograve:"Latijnse hoofdletter O met een accent grave",Oacute:"Latijnse hoofdletter O met een accent aigu",Ocirc:"Latijnse hoofdletter O met een circonflexe",Otilde:"Latijnse hoofdletter O met een tilde",Ouml:"Latijnse hoofdletter O met een trema",times:"Maal-teken",Oslash:"Latijnse hoofdletter O met een schuine streep",Ugrave:"Latijnse hoofdletter U met een accent grave", +Uacute:"Latijnse hoofdletter U met een accent aigu",Ucirc:"Latijnse hoofdletter U met een circonflexe",Uuml:"Latijnse hoofdletter U met een trema",Yacute:"Latijnse hoofdletter Y met een accent aigu",THORN:"Latijnse hoofdletter Thorn",szlig:"Latijnse kleine ringel-s",agrave:"Latijnse kleine letter a met een accent grave",aacute:"Latijnse kleine letter a met een accent aigu",acirc:"Latijnse kleine letter a met een circonflexe",atilde:"Latijnse kleine letter a met een tilde",auml:"Latijnse kleine letter a met een trema", +aring:"Latijnse kleine letter a met een corona",aelig:"Latijnse kleine letter æ",ccedil:"Latijnse kleine letter c met een cedille",egrave:"Latijnse kleine letter e met een accent grave",eacute:"Latijnse kleine letter e met een accent aigu",ecirc:"Latijnse kleine letter e met een circonflexe",euml:"Latijnse kleine letter e met een trema",igrave:"Latijnse kleine letter i met een accent grave",iacute:"Latijnse kleine letter i met een accent aigu",icirc:"Latijnse kleine letter i met een circonflexe", +iuml:"Latijnse kleine letter i met een trema",eth:"Latijnse kleine letter eth",ntilde:"Latijnse kleine letter n met een tilde",ograve:"Latijnse kleine letter o met een accent grave",oacute:"Latijnse kleine letter o met een accent aigu",ocirc:"Latijnse kleine letter o met een circonflexe",otilde:"Latijnse kleine letter o met een tilde",ouml:"Latijnse kleine letter o met een trema",divide:"Deel-teken",oslash:"Latijnse kleine letter o met een schuine streep",ugrave:"Latijnse kleine letter u met een accent grave", +uacute:"Latijnse kleine letter u met een accent aigu",ucirc:"Latijnse kleine letter u met een circonflexe",uuml:"Latijnse kleine letter u met een trema",yacute:"Latijnse kleine letter y met een accent aigu",thorn:"Latijnse kleine letter thorn",yuml:"Latijnse kleine letter y met een trema",OElig:"Latijnse hoofdletter Œ",oelig:"Latijnse kleine letter œ",372:"Latijnse hoofdletter W met een circonflexe",374:"Latijnse hoofdletter Y met een circonflexe",373:"Latijnse kleine letter w met een circonflexe", +375:"Latijnse kleine letter y met een circonflexe",sbquo:"Lage enkele aanhalingsteken",8219:"Hoge omgekeerde enkele aanhalingsteken",bdquo:"Lage dubbele aanhalingsteken",hellip:"Beletselteken",trade:"Trademark-teken",9658:"Zwarte driehoek naar rechts",bull:"Bullet",rarr:"Pijl naar rechts",rArr:"Dubbele pijl naar rechts",hArr:"Dubbele pijl naar links",diams:"Zwart ruitje",asymp:"Benaderingsteken"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/no.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/no.js new file mode 100644 index 00000000000..404b4fde3fa --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/no.js @@ -0,0 +1,11 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","no",{euro:"Eurosymbol",lsquo:"Venstre enkelt anførselstegn",rsquo:"Høyre enkelt anførselstegn",ldquo:"Venstre dobbelt anførselstegn",rdquo:"Høyre anførsesltegn",ndash:"Kort tankestrek",mdash:"Lang tankestrek",iexcl:"Omvendt utropstegn",cent:"Centsymbol",pound:"Pundsymbol",curren:"Valutategn",yen:"Yensymbol",brvbar:"Brutt loddrett strek",sect:"Paragraftegn",uml:"Tøddel",copy:"Copyrighttegn",ordf:"Feminin ordensindikator",laquo:"Venstre anførselstegn",not:"Negasjonstegn", +reg:"Registrert varemerke-tegn",macr:"Makron",deg:"Gradsymbol",sup2:"Hevet totall",sup3:"Hevet tretall",acute:"Akutt aksent",micro:"Mikrosymbol",para:"Avsnittstegn",middot:"Midtstilt prikk",cedil:"Cedille",sup1:"Hevet ettall",ordm:"Maskulin ordensindikator",raquo:"Høyre anførselstegn",frac14:"Fjerdedelsbrøk",frac12:"Halvbrøk",frac34:"Tre fjerdedelers brøk",iquest:"Omvendt spørsmålstegn",Agrave:"Stor A med grav aksent",Aacute:"Stor A med akutt aksent",Acirc:"Stor A med cirkumfleks",Atilde:"Stor A med tilde", +Auml:"Stor A med tøddel",Aring:"Stor Å",AElig:"Stor Æ",Ccedil:"Stor C med cedille",Egrave:"Stor E med grav aksent",Eacute:"Stor E med akutt aksent",Ecirc:"Stor E med cirkumfleks",Euml:"Stor E med tøddel",Igrave:"Stor I med grav aksent",Iacute:"Stor I med akutt aksent",Icirc:"Stor I med cirkumfleks",Iuml:"Stor I med tøddel",ETH:"Stor Edd/stungen D",Ntilde:"Stor N med tilde",Ograve:"Stor O med grav aksent",Oacute:"Stor O med akutt aksent",Ocirc:"Stor O med cirkumfleks",Otilde:"Stor O med tilde",Ouml:"Stor O med tøddel", +times:"Multiplikasjonstegn",Oslash:"Stor Ø",Ugrave:"Stor U med grav aksent",Uacute:"Stor U med akutt aksent",Ucirc:"Stor U med cirkumfleks",Uuml:"Stor U med tøddel",Yacute:"Stor Y med akutt aksent",THORN:"Stor Thorn",szlig:"Liten dobbelt-s/Eszett",agrave:"Liten a med grav aksent",aacute:"Liten a med akutt aksent",acirc:"Liten a med cirkumfleks",atilde:"Liten a med tilde",auml:"Liten a med tøddel",aring:"Liten å",aelig:"Liten æ",ccedil:"Liten c med cedille",egrave:"Liten e med grav aksent",eacute:"Liten e med akutt aksent", +ecirc:"Liten e med cirkumfleks",euml:"Liten e med tøddel",igrave:"Liten i med grav aksent",iacute:"Liten i med akutt aksent",icirc:"Liten i med cirkumfleks",iuml:"Liten i med tøddel",eth:"Liten edd/stungen d",ntilde:"Liten n med tilde",ograve:"Liten o med grav aksent",oacute:"Liten o med akutt aksent",ocirc:"Liten o med cirkumfleks",otilde:"Liten o med tilde",ouml:"Liten o med tøddel",divide:"Divisjonstegn",oslash:"Liten ø",ugrave:"Liten u med grav aksent",uacute:"Liten u med akutt aksent",ucirc:"Liten u med cirkumfleks", +uuml:"Liten u med tøddel",yacute:"Liten y med akutt aksent",thorn:"Liten thorn",yuml:"Liten y med tøddel",OElig:"Stor ligatur av O og E",oelig:"Liten ligatur av o og e",372:"Stor W med cirkumfleks",374:"Stor Y med cirkumfleks",373:"Liten w med cirkumfleks",375:"Liten y med cirkumfleks",sbquo:"Enkelt lavt 9-anførselstegn",8219:"Enkelt høyt reversert 9-anførselstegn",bdquo:"Dobbelt lavt 9-anførselstegn",hellip:"Ellipse",trade:"Varemerkesymbol",9658:"Svart høyrevendt peker",bull:"Tykk interpunkt",rarr:"Høyrevendt pil", +rArr:"Dobbel høyrevendt pil",hArr:"Dobbel venstrevendt pil",diams:"Svart ruter",asymp:"Omtrent likhetstegn"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/pl.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/pl.js new file mode 100644 index 00000000000..76e2acd7864 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/pl.js @@ -0,0 +1,12 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","pl",{euro:"Znak euro",lsquo:"Cudzysłów pojedynczy otwierający",rsquo:"Cudzysłów pojedynczy zamykający",ldquo:"Cudzysłów apostrofowy otwierający",rdquo:"Cudzysłów apostrofowy zamykający",ndash:"Półpauza",mdash:"Pauza",iexcl:"Odwrócony wykrzyknik",cent:"Znak centa",pound:"Znak funta",curren:"Znak waluty",yen:"Znak jena",brvbar:"Przerwana pionowa kreska",sect:"Paragraf",uml:"Diereza",copy:"Znak praw autorskich",ordf:"Wskaźnik rodzaju żeńskiego liczebnika porządkowego", +laquo:"Lewy cudzysłów ostrokątny",not:"Znak negacji",reg:"Zastrzeżony znak towarowy",macr:"Makron",deg:"Znak stopnia",sup2:"Druga potęga",sup3:"Trzecia potęga",acute:"Akcent ostry",micro:"Znak mikro",para:"Znak akapitu",middot:"Kropka środkowa",cedil:"Cedylla",sup1:"Pierwsza potęga",ordm:"Wskaźnik rodzaju męskiego liczebnika porządkowego",raquo:"Prawy cudzysłów ostrokątny",frac14:"Ułamek zwykły jedna czwarta",frac12:"Ułamek zwykły jedna druga",frac34:"Ułamek zwykły trzy czwarte",iquest:"Odwrócony znak zapytania", +Agrave:"Wielka litera A z akcentem ciężkim",Aacute:"Wielka litera A z akcentem ostrym",Acirc:"Wielka litera A z akcentem przeciągłym",Atilde:"Wielka litera A z tyldą",Auml:"Wielka litera A z dierezą",Aring:"Wielka litera A z kółkiem",AElig:"Wielka ligatura Æ",Ccedil:"Wielka litera C z cedyllą",Egrave:"Wielka litera E z akcentem ciężkim",Eacute:"Wielka litera E z akcentem ostrym",Ecirc:"Wielka litera E z akcentem przeciągłym",Euml:"Wielka litera E z dierezą",Igrave:"Wielka litera I z akcentem ciężkim", +Iacute:"Wielka litera I z akcentem ostrym",Icirc:"Wielka litera I z akcentem przeciągłym",Iuml:"Wielka litera I z dierezą",ETH:"Wielka litera Eth",Ntilde:"Wielka litera N z tyldą",Ograve:"Wielka litera O z akcentem ciężkim",Oacute:"Wielka litera O z akcentem ostrym",Ocirc:"Wielka litera O z akcentem przeciągłym",Otilde:"Wielka litera O z tyldą",Ouml:"Wielka litera O z dierezą",times:"Znak mnożenia wektorowego",Oslash:"Wielka litera O z przekreśleniem",Ugrave:"Wielka litera U z akcentem ciężkim",Uacute:"Wielka litera U z akcentem ostrym", +Ucirc:"Wielka litera U z akcentem przeciągłym",Uuml:"Wielka litera U z dierezą",Yacute:"Wielka litera Y z akcentem ostrym",THORN:"Wielka litera Thorn",szlig:"Mała litera ostre s (eszet)",agrave:"Mała litera a z akcentem ciężkim",aacute:"Mała litera a z akcentem ostrym",acirc:"Mała litera a z akcentem przeciągłym",atilde:"Mała litera a z tyldą",auml:"Mała litera a z dierezą",aring:"Mała litera a z kółkiem",aelig:"Mała ligatura æ",ccedil:"Mała litera c z cedyllą",egrave:"Mała litera e z akcentem ciężkim", +eacute:"Mała litera e z akcentem ostrym",ecirc:"Mała litera e z akcentem przeciągłym",euml:"Mała litera e z dierezą",igrave:"Mała litera i z akcentem ciężkim",iacute:"Mała litera i z akcentem ostrym",icirc:"Mała litera i z akcentem przeciągłym",iuml:"Mała litera i z dierezą",eth:"Mała litera eth",ntilde:"Mała litera n z tyldą",ograve:"Mała litera o z akcentem ciężkim",oacute:"Mała litera o z akcentem ostrym",ocirc:"Mała litera o z akcentem przeciągłym",otilde:"Mała litera o z tyldą",ouml:"Mała litera o z dierezą", +divide:"Anglosaski znak dzielenia",oslash:"Mała litera o z przekreśleniem",ugrave:"Mała litera u z akcentem ciężkim",uacute:"Mała litera u z akcentem ostrym",ucirc:"Mała litera u z akcentem przeciągłym",uuml:"Mała litera u z dierezą",yacute:"Mała litera y z akcentem ostrym",thorn:"Mała litera thorn",yuml:"Mała litera y z dierezą",OElig:"Wielka ligatura OE",oelig:"Mała ligatura oe",372:"Wielka litera W z akcentem przeciągłym",374:"Wielka litera Y z akcentem przeciągłym",373:"Mała litera w z akcentem przeciągłym", +375:"Mała litera y z akcentem przeciągłym",sbquo:"Pojedynczy apostrof dolny",8219:"Pojedynczy apostrof górny",bdquo:"Podwójny apostrof dolny",hellip:"Wielokropek",trade:"Znak towarowy",9658:"Czarny wskaźnik wskazujący w prawo",bull:"Punktor",rarr:"Strzałka w prawo",rArr:"Podwójna strzałka w prawo",hArr:"Podwójna strzałka w lewo",diams:"Czarny znak karo",asymp:"Znak prawie równe"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/pt-br.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/pt-br.js new file mode 100644 index 00000000000..41f8c3325f1 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/pt-br.js @@ -0,0 +1,11 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","pt-br",{euro:"Euro",lsquo:"Aspas simples esquerda",rsquo:"Aspas simples direita",ldquo:"Aspas duplas esquerda",rdquo:"Aspas duplas direita",ndash:"Traço",mdash:"Travessão",iexcl:"Ponto de exclamação invertido",cent:"Cent",pound:"Cerquilha",curren:"Dinheiro",yen:"Yen",brvbar:"Bara interrompida",sect:"Símbolo de Parágrafo",uml:"Trema",copy:"Direito de Cópia",ordf:"Indicador ordinal feminino",laquo:"Aspas duplas angulares esquerda",not:"Negação",reg:"Marca Registrada", +macr:"Mácron",deg:"Grau",sup2:"2 Superscrito",sup3:"3 Superscrito",acute:"Acento agudo",micro:"Micro",para:"Pé de mosca",middot:"Ponto mediano",cedil:"Cedilha",sup1:"1 Superscrito",ordm:"Indicador ordinal masculino",raquo:"Aspas duplas angulares direita",frac14:"Um quarto",frac12:"Um meio",frac34:"Três quartos",iquest:"Interrogação invertida",Agrave:"A maiúsculo com acento grave",Aacute:"A maiúsculo com acento agudo",Acirc:"A maiúsculo com acento circunflexo",Atilde:"A maiúsculo com til",Auml:"A maiúsculo com trema", +Aring:"A maiúsculo com anel acima",AElig:"Æ maiúsculo",Ccedil:"Ç maiúlculo",Egrave:"E maiúsculo com acento grave",Eacute:"E maiúsculo com acento agudo",Ecirc:"E maiúsculo com acento circumflexo",Euml:"E maiúsculo com trema",Igrave:"I maiúsculo com acento grave",Iacute:"I maiúsculo com acento agudo",Icirc:"I maiúsculo com acento circunflexo",Iuml:"I maiúsculo com crase",ETH:"Eth maiúsculo",Ntilde:"N maiúsculo com til",Ograve:"O maiúsculo com acento grave",Oacute:"O maiúsculo com acento agudo",Ocirc:"O maiúsculo com acento circunflexo", +Otilde:"O maiúsculo com til",Ouml:"O maiúsculo com trema",times:"Multiplicação",Oslash:"Diâmetro",Ugrave:"U maiúsculo com acento grave",Uacute:"U maiúsculo com acento agudo",Ucirc:"U maiúsculo com acento circunflexo",Uuml:"U maiúsculo com trema",Yacute:"Y maiúsculo com acento agudo",THORN:"Thorn maiúsculo",szlig:"Eszett minúsculo",agrave:"a minúsculo com acento grave",aacute:"a minúsculo com acento agudo",acirc:"a minúsculo com acento circunflexo",atilde:"a minúsculo com til",auml:"a minúsculo com trema", +aring:"a minúsculo com anel acima",aelig:"æ minúsculo",ccedil:"ç minúsculo",egrave:"e minúsculo com acento grave",eacute:"e minúsculo com acento agudo",ecirc:"e minúsculo com acento circunflexo",euml:"e minúsculo com trema",igrave:"i minúsculo com acento grave",iacute:"i minúsculo com acento agudo",icirc:"i minúsculo com acento circunflexo",iuml:"i minúsculo com trema",eth:"eth minúsculo",ntilde:"n minúsculo com til",ograve:"o minúsculo com acento grave",oacute:"o minúsculo com acento agudo",ocirc:"o minúsculo com acento circunflexo", +otilde:"o minúsculo com til",ouml:"o minúsculo com trema",divide:"Divisão",oslash:"o minúsculo com cortado ou diâmetro",ugrave:"u minúsculo com acento grave",uacute:"u minúsculo com acento agudo",ucirc:"u minúsculo com acento circunflexo",uuml:"u minúsculo com trema",yacute:"y minúsculo com acento agudo",thorn:"thorn minúsculo",yuml:"y minúsculo com trema",OElig:"Ligação tipográfica OE maiúscula",oelig:"Ligação tipográfica oe minúscula",372:"W maiúsculo com acento circunflexo",374:"Y maiúsculo com acento circunflexo", +373:"w minúsculo com acento circunflexo",375:"y minúsculo com acento circunflexo",sbquo:"Aspas simples inferior direita",8219:"Aspas simples superior esquerda",bdquo:"Aspas duplas inferior direita",hellip:"Reticências",trade:"Trade mark",9658:"Ponta de seta preta para direita",bull:"Ponto lista",rarr:"Seta para direita",rArr:"Seta dupla para direita",hArr:"Seta dupla direita e esquerda",diams:"Ouros",asymp:"Aproximadamente"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/pt.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/pt.js new file mode 100644 index 00000000000..9c73f0c1e5f --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/pt.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","pt",{euro:"Símbolo do Euro",lsquo:"Aspa esquerda simples",rsquo:"Aspa direita simples",ldquo:"Aspa esquerda dupla",rdquo:"Aspa direita dupla",ndash:"Travessão Simples",mdash:"Travessão Longo",iexcl:"Ponto de exclamação invertido",cent:"Símbolo do Cêntimo",pound:"Símbolo da Libra",curren:"Símbolo de Moeda",yen:"Símbolo do Iene",brvbar:"Barra quebrada",sect:"Símbolo de Secção",uml:"Trema",copy:"Símbolo dos Direitos de Autor",ordf:"Indicador ordinal feminino", +laquo:"Aspa esquerda ângulo duplo",not:"Não Símbolo",reg:"Símbolo de Registado",macr:"Mácron",deg:"Símbolo de Grau",sup2:"Expoente 2",sup3:"Expoente 3",acute:"Acento agudo",micro:"Símbolo de Micro",para:"Símbolo de Parágrafo",middot:"Ponto do Meio",cedil:"Cedilha",sup1:"Expoente 1",ordm:"Indicador ordinal masculino",raquo:"Aspas ângulo duplo pra Direita",frac14:"Fração vulgar 1/4",frac12:"Fração vulgar 1/2",frac34:"Fração vulgar 3/4",iquest:"Ponto de interrogação invertido",Agrave:"Letra maiúscula latina A com acento grave", +Aacute:"Letra maiúscula latina A com acento agudo",Acirc:"Letra maiúscula latina A com circunflexo",Atilde:"Letra maiúscula latina A com til",Auml:"Letra maiúscula latina A com trema",Aring:"Letra maiúscula latina A com sinal diacrítico",AElig:"Letra maiúscula latina Æ",Ccedil:"Letra maiúscula latina C com cedilha",Egrave:"Letra maiúscula latina E com acento grave",Eacute:"Letra maiúscula latina E com acento agudo",Ecirc:"Letra maiúscula latina E com circunflexo",Euml:"Letra maiúscula latina E com trema", +Igrave:"Letra maiúscula latina I com acento grave",Iacute:"Letra maiúscula latina I com acento agudo",Icirc:"Letra maiúscula latina I com cincunflexo",Iuml:"Letra maiúscula latina I com trema",ETH:"Letra maiúscula latina Eth (Ðð)",Ntilde:"Letra maiúscula latina N com til",Ograve:"Letra maiúscula latina O com acento grave",Oacute:"Letra maiúscula latina O com acento agudo",Ocirc:"Letra maiúscula latina I com circunflexo",Otilde:"Letra maiúscula latina O com til",Ouml:"Letra maiúscula latina O com trema", +times:"Símbolo de multiplicação",Oslash:"Letra maiúscula O com barra",Ugrave:"Letra maiúscula latina U com acento grave",Uacute:"Letra maiúscula latina U com acento agudo",Ucirc:"Letra maiúscula latina U com circunflexo",Uuml:"Letra maiúscula latina E com trema",Yacute:"Letra maiúscula latina Y com acento agudo",THORN:"Letra maiúscula latina Rúnico",szlig:"Letra minúscula latina s forte",agrave:"Letra minúscula latina a com acento grave",aacute:"Letra minúscula latina a com acento agudo",acirc:"Letra minúscula latina a com circunflexo", +atilde:"Letra minúscula latina a com til",auml:"Letra minúscula latina a com trema",aring:"Letra minúscula latina a com sinal diacrítico",aelig:"Letra minúscula latina æ",ccedil:"Letra minúscula latina c com cedilha",egrave:"Letra minúscula latina e com acento grave",eacute:"Letra minúscula latina e com acento agudo",ecirc:"Letra minúscula latina e com circunflexo",euml:"Letra minúscula latina e com trema",igrave:"Letra minúscula latina i com acento grave",iacute:"Letra minúscula latina i com acento agudo", +icirc:"Letra minúscula latina i com circunflexo",iuml:"Letra pequena latina i com trema",eth:"Letra minúscula latina eth",ntilde:"Letra minúscula latina n com til",ograve:"Letra minúscula latina o com acento grave",oacute:"Letra minúscula latina o com acento agudo",ocirc:"Letra minúscula latina o com circunflexo",otilde:"Letra minúscula latina o com til",ouml:"Letra minúscula latina o com trema",divide:"Símbolo de divisão",oslash:"Letra minúscula latina o com barra",ugrave:"Letra minúscula latina u com acento grave", +uacute:"Letra minúscula latina u com acento agudo",ucirc:"Letra minúscula latina u com circunflexo",uuml:"Letra minúscula latina u com trema",yacute:"Letra minúscula latina y com acento agudo",thorn:"Letra minúscula latina Rúnico",yuml:"Letra minúscula latina y com trema",OElig:"Ligadura maiúscula latina OE",oelig:"Ligadura minúscula latina oe",372:"Letra maiúscula latina W com circunflexo",374:"Letra maiúscula latina Y com circunflexo",373:"Letra minúscula latina w com circunflexo",375:"Letra minúscula latina y com circunflexo", +sbquo:"Aspa Simples inferior-9",8219:"Aspa Simples superior invertida-9",bdquo:"Aspa duplas inferior-9",hellip:"Elipse Horizontal ",trade:"Símbolo de Marca Registada",9658:"Ponteiro preto direito",bull:"Marca",rarr:"Seta para a direita",rArr:"Seta dupla para a direita",hArr:"Seta dupla direita esquerda",diams:"Naipe diamante preto",asymp:"Quase igual a "}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ru.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ru.js new file mode 100644 index 00000000000..30633fdb79e --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ru.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","ru",{euro:"Знак евро",lsquo:"Левая одинарная кавычка",rsquo:"Правая одинарная кавычка",ldquo:"Левая двойная кавычка",rdquo:"Левая двойная кавычка",ndash:"Среднее тире",mdash:"Длинное тире",iexcl:"перевёрнутый восклицательный знак",cent:"Цент",pound:"Фунт",curren:"Знак валюты",yen:"Йена",brvbar:"Вертикальная черта с разрывом",sect:"Знак параграфа",uml:"Умлаут",copy:"Знак охраны авторского права",ordf:"Указатель окончания женского рода ...ая",laquo:"Левая кавычка-«ёлочка»", +not:"Отрицание",reg:"Знак охраны смежных прав\\t",macr:"Макрон",deg:"Градус",sup2:"Надстрочное два",sup3:"Надстрочное три",acute:"Акут",micro:"Микро",para:"Абзац",middot:"Интерпункт",cedil:"Седиль",sup1:"Надстрочная единица",ordm:"Порядковое числительное",raquo:"Правая кавычка-«ёлочка»",frac14:"Одна четвертая",frac12:"Одна вторая",frac34:"Три четвёртых",iquest:"Перевёрнутый вопросительный знак",Agrave:"Латинская заглавная буква А с апострофом",Aacute:"Латинская заглавная буква A с ударением",Acirc:"Латинская заглавная буква А с циркумфлексом", +Atilde:"Латинская заглавная буква А с тильдой",Auml:"Латинская заглавная буква А с тремой",Aring:"Латинская заглавная буква А с кольцом над ней",AElig:"Латинская большая буква Æ",Ccedil:"Латинская заглавная буква C с седилью",Egrave:"Латинская заглавная буква Е с апострофом",Eacute:"Латинская заглавная буква Е с ударением",Ecirc:"Латинская заглавная буква Е с циркумфлексом",Euml:"Латинская заглавная буква Е с тремой",Igrave:"Латинская заглавная буква I с апострофом",Iacute:"Латинская заглавная буква I с ударением", +Icirc:"Латинская заглавная буква I с циркумфлексом",Iuml:"Латинская заглавная буква I с тремой",ETH:"Латинская большая буква Eth",Ntilde:"Латинская заглавная буква N с тильдой",Ograve:"Латинская заглавная буква O с апострофом",Oacute:"Латинская заглавная буква O с ударением",Ocirc:"Латинская заглавная буква O с циркумфлексом",Otilde:"Латинская заглавная буква O с тильдой",Ouml:"Латинская заглавная буква O с тремой",times:"Знак умножения",Oslash:"Латинская большая перечеркнутая O",Ugrave:"Латинская заглавная буква U с апострофом", +Uacute:"Латинская заглавная буква U с ударением",Ucirc:"Латинская заглавная буква U с циркумфлексом",Uuml:"Латинская заглавная буква U с тремой",Yacute:"Латинская заглавная буква Y с ударением",THORN:"Латинская заглавная буква Thorn",szlig:"Знак диеза",agrave:"Латинская маленькая буква a с апострофом",aacute:"Латинская маленькая буква a с ударением",acirc:"Латинская маленькая буква a с циркумфлексом",atilde:"Латинская маленькая буква a с тильдой",auml:"Латинская маленькая буква a с тремой",aring:"Латинская маленькая буква a с кольцом", +aelig:"Латинская маленькая буква æ",ccedil:"Латинская маленькая буква с с седилью",egrave:"Латинская маленькая буква е с апострофом",eacute:"Латинская маленькая буква е с ударением",ecirc:"Латинская маленькая буква е с циркумфлексом",euml:"Латинская маленькая буква е с тремой",igrave:"Латинская маленькая буква i с апострофом",iacute:"Латинская маленькая буква i с ударением",icirc:"Латинская маленькая буква i с циркумфлексом",iuml:"Латинская маленькая буква i с тремой",eth:"Латинская маленькая буква eth", +ntilde:"Латинская маленькая буква n с тильдой",ograve:"Латинская маленькая буква o с апострофом",oacute:"Латинская маленькая буква o с ударением",ocirc:"Латинская маленькая буква o с циркумфлексом",otilde:"Латинская маленькая буква o с тильдой",ouml:"Латинская маленькая буква o с тремой",divide:"Знак деления",oslash:"Латинская строчная перечеркнутая o",ugrave:"Латинская маленькая буква u с апострофом",uacute:"Латинская маленькая буква u с ударением",ucirc:"Латинская маленькая буква u с циркумфлексом", +uuml:"Латинская маленькая буква u с тремой",yacute:"Латинская маленькая буква y с ударением",thorn:"Латинская маленькая буква thorn",yuml:"Латинская маленькая буква y с тремой",OElig:"Латинская прописная лигатура OE",oelig:"Латинская строчная лигатура oe",372:"Латинская заглавная буква W с циркумфлексом",374:"Латинская заглавная буква Y с циркумфлексом",373:"Латинская маленькая буква w с циркумфлексом",375:"Латинская маленькая буква y с циркумфлексом",sbquo:"Нижняя одинарная кавычка",8219:"Правая одинарная кавычка", +bdquo:"Левая двойная кавычка",hellip:"Горизонтальное многоточие",trade:"Товарный знак",9658:"Черный указатель вправо",bull:"Маркер списка",rarr:"Стрелка вправо",rArr:"Двойная стрелка вправо",hArr:"Двойная стрелка влево-вправо",diams:"Черный ромб",asymp:"Примерно равно"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/si.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/si.js new file mode 100644 index 00000000000..12789fb55f2 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/si.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","si",{euro:"යුරෝ සලකුණ",lsquo:"වමේ තනි උපුටා දක්වීම ",rsquo:"දකුණේ තනි උපුටා දක්වීම ",ldquo:"වමේ දිත්ව උපුටා දක්වීම ",rdquo:"දකුණේ දිත්ව උපුටා දක්වීම ",ndash:"En dash",mdash:"Em dash",iexcl:"යටිකුරු හර්ෂදී ",cent:"Cent sign",pound:"Pound sign",curren:"මුල්‍යමය ",yen:"යෙන් ",brvbar:"Broken bar",sect:"තෙරේම් ",uml:"Diaeresis",copy:"පිටපත් අයිතිය ",ordf:"දර්ශකය",laquo:"Left-pointing double angle quotation mark",not:"සලකුණක් නොවේ",reg:"සලකුණක් ලියාපදිංචි කිරීම", +macr:"මුද්‍රිත ",deg:"සලකුණේ ",sup2:"උඩු ලකුණු දෙක",sup3:"Superscript three",acute:"Acute accent",micro:"Micro sign",para:"Pilcrow sign",middot:"Middle dot",cedil:"Cedilla",sup1:"Superscript one",ordm:"Masculine ordinal indicator",raquo:"Right-pointing double angle quotation mark",frac14:"Vulgar fraction one quarter",frac12:"Vulgar fraction one half",frac34:"Vulgar fraction three quarters",iquest:"Inverted question mark",Agrave:"Latin capital letter A with grave accent",Aacute:"Latin capital letter A with acute accent", +Acirc:"Latin capital letter A with circumflex",Atilde:"Latin capital letter A with tilde",Auml:"Latin capital letter A with diaeresis",Aring:"Latin capital letter A with ring above",AElig:"Latin Capital letter Æ",Ccedil:"Latin capital letter C with cedilla",Egrave:"Latin capital letter E with grave accent",Eacute:"Latin capital letter E with acute accent",Ecirc:"Latin capital letter E with circumflex",Euml:"Latin capital letter E with diaeresis",Igrave:"Latin capital letter I with grave accent",Iacute:"Latin capital letter I with acute accent", +Icirc:"Latin capital letter I with circumflex",Iuml:"Latin capital letter I with diaeresis",ETH:"Latin capital letter Eth",Ntilde:"Latin capital letter N with tilde",Ograve:"Latin capital letter O with grave accent",Oacute:"Latin capital letter O with acute accent",Ocirc:"Latin capital letter O with circumflex",Otilde:"Latin capital letter O with tilde",Ouml:"Latin capital letter O with diaeresis",times:"Multiplication sign",Oslash:"Latin capital letter O with stroke",Ugrave:"Latin capital letter U with grave accent", +Uacute:"Latin capital letter U with acute accent",Ucirc:"Latin capital letter U with circumflex",Uuml:"Latin capital letter U with diaeresis",Yacute:"Latin capital letter Y with acute accent",THORN:"Latin capital letter Thorn",szlig:"Latin small letter sharp s",agrave:"Latin small letter a with grave accent",aacute:"Latin small letter a with acute accent",acirc:"Latin small letter a with circumflex",atilde:"Latin small letter a with tilde",auml:"Latin small letter a with diaeresis",aring:"Latin small letter a with ring above", +aelig:"Latin small letter æ",ccedil:"Latin small letter c with cedilla",egrave:"Latin small letter e with grave accent",eacute:"Latin small letter e with acute accent",ecirc:"Latin small letter e with circumflex",euml:"Latin small letter e with diaeresis",igrave:"Latin small letter i with grave accent",iacute:"Latin small letter i with acute accent",icirc:"Latin small letter i with circumflex",iuml:"Latin small letter i with diaeresis",eth:"Latin small letter eth",ntilde:"Latin small letter n with tilde", +ograve:"Latin small letter o with grave accent",oacute:"Latin small letter o with acute accent",ocirc:"Latin small letter o with circumflex",otilde:"Latin small letter o with tilde",ouml:"Latin small letter o with diaeresis",divide:"Division sign",oslash:"Latin small letter o with stroke",ugrave:"Latin small letter u with grave accent",uacute:"Latin small letter u with acute accent",ucirc:"Latin small letter u with circumflex",uuml:"Latin small letter u with diaeresis",yacute:"Latin small letter y with acute accent", +thorn:"Latin small letter thorn",yuml:"Latin small letter y with diaeresis",OElig:"Latin capital ligature OE",oelig:"Latin small ligature oe",372:"Latin capital letter W with circumflex",374:"Latin capital letter Y with circumflex",373:"Latin small letter w with circumflex",375:"Latin small letter y with circumflex",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Horizontal ellipsis",trade:"Trade mark sign",9658:"Black right-pointing pointer", +bull:"Bullet",rarr:"Rightwards arrow",rArr:"Rightwards double arrow",hArr:"Left right double arrow",diams:"Black diamond suit",asymp:"Almost equal to"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/sk.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/sk.js new file mode 100644 index 00000000000..6e5b534aa2d --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/sk.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","sk",{euro:"Znak eura",lsquo:"Ľavá jednoduchá úvodzovka",rsquo:"Pravá jednoduchá úvodzovka",ldquo:"Pravá dvojitá úvodzovka",rdquo:"Pravá dvojitá úvodzovka",ndash:"En pomlčka",mdash:"Em pomlčka",iexcl:"Obrátený výkričník",cent:"Znak centu",pound:"Znak libry",curren:"Znak meny",yen:"Znak jenu",brvbar:"Prerušená zvislá čiara",sect:"Znak odseku",uml:"Prehláska",copy:"Znak copyrightu",ordf:"Ženský indikátor rodu",laquo:"Znak dvojitých lomených úvodzoviek vľavo",not:"Logistický zápor", +reg:"Znak registrácie",macr:"Pomlčka nad",deg:"Znak stupňa",sup2:"Dvojka ako horný index",sup3:"Trojka ako horný index",acute:"Dĺžeň",micro:"Znak mikro",para:"Znak odstavca",middot:"Bodka uprostred",cedil:"Chvost vľavo",sup1:"Jednotka ako horný index",ordm:"Mužský indikátor rodu",raquo:"Znak dvojitých lomených úvodzoviek vpravo",frac14:"Obyčajný zlomok jedna štvrtina",frac12:"Obyčajný zlomok jedna polovica",frac34:"Obyčajný zlomok tri štvrtiny",iquest:"Otočený otáznik",Agrave:"Veľké písmeno latinky A s accentom", +Aacute:"Veľké písmeno latinky A s dĺžňom",Acirc:"Veľké písmeno latinky A s mäkčeňom",Atilde:"Veľké písmeno latinky A s tildou",Auml:"Veľké písmeno latinky A s dvoma bodkami",Aring:"Veľké písmeno latinky A s krúžkom nad",AElig:"Veľké písmeno latinky Æ",Ccedil:"Veľké písmeno latinky C s chvostom vľavo",Egrave:"Veľké písmeno latinky E s accentom",Eacute:"Veľké písmeno latinky E s dĺžňom",Ecirc:"Veľké písmeno latinky E s mäkčeňom",Euml:"Veľké písmeno latinky E s dvoma bodkami",Igrave:"Veľké písmeno latinky I s accentom", +Iacute:"Veľké písmeno latinky I s dĺžňom",Icirc:"Veľké písmeno latinky I s mäkčeňom",Iuml:"Veľké písmeno latinky I s dvoma bodkami",ETH:"Veľké písmeno latinky Eth",Ntilde:"Veľké písmeno latinky N s tildou",Ograve:"Veľké písmeno latinky O s accentom",Oacute:"Veľké písmeno latinky O s dĺžňom",Ocirc:"Veľké písmeno latinky O s mäkčeňom",Otilde:"Veľké písmeno latinky O s tildou",Ouml:"Veľké písmeno latinky O s dvoma bodkami",times:"Znak násobenia",Oslash:"Veľké písmeno latinky O preškrtnuté",Ugrave:"Veľké písmeno latinky U s accentom", +Uacute:"Veľké písmeno latinky U s dĺžňom",Ucirc:"Veľké písmeno latinky U s mäkčeňom",Uuml:"Veľké písmeno latinky U s dvoma bodkami",Yacute:"Veľké písmeno latinky Y s dĺžňom",THORN:"Veľké písmeno latinky Thorn",szlig:"Malé písmeno latinky ostré s",agrave:"Malé písmeno latinky a s accentom",aacute:"Malé písmeno latinky a s dĺžňom",acirc:"Malé písmeno latinky a s mäkčeňom",atilde:"Malé písmeno latinky a s tildou",auml:"Malé písmeno latinky a s dvoma bodkami",aring:"Malé písmeno latinky a s krúžkom nad", +aelig:"Malé písmeno latinky æ",ccedil:"Malé písmeno latinky c s chvostom vľavo",egrave:"Malé písmeno latinky e s accentom",eacute:"Malé písmeno latinky e s dĺžňom",ecirc:"Malé písmeno latinky e s mäkčeňom",euml:"Malé písmeno latinky e s dvoma bodkami",igrave:"Malé písmeno latinky i s accentom",iacute:"Malé písmeno latinky i s dĺžňom",icirc:"Malé písmeno latinky i s mäkčeňom",iuml:"Malé písmeno latinky i s dvoma bodkami",eth:"Malé písmeno latinky eth",ntilde:"Malé písmeno latinky n s tildou",ograve:"Malé písmeno latinky o s accentom", +oacute:"Malé písmeno latinky o s dĺžňom",ocirc:"Malé písmeno latinky o s mäkčeňom",otilde:"Malé písmeno latinky o s tildou",ouml:"Malé písmeno latinky o s dvoma bodkami",divide:"Znak delenia",oslash:"Malé písmeno latinky o preškrtnuté",ugrave:"Malé písmeno latinky u s accentom",uacute:"Malé písmeno latinky u s dĺžňom",ucirc:"Malé písmeno latinky u s mäkčeňom",uuml:"Malé písmeno latinky u s dvoma bodkami",yacute:"Malé písmeno latinky y s dĺžňom",thorn:"Malé písmeno latinky thorn",yuml:"Malé písmeno latinky y s dvoma bodkami", +OElig:"Veľká ligatúra latinky OE",oelig:"Malá ligatúra latinky OE",372:"Veľké písmeno latinky W s mäkčeňom",374:"Veľké písmeno latinky Y s mäkčeňom",373:"Malé písmeno latinky w s mäkčeňom",375:"Malé písmeno latinky y s mäkčeňom",sbquo:"Dolná jednoduchá 9-úvodzovka",8219:"Horná jednoduchá otočená 9-úvodzovka",bdquo:"Dolná dvojitá 9-úvodzovka",hellip:"Trojbodkový úvod",trade:"Znak ibchodnej značky",9658:"Čierny ukazovateľ smerujúci vpravo",bull:"Kruh",rarr:"Šípka vpravo",rArr:"Dvojitá šipka vpravo", +hArr:"Dvojitá šipka vľavo a vpravo",diams:"Čierne piky",asymp:"Skoro sa rovná"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/sl.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/sl.js new file mode 100644 index 00000000000..bdebbd12cbf --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/sl.js @@ -0,0 +1,12 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","sl",{euro:"Evro znak",lsquo:"Levi enojni narekovaj",rsquo:"Desni enojni narekovaj",ldquo:"Levi dvojni narekovaj",rdquo:"Desni dvojni narekovaj",ndash:"En pomišljaj",mdash:"Em pomišljaj",iexcl:"Obrnjen klicaj",cent:"Cent znak",pound:"Funt znak",curren:"Znak valute",yen:"Jen znak",brvbar:"Zlomljena črta",sect:"Znak oddelka",uml:"Diaeresis",copy:"Znak avtorskih pravic",ordf:"Ženski zaporedni kazalnik",laquo:"Levi obrnjen dvojni kotni narekovaj",not:"Ne znak",reg:"Registrirani znak", +macr:"Macron",deg:"Znak stopinj",sup2:"Nadpisano dva",sup3:"Nadpisano tri",acute:"Ostrivec",micro:"Mikro znak",para:"Pilcrow znak",middot:"Sredinska pika",cedil:"Cedilla",sup1:"Nadpisano ena",ordm:"Moški zaporedni kazalnik",raquo:"Desno obrnjen dvojni kotni narekovaj",frac14:"Ena četrtina",frac12:"Ena polovica",frac34:"Tri četrtine",iquest:"Obrnjen vprašaj",Agrave:"Velika latinska črka A s krativcem",Aacute:"Velika latinska črka A z ostrivcem",Acirc:"Velika latinska črka A s strešico",Atilde:"Velika latinska črka A z tildo", +Auml:"Velika latinska črka A z diaeresis-om",Aring:"Velika latinska črka A z obročem",AElig:"Velika latinska črka Æ",Ccedil:"Velika latinska črka C s cedillo",Egrave:"Velika latinska črka E s krativcem",Eacute:"Velika latinska črka E z ostrivcem",Ecirc:"Velika latinska črka E s strešico",Euml:"Velika latinska črka E z diaeresis-om",Igrave:"Velika latinska črka I s krativcem",Iacute:"Velika latinska črka I z ostrivcem",Icirc:"Velika latinska črka I s strešico",Iuml:"Velika latinska črka I z diaeresis-om", +ETH:"Velika latinska črka Eth",Ntilde:"Velika latinska črka N s tildo",Ograve:"Velika latinska črka O s krativcem",Oacute:"Velika latinska črka O z ostrivcem",Ocirc:"Velika latinska črka O s strešico",Otilde:"Velika latinska črka O s tildo",Ouml:"Velika latinska črka O z diaeresis-om",times:"Znak za množenje",Oslash:"Velika prečrtana latinska črka O",Ugrave:"Velika latinska črka U s krativcem",Uacute:"Velika latinska črka U z ostrivcem",Ucirc:"Velika latinska črka U s strešico",Uuml:"Velika latinska črka U z diaeresis-om", +Yacute:"Velika latinska črka Y z ostrivcem",THORN:"Velika latinska črka Thorn",szlig:"Mala ostra latinska črka s",agrave:"Mala latinska črka a s krativcem",aacute:"Mala latinska črka a z ostrivcem",acirc:"Mala latinska črka a s strešico",atilde:"Mala latinska črka a s tildo",auml:"Mala latinska črka a z diaeresis-om",aring:"Mala latinska črka a z obročem",aelig:"Mala latinska črka æ",ccedil:"Mala latinska črka c s cedillo",egrave:"Mala latinska črka e s krativcem",eacute:"Mala latinska črka e z ostrivcem", +ecirc:"Mala latinska črka e s strešico",euml:"Mala latinska črka e z diaeresis-om",igrave:"Mala latinska črka i s krativcem",iacute:"Mala latinska črka i z ostrivcem",icirc:"Mala latinska črka i s strešico",iuml:"Mala latinska črka i z diaeresis-om",eth:"Mala latinska črka eth",ntilde:"Mala latinska črka n s tildo",ograve:"Mala latinska črka o s krativcem",oacute:"Mala latinska črka o z ostrivcem",ocirc:"Mala latinska črka o s strešico",otilde:"Mala latinska črka o s tildo",ouml:"Mala latinska črka o z diaeresis-om", +divide:"Znak za deljenje",oslash:"Mala prečrtana latinska črka o",ugrave:"Mala latinska črka u s krativcem",uacute:"Mala latinska črka u z ostrivcem",ucirc:"Mala latinska črka u s strešico",uuml:"Mala latinska črka u z diaeresis-om",yacute:"Mala latinska črka y z ostrivcem",thorn:"Mala latinska črka thorn",yuml:"Mala latinska črka y z diaeresis-om",OElig:"Velika latinska ligatura OE",oelig:"Mala latinska ligatura oe",372:"Velika latinska črka W s strešico",374:"Velika latinska črka Y s strešico", +373:"Mala latinska črka w s strešico",375:"Mala latinska črka y s strešico",sbquo:"Enojni nizki-9 narekovaj",8219:"Enojni visoki-obrnjen-9 narekovaj",bdquo:"Dvojni nizki-9 narekovaj",hellip:"Horizontalni izpust",trade:"Znak blagovne znamke",9658:"Črni desno-usmerjen kazalec",bull:"Krogla",rarr:"Desno-usmerjena puščica",rArr:"Desno-usmerjena dvojna puščica",hArr:"Leva in desna dvojna puščica",diams:"Črna kara",asymp:"Skoraj enako"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/sq.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/sq.js new file mode 100644 index 00000000000..967a0484df3 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/sq.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","sq",{euro:"Shenja e Euros",lsquo:"Thonjëza majtas me një vi",rsquo:"Thonjëza djathtas me një vi",ldquo:"Thonjëza majtas",rdquo:"Thonjëza djathtas",ndash:"En viza lidhëse",mdash:"Em viza lidhëse",iexcl:"Pikëçuditëse e përmbysur",cent:"Shenja e Centit",pound:"Shejna e Funtit",curren:"Shenja e valutës",yen:"Shenja e Jenit",brvbar:"Viza e këputur",sect:"Shenja e pjesës",uml:"Diaeresis",copy:"Shenja e të drejtave të kopjimit",ordf:"Feminine ordinal indicator",laquo:"Left-pointing double angle quotation mark", +not:"Nuk ka shenjë",reg:"Shenja e të regjistruarit",macr:"Macron",deg:"Shenja e shkallës",sup2:"Super-skripta dy",sup3:"Super-skripta tre",acute:"Theks i mprehtë",micro:"Shjenja e Mikros",para:"Pilcrow sign",middot:"Pika e Mesme",cedil:"Hark nën shkronja",sup1:"Super-skripta një",ordm:"Masculine ordinal indicator",raquo:"Right-pointing double angle quotation mark",frac14:"Thyesa një të katrat",frac12:"Thyesa një të dytat",frac34:"Thyesa tre të katrat",iquest:"Pikëpyetje e përmbysur",Agrave:"Shkronja e madhe latine A me theks të rëndë", +Aacute:"Shkronja e madhe latine A me theks akute",Acirc:"Shkronja e madhe latine A me theks lakor",Atilde:"Shkronja e madhe latine A me tildë",Auml:"Shkronja e madhe latine A me dy pika",Aring:"Shkronja e madhe latine A me unazë mbi",AElig:"Shkronja e madhe latine Æ",Ccedil:"Shkronja e madhe latine C me hark poshtë",Egrave:"Shkronja e madhe latine E me theks të rëndë",Eacute:"Shkronja e madhe latine E me theks akute",Ecirc:"Shkronja e madhe latine E me theks lakor",Euml:"Shkronja e madhe latine E me dy pika", +Igrave:"Shkronja e madhe latine I me theks të rëndë",Iacute:"Shkronja e madhe latine I me theks akute",Icirc:"Shkronja e madhe latine I me theks lakor",Iuml:"Shkronja e madhe latine I me dy pika",ETH:"Shkronja e madhe latine Eth",Ntilde:"Shkronja e madhe latine N me tildë",Ograve:"Shkronja e madhe latine O me theks të rëndë",Oacute:"Shkronja e madhe latine O me theks akute",Ocirc:"Shkronja e madhe latine O me theks lakor",Otilde:"Shkronja e madhe latine O me tildë",Ouml:"Shkronja e madhe latine O me dy pika", +times:"Shenja e shumëzimit",Oslash:"Shkronja e madhe latine O me vizë në mes",Ugrave:"Shkronja e madhe latine U me theks të rëndë",Uacute:"Shkronja e madhe latine U me theks akute",Ucirc:"Shkronja e madhe latine U me theks lakor",Uuml:"Shkronja e madhe latine U me dy pika",Yacute:"Shkronja e madhe latine Y me theks akute",THORN:"Shkronja e madhe latine Thorn",szlig:"Shkronja e vogë latine s e mprehtë",agrave:"Shkronja e vogë latine a me theks të rëndë",aacute:"Shkronja e vogë latine a me theks të mprehtë", +acirc:"Shkronja e vogël latine a me theks lakor",atilde:"Shkronja e vogël latine a me tildë",auml:"Shkronja e vogël latine a me dy pika",aring:"Shkronja e vogë latine a me unazë mbi",aelig:"Shkronja e vogë latine æ",ccedil:"Shkronja e vogël latine c me hark poshtë",egrave:"Shkronja e vogë latine e me theks të rëndë",eacute:"Shkronja e vogë latine e me theks të mprehtë",ecirc:"Shkronja e vogël latine e me theks lakor",euml:"Shkronja e vogël latine e me dy pika",igrave:"Shkronja e vogë latine i me theks të rëndë", +iacute:"Shkronja e vogë latine i me theks të mprehtë",icirc:"Shkronja e vogël latine i me theks lakor",iuml:"Shkronja e vogël latine i me dy pika",eth:"Shkronja e vogë latine eth",ntilde:"Shkronja e vogël latine n me tildë",ograve:"Shkronja e vogë latine o me theks të rëndë",oacute:"Shkronja e vogë latine o me theks të mprehtë",ocirc:"Shkronja e vogël latine o me theks lakor",otilde:"Shkronja e vogël latine o me tildë",ouml:"Shkronja e vogël latine o me dy pika",divide:"Shenja ndarëse",oslash:"Shkronja e vogël latine o me vizë në mes", +ugrave:"Shkronja e vogë latine u me theks të rëndë",uacute:"Shkronja e vogë latine u me theks të mprehtë",ucirc:"Shkronja e vogël latine u me theks lakor",uuml:"Shkronja e vogël latine u me dy pika",yacute:"Shkronja e vogë latine y me theks të mprehtë",thorn:"Shkronja e vogël latine thorn",yuml:"Shkronja e vogël latine y me dy pika",OElig:"Shkronja e madhe e bashkuar latine OE",oelig:"Shkronja e vogël e bashkuar latine oe",372:"Shkronja e madhe latine W me theks lakor",374:"Shkronja e madhe latine Y me theks lakor", +373:"Shkronja e vogël latine w me theks lakor",375:"Shkronja e vogël latine y me theks lakor",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Horizontal ellipsis",trade:"Shenja e Simbolit Tregtarë",9658:"Black right-pointing pointer",bull:"Pulla",rarr:"Shigjeta djathtas",rArr:"Shenja të dyfishta djathtas",hArr:"Shigjeta e dyfishë majtas-djathtas",diams:"Black diamond suit",asymp:"Gati e barabar me"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/sv.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/sv.js new file mode 100644 index 00000000000..d177c86b1a9 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/sv.js @@ -0,0 +1,11 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","sv",{euro:"Eurotecken",lsquo:"Enkelt vänster citattecken",rsquo:"Enkelt höger citattecken",ldquo:"Dubbelt vänster citattecken",rdquo:"Dubbelt höger citattecken",ndash:"Snedstreck",mdash:"Långt tankstreck",iexcl:"Inverterad utropstecken",cent:"Centtecken",pound:"Pundtecken",curren:"Valutatecken",yen:"Yentecken",brvbar:"Brutet lodrätt streck",sect:"Paragraftecken",uml:"Diaeresis",copy:"Upphovsrättstecken",ordf:"Feminit ordningstalsindikator",laquo:"Vänsterställt dubbelt vinkelcitationstecken", +not:"Icke-tecken",reg:"Registrerad",macr:"Macron",deg:"Grader",sup2:"Upphöjt två",sup3:"Upphöjt tre",acute:"Akut accent",micro:"Mikrotecken",para:"Alinea",middot:"Centrerad prick",cedil:"Cedilj",sup1:"Upphöjt en",ordm:"Maskulina ordningsändelsen",raquo:"Högerställt dubbelt vinkelcitationstecken",frac14:"Bråktal - en kvart",frac12:"Bråktal - en halv",frac34:"Bråktal - tre fjärdedelar",iquest:"Inverterat frågetecken",Agrave:"Stort A med grav accent",Aacute:"Stort A med akutaccent",Acirc:"Stort A med circumflex", +Atilde:"Stort A med tilde",Auml:"Stort A med diaresis",Aring:"Stort A med ring ovan",AElig:"Stort Æ",Ccedil:"Stort C med cedilj",Egrave:"Stort E med grav accent",Eacute:"Stort E med aktuaccent",Ecirc:"Stort E med circumflex",Euml:"Stort E med diaeresis",Igrave:"Stort I med grav accent",Iacute:"Stort I med akutaccent",Icirc:"Stort I med circumflex",Iuml:"Stort I med diaeresis",ETH:"Stort Eth",Ntilde:"Stort N med tilde",Ograve:"Stort O med grav accent",Oacute:"Stort O med aktuaccent",Ocirc:"Stort O med circumflex", +Otilde:"Stort O med tilde",Ouml:"Stort O med diaeresis",times:"Multiplicera",Oslash:"Stor Ø",Ugrave:"Stort U med grav accent",Uacute:"Stort U med akutaccent",Ucirc:"Stort U med circumflex",Uuml:"Stort U med diaeresis",Yacute:"Stort Y med akutaccent",THORN:"Stort Thorn",szlig:"Litet dubbel-s/Eszett",agrave:"Litet a med grav accent",aacute:"Litet a med akutaccent",acirc:"Litet a med circumflex",atilde:"Litet a med tilde",auml:"Litet a med diaeresis",aring:"Litet a med ring ovan",aelig:"Bokstaven æ", +ccedil:"Litet c med cedilj",egrave:"Litet e med grav accent",eacute:"Litet e med akutaccent",ecirc:"Litet e med circumflex",euml:"Litet e med diaeresis",igrave:"Litet i med grav accent",iacute:"Litet i med akutaccent",icirc:"LItet i med circumflex",iuml:"Litet i med didaeresis",eth:"Litet eth",ntilde:"Litet n med tilde",ograve:"LItet o med grav accent",oacute:"LItet o med akutaccent",ocirc:"Litet o med circumflex",otilde:"LItet o med tilde",ouml:"Litet o med diaeresis",divide:"Division",oslash:"ø", +ugrave:"Litet u med grav accent",uacute:"Litet u med akutaccent",ucirc:"LItet u med circumflex",uuml:"Litet u med diaeresis",yacute:"Litet y med akutaccent",thorn:"Litet thorn",yuml:"Litet y med diaeresis",OElig:"Stor ligatur av OE",oelig:"Liten ligatur av oe",372:"Stort W med circumflex",374:"Stort Y med circumflex",373:"Litet w med circumflex",375:"Litet y med circumflex",sbquo:"Enkelt lågt 9-citationstecken",8219:"Enkelt högt bakvänt 9-citationstecken",bdquo:"Dubbelt lågt 9-citationstecken",hellip:"Horisontellt uteslutningstecken", +trade:"Varumärke",9658:"Svart högervänd pekare",bull:"Listpunkt",rarr:"Högerpil",rArr:"Dubbel högerpil",hArr:"Dubbel vänsterpil",diams:"Svart ruter",asymp:"Ungefär lika med"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/th.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/th.js new file mode 100644 index 00000000000..1d43ac96f75 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/th.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","th",{euro:"Euro sign",lsquo:"Left single quotation mark",rsquo:"Right single quotation mark",ldquo:"Left double quotation mark",rdquo:"Right double quotation mark",ndash:"En dash",mdash:"Em dash",iexcl:"Inverted exclamation mark",cent:"Cent sign",pound:"Pound sign",curren:"สัญลักษณ์สกุลเงิน",yen:"สัญลักษณ์เงินเยน",brvbar:"Broken bar",sect:"Section sign",uml:"Diaeresis",copy:"Copyright sign",ordf:"Feminine ordinal indicator",laquo:"Left-pointing double angle quotation mark", +not:"Not sign",reg:"Registered sign",macr:"Macron",deg:"Degree sign",sup2:"Superscript two",sup3:"Superscript three",acute:"Acute accent",micro:"Micro sign",para:"Pilcrow sign",middot:"Middle dot",cedil:"Cedilla",sup1:"Superscript one",ordm:"Masculine ordinal indicator",raquo:"Right-pointing double angle quotation mark",frac14:"Vulgar fraction one quarter",frac12:"Vulgar fraction one half",frac34:"Vulgar fraction three quarters",iquest:"Inverted question mark",Agrave:"Latin capital letter A with grave accent", +Aacute:"Latin capital letter A with acute accent",Acirc:"Latin capital letter A with circumflex",Atilde:"Latin capital letter A with tilde",Auml:"Latin capital letter A with diaeresis",Aring:"Latin capital letter A with ring above",AElig:"Latin Capital letter Æ",Ccedil:"Latin capital letter C with cedilla",Egrave:"Latin capital letter E with grave accent",Eacute:"Latin capital letter E with acute accent",Ecirc:"Latin capital letter E with circumflex",Euml:"Latin capital letter E with diaeresis",Igrave:"Latin capital letter I with grave accent", +Iacute:"Latin capital letter I with acute accent",Icirc:"Latin capital letter I with circumflex",Iuml:"Latin capital letter I with diaeresis",ETH:"Latin capital letter Eth",Ntilde:"Latin capital letter N with tilde",Ograve:"Latin capital letter O with grave accent",Oacute:"Latin capital letter O with acute accent",Ocirc:"Latin capital letter O with circumflex",Otilde:"Latin capital letter O with tilde",Ouml:"Latin capital letter O with diaeresis",times:"Multiplication sign",Oslash:"Latin capital letter O with stroke", +Ugrave:"Latin capital letter U with grave accent",Uacute:"Latin capital letter U with acute accent",Ucirc:"Latin capital letter U with circumflex",Uuml:"Latin capital letter U with diaeresis",Yacute:"Latin capital letter Y with acute accent",THORN:"Latin capital letter Thorn",szlig:"Latin small letter sharp s",agrave:"Latin small letter a with grave accent",aacute:"Latin small letter a with acute accent",acirc:"Latin small letter a with circumflex",atilde:"Latin small letter a with tilde",auml:"Latin small letter a with diaeresis", +aring:"Latin small letter a with ring above",aelig:"Latin small letter æ",ccedil:"Latin small letter c with cedilla",egrave:"Latin small letter e with grave accent",eacute:"Latin small letter e with acute accent",ecirc:"Latin small letter e with circumflex",euml:"Latin small letter e with diaeresis",igrave:"Latin small letter i with grave accent",iacute:"Latin small letter i with acute accent",icirc:"Latin small letter i with circumflex",iuml:"Latin small letter i with diaeresis",eth:"Latin small letter eth", +ntilde:"Latin small letter n with tilde",ograve:"Latin small letter o with grave accent",oacute:"Latin small letter o with acute accent",ocirc:"Latin small letter o with circumflex",otilde:"Latin small letter o with tilde",ouml:"Latin small letter o with diaeresis",divide:"Division sign",oslash:"Latin small letter o with stroke",ugrave:"Latin small letter u with grave accent",uacute:"Latin small letter u with acute accent",ucirc:"Latin small letter u with circumflex",uuml:"Latin small letter u with diaeresis", +yacute:"Latin small letter y with acute accent",thorn:"Latin small letter thorn",yuml:"Latin small letter y with diaeresis",OElig:"Latin capital ligature OE",oelig:"Latin small ligature oe",372:"Latin capital letter W with circumflex",374:"Latin capital letter Y with circumflex",373:"Latin small letter w with circumflex",375:"Latin small letter y with circumflex",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Horizontal ellipsis", +trade:"Trade mark sign",9658:"Black right-pointing pointer",bull:"สัญลักษณ์หัวข้อย่อย",rarr:"Rightwards arrow",rArr:"Rightwards double arrow",hArr:"Left right double arrow",diams:"Black diamond suit",asymp:"Almost equal to"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/tr.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/tr.js new file mode 100644 index 00000000000..65c1a19c59d --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/tr.js @@ -0,0 +1,12 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","tr",{euro:"Euro işareti",lsquo:"Sol tek tırnak işareti",rsquo:"Sağ tek tırnak işareti",ldquo:"Sol çift tırnak işareti",rdquo:"Sağ çift tırnak işareti",ndash:"En tire",mdash:"Em tire",iexcl:"Ters ünlem işareti",cent:"Cent işareti",pound:"Pound işareti",curren:"Para birimi işareti",yen:"Yen işareti",brvbar:"Kırık bar",sect:"Bölüm işareti",uml:"İki sesli harfin ayrılması",copy:"Telif hakkı işareti",ordf:"Dişil sıralı gösterge",laquo:"Sol-işaret çift açı tırnak işareti", +not:"Not işareti",reg:"Kayıtlı işareti",macr:"Makron",deg:"Derece işareti",sup2:"İkili üstsimge",sup3:"Üçlü üstsimge",acute:"Aksan işareti",micro:"Mikro işareti",para:"Pilcrow işareti",middot:"Orta nokta",cedil:"Kedilla",sup1:"Üstsimge",ordm:"Eril sıralı gösterge",raquo:"Sağ işaret çift açı tırnak işareti",frac14:"Bayağı kesrin dörtte biri",frac12:"Bayağı kesrin bir yarım",frac34:"Bayağı kesrin dörtte üç",iquest:"Ters soru işareti",Agrave:"Aksanlı latin harfi",Aacute:"Aşırı aksanıyla Latin harfi", +Acirc:"Çarpık Latin harfi",Atilde:"Tilde latin harfi",Auml:"Sesli harf ayrılımlıı latin harfi",Aring:"Halkalı latin büyük A harfi",AElig:"Latin büyük Æ harfi",Ccedil:"Latin büyük C harfi ile kedilla",Egrave:"Aksanlı latin büyük E harfi",Eacute:"Aşırı vurgulu latin büyük E harfi",Ecirc:"Çarpık latin büyük E harfi",Euml:"Sesli harf ayrılımlıı latin büyük E harfi",Igrave:"Aksanlı latin büyük I harfi",Iacute:"Aşırı aksanlı latin büyük I harfi",Icirc:"Çarpık latin büyük I harfi",Iuml:"Sesli harf ayrılımlıı latin büyük I harfi", +ETH:"Latin büyük Eth harfi",Ntilde:"Tildeli latin büyük N harfi",Ograve:"Aksanlı latin büyük O harfi",Oacute:"Aşırı aksanlı latin büyük O harfi",Ocirc:"Çarpık latin büyük O harfi",Otilde:"Tildeli latin büyük O harfi",Ouml:"Sesli harf ayrılımlı latin büyük O harfi",times:"Çarpma işareti",Oslash:"Vurgulu latin büyük O harfi",Ugrave:"Aksanlı latin büyük U harfi",Uacute:"Aşırı aksanlı latin büyük U harfi",Ucirc:"Çarpık latin büyük U harfi",Uuml:"Sesli harf ayrılımlı latin büyük U harfi",Yacute:"Aşırı aksanlı latin büyük Y harfi", +THORN:"Latin büyük Thorn harfi",szlig:"Latin küçük keskin s harfi",agrave:"Aksanlı latin küçük a harfi",aacute:"Aşırı aksanlı latin küçük a harfi",acirc:"Çarpık latin küçük a harfi",atilde:"Tildeli latin küçük a harfi",auml:"Sesli harf ayrılımlı latin küçük a harfi",aring:"Halkalı latin küçük a harfi",aelig:"Latin büyük æ harfi",ccedil:"Kedillalı latin küçük c harfi",egrave:"Aksanlı latin küçük e harfi",eacute:"Aşırı aksanlı latin küçük e harfi",ecirc:"Çarpık latin küçük e harfi",euml:"Sesli harf ayrılımlı latin küçük e harfi", +igrave:"Aksanlı latin küçük i harfi",iacute:"Aşırı aksanlı latin küçük i harfi",icirc:"Çarpık latin küçük i harfi",iuml:"Sesli harf ayrılımlı latin küçük i harfi",eth:"Latin küçük eth harfi",ntilde:"Tildeli latin küçük n harfi",ograve:"Aksanlı latin küçük o harfi",oacute:"Aşırı aksanlı latin küçük o harfi",ocirc:"Çarpık latin küçük o harfi",otilde:"Tildeli latin küçük o harfi",ouml:"Sesli harf ayrılımlı latin küçük o harfi",divide:"Bölme işareti",oslash:"Vurgulu latin küçük o harfi",ugrave:"Aksanlı latin küçük u harfi", +uacute:"Aşırı aksanlı latin küçük u harfi",ucirc:"Çarpık latin küçük u harfi",uuml:"Sesli harf ayrılımlı latin küçük u harfi",yacute:"Aşırı aksanlı latin küçük y harfi",thorn:"Latin küçük thorn harfi",yuml:"Sesli harf ayrılımlı latin küçük y harfi",OElig:"Latin büyük bağlı OE harfi",oelig:"Latin küçük bağlı oe harfi",372:"Çarpık latin büyük W harfi",374:"Çarpık latin büyük Y harfi",373:"Çarpık latin küçük w harfi",375:"Çarpık latin küçük y harfi",sbquo:"Tek düşük-9 tırnak işareti",8219:"Tek yüksek-ters-9 tırnak işareti", +bdquo:"Çift düşük-9 tırnak işareti",hellip:"Yatay elips",trade:"Marka tescili işareti",9658:"Siyah sağ işaret işaretçisi",bull:"Koyu nokta",rarr:"Sağa doğru ok",rArr:"Sağa doğru çift ok",hArr:"Sol, sağ çift ok",diams:"Siyah elmas takımı",asymp:"Hemen hemen eşit"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/tt.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/tt.js new file mode 100644 index 00000000000..303d6554a23 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/tt.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","tt",{euro:"Евро тамгасы",lsquo:"Сул бер иңле куштырнаклар",rsquo:"Уң бер иңле куштырнаклар",ldquo:"Сул ике иңле куштырнаклар",rdquo:"Уң ике иңле куштырнаклар",ndash:"Кыска сызык",mdash:"Озын сызык",iexcl:"Әйләндерелгән өндәү билгесе",cent:"Цент тамгасы",pound:"Фунт тамгасы",curren:"Акча берәмлеге тамгасы",yen:"Иена тамгасы",brvbar:"Broken bar",sect:"Параграф билгесе",uml:"Диерезис",copy:"Хокук иясе булу билгесе",ordf:"Feminine ordinal indicator",laquo:"Ачылучы чыршысыман җәя", +not:"Юклык ишарəсе",reg:"Теркәләнгән булу билгесе",macr:"Макрон",deg:"Градус билгесе",sup2:"Икенче өске индекс",sup3:"Өченче өске индекс",acute:"Басым билгесе",micro:"Микро билгесе",para:"Параграф билгесе",middot:"Уртадагы нокта",cedil:"Седиль",sup1:"Беренче өске индекс",ordm:"Masculine ordinal indicator",raquo:"Ябылучы чыршысыман җәя",frac14:"Гади дүрттән бер билгесе",frac12:"Гади икедән бер билгесе",frac34:"Гади дүрттән өч билгесе",iquest:"Әйләндерелгән өндәү билгесе",Agrave:"Гравис белән латин A баш хәрефе", +Aacute:"Басым билгесе белән латин A баш хәрефе",Acirc:"Циркумфлекс белән латин A баш хәрефе",Atilde:"Тильда белән латин A баш хәрефе",Auml:"Диерезис белән латин A баш хәрефе",Aring:"Өстендә боҗра булган латин A баш хәрефе",AElig:"Латин Æ баш хәрефе",Ccedil:"Седиль белән латин C баш хәрефе",Egrave:"Гравис белән латин E баш хәрефе",Eacute:"Басым билгесе белән латин E баш хәрефе",Ecirc:"Циркумфлекс белән латин E баш хәрефе",Euml:"Диерезис белән латин E баш хәрефе",Igrave:"Гравис белән латин I баш хәрефе", +Iacute:"Басым билгесе белән латин I баш хәрефе",Icirc:"Циркумфлекс белән латин I баш хәрефе",Iuml:"Диерезис белән латин I баш хәрефе",ETH:"Латин Eth баш хәрефе",Ntilde:"Тильда белән латин N баш хәрефе",Ograve:"Гравис белән латин O баш хәрефе",Oacute:"Басым билгесе белән латин O баш хәрефе",Ocirc:"Циркумфлекс белән латин O баш хәрефе",Otilde:"Тильда белән латин O баш хәрефе",Ouml:"Диерезис белән латин O баш хәрефе",times:"Тапкырлау билгесе",Oslash:"Сызык белән латин O баш хәрефе",Ugrave:"Гравис белән латин U баш хәрефе", +Uacute:"Басым билгесе белән латин U баш хәрефе",Ucirc:"Циркумфлекс белән латин U баш хәрефе",Uuml:"Диерезис белән латин U баш хәрефе",Yacute:"Басым билгесе белән латин Y баш хәрефе",THORN:"Латин Thorn баш хәрефе",szlig:"Латин beta юл хәрефе",agrave:"Гравис белән латин a юл хәрефе",aacute:"Басым билгесе белән латин a юл хәрефе",acirc:"Циркумфлекс белән латин a юл хәрефе",atilde:"Тильда белән латин a юл хәрефе",auml:"Диерезис белән латин a юл хәрефе",aring:"Өстендә боҗра булган латин a юл хәрефе",aelig:"Латин æ юл хәрефе", +ccedil:"Седиль белән латин c юл хәрефе",egrave:"Гравис белән латин e юл хәрефе",eacute:"Басым билгесе белән латин e юл хәрефе",ecirc:"Циркумфлекс белән латин e юл хәрефе",euml:"Диерезис белән латин e юл хәрефе",igrave:"Гравис белән латин i юл хәрефе",iacute:"Басым билгесе белән латин i юл хәрефе",icirc:"Циркумфлекс белән латин i юл хәрефе",iuml:"Диерезис белән латин i юл хәрефе",eth:"Латин eth юл хәрефе",ntilde:"Тильда белән латин n юл хәрефе",ograve:"Гравис белән латин o юл хәрефе",oacute:"Басым билгесе белән латин o юл хәрефе", +ocirc:"Циркумфлекс белән латин o юл хәрефе",otilde:"Тильда белән латин o юл хәрефе",ouml:"Диерезис белән латин o юл хәрефе",divide:"Бүлү билгесе",oslash:"Сызык белән латин o юл хәрефе",ugrave:"Гравис белән латин u юл хәрефе",uacute:"Басым билгесе белән латин u юл хәрефе",ucirc:"Циркумфлекс белән латин u юл хәрефе",uuml:"Диерезис белән латин u юл хәрефе",yacute:"Басым билгесе белән латин y юл хәрефе",thorn:"Латин thorn юл хәрефе",yuml:"Диерезис белән латин y юл хәрефе",OElig:"Латин лигатура OE баш хәрефе", +oelig:"Латин лигатура oe юл хәрефе",372:"Циркумфлекс белән латин W баш хәрефе",374:"Циркумфлекс белән латин Y баш хәрефе",373:"Циркумфлекс белән латин w юл хәрефе",375:"Циркумфлекс белән латин y юл хәрефе",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Ятма эллипс",trade:"Сәүдә маркасы билгесе",9658:"Black right-pointing pointer",bull:"Маркер",rarr:"Уң якка ук",rArr:"Уң якка икеләтә ук",hArr:"Ике якка икеләтә ук",diams:"Black diamond suit", +asymp:"якынча"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ug.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ug.js new file mode 100644 index 00000000000..757e83f65c6 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/ug.js @@ -0,0 +1,13 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","ug",{euro:"ياۋرو بەلگىسى",lsquo:"يالاڭ پەش سول",rsquo:"يالاڭ پەش ئوڭ",ldquo:"قوش پەش سول",rdquo:"قوش پەش ئوڭ",ndash:"سىزىقچە",mdash:"سىزىق",iexcl:"ئۈندەش",cent:"تىيىن بەلگىسى",pound:"فوند ستېرلىڭ",curren:"پۇل بەلگىسى",yen:"ياپونىيە يىنى",brvbar:"ئۈزۈك بالداق",sect:"پاراگراف بەلگىسى",uml:"تاۋۇش ئايرىش بەلگىسى",copy:"نەشر ھوقۇقى بەلگىسى",ordf:"Feminine ordinal indicator",laquo:"قوش تىرناق سول",not:"غەيرى بەلگە",reg:"خەتلەتكەن تاۋار ماركىسى",macr:"سوزۇش بەلگىسى", +deg:"گىرادۇس بەلگىسى",sup2:"يۇقىرى ئىندېكىس 2",sup3:"يۇقىرى ئىندېكىس 3",acute:"ئۇرغۇ بەلگىسى",micro:"Micro sign",para:"ئابزاس بەلگىسى",middot:"ئوتتۇرا چېكىت",cedil:"ئاستىغا قوشۇلىدىغان بەلگە",sup1:"يۇقىرى ئىندېكىس 1",ordm:"Masculine ordinal indicator",raquo:"قوش تىرناق ئوڭ",frac14:"ئاددىي كەسىر تۆتتىن بىر",frac12:"ئاددىي كەسىر ئىككىدىن بىر",frac34:"ئاددىي كەسىر ئۈچتىن تۆرت",iquest:"Inverted question mark",Agrave:"Latin capital letter A with grave accent",Aacute:"Latin capital letter A with acute accent", +Acirc:"Latin capital letter A with circumflex",Atilde:"Latin capital letter A with tilde",Auml:"Latin capital letter A with diaeresis",Aring:"Latin capital letter A with ring above",AElig:"Latin Capital letter Æ",Ccedil:"Latin capital letter C with cedilla",Egrave:"Latin capital letter E with grave accent",Eacute:"Latin capital letter E with acute accent",Ecirc:"Latin capital letter E with circumflex",Euml:"Latin capital letter E with diaeresis",Igrave:"Latin capital letter I with grave accent",Iacute:"Latin capital letter I with acute accent", +Icirc:"Latin capital letter I with circumflex",Iuml:"Latin capital letter I with diaeresis",ETH:"Latin capital letter Eth",Ntilde:"Latin capital letter N with tilde",Ograve:"قوش پەش ئوڭ",Oacute:"Latin capital letter O with acute accent",Ocirc:"Latin capital letter O with circumflex",Otilde:"Latin capital letter O with tilde",Ouml:"Latin capital letter O with diaeresis",times:"Multiplication sign",Oslash:"Latin capital letter O with stroke",Ugrave:"Latin capital letter U with grave accent",Uacute:"Latin capital letter U with acute accent", +Ucirc:"Latin capital letter U with circumflex",Uuml:"Latin capital letter U with diaeresis",Yacute:"Latin capital letter Y with acute accent",THORN:"Latin capital letter Thorn",szlig:"Latin small letter sharp s",agrave:"Latin small letter a with grave accent",aacute:"Latin small letter a with acute accent",acirc:"Latin small letter a with circumflex",atilde:"Latin small letter a with tilde",auml:"Latin small letter a with diaeresis",aring:"Latin small letter a with ring above",aelig:"Latin small letter æ", +ccedil:"Latin small letter c with cedilla",egrave:"Latin small letter e with grave accent",eacute:"Latin small letter e with acute accent",ecirc:"Latin small letter e with circumflex",euml:"Latin small letter e with diaeresis",igrave:"Latin small letter i with grave accent",iacute:"Latin small letter i with acute accent",icirc:"Latin small letter i with circumflex",iuml:"Latin small letter i with diaeresis",eth:"Latin small letter eth",ntilde:"تىك موللاق سوئال بەلگىسى",ograve:"Latin small letter o with grave accent", +oacute:"Latin small letter o with acute accent",ocirc:"Latin small letter o with circumflex",otilde:"Latin small letter o with tilde",ouml:"Latin small letter o with diaeresis",divide:"بۆلۈش بەلگىسى",oslash:"Latin small letter o with stroke",ugrave:"Latin small letter u with grave accent",uacute:"Latin small letter u with acute accent",ucirc:"Latin small letter u with circumflex",uuml:"Latin small letter u with diaeresis",yacute:"Latin small letter y with acute accent",thorn:"Latin small letter thorn", +yuml:"Latin small letter y with diaeresis",OElig:"Latin capital ligature OE",oelig:"Latin small ligature oe",372:"Latin capital letter W with circumflex",374:"Latin capital letter Y with circumflex",373:"Latin small letter w with circumflex",375:"Latin small letter y with circumflex",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Horizontal ellipsis",trade:"خەتلەتكەن تاۋار ماركىسى بەلگىسى",9658:"Black right-pointing pointer", +bull:"Bullet",rarr:"ئوڭ يا ئوق",rArr:"ئوڭ قوش سىزىق يا ئوق",hArr:"ئوڭ سول قوش سىزىق يا ئوق",diams:"ئۇيۇل غىچ",asymp:"تەخمىنەن تەڭ"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/uk.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/uk.js new file mode 100644 index 00000000000..2343e56b629 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/uk.js @@ -0,0 +1,12 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","uk",{euro:"Знак євро",lsquo:"Ліві одинарні лапки",rsquo:"Праві одинарні лапки",ldquo:"Ліві подвійні лапки",rdquo:"Праві подвійні лапки",ndash:"Середнє тире",mdash:"Довге тире",iexcl:"Перевернутий знак оклику",cent:"Знак цента",pound:"Знак фунта",curren:"Знак валюти",yen:"Знак єни",brvbar:"Переривчаста вертикальна лінія",sect:"Знак параграфу",uml:"Умлаут",copy:"Знак авторських прав",ordf:"Жіночий порядковий вказівник",laquo:"ліві вказівні подвійні кутові дужки", +not:"Заперечення",reg:"Знак охорони суміжних прав",macr:"Макрон",deg:"Знак градуса",sup2:"два у верхньому індексі",sup3:"три у верхньому індексі",acute:"Знак акута",micro:"Знак мікро",para:"Знак абзацу",middot:"Інтерпункт",cedil:"Седиль",sup1:"Один у верхньому індексі",ordm:"Чоловічий порядковий вказівник",raquo:"праві вказівні подвійні кутові дужки",frac14:"Одна четвертина",frac12:"Одна друга",frac34:"три четвертих",iquest:"Перевернутий знак питання",Agrave:"Велика латинська A з гравісом",Aacute:"Велика латинська А з акутом", +Acirc:"Велика латинська А з циркумфлексом",Atilde:"Велика латинська А з тильдою",Auml:"Велике латинське А з умлаутом",Aring:"Велика латинська A з кільцем згори",AElig:"Велика латинська Æ",Ccedil:"Велика латинська C з седиллю",Egrave:"Велика латинська E з гравісом",Eacute:"Велика латинська E з акутом",Ecirc:"Велика латинська E з циркумфлексом",Euml:"Велика латинська А з умлаутом",Igrave:"Велика латинська I з гравісом",Iacute:"Велика латинська I з акутом",Icirc:"Велика латинська I з циркумфлексом", +Iuml:"Велика латинська І з умлаутом",ETH:"Велика латинська Eth",Ntilde:"Велика латинська N з тильдою",Ograve:"Велика латинська O з гравісом",Oacute:"Велика латинська O з акутом",Ocirc:"Велика латинська O з циркумфлексом",Otilde:"Велика латинська O з тильдою",Ouml:"Велика латинська О з умлаутом",times:"Знак множення",Oslash:"Велика латинська перекреслена O ",Ugrave:"Велика латинська U з гравісом",Uacute:"Велика латинська U з акутом",Ucirc:"Велика латинська U з циркумфлексом",Uuml:"Велика латинська U з умлаутом", +Yacute:"Велика латинська Y з акутом",THORN:"Велика латинська Торн",szlig:"Мала латинська есцет",agrave:"Мала латинська a з гравісом",aacute:"Мала латинська a з акутом",acirc:"Мала латинська a з циркумфлексом",atilde:"Мала латинська a з тильдою",auml:"Мала латинська a з умлаутом",aring:"Мала латинська a з кільцем згори",aelig:"Мала латинська æ",ccedil:"Мала латинська C з седиллю",egrave:"Мала латинська e з гравісом",eacute:"Мала латинська e з акутом",ecirc:"Мала латинська e з циркумфлексом",euml:"Мала латинська e з умлаутом", +igrave:"Мала латинська i з гравісом",iacute:"Мала латинська i з акутом",icirc:"Мала латинська i з циркумфлексом",iuml:"Мала латинська i з умлаутом",eth:"Мала латинська Eth",ntilde:"Мала латинська n з тильдою",ograve:"Мала латинська o з гравісом",oacute:"Мала латинська o з акутом",ocirc:"Мала латинська o з циркумфлексом",otilde:"Мала латинська o з тильдою",ouml:"Мала латинська o з умлаутом",divide:"Знак ділення",oslash:"Мала латинська перекреслена o",ugrave:"Мала латинська u з гравісом",uacute:"Мала латинська u з акутом", +ucirc:"Мала латинська u з циркумфлексом",uuml:"Мала латинська u з умлаутом",yacute:"Мала латинська y з акутом",thorn:"Мала латинська торн",yuml:"Мала латинська y з умлаутом",OElig:"Велика латинська лігатура OE",oelig:"Мала латинська лігатура oe",372:"Велика латинська W з циркумфлексом",374:"Велика латинська Y з циркумфлексом",373:"Мала латинська w з циркумфлексом",375:"Мала латинська y з циркумфлексом",sbquo:"Одиничні нижні лабки",8219:"Верхні одиничні обернені лабки",bdquo:"Подвійні нижні лабки", +hellip:"Три крапки",trade:"Знак торгової марки",9658:"Чорний правий вказівник",bull:"Маркер списку",rarr:"Стрілка вправо",rArr:"Подвійна стрілка вправо",hArr:"Подвійна стрілка вліво-вправо",diams:"Чорний діамонт",asymp:"Наближено дорівнює"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/vi.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/vi.js new file mode 100644 index 00000000000..a71305b5b83 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/vi.js @@ -0,0 +1,14 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","vi",{euro:"Ký hiệu Euro",lsquo:"Dấu ngoặc đơn trái",rsquo:"Dấu ngoặc đơn phải",ldquo:"Dấu ngoặc đôi trái",rdquo:"Dấu ngoặc đôi phải",ndash:"Gạch ngang tiếng anh",mdash:"Gạch ngang Em",iexcl:"Chuyển đổi dấu chấm than",cent:"Ký tự tiền Mỹ",pound:"Ký tự tiền Anh",curren:"Ký tự tiền tệ",yen:"Ký tự tiền Yên Nhật",brvbar:"Thanh hỏng",sect:"Ký tự khu vực",uml:"Dấu tách đôi",copy:"Ký tự bản quyền",ordf:"Phần chỉ thị giống cái",laquo:"Chọn dấu ngoặc đôi trái",not:"Không có ký tự", +reg:"Ký tự đăng ký",macr:"Dấu nguyên âm dài",deg:"Ký tự độ",sup2:"Chữ trồi lên trên dạng 2",sup3:"Chữ trồi lên trên dạng 3",acute:"Dấu trọng âm",micro:"Ký tự micro",para:"Ký tự đoạn văn",middot:"Dấu chấm tròn",cedil:"Dấu móc lưới",sup1:"Ký tự trồi lên cấp 1",ordm:"Ký tự biểu hiện giống đực",raquo:"Chọn dấu ngoặc đôi phải",frac14:"Tỉ lệ một phần tư",frac12:"Tỉ lệ một nửa",frac34:"Tỉ lệ ba phần tư",iquest:"Chuyển đổi dấu chấm hỏi",Agrave:"Ký tự la-tinh viết hoa A với dấu huyền",Aacute:"Ký tự la-tinh viết hoa A với dấu sắc", +Acirc:"Ký tự la-tinh viết hoa A với dấu mũ",Atilde:"Ký tự la-tinh viết hoa A với dấu ngã",Auml:"Ký tự la-tinh viết hoa A với dấu hai chấm trên đầu",Aring:"Ký tự la-tinh viết hoa A với biểu tượng vòng tròn trên đầu",AElig:"Ký tự la-tinh viết hoa của Æ",Ccedil:"Ký tự la-tinh viết hoa C với dấu móc bên dưới",Egrave:"Ký tự la-tinh viết hoa E với dấu huyền",Eacute:"Ký tự la-tinh viết hoa E với dấu sắc",Ecirc:"Ký tự la-tinh viết hoa E với dấu mũ",Euml:"Ký tự la-tinh viết hoa E với dấu hai chấm trên đầu", +Igrave:"Ký tự la-tinh viết hoa I với dấu huyền",Iacute:"Ký tự la-tinh viết hoa I với dấu sắc",Icirc:"Ký tự la-tinh viết hoa I với dấu mũ",Iuml:"Ký tự la-tinh viết hoa I với dấu hai chấm trên đầu",ETH:"Viết hoa của ký tự Eth",Ntilde:"Ký tự la-tinh viết hoa N với dấu ngã",Ograve:"Ký tự la-tinh viết hoa O với dấu huyền",Oacute:"Ký tự la-tinh viết hoa O với dấu sắc",Ocirc:"Ký tự la-tinh viết hoa O với dấu mũ",Otilde:"Ký tự la-tinh viết hoa O với dấu ngã",Ouml:"Ký tự la-tinh viết hoa O với dấu hai chấm trên đầu", +times:"Ký tự phép toán nhân",Oslash:"Ký tự la-tinh viết hoa A với dấu ngã xuống",Ugrave:"Ký tự la-tinh viết hoa U với dấu huyền",Uacute:"Ký tự la-tinh viết hoa U với dấu sắc",Ucirc:"Ký tự la-tinh viết hoa U với dấu mũ",Uuml:"Ký tự la-tinh viết hoa U với dấu hai chấm trên đầu",Yacute:"Ký tự la-tinh viết hoa Y với dấu sắc",THORN:"Phần viết hoa của ký tự Thorn",szlig:"Ký tự viết nhỏ la-tinh của chữ s",agrave:"Ký tự la-tinh thường với dấu huyền",aacute:"Ký tự la-tinh thường với dấu sắc",acirc:"Ký tự la-tinh thường với dấu mũ", +atilde:"Ký tự la-tinh thường với dấu ngã",auml:"Ký tự la-tinh thường với dấu hai chấm trên đầu",aring:"Ký tự la-tinh viết thường với biểu tượng vòng tròn trên đầu",aelig:"Ký tự la-tinh viết thường của æ",ccedil:"Ký tự la-tinh viết thường của c với dấu móc bên dưới",egrave:"Ký tự la-tinh viết thường e với dấu huyền",eacute:"Ký tự la-tinh viết thường e với dấu sắc",ecirc:"Ký tự la-tinh viết thường e với dấu mũ",euml:"Ký tự la-tinh viết thường e với dấu hai chấm trên đầu",igrave:"Ký tự la-tinh viết thường i với dấu huyền", +iacute:"Ký tự la-tinh viết thường i với dấu sắc",icirc:"Ký tự la-tinh viết thường i với dấu mũ",iuml:"Ký tự la-tinh viết thường i với dấu hai chấm trên đầu",eth:"Ký tự la-tinh viết thường của eth",ntilde:"Ký tự la-tinh viết thường n với dấu ngã",ograve:"Ký tự la-tinh viết thường o với dấu huyền",oacute:"Ký tự la-tinh viết thường o với dấu sắc",ocirc:"Ký tự la-tinh viết thường o với dấu mũ",otilde:"Ký tự la-tinh viết thường o với dấu ngã",ouml:"Ký tự la-tinh viết thường o với dấu hai chấm trên đầu", +divide:"Ký hiệu phép tính chia",oslash:"Ký tự la-tinh viết thường o với dấu ngã",ugrave:"Ký tự la-tinh viết thường u với dấu huyền",uacute:"Ký tự la-tinh viết thường u với dấu sắc",ucirc:"Ký tự la-tinh viết thường u với dấu mũ",uuml:"Ký tự la-tinh viết thường u với dấu hai chấm trên đầu",yacute:"Ký tự la-tinh viết thường y với dấu sắc",thorn:"Ký tự la-tinh viết thường của chữ thorn",yuml:"Ký tự la-tinh viết thường y với dấu hai chấm trên đầu",OElig:"Ký tự la-tinh viết hoa gạch nối OE",oelig:"Ký tự la-tinh viết thường gạch nối OE", +372:"Ký tự la-tinh viết hoa W với dấu mũ",374:"Ký tự la-tinh viết hoa Y với dấu mũ",373:"Ký tự la-tinh viết thường w với dấu mũ",375:"Ký tự la-tinh viết thường y với dấu mũ",sbquo:"Dấu ngoặc đơn thấp số-9",8219:"Dấu ngoặc đơn đảo ngược số-9",bdquo:"Gấp đôi dấu ngoặc đơn số-9",hellip:"Tĩnh dược chiều ngang",trade:"Ký tự thương hiệu",9658:"Ký tự trỏ về hướng bên phải màu đen",bull:"Ký hiệu",rarr:"Mũi tên hướng bên phải",rArr:"Mũi tên hướng bên phải dạng đôi",hArr:"Mũi tên hướng bên trái dạng đôi",diams:"Ký hiệu hình thoi", +asymp:"Gần bằng với"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/zh-cn.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/zh-cn.js new file mode 100644 index 00000000000..d794a3daa78 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/zh-cn.js @@ -0,0 +1,9 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","zh-cn",{euro:"欧元符号",lsquo:"左单引号",rsquo:"右单引号",ldquo:"左双引号",rdquo:"右双引号",ndash:"短划线",mdash:"长划线",iexcl:"竖翻叹号",cent:"分币符号",pound:"英镑符号",curren:"货币符号",yen:"日元符号",brvbar:"间断条",sect:"节标记",uml:"分音符",copy:"版权所有标记",ordf:"阴性顺序指示符",laquo:"左指双尖引号",not:"非标记",reg:"注册标记",macr:"长音符",deg:"度标记",sup2:"上标二",sup3:"上标三",acute:"锐音符",micro:"微符",para:"段落标记",middot:"中间点",cedil:"下加符",sup1:"上标一",ordm:"阳性顺序指示符",raquo:"右指双尖引号",frac14:"普通分数四分之一",frac12:"普通分数二分之一",frac34:"普通分数四分之三",iquest:"竖翻问号", +Agrave:"带抑音符的拉丁文大写字母 A",Aacute:"带锐音符的拉丁文大写字母 A",Acirc:"带扬抑符的拉丁文大写字母 A",Atilde:"带颚化符的拉丁文大写字母 A",Auml:"带分音符的拉丁文大写字母 A",Aring:"带上圆圈的拉丁文大写字母 A",AElig:"拉丁文大写字母 Ae",Ccedil:"带下加符的拉丁文大写字母 C",Egrave:"带抑音符的拉丁文大写字母 E",Eacute:"带锐音符的拉丁文大写字母 E",Ecirc:"带扬抑符的拉丁文大写字母 E",Euml:"带分音符的拉丁文大写字母 E",Igrave:"带抑音符的拉丁文大写字母 I",Iacute:"带锐音符的拉丁文大写字母 I",Icirc:"带扬抑符的拉丁文大写字母 I",Iuml:"带分音符的拉丁文大写字母 I",ETH:"拉丁文大写字母 Eth",Ntilde:"带颚化符的拉丁文大写字母 N",Ograve:"带抑音符的拉丁文大写字母 O",Oacute:"带锐音符的拉丁文大写字母 O",Ocirc:"带扬抑符的拉丁文大写字母 O",Otilde:"带颚化符的拉丁文大写字母 O", +Ouml:"带分音符的拉丁文大写字母 O",times:"乘号",Oslash:"带粗线的拉丁文大写字母 O",Ugrave:"带抑音符的拉丁文大写字母 U",Uacute:"带锐音符的拉丁文大写字母 U",Ucirc:"带扬抑符的拉丁文大写字母 U",Uuml:"带分音符的拉丁文大写字母 U",Yacute:"带抑音符的拉丁文大写字母 Y",THORN:"拉丁文大写字母 Thorn",szlig:"拉丁文小写字母清音 S",agrave:"带抑音符的拉丁文小写字母 A",aacute:"带锐音符的拉丁文小写字母 A",acirc:"带扬抑符的拉丁文小写字母 A",atilde:"带颚化符的拉丁文小写字母 A",auml:"带分音符的拉丁文小写字母 A",aring:"带上圆圈的拉丁文小写字母 A",aelig:"拉丁文小写字母 Ae",ccedil:"带下加符的拉丁文小写字母 C",egrave:"带抑音符的拉丁文小写字母 E",eacute:"带锐音符的拉丁文小写字母 E",ecirc:"带扬抑符的拉丁文小写字母 E",euml:"带分音符的拉丁文小写字母 E",igrave:"带抑音符的拉丁文小写字母 I", +iacute:"带锐音符的拉丁文小写字母 I",icirc:"带扬抑符的拉丁文小写字母 I",iuml:"带分音符的拉丁文小写字母 I",eth:"拉丁文小写字母 Eth",ntilde:"带颚化符的拉丁文小写字母 N",ograve:"带抑音符的拉丁文小写字母 O",oacute:"带锐音符的拉丁文小写字母 O",ocirc:"带扬抑符的拉丁文小写字母 O",otilde:"带颚化符的拉丁文小写字母 O",ouml:"带分音符的拉丁文小写字母 O",divide:"除号",oslash:"带粗线的拉丁文小写字母 O",ugrave:"带抑音符的拉丁文小写字母 U",uacute:"带锐音符的拉丁文小写字母 U",ucirc:"带扬抑符的拉丁文小写字母 U",uuml:"带分音符的拉丁文小写字母 U",yacute:"带抑音符的拉丁文小写字母 Y",thorn:"拉丁文小写字母 Thorn",yuml:"带分音符的拉丁文小写字母 Y",OElig:"拉丁文大写连字 Oe",oelig:"拉丁文小写连字 Oe",372:"带扬抑符的拉丁文大写字母 W",374:"带扬抑符的拉丁文大写字母 Y", +373:"带扬抑符的拉丁文小写字母 W",375:"带扬抑符的拉丁文小写字母 Y",sbquo:"单下 9 形引号",8219:"单高横翻 9 形引号",bdquo:"双下 9 形引号",hellip:"水平省略号",trade:"商标标志",9658:"实心右指指针",bull:"加重号",rarr:"向右箭头",rArr:"向右双线箭头",hArr:"左右双线箭头",diams:"实心方块纸牌",asymp:"约等于"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/zh.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/zh.js new file mode 100644 index 00000000000..cb135f9874b --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/lang/zh.js @@ -0,0 +1,9 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang("specialchar","zh",{euro:"歐元符號",lsquo:"左單引號",rsquo:"右單引號",ldquo:"左雙引號",rdquo:"右雙引號",ndash:"短破折號",mdash:"長破折號",iexcl:"倒置的驚嘆號",cent:"美分符號",pound:"英鎊符號",curren:"貨幣符號",yen:"日圓符號",brvbar:"破折號",sect:"章節符號",uml:"分音符號",copy:"版權符號",ordf:"雌性符號",laquo:"左雙角括號",not:"Not 符號",reg:"註冊商標符號",macr:"長音符號",deg:"度數符號",sup2:"上標字 2",sup3:"上標字 3",acute:"尖音符號",micro:"微",para:"段落符號",middot:"中間點",cedil:"字母 C 下面的尾型符號 ",sup1:"上標",ordm:"雄性符號",raquo:"右雙角括號",frac14:"四分之一符號",frac12:"二分之一符號",frac34:"四分之三符號", +iquest:"倒置的問號",Agrave:"拉丁大寫字母 A 帶抑音符號",Aacute:"拉丁大寫字母 A 帶尖音符號",Acirc:"拉丁大寫字母 A 帶揚抑符",Atilde:"拉丁大寫字母 A 帶波浪號",Auml:"拉丁大寫字母 A 帶分音符號",Aring:"拉丁大寫字母 A 帶上圓圈",AElig:"拉丁大寫字母 Æ",Ccedil:"拉丁大寫字母 C 帶下尾符號",Egrave:"拉丁大寫字母 E 帶抑音符號",Eacute:"拉丁大寫字母 E 帶尖音符號",Ecirc:"拉丁大寫字母 E 帶揚抑符",Euml:"拉丁大寫字母 E 帶分音符號",Igrave:"拉丁大寫字母 I 帶抑音符號",Iacute:"拉丁大寫字母 I 帶尖音符號",Icirc:"拉丁大寫字母 I 帶揚抑符",Iuml:"拉丁大寫字母 I 帶分音符號",ETH:"拉丁大寫字母 Eth",Ntilde:"拉丁大寫字母 N 帶波浪號",Ograve:"拉丁大寫字母 O 帶抑音符號",Oacute:"拉丁大寫字母 O 帶尖音符號",Ocirc:"拉丁大寫字母 O 帶揚抑符",Otilde:"拉丁大寫字母 O 帶波浪號", +Ouml:"拉丁大寫字母 O 帶分音符號",times:"乘號",Oslash:"拉丁大寫字母 O 帶粗線符號",Ugrave:"拉丁大寫字母 U 帶抑音符號",Uacute:"拉丁大寫字母 U 帶尖音符號",Ucirc:"拉丁大寫字母 U 帶揚抑符",Uuml:"拉丁大寫字母 U 帶分音符號",Yacute:"拉丁大寫字母 Y 帶尖音符號",THORN:"拉丁大寫字母 Thorn",szlig:"拉丁小寫字母 s",agrave:"拉丁小寫字母 a 帶抑音符號",aacute:"拉丁小寫字母 a 帶尖音符號",acirc:"拉丁小寫字母 a 帶揚抑符",atilde:"拉丁小寫字母 a 帶波浪號",auml:"拉丁小寫字母 a 帶分音符號",aring:"拉丁小寫字母 a 帶上圓圈",aelig:"拉丁小寫字母 æ",ccedil:"拉丁小寫字母 c 帶下尾符號",egrave:"拉丁小寫字母 e 帶抑音符號",eacute:"拉丁小寫字母 e 帶尖音符號",ecirc:"拉丁小寫字母 e 帶揚抑符",euml:"拉丁小寫字母 e 帶分音符號",igrave:"拉丁小寫字母 i 帶抑音符號", +iacute:"拉丁小寫字母 i 帶尖音符號",icirc:"拉丁小寫字母 i 帶揚抑符",iuml:"拉丁小寫字母 i 帶分音符號",eth:"拉丁小寫字母 eth",ntilde:"拉丁小寫字母 n 帶波浪號",ograve:"拉丁小寫字母 o 帶抑音符號",oacute:"拉丁小寫字母 o 帶尖音符號",ocirc:"拉丁小寫字母 o 帶揚抑符",otilde:"拉丁小寫字母 o 帶波浪號",ouml:"拉丁小寫字母 o 帶分音符號",divide:"除號",oslash:"拉丁小寫字母 o 帶粗線符號",ugrave:"拉丁小寫字母 u 帶抑音符號",uacute:"拉丁小寫字母 u 帶尖音符號",ucirc:"拉丁小寫字母 u 帶揚抑符",uuml:"拉丁小寫字母 u 帶分音符號",yacute:"拉丁小寫字母 y 帶尖音符號",thorn:"拉丁小寫字母 thorn",yuml:"拉丁小寫字母 y 帶分音符號",OElig:"拉丁大寫字母 OE",oelig:"拉丁小寫字母 oe",372:"拉丁大寫字母 W 帶揚抑符",374:"拉丁大寫字母 Y 帶揚抑符",373:"拉丁小寫字母 w 帶揚抑符", +375:"拉丁小寫字母 y 帶揚抑符",sbquo:"低 9 單引號",8219:"高 9 反轉單引號",bdquo:"低 9 雙引號",hellip:"水平刪節號",trade:"商標符號",9658:"黑色向右指箭號",bull:"項目符號",rarr:"向右箭號",rArr:"向右雙箭號",hArr:"左右雙箭號",diams:"黑鑽套裝",asymp:"約等於"}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/specialchar.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/specialchar.js new file mode 100644 index 00000000000..b343a831bac --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/specialchar/dialogs/specialchar.js @@ -0,0 +1,14 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.dialog.add("specialchar",function(i){var e,l=i.lang.specialchar,k=function(c){var b,c=c.data?c.data.getTarget():new CKEDITOR.dom.element(c);if("a"==c.getName()&&(b=c.getChild(0).getHtml()))c.removeClass("cke_light_background"),e.hide(),c=i.document.createElement("span"),c.setHtml(b),i.insertText(c.getText())},m=CKEDITOR.tools.addFunction(k),j,g=function(c,b){var a,b=b||c.data.getTarget();"span"==b.getName()&&(b=b.getParent());if("a"==b.getName()&&(a=b.getChild(0).getHtml())){j&&d(null,j); +var f=e.getContentElement("info","htmlPreview").getElement();e.getContentElement("info","charPreview").getElement().setHtml(a);f.setHtml(CKEDITOR.tools.htmlEncode(a));b.getParent().addClass("cke_light_background");j=b}},d=function(c,b){b=b||c.data.getTarget();"span"==b.getName()&&(b=b.getParent());"a"==b.getName()&&(e.getContentElement("info","charPreview").getElement().setHtml(" "),e.getContentElement("info","htmlPreview").getElement().setHtml(" "),b.getParent().removeClass("cke_light_background"), +j=void 0)},n=CKEDITOR.tools.addFunction(function(c){var c=new CKEDITOR.dom.event(c),b=c.getTarget(),a;a=c.getKeystroke();var f="rtl"==i.lang.dir;switch(a){case 38:if(a=b.getParent().getParent().getPrevious())a=a.getChild([b.getParent().getIndex(),0]),a.focus(),d(null,b),g(null,a);c.preventDefault();break;case 40:if(a=b.getParent().getParent().getNext())if((a=a.getChild([b.getParent().getIndex(),0]))&&1==a.type)a.focus(),d(null,b),g(null,a);c.preventDefault();break;case 32:k({data:c});c.preventDefault(); +break;case f?37:39:if(a=b.getParent().getNext())a=a.getChild(0),1==a.type?(a.focus(),d(null,b),g(null,a),c.preventDefault(!0)):d(null,b);else if(a=b.getParent().getParent().getNext())(a=a.getChild([0,0]))&&1==a.type?(a.focus(),d(null,b),g(null,a),c.preventDefault(!0)):d(null,b);break;case f?39:37:(a=b.getParent().getPrevious())?(a=a.getChild(0),a.focus(),d(null,b),g(null,a),c.preventDefault(!0)):(a=b.getParent().getParent().getPrevious())?(a=a.getLast().getChild(0),a.focus(),d(null,b),g(null,a),c.preventDefault(!0)): +d(null,b)}});return{title:l.title,minWidth:430,minHeight:280,buttons:[CKEDITOR.dialog.cancelButton],charColumns:17,onLoad:function(){for(var c=this.definition.charColumns,b=i.config.specialChars,a=CKEDITOR.tools.getNextId()+"_specialchar_table_label",f=[''],d=0,g=b.length,h,e;d');for(var j=0;j'+h+''+e+"")}else f.push('")}f.push("")}f.push("
       ');f.push("
      ",''+l.options+"");this.getContentElement("info","charContainer").getElement().setHtml(f.join(""))},contents:[{id:"info",label:i.lang.common.generalTab, +title:i.lang.common.generalTab,padding:0,align:"top",elements:[{type:"hbox",align:"top",widths:["320px","90px"],children:[{type:"html",id:"charContainer",html:"",onMouseover:g,onMouseout:d,focus:function(){var c=this.getElement().getElementsByTag("a").getItem(0);setTimeout(function(){c.focus();g(null,c)},0)},onShow:function(){var c=this.getElement().getChild([0,0,0,0,0]);setTimeout(function(){c.focus();g(null,c)},0)},onLoad:function(c){e=c.sender}},{type:"hbox",align:"top",widths:["100%"],children:[{type:"vbox", +align:"top",children:[{type:"html",html:"
      "},{type:"html",id:"charPreview",className:"cke_dark_background",style:"border:1px solid #eeeeee;font-size:28px;height:40px;width:70px;padding-top:9px;font-family:'Microsoft Sans Serif',Arial,Helvetica,Verdana;text-align:center;",html:"
       
      "},{type:"html",id:"htmlPreview",className:"cke_dark_background",style:"border:1px solid #eeeeee;font-size:14px;height:20px;width:70px;padding-top:2px;font-family:'Microsoft Sans Serif',Arial,Helvetica,Verdana;text-align:center;", +html:"
       
      "}]}]}]}]}]}}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/table/dialogs/table.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/table/dialogs/table.js new file mode 100644 index 00000000000..8d449cd1566 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/table/dialogs/table.js @@ -0,0 +1,21 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +(function(){function r(a){for(var e=0,l=0,k=0,m,g=a.$.rows.length;kl&&(l=e)}return l}function o(a){return function(){var e=this.getValue(),e=!!(CKEDITOR.dialog.validate.integer()(e)&&0n.getSize("width")?"100%":500:0,getValue:q,validate:CKEDITOR.dialog.validate.cssLength(a.lang.common.invalidCssLength.replace("%1",a.lang.common.width)),onChange:function(){var a=this.getDialog().getContentElement("advanced","advStyles");a&& +a.updateStyle("width",this.getValue())},setup:function(a){this.setValue(a.getStyle("width"))},commit:k}]},{type:"hbox",widths:["5em"],children:[{type:"text",id:"txtHeight",requiredContent:"table{height}",controlStyle:"width:5em",label:a.lang.common.height,title:a.lang.common.cssLengthTooltip,"default":"",getValue:q,validate:CKEDITOR.dialog.validate.cssLength(a.lang.common.invalidCssLength.replace("%1",a.lang.common.height)),onChange:function(){var a=this.getDialog().getContentElement("advanced","advStyles"); +a&&a.updateStyle("height",this.getValue())},setup:function(a){(a=a.getStyle("height"))&&this.setValue(a)},commit:k}]},{type:"html",html:" "},{type:"text",id:"txtCellSpace",requiredContent:"table[cellspacing]",controlStyle:"width:3em",label:a.lang.table.cellSpace,"default":a.filter.check("table[cellspacing]")?1:0,validate:CKEDITOR.dialog.validate.number(a.lang.table.invalidCellSpacing),setup:function(a){this.setValue(a.getAttribute("cellSpacing")||"")},commit:function(a,d){this.getValue()?d.setAttribute("cellSpacing", +this.getValue()):d.removeAttribute("cellSpacing")}},{type:"text",id:"txtCellPad",requiredContent:"table[cellpadding]",controlStyle:"width:3em",label:a.lang.table.cellPad,"default":a.filter.check("table[cellpadding]")?1:0,validate:CKEDITOR.dialog.validate.number(a.lang.table.invalidCellPadding),setup:function(a){this.setValue(a.getAttribute("cellPadding")||"")},commit:function(a,d){this.getValue()?d.setAttribute("cellPadding",this.getValue()):d.removeAttribute("cellPadding")}}]}]},{type:"html",align:"right", +html:""},{type:"vbox",padding:0,children:[{type:"text",id:"txtCaption",requiredContent:"caption",label:a.lang.table.caption,setup:function(a){this.enable();a=a.getElementsByTag("caption");if(0"+h.widthPx}]},f,{type:"select",id:"wordWrap",label:c.wordWrap,"default":"yes",items:[[c.yes,"yes"],[c.no,"no"]],setup:d(function(a){var b=a.getAttribute("noWrap");if("nowrap"==a.getStyle("white-space")|| +b)return"no"}),commit:function(a){"no"==this.getValue()?a.setStyle("white-space","nowrap"):a.removeStyle("white-space");a.removeAttribute("noWrap")}},f,{type:"select",id:"hAlign",label:c.hAlign,"default":"",items:[[e.notSet,""],[e.alignLeft,"left"],[e.alignCenter,"center"],[e.alignRight,"right"],[e.alignJustify,"justify"]],setup:d(function(a){var b=a.getAttribute("align");return a.getStyle("text-align")||b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("text-align",b):a.removeStyle("text-align"); +a.removeAttribute("align")}},{type:"select",id:"vAlign",label:c.vAlign,"default":"",items:[[e.notSet,""],[e.alignTop,"top"],[e.alignMiddle,"middle"],[e.alignBottom,"bottom"],[c.alignBaseline,"baseline"]],setup:d(function(a){var b=a.getAttribute("vAlign"),a=a.getStyle("vertical-align");switch(a){case "top":case "middle":case "bottom":case "baseline":break;default:a=""}return a||b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("vertical-align",b):a.removeStyle("vertical-align");a.removeAttribute("vAlign")}}]}, +f,{type:"vbox",padding:0,children:[{type:"select",id:"cellType",label:c.cellType,"default":"td",items:[[c.data,"td"],[c.header,"th"]],setup:d(function(a){return a.getName()}),commit:function(a){a.renameNode(this.getValue())}},f,{type:"text",id:"rowSpan",label:c.rowSpan,"default":"",validate:i.integer(c.invalidRowSpan),setup:d(function(a){if((a=parseInt(a.getAttribute("rowSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("rowSpan",this.getValue()): +a.removeAttribute("rowSpan")}},{type:"text",id:"colSpan",label:c.colSpan,"default":"",validate:i.integer(c.invalidColSpan),setup:d(function(a){if((a=parseInt(a.getAttribute("colSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("colSpan",this.getValue()):a.removeAttribute("colSpan")}},f,{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"bgColor",label:c.bgColor,"default":"",setup:d(function(a){var b=a.getAttribute("bgColor"); +return a.getStyle("background-color")||b}),commit:function(a){this.getValue()?a.setStyle("background-color",this.getValue()):a.removeStyle("background-color");a.removeAttribute("bgColor")}},k?{type:"button",id:"bgColorChoose","class":"colorChooser",label:c.chooseColor,onLoad:function(){this.getElement().getParent().setStyle("vertical-align","bottom")},onClick:function(){g.getColorFromDialog(function(a){a&&this.getDialog().getContentElement("info","bgColor").setValue(a);this.focus()},this)}}:f]},f, +{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"borderColor",label:c.borderColor,"default":"",setup:d(function(a){var b=a.getAttribute("borderColor");return a.getStyle("border-color")||b}),commit:function(a){this.getValue()?a.setStyle("border-color",this.getValue()):a.removeStyle("border-color");a.removeAttribute("borderColor")}},k?{type:"button",id:"borderColorChoose","class":"colorChooser",label:c.chooseColor,style:(m?"margin-right":"margin-left")+": 10px",onLoad:function(){this.getElement().getParent().setStyle("vertical-align", +"bottom")},onClick:function(){g.getColorFromDialog(function(a){a&&this.getDialog().getContentElement("info","borderColor").setValue(a);this.focus()},this)}}:f]}]}]}]}],onShow:function(){this.cells=CKEDITOR.plugins.tabletools.getSelectedCells(this._.editor.getSelection());this.setupContent(this.cells)},onOk:function(){for(var a=this._.editor.getSelection(),b=a.createBookmarks(),c=this.cells,d=0;d
      '),d='';a.image&&b&&(d+='');d+='");k.on("click",function(){p(a.html)});return k}function p(a){var b=CKEDITOR.dialog.getCurrent();b.getValueOf("selectTpl","chkInsertOpt")?(c.fire("saveSnapshot"),c.setData(a,function(){b.hide();var a=c.createRange();a.moveToElementEditStart(c.editable());a.select();setTimeout(function(){c.fire("saveSnapshot")},0)})):(c.insertHtml(a),b.hide())}function i(a){var b=a.data.getTarget(), +c=g.equals(b);if(c||g.contains(b)){var d=a.data.getKeystroke(),f=g.getElementsByTag("a"),e;if(f){if(c)e=f.getItem(0);else switch(d){case 40:e=b.getNext();break;case 38:e=b.getPrevious();break;case 13:case 32:b.fire("click")}e&&(e.focus(),a.data.preventDefault())}}}var h=CKEDITOR.plugins.get("templates");CKEDITOR.document.appendStyleSheet(CKEDITOR.getUrl(h.path+"dialogs/templates.css"));var g,h="cke_tpl_list_label_"+CKEDITOR.tools.getNextNumber(),f=c.lang.templates,l=c.config;return{title:c.lang.templates.title, +minWidth:CKEDITOR.env.ie?440:400,minHeight:340,contents:[{id:"selectTpl",label:f.title,elements:[{type:"vbox",padding:5,children:[{id:"selectTplText",type:"html",html:""+f.selectPromptMsg+""},{id:"templatesList",type:"html",focus:!0,html:'
      '+f.options+""},{id:"chkInsertOpt",type:"checkbox",label:f.insertOption, +"default":l.templates_replaceContent}]}]}],buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){var a=this.getContentElement("selectTpl","templatesList");g=a.getElement();CKEDITOR.loadTemplates(l.templates_files,function(){var b=(l.templates||"default").split(",");if(b.length){var c=g;c.setHtml("");for(var d=0,h=b.length;d'+f.emptyListMsg+"
      ")});this._.element.on("keydown",i)},onHide:function(){this._.element.removeListener("keydown",i)}}})})(); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/templates/templates/default.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/templates/templates/default.js new file mode 100644 index 00000000000..9026dbdea4b --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/templates/templates/default.js @@ -0,0 +1,6 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.addTemplates("default",{imagesPath:CKEDITOR.getUrl(CKEDITOR.plugins.getPath("templates")+"templates/images/"),templates:[{title:"Image and Title",image:"template1.gif",description:"One main image with a title and text that surround the image.",html:'

      Type the title here

      Type the text here

      '},{title:"Two Columns with Text",image:"template2.gif",description:"A template that defines two colums, each one with a title, and some text.", +html:'

      Title 1

      Title 2

      Text 1Text 2

      More text goes here.

      '},{title:"Text and Table",image:"template3.gif",description:"A title with some text and a table.",html:'

      Title goes here

      Table title
         
         
         

      Type the text here

      '}]}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/templates/templates/images/template1.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/templates/templates/images/template1.gif new file mode 100644 index 00000000000..efdabbebd45 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/templates/templates/images/template1.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/templates/templates/images/template2.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/templates/templates/images/template2.gif new file mode 100644 index 00000000000..d1cebb3aed8 Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/templates/templates/images/template2.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/templates/templates/images/template3.gif b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/templates/templates/images/template3.gif new file mode 100644 index 00000000000..db41cb4fb8f Binary files /dev/null and b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/templates/templates/images/template3.gif differ diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/css/wordcount.css b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/css/wordcount.css new file mode 100644 index 00000000000..fe72026bce1 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/css/wordcount.css @@ -0,0 +1,3 @@ +.cke_wordcount {display:block;float:right;margin-top:-2px;margin-right:3px;color:black;} + +.cke_wordcountLimitReached {color:red! important} \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ar.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ar.js new file mode 100644 index 00000000000..7c181a4cdf5 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ar.js @@ -0,0 +1,12 @@ +// Arabic Translation by Amine BENHAMIDA + +CKEDITOR.plugins.setLang('wordcount', 'ar', { + WordCount: 'كلمات:', + CharCount: 'حروف:', + CharCountWithHTML: 'حروف مع إتش تي إم إل', + Paragraphs: 'فقرات', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'لا يمكن اضافة هذا المحتوى لانه تجاوز الحد الاقصى', + Selected: 'محدد: ', + title: 'احصائيات' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/bg.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/bg.js new file mode 100644 index 00000000000..1e37b6b7b18 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/bg.js @@ -0,0 +1,17 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'bg', { + WordCount: 'Думи:', + WordCountRemaining: 'Оставащи думи', + CharCount: 'Знаци:', + CharCountRemaining: 'Знаци', + CharCountWithHTML: 'Знаци (с HTML):', + CharCountWithHTMLRemaining: 'Оставащи знаци (с HTML)', + Paragraphs: 'Параграфи:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'Съдържанието не може да бъде поставено, защото е над разрешения лимит', + Selected: 'Избрани: ', + title: 'Статистика' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ca.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ca.js new file mode 100644 index 00000000000..19f67c45877 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ca.js @@ -0,0 +1,14 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'ca', { + WordCount: 'Paraules:', + CharCount: 'Caràcters:', + CharCountWithHTML: 'Caràcters (including HTML):', + Paragraphs: 'Paragraphs:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'Content can not be pasted because it is above the allowed limit', + Selected: 'Selected: ', + title: 'Estadístiques' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/cs.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/cs.js new file mode 100644 index 00000000000..6dbd0bf4a48 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/cs.js @@ -0,0 +1,15 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'cs', + { + WordCount: 'Slov: ', + CharCount: 'Znaků: ', + CharCountWithHTML: 'Znaků (s HTML): ', + Paragraphs: 'Odstavců: ', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'Obsah nelze vložit', + Selected: 'Výběr: ', + title: 'Statistika' + }); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/da.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/da.js new file mode 100644 index 00000000000..aaf781a41b6 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/da.js @@ -0,0 +1,14 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'da', { + WordCount: 'Ord:', + CharCount: 'Karakterer:', + CharCountWithHTML: 'Karakterer (med HTML):', + Paragraphs: 'Afsnit:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'Indholdet kan ikke indsættes da det er længere end den tilladte grænse.', + Selected: 'Markeret: ', + title: 'Statistik' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/de.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/de.js new file mode 100644 index 00000000000..42e298dead7 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/de.js @@ -0,0 +1,14 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'de', { + WordCount: 'Wörter:', + CharCount: 'Zeichen:', + CharCountWithHTML: 'Zeichen (inkl. HTML):', + Paragraphs: 'Absätze:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'Content can not be pasted because it is above the allowed limit', + Selected: 'Selected: ', + title: 'Statistik' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/el.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/el.js new file mode 100644 index 00000000000..2643c225e01 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/el.js @@ -0,0 +1,14 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'el', { + WordCount: 'Λέξεις:', + CharCount: 'Χαρακτήρες:', + CharCountWithHTML: 'Χαρακτήρες (μαζί με HTML):', + Paragraphs: 'Paragraphs:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'Content can not be pasted because it is above the allowed limit', + Selected: 'Selected: ', + title: 'Στατιστικά' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/en.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/en.js new file mode 100644 index 00000000000..581790f7bab --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/en.js @@ -0,0 +1,17 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'en', { + WordCount: 'Words:', + WordCountRemaining: 'Words remaining', + CharCount: 'Characters:', + CharCountRemaining: 'Characters remaining', + CharCountWithHTML: 'Characters (with HTML):', + CharCountWithHTMLRemaining: 'Characters (with HTML) remaining', + Paragraphs: 'Paragraphs:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'Content cannot be pasted because it is above the allowed limit', + Selected: 'Selected: ', + title: 'Statistics' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/es.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/es.js new file mode 100644 index 00000000000..8cd41ff367f --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/es.js @@ -0,0 +1,14 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'es', { + WordCount: 'Palabras:', + CharCount: 'Carácteres:', + CharCountWithHTML: 'Carácteres (con HTML):', + Paragraphs: 'Párrafos:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'El contenido no se puede pegar, ya que se encuentra fuera del límite permitido', + Selected: 'Seleccionado: ', + title: 'Estadísticas' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/eu.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/eu.js new file mode 100644 index 00000000000..3d2e9c11511 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/eu.js @@ -0,0 +1,17 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'eu', { + WordCount: 'Hitzak:', + WordCountRemaining: 'Gelditzen diren hitzak', + CharCount: 'Karaktereak:', + CharCountRemaining: 'Gelditzen diren karaktereak', + CharCountWithHTML: 'Karaktereak (HTMLarekin):', + CharCountWithHTMLRemaining: 'Gelditzen diren karaktereak (HTMLarekin)', + Paragraphs: 'Paragrafoak:', + ParagraphsRemaining: 'Gelditzen diren paragrafoak', + pasteWarning: 'Ezin da edukia itsatsi, onartutako muga gainditu duelako', + Selected: 'Hautatuta: ', + title: 'Estatistikak' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/fa.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/fa.js new file mode 100644 index 00000000000..e679255f22e --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/fa.js @@ -0,0 +1,13 @@ +/* +Its The Persian (Farsi) Language Translate For Iranian By "Mohsen Esmaili" +*/ +CKEDITOR.plugins.setLang('wordcount', 'fa', { + WordCount: 'لغت:', + CharCount: 'کاراکتر:', + CharCountWithHTML: 'کاراکترها (با HTML):', + Paragraphs: 'پاراگراف:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'محتوای مورد نظر را نمی توان چسباند. زیرا این بیشتر از حد مجاز است.', + Selected: 'انتخاب شده: ', + title: 'آمار' +}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/fi.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/fi.js new file mode 100644 index 00000000000..827a72f70b7 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/fi.js @@ -0,0 +1,15 @@ +/** + * Finnish localisation. + * + * @author Joel Posti / Response200.pro + */ +CKEDITOR.plugins.setLang('wordcount', 'fi', { + WordCount: 'Sanoja:', + CharCount: 'Merkkejä:', + CharCountWithHTML: 'Merkkejä (ml. HTML):', + Paragraphs: 'Kappaleita:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'Sisältöä ei voida liittää, koska se ylittää sallitun rajan.', + Selected: 'Valittuna: ', + title: 'Statistiikkaa' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/fr.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/fr.js new file mode 100644 index 00000000000..1fa562b1901 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/fr.js @@ -0,0 +1,12 @@ +// French Translation by Nicolas M. et Pierre-Luc Auclair + +CKEDITOR.plugins.setLang('wordcount', 'fr', { + WordCount: 'Mots :', + CharCount: 'Caractères :', + CharCountWithHTML: 'Caractères (incluant HTML) :', + Paragraphs: 'Paragraphes :', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'Le contenu ne peut pas être collé car il dépasse la limite autorisée', + Selected: 'Sélectionné :', + title: 'Statistiques' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/he.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/he.js new file mode 100644 index 00000000000..43895e0a4bf --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/he.js @@ -0,0 +1,14 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'he', { + WordCount: 'מילים:', + CharCount: 'תווים:', + CharCountWithHTML: 'תווים (כולל HTML):', + Paragraphs: 'פסקאות:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'לא ניתן להדביק תוכן בשל עודף תווים', + Selected: 'נבחר: ', + title: 'סטטיסטיקות' +}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/hr.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/hr.js new file mode 100644 index 00000000000..4cfc0189187 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/hr.js @@ -0,0 +1,14 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'hr', { + WordCount: 'Riječi:', + CharCount: 'Znakova:', + CharCountWithHTML: 'Znakova (uključujući HTML):', + Paragraphs: 'Paragraphs:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'Content can not be pasted because it is above the allowed limit', + Selected: 'Selected: ', + title: 'Statistika' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/hu.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/hu.js new file mode 100644 index 00000000000..7866a8e9086 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/hu.js @@ -0,0 +1,14 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'hu', { + WordCount: 'Szavak:', + CharCount: 'Karakaterek:', + CharCountWithHTML: 'Karakterek (HTML tagekkel):', + Paragraphs: 'Bekezdések:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'A szöveget nem lehet beilleszteni, mert a megadott limit felett van', + Selected: 'Kiválasztva: ', + title: 'Statisztika' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/it.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/it.js new file mode 100644 index 00000000000..07717265ed0 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/it.js @@ -0,0 +1,15 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +@author translation: Davide Montorio +*/ +CKEDITOR.plugins.setLang('wordcount', 'it', { + WordCount: 'Parole:', + CharCount: 'Caratteri:', + CharCountWithHTML: 'Caratteri (HTML incluso):', + Paragraphs: 'Paragrafi:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'Il contenuto non può essere incollato poiché supera il limite massimo di caratteri disponibili', + Selected: 'Selezionato: ', + title: 'Statistiche' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ja.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ja.js new file mode 100644 index 00000000000..1d02684ab28 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ja.js @@ -0,0 +1,14 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'ja', { + WordCount: '単語数:', + CharCount: '文字数:', + CharCountWithHTML: '文字数 (HTMLタグを含む):', + Paragraphs: '段落数:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: '文字数/単語数の上限を超えるため、貼り付けできません。', + Selected: '選択中の字数:', + title: 'ワードカウント' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ko.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ko.js new file mode 100644 index 00000000000..4e32f477d88 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ko.js @@ -0,0 +1,16 @@ +/* +Korean translation by Maxime Houdais +*/ +CKEDITOR.plugins.setLang('wordcount', 'ko', { + WordCount: '단어:', + WordCountRemaining: '남은 단어', + CharCount: '글자:', + CharCountRemaining: '남은 글자', + CharCountWithHTML: '글자 와 HTML:', + CharCountWithHTMLRemaining: '남은 글자 와 HTML', + Paragraphs: '단락:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: '허용 된 한도를 초과하여 콘텐츠를 붙여 넣을 수 없습니다.', + Selected: '선택:', + title: '통계' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/nl.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/nl.js new file mode 100644 index 00000000000..e2a81701fd9 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/nl.js @@ -0,0 +1,14 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'nl', { + WordCount: 'Woorden:', + CharCount: 'Tekens:', + CharCountWithHTML: 'Tekens (inclusief HTML):', + Paragraphs: 'Paragrafen:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'De tekst kan niet worden geplakt omdat de limiet is overschreden', + Selected: 'Geselecteerd: ', + title: 'Statistieken' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/no.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/no.js new file mode 100644 index 00000000000..e9fba5c45f9 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/no.js @@ -0,0 +1,11 @@ +// Norwegian translation by Vegard S. +CKEDITOR.plugins.setLang('wordcount', 'no', { + WordCount: 'Ord:', + CharCount: 'Tegn:', + CharCountWithHTML: 'Tegn (including HTML):', + Paragraphs: 'Paragraphs:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'Content can not be pasted because it is above the allowed limit', + Selected: 'Selected: ', + title: 'Statistikk' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/pl.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/pl.js new file mode 100644 index 00000000000..cc742442a6e --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/pl.js @@ -0,0 +1,14 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'pl', { + WordCount: 'Słów:', + CharCount: 'Znaków:', + CharCountWithHTML: 'Znaków (wraz z kodem HTML):', + Paragraphs: 'Paragrafy:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'Zawartość nie może zostać wklejona, ponieważ przekracza dozwolony limit', + Selected: 'Zaznaczono: ', + title: 'Statystyka' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/pt-br.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/pt-br.js new file mode 100644 index 00000000000..da5b7a596f8 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/pt-br.js @@ -0,0 +1,14 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'pt-br', { + WordCount: 'Contagem de palavras:', + CharCount: 'Contagem de carateres:', + CharCountWithHTML: 'Carateres (incluindo HTML):', + Paragraphs: 'Parágrafos:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'Conteúdo não pode ser colado porque ultrapassa o limite permitido', + Selected: 'Selecionado: ', + title: 'Estatísticas' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/pt.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/pt.js new file mode 100644 index 00000000000..5fd624b22ca --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/pt.js @@ -0,0 +1,10 @@ +CKEDITOR.plugins.setLang('wordcount', 'pt', { + WordCount: 'Palavras:', + CharCount: 'Caracteres:', + CharCountWithHTML: 'Carateres (incluindo HTML):', + Paragraphs: 'Parágrafos:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'O conteúdo não pode ser colado porque ultrapassa o limite permitido', + Selected: 'Selecionado: ', + title: 'Estatísticas' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ro.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ro.js new file mode 100644 index 00000000000..6ce7c05705e --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ro.js @@ -0,0 +1,15 @@ +// Romanian Translation by Bogdanov Mihail + +CKEDITOR.plugins.setLang('wordcount', 'ro', { + WordCount: 'Numar cuvinte', + WordCountRemaining: 'Cuvinte ramase', + CharCount: 'Numar caracter:', + CharCountRemaining: 'Caractere ramase:', + CharCountWithHTML: 'Numar caractere (cu HTML):', + CharCountWithHTMLRemaining: 'Caractere (cu HTML) ramase', + Paragraphs: 'Paragrafe:', + ParagraphsRemaining: 'Paragrafe ramase', + pasteWarning: 'Continutul nu poate fi adaugat deoarece este mai mare decat limita setata', + Selected: 'Selectat:', + title: 'Statistici' +}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ru.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ru.js new file mode 100644 index 00000000000..fd51b9323ac --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/ru.js @@ -0,0 +1,14 @@ +/* +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'ru', { + WordCount: 'Слов:', + CharCount: 'Символов:', + CharCountWithHTML: ' (включая HTML-разметку):', + Paragraphs: 'Параграфов:', + ParagraphsRemaining: 'Параграфов осталось', + pasteWarning: 'Контент не может быть вставлен, т.к. привышает допустимый лимит', + Selected: 'Выделено: ', + title: 'Статистика' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/sk.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/sk.js new file mode 100644 index 00000000000..70eeb3aafa5 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/sk.js @@ -0,0 +1,15 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'sk', { + WordCount: 'Slov:', + CharCount: 'Znakov:', + CharCountWithHTML: 'Znakov (vrátane HTML):', + Paragraphs: 'Odstavcov:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'Obsah sa nedá prilepiť.', + Selected: 'Výber: ', + title: 'Štatistika' +}); + diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/sv.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/sv.js new file mode 100644 index 00000000000..33509171fd3 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/sv.js @@ -0,0 +1,15 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'sv', { + WordCount: 'Ord:', + CharCount: 'Tecken:', + CharCountRemaining: 'tecken återstår', + CharCountWithHTML: 'Tecken (inklusive HTML):', + Paragraphs: 'Paragraf:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'Innehåll kan inte klistras in eftersom det överskrider den tillåtna gränsen', + Selected: 'Valt: ', + title: 'Statistik' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/tr.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/tr.js new file mode 100644 index 00000000000..e916533b301 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/tr.js @@ -0,0 +1,14 @@ +/* +Mesut ÇAKIR +mesut.cakir@hotmail.com.tr +*/ +CKEDITOR.plugins.setLang('wordcount', 'tr', { + WordCount: 'Kelime:', + CharCount: 'Karakter:', + CharCountWithHTML: 'Karakter (HTML dahil):', + Paragraphs: 'Paragraf:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: 'Content can not be pasted because it is above the allowed limit', + Selected: 'Selected: ', + title: 'İstatistik' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/uk.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/uk.js new file mode 100644 index 00000000000..a7d976cba47 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/uk.js @@ -0,0 +1,17 @@ +/* + Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.html or http://ckeditor.com/license + */ +CKEDITOR.plugins.setLang('wordcount', 'uk', { + WordCount: 'Слів:', + WordCountRemaining: 'Слів залишилося', + CharCount: 'Символів:', + CharCountRemaining: 'Символів залишилося', + CharCountWithHTML: 'Символів (включаючи HTML-розмітку):', + CharCountWithHTMLRemaining: 'Символів (включаючи HTML-розмітку) залишилося', + Paragraphs: 'Параграфів:', + ParagraphsRemaining: 'Параграфів залишилося', + pasteWarning: 'Контент не може бути вставлено, оскільки перевищує допустимий ліміт', + Selected: 'Виділено: ', + title: 'Статистика' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/zh-cn.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/zh-cn.js new file mode 100644 index 00000000000..a8b0dd578fb --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/zh-cn.js @@ -0,0 +1,14 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'zh-cn', { + WordCount: '词数:', + CharCount: '字符:', + CharCountWithHTML: '字符 (含HTML)', + Paragraphs: '段落:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: '由于上限允许,内容不能粘贴', + Selected: '已选择: ', + title: '统计' +}); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/zh.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/zh.js new file mode 100644 index 00000000000..ec35ca280d0 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/lang/zh.js @@ -0,0 +1,14 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang('wordcount', 'zh', { + WordCount: '詞數:', + CharCount: '字數:', + CharCountWithHTML: '字數 (含HTML)', + Paragraphs: '段落:', + ParagraphsRemaining: 'Paragraphs remaining', + pasteWarning: '由於字數達到上限,內容不能粘貼', + Selected: '已選擇: ', + title: '統計' +}); \ No newline at end of file diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/plugin.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/plugin.js new file mode 100644 index 00000000000..8f9ca0a6d7f --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wordcount/plugin.js @@ -0,0 +1,596 @@ +/** + * @license Copyright (c) CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.html or http://ckeditor.com/license + */ + +CKEDITOR.plugins.add("wordcount", + { + lang: "ar,bg,ca,cs,da,de,el,en,es,eu,fa,fi,fr,he,hr,hu,it,ko,ja,nl,no,pl,pt,pt-br,ru,sk,sv,tr,uk,zh-cn,zh,ro", // %REMOVE_LINE_CORE% + version: "1.17.5", + requires: 'htmlwriter,notification,undo', + bbcodePluginLoaded: false, + onLoad: function() { + CKEDITOR.document.appendStyleSheet(this.path + "css/wordcount.css"); + }, + init: function(editor) { + var defaultFormat = "", + lastWordCount = -1, + lastCharCount = -1, + lastParagraphs = -1, + limitReachedNotified = false, + limitRestoredNotified = false, + timeoutId = 0, + notification = null; + + + var dispatchEvent = function(type, currentLength, maxLength) { + if (typeof document.dispatchEvent == 'undefined') { + return; + } + + type = 'ckeditor.wordcount.' + type; + + var cEvent; + var eventInitDict = { + bubbles: false, + cancelable: true, + detail: { + currentLength: currentLength, + maxLength: maxLength + } + }; + + try { + cEvent = new CustomEvent(type, eventInitDict); + } catch (o_O) { + cEvent = document.createEvent('CustomEvent'); + cEvent.initCustomEvent( + type, + eventInitDict.bubbles, + eventInitDict.cancelable, + eventInitDict.detail + ); + } + + document.dispatchEvent(cEvent); + }; + + // Default Config + var defaultConfig = { + showRemaining: false, + showParagraphs: false, + showWordCount: true, + showCharCount: false, + countBytesAsChars: false, + countSpacesAsChars: false, + countHTML: false, + countLineBreaks: false, + hardLimit: true, + warnOnLimitOnly: false, + + //MAXLENGTH Properties + maxWordCount: -1, + maxCharCount: -1, + maxParagraphs: -1, + + // Filter + filter: null, + + // How long to show the 'paste' warning + pasteWarningDuration: 0, + + //DisAllowed functions + wordCountGreaterThanMaxLengthEvent: function(currentLength, maxLength) { + dispatchEvent('wordCountGreaterThanMaxLengthEvent', currentLength, maxLength); + }, + charCountGreaterThanMaxLengthEvent: function(currentLength, maxLength) { + dispatchEvent('charCountGreaterThanMaxLengthEvent', currentLength, maxLength); + }, + + //Allowed Functions + wordCountLessThanMaxLengthEvent: function(currentLength, maxLength) { + dispatchEvent('wordCountLessThanMaxLengthEvent', currentLength, maxLength); + }, + charCountLessThanMaxLengthEvent: function(currentLength, maxLength) { + dispatchEvent('charCountLessThanMaxLengthEvent', currentLength, maxLength); + } + }; + + // Get Config & Lang + var config = CKEDITOR.tools.extend(defaultConfig, editor.config.wordcount || {}, true); + + if (config.showParagraphs) { + if (config.maxParagraphs > -1) { + if (config.showRemaining) { + defaultFormat += "%paragraphsCount% " + editor.lang.wordcount.ParagraphsRemaining; + } else { + defaultFormat += editor.lang.wordcount.Paragraphs + " %paragraphsCount%"; + + defaultFormat += "/" + config.maxParagraphs; + } + } else { + defaultFormat += editor.lang.wordcount.Paragraphs + " %paragraphsCount%"; + } + } + + if (config.showParagraphs && (config.showWordCount || config.showCharCount)) { + defaultFormat += ", "; + } + + if (config.showWordCount) { + if (config.maxWordCount > -1) { + if (config.showRemaining) { + defaultFormat += "%wordCount% " + editor.lang.wordcount.WordCountRemaining; + } else { + defaultFormat += editor.lang.wordcount.WordCount + " %wordCount%"; + + defaultFormat += "/" + config.maxWordCount; + } + } else { + defaultFormat += editor.lang.wordcount.WordCount + " %wordCount%"; + } + } + + if (config.showCharCount && config.showWordCount) { + defaultFormat += ", "; + } + + if (config.showCharCount) { + if (config.maxCharCount > -1) { + if (config.showRemaining) { + defaultFormat += "%charCount% " + + editor.lang.wordcount[config.countHTML + ? "CharCountWithHTMLRemaining" + : "CharCountRemaining"]; + } else { + defaultFormat += editor.lang.wordcount[config.countHTML + ? "CharCountWithHTML" + : "CharCount"] + + " %charCount%"; + + defaultFormat += "/" + config.maxCharCount; + } + } else { + defaultFormat += editor.lang.wordcount[config.countHTML ? "CharCountWithHTML" : "CharCount"] + + " %charCount%"; + } + } + + var format = defaultFormat; + + bbcodePluginLoaded = typeof editor.plugins.bbcode != 'undefined'; + + function counterId(editorInstance) { + return "cke_wordcount_" + editorInstance.name; + } + + function counterElement(editorInstance) { + return document.getElementById(counterId(editorInstance)); + } + + function strip(html) { + if (bbcodePluginLoaded) { + // stripping out BBCode tags [...][/...] + return html.replace(/\[.*?\]/gi, ''); + } + + var tmp = document.createElement("div"); + + // Add filter before strip + html = filter(html); + + tmp.innerHTML = html; + + if (tmp.textContent == "" && typeof tmp.innerText == "undefined") { + return ""; + } + + return tmp.textContent || tmp.innerText; + } + + /** + * Implement filter to add or remove before counting + * @param html + * @returns string + */ + function filter(html) { + if (config.filter instanceof CKEDITOR.htmlParser.filter) { + var fragment = CKEDITOR.htmlParser.fragment.fromHtml(html), + writer = new CKEDITOR.htmlParser.basicWriter(); + config.filter.applyTo(fragment); + fragment.writeHtml(writer); + return writer.getHtml(); + } + return html; + } + + function countCharacters(text) { + if (config.countHTML) { + return (filter(text).length); + } + + var normalizedText; + + // strip body tags + if (editor.config.fullPage) { + var i = text.search(new RegExp("", "i")); + if (i != -1) { + var j = text.search(new RegExp("", "i")); + text = text.substring(i + 6, j); + } + + } + + normalizedText = text; + + if (!config.countSpacesAsChars) { + normalizedText = text.replace(/\s/g, "").replace(/ /g, ""); + } + + if (config.countLineBreaks) { + normalizedText = normalizedText.replace(/(\r\n|\n|\r)/gm, " "); + } else { + normalizedText = normalizedText.replace(/(\r\n|\n|\r)/gm, "").replace(/ /gi, " "); + } + + normalizedText = strip(normalizedText).replace(/^([\t\r\n]*)$/, ""); + + return config.countBytesAsChars ? (countBytes(normalizedText)) : (normalizedText.length); + } + + function countBytes(text) { + var count = 0, stringLength = text.length, i; + text = String(text || ""); + for (i = 0; i < stringLength; i++) { + var partCount = encodeURI(text[i]).split("%").length; + count += partCount == 1 ? 1 : partCount - 1; + } + return count; + } + + function countParagraphs(text) { + return (text.replace(/ /g, " ").replace(/(<([^>]+)>)/ig, "").replace(/^\s*$[\n\r]{1,}/gm, "++") + .split("++").length); + } + + function countWords(text) { + var normalizedText = text.replace(/(\r\n|\n|\r)/gm, " ").replace(/^\s+|\s+$/g, "") + .replace(" ", " "); + + normalizedText = strip(normalizedText); + + var words = normalizedText.split(/\s+/); + + for (var wordIndex = words.length - 1; wordIndex >= 0; wordIndex--) { + if (words[wordIndex].match(/^([\s\t\r\n]*)$/)) { + words.splice(wordIndex, 1); + } + } + + return (words.length); + } + + function limitReached(editorInstance, notify) { + limitReachedNotified = true; + limitRestoredNotified = false; + + if (!config.warnOnLimitOnly) { + if (config.hardLimit) { + editorInstance.execCommand('undo'); + } + } + + if (!notify) { + counterElement(editorInstance).className = "cke_path_item cke_wordcountLimitReached"; + editorInstance.fire("limitReached", { firedBy: "wordCount.limitReached" }, editor); + } + } + + function limitRestored(editorInstance) { + limitRestoredNotified = true; + limitReachedNotified = false; + + if (!config.warnOnLimitOnly) { + editorInstance.fire('saveSnapshot'); + } + + counterElement(editorInstance).className = "cke_path_item"; + } + + function updateCounter(editorInstance) { + if (!counterElement(editorInstance)) { + return; + } + + var paragraphs = 0, + wordCount = 0, + charCount = 0, + text; + + // BeforeGetData and getData events are fired when calling + // getData(). We can prevent this by passing true as an + // argument to getData(). This allows us to fire the events + // manually with additional event data: firedBy. This additional + // data helps differentiate calls to getData() made by + // wordCount plugin from calls made by other plugins/code. + editorInstance.fire("beforeGetData", { firedBy: "wordCount.updateCounter" }, editor); + text = editorInstance.getData(true); + editorInstance.fire("getData", { dataValue: text, firedBy: "wordCount.updateCounter" }, editor); + + if (text) { + if (config.showCharCount) { + charCount = countCharacters(text); + } + + if (config.showParagraphs) { + paragraphs = countParagraphs(text); + } + + if (config.showWordCount) { + wordCount = countWords(text); + } + } + + var html = format; + if (config.showRemaining) { + if (config.maxCharCount >= 0) { + html = html.replace("%charCount%", config.maxCharCount - charCount); + } else { + html = html.replace("%charCount%", charCount); + } + + if (config.maxWordCount >= 0) { + html = html.replace("%wordCount%", config.maxWordCount - wordCount); + } else { + html = html.replace("%wordCount%", wordCount); + } + + if (config.maxParagraphs >= 0) { + html = html.replace("%paragraphsCount%", config.maxParagraphs - paragraphs); + } else { + html = html.replace("%paragraphsCount%", paragraphs); + } + } else { + html = html.replace("%wordCount%", wordCount).replace("%charCount%", charCount).replace("%paragraphsCount%", paragraphs); + } + + (editorInstance.config.wordcount || (editorInstance.config.wordcount = {})).wordCount = wordCount; + (editorInstance.config.wordcount || (editorInstance.config.wordcount = {})).charCount = charCount; + + if (CKEDITOR.env.gecko) { + counterElement(editorInstance).innerHTML = html; + } else { + counterElement(editorInstance).innerText = html; + } + + if (charCount == lastCharCount && wordCount == lastWordCount && paragraphs == lastParagraphs) { + if (charCount == config.maxCharCount || wordCount == config.maxWordCount || paragraphs > config.maxParagraphs) { + editorInstance.fire('saveSnapshot'); + } + return true; + } + + //If the limit is already over, allow the deletion of characters/words. Otherwise, + //the user would have to delete at one go the number of offending characters + var deltaWord = wordCount - lastWordCount; + var deltaChar = charCount - lastCharCount; + var deltaParagraphs = paragraphs - lastParagraphs; + + lastWordCount = wordCount; + lastCharCount = charCount; + lastParagraphs = paragraphs; + + if (lastWordCount == -1) { + lastWordCount = wordCount; + } + if (lastCharCount == -1) { + lastCharCount = charCount; + } + if (lastParagraphs == -1) { + lastParagraphs = paragraphs; + } + + // Check for word limit and/or char limit + if ((config.maxWordCount > -1 && wordCount > config.maxWordCount && deltaWord > 0) || + (config.maxCharCount > -1 && charCount > config.maxCharCount && deltaChar > 0) || + (config.maxParagraphs > -1 && paragraphs > config.maxParagraphs && deltaParagraphs > 0)) { + + limitReached(editorInstance, limitReachedNotified); + } else if ((config.maxWordCount == -1 || wordCount <= config.maxWordCount) && + (config.maxCharCount == -1 || charCount <= config.maxCharCount) && + (config.maxParagraphs == -1 || paragraphs <= config.maxParagraphs)) { + + limitRestored(editorInstance); + } else { + editorInstance.fire('saveSnapshot'); + } + + // update instance + editorInstance.wordCount = + { + paragraphs: paragraphs, + wordCount: wordCount, + charCount: charCount + }; + + + // Fire Custom Events + if (config.charCountGreaterThanMaxLengthEvent && config.charCountLessThanMaxLengthEvent) { + if (charCount > config.maxCharCount && config.maxCharCount > -1) { + config.charCountGreaterThanMaxLengthEvent(charCount, config.maxCharCount); + } else { + config.charCountLessThanMaxLengthEvent(charCount, config.maxCharCount); + } + } + + if (config.wordCountGreaterThanMaxLengthEvent && config.wordCountLessThanMaxLengthEvent) { + if (wordCount > config.maxWordCount && config.maxWordCount > -1) { + config.wordCountGreaterThanMaxLengthEvent(wordCount, config.maxWordCount); + + } else { + config.wordCountLessThanMaxLengthEvent(wordCount, config.maxWordCount); + } + } + + return true; + } + + function isCloseToLimits() { + if (config.maxWordCount > -1 && config.maxWordCount - lastWordCount < 5) { + return true; + } + + if (config.maxCharCount > -1 && config.maxCharCount - lastCharCount < 20) { + return true; + } + + if (config.maxParagraphs > -1 && config.maxParagraphs - lastParagraphs < 1) { + return true; + } + + return false; + } + + editor.on("key", + function(event) { + if (editor.mode === "source") { + clearTimeout(timeoutId); + timeoutId = setTimeout( + updateCounter.bind(this, event.editor), + 250 + ); + } + }, + editor, + null, + 100); + + editor.on("change", + function(event) { + var ms = isCloseToLimits() ? 5 : 250; + clearTimeout(timeoutId); + timeoutId = setTimeout( + updateCounter.bind(this, event.editor), + ms + ); + }, + editor, + null, + 100); + + editor.on("uiSpace", + function(event) { + if (editor.elementMode === CKEDITOR.ELEMENT_MODE_INLINE) { + if (event.data.space == "top") { + event.data.html += "
       
      "; + } + } else { + if (event.data.space == "bottom") { + event.data.html += "
       
      "; + } + } + + }, + editor, + null, + 100); + + editor.on("dataReady", + function(event) { + updateCounter(event.editor); + }, + editor, + null, + 100); + + editor.on("paste", + function(event) { + if (!config.warnOnLimitOnly && (config.maxWordCount > 0 || config.maxCharCount > 0 || config.maxParagraphs > 0)) { + + // Check if pasted content is above the limits + var wordCount = -1, + charCount = -1, + paragraphs = -1; + + // BeforeGetData and getData events are fired when calling + // getData(). We can prevent this by passing true as an + // argument to getData(). This allows us to fire the events + // manually with additional event data: firedBy. This additional + // data helps differentiate calls to getData() made by + // wordCount plugin from calls made by other plugins/code. + event.editor.fire("beforeGetData", { firedBy: "wordCount.onPaste" }, event.editor); + var text = event.editor.getData(true); + event.editor.fire("getData", { dataValue: text, firedBy: "wordCount.onPaste" }, event.editor); + + text += event.data.dataValue; + + if (config.showCharCount) { + charCount = countCharacters(text); + } + + if (config.showWordCount) { + wordCount = countWords(text); + } + + if (config.showParagraphs) { + paragraphs = countParagraphs(text); + } + + + // Instantiate the notification when needed and only have one instance + if (notification === null) { + notification = new CKEDITOR.plugins.notification(event.editor, + { + message: event.editor.lang.wordcount.pasteWarning, + type: 'warning', + duration: config.pasteWarningDuration + }); + } + + if (config.maxCharCount > 0 && charCount > config.maxCharCount && config.hardLimit) { + if (!notification.isVisible()) { + notification.show(); + } + event.cancel(); + } + + if (config.maxWordCount > 0 && wordCount > config.maxWordCount && config.hardLimit) { + if (!notification.isVisible()) { + notification.show(); + } + event.cancel(); + } + + if (config.maxParagraphs > 0 && paragraphs > config.maxParagraphs && config.hardLimit) { + if (!notification.isVisible()) { + notification.show(); + } + event.cancel(); + } + } + }, + editor, + null, + 100); + + editor.on("afterPaste", + function(event) { + updateCounter(event.editor); + }, + editor, + null, + 100); + } + }); diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/LICENSE.md b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/LICENSE.md new file mode 100644 index 00000000000..c7d374ad19a --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/LICENSE.md @@ -0,0 +1,28 @@ +Software License Agreement +========================== + +**CKEditor WSC Plugin** +Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved. + +Licensed under the terms of any of the following licenses at your choice: + +* GNU General Public License Version 2 or later (the "GPL"): + http://www.gnu.org/licenses/gpl.html + +* GNU Lesser General Public License Version 2.1 or later (the "LGPL"): + http://www.gnu.org/licenses/lgpl.html + +* Mozilla Public License Version 1.1 or later (the "MPL"): + http://www.mozilla.org/MPL/MPL-1.1.html + +You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice. + +Sources of Intellectual Property Included in this plugin +-------------------------------------------------------- + +Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission. + +Trademarks +---------- + +CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders. diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/README.md b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/README.md new file mode 100644 index 00000000000..46eeafb0921 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/README.md @@ -0,0 +1,25 @@ +CKEditor WebSpellChecker Plugin +=============================== + +This plugin brings Web Spell Checker (WSC) into CKEditor. + +WSC is "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution. + +Installation +------------ + +1. Clone/copy this repository contents in a new "plugins/wsc" folder in your CKEditor installation. +2. Enable the "wsc" plugin in the CKEditor configuration file (config.js): + + config.extraPlugins = 'wsc'; + +That's all. WSC will appear on the editor toolbar and will be ready to use. + +License +------- + +Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). + +See LICENSE.md for more information. + +Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/). diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/dialogs/ciframe.html b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/dialogs/ciframe.html new file mode 100644 index 00000000000..5809fbefe91 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/dialogs/ciframe.html @@ -0,0 +1,66 @@ + + + + + + + + +

      + diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/dialogs/tmpFrameset.html b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/dialogs/tmpFrameset.html new file mode 100644 index 00000000000..d5fc6bba4e6 --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/dialogs/tmpFrameset.html @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/dialogs/wsc.css b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/dialogs/wsc.css new file mode 100644 index 00000000000..1056b45f24b --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/dialogs/wsc.css @@ -0,0 +1,82 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +html, body +{ + background-color: transparent; + margin: 0px; + padding: 0px; +} + +body +{ + padding: 10px; +} + +body, td, input, select, textarea +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; +} + +.midtext +{ + padding:0px; + margin:10px; +} + +.midtext p +{ + padding:0px; + margin:10px; +} + +.Button +{ + border: #737357 1px solid; + color: #3b3b1f; + background-color: #c7c78f; +} + +.PopupTabArea +{ + color: #737357; + background-color: #e3e3c7; +} + +.PopupTitleBorder +{ + border-bottom: #d5d59d 1px solid; +} +.PopupTabEmptyArea +{ + padding-left: 10px; + border-bottom: #d5d59d 1px solid; +} + +.PopupTab, .PopupTabSelected +{ + border-right: #d5d59d 1px solid; + border-top: #d5d59d 1px solid; + border-left: #d5d59d 1px solid; + padding: 3px 5px 3px 5px; + color: #737357; +} + +.PopupTab +{ + margin-top: 1px; + border-bottom: #d5d59d 1px solid; + cursor: pointer; +} + +.PopupTabSelected +{ + font-weight: bold; + cursor: default; + padding-top: 4px; + border-bottom: #f1f1e3 1px solid; + background-color: #f1f1e3; +} diff --git a/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/dialogs/wsc.js b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/dialogs/wsc.js new file mode 100644 index 00000000000..0a4fc74a3db --- /dev/null +++ b/DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/js/ckeditor/4.5.3/plugins/wsc/dialogs/wsc.js @@ -0,0 +1,92 @@ +/* + Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +(function(){function v(a){return a&&a.domId&&a.getInputElement().$?a.getInputElement():a&&a.$?a:!1}function E(a){if(!a)throw"Languages-by-groups list are required for construct selectbox";var c=[],d="",e;for(e in a)for(var f in a[e]){var g=a[e][f];"en_US"==g?d=g:c.push(g)}c.sort();d&&c.unshift(d);return{getCurrentLangGroup:function(c){a:{for(var d in a)for(var e in a[d])if(e.toUpperCase()===c.toUpperCase()){c=d;break a}c=""}return c},setLangList:function(){var c={},d;for(d in a)for(var e in a[d])c[a[d][e]]= +e;return c}()}}var h=function(){var a=function(a,b,e){var e=e||{},f=e.expires;if("number"==typeof f&&f){var g=new Date;g.setTime(g.getTime()+1E3*f);f=e.expires=g}f&&f.toUTCString&&(e.expires=f.toUTCString());var b=encodeURIComponent(b),a=a+"="+b,i;for(i in e)b=e[i],a+="; "+i,!0!==b&&(a+="="+b);document.cookie=a};return{postMessage:{init:function(a){window.addEventListener?window.addEventListener("message",a,!1):window.attachEvent("onmessage",a)},send:function(a){var b=Object.prototype.toString,e= +a.fn||null,f=a.id||"",g=a.target||window,i=a.message||{id:f};a.message&&"[object Object]"==b.call(a.message)&&(a.message.id||(a.message.id=f),i=a.message);a=window.JSON.stringify(i,e);g.postMessage(a,"/")},unbindHandler:function(a){window.removeEventListener?window.removeEventListener("message",a,!1):window.detachEvent("onmessage",a)}},hash:{create:function(){},parse:function(){}},cookie:{set:a,get:function(a){return(a=document.cookie.match(RegExp("(?:^|; )"+a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, +"\\$1")+"=([^;]*)")))?decodeURIComponent(a[1]):void 0},remove:function(c){a(c,"",{expires:-1})}},misc:{findFocusable:function(a){var b=null;a&&(b=a.find("a[href], area[href], input, select, textarea, button, *[tabindex], *[contenteditable]"));return b},isVisible:function(a){return!(0===a.offsetWidth||0==a.offsetHeight||"none"===(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null).display:a.currentStyle?a.currentStyle.display:a.style.display))}, +hasClass:function(a,b){return!(!a.className||!a.className.match(RegExp("(\\s|^)"+b+"(\\s|$)")))}}}}(),a=a||{};a.TextAreaNumber=null;a.load=!0;a.cmd={SpellTab:"spell",Thesaurus:"thes",GrammTab:"grammar"};a.dialog=null;a.optionNode=null;a.selectNode=null;a.grammerSuggest=null;a.textNode={};a.iframeMain=null;a.dataTemp="";a.div_overlay=null;a.textNodeInfo={};a.selectNode={};a.selectNodeResponce={};a.langList=null;a.langSelectbox=null;a.banner="";a.show_grammar=null;a.div_overlay_no_check=null;a.targetFromFrame= +{};a.onLoadOverlay=null;a.LocalizationComing={};a.OverlayPlace=null;a.sessionid="";a.LocalizationButton={ChangeTo_button:{instance:null,text:"Change to",localizationID:"ChangeTo"},ChangeAll:{instance:null,text:"Change All"},IgnoreWord:{instance:null,text:"Ignore word"},IgnoreAllWords:{instance:null,text:"Ignore all words"},Options:{instance:null,text:"Options",optionsDialog:{instance:null}},AddWord:{instance:null,text:"Add word"},FinishChecking_button:{instance:null,text:"Finish Checking",localizationID:"FinishChecking"}, +FinishChecking_button_block:{instance:null,text:"Finish Checking",localizationID:"FinishChecking"}};a.LocalizationLabel={ChangeTo_label:{instance:null,text:"Change to",localizationID:"ChangeTo"},Suggestions:{instance:null,text:"Suggestions"},Categories:{instance:null,text:"Categories"},Synonyms:{instance:null,text:"Synonyms"}};var F=function(b){var c,d,e;for(e in b)c=(c=a.dialog.getContentElement(a.dialog._.currentTabId,e))?c.getElement():b[e].instance.getElement().getFirst()||b[e].instance.getElement(), +d=b[e].localizationID||e,c.setText(a.LocalizationComing[d])},G=function(b){var c,d,e;for(e in b)if(c=a.dialog.getContentElement(a.dialog._.currentTabId,e),c||(c=b[e].instance),c.setLabel)d=b[e].localizationID||e,c.setLabel(a.LocalizationComing[d]+":")},n,w;a.framesetHtml=function(b){return"'};a.setIframe=function(b,c){var d; +d=a.framesetHtml(c);var e=a.iframeNumber+"_"+c;b.getElement().setHtml(d);d=document.getElementById(e);d=d.contentWindow?d.contentWindow:d.contentDocument.document?d.contentDocument.document:d.contentDocument;d.document.open();d.document.write('iframe