diff --git a/.editorconfig b/.editorconfig index e99299d69937..208052cbb7ad 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,7 +3,7 @@ root=true [*] end_of_line = lf indent_style = space -indent_size = 2 +indent_size = 4 trim_trailing_whitespace = true [*.{cs,cshtml,csx,vb,vbx,vbhtml,fs,fsx,txt,ps1,sql}] diff --git a/.gitignore b/.gitignore index 18239100adac..808b964260ef 100644 --- a/.gitignore +++ b/.gitignore @@ -46,13 +46,7 @@ src/Umbraco.Web.UI/Web.*.config.transformed umbraco/presentation/umbraco/plugins/uComponents/uComponentsInstaller.ascx umbraco/presentation/packages/uComponents/MultiNodePicker/CustomTreeService.asmx -_BuildOutput/* *.ncrunchsolution -build/UmbracoCms.AllBinaries*zip -build/UmbracoCms.WebPI*zip -build/UmbracoCms*zip -build/UmbracoExamine.PDF*zip -build/*.nupkg src/Umbraco.Tests/config/applications.config src/Umbraco.Tests/config/trees.config src/Umbraco.Web.UI/web.config @@ -68,9 +62,9 @@ src/packages/repositories.config src/Umbraco.Web.UI/[Ww]eb.config *.transformed -webpihash.txt node_modules +lib-bower src/Umbraco.Web.UI/[Uu]mbraco/[Ll]ib/* src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/umbraco.* @@ -95,7 +89,6 @@ src/Umbraco.Web.UI/[Uu]mbraco/[Aa]ssets/* src/Umbraco.Web.UI.Client/[Bb]uild/* src/Umbraco.Web.UI.Client/[Bb]uild/[Bb]elle/ src/Umbraco.Web.UI/[Uu]ser[Cc]ontrols/ -build/_BuildOutput/ src/Umbraco.Web.UI.Client/src/[Ll]ess/*.css tools/NDepend/ @@ -130,7 +123,6 @@ src/*.boltdata/ /src/Umbraco.Web.UI/Umbraco/Js/canvasdesigner.config.js /src/Umbraco.Web.UI/Umbraco/Js/canvasdesigner.front.js src/umbraco.sln.ide/* -build/UmbracoCms.*/ src/.vs/ src/Umbraco.Web.UI/umbraco/js/install.loader.js src/Umbraco.Tests/media @@ -140,8 +132,11 @@ apidocs/api/* build/docs.zip build/ui-docs.zip build/csharp-docs.zip -build/msbuild.log .vs/ src/packages/ -build/tools/ src/PrecompiledWeb/* + + +build.out/ +build.tmp/ +build/Modules/*/temp/ \ No newline at end of file diff --git a/BUILD.md b/BUILD.md new file mode 100644 index 000000000000..bc8ab500b1c6 --- /dev/null +++ b/BUILD.md @@ -0,0 +1,149 @@ +Umbraco Cms Build +-- +---- + +# Quick! + +To build Umbraco, fire PowerShell and move to Umbraco's repository root (the directory that contains `src`, `build`, `README.md`...). There, trigger the build with the following command: + + build\build.ps1 + +By default, this builds the current version. It is possible to specify a different version as a parameter to the build script: + + build\build.ps1 7.6.44 + +Valid version strings are defined in the `Set-UmbracoVersion` documentation below. + +## Notes + +Git might have issues dealing with long file paths during build. You may want/need to enable `core.longpaths` support (see [this page](https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path) for details). + +# Build + +The Umbraco Build solution relies on a PowerShell module. The module needs to be imported into PowerShell. From within Umbraco's repository root: + + build\build.ps1 -ModuleOnly + +Or the abbreviated form: + + build\build.ps1 -mo + +Once the module has been imported, a set of commands are added to PowerShell. + +## Get-UmbracoBuildEnv + +Gets the Umbraco build environment ie NuGet, Semver, Visual Studio, etc. Downloads things that can be downloaded such as NuGet. Examples: + + $uenv = Get-UmbracoBuildEnv + Write-Host $uenv.SolutionRoot + &$uenv.NuGet help + +The object exposes the following properties: + +* `SolutionRoot`: the absolute path to the solution root +* `VisualStudio`: a Visual Studio object (see below) +* `NuGet`: the absolute path to the NuGet executable +* `Zip`: the absolute path to the 7Zip executable +* `VsWhere`: the absolute path to the VsWhere executable +* `NodePath`: the absolute path to the Node install +* `NpmPath`: the absolute path to the Npm install + +The Visual Studio object is `null` when Visual Studio has not been detected (eg on VSTS). When not null, the object exposes the following properties: + +* `Path`: Visual Studio installation path (eg some place under `Program Files`) +* `Major`: Visual Studio major version (eg `15` for VS 2017) +* `Minor`: Visual Studio minor version +* `MsBUild`: the absolute path to the MsBuild executable + +## Get-UmbracoVersion + +Gets an object representing the current Umbraco version. Example: + + $v = Get-UmbracoVersion + Write-Host $v.Semver + +The object exposes the following properties: + +* `Semver`: the semver object representing the version +* `Release`: the main part of the version (eg `7.6.33`) +* `Comment`: the pre release part of the version (eg `alpha02`) +* `Build`: the build number part of the version (eg `1234`) + +## Set-UmbracoVersion + +Modifies Umbraco files with the new version. + +>This entirely replaces the legacy `UmbracoVersion.txt` file. + +The version must be a valid semver version. It can include a *pre release* part (eg `alpha02`) and/or a *build number* (eg `1234`). Examples: + + Set-UmbracoVersion 7.6.33 + Set-UmbracoVersion 7.6.33-alpha02 + Set-UmbracoVersion 7.6.33+1234 + Set-UmbracoVersion 7.6.33-beta05+5678 + +Note that `Set-UmbracoVersion` enforces a slightly more restrictive naming scheme than what semver would tolerate. The pre release part can only be composed of a-z and 0-9, therefore `alpha033` is considered valid but not `alpha.033` nor `alpha033-preview` nor `RC2` (would need to be lowercased `rc2`). + +>It is considered best to add trailing zeroes to pre releases, else NuGet gets the order of versions wrong. So if you plan to have more than 10, but no more that 100 alpha versions, number the versions `alpha00`, `alpha01`, etc. + +## Build-Umbraco + +Builds Umbraco. Temporary files are generated in `build.tmp` while the actual artifacts (zip files, NuGet packages...) are produced in `build.out`. Example: + + Build-Umbraco + +Some log files, such as MsBuild logs, are produced in `build.tmp` too. The `build` directory should remain clean during a build. + +### web.config + +Building Umbraco requires a clean `web.config` file in the `Umbraco.Web.UI` project. If a `web.config` file already exists, the `pre-build` task (see below) will save it as `web.config.temp-build` and replace it with a clean copy of `web.Template.config`. The original file is replaced once it is safe to do so, by the `pre-packages` task. + +## Build-UmbracoDocs + +Builds umbraco documentation. Temporary files are generated in `build.tmp` while the actual artifacts (docs...) are produced in `build.out`. Example: + + Build-UmbracoDocs + +Some log files, such as MsBuild logs, are produced in `build.tmp` too. The `build` directory should remain clean during a build. + +## Verify-NuGet + +Verifies that projects all require the same version of their dependencies, and that NuSpec files require versions that are consistent with projects. Example: + + Verify-NuGet + +# VSTS + +Continuous integration, nightly builds and release builds run on VSTS. + +VSTS uses the `Build-Umbraco` command several times, each time passing a different *target* parameter. The supported targets are: + +* `pre-build`: prepares the build +* `compile-belle`: compiles Belle +* `compile-umbraco`: compiles Umbraco +* `pre-tests`: prepares the tests +* `compile-tests`: compiles the tests +* `pre-packages`: prepares the packages +* `pkg-zip`: creates the zip files +* `pre-nuget`: prepares NuGet packages +* `pkg-nuget`: creates NuGet packages + +All these targets are executed when `Build-Umbraco` is invoked without a parameter (or with the `all` parameter). On VSTS, compilations (of Umbraco and tests) are performed by dedicated VSTS tasks. Similarly, creating the NuGet packages is also performed by dedicated VSTS tasks. + +Finally, the produced artifacts are published in two containers that can be downloaded from VSTS: `zips` contains the zip files while `nuget` contains the NuGet packages. + +>During a VSTS build, some environment `UMBRACO_*` variables are exported by the `pre-build` target and can be reused in other targets *and* in VSTS tasks. The `UMBRACO_TMP` environment variable is used in `Umbraco.Tests` to disable some tests that have issues with VSTS at the moment. + +# Notes + +*This part needs to be cleaned up* + +Nightlies should use some sort of build number. + +We should increment versions as soon as a version is released. Ie, as soon as `7.6.33` is released, we should `Set-UmbracoVersion 7.6.34-alpha` and push. + +NuGet / NuSpec consistency checks are performed in tests. We should move it so it is done as part of the PowerShell script even before we try to compile and run the tests. + +There are still a few commands in `build` (to build docs, install Git or cleanup the install) that will need to be migrated to PowerShell. + +/eof \ No newline at end of file diff --git a/README.md b/README.md index a9559c185027..ceed6967b8e7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build status](https://ci.appveyor.com/api/projects/status/ikpgqxiw9v8opltv/branch/dev-v7?svg=true)](https://ci.appveyor.com/project/Umbraco/umbraco-cms-hs8dx/branch/dev-v7) +[![Build status](https://ci.appveyor.com/api/projects/status/6by6harxtxt0ocdx/branch/dev-v7?svg=true)](https://ci.appveyor.com/project/Umbraco/umbraco-cms-b2cri/branch/dev-v7) Umbraco CMS =========== @@ -12,9 +12,7 @@ Umbraco is a free open source Content Management System built on the ASP.NET pla ## Building Umbraco from source ## -The easiest way to get started is to run `build/build.bat` which will build both the backoffice (also known as "Belle") and the Umbraco core. You can then easily start debugging from Visual Studio, or if you need to debug Belle you can run `grunt vs` in `src\Umbraco.Web.UI.Client`. - -If you're interested in making changes to Belle without running Visual Studio make sure to read the [Belle ReadMe file](src/Umbraco.Web.UI.Client/README.md). +The easiest way to get started is to run `build/build.bat` which will build both the backoffice (also known as "Belle") and the Umbraco core. You can then easily start debugging from Visual Studio, or if you need to debug Belle you can run `gulp dev` in `src\Umbraco.Web.UI.Client`. Note that you can always [download a nightly build](http://nightly.umbraco.org/?container=umbraco-750) so you don't have to build the code yourself. diff --git a/appveyor.yml b/appveyor.yml index dc6e22edbf0b..4c9a33fd2310 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,9 @@ version: '{build}' shallow_clone: true + +init: + - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + build_script: - cmd: >- SET SLN=%CD% diff --git a/build.bat b/build.bat new file mode 100644 index 000000000000..da9c4e137dd7 --- /dev/null +++ b/build.bat @@ -0,0 +1,15 @@ +@ECHO OFF +powershell .\build\build.ps1 + +IF ERRORLEVEL 1 ( + GOTO :error +) ELSE ( + GOTO :EOF +) + +:error +ECHO. +ECHO Can not run build\build.ps1. +ECHO If this is due to a SecurityError then make sure to run the following command from an administrator command prompt: +ECHO. +ECHO powershell Set-ExecutionPolicy -ExecutionPolicy RemoteSigned \ No newline at end of file diff --git a/build/Build.bat b/build/Build.bat deleted file mode 100644 index f26c4877cd2a..000000000000 --- a/build/Build.bat +++ /dev/null @@ -1,217 +0,0 @@ -@ECHO OFF - -:: UMBRACO BUILD FILE - - -:: ensure we have UmbracoVersion.txt -IF NOT EXIST UmbracoVersion.txt ( - ECHO UmbracoVersion.txt is missing! - GOTO error -) - -REM Get the version and comment from UmbracoVersion.txt lines 2 and 3 -SET RELEASE= -SET COMMENT= -FOR /F "skip=1 delims=" %%i IN (UmbracoVersion.txt) DO IF NOT DEFINED RELEASE SET RELEASE=%%i -FOR /F "skip=2 delims=" %%i IN (UmbracoVersion.txt) DO IF NOT DEFINED COMMENT SET COMMENT=%%i - -REM process args - -SET INTEGRATION=0 -SET nuGetFolder=%CD%\..\src\packages -SET SKIPNUGET=0 - -:processArgs - -:: grab the first parameter as a whole eg "/action:start" -:: end if no more parameter -SET SWITCHPARSE=%1 -IF [%SWITCHPARSE%] == [] goto endProcessArgs - -:: get switch and value -SET SWITCH= -SET VALUE= -FOR /F "tokens=1,* delims=: " %%a IN ("%SWITCHPARSE%") DO SET SWITCH=%%a& SET VALUE=%%b - -:: route arg -IF '%SWITCH%'=='/release' GOTO argRelease -IF '%SWITCH%'=='-release' GOTO argRelease -IF '%SWITCH%'=='/comment' GOTO argComment -IF '%SWITCH%'=='-comment' GOTO argComment -IF '%SWITCH%'=='/integration' GOTO argIntegration -IF '%SWITCH%'=='-integration' GOTO argIntegration -IF '%SWITCH%'=='/nugetfolder' GOTO argNugetFolder -IF '%SWITCH%'=='-nugetfolder' GOTO argNugetFolder -IF '%SWITCH%'=='/skipnuget' GOTO argSkipNuget -IF '%SWITCH%'=='-skipnuget' GOTO argSkipNuget -ECHO "Invalid switch %SWITCH%" -GOTO error - -:: handle each arg - -:argRelease -set RELEASE=%VALUE% -SHIFT -goto processArgs - -:argComment -SET COMMENT=%VALUE% -SHIFT -GOTO processArgs - -:argIntegration -SET INTEGRATION=1 -SHIFT -GOTO processArgs - -:argNugetFolder -SET nuGetFolder=%VALUE% -SHIFT -GOTO processArgs - -:argSkipNuget -SET SKIPNUGET=1 -SHIFT -GOTO processArgs - -:endProcessArgs - -REM run - -SET VERSION=%RELEASE% -IF [%COMMENT%] EQU [] (SET VERSION=%RELEASE%) ELSE (SET VERSION=%RELEASE%-%COMMENT%) - -ECHO ################################################################ -ECHO Building Umbraco %VERSION% -ECHO ################################################################ - -SET MSBUILDPATH=C:\Program Files (x86)\MSBuild\14.0\Bin -SET MSBUILD="%MSBUILDPATH%\MsBuild.exe" -SET PATH="%MSBUILDPATH%";%PATH% - -ReplaceIISExpressPortNumber.exe ..\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj %RELEASE% - -ECHO. -ECHO Removing the belle build folder and bower_components folder to make sure everything is clean as a whistle -RD ..\src\Umbraco.Web.UI.Client\build /Q /S -RD ..\src\Umbraco.Web.UI.Client\bower_components /Q /S - -ECHO. -ECHO Removing existing built files to make sure everything is clean as a whistle -RMDIR /Q /S _BuildOutput -DEL /F /Q UmbracoCms.*.zip 2>NUL -DEL /F /Q UmbracoExamine.*.zip 2>NUL -DEL /F /Q UmbracoCms.*.nupkg 2>NUL -DEL /F /Q webpihash.txt 2>NUL - -ECHO. -ECHO Making sure Git is in the path so that the build can succeed -CALL InstallGit.cmd - -REM Adding the default Git path so that if it's installed it can actually be found -REM This is necessary because SETLOCAL is on in InstallGit.cmd so that one might find Git, -REM but the path setting is lost due to SETLOCAL -SET PATH="C:\Program Files (x86)\Git\cmd";"C:\Program Files\Git\cmd";%PATH% - -SET toolsFolder=%CD%\tools\ -IF NOT EXIST "%toolsFolder%" ( - MD tools -) - -SET nuGetExecutable=%CD%\tools\nuget.exe -IF NOT EXIST "%nuGetExecutable%" ( - ECHO Getting NuGet so we can fetch some tools - ECHO Downloading https://dist.nuget.org/win-x86-commandline/latest/nuget.exe to %nuGetExecutable% - powershell -Command "(New-Object Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', '%nuGetExecutable%')" -) - -:: We need 7za.exe for BuildBelle.bat -IF NOT EXIST "%toolsFolder%7za.exe" ( - ECHO 7zip not found - fetching now - "%nuGetExecutable%" install 7-Zip.CommandLine -OutputDirectory tools -Verbosity quiet -) - -:: We need vswhere.exe for VS2017+ -IF NOT EXIST "%toolsFolder%vswhere.exe" ( - ECHO vswhere not found - fetching now - "%nuGetExecutable%" install vswhere -OutputDirectory tools -Verbosity quiet -) - -:: Put 7za.exe and vswhere.exe in a predictable path (not version specific) -FOR /f "delims=" %%A in ('dir "%toolsFolder%7-Zip.CommandLine.*" /b') DO SET "sevenZipExePath=%toolsFolder%%%A\" -MOVE "%sevenZipExePath%tools\7za.exe" "%toolsFolder%7za.exe" - -FOR /f "delims=" %%A in ('dir "%toolsFolder%vswhere.*" /b') DO SET "vswhereExePath=%toolsFolder%%%A\" -MOVE "%vswhereExePath%tools\vswhere.exe" "%toolsFolder%vswhere.exe" - -ECHO. -ECHO Making sure we have a web.config -IF NOT EXIST "%CD%\..\src\Umbraco.Web.UI\web.config" COPY "%CD%\..\src\Umbraco.Web.UI\web.Template.config" "%CD%\..\src\Umbraco.Web.UI\web.config" - -for /f "usebackq tokens=1* delims=: " %%i in (`"%CD%\tools\vswhere.exe" -latest -requires Microsoft.Component.MSBuild`) do ( - if /i "%%i"=="installationPath" set InstallDir=%%j -) - -SET VSWherePath="%InstallDir%\MSBuild" - -ECHO. -ECHO Visual Studio is installed in: %InstallDir% - -SET MSBUILDPATH=C:\Program Files (x86)\MSBuild\14.0\Bin -SET MSBUILD="%MSBUILDPATH%\MsBuild.exe" - -ECHO. -ECHO Reporting NuGet version -"%nuGetExecutable%" help | findstr "^NuGet Version:" - -ECHO. -ECHO Restoring NuGet packages -ECHO Into %nuGetFolder% -"%nuGetExecutable%" restore "%CD%\..\src\umbraco.sln" -Verbosity Quiet -NonInteractive -PackagesDirectory "%nuGetFolder%" -IF ERRORLEVEL 1 GOTO :error - -ECHO. -ECHO. -ECHO Performing MSBuild and producing Umbraco binaries zip files -ECHO This takes a few minutes and logging is set to report warnings -ECHO and errors only so it might seems like nothing is happening for a while. -ECHO You can check the msbuild.log file for progress. -ECHO. -%MSBUILD% "Build.proj" /p:BUILD_RELEASE=%RELEASE% /p:BUILD_COMMENT=%COMMENT% /p:NugetPackagesDirectory="%nuGetFolder%" /p:VSWherePath=%VSWherePath% /consoleloggerparameters:Summary;ErrorsOnly /fileLogger -IF ERRORLEVEL 1 GOTO error - -ECHO. -ECHO Setting node_modules folder to hidden to prevent VS13 from crashing on it while loading the websites project -attrib +h ..\src\Umbraco.Web.UI.Client\node_modules - -IF %SKIPNUGET% EQU 1 GOTO success - -ECHO. -ECHO Adding Web.config transform files to the NuGet package -REN .\_BuildOutput\WebApp\Views\Web.config Web.config.transform -REN .\_BuildOutput\WebApp\Xslt\Web.config Web.config.transform - -ECHO. -ECHO Packing the NuGet release files -..\src\.nuget\NuGet.exe Pack NuSpecs\UmbracoCms.Core.nuspec -Version %VERSION% -Symbols -Verbosity quiet -..\src\.nuget\NuGet.exe Pack NuSpecs\UmbracoCms.nuspec -Version %VERSION% -Verbosity quiet -IF ERRORLEVEL 1 GOTO error - -:success -ECHO. -ECHO No errors were detected! -ECHO There may still be some in the output, which you would need to investigate. -ECHO Warnings are usually normal. -ECHO. -ECHO. -GOTO :EOF - -:error - -ECHO. -ECHO Errors were detected! -ECHO. - -REM don't pause if continuous integration else the build server waits forever -REM before cancelling the build (and, there is noone to read the output anyways) -IF %INTEGRATION% NEQ 1 PAUSE diff --git a/build/Build.proj b/build/Build.proj deleted file mode 100644 index 1f57ca591551..000000000000 --- a/build/Build.proj +++ /dev/null @@ -1,345 +0,0 @@ - - - - - - ..\MSBuildCommunityTasks - ..\UmbracoMSBuildTasks - - - - - - - - - - - - - - - - b.ToString("x2")))); - } - } - } - } - } - ]]> - - - - - - - - - - .$(BUILD_NUMBER) - - - .$(BUILD_RELEASE) - - - .$(BUILD_RELEASE)-$(BUILD_COMMENT) - - - .$(BUILD_RELEASE)-$(BUILD_NIGHTLY) - - - .$(BUILD_RELEASE)-$(BUILD_COMMENT)-$(BUILD_NIGHTLY) - - - - Release - _BuildOutput\ - UmbracoCms$(DECIMAL_BUILD_NUMBER).zip - UmbracoCms.AllBinaries$(DECIMAL_BUILD_NUMBER).zip - UmbracoCms.WebPI$(DECIMAL_BUILD_NUMBER).zip - False - ..\..\build\$(BuildFolder) - $(MSBuildProjectDirectory)\$(BuildFolder) - $(BuildFolder)bin\ - $(BuildFolder)WebApp\ - $(BuildFolder)WebPi\ - $(BuildFolder)Configs\ - $(BuildFolderRelativeToProjects)bin\ - $(BuildFolderAbsolutePath)bin\ - $(BuildFolderRelativeToProjects)WebApp\ - $(BuildFolderAbsolutePath)WebApp\ - $(BuildFolderRelativeToProjects)WebPi\ - $(BuildFolderAbsolutePath)WebPi\ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(BUILD_RELEASE) - $(BUILD_RELEASE)-$(BUILD_COMMENT) - $(BUILD_RELEASE)-$(BUILD_NIGHTLY) - $(BUILD_RELEASE)-$(BUILD_COMMENT)-$(BUILD_NIGHTLY) - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/BuildBelle.bat b/build/BuildBelle.bat deleted file mode 100644 index 78b7736c2b70..000000000000 --- a/build/BuildBelle.bat +++ /dev/null @@ -1,59 +0,0 @@ -@ECHO OFF -SETLOCAL - :: SETLOCAL is on, so changes to the path not persist to the actual user's path - -SET toolsFolder=%CD%\tools\ -ECHO Current folder: %CD% - -SET nodeFileName=node-v6.9.1-win-x86.7z -SET nodeExtractFolder=%toolsFolder%node.js.691 - -IF NOT EXIST "%nodeExtractFolder%" ( - ECHO Downloading http://nodejs.org/dist/v6.9.1/%nodeFileName% to %toolsFolder%%nodeFileName% - powershell -Command "(New-Object Net.WebClient).DownloadFile('http://nodejs.org/dist/v6.9.1/%nodeFileName%', '%toolsFolder%%nodeFileName%')" - ECHO Extracting %nodeFileName% to %nodeExtractFolder% - "%toolsFolder%\7za.exe" x "%toolsFolder%\%nodeFileName%" -o"%nodeExtractFolder%" -aos > nul -) -FOR /f "delims=" %%A in ('dir "%nodeExtractFolder%\node*" /b') DO SET "nodePath=%nodeExtractFolder%\%%A" - - -SET nuGetExecutable=%CD%\tools\nuget.exe -IF NOT EXIST "%nuGetExecutable%" ( - ECHO Downloading https://dist.nuget.org/win-x86-commandline/latest/nuget.exe to %nuGetExecutable% - powershell -Command "(New-Object Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', '%nuGetExecutable%')" -) - -SET drive=%CD:~0,2% -SET nuGetFolder=%drive%\packages\ -FOR /f "delims=" %%A in ('dir "%nuGetFolder%npm.*" /b') DO SET "npmPath=%nuGetFolder%%%A\" - -IF [%npmPath%] == [] GOTO :installnpm -IF NOT [%npmPath%] == [] GOTO :build - -:installnpm - ECHO Downloading npm - ECHO Configured packages folder: %nuGetFolder% - ECHO Installing Npm NuGet Package - "%nuGetExecutable%" install Npm -OutputDirectory %nuGetFolder% -Verbosity detailed - REM Ensures that we look for the just downloaded NPM, not whatever the user has installed on their machine - FOR /f "delims=" %%A in ('dir %nuGetFolder%npm.* /b') DO SET "npmPath=%nuGetFolder%%%A\" - GOTO :build - -:build - ECHO Adding Npm and Node to path - REM SETLOCAL is on, so changes to the path not persist to the actual user's path - PATH="%npmPath%";"%nodePath%";%PATH% - SET buildFolder=%CD% - - ECHO Change directory to %CD%\..\src\Umbraco.Web.UI.Client\ - CD %CD%\..\src\Umbraco.Web.UI.Client\ - - ECHO Do npm install and the grunt build of Belle - call npm cache clean --quiet - call npm install --quiet - call npm install -g grunt-cli --quiet - call npm install -g bower --quiet - call grunt build --buildversion=%release% - - ECHO Move back to the build folder - CD "%buildFolder%" \ No newline at end of file diff --git a/build/BuildDocs.bat b/build/BuildDocs.bat deleted file mode 100644 index 9d0a04e1cd29..000000000000 --- a/build/BuildDocs.bat +++ /dev/null @@ -1,20 +0,0 @@ -@ECHO OFF -SETLOCAL - -SET release=%1 -ECHO Installing Npm NuGet Package - -SET nuGetFolder=%CD%\..\src\packages\ -ECHO Configured packages folder: %nuGetFolder% -ECHO Current folder: %CD% - -%CD%\..\src\.nuget\NuGet.exe install Npm.js -OutputDirectory %nuGetFolder% -Verbosity quiet - -for /f "delims=" %%A in ('dir %nuGetFolder%node.js.* /b') do set "nodePath=%nuGetFolder%%%A\" -for /f "delims=" %%A in ('dir %nuGetFolder%npm.js.* /b') do set "npmPath=%nuGetFolder%%%A\tools\" - -ECHO Adding Npm and Node to path -REM SETLOCAL is on, so changes to the path not persist to the actual user's path -PATH=%npmPath%;%nodePath%;%PATH% - -Powershell.exe -ExecutionPolicy Unrestricted -File .\BuildDocs.ps1 \ No newline at end of file diff --git a/build/BuildDocs.ps1 b/build/BuildDocs.ps1 deleted file mode 100644 index 7b13f98ca449..000000000000 --- a/build/BuildDocs.ps1 +++ /dev/null @@ -1,114 +0,0 @@ -$PSScriptFilePath = (Get-Item $MyInvocation.MyCommand.Path); -$RepoRoot = (get-item $PSScriptFilePath).Directory.Parent.FullName; -$SolutionRoot = Join-Path -Path $RepoRoot "src"; -$ToolsRoot = Join-Path -Path $RepoRoot "tools"; -$DocFx = Join-Path -Path $ToolsRoot "docfx\docfx.exe" -$DocFxFolder = (Join-Path -Path $ToolsRoot "docfx") -$DocFxJson = Join-Path -Path $RepoRoot "apidocs\docfx.json" -$7Zip = Join-Path -Path $ToolsRoot "7zip\7za.exe" -$DocFxSiteOutput = Join-Path -Path $RepoRoot "apidocs\_site\*.*" -$NgDocsSiteOutput = Join-Path -Path $RepoRoot "src\Umbraco.Web.UI.Client\docs\api\*.*" -$ProgFiles86 = [Environment]::GetEnvironmentVariable("ProgramFiles(x86)"); -$MSBuild = "$ProgFiles86\MSBuild\14.0\Bin\MSBuild.exe" - - -################ Do the UI docs - -"Changing to Umbraco.Web.UI.Client folder" -cd .. -cd src\Umbraco.Web.UI.Client -Write-Host $(Get-Location) - -"Creating build folder so MSBuild doesn't run the whole grunt build" -if (-Not (Test-Path "build")) { - md "build" -} - -"Installing node" -# Check if Install-Product exists, should only exist on the build server -if (Get-Command Install-Product -errorAction SilentlyContinue) -{ - Install-Product node '' -} - -"Installing node modules" -& npm install - -"Installing grunt" -& npm install -g grunt-cli - -"Moving back to build folder" -cd .. -cd .. -cd build -Write-Host $(Get-Location) - - & grunt --gruntfile ../src/umbraco.web.ui.client/gruntfile.js docs - -# change baseUrl -$BaseUrl = "https://our.umbraco.org/apidocs/ui/" -$IndexPath = "../src/umbraco.web.ui.client/docs/api/index.html" -(Get-Content $IndexPath).replace('location.href.replace(rUrl, indexFile)', "`'" + $BaseUrl + "`'") | Set-Content $IndexPath -# zip it - -& $7Zip a -tzip ui-docs.zip $NgDocsSiteOutput -r - -################ Do the c# docs - -# Build the solution in debug mode -$SolutionPath = Join-Path -Path $SolutionRoot -ChildPath "umbraco.sln" - -# Go get nuget.exe if we don't hae it -$NuGet = "$ToolsRoot\nuget.exe" -$FileExists = Test-Path $NuGet -If ($FileExists -eq $False) { - Write-Host "Retrieving nuget.exe..." - $SourceNugetExe = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" - Invoke-WebRequest $SourceNugetExe -OutFile $NuGet -} - -#restore nuget packages -Write-Host "Restoring nuget packages..." -& $NuGet restore $SolutionPath - -& $MSBuild "$SolutionPath" /p:Configuration=Debug /maxcpucount /t:Clean -if (-not $?) -{ - throw "The MSBuild process returned an error code." -} -& $MSBuild "$SolutionPath" /p:Configuration=Debug /maxcpucount -if (-not $?) -{ - throw "The MSBuild process returned an error code." -} - -# Go get docfx if we don't hae it -$FileExists = Test-Path $DocFx -If ($FileExists -eq $False) { - - If(!(Test-Path $DocFxFolder)) - { - New-Item $DocFxFolder -type directory - } - - $DocFxZip = Join-Path -Path $ToolsRoot "docfx\docfx.zip" - $DocFxSource = "https://github.com/dotnet/docfx/releases/download/v1.9.4/docfx.zip" - Invoke-WebRequest $DocFxSource -OutFile $DocFxZip - - #unzip it - & $7Zip e $DocFxZip "-o$DocFxFolder" -} - -#clear site -If(Test-Path(Join-Path -Path $RepoRoot "apidocs\_site")) -{ - Remove-Item $DocFxSiteOutput -recurse -} - -# run it! -& $DocFx metadata $DocFxJson -& $DocFx build $DocFxJson - -# zip it - -& $7Zip a -tzip csharp-docs.zip $DocFxSiteOutput -r diff --git a/build/Modules/Umbraco.Build/Build-UmbracoDocs.ps1 b/build/Modules/Umbraco.Build/Build-UmbracoDocs.ps1 new file mode 100644 index 000000000000..f0691fb5ae44 --- /dev/null +++ b/build/Modules/Umbraco.Build/Build-UmbracoDocs.ps1 @@ -0,0 +1,111 @@ +# + +function Build-UmbracoDocs +{ + $uenv = Get-UmbracoBuildEnv + + $src = "$($uenv.SolutionRoot)\src" + $out = "$($uenv.SolutionRoot)\build.out" + $tmp = "$($uenv.SolutionRoot)\build.tmp" + + $buildTemp = "$PSScriptRoot\temp" + $cache = 2 + + Prepare-Build -keep $uenv + + ################ Do the UI docs + # get a temp clean node env (will restore) + Sandbox-Node $uenv + + Write-Host "Executing gulp docs" + + push-location "$($uenv.SolutionRoot)\src\Umbraco.Web.UI.Client" + write "node version is:" > $tmp\belle-docs.log + &node -v >> $tmp\belle-docs.log 2>&1 + write "npm version is:" >> $tmp\belle-docs.log 2>&1 + &npm -v >> $tmp\belle-docs.log 2>&1 + write "executing npm install" >> $tmp\belle-docs.log 2>&1 + &npm install >> $tmp\belle-docs.log 2>&1 + write "executing bower install" >> $tmp\belle-docs.log 2>&1 + &npm install -g bower >> $tmp\belle-docs.log 2>&1 + write "installing gulp" >> $tmp\belle-docs.log 2>&1 + &npm install -g gulp >> $tmp\belle-docs.log 2>&1 + write "installing gulp-cli" >> $tmp\belle-docs.log 2>&1 + &npm install -g gulp-cli --quiet >> $tmp\belle-docs.log 2>&1 + write "building docs using gulp" >> $tmp\belle-docs.log 2>&1 + &gulp docs >> $tmp\belle-docs.log 2>&1 + pop-location + + Write-Host "Completed gulp docs build" + + # fixme - should we filter the log to find errors? + #get-content .\build.tmp\belle-docs.log | %{ if ($_ -match "build") { write $_}} + + # change baseUrl + $baseUrl = "https://our.umbraco.org/apidocs/ui/" + $indexPath = "$src/Umbraco.Web.UI.Client/docs/api/index.html" + (Get-Content $indexPath).Replace("location.href.replace(rUrl, indexFile)", "'$baseUrl'") ` + | Set-Content $indexPath + + # restore + Restore-Node + + # zip + &$uenv.Zip a -tzip -r "$out\ui-docs.zip" "$src\Umbraco.Web.UI.Client\docs\api\*.*" ` + > $null + + ################ Do the c# docs + + Write-Host "Build C# documentation" + + # Build the solution in debug mode + # FIXME no only a simple compilation should be enough! + # FIXME we MUST handle msbuild & co error codes! + # FIXME deal with weird things in gitconfig? + #Build-Umbraco -Configuration Debug + Restore-NuGet $uenv + Compile-Umbraco $uenv "Debug" # FIXME different log file! + Restore-WebConfig "$src\Umbraco.Web.UI" + + # ensure we have docfx + Get-DocFx $uenv $buildTemp + + # clear + $docFxOutput = "$($uenv.SolutionRoot)\apidocs\_site" + if (test-path($docFxOutput)) + { + Remove-Directory $docFxOutput + } + + # run + $docFxJson = "$($uenv.SolutionRoot)\apidocs\docfx.json" + push-location "$($uenv.SolutionRoot)\build" # silly docfx.json wants this + + Write-Host "Run DocFx metadata" + Write-Host "Logging to $tmp\docfx.metadata.log" + &$uenv.DocFx metadata $docFxJson > "$tmp\docfx.metadata.log" + Write-Host "Run DocFx build" + Write-Host "Logging to $tmp\docfx.build.log" + &$uenv.DocFx build $docFxJson > "$tmp\docfx.build.log" + + pop-location + + # zip + &$uenv.Zip a -tzip -r "$out\csharp-docs.zip" "$docFxOutput\*.*" ` + > $null +} + +function Get-DocFx($uenv, $buildTemp) +{ + $docFx = "$buildTemp\docfx" + if (-not (test-path $docFx)) + { + Write-Host "Download DocFx..." + $source = "https://github.com/dotnet/docfx/releases/download/v2.19.2/docfx.zip" + Invoke-WebRequest $source -OutFile "$buildTemp\docfx.zip" + + &$uenv.Zip x "$buildTemp\docfx.zip" -o"$buildTemp\docfx" -aos > $nul + Remove-File "$buildTemp\docfx.zip" + } + $uenv | add-member -memberType NoteProperty -name DocFx -value "$docFx\docfx.exe" +} \ No newline at end of file diff --git a/build/Modules/Umbraco.Build/Get-UmbracoBuildEnv.ps1 b/build/Modules/Umbraco.Build/Get-UmbracoBuildEnv.ps1 new file mode 100644 index 000000000000..d1aaf7582f58 --- /dev/null +++ b/build/Modules/Umbraco.Build/Get-UmbracoBuildEnv.ps1 @@ -0,0 +1,180 @@ +# +# Get-UmbracoBuildEnv +# Gets the Umbraco build environment +# Downloads tools if necessary +# +function Get-UmbracoBuildEnv +{ + # store tools in the module's directory + # and cache them for two days + $path = "$PSScriptRoot\temp" + $cache = 2 + + if (-not (test-path $path)) + { + mkdir $path > $null + } + + # ensure we have NuGet + $nuget = "$path\nuget.exe" + $source = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" + if ((test-path $nuget) -and ((ls $nuget).CreationTime -lt [DateTime]::Now.AddDays(-$cache))) + { + Remove-File $nuget + } + if (-not (test-path $nuget)) + { + Write-Host "Download NuGet..." + Invoke-WebRequest $source -OutFile $nuget + } + + # ensure we have 7-Zip + $sevenZip = "$path\7za.exe" + if ((test-path $sevenZip) -and ((ls $sevenZip).CreationTime -lt [DateTime]::Now.AddDays(-$cache))) + { + Remove-File $sevenZip + } + if (-not (test-path $sevenZip)) + { + Write-Host "Download 7-Zip..." + &$nuget install 7-Zip.CommandLine -OutputDirectory $path -Verbosity quiet + $dir = ls "$path\7-Zip.CommandLine.*" | sort -property Name -descending | select -first 1 + $file = ls -path "$dir" -name 7za.exe -recurse + mv "$dir\$file" $sevenZip + Remove-Directory $dir + } + + # ensure we have vswhere + $vswhere = "$path\vswhere.exe" + if ((test-path $vswhere) -and ((ls $vswhere).CreationTime -lt [DateTime]::Now.AddDays(-$cache))) + { + Remove-File $vswhere + } + if (-not (test-path $vswhere)) + { + Write-Host "Download VsWhere..." + &$nuget install vswhere -OutputDirectory $path -Verbosity quiet + $dir = ls "$path\vswhere.*" | sort -property Name -descending | select -first 1 + $file = ls -path "$dir" -name vswhere.exe -recurse + mv "$dir\$file" $vswhere + Remove-Directory $dir + } + + # ensure we have semver + $semver = "$path\Semver.dll" + if ((test-path $semver) -and ((ls $semver).CreationTime -lt [DateTime]::Now.AddDays(-$cache))) + { + Remove-File $semver + } + if (-not (test-path $semver)) + { + Write-Host "Download Semver..." + &$nuget install semver -OutputDirectory $path -Verbosity quiet + $dir = ls "$path\semver.*" | sort -property Name -descending | select -first 1 + $file = "$dir\lib\net452\Semver.dll" + if (-not (test-path $file)) + { + Write-Error "Failed to file $file" + return + } + mv "$file" $semver + Remove-Directory $dir + } + + try + { + [Reflection.Assembly]::LoadFile($semver) > $null + } + catch + { + Write-Error -Exception $_.Exception -Message "Failed to load $semver" + break + } + + # ensure we have node + $node = "$path\node-v6.9.1-win-x86" + $source = "http://nodejs.org/dist/v6.9.1/node-v6.9.1-win-x86.7z" + if (-not (test-path $node)) + { + Write-Host "Download Node..." + Invoke-WebRequest $source -OutFile "$path\node-v6.9.1-win-x86.7z" + &$sevenZip x "$path\node-v6.9.1-win-x86.7z" -o"$path" -aos > $nul + Remove-File "$path\node-v6.9.1-win-x86.7z" + } + + # note: why? node already brings everything we need! + ## ensure we have npm + #$npm = "$path\npm.*" + #$getNpm = $true + #if (test-path $npm) + #{ + # $getNpm = $false + # $tmpNpm = ls "$path\npm.*" | sort -property Name -descending | select -first 1 + # if ($tmpNpm.CreationTime -lt [DateTime]::Now.AddDays(-$cache)) + # { + # $getNpm = $true + # } + # else + # { + # $npm = $tmpNpm.ToString() + # } + #} + #if ($getNpm) + #{ + # Write-Host "Download Npm..." + # &$nuget install npm -OutputDirectory $path -Verbosity quiet + # $npm = ls "$path\npm.*" | sort -property Name -descending | select -first 1 + # $npm.CreationTime = [DateTime]::Now + # $npm = $npm.ToString() + #} + + # find visual studio + # will not work on VSO but VSO does not need it + $vsPath = "" + $vsVer = "" + $msBuild = $null + &$vswhere | foreach { + if ($_.StartsWith("installationPath:")) { $vsPath = $_.SubString("installationPath:".Length).Trim() } + if ($_.StartsWith("installationVersion:")) { $vsVer = $_.SubString("installationVersion:".Length).Trim() } + } + if ($vsPath -ne "") + { + $vsVerParts = $vsVer.Split('.') + $vsMajor = [int]::Parse($vsVerParts[0]) + $vsMinor = [int]::Parse($vsVerParts[1]) + if ($vsMajor -eq 15) { + $msBuild = "$vsPath\MSBuild\$vsMajor.0\Bin" + } + elseif ($vsMajor -eq 14) { + $msBuild = "c:\Program Files (x86)\MSBuild\$vsMajor\Bin" + } + else + { + $msBuild = $null + } + } + + $vs = $null + if ($msBuild) + { + $vs = new-object -typeName PsObject + $vs | add-member -memberType NoteProperty -name Path -value $vsPath + $vs | add-member -memberType NoteProperty -name Major -value $vsMajor + $vs | add-member -memberType NoteProperty -name Minor -value $vsMinor + $vs | add-member -memberType NoteProperty -name MsBuild -value "$msBuild\MsBuild.exe" + } + + $solutionRoot = Get-FullPath "$PSScriptRoot\..\..\.." + + $uenv = new-object -typeName PsObject + $uenv | add-member -memberType NoteProperty -name SolutionRoot -value $solutionRoot + $uenv | add-member -memberType NoteProperty -name VisualStudio -value $vs + $uenv | add-member -memberType NoteProperty -name NuGet -value $nuget + $uenv | add-member -memberType NoteProperty -name Zip -value $sevenZip + $uenv | add-member -memberType NoteProperty -name VsWhere -value $vswhere + $uenv | add-member -memberType NoteProperty -name Semver -value $semver + $uenv | add-member -memberType NoteProperty -name NodePath -value $node + #$uenv | add-member -memberType NoteProperty -name NpmPath -value $npm + + return $uenv +} diff --git a/build/Modules/Umbraco.Build/Get-UmbracoVersion.ps1 b/build/Modules/Umbraco.Build/Get-UmbracoVersion.ps1 new file mode 100644 index 000000000000..a3ce784f146b --- /dev/null +++ b/build/Modules/Umbraco.Build/Get-UmbracoVersion.ps1 @@ -0,0 +1,26 @@ +# +# Get-UmbracoVersion +# Gets the Umbraco version +# +function Get-UmbracoVersion +{ + $uenv = Get-UmbracoBuildEnv + + # parse SolutionInfo and retrieve the version string + $filepath = "$($uenv.SolutionRoot)\src\SolutionInfo.cs" + $text = [System.IO.File]::ReadAllText($filepath) + $match = [System.Text.RegularExpressions.Regex]::Matches($text, "AssemblyInformationalVersion\(`"(.+)?`"\)") + $version = $match.Groups[1] + + # semver-parse the version string + $semver = [SemVer.SemVersion]::Parse($version) + $release = "" + $semver.Major + "." + $semver.Minor + "." + $semver.Patch + + $versions = new-object -typeName PsObject + $versions | add-member -memberType NoteProperty -name Semver -value $semver + $versions | add-member -memberType NoteProperty -name Release -value $release + $versions | add-member -memberType NoteProperty -name Comment -value $semver.PreRelease + $versions | add-member -memberType NoteProperty -name Build -value $semver.Build + + return $versions +} diff --git a/build/Modules/Umbraco.Build/Get-VisualStudio.ps1 b/build/Modules/Umbraco.Build/Get-VisualStudio.ps1 new file mode 100644 index 000000000000..cc88984eb210 --- /dev/null +++ b/build/Modules/Umbraco.Build/Get-VisualStudio.ps1 @@ -0,0 +1,30 @@ +# finds msbuild +function Get-VisualStudio($vswhere) +{ + $vsPath = "" + $vsVer = "" + &$vswhere | foreach { + if ($_.StartsWith("installationPath:")) { $vsPath = $_.SubString("installationPath:".Length).Trim() } + if ($_.StartsWith("installationVersion:")) { $vsVer = $_.SubString("installationVersion:".Length).Trim() } + } + if ($vsPath -eq "") { return $null } + + $vsVerParts = $vsVer.Split('.') + $vsMajor = [int]::Parse($vsVerParts[0]) + $vsMinor = [int]::Parse($vsVerParts[1]) + if ($vsMajor -eq 15) { + $msBuild = "$vsPath\MSBuild\$vsMajor.$vsMinor\Bin" + } + elseif ($vsMajor -eq 14) { + $msBuild = "c:\Program Files (x86)\MSBuild\$vsMajor\Bin" + } + else { return $null } + $msBuild = "$msBuild\MsBuild.exe" + + $vs = new-object -typeName PsObject + $vs | add-member -memberType NoteProperty -name Path -value $vsPath + $vs | add-member -memberType NoteProperty -name Major -value $vsMajor + $vs | add-member -memberType NoteProperty -name Minor -value $vsMinor + $vs | add-member -memberType NoteProperty -name MsBuild -value $msBuild + return $vs +} diff --git a/build/Modules/Umbraco.Build/Set-UmbracoContinuousVersion.ps1 b/build/Modules/Umbraco.Build/Set-UmbracoContinuousVersion.ps1 new file mode 100644 index 000000000000..8996777292fd --- /dev/null +++ b/build/Modules/Umbraco.Build/Set-UmbracoContinuousVersion.ps1 @@ -0,0 +1,30 @@ +# +# Set-UmbracoContinuousVersion +# Sets the Umbraco version for continuous integration +# +# -Version +# where is a Semver valid version +# eg 1.2.3, 1.2.3-alpha, 1.2.3-alpha+456 +# +# -BuildNumber +# where is a string coming from the build server +# eg 34, 126, 1 +# +function Set-UmbracoContinuousVersion +{ + param ( + [Parameter(Mandatory=$true)] + [string] + $version, + [Parameter(Mandatory=$true)] + [string] + $buildNumber + ) + + Write-Host "Version is currently set to $version" + + $umbracoVersion = "$($version.Trim())-alpha$($buildNumber)" + Write-Host "Setting Umbraco Version to $umbracoVersion" + + Set-UmbracoVersion $umbracoVersion +} \ No newline at end of file diff --git a/build/Modules/Umbraco.Build/Set-UmbracoVersion.ps1 b/build/Modules/Umbraco.Build/Set-UmbracoVersion.ps1 new file mode 100644 index 000000000000..19681dcba026 --- /dev/null +++ b/build/Modules/Umbraco.Build/Set-UmbracoVersion.ps1 @@ -0,0 +1,117 @@ +# +# Set-UmbracoVersion +# Sets the Umbraco version +# +# -Version +# where is a Semver valid version +# eg 1.2.3, 1.2.3-alpha, 1.2.3-alpha+456 +# +function Set-UmbracoVersion +{ + param ( + [Parameter(Mandatory=$true)] + [string] + $version + ) + + $uenv = Get-UmbracoBuildEnv + + try + { + [Reflection.Assembly]::LoadFile($uenv.Semver) > $null + } + catch + { + Write-Error "Failed to load $uenv.Semver" + break + } + + # validate input + $ok = [Regex]::Match($version, "^[0-9]+\.[0-9]+\.[0-9]+(\-[a-z0-9]+)?(\+[0-9]+)?$") + if (-not $ok.Success) + { + Write-Error "Invalid version $version" + break + } + + # parse input + try + { + $semver = [SemVer.SemVersion]::Parse($version) + } + catch + { + Write-Error "Invalid version $version" + break + } + + # + $release = "" + $semver.Major + "." + $semver.Minor + "." + $semver.Patch + + # edit files and set the proper versions and dates + Write-Host "Update UmbracoVersion.cs" + Replace-FileText "$($uenv.SolutionRoot)\src\Umbraco.Core\Configuration\UmbracoVersion.cs" ` + "(\d+)\.(\d+)\.(\d+)(.(\d+))?" ` + "$release" + Replace-FileText "$($uenv.SolutionRoot)\src\Umbraco.Core\Configuration\UmbracoVersion.cs" ` + "CurrentComment { get { return `"(.+)`"" ` + "CurrentComment { get { return `"$($semver.PreRelease)`"" + Write-Host "Update SolutionInfo.cs" + Replace-FileText "$($uenv.SolutionRoot)\src\SolutionInfo.cs" ` + "AssemblyFileVersion\(`"(.+)?`"\)" ` + "AssemblyFileVersion(`"$release`")" + Replace-FileText "$($uenv.SolutionRoot)\src\SolutionInfo.cs" ` + "AssemblyInformationalVersion\(`"(.+)?`"\)" ` + "AssemblyInformationalVersion(`"$semver`")" + $year = [System.DateTime]::Now.ToString("yyyy") + Replace-FileText "$($uenv.SolutionRoot)\src\SolutionInfo.cs" ` + "AssemblyCopyright\(`"Copyright © Umbraco (\d{4})`"\)" ` + "AssemblyCopyright(`"Copyright © Umbraco $year`")" + + # edit csproj and set IIS Express port number + # this is a raw copy of ReplaceIISExpressPortNumber.exe + # it probably can be achieved in a much nicer way - l8tr + $source = @" + using System; + using System.IO; + using System.Xml; + using System.Globalization; + + namespace Umbraco + { + public static class PortUpdater + { + public static void Update(string path, string release) + { + XmlDocument xmlDocument = new XmlDocument(); + string fullPath = Path.GetFullPath(path); + xmlDocument.Load(fullPath); + int result = 1; + int.TryParse(release.Replace(`".`", `"`"), out result); + while (result < 1024) + result *= 10; + XmlNode xmlNode1 = xmlDocument.GetElementsByTagName(`"IISUrl`").Item(0); + if (xmlNode1 != null) + xmlNode1.InnerText = `"http://localhost:`" + (object) result; + XmlNode xmlNode2 = xmlDocument.GetElementsByTagName(`"DevelopmentServerPort`").Item(0); + if (xmlNode2 != null) + xmlNode2.InnerText = result.ToString((IFormatProvider) CultureInfo.InvariantCulture); + xmlDocument.Save(fullPath); + } + } + } +"@ + + $assem = ( + "System.Xml", + "System.IO", + "System.Globalization" + ) + + Write-Host "Update Umbraco.Web.UI.csproj" + add-type -referencedAssemblies $assem -typeDefinition $source -language CSharp + $csproj = "$($uenv.SolutionRoot)\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj" + [Umbraco.PortUpdater]::Update($csproj, $release) + + return $semver +} diff --git a/build/Modules/Umbraco.Build/Umbraco.Build.psm1 b/build/Modules/Umbraco.Build/Umbraco.Build.psm1 new file mode 100644 index 000000000000..62ab7f186574 --- /dev/null +++ b/build/Modules/Umbraco.Build/Umbraco.Build.psm1 @@ -0,0 +1,615 @@ + +# Umbraco.Build.psm1 +# +# $env:PSModulePath = "$pwd\build\Modules\;$env:PSModulePath" +# Import-Module Umbraco.Build -Force -DisableNameChecking +# +# PowerShell Modules: +# https://msdn.microsoft.com/en-us/library/dd878324%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396 +# +# PowerShell Module Manifest: +# https://msdn.microsoft.com/en-us/library/dd878337%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396 +# +# See also +# http://www.powershellmagazine.com/2014/08/15/pstip-taking-control-of-verbose-and-debug-output-part-5/ + + +. "$PSScriptRoot\Utilities.ps1" +. "$PSScriptRoot\Get-VisualStudio.ps1" + +. "$PSScriptRoot\Get-UmbracoBuildEnv.ps1" +. "$PSScriptRoot\Set-UmbracoVersion.ps1" +. "$PSScriptRoot\Set-UmbracoContinuousVersion.ps1" +. "$PSScriptRoot\Get-UmbracoVersion.ps1" +. "$PSScriptRoot\Verify-NuGet.ps1" + +. "$PSScriptRoot\Build-UmbracoDocs.ps1" + +# +# Prepares the build +# +function Prepare-Build +{ + param ( + $uenv, # an Umbraco build environment (see Get-UmbracoBuildEnv) + + [Alias("k")] + [switch] + $keep = $false + ) + + Write-Host ">> Prepare Build" + + $src = "$($uenv.SolutionRoot)\src" + $tmp = "$($uenv.SolutionRoot)\build.tmp" + $out = "$($uenv.SolutionRoot)\build.out" + + # clear + Write-Host "Clear folders and files" + + Remove-Directory "$src\Umbraco.Web.UI.Client\bower_components" + + if (-not $keep) + { + Remove-Directory "$tmp" + Remove-Directory "$out" + } + + if (-not (Test-Path "$tmp")) + { + mkdir "$tmp" > $null + } + if (-not (Test-Path "$out")) + { + mkdir "$out" > $null + } + + # ensure proper web.config + $webUi = "$src\Umbraco.Web.UI" + Store-WebConfig $webUi + Write-Host "Create clean web.config" + Copy-File "$webUi\web.Template.config" "$webUi\web.config" +} + +function Clear-EnvVar($var) +{ + $value = [Environment]::GetEnvironmentVariable($var) + if (test-path "env:$var") { rm "env:$var" } + return $value +} + +function Set-EnvVar($var, $value) +{ + if ($value) + { + [Environment]::SetEnvironmentVariable($var, $value) + } + else + { + if (test-path "env:$var") { rm "env:$var" } + } +} + +function Sandbox-Node +{ + param ( + $uenv # an Umbraco build environment (see Get-UmbracoBuildEnv) + ) + + $global:node_path = $env:path + $nodePath = $uenv.NodePath + $gitExe = (get-command git).Source + $gitPath = [System.IO.Path]::GetDirectoryName($gitExe) + $env:path = "$nodePath;$gitPath" + + $global:node_nodepath = Clear-EnvVar "NODEPATH" + $global:node_npmcache = Clear-EnvVar "NPM_CONFIG_CACHE" + $global:node_npmprefix = Clear-EnvVar "NPM_CONFIG_PREFIX" +} + +function Restore-Node +{ + $env:path = $node_path + + Set-EnvVar "NODEPATH" $node_nodepath + Set-EnvVar "NPM_CONFIG_CACHE" $node_npmcache + Set-EnvVar "NPM_CONFIG_PREFIX" $node_npmprefix +} + +# +# Builds the Belle UI project +# +function Compile-Belle +{ + param ( + $uenv, # an Umbraco build environment (see Get-UmbracoBuildEnv) + $version # an Umbraco version object (see Get-UmbracoVersion) + ) + + $tmp = "$($uenv.SolutionRoot)\build.tmp" + $src = "$($uenv.SolutionRoot)\src" + + Write-Host ">> Compile Belle" + Write-Host "Logging to $tmp\belle.log" + + # get a temp clean node env (will restore) + Sandbox-Node $uenv + + push-location "$($uenv.SolutionRoot)\src\Umbraco.Web.UI.Client" + write "node version is:" > $tmp\belle.log + &node -v >> $tmp\belle.log 2>&1 + write "npm version is:" >> $tmp\belle.log 2>&1 + &npm -v >> $tmp\belle.log 2>&1 + write "cleaning npm cache" >> $tmp\belle.log 2>&1 + &npm cache clean >> $tmp\belle.log 2>&1 + write "installing bower" >> $tmp\belle.log 2>&1 + &npm install -g bower >> $tmp\belle.log 2>&1 + write "installing gulp" >> $tmp\belle.log 2>&1 + &npm install -g gulp >> $tmp\belle.log 2>&1 + write "installing gulp-cli" >> $tmp\belle.log 2>&1 + &npm install -g gulp-cli --quiet >> $tmp\belle.log 2>&1 + write "executing npm install" >> $tmp\belle.log 2>&1 + &npm install >> $tmp\belle.log 2>&1 + write "executing gulp build for version $version" >> $tmp\belle.log 2>&1 + &gulp build --buildversion=$version.Release >> $tmp\belle.log 2>&1 + pop-location + + # fixme - should we filter the log to find errors? + #get-content .\build.tmp\belle.log | %{ if ($_ -match "build") { write $_}} + + # restore + Restore-Node + + # setting node_modules folder to hidden + # used to prevent VS13 from crashing on it while loading the websites project + # also makes sure aspnet compiler does not try to handle rogue files and chokes + # in VSO with Microsoft.VisualC.CppCodeProvider -related errors + # use get-item -force 'cos it might be hidden already + write "Set hidden attribute on node_modules" + $dir = get-item -force "$src\Umbraco.Web.UI.Client\node_modules" + $dir.Attributes = $dir.Attributes -bor ([System.IO.FileAttributes]::Hidden) +} + +# +# Compiles Umbraco +# +function Compile-Umbraco +{ + param ( + $uenv, # an Umbraco build environment (see Get-UmbracoBuildEnv) + [string] $buildConfiguration = "Release" + ) + + $src = "$($uenv.SolutionRoot)\src" + $tmp = "$($uenv.SolutionRoot)\build.tmp" + $out = "$($uenv.SolutionRoot)\build.out" + + if ($uenv.VisualStudio -eq $null) + { + Write-Error "Build environment does not provide VisualStudio." + break + } + + $toolsVersion = "4.0" + if ($uenv.VisualStudio.Major -eq 15) + { + $toolsVersion = "15.0" + } + + Write-Host ">> Compile Umbraco" + Write-Host "Logging to $tmp\msbuild.umbraco.log" + + # beware of the weird double \\ at the end of paths + # see http://edgylogic.com/blog/powershell-and-external-commands-done-right/ + &$uenv.VisualStudio.MsBuild "$src\Umbraco.Web.UI\Umbraco.Web.UI.csproj" ` + /p:WarningLevel=0 ` + /p:Configuration=$buildConfiguration ` + /p:Platform=AnyCPU ` + /p:UseWPP_CopyWebApplication=True ` + /p:PipelineDependsOnBuild=False ` + /p:OutDir=$tmp\bin\\ ` + /p:WebProjectOutputDir=$tmp\WebApp\\ ` + /p:Verbosity=minimal ` + /t:Clean`;Rebuild ` + /tv:$toolsVersion ` + /p:UmbracoBuild=True ` + > $tmp\msbuild.umbraco.log + + # /p:UmbracoBuild tells the csproj that we are building from PS +} + +# +# Prepare Tests +# +function Prepare-Tests +{ + param ( + $uenv # an Umbraco build environment (see Get-UmbracoBuildEnv) + ) + + $src = "$($uenv.SolutionRoot)\src" + $tmp = "$($uenv.SolutionRoot)\build.tmp" + + Write-Host ">> Prepare Tests" + + # fixme - idea is to avoid rebuilding everything for tests + # but because of our weird assembly versioning (with .* stuff) + # everything gets rebuilt all the time... + #Copy-Files "$tmp\bin" "." "$tmp\tests" + + # data + Write-Host "Copy data files" + if( -Not (Test-Path -Path "$tmp\tests\Packaging" ) ) + { + Write-Host "Create packaging directory" + New-Item -ItemType directory -Path "$tmp\tests\Packaging" + } + Copy-Files "$src\Umbraco.Tests\Packaging\Packages" "*" "$tmp\tests\Packaging\Packages" + + # required for package install tests + if( -Not (Test-Path -Path "$tmp\tests\bin" ) ) + { + Write-Host "Create bin directory" + New-Item -ItemType directory -Path "$tmp\tests\bin" + } +} + +# +# Compiles Tests +# +function Compile-Tests +{ + param ( + $uenv # an Umbraco build environment (see Get-UmbracoBuildEnv) + ) + + $src = "$($uenv.SolutionRoot)\src" + $tmp = "$($uenv.SolutionRoot)\build.tmp" + $out = "$tmp\tests" + + $buildConfiguration = "Release" + + if ($uenv.VisualStudio -eq $null) + { + Write-Error "Build environment does not provide VisualStudio." + break + } + + $toolsVersion = "4.0" + if ($uenv.VisualStudio.Major -eq 15) + { + $toolsVersion = "15.0" + } + + Write-Host ">> Compile Tests" + Write-Host "Logging to $tmp\msbuild.tests.log" + + # beware of the weird double \\ at the end of paths + # see http://edgylogic.com/blog/powershell-and-external-commands-done-right/ + &$uenv.VisualStudio.MsBuild "$src\Umbraco.Tests\Umbraco.Tests.csproj" ` + /p:WarningLevel=0 ` + /p:Configuration=$buildConfiguration ` + /p:Platform=AnyCPU ` + /p:UseWPP_CopyWebApplication=True ` + /p:PipelineDependsOnBuild=False ` + /p:OutDir=$out\\ ` + /p:Verbosity=minimal ` + /t:Build ` + /tv:$toolsVersion ` + /p:UmbracoBuild=True ` + /p:NugetPackages=$src\packages ` + > $tmp\msbuild.tests.log + + # /p:UmbracoBuild tells the csproj that we are building from PS +} + +# +# Cleans things up and prepare files after compilation +# +function Prepare-Packages +{ + param ( + $uenv # an Umbraco build environment (see Get-UmbracoBuildEnv) + ) + + Write-Host ">> Prepare Packages" + + $src = "$($uenv.SolutionRoot)\src" + $tmp = "$($uenv.SolutionRoot)\build.tmp" + $out = "$($uenv.SolutionRoot)\build.out" + + $buildConfiguration = "Release" + + # restore web.config + Restore-WebConfig "$src\Umbraco.Web.UI" + + # cleanup build + Write-Host "Clean build" + Remove-File "$tmp\bin\*.dll.config" + Remove-File "$tmp\WebApp\bin\*.dll.config" + + # cleanup presentation + Write-Host "Cleanup presentation" + Remove-Directory "$tmp\WebApp\umbraco.presentation" + + # create directories + Write-Host "Create directories" + mkdir "$tmp\Configs" > $null + mkdir "$tmp\Configs\Lang" > $null + mkdir "$tmp\WebApp\App_Data" > $null + #mkdir "$tmp\WebApp\Media" > $null + #mkdir "$tmp\WebApp\Views" > $null + + # copy various files + Write-Host "Copy xml documentation" + cp -force "$tmp\bin\*.xml" "$tmp\WebApp\bin" + + Write-Host "Copy transformed configs and langs" + # note: exclude imageprocessor/*.config as imageprocessor pkg installs them + Copy-Files "$tmp\WebApp\config" "*.config" "$tmp\Configs" ` + { -not $_.RelativeName.StartsWith("imageprocessor") } + Copy-Files "$tmp\WebApp\config" "*.js" "$tmp\Configs" + Copy-Files "$tmp\WebApp\config\lang" "*.xml" "$tmp\Configs\Lang" + Copy-File "$tmp\WebApp\web.config" "$tmp\Configs\web.config.transform" + + Write-Host "Copy transformed web.config" + Copy-File "$src\Umbraco.Web.UI\web.$buildConfiguration.Config.transformed" "$tmp\WebApp\web.config" + + # offset the modified timestamps on all umbraco dlls, as WebResources + # break if date is in the future, which, due to timezone offsets can happen. + Write-Host "Offset dlls timestamps" + ls -r "$tmp\*.dll" | foreach { + $_.CreationTime = $_.CreationTime.AddHours(-11) + $_.LastWriteTime = $_.LastWriteTime.AddHours(-11) + } + + # copy libs + Write-Host "Copy SqlCE libraries" + Copy-Files "$src\packages\SqlServerCE.4.0.0.1" "*.*" "$tmp\bin" ` + { -not $_.Extension.StartsWith(".nu") -and -not $_.RelativeName.StartsWith("lib\") } + Copy-Files "$src\packages\SqlServerCE.4.0.0.1" "*.*" "$tmp\WebApp\bin" ` + { -not $_.Extension.StartsWith(".nu") -and -not $_.RelativeName.StartsWith("lib\") } + + # copy Belle + Write-Host "Copy Belle" + Copy-Files "$src\Umbraco.Web.UI\umbraco\assets" "*" "$tmp\WebApp\umbraco\assets" + Copy-Files "$src\Umbraco.Web.UI\umbraco\js" "*" "$tmp\WebApp\umbraco\js" + Copy-Files "$src\Umbraco.Web.UI\umbraco\lib" "*" "$tmp\WebApp\umbraco\lib" + Copy-Files "$src\Umbraco.Web.UI\umbraco\views" "*" "$tmp\WebApp\umbraco\views" + Copy-Files "$src\Umbraco.Web.UI\umbraco\preview" "*" "$tmp\WebApp\umbraco\preview" +} + +# +# Creates the Zip packages +# +function Package-Zip +{ + param ( + $uenv # an Umbraco build environment (see Get-UmbracoBuildEnv) + ) + + Write-Host ">> Create Zip packages" + + $src = "$($uenv.SolutionRoot)\src" + $tmp = "$($uenv.SolutionRoot)\build.tmp" + $out = "$($uenv.SolutionRoot)\build.out" + + Write-Host "Zip all binaries" + &$uenv.Zip a -r "$out\UmbracoCms.AllBinaries.$($version.Semver).zip" ` + "$tmp\bin\*" ` + "-x!dotless.Core.*" ` + > $null + + Write-Host "Zip cms" + &$uenv.Zip a -r "$out\UmbracoCms.$($version.Semver).zip" ` + "$tmp\WebApp\*" ` + "-x!dotless.Core.*" "-x!Content_Types.xml" "-x!*.pdb"` + > $null +} + +# +# Prepares NuGet +# +function Prepare-NuGet +{ + param ( + $uenv # an Umbraco build environment (see Get-UmbracoBuildEnv) + ) + + Write-Host ">> Prepare NuGet" + + $src = "$($uenv.SolutionRoot)\src" + $tmp = "$($uenv.SolutionRoot)\build.tmp" + $out = "$($uenv.SolutionRoot)\build.out" + + # add Web.config transform files to the NuGet package + Write-Host "Add web.config transforms to NuGet package" + mv "$tmp\WebApp\Views\Web.config" "$tmp\WebApp\Views\Web.config.transform" + + # fixme - that one does not exist in .bat build either? + #mv "$tmp\WebApp\Xslt\Web.config" "$tmp\WebApp\Xslt\Web.config.transform" +} + +# +# Restores NuGet +# +function Restore-NuGet +{ + param ( + $uenv # an Umbraco build environment (see Get-UmbracoBuildEnv) + ) + + $src = "$($uenv.SolutionRoot)\src" + $tmp = "$($uenv.SolutionRoot)\build.tmp" + + Write-Host ">> Restore NuGet" + Write-Host "Logging to $tmp\nuget.restore.log" + + &$uenv.NuGet restore "$src\Umbraco.sln" > "$tmp\nuget.restore.log" +} + +# +# Copies the Azure Gallery script to output +# +function Prepare-AzureGallery +{ + param ( + $uenv # an Umbraco build environment (see Get-UmbracoBuildEnv) + ) + + $src = "$($uenv.SolutionRoot)\src" + $tmp = "$($uenv.SolutionRoot)\build.tmp" + $out = "$($uenv.SolutionRoot)\build.out" + $psScript = "$($uenv.SolutionRoot)\build\azuregalleryrelease.ps1" + + Write-Host ">> Copy azuregalleryrelease.ps1 to output folder" + Copy-Item $psScript $out +} + +# +# Creates the NuGet packages +# +function Package-NuGet +{ + param ( + $uenv, # an Umbraco build environment (see Get-UmbracoBuildEnv) + $version # an Umbraco version object (see Get-UmbracoVersion) + ) + + $src = "$($uenv.SolutionRoot)\src" + $tmp = "$($uenv.SolutionRoot)\build.tmp" + $out = "$($uenv.SolutionRoot)\build.out" + $nuspecs = "$($uenv.SolutionRoot)\build\NuSpecs" + + Write-Host ">> Create NuGet packages" + + # see https://docs.microsoft.com/en-us/nuget/schema/nuspec + # note - warnings about SqlCE native libs being outside of 'lib' folder, + # nothing much we can do about it as it's intentional yet there does not + # seem to be a way to disable the warning + + &$uenv.NuGet Pack "$nuspecs\UmbracoCms.Core.nuspec" ` + -Properties BuildTmp="$tmp" ` + -Version $version.Semver.ToString() ` + -Symbols -Verbosity quiet -outputDirectory $out + + &$uenv.NuGet Pack "$nuspecs\UmbracoCms.nuspec" ` + -Properties BuildTmp="$tmp" ` + -Version $version.Semver.ToString() ` + -Verbosity quiet -outputDirectory $out +} + +# +# Builds Umbraco +# +function Build-Umbraco +{ + [CmdletBinding()] + param ( + [string] + $target = "all", + [string] + $buildConfiguration = "Release" + ) + + $target = $target.ToLowerInvariant() + Write-Host ">> Build-Umbraco <$target> <$buildConfiguration>" + + Write-Host "Get Build Environment" + $uenv = Get-UmbracoBuildEnv + + Write-Host "Get Version" + $version = Get-UmbracoVersion + Write-Host "Version $($version.Semver)" + + if ($target -eq "pre-build") + { + Prepare-Build $uenv + #Compile-Belle $uenv $version + + # set environment variables + $env:UMBRACO_VERSION=$version.Semver.ToString() + $env:UMBRACO_RELEASE=$version.Release + $env:UMBRACO_COMMENT=$version.Comment + $env:UMBRACO_BUILD=$version.Build + + # set environment variable for VSO + # https://github.com/Microsoft/vsts-tasks/issues/375 + # https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md + Write-Host ("##vso[task.setvariable variable=UMBRACO_VERSION;]$($version.Semver.ToString())") + Write-Host ("##vso[task.setvariable variable=UMBRACO_RELEASE;]$($version.Release)") + Write-Host ("##vso[task.setvariable variable=UMBRACO_COMMENT;]$($version.Comment)") + Write-Host ("##vso[task.setvariable variable=UMBRACO_BUILD;]$($version.Build)") + + Write-Host ("##vso[task.setvariable variable=UMBRACO_TMP;]$($uenv.SolutionRoot)\build.tmp") + } + elseif ($target -eq "pre-tests") + { + Prepare-Tests $uenv + } + elseif ($target -eq "compile-tests") + { + Compile-Tests $uenv + } + elseif ($target -eq "compile-umbraco") + { + Compile-Umbraco $uenv $buildConfiguration + } + elseif ($target -eq "pre-packages") + { + Prepare-Packages $uenv + } + elseif ($target -eq "pre-nuget") + { + Prepare-NuGet $uenv + } + elseif ($target -eq "restore-nuget") + { + Restore-NuGet $uenv + } + elseif ($target -eq "pkg-zip") + { + Package-Zip $uenv + } + elseif ($target -eq "compile-belle") + { + Compile-Belle $uenv $version + } + elseif ($target -eq "prepare-azuregallery") + { + Prepare-AzureGallery $uenv + } + elseif ($target -eq "all") + { + Prepare-Build $uenv + Restore-NuGet $uenv + Compile-Belle $uenv $version + Compile-Umbraco $uenv $buildConfiguration + Prepare-Tests $uenv + Compile-Tests $uenv + # not running tests... + Prepare-Packages $uenv + Package-Zip $uenv + Verify-NuGet $uenv + Prepare-NuGet $uenv + Package-NuGet $uenv $version + Prepare-AzureGallery $uenv + } + else + { + Write-Error "Unsupported target `"$target`"." + } +} + +# +# export functions +# +Export-ModuleMember -function Get-UmbracoBuildEnv +Export-ModuleMember -function Set-UmbracoVersion +Export-ModuleMember -function Set-UmbracoContinuousVersion +Export-ModuleMember -function Get-UmbracoVersion +Export-ModuleMember -function Build-Umbraco +Export-ModuleMember -function Build-UmbracoDocs +Export-ModuleMember -function Verify-NuGet + +#eof \ No newline at end of file diff --git a/build/Modules/Umbraco.Build/Utilities.ps1 b/build/Modules/Umbraco.Build/Utilities.ps1 new file mode 100644 index 000000000000..8ca24885cd98 --- /dev/null +++ b/build/Modules/Umbraco.Build/Utilities.ps1 @@ -0,0 +1,95 @@ +# returns the full path if $file is relative to $pwd +function Get-FullPath($file) +{ + $path = [System.IO.Path]::Combine($pwd, $file) + $path = [System.IO.Path]::GetFullPath($path) + return $path +} + +# removes a directory, doesn't complain if it does not exist +function Remove-Directory($dir) +{ + remove-item $dir -force -recurse -errorAction SilentlyContinue > $null +} + +# removes a file, doesn't complain if it does not exist +function Remove-File($file) +{ + remove-item $file -force -errorAction SilentlyContinue > $null +} + +# copies a file, creates target dir if needed +function Copy-File($source, $target) +{ + $ignore = new-item -itemType file -path $target -force + cp -force $source $target +} + +# copies files to a directory +function Copy-Files($source, $select, $target, $filter) +{ + $files = ls -r "$source\$select" + $files | foreach { + $relative = $_.FullName.SubString($source.Length+1) + $_ | add-member -memberType NoteProperty -name RelativeName -value $relative + } + if ($filter -ne $null) { + $files = $files | where $filter + } + $files | + foreach { + if ($_.PsIsContainer) { + $ignore = new-item -itemType directory -path "$target\$($_.RelativeName)" -force + } + else { + Copy-File $_.FullName "$target\$($_.RelativeName)" + } + } +} + +# regex-replaces content in a file +function Replace-FileText($filename, $source, $replacement) +{ + $filepath = Get-FullPath $filename + $text = [System.IO.File]::ReadAllText($filepath) + $text = [System.Text.RegularExpressions.Regex]::Replace($text, $source, $replacement) + $utf8bom = New-Object System.Text.UTF8Encoding $true + [System.IO.File]::WriteAllText($filepath, $text, $utf8bom) +} + +# store web.config +function Store-WebConfig($webUi) +{ + if (test-path "$webUi\web.config") + { + if (test-path "$webUi\web.config.temp-build") + { + Write-Host "Found existing web.config.temp-build" + $i = 0 + while (test-path "$webUi\web.config.temp-build.$i") + { + $i = $i + 1 + } + Write-Host "Save existing web.config as web.config.temp-build.$i" + Write-Host "(WARN: the original web.config.temp-build will be restored during post-build)" + mv "$webUi\web.config" "$webUi\web.config.temp-build.$i" + } + else + { + Write-Host "Save existing web.config as web.config.temp-build" + Write-Host "(will be restored during post-build)" + mv "$webUi\web.config" "$webUi\web.config.temp-build" + } + } +} + +# restore web.config +function Restore-WebConfig($webUi) +{ + if (test-path "$webUi\web.config.temp-build") + { + Write-Host "Restoring existing web.config" + Remove-File "$webUi\web.config" + mv "$webUi\web.config.temp-build" "$webUi\web.config" + } +} \ No newline at end of file diff --git a/build/Modules/Umbraco.Build/Verify-NuGet.ps1 b/build/Modules/Umbraco.Build/Verify-NuGet.ps1 new file mode 100644 index 000000000000..1a2239393ccb --- /dev/null +++ b/build/Modules/Umbraco.Build/Verify-NuGet.ps1 @@ -0,0 +1,444 @@ +# +# Verify-NuGet +# + +function Format-Dependency +{ + param ( $d ) + + $m = $d.Id + " " + if ($d.MinInclude) { $m = $m + "[" } + else { $m = $m + "(" } + $m = $m + $d.MinVersion + if ($d.MaxVersion -ne $d.MinVersion) { $m = $m + "," + $d.MaxVersion } + if ($d.MaxInclude) { $m = $m + "]" } + else { $m = $m + ")" } + + return $m +} + +function Write-NuSpec +{ + param ( $name, $deps ) + + Write-Host "" + Write-Host "$name NuSpec dependencies:" + + foreach ($d in $deps) + { + $m = Format-Dependency $d + Write-Host " $m" + } +} + +function Write-Package +{ + param ( $name, $pkgs ) + + Write-Host "" + Write-Host "$name packages:" + + foreach ($p in $pkgs) + { + Write-Host " $($p.Id) $($p.Version)" + } +} + +function Verify-NuGet +{ + param ( + $uenv # an Umbraco build environment (see Get-UmbracoBuildEnv) + ) + + if ($uenv -eq $null) + { + $uenv = Get-UmbracoBuildEnv + } + + $source = @" + + using System; + using System.Collections.Generic; + using System.Linq; + using System.IO; + using System.Xml; + using System.Xml.Serialization; + using Semver; + + namespace Umbraco.Build + { + public class NuGet + { + public static Dependency[] GetNuSpecDependencies(string filename) + { + NuSpec nuspec; + var serializer = new XmlSerializer(typeof(NuSpec)); + using (var reader = new StreamReader(filename)) + { + nuspec = (NuSpec) serializer.Deserialize(reader); + } + var nudeps = nuspec.Metadata.Dependencies; + var deps = new List(); + foreach (var nudep in nudeps) + { + var dep = new Dependency(); + dep.Id = nudep.Id; + + var parts = nudep.Version.Split(','); + if (parts.Length == 1) + { + dep.MinInclude = parts[0].StartsWith("["); + dep.MaxInclude = parts[0].EndsWith("]"); + + SemVersion version; + if (!SemVersion.TryParse(parts[0].Substring(1, parts[0].Length-2).Trim(), out version)) continue; + dep.MinVersion = dep.MaxVersion = version; //parts[0].Substring(1, parts[0].Length-2).Trim(); + } + else + { + SemVersion version; + if (!SemVersion.TryParse(parts[0].Substring(1).Trim(), out version)) continue; + dep.MinVersion = version; //parts[0].Substring(1).Trim(); + if (!SemVersion.TryParse(parts[1].Substring(0, parts[1].Length-1).Trim(), out version)) continue; + dep.MaxVersion = version; //parts[1].Substring(0, parts[1].Length-1).Trim(); + dep.MinInclude = parts[0].StartsWith("["); + dep.MaxInclude = parts[1].EndsWith("]"); + } + + deps.Add(dep); + } + return deps.ToArray(); + } + + public static IEnumerable DistinctBy(/*this*/ IEnumerable source, Func keySelector) + { + HashSet knownKeys = new HashSet(); + foreach (TSource element in source) + { + if (knownKeys.Add(keySelector(element))) + { + yield return element; + } + } + } + + public static Package[] GetProjectsPackages(string src, string[] projects) + { + var l = new List(); + foreach (var project in projects) + { + var path = Path.Combine(src, project); + var packageConfig = Path.Combine(path, "packages.config"); + if (File.Exists(packageConfig)) + ReadPackagesConfig(packageConfig, l); + var csprojs = Directory.GetFiles(path, "*.csproj"); + foreach (var csproj in csprojs) + { + ReadCsProj(csproj, l); + } + } + IEnumerable p = l.OrderBy(x => x.Id); + p = DistinctBy(p, x => x.Id + ":::" + x.Version); + return p.ToArray(); + } + + public static object[] GetPackageErrors(Package[] pkgs) + { + return pkgs + .GroupBy(x => x.Id) + .Where(x => x.Count() > 1) + .ToArray(); + } + + public static object[] GetNuSpecErrors(Package[] pkgs, Dependency[] deps) + { + var d = pkgs.ToDictionary(x => x.Id, x => x.Version); + return deps + .Select(x => + { + SemVersion v; + if (!d.TryGetValue(x.Id, out v)) return null; + + var ok = true; + + /* + if (x.MinInclude) + { + if (v < x.MinVersion) ok = false; + } + else + { + if (v <= x.MinVersion) ok = false; + } + + if (x.MaxInclude) + { + if (v > x.MaxVersion) ok = false; + } + else + { + if (v >= x.MaxVersion) ok = false; + } + */ + + if (!x.MinInclude || v != x.MinVersion) ok = false; + + return ok ? null : new { Dependency = x, Version = v }; + }) + .Where(x => x != null) + .ToArray(); + } + + /* + public static Package[] GetProjectPackages(string path) + { + var l = new List(); + var packageConfig = Path.Combine(path, "packages.config"); + if (File.Exists(packageConfig)) + ReadPackagesConfig(packageConfig, l); + var csprojs = Directory.GetFiles(path, "*.csproj"); + foreach (var csproj in csprojs) + { + ReadCsProj(csproj, l); + } + return l.ToArray(); + } + */ + + public static string GetDirectoryName(string filename) + { + return Path.GetFileName(Path.GetDirectoryName(filename)); + } + + public static void ReadPackagesConfig(string filename, List packages) + { + //Console.WriteLine("read " + filename); + + PackagesConfigPackages pkgs; + var serializer = new XmlSerializer(typeof(PackagesConfigPackages)); + using (var reader = new StreamReader(filename)) + { + pkgs = (PackagesConfigPackages) serializer.Deserialize(reader); + } + foreach (var p in pkgs.Packages) + { + SemVersion version; + if (!SemVersion.TryParse(p.Version, out version)) continue; + packages.Add(new Package { Id = p.Id, Version = version, Project = GetDirectoryName(filename) }); + } + } + + public static void ReadCsProj(string filename, List packages) + { + //Console.WriteLine("read " + filename); + + // if xmlns then it's not a VS2017 with PackageReference + var text = File.ReadAllLines(filename); + var line = text.FirstOrDefault(x => x.Contains(" x.Packages != null).SelectMany(x => x.Packages)) + { + var sversion = p.VersionE ?? p.VersionA; + SemVersion version; + if (!SemVersion.TryParse(sversion, out version)) continue; + packages.Add(new Package { Id = p.Id, Version = version, Project = GetDirectoryName(filename) }); + } + } + + public class Dependency + { + public string Id { get; set; } + public SemVersion MinVersion { get; set; } + public SemVersion MaxVersion { get; set; } + public bool MinInclude { get; set; } + public bool MaxInclude { get; set; } + } + + public class Package + { + public string Id { get; set; } + public SemVersion Version { get; set; } + public string Project { get; set; } + } + + [XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd")] + [XmlRoot(Namespace = "http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd", IsNullable = false, ElementName = "package")] + public class NuSpec + { + [XmlElement("metadata")] + public NuSpecMetadata Metadata { get; set; } + } + + [XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd", TypeName = "metadata")] + public class NuSpecMetadata + { + [XmlArray("dependencies")] + [XmlArrayItem("dependency", IsNullable = false)] + public NuSpecDependency[] Dependencies { get; set; } + } + + [XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd", TypeName = "dependencies")] + public class NuSpecDependency + { + [XmlAttribute(AttributeName = "id")] + public string Id { get; set; } + + [XmlAttribute(AttributeName = "version")] + public string Version { get; set; } + } + + [XmlType(AnonymousType = true)] + [XmlRoot(Namespace = "", IsNullable = false, ElementName = "packages")] + public class PackagesConfigPackages + { + [XmlElement("package")] + public PackagesConfigPackage[] Packages { get; set; } + } + + [XmlType(AnonymousType = true, TypeName = "package")] + public class PackagesConfigPackage + { + [XmlAttribute(AttributeName = "id")] + public string Id { get; set; } + + [XmlAttribute(AttributeName = "version")] + public string Version { get; set; } + } + + [XmlType(AnonymousType = true)] + [XmlRoot(Namespace = "", IsNullable = false, ElementName = "Project")] + public class CsProjProject + { + [XmlElement("ItemGroup")] + public CsProjItemGroup[] ItemGroups { get; set; } + } + + [XmlType(AnonymousType = true, TypeName = "ItemGroup")] + public class CsProjItemGroup + { + [XmlElement("PackageReference")] + public CsProjPackageReference[] Packages { get; set; } + } + + [XmlType(AnonymousType = true, TypeName = "PackageReference")] + public class CsProjPackageReference + { + [XmlAttribute(AttributeName = "Include")] + public string Id { get; set; } + + [XmlAttribute(AttributeName = "Version")] + public string VersionA { get; set; } + + [XmlElement("Version")] + public string VersionE { get; set;} + } + } + } + +"@ + + Write-Host ">> Verify NuGet consistency" + + $assem = ( + "System.Xml", + "System.Core", # "System.Collections.Generic" + "System.Linq", + "System.Xml.Serialization", + "System.IO", + "System.Globalization", + $uenv.Semver + ) + + try + { + # as long as the code hasn't changed it's fine to re-add, but if the code + # has changed this will throw - better warn the dev that we have an issue + add-type -referencedAssemblies $assem -typeDefinition $source -language CSharp + } + catch + { + if ($_.FullyQualifiedErrorId.StartsWith("TYPE_ALREADY_EXISTS,")) + { Write-Error "Failed to add type, did you change the code?" } + else + { Write-Error $_ } + } + if (-not $?) { break } + + $nuspecs = ( + "UmbracoCms", + "UmbracoCms.Core" + ) + + $projects = ( + "Umbraco.Core", + "Umbraco.Web", + "Umbraco.Web.UI", + "UmbracoExamine"#, + #"Umbraco.Tests", + #"Umbraco.Tests.Benchmarks" + ) + + $src = "$($uenv.SolutionRoot)\src" + $pkgs = [Umbraco.Build.NuGet]::GetProjectsPackages($src, $projects) + if (-not $?) { break } + #Write-Package "All" $pkgs + + $errs = [Umbraco.Build.NuGet]::GetPackageErrors($pkgs) + if (-not $?) { break } + + if ($errs.Length -gt 0) + { + Write-Host "" + } + foreach ($err in $errs) + { + Write-Host $err.Key + foreach ($e in $err) + { + Write-Host " $($e.Version) required by $($e.Project)" + } + } + if ($errs.Length -gt 0) + { + Write-Error "Found non-consolidated package dependencies" + break + } + + $nuerr = $false + $nupath = "$($uenv.SolutionRoot)\build\NuSpecs" + foreach ($nuspec in $nuspecs) + { + $deps = [Umbraco.Build.NuGet]::GetNuSpecDependencies("$nupath\$nuspec.nuspec") + if (-not $?) { break } + #Write-NuSpec $nuspec $deps + + $errs = [Umbraco.Build.NuGet]::GetNuSpecErrors($pkgs, $deps) + if (-not $?) { break } + + if ($errs.Length -gt 0) + { + Write-Host "" + Write-Host "$nuspec requires:" + $nuerr = $true + } + foreach ($err in $errs) + { + $m = Format-Dependency $err.Dependency + Write-Host " $m but projects require $($err.Version)" + } + } + + if ($nuerr) + { + Write-Error "Found inconsistent NuGet dependencies" + break + } +} \ No newline at end of file diff --git a/build/NuSpecs/UmbracoCms.Core.nuspec b/build/NuSpecs/UmbracoCms.Core.nuspec index e62185d4b2ef..ff299fdcfb50 100644 --- a/build/NuSpecs/UmbracoCms.Core.nuspec +++ b/build/NuSpecs/UmbracoCms.Core.nuspec @@ -21,88 +21,87 @@ - - - + + + - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/build/NuSpecs/UmbracoCms.nuspec b/build/NuSpecs/UmbracoCms.nuspec index 8d58ec43a3e5..22430a45160b 100644 --- a/build/NuSpecs/UmbracoCms.nuspec +++ b/build/NuSpecs/UmbracoCms.nuspec @@ -19,22 +19,22 @@ - + - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/build/NuSpecs/tools/ReadmeUpgrade.txt b/build/NuSpecs/tools/ReadmeUpgrade.txt index 5c46ee20bfb8..e85b22a90261 100644 --- a/build/NuSpecs/tools/ReadmeUpgrade.txt +++ b/build/NuSpecs/tools/ReadmeUpgrade.txt @@ -8,13 +8,13 @@ ---------------------------------------------------- -*** IMPORTANT NOTICE FOR 7.6 UPGRADES *** +*** IMPORTANT NOTICE FOR 7.7 UPGRADES *** Be sure to read the version specific upgrade information before proceeding: -https://our.umbraco.org/documentation/Getting-Started/Setup/Upgrading/version-specific#version-7-6-0 +https://our.umbraco.org/documentation/Getting-Started/Setup/Upgrading/version-specific#version-7-7-0 -You will most likely need to make some changes to your web.config and you will need to be -aware of the breaking changes listed there to see if these affect your installation. +Depending on the version you are upgrading from, you may need to make some changes to your web.config +and you will need to be aware of the breaking changes listed there to see if these affect your installation. Don't forget to build! diff --git a/build/NuSpecs/tools/Web.config.install.xdt b/build/NuSpecs/tools/Web.config.install.xdt index e482eb5d6e36..5ee5ed32c6d3 100644 --- a/build/NuSpecs/tools/Web.config.install.xdt +++ b/build/NuSpecs/tools/Web.config.install.xdt @@ -15,6 +15,7 @@
+
@@ -23,6 +24,7 @@ + @@ -30,6 +32,7 @@ + @@ -368,19 +371,19 @@ - + - + - + - + diff --git a/build/NuSpecs/tools/trees.config.install.xdt b/build/NuSpecs/tools/trees.config.install.xdt index 7d41835fb126..21dc791636a6 100644 --- a/build/NuSpecs/tools/trees.config.install.xdt +++ b/build/NuSpecs/tools/trees.config.install.xdt @@ -43,7 +43,7 @@ xdt:Locator="Match(application,alias)" xdt:Transform="InsertIfMissing" /> - - - + + - + + xdt:Transform="Remove" /> &1 | % { $_.ToString() } + +# Remove everything so that unzipping the release later will update everything +# Don't remove the readme file nor the git directory +Write-Host "Cleaning up git directory before adding new version" +Remove-Item -Recurse $workingDirectory\$env:GIT_REPOSITORYNAME\* -Exclude README.md,.git + +# Find release zip +$zipsDir = "$workingDirectory\$env:BUILD_DEFINITIONNAME\zips" +$pattern = "UmbracoCms.([0-9]{1,2}.[0-9]{1,3}.[0-9]{1,3}).zip" +Write-Host "Searching for Umbraco release files in $workingDirectory\$zipsDir for a file with pattern $pattern" +$file = (Get-ChildItem $zipsDir | Where-Object { $_.Name -match "$pattern" }) + +if($file) +{ + # Get release name + $version = [regex]::Match($file.Name, $pattern).captures.groups[1].value + $releaseName = "Umbraco $version" + Write-Host "Found $releaseName" + + # Unzip into repository to update release + Add-Type -AssemblyName System.IO.Compression.FileSystem + Write-Host "Unzipping $($file.FullName) to $workingDirectory\$env:GIT_REPOSITORYNAME" + [System.IO.Compression.ZipFile]::ExtractToDirectory("$($file.FullName)", "$workingDirectory\$env:GIT_REPOSITORYNAME") + + # Telling git who we are + git config --global user.email "coffee@umbraco.com" 2>&1 | % { $_.ToString() } + git config --global user.name "Umbraco HQ" 2>&1 | % { $_.ToString() } + + # Commit + CD $env:GIT_REPOSITORYNAME + Write-Host "Committing Umbraco $version Release from Build Output" + + git add . 2>&1 | % { $_.ToString() } + git commit -m " Release $releaseName from Build Output" 2>&1 | % { $_.ToString() } + + # Tag the release + git tag -a "v$version" -m "v$version" + + # Push release to master + $fullGitAuthUrl = "https://$($env:GIT_USERNAME):$GitHubPersonalAccessToken@$env:GIT_URL/$env:GIT_REPOSITORYNAME.git" + git push $fullGitAuthUrl 2>&1 | % { $_.ToString() } + + #Push tag to master + git push $fullGitAuthUrl --tags 2>&1 | % { $_.ToString() } +} +else +{ + Write-Error "Umbraco release file not found, searched in $workingDirectory\$zipsDir for a file with pattern $pattern - cancelling" +} diff --git a/build/build.ps1 b/build/build.ps1 new file mode 100644 index 000000000000..72d8287d9c5a --- /dev/null +++ b/build/build.ps1 @@ -0,0 +1,67 @@ +param ( + [Parameter(Mandatory=$false)] + [string] + $version, + + [Parameter(Mandatory=$false)] + [Alias("mo")] + [switch] + $moduleOnly = $false +) + +# the script can run either from the solution root, +# or from the ./build directory - anything else fails +if ([System.IO.Path]::GetFileName($pwd) -eq "build") +{ + $mpath = [System.IO.Path]::GetDirectoryName($pwd) + "\build\Modules\" +} +else +{ + $mpath = "$pwd\build\Modules\" +} + +# look for the module and throw if not found +if (-not [System.IO.Directory]::Exists($mpath + "Umbraco.Build")) +{ + Write-Error "Could not locate Umbraco build Powershell module." + break +} + +# add the module path (if not already there) +if (-not $env:PSModulePath.Contains($mpath)) +{ + $env:PSModulePath = "$mpath;$env:PSModulePath" +} + +# force-import (or re-import) the module +Write-Host "Import Umbraco build Powershell module" +Import-Module Umbraco.Build -Force -DisableNameChecking + +# module only? +if ($moduleOnly) +{ + if (-not [string]::IsNullOrWhiteSpace($version)) + { + Write-Host "(module only: ignoring version parameter)" + } + else + { + Write-Host "(module only)" + } + break +} + +# get build environment +Write-Host "Setup Umbraco build Environment" +$uenv = Get-UmbracoBuildEnv + +# set the version if any +if (-not [string]::IsNullOrWhiteSpace($version)) +{ + Write-Host "Set Umbraco version to $version" + Set-UmbracoVersion $version +} + +# full umbraco build +Write-Host "Build Umbraco" +Build-Umbraco \ No newline at end of file diff --git a/build/setversion.ps1 b/build/setversion.ps1 new file mode 100644 index 000000000000..99f1534bf55d --- /dev/null +++ b/build/setversion.ps1 @@ -0,0 +1,18 @@ +# Usage: powershell .\setversion.ps1 7.6.8 +# Or: powershell .\setversion 7.6.8-beta001 + +param ( + [Parameter(Mandatory=$true)] + [string] + $version +) + +# report +Write-Host "Setting Umbraco version to $version" + +# import Umbraco Build PowerShell module - $pwd is ./build +$env:PSModulePath = "$pwd\Modules\;$env:PSModulePath" +Import-Module Umbraco.Build -Force -DisableNameChecking + +# run commands +$version = Set-UmbracoVersion -Version $version \ No newline at end of file diff --git a/src/.nuget/NuGet.Config b/src/.nuget/NuGet.Config deleted file mode 100644 index 6a318ad9b75f..000000000000 --- a/src/.nuget/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/.nuget/NuGet.exe b/src/.nuget/NuGet.exe deleted file mode 100644 index 6804fb7da737..000000000000 Binary files a/src/.nuget/NuGet.exe and /dev/null differ diff --git a/src/.nuget/NuGet.targets b/src/.nuget/NuGet.targets deleted file mode 100644 index 6ff51f6e83c7..000000000000 --- a/src/.nuget/NuGet.targets +++ /dev/null @@ -1,138 +0,0 @@ - - - - $(MSBuildProjectDirectory)\..\ - - - false - - - false - - - true - - - false - - - - - - - - - - - - - $([System.IO.Path]::Combine($(SolutionDir), ".nuget")) - $([System.IO.Path]::Combine($(ProjectDir), "packages.config")) - - - - - $(SolutionDir).nuget - packages.config - - - - - $(NuGetToolsPath)\NuGet.exe - @(PackageSource) - - "$(NuGetExePath)" - mono --runtime=v4.0.30319 $(NuGetExePath) - - $(TargetDir.Trim('\\')) - - -RequireConsent - -NonInteractive - - "$(SolutionDir) " - "$(SolutionDir)" - - - $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir) - $(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols - - - - RestorePackages; - $(BuildDependsOn); - - - - - $(BuildDependsOn); - BuildPackage; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/SQLCE4Umbraco/SqlCE4Umbraco.csproj b/src/SQLCE4Umbraco/SqlCE4Umbraco.csproj index a5d86d5377cc..2f2bb5866dee 100644 --- a/src/SQLCE4Umbraco/SqlCE4Umbraco.csproj +++ b/src/SQLCE4Umbraco/SqlCE4Umbraco.csproj @@ -93,7 +93,6 @@ - User Groups here which we currently are not doing - //the password must be 'something' it could be empty if authenticating - // with an external provider so we'll just generate one and prefix it, the - // prefix will help us determine if the password hasn't actually been specified yet. - if (member.RawPasswordValue.IsNullOrWhiteSpace()) - { - //this will hash the guid with a salt so should be nicely random - var aspHasher = new PasswordHasher(); - member.RawPasswordValue = "___UIDEMPTYPWORD__" + - aspHasher.HashPassword(Guid.NewGuid().ToString("N")); + _userService.Save(userEntity); - } - _userService.Save(member); - - if (member.Id == 0) throw new DataException("Could not create the user, check logs for details"); + if (userEntity.Id == 0) throw new DataException("Could not create the user, check logs for details"); //re-assign id - user.Id = member.Id; + user.Id = userEntity.Id; return Task.FromResult(0); } @@ -126,12 +124,15 @@ public async Task UpdateAsync(BackOfficeIdentityUser user) var found = _userService.GetUserById(asInt.Result); if (found != null) { + // we have to remember whether Logins property is dirty, since the UpdateMemberProperties will reset it. + var isLoginsPropertyDirty = user.IsPropertyDirty("Logins"); + if (UpdateMemberProperties(found, user)) { _userService.Save(found); } - if (user.LoginsChanged) + if (isLoginsPropertyDirty) { var logins = await GetLoginsAsync(user); _externalLoginService.SaveUserLogins(found.Id, logins); @@ -199,7 +200,7 @@ public async Task FindByNameAsync(string userName) return await Task.FromResult(result); } - + /// /// Set the user password hash /// @@ -209,7 +210,7 @@ public Task SetPasswordHashAsync(BackOfficeIdentityUser user, string passwordHas { ThrowIfDisposed(); if (user == null) throw new ArgumentNullException("user"); - if (passwordHash.IsNullOrWhiteSpace()) throw new ArgumentNullException("passwordHash"); + if (string.IsNullOrEmpty(passwordHash)) throw new ArgumentException("Value cannot be null or empty.", "passwordHash"); user.PasswordHash = passwordHash; @@ -225,7 +226,7 @@ public Task GetPasswordHashAsync(BackOfficeIdentityUser user) { ThrowIfDisposed(); if (user == null) throw new ArgumentNullException("user"); - + return Task.FromResult(user.PasswordHash); } @@ -239,7 +240,7 @@ public Task HasPasswordAsync(BackOfficeIdentityUser user) ThrowIfDisposed(); if (user == null) throw new ArgumentNullException("user"); - return Task.FromResult(user.PasswordHash.IsNullOrWhiteSpace() == false); + return Task.FromResult(string.IsNullOrEmpty(user.PasswordHash) == false); } /// @@ -279,7 +280,9 @@ public Task GetEmailAsync(BackOfficeIdentityUser user) public Task GetEmailConfirmedAsync(BackOfficeIdentityUser user) { ThrowIfDisposed(); - throw new NotImplementedException(); + if (user == null) throw new ArgumentNullException("user"); + + return Task.FromResult(user.EmailConfirmed); } /// @@ -290,7 +293,8 @@ public Task GetEmailConfirmedAsync(BackOfficeIdentityUser user) public Task SetEmailConfirmedAsync(BackOfficeIdentityUser user, bool confirmed) { ThrowIfDisposed(); - throw new NotImplementedException(); + user.EmailConfirmed = confirmed; + return Task.FromResult(0); } /// @@ -374,12 +378,17 @@ public Task FindAsync(UserLoginInfo login) var result = _externalLoginService.Find(login).ToArray(); if (result.Any()) { - //return the first member that matches the result - var output = (from l in result - select _userService.GetUserById(l.UserId) - into user - where user != null - select Mapper.Map(user)).FirstOrDefault(); + //return the first user that matches the result + BackOfficeIdentityUser output = null; + foreach (var l in result) + { + var user = _userService.GetUserById(l.UserId); + if (user != null) + { + output = Mapper.Map(user); + break; + } + } return Task.FromResult(AssignLoginsCallback(output)); } @@ -389,63 +398,49 @@ into user /// - /// Adds a user to a role (section) + /// Adds a user to a role (user group) /// /// /// public Task AddToRoleAsync(BackOfficeIdentityUser user, string roleName) - { + { ThrowIfDisposed(); if (user == null) throw new ArgumentNullException("user"); + if (string.IsNullOrWhiteSpace(roleName)) throw new ArgumentException("Value cannot be null or whitespace.", "roleName"); - if (user.AllowedSections.InvariantContains(roleName)) return Task.FromResult(0); - - var asInt = user.Id.TryConvertTo(); - if (asInt == false) - { - throw new InvalidOperationException("The user id must be an integer to work with the Umbraco"); - } - - var found = _userService.GetUserById(asInt.Result); + var userRole = user.Roles.SingleOrDefault(r => r.RoleId == roleName); - if (found != null) + if (userRole == null) { - found.AddAllowedSection(roleName); + user.AddRole(roleName); } return Task.FromResult(0); } /// - /// Removes the role (allowed section) for the user + /// Removes the role (user group) for the user /// /// /// public Task RemoveFromRoleAsync(BackOfficeIdentityUser user, string roleName) - { + { ThrowIfDisposed(); if (user == null) throw new ArgumentNullException("user"); + if (string.IsNullOrWhiteSpace(roleName)) throw new ArgumentException("Value cannot be null or whitespace.", "roleName"); - if (user.AllowedSections.InvariantContains(roleName) == false) return Task.FromResult(0); + var userRole = user.Roles.SingleOrDefault(r => r.RoleId == roleName); - var asInt = user.Id.TryConvertTo(); - if (asInt == false) - { - throw new InvalidOperationException("The user id must be an integer to work with the Umbraco"); - } - - var found = _userService.GetUserById(asInt.Result); - - if (found != null) + if (userRole != null) { - found.RemoveAllowedSection(roleName); + user.Roles.Remove(userRole); } return Task.FromResult(0); } /// - /// Returns the roles for this user + /// Returns the roles (user groups) for this user /// /// /// @@ -453,7 +448,7 @@ public Task> GetRolesAsync(BackOfficeIdentityUser user) { ThrowIfDisposed(); if (user == null) throw new ArgumentNullException("user"); - return Task.FromResult((IList)user.AllowedSections.ToList()); + return Task.FromResult((IList)user.Roles.Select(x => x.RoleId).ToList()); } /// @@ -465,7 +460,7 @@ public Task IsInRoleAsync(BackOfficeIdentityUser user, string roleName) { ThrowIfDisposed(); if (user == null) throw new ArgumentNullException("user"); - return Task.FromResult(user.AllowedSections.InvariantContains(roleName)); + return Task.FromResult(user.Roles.Select(x => x.RoleId).InvariantContains(roleName)); } /// @@ -553,6 +548,9 @@ public Task GetLockoutEndDateAsync(BackOfficeIdentityUser user) /// /// /// + /// + /// Currently we do not suport a timed lock out, when they are locked out, an admin will have to reset the status + /// public Task SetLockoutEndDateAsync(BackOfficeIdentityUser user, DateTimeOffset lockoutEnd) { if (user == null) throw new ArgumentNullException("user"); @@ -620,28 +618,40 @@ public Task SetLockoutEnabledAsync(BackOfficeIdentityUser user, bool enabled) } #endregion - private bool UpdateMemberProperties(Models.Membership.IUser user, BackOfficeIdentityUser identityUser) + private bool UpdateMemberProperties(IUser user, BackOfficeIdentityUser identityUser) { var anythingChanged = false; - //don't assign anything if nothing has changed as this will trigger - //the track changes of the model - if ((user.LastLoginDate != default(DateTime) && identityUser.LastLoginDateUtc.HasValue == false) + + //don't assign anything if nothing has changed as this will trigger the track changes of the model + + if (identityUser.IsPropertyDirty("LastLoginDateUtc") + || (user.LastLoginDate != default(DateTime) && identityUser.LastLoginDateUtc.HasValue == false) || identityUser.LastLoginDateUtc.HasValue && user.LastLoginDate.ToUniversalTime() != identityUser.LastLoginDateUtc.Value) { anythingChanged = true; user.LastLoginDate = identityUser.LastLoginDateUtc.Value.ToLocalTime(); } - if (user.Name != identityUser.Name && identityUser.Name.IsNullOrWhiteSpace() == false) + if (identityUser.IsPropertyDirty("EmailConfirmed") + || (user.EmailConfirmedDate.HasValue && user.EmailConfirmedDate.Value != default(DateTime) && identityUser.EmailConfirmed == false) + || ((user.EmailConfirmedDate.HasValue == false || user.EmailConfirmedDate.Value == default(DateTime)) && identityUser.EmailConfirmed)) + { + anythingChanged = true; + user.EmailConfirmedDate = identityUser.EmailConfirmed ? (DateTime?)DateTime.Now : null; + } + if (identityUser.IsPropertyDirty("Name") + && user.Name != identityUser.Name && identityUser.Name.IsNullOrWhiteSpace() == false) { anythingChanged = true; user.Name = identityUser.Name; } - if (user.Email != identityUser.Email && identityUser.Email.IsNullOrWhiteSpace() == false) + if (identityUser.IsPropertyDirty("Email") + && user.Email != identityUser.Email && identityUser.Email.IsNullOrWhiteSpace() == false) { anythingChanged = true; user.Email = identityUser.Email; } - if (user.FailedPasswordAttempts != identityUser.AccessFailedCount) + if (identityUser.IsPropertyDirty("AccessFailedCount") + && user.FailedPasswordAttempts != identityUser.AccessFailedCount) { anythingChanged = true; user.FailedPasswordAttempts = identityUser.AccessFailedCount; @@ -658,51 +668,81 @@ private bool UpdateMemberProperties(Models.Membership.IUser user, BackOfficeIden } } - if (user.Username != identityUser.UserName && identityUser.UserName.IsNullOrWhiteSpace() == false) + if (identityUser.IsPropertyDirty("UserName") + && user.Username != identityUser.UserName && identityUser.UserName.IsNullOrWhiteSpace() == false) { anythingChanged = true; user.Username = identityUser.UserName; } - if (user.RawPasswordValue != identityUser.PasswordHash && identityUser.PasswordHash.IsNullOrWhiteSpace() == false) + if (identityUser.IsPropertyDirty("PasswordHash") + && user.RawPasswordValue != identityUser.PasswordHash && identityUser.PasswordHash.IsNullOrWhiteSpace() == false) { anythingChanged = true; user.RawPasswordValue = identityUser.PasswordHash; } - if (user.Language != identityUser.Culture && identityUser.Culture.IsNullOrWhiteSpace() == false) + if (identityUser.IsPropertyDirty("Culture") + && user.Language != identityUser.Culture && identityUser.Culture.IsNullOrWhiteSpace() == false) { anythingChanged = true; user.Language = identityUser.Culture; } - if (user.StartMediaId != identityUser.StartMediaId) + if (identityUser.IsPropertyDirty("StartMediaIds") + && user.StartMediaIds.UnsortedSequenceEqual(identityUser.StartMediaIds) == false) { anythingChanged = true; - user.StartMediaId = identityUser.StartMediaId; + user.StartMediaIds = identityUser.StartMediaIds; } - if (user.StartContentId != identityUser.StartContentId) + if (identityUser.IsPropertyDirty("StartContentIds") + && user.StartContentIds.UnsortedSequenceEqual(identityUser.StartContentIds) == false) { anythingChanged = true; - user.StartContentId = identityUser.StartContentId; + user.StartContentIds = identityUser.StartContentIds; } if (user.SecurityStamp != identityUser.SecurityStamp) { anythingChanged = true; user.SecurityStamp = identityUser.SecurityStamp; } - - if (user.AllowedSections.ContainsAll(identityUser.AllowedSections) == false - || identityUser.AllowedSections.ContainsAll(user.AllowedSections) == false) + + //TODO: Fix this for Groups too + if (identityUser.IsPropertyDirty("Roles") || identityUser.IsPropertyDirty("Groups")) { - anythingChanged = true; - foreach (var allowedSection in user.AllowedSections) - { - user.RemoveAllowedSection(allowedSection); - } - foreach (var allowedApplication in identityUser.AllowedSections) + var userGroupAliases = user.Groups.Select(x => x.Alias).ToArray(); + + var identityUserRoles = identityUser.Roles.Select(x => x.RoleId).ToArray(); + var identityUserGroups = identityUser.Groups.Select(x => x.Alias).ToArray(); + + var combinedAliases = identityUserRoles.Union(identityUserGroups).ToArray(); + + if (userGroupAliases.ContainsAll(combinedAliases) == false + || combinedAliases.ContainsAll(userGroupAliases) == false) { - user.AddAllowedSection(allowedApplication); + anythingChanged = true; + + //clear out the current groups (need to ToArray since we are modifying the iterator) + user.ClearGroups(); + + //go lookup all these groups + var groups = _userService.GetUserGroupsByAlias(combinedAliases).Select(x => x.ToReadOnlyGroup()).ToArray(); + + //use all of the ones assigned and add them + foreach (var group in groups) + { + user.AddGroup(group); + } + + //re-assign + identityUser.Groups = groups; } } + + //we should re-set the calculated start nodes + identityUser.CalculatedMediaStartNodeIds = user.CalculateMediaStartNodeIds(_entityService); + identityUser.CalculatedContentStartNodeIds = user.CalculateContentStartNodeIds(_entityService); + + //reset all changes + identityUser.ResetDirtyProperties(false); return anythingChanged; } @@ -713,7 +753,6 @@ private void ThrowIfDisposed() if (_disposed) throw new ObjectDisposedException(GetType().Name); } - - + } } \ No newline at end of file diff --git a/src/Umbraco.Core/Security/BackOfficeUserValidator.cs b/src/Umbraco.Core/Security/BackOfficeUserValidator.cs new file mode 100644 index 000000000000..58319e95a7b5 --- /dev/null +++ b/src/Umbraco.Core/Security/BackOfficeUserValidator.cs @@ -0,0 +1,29 @@ +using System.Threading.Tasks; +using Microsoft.AspNet.Identity; +using Umbraco.Core.Models.EntityBase; +using Umbraco.Core.Models.Identity; + +namespace Umbraco.Core.Security +{ + /// + /// Custom validator to not validate a user's username or email if they haven't changed + /// + /// + internal class BackOfficeUserValidator : UserValidator + where T : BackOfficeIdentityUser + { + public BackOfficeUserValidator(UserManager manager) : base(manager) + { + } + + public override async Task ValidateAsync(T item) + { + //Don't validate if the user's email or username hasn't changed otherwise it's just wasting SQL queries. + if (item.IsPropertyDirty("Email") || item.IsPropertyDirty("UserName")) + { + return await base.ValidateAsync(item); + } + return IdentityResult.Success; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Security/EmailService.cs b/src/Umbraco.Core/Security/EmailService.cs index 807d528f3d6d..51d1b8220740 100644 --- a/src/Umbraco.Core/Security/EmailService.cs +++ b/src/Umbraco.Core/Security/EmailService.cs @@ -1,25 +1,61 @@ -using System.Net.Mail; +using System; +using System.ComponentModel; +using System.Net.Mail; using System.Threading.Tasks; using Microsoft.AspNet.Identity; +using Umbraco.Core.Configuration; namespace Umbraco.Core.Security { + /// + /// The implementation for Umbraco + /// public class EmailService : IIdentityMessageService { + private readonly string _notificationEmailAddress; + private readonly IEmailSender _defaultEmailSender; + + public EmailService(string notificationEmailAddress, IEmailSender defaultEmailSender) + { + _notificationEmailAddress = notificationEmailAddress; + _defaultEmailSender = defaultEmailSender; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("Use the constructor specifying all dependencies")] + public EmailService() + : this(UmbracoConfig.For.UmbracoSettings().Content.NotificationEmailAddress, new EmailSender()) + { + } + public async Task SendAsync(IdentityMessage message) { - using (var client = new SmtpClient()) - using (var mailMessage = new MailMessage()) + var mailMessage = new MailMessage( + _notificationEmailAddress, + message.Destination, + message.Subject, + message.Body) { - mailMessage.Body = message.Body; - mailMessage.To.Add(message.Destination); - mailMessage.Subject = message.Subject; - - //TODO: This check could be nicer but that is the way it is currently - mailMessage.IsBodyHtml = message.Body.IsNullOrWhiteSpace() == false - && message.Body.Contains("<") && message.Body.Contains(" public interface IBackOfficeUserPasswordChecker { + /// + /// Checks a password for a user + /// + /// + /// + /// + /// + /// This will allow a developer to auto-link a local account which is required if the user queried doesn't exist locally. + /// The user parameter will always contain the username, if the user doesn't exist locally, the other properties will not be filled in. + /// A developer can then create a local account by filling in the properties and using UserManager.CreateAsync + /// Task CheckPasswordAsync(BackOfficeIdentityUser user, string password); } } \ No newline at end of file diff --git a/src/Umbraco.Core/Security/IMembershipProviderPasswordHasher.cs b/src/Umbraco.Core/Security/IMembershipProviderPasswordHasher.cs new file mode 100644 index 000000000000..42715d280aa0 --- /dev/null +++ b/src/Umbraco.Core/Security/IMembershipProviderPasswordHasher.cs @@ -0,0 +1,12 @@ +using Microsoft.AspNet.Identity; + +namespace Umbraco.Core.Security +{ + /// + /// A password hasher that is based on the rules configured for a membership provider + /// + public interface IMembershipProviderPasswordHasher : IPasswordHasher + { + MembershipProviderBase MembershipProvider { get; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Security/IUserAwarePasswordHasher.cs b/src/Umbraco.Core/Security/IUserAwarePasswordHasher.cs new file mode 100644 index 000000000000..cea4d5a144df --- /dev/null +++ b/src/Umbraco.Core/Security/IUserAwarePasswordHasher.cs @@ -0,0 +1,18 @@ +using System; +using Microsoft.AspNet.Identity; + +namespace Umbraco.Core.Security +{ + /// + /// A password hasher that is User aware so that it can process the hashing based on the user's settings + /// + /// + /// + public interface IUserAwarePasswordHasher + where TUser : class, IUser + where TKey : IEquatable + { + string HashPassword(TUser user, string password); + PasswordVerificationResult VerifyHashedPassword(TUser user, string hashedPassword, string providedPassword); + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Security/MachineKeyGenerator.cs b/src/Umbraco.Core/Security/MachineKeyGenerator.cs new file mode 100644 index 000000000000..9dd06f44bdc1 --- /dev/null +++ b/src/Umbraco.Core/Security/MachineKeyGenerator.cs @@ -0,0 +1,86 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; + +namespace Umbraco.Core.Security +{ + /// + /// Used to generate a machine key + /// + internal class MachineKeyGenerator + { + /// + /// Generates the string to be stored in the web.config + /// + /// + /// + /// Machine key details are here: https://msdn.microsoft.com/en-us/library/vstudio/w8h3skw9%28v=vs.100%29.aspx?f=255&MSPPError=-2147217396 + /// + public string GenerateConfigurationBlock() + { + var c = @""; + + var Xxx = 3; + + return string.Format(c, GenerateAESDecryptionKey(), GenerateHMACSHA256ValidationKey()); + } + + public string GenerateHMACSHA256ValidationKey() + { + //See: https://msdn.microsoft.com/en-us/library/vstudio/w8h3skw9%28v=vs.100%29.aspx?f=255&MSPPError=-2147217396 + //See: https://msdn.microsoft.com/en-us/library/ff649308.aspx?f=255&MSPPError=-2147217396 + /* + key value Specifies a manually assigned key. + The validationKey value must be manually set to a string of hexadecimal + characters to ensure consistent configuration across all servers in a Web farm. + The length of the key depends on the hash algorithm that is used: + + AES requires a 256-bit key (64 hexadecimal characters). + MD5 requires a 128-bit key (32 hexadecimal characters). + SHA1 requires a 160-bit key (40 hexadecimal characters). + 3DES requires a 192-bit key (48 hexadecimal characters). + HMACSHA256 requires a 256-bit key (64 hexadecimal characters) == DEFAULT + HMACSHA384 requires a 384-bit key (96 hexadecimal characters). + HMACSHA512 requires a 512-bit key (128 hexadecimal characters). + */ + + //64 in length = 256 bits + return GenerateKey(64); + } + + public string GenerateAESDecryptionKey() + { + //See: //See: https://msdn.microsoft.com/en-us/library/vstudio/w8h3skw9%28v=vs.100%29.aspx?f=255&MSPPError=-2147217396 + /* + key value Specifies a manually assigned key. + The decryptionKey value must be manually set to a string of + hexadecimal characters to ensure consistent configuration across all servers in a Web farm. + The key should be 64 bits (16 hexadecimal characters) long for DES encryption, or 192 bits + (48 hexadecimal characters) long for 3DES. For AES, the key can be 128 bits (32 characters), + 192 bits (48 characters), or 256 bits (64 characters) long. + */ + + //64 in length = 256 bits + return GenerateKey(64); + } + + private string GenerateKey(int len = 64) + { + var buff = new byte[len / 2]; + var rng = new RNGCryptoServiceProvider(); + rng.GetBytes(buff); + var sb = new StringBuilder(len); + + for (int i = 0; i < buff.Length; i++) + sb.Append(string.Format("{0:X2}", buff[i])); + + return sb.ToString(); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Security/MembershipPasswordHasher.cs b/src/Umbraco.Core/Security/MembershipPasswordHasher.cs deleted file mode 100644 index 56daa3efdd19..000000000000 --- a/src/Umbraco.Core/Security/MembershipPasswordHasher.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Microsoft.AspNet.Identity; - -namespace Umbraco.Core.Security -{ - /// - /// A custom password hasher that conforms to the current password hashing done in Umbraco - /// - internal class MembershipPasswordHasher : IPasswordHasher - { - private readonly MembershipProviderBase _provider; - - public MembershipPasswordHasher(MembershipProviderBase provider) - { - _provider = provider; - } - - public string HashPassword(string password) - { - return _provider.HashPasswordForStorage(password); - } - - public PasswordVerificationResult VerifyHashedPassword(string hashedPassword, string providedPassword) - { - return _provider.VerifyPassword(providedPassword, hashedPassword) - ? PasswordVerificationResult.Success - : PasswordVerificationResult.Failed; - } - - - } -} \ No newline at end of file diff --git a/src/Umbraco.Core/Security/MembershipProviderBase.cs b/src/Umbraco.Core/Security/MembershipProviderBase.cs index 4d4dad3fe884..ea7296fed295 100644 --- a/src/Umbraco.Core/Security/MembershipProviderBase.cs +++ b/src/Umbraco.Core/Security/MembershipProviderBase.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Specialized; +using System.ComponentModel.DataAnnotations; using System.Configuration.Provider; using System.Security.Cryptography; using System.Text; @@ -8,6 +9,7 @@ using System.Web.Configuration; using System.Web.Hosting; using System.Web.Security; +using Umbraco.Core.Configuration; using Umbraco.Core.Logging; using Umbraco.Core.Models; @@ -28,23 +30,24 @@ public string HashPasswordForStorage(string password) public bool VerifyPassword(string password, string hashedPassword) { + if (string.IsNullOrWhiteSpace(hashedPassword)) throw new ArgumentException("Value cannot be null or whitespace.", "hashedPassword"); return CheckPassword(password, hashedPassword); } /// - /// Providers can override this setting, default is 7 + /// Providers can override this setting, default is 10 /// public virtual int DefaultMinPasswordLength { - get { return 7; } + get { return 10; } } /// - /// Providers can override this setting, default is 1 + /// Providers can override this setting, default is 0 /// public virtual int DefaultMinNonAlphanumericChars { - get { return 1; } + get { return 0; } } /// @@ -64,6 +67,19 @@ public virtual bool AllowManuallyChangingPassword { get { return false; } } + + /// + /// Returns the raw password value for a given user + /// + /// + /// + /// + /// By default this will return an invalid attempt, inheritors will need to override this to support it + /// + protected virtual Attempt GetRawPassword(string username) + { + return Attempt.Fail(); + } private string _applicationName; private bool _enablePasswordReset; @@ -224,7 +240,7 @@ public override void Initialize(string name, NameValueCollection config) base.Initialize(name, config); _enablePasswordRetrieval = config.GetValue("enablePasswordRetrieval", false); - _enablePasswordReset = config.GetValue("enablePasswordReset", false); + _enablePasswordReset = config.GetValue("enablePasswordReset", true); _requiresQuestionAndAnswer = config.GetValue("requiresQuestionAndAnswer", false); _requiresUniqueEmail = config.GetValue("requiresUniqueEmail", true); _maxInvalidPasswordAttempts = GetIntValue(config, "maxInvalidPasswordAttempts", 5, false, 0); @@ -299,7 +315,7 @@ protected internal enum PasswordValidityError /// Processes a request to update the password for a membership user. /// /// The user to update the password for. - /// This property is ignore for this provider + /// Required to change a user password if the user is not new and AllowManuallyChangingPassword is false /// The new password for the specified user. /// /// true if the password was updated successfully; otherwise, false. @@ -309,10 +325,17 @@ protected internal enum PasswordValidityError /// public override bool ChangePassword(string username, string oldPassword, string newPassword) { + string rawPasswordValue = string.Empty; if (oldPassword.IsNullOrWhiteSpace() && AllowManuallyChangingPassword == false) - { - //If the old password is empty and AllowManuallyChangingPassword is false, than this provider cannot just arbitrarily change the password - throw new NotSupportedException("This provider does not support manually changing the password"); + { + //we need to lookup the member since this could be a brand new member without a password set + var rawPassword = GetRawPassword(username); + rawPasswordValue = rawPassword.Success ? rawPassword.Result : string.Empty; + if (rawPassword.Success == false || rawPasswordValue.StartsWith(Constants.Security.EmptyPasswordPrefix) == false) + { + //If the old password is empty and AllowManuallyChangingPassword is false, than this provider cannot just arbitrarily change the password + throw new NotSupportedException("This provider does not support manually changing the password"); + } } var args = new ValidatePasswordEventArgs(username, newPassword, false); @@ -325,10 +348,14 @@ public override bool ChangePassword(string username, string oldPassword, string throw new MembershipPasswordException("Change password canceled due to password validation failure."); } - //Special case to allow changing password without validating existing credentials - //This is used during installation only - if (AllowManuallyChangingPassword == false && ApplicationContext.Current != null - && ApplicationContext.Current.IsConfigured == false && oldPassword == "default") + //Special cases to allow changing password without validating existing credentials + // * the member is new and doesn't have a password set + // * during installation to set the admin password + if (AllowManuallyChangingPassword == false + && (rawPasswordValue.StartsWith(Constants.Security.EmptyPasswordPrefix) + || (ApplicationContext.Current != null + && ApplicationContext.Current.IsConfigured == false + && oldPassword == "default"))) { return PerformChangePassword(username, oldPassword, newPassword); } @@ -652,11 +679,7 @@ protected internal string FormatPasswordForStorage(string pass, string salt) internal static bool IsEmailValid(string email) { - const string pattern = @"^(?!\.)(""([^""\r\\]|\\[""\r\\])*""|" - + @"([-a-z0-9!#$%&'*+/=?^_`{|}~]|(? protected internal bool CheckPassword(string password, string dbPassword) { + if (string.IsNullOrWhiteSpace(dbPassword)) throw new ArgumentException("Value cannot be null or whitespace.", "dbPassword"); switch (PasswordFormat) { case MembershipPasswordFormat.Encrypted: @@ -794,6 +823,7 @@ protected internal string DecryptPassword(string pass) /// internal string StoredPassword(string storedString, out string salt) { + if (string.IsNullOrWhiteSpace(storedString)) throw new ArgumentException("Value cannot be null or whitespace.", "storedString"); if (UseLegacyEncoding) { salt = string.Empty; diff --git a/src/Umbraco.Core/Security/MembershipProviderExtensions.cs b/src/Umbraco.Core/Security/MembershipProviderExtensions.cs index 645de22ab84d..c423c1a94ac9 100644 --- a/src/Umbraco.Core/Security/MembershipProviderExtensions.cs +++ b/src/Umbraco.Core/Security/MembershipProviderExtensions.cs @@ -1,16 +1,11 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Security.Principal; -using System.Text; using System.Threading; -using System.Threading.Tasks; using System.Web; using System.Web.Hosting; using System.Web.Security; using Umbraco.Core.Configuration; using Umbraco.Core.Models; -using Umbraco.Core.Security; using Umbraco.Core.Services; namespace Umbraco.Core.Security @@ -23,6 +18,9 @@ public static class MembershipProviderExtensions /// /// /// + /// + /// An Admin can always reset the password + /// internal static bool CanResetPassword(this MembershipProvider provider, IUserService userService) { if (provider == null) throw new ArgumentNullException("provider"); @@ -31,13 +29,14 @@ internal static bool CanResetPassword(this MembershipProvider provider, IUserSer if (userService == null) return canReset; - //we need to check for the special case in which a user is an admin - in which acse they can reset the password even if EnablePasswordReset == false + //we need to check for the special case in which a user is an admin - in which case they can reset the password even if EnablePasswordReset == false if (provider.EnablePasswordReset == false) { var identity = Thread.CurrentPrincipal.GetUmbracoIdentity(); if (identity != null) { - var user = userService.GetByUsername(identity.Username); + var user = userService.GetUserById(identity.Id.TryConvertTo().Result); + if (user == null) throw new InvalidOperationException("No user with username " + identity.Username + " found"); var userIsAdmin = user.IsAdmin(); if (userIsAdmin) { @@ -70,7 +69,7 @@ internal static MembershipUser CreateUser(this MembershipProvider provider, stri } /// - /// Method to get the Umbraco Members membership provider based on it's alias + /// Method to get the Umbraco Members membership provider based on its alias /// /// public static MembershipProvider GetMembersMembershipProvider() @@ -83,7 +82,7 @@ public static MembershipProvider GetMembersMembershipProvider() } /// - /// Method to get the Umbraco Users membership provider based on it's alias + /// Method to get the Umbraco Users membership provider based on its alias /// /// public static MembershipProvider GetUsersMembershipProvider() @@ -167,6 +166,5 @@ public static UmbracoMembershipProviderBase AsUmbracoMembershipProvider(this Mem { return (UmbracoMembershipProviderBase)membershipProvider; } - } } diff --git a/src/Umbraco.Core/Security/MembershipProviderPasswordHasher.cs b/src/Umbraco.Core/Security/MembershipProviderPasswordHasher.cs new file mode 100644 index 000000000000..f518f99c5590 --- /dev/null +++ b/src/Umbraco.Core/Security/MembershipProviderPasswordHasher.cs @@ -0,0 +1,34 @@ +using Microsoft.AspNet.Identity; + +namespace Umbraco.Core.Security +{ + /// + /// A password hasher that conforms to the password hashing done with membership providers + /// + public class MembershipProviderPasswordHasher : IMembershipProviderPasswordHasher + { + /// + /// Exposes the underlying MembershipProvider + /// + public MembershipProviderBase MembershipProvider { get; private set; } + + public MembershipProviderPasswordHasher(MembershipProviderBase provider) + { + MembershipProvider = provider; + } + + public string HashPassword(string password) + { + return MembershipProvider.HashPasswordForStorage(password); + } + + public PasswordVerificationResult VerifyHashedPassword(string hashedPassword, string providedPassword) + { + return MembershipProvider.VerifyPassword(providedPassword, hashedPassword) + ? PasswordVerificationResult.Success + : PasswordVerificationResult.Failed; + } + + + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Security/MembershipProviderPasswordValidator.cs b/src/Umbraco.Core/Security/MembershipProviderPasswordValidator.cs new file mode 100644 index 000000000000..3331116b4eb3 --- /dev/null +++ b/src/Umbraco.Core/Security/MembershipProviderPasswordValidator.cs @@ -0,0 +1,38 @@ +using System.Threading.Tasks; +using System.Web.Security; +using Microsoft.AspNet.Identity; + +namespace Umbraco.Core.Security +{ + /// + /// Ensure that both the normal password validator rules are processed along with the underlying memberhsip provider rules + /// + public class MembershipProviderPasswordValidator : PasswordValidator + { + public MembershipProvider Provider { get; private set; } + + public MembershipProviderPasswordValidator(MembershipProvider provider) + { + Provider = provider; + + RequiredLength = Provider.MinRequiredPasswordLength; + RequireNonLetterOrDigit = Provider.MinRequiredNonAlphanumericCharacters > 0; + RequireDigit = false; + RequireLowercase = false; + RequireUppercase = false; + } + + public override async Task ValidateAsync(string item) + { + var result = await base.ValidateAsync(item); + if (result.Succeeded == false) + return result; + var providerValidate = MembershipProviderBase.IsPasswordValid(item, Provider.MinRequiredNonAlphanumericCharacters, Provider.PasswordStrengthRegularExpression, Provider.MinRequiredPasswordLength); + if (providerValidate.Success == false) + { + return IdentityResult.Failed("Could not set password, password rules violated: " + providerValidate.Result); + } + return IdentityResult.Success; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs b/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs index 1bc9902da5cf..39931341fadf 100644 --- a/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs +++ b/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs @@ -48,12 +48,20 @@ public static UmbracoBackOfficeIdentity FromClaimsIdentity(ClaimsIdentity identi || realName == null || session == null) throw new InvalidOperationException("Cannot create a " + typeof(UmbracoBackOfficeIdentity) + " from " + typeof(ClaimsIdentity) + " since there are missing required claims"); - int startContentIdAsInt; - int startMediaIdAsInt; - if (int.TryParse(startContentId, out startContentIdAsInt) == false || int.TryParse(startMediaId, out startMediaIdAsInt) == false) + int[] startContentIdsAsInt; + int[] startMediaIdsAsInt; + if (startContentId.DetectIsJson() == false || startMediaId.DetectIsJson() == false) + throw new InvalidOperationException("Cannot create a " + typeof(UmbracoBackOfficeIdentity) + " from " + typeof(ClaimsIdentity) + " since the data is not formatted correctly - either content or media start Ids are not JSON"); + + try { - throw new InvalidOperationException("Cannot create a " + typeof(UmbracoBackOfficeIdentity) + " from " + typeof(ClaimsIdentity) + " since the data is not formatted correctly"); + startContentIdsAsInt = JsonConvert.DeserializeObject(startContentId); + startMediaIdsAsInt = JsonConvert.DeserializeObject(startMediaId); } + catch (Exception e) + { + throw new InvalidOperationException("Cannot create a " + typeof(UmbracoBackOfficeIdentity) + " from " + typeof(ClaimsIdentity) + " since the data is not formatted correctly - either content or media start Ids could not be parsed as JSON", e); + } var roles = identity.FindAll(x => x.Type == DefaultRoleClaimType).Select(role => role.Value).ToList(); var allowedApps = identity.FindAll(x => x.Type == Constants.Security.AllowedApplicationsClaimType).Select(app => app.Value).ToList(); @@ -67,8 +75,8 @@ public static UmbracoBackOfficeIdentity FromClaimsIdentity(ClaimsIdentity identi Roles = roles.ToArray(), Username = username, RealName = realName, - StartContentNode = startContentIdAsInt, - StartMediaNode = startMediaIdAsInt + StartContentNodes = startContentIdsAsInt, + StartMediaNodes = startMediaIdsAsInt }; return new UmbracoBackOfficeIdentity(identity, userData); @@ -202,10 +210,10 @@ private void AddUserDataClaims() AddClaim(new Claim(ClaimTypes.GivenName, UserData.RealName, ClaimValueTypes.String, Issuer, Issuer, this)); if (HasClaim(x => x.Type == Constants.Security.StartContentNodeIdClaimType) == false) - AddClaim(new Claim(Constants.Security.StartContentNodeIdClaimType, StartContentNode.ToInvariantString(), ClaimValueTypes.Integer32, Issuer, Issuer, this)); + AddClaim(new Claim(Constants.Security.StartContentNodeIdClaimType, JsonConvert.SerializeObject(StartContentNodes), ClaimValueTypes.Integer32, Issuer, Issuer, this)); if (HasClaim(x => x.Type == Constants.Security.StartMediaNodeIdClaimType) == false) - AddClaim(new Claim(Constants.Security.StartMediaNodeIdClaimType, StartMediaNode.ToInvariantString(), ClaimValueTypes.Integer32, Issuer, Issuer, this)); + AddClaim(new Claim(Constants.Security.StartMediaNodeIdClaimType, JsonConvert.SerializeObject(StartMediaNodes), ClaimValueTypes.Integer32, Issuer, Issuer, this)); if (HasClaim(x => x.Type == ClaimTypes.Locality) == false) AddClaim(new Claim(ClaimTypes.Locality, Culture, ClaimValueTypes.String, Issuer, Issuer, this)); @@ -259,14 +267,14 @@ public override string AuthenticationType get { return _currentIssuer; } } - public int StartContentNode + public int[] StartContentNodes { - get { return UserData.StartContentNode; } + get { return UserData.StartContentNodes; } } - public int StartMediaNode + public int[] StartMediaNodes { - get { return UserData.StartMediaNode; } + get { return UserData.StartMediaNodes; } } public string[] AllowedApplications diff --git a/src/Umbraco.Core/Security/UmbracoEmailMessage.cs b/src/Umbraco.Core/Security/UmbracoEmailMessage.cs new file mode 100644 index 000000000000..9ef6205ebf14 --- /dev/null +++ b/src/Umbraco.Core/Security/UmbracoEmailMessage.cs @@ -0,0 +1,17 @@ +using Microsoft.AspNet.Identity; + +namespace Umbraco.Core.Security +{ + /// + /// A custom implementation for IdentityMessage that allows the customization of how an email is sent + /// + internal class UmbracoEmailMessage : IdentityMessage + { + public IEmailSender MailSender { get; private set; } + + public UmbracoEmailMessage(IEmailSender mailSender) + { + MailSender = mailSender; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Security/UserAwareMembershipProviderPasswordHasher.cs b/src/Umbraco.Core/Security/UserAwareMembershipProviderPasswordHasher.cs new file mode 100644 index 000000000000..7d19d72c3c8a --- /dev/null +++ b/src/Umbraco.Core/Security/UserAwareMembershipProviderPasswordHasher.cs @@ -0,0 +1,30 @@ +using System; +using Microsoft.AspNet.Identity; +using Umbraco.Core.Models.Identity; + +namespace Umbraco.Core.Security +{ + /// + /// The default password hasher that is User aware so that it can process the hashing based on the user's settings + /// + public class UserAwareMembershipProviderPasswordHasher : MembershipProviderPasswordHasher, IUserAwarePasswordHasher + { + public UserAwareMembershipProviderPasswordHasher(MembershipProviderBase provider) : base(provider) + { + } + + public string HashPassword(BackOfficeIdentityUser user, string password) + { + //TODO: Implement the logic for this, we need to lookup the password format for the user and hash accordingly: http://issues.umbraco.org/issue/U4-10089 + //NOTE: For now this just falls back to the hashing we are currently using + return base.HashPassword(password); + } + + public PasswordVerificationResult VerifyHashedPassword(BackOfficeIdentityUser user, string hashedPassword, string providedPassword) + { + //TODO: Implement the logic for this, we need to lookup the password format for the user and hash accordingly: http://issues.umbraco.org/issue/U4-10089 + //NOTE: For now this just falls back to the hashing we are currently using + return base.VerifyHashedPassword(hashedPassword, providedPassword); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Security/UserData.cs b/src/Umbraco.Core/Security/UserData.cs index 407d2782dd39..8761ada84750 100644 --- a/src/Umbraco.Core/Security/UserData.cs +++ b/src/Umbraco.Core/Security/UserData.cs @@ -46,12 +46,18 @@ public UserData(string sessionId) [DataMember(Name = "name")] public string RealName { get; set; } - + + /// + /// The start nodes on the UserData object for the auth ticket contains all of the user's start nodes including ones assigned to their user groups + /// [DataMember(Name = "startContent")] - public int StartContentNode { get; set; } - + public int[] StartContentNodes { get; set; } + + /// + /// The start nodes on the UserData object for the auth ticket contains all of the user's start nodes including ones assigned to their user groups + /// [DataMember(Name = "startMedia")] - public int StartMediaNode { get; set; } + public int[] StartMediaNodes { get; set; } [DataMember(Name = "allowedApps")] public string[] AllowedApplications { get; set; } diff --git a/src/Umbraco.Core/Serialization/KnownTypeUdiJsonConverter.cs b/src/Umbraco.Core/Serialization/KnownTypeUdiJsonConverter.cs new file mode 100644 index 000000000000..e6473e7f8e24 --- /dev/null +++ b/src/Umbraco.Core/Serialization/KnownTypeUdiJsonConverter.cs @@ -0,0 +1,26 @@ +using System; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +namespace Umbraco.Core.Serialization +{ + public class KnownTypeUdiJsonConverter : JsonConverter + { + public override bool CanConvert(Type objectType) + { + return typeof(Udi).IsAssignableFrom(objectType); + } + + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteValue(value.ToString()); + } + + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + var jo = JToken.ReadFrom(reader); + var val = jo.ToObject(); + return val == null ? null : Udi.Parse(val, true); + } + } +} diff --git a/src/Umbraco.Core/Serialization/UdiJsonConverter.cs b/src/Umbraco.Core/Serialization/UdiJsonConverter.cs index ff6253582574..f3dc678ce621 100644 --- a/src/Umbraco.Core/Serialization/UdiJsonConverter.cs +++ b/src/Umbraco.Core/Serialization/UdiJsonConverter.cs @@ -4,12 +4,11 @@ namespace Umbraco.Core.Serialization { - public class UdiJsonConverter : JsonConverter { public override bool CanConvert(Type objectType) { - return typeof(Udi).IsAssignableFrom(objectType); + return typeof (Udi).IsAssignableFrom(objectType); } public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) diff --git a/src/Umbraco.Core/Services/ContentService.cs b/src/Umbraco.Core/Services/ContentService.cs index 3cf8dfcff4bc..1c9d1b48a658 100644 --- a/src/Umbraco.Core/Services/ContentService.cs +++ b/src/Umbraco.Core/Services/ContentService.cs @@ -13,13 +13,11 @@ using Umbraco.Core.Models.Membership; using Umbraco.Core.Models.Rdbms; using Umbraco.Core.Persistence; - using Umbraco.Core.Persistence.DatabaseModelDefinitions; using Umbraco.Core.Persistence.Querying; using Umbraco.Core.Persistence.Repositories; using Umbraco.Core.Persistence.UnitOfWork; using Umbraco.Core.Publishing; -using Umbraco.Core.Scoping; namespace Umbraco.Core.Services { @@ -32,7 +30,6 @@ public class ContentService : ScopeRepositoryService, IContentService, IContentS private readonly EntityXmlSerializer _entitySerializer = new EntityXmlSerializer(); private readonly IDataTypeService _dataTypeService; private readonly IUserService _userService; - private readonly IdkMap _idkMap; //Support recursive locks because some of the methods that require locking call other methods that require locking. //for example, the Move method needs to be locked but this calls the Save method which also needs to be locked. @@ -44,8 +41,7 @@ public ContentService( ILogger logger, IEventMessagesFactory eventMessagesFactory, IDataTypeService dataTypeService, - IUserService userService, - IdkMap idkMap) + IUserService userService) : base(provider, repositoryFactory, logger, eventMessagesFactory) { if (dataTypeService == null) throw new ArgumentNullException("dataTypeService"); @@ -53,7 +49,6 @@ public ContentService( _publishingStrategy = new PublishingStrategy(UowProvider.ScopeProvider, eventMessagesFactory, logger); _dataTypeService = dataTypeService; _userService = userService; - _idkMap = idkMap; } #region Static Queries @@ -114,27 +109,27 @@ public void ReplaceContentPermissions(EntityPermissionSet permissionSet) } /// - /// Assigns a single permission to the current content item for the specified user ids + /// Assigns a single permission to the current content item for the specified group ids /// /// /// - /// - public void AssignContentPermission(IContent entity, char permission, IEnumerable userIds) + /// + public void AssignContentPermission(IContent entity, char permission, IEnumerable groupIds) { using (var uow = UowProvider.GetUnitOfWork()) { var repository = RepositoryFactory.CreateContentRepository(uow); - repository.AssignEntityPermission(entity, permission, userIds); + repository.AssignEntityPermission(entity, permission, groupIds); uow.Commit(); } } /// - /// Gets the list of permissions for the content item + /// Returns implicit/inherited permissions assigned to the content item for all user groups /// /// /// - public IEnumerable GetPermissionsForEntity(IContent content) + public EntityPermissionCollection GetPermissionsForEntity(IContent content) { using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) { @@ -143,6 +138,26 @@ public IEnumerable GetPermissionsForEntity(IContent content) } } + /// + /// Creates an object using the alias of the + /// that this Content should based on. + /// + /// + /// Note that using this method will simply return a new IContent without any identity + /// as it has not yet been persisted. It is intended as a shortcut to creating new content objects + /// that does not invoke a save operation against the database. + /// + /// Name of the Content object + /// Id of Parent for the new Content + /// Alias of the + /// Optional id of the user creating the content + /// + public IContent CreateContent(string name, Guid parentId, string contentTypeAlias, int userId = 0) + { + var parent = GetById(parentId); + return CreateContent(name, parent, contentTypeAlias, userId); + } + /// /// Creates an object using the alias of the /// that this Content should based on. @@ -166,7 +181,8 @@ public IContent CreateContent(string name, int parentId, string contentTypeAlias using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(Creating, this, new NewEventArgs(content, contentTypeAlias, parentId))) + var newEventArgs = new NewEventArgs(content, contentTypeAlias, parentId); + if (uow.Events.DispatchCancelable(Creating, this, newEventArgs)) { uow.Commit(); content.WasCancelled = true; @@ -175,10 +191,9 @@ public IContent CreateContent(string name, int parentId, string contentTypeAlias content.CreatorId = userId; content.WriterId = userId; + newEventArgs.CanCancel = false; + uow.Events.Dispatch(Created, this, newEventArgs); - uow.Events.Dispatch(Created, this, new NewEventArgs(content, false, contentTypeAlias, parentId)); - - Audit(uow, AuditType.New, string.Format("Content '{0}' was created", name), content.CreatorId, content.Id); uow.Commit(); } @@ -209,7 +224,8 @@ public IContent CreateContent(string name, IContent parent, string contentTypeAl using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(Creating, this, new NewEventArgs(content, contentTypeAlias, parent))) + var newEventArgs = new NewEventArgs(content, contentTypeAlias, parent); + if (uow.Events.DispatchCancelable(Creating, this, newEventArgs)) { uow.Commit(); content.WasCancelled = true; @@ -218,10 +234,9 @@ public IContent CreateContent(string name, IContent parent, string contentTypeAl content.CreatorId = userId; content.WriterId = userId; + newEventArgs.CanCancel = false; + uow.Events.Dispatch(Created, this, newEventArgs); - uow.Events.Dispatch(Created, this, new NewEventArgs(content, false, contentTypeAlias, parent)); - - Audit(uow, AuditType.New, string.Format("Content '{0}' was created", name), content.CreatorId, content.Id); uow.Commit(); } @@ -250,14 +265,16 @@ public IContent CreateContentWithIdentity(string name, int parentId, string cont { //NOTE: I really hate the notion of these Creating/Created events - they are so inconsistent, I've only just found // out that in these 'WithIdentity' methods, the Saving/Saved events were not fired, wtf. Anyways, they're added now. - if (uow.Events.DispatchCancelable(Creating, this, new NewEventArgs(content, contentTypeAlias, parentId))) + var newEventArgs = new NewEventArgs(content, contentTypeAlias, parentId); + if (uow.Events.DispatchCancelable(Creating, this, newEventArgs)) { uow.Commit(); content.WasCancelled = true; return content; } - if (uow.Events.DispatchCancelable(Saving, this, new SaveEventArgs(content))) + var saveEventArgs = new SaveEventArgs(content); + if (uow.Events.DispatchCancelable(Saving, this, saveEventArgs, "Saving")) { uow.Commit(); content.WasCancelled = true; @@ -270,9 +287,10 @@ public IContent CreateContentWithIdentity(string name, int parentId, string cont repository.AddOrUpdate(content); repository.AddOrUpdatePreviewXml(content, c => _entitySerializer.Serialize(this, _dataTypeService, _userService, c)); - - uow.Events.Dispatch(Saved, this, new SaveEventArgs(content, false)); - uow.Events.Dispatch(Created, this, new NewEventArgs(content, false, contentTypeAlias, parentId)); + saveEventArgs.CanCancel = false; + uow.Events.Dispatch(Saved, this, saveEventArgs, "Saved"); + newEventArgs.CanCancel = false; + uow.Events.Dispatch(Created, this, newEventArgs); Audit(uow, AuditType.New, string.Format("Content '{0}' was created with Id {1}", name, content.Id), content.CreatorId, content.Id); uow.Commit(); @@ -305,14 +323,16 @@ public IContent CreateContentWithIdentity(string name, IContent parent, string c { //NOTE: I really hate the notion of these Creating/Created events - they are so inconsistent, I've only just found // out that in these 'WithIdentity' methods, the Saving/Saved events were not fired, wtf. Anyways, they're added now. - if (uow.Events.DispatchCancelable(Creating, this, new NewEventArgs(content, contentTypeAlias, parent))) + var newEventArgs = new NewEventArgs(content, contentTypeAlias, parent); + if (uow.Events.DispatchCancelable(Creating, this, newEventArgs)) { uow.Commit(); content.WasCancelled = true; return content; } - if (uow.Events.DispatchCancelable(Saving, this, new SaveEventArgs(content))) + var saveEventArgs = new SaveEventArgs(content); + if (uow.Events.DispatchCancelable(Saving, this, saveEventArgs, "Saving")) { uow.Commit(); content.WasCancelled = true; @@ -325,9 +345,10 @@ public IContent CreateContentWithIdentity(string name, IContent parent, string c repository.AddOrUpdate(content); repository.AddOrUpdatePreviewXml(content, c => _entitySerializer.Serialize(this, _dataTypeService, _userService, c)); - - uow.Events.Dispatch(Saved, this, new SaveEventArgs(content, false)); - uow.Events.Dispatch(Created, this, new NewEventArgs(content, false, contentTypeAlias, parent)); + saveEventArgs.CanCancel = false; + uow.Events.Dispatch(Saved, this, saveEventArgs, "Saved"); + newEventArgs.CanCancel = false; + uow.Events.Dispatch(Created, this, newEventArgs); Audit(uow, AuditType.New, string.Format("Content '{0}' was created with Id {1}", name, content.Id), content.CreatorId, content.Id); uow.Commit(); @@ -351,7 +372,7 @@ public IContent GetById(int id) } /// - /// Gets an object by Id + /// Gets objects by Ids /// /// Ids of the Content to retrieve /// @@ -378,6 +399,34 @@ public IEnumerable GetByIds(IEnumerable ids) } } + /// + /// Gets objects by Ids + /// + /// Ids of the Content to retrieve + /// + public IEnumerable GetByIds(IEnumerable ids) + { + var idsArray = ids.ToArray(); + if (idsArray.Length == 0) return Enumerable.Empty(); + + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateContentRepository(uow); + + // ensure that the result has the order based on the ids passed in + var result = repository.GetAll(idsArray); + var content = result.ToDictionary(x => x.Key, x => x); + + var sortedResult = idsArray.Select(x => + { + IContent c; + return content.TryGetValue(x, out c) ? c : null; + }).WhereNotNull(); + + return sortedResult; + } + } + /// /// Gets an object by its 'UniqueId' /// @@ -385,13 +434,11 @@ public IEnumerable GetByIds(IEnumerable ids) /// public IContent GetById(Guid key) { - // the repository implements a cache policy on int identifiers, not guids, - // and we are not changing it now, but we still would like to rely on caching - // instead of running a full query against the database, so relying on the - // id-key map, which is fast. - - var a = _idkMap.GetIdForKey(key, UmbracoObjectTypes.Document); - return a.Success ? GetById(a.Result) : null; + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateContentRepository(uow); + return repository.Get(key); + } } /// @@ -637,7 +684,17 @@ public IEnumerable GetPagedDescendants(int id, long pageIndex, int pag // get query - if the id is System Root, then just get all var query = Query.Builder; if (id != Constants.System.Root) - query.Where(x => x.Path.SqlContains(string.Format(",{0},", id), TextColumnType.NVarchar)); + { + var entityRepository = RepositoryFactory.CreateEntityRepository(uow); + var contentPath = entityRepository.GetAllPaths(Constants.ObjectTypes.DocumentGuid, id).ToArray(); + if (contentPath.Length == 0) + { + totalChildren = 0; + return Enumerable.Empty(); + } + query.Where(x => x.Path.SqlStartsWith(string.Format("{0},", contentPath[0]), TextColumnType.NVarchar)); + } + // get filter IQuery filterQuery = null; @@ -672,7 +729,16 @@ public IEnumerable GetPagedDescendants(int id, long pageIndex, int pag // get query - if the id is System Root, then just get all var query = Query.Builder; if (id != Constants.System.Root) - query.Where(x => x.Path.SqlContains(string.Format(",{0},", id), TextColumnType.NVarchar)); + { + var entityRepository = RepositoryFactory.CreateEntityRepository(uow); + var contentPath = entityRepository.GetAllPaths(Constants.ObjectTypes.DocumentGuid, id).ToArray(); + if (contentPath.Length == 0) + { + totalChildren = 0; + return Enumerable.Empty(); + } + query.Where(x => x.Path.SqlStartsWith(string.Format("{0},", contentPath[0]), TextColumnType.NVarchar)); + } return repository.GetPagedResultsByQuery(query, pageIndex, pageSize, out totalChildren, orderBy, orderDirection, orderBySystemField, filter); } @@ -895,15 +961,43 @@ public bool HasPublishedVersion(int id) /// True if the Content can be published, otherwise False public bool IsPublishable(IContent content) { - //If the passed in content has yet to be saved we "fallback" to checking the Parent - //because if the Parent is publishable then the current content can be Saved and Published - if (content.HasIdentity == false) + int[] ids; + if (content.HasIdentity) + { + // get ids from path (we have identity) + // skip the first one that has to be -1 - and we don't care + // skip the last one that has to be "this" - and it's ok to stop at the parent + ids = content.Path.Split(',').Skip(1).SkipLast().Select(int.Parse).ToArray(); + } + else { + // no path yet (no identity), have to move up to parent + // skip the first one that has to be -1 - and we don't care + // don't skip the last one that is "parent" var parent = GetById(content.ParentId); - return IsPublishable(parent, true); + if (parent == null) return false; + ids = parent.Path.Split(',').Skip(1).Select(int.Parse).ToArray(); } + if (ids.Length == 0) + return false; + + // if the first one is recycle bin, fail fast + if (ids[0] == Constants.System.RecycleBinContent) + return false; - return IsPublishable(content, false); + // fixme - move to repository? + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var sql = new Sql(@" + SELECT id + FROM umbracoNode + JOIN cmsDocument ON umbracoNode.id=cmsDocument.nodeId AND cmsDocument.published=@0 + WHERE umbracoNode.trashed=@1 AND umbracoNode.id IN (@2)", + true, false, ids); + Console.WriteLine(sql.SQL); + var x = uow.Database.Fetch(sql); + return ids.Length == x.Count; + } } /// @@ -1018,14 +1112,16 @@ private Attempt MoveToRecycleBinDo(IContent content, int userId //see: http://issues.umbraco.org/issue/U4-9336 content.EnsureValidPath(Logger, entity => GetById(entity.ParentId), QuickUpdate); var originalPath = content.Path; - if (uow.Events.DispatchCancelable(Trashing, this, new MoveEventArgs(evtMsgs, new MoveEventInfo(content, originalPath, Constants.System.RecycleBinContent)), "Trashing")) + var moveEventInfo = new MoveEventInfo(content, originalPath, Constants.System.RecycleBinContent); + var moveEventArgs = new MoveEventArgs(evtMsgs, moveEventInfo); + if (uow.Events.DispatchCancelable(Trashing, this, moveEventArgs, "Trashing")) { uow.Commit(); return OperationStatus.Cancelled(evtMsgs); } var moveInfo = new List> { - new MoveEventInfo(content, originalPath, Constants.System.RecycleBinContent) + moveEventInfo }; //get descendents to process of the content item that is being moved to trash - must be done before changing the state below @@ -1056,7 +1152,9 @@ private Attempt MoveToRecycleBinDo(IContent content, int userId moveInfo.Add(new MoveEventInfo(descendant, descendant.Path, descendant.ParentId)); } - uow.Events.Dispatch(Trashed, this, new MoveEventArgs(false, evtMsgs, moveInfo.ToArray()), "Trashed"); + moveEventArgs.CanCancel = false; + moveEventArgs.MoveInfoCollection = moveInfo; + uow.Events.Dispatch(Trashed, this, moveEventArgs, "Trashed"); Audit(uow, AuditType.Move, "Move Content to Recycle Bin performed by user", userId, content.Id); uow.Commit(); @@ -1158,6 +1256,95 @@ public Attempt SaveAndPublishWithStatus(IContent content, int use return ((IContentServiceOperations)this).SaveAndPublish(content, userId, raiseEvents); } + public IContent GetBlueprintById(int id) + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateContentBlueprintRepository(uow); + var blueprint = repository.Get(id); + if (blueprint != null) + ((Content) blueprint).IsBlueprint = true; + return blueprint; + } + } + + public IContent GetBlueprintById(Guid id) + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateContentBlueprintRepository(uow); + var blueprint = repository.Get(id); + if (blueprint != null) + ((Content)blueprint).IsBlueprint = true; + return blueprint; + } + } + + public void SaveBlueprint(IContent content, int userId = 0) + { + //always ensure the blueprint is at the root + if (content.ParentId != -1) + content.ParentId = -1; + + ((Content) content).IsBlueprint = true; + + using (new WriteLock(Locker)) + { + using (var uow = UowProvider.GetUnitOfWork()) + { + if (string.IsNullOrWhiteSpace(content.Name)) + { + throw new ArgumentException("Cannot save content blueprint with empty name."); + } + + var repository = RepositoryFactory.CreateContentBlueprintRepository(uow); + + if (content.HasIdentity == false) + { + content.CreatorId = userId; + } + content.WriterId = userId; + + repository.AddOrUpdate(content); + + uow.Events.Dispatch(SavedBlueprint, this, new SaveEventArgs(content), "SavedBlueprint"); + + uow.Commit(); + } + } + } + + public void DeleteBlueprint(IContent content, int userId = 0) + { + using (new WriteLock(Locker)) + { + using (var uow = UowProvider.GetUnitOfWork()) + { + var repository = RepositoryFactory.CreateContentBlueprintRepository(uow); + repository.Delete(content); + uow.Events.Dispatch(DeletedBlueprint, this, new DeleteEventArgs(content), "DeletedBlueprint"); + uow.Commit(); + } + } + } + + public IContent CreateContentFromBlueprint(IContent blueprint, string name, int userId = 0) + { + if (blueprint == null) throw new ArgumentNullException("blueprint"); + + var contentType = blueprint.ContentType; + var content = new Content(name, -1, contentType); + content.Path = string.Concat(content.ParentId.ToString(), ",", content.Id); + + content.CreatorId = userId; + content.WriterId = userId; + + foreach (var property in blueprint.Properties) + content.SetValue(property.Alias, property.Value); + + return content; + } + /// /// Saves a single object /// @@ -1183,7 +1370,8 @@ Attempt IContentServiceOperations.Save(IEnumerable co using (var uow = UowProvider.GetUnitOfWork()) { - if (raiseEvents && uow.Events.DispatchCancelable(Saving, this, new SaveEventArgs(asArray, evtMsgs))) + var saveEventArgs = new SaveEventArgs(asArray, evtMsgs); + if (raiseEvents && uow.Events.DispatchCancelable(Saving, this, saveEventArgs, "Saving")) { uow.Commit(); return OperationStatus.Cancelled(evtMsgs); @@ -1224,7 +1412,10 @@ Attempt IContentServiceOperations.Save(IEnumerable co } if (raiseEvents) - uow.Events.Dispatch(Saved, this, new SaveEventArgs(asArray, false, evtMsgs)); + { + saveEventArgs.CanCancel = false; + uow.Events.Dispatch(Saved, this, saveEventArgs, "Saved"); + } Audit(uow, AuditType.Save, "Bulk Save content performed by user", userId == -1 ? 0 : userId, Constants.System.Root); uow.Commit(); @@ -1250,7 +1441,8 @@ Attempt IContentServiceOperations.Delete(IContent content, int { using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(Deleting, this, new DeleteEventArgs(content, evtMsgs), "Deleting")) + var deleteEventArgs = new DeleteEventArgs(content, evtMsgs); + if (uow.Events.DispatchCancelable(Deleting, this, deleteEventArgs, "Deleting")) { uow.Commit(); return OperationStatus.Cancelled(evtMsgs); @@ -1273,8 +1465,8 @@ Attempt IContentServiceOperations.Delete(IContent content, int repository.Delete(content); - var args = new DeleteEventArgs(content, false, evtMsgs); - uow.Events.Dispatch(Deleted, this, args, "Deleted"); + deleteEventArgs.CanCancel = false; + uow.Events.Dispatch(Deleted, this, deleteEventArgs, "Deleted"); Audit(uow, AuditType.Delete, "Delete Content performed by user", userId, content.Id); uow.Commit(); @@ -1402,7 +1594,8 @@ public void DeleteVersions(int id, DateTime versionDate, int userId = 0) { using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(DeletingVersions, this, new DeleteRevisionsEventArgs(id, dateToRetain: versionDate), "DeletingVersions")) + var deleteRevisionsEventArgs = new DeleteRevisionsEventArgs(id, dateToRetain: versionDate); + if (uow.Events.DispatchCancelable(DeletingVersions, this, deleteRevisionsEventArgs, "DeletingVersions")) { uow.Commit(); return; @@ -1410,8 +1603,8 @@ public void DeleteVersions(int id, DateTime versionDate, int userId = 0) var repository = RepositoryFactory.CreateContentRepository(uow); repository.DeleteVersions(id, versionDate); - - uow.Events.Dispatch(DeletedVersions, this, new DeleteRevisionsEventArgs(id, false, dateToRetain: versionDate), "DeletedVersions"); + deleteRevisionsEventArgs.CanCancel = false; + uow.Events.Dispatch(DeletedVersions, this, deleteRevisionsEventArgs, "DeletedVersions"); Audit(uow, AuditType.Delete, "Delete Content by version date performed by user", userId, Constants.System.Root); uow.Commit(); @@ -1490,7 +1683,9 @@ public void Move(IContent content, int parentId, int userId = 0) using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(Moving, this, new MoveEventArgs(new MoveEventInfo(content, content.Path, parentId)), "Moving")) + var moveEventInfo = new MoveEventInfo(content, content.Path, parentId); + var moveEventArgs = new MoveEventArgs(moveEventInfo); + if (uow.Events.DispatchCancelable(Moving, this, moveEventArgs, "Moving")) { uow.Commit(); return; @@ -1502,7 +1697,9 @@ public void Move(IContent content, int parentId, int userId = 0) //call private method that does the recursive moving PerformMove(content, parentId, userId, moveInfo); - uow.Events.Dispatch(Moved, this, new MoveEventArgs(false, moveInfo.ToArray()), "Moved"); + moveEventArgs.MoveInfoCollection = moveInfo; + moveEventArgs.CanCancel = false; + uow.Events.Dispatch(Moved, this, moveEventArgs, "Moved"); Audit(uow, AuditType.Move, "Move Content performed by user", userId, content.Id); uow.Commit(); @@ -1517,7 +1714,7 @@ public void EmptyRecycleBin() { using (new WriteLock(Locker)) { - var nodeObjectType = new Guid(Constants.ObjectTypes.Document); + var nodeObjectType = Constants.ObjectTypes.DocumentGuid; using (var uow = UowProvider.GetUnitOfWork()) { @@ -1531,15 +1728,17 @@ public void EmptyRecycleBin() var files = ((ContentRepository)repository).GetFilesInRecycleBinForUploadField(); - if (uow.Events.DispatchCancelable(EmptyingRecycleBin, this, new RecycleBinEventArgs(nodeObjectType, entities, files))) + var recycleBinEventArgs = new RecycleBinEventArgs(nodeObjectType, entities, files); + if (uow.Events.DispatchCancelable(EmptyingRecycleBin, this, recycleBinEventArgs)) { uow.Commit(); return; } var success = repository.EmptyRecycleBin(); - - uow.Events.Dispatch(EmptiedRecycleBin, this, new RecycleBinEventArgs(nodeObjectType, entities, files, success)); + recycleBinEventArgs.CanCancel = false; + recycleBinEventArgs.RecycleBinEmptiedSuccessfully = success; + uow.Events.Dispatch(EmptiedRecycleBin, this, recycleBinEventArgs); Audit(uow, AuditType.Delete, "Empty Content Recycle Bin performed by user", 0, Constants.System.RecycleBinContent); uow.Commit(); @@ -1586,7 +1785,8 @@ public IContent Copy(IContent content, int parentId, bool relateToOriginal, bool using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(Copying, this, new CopyEventArgs(content, copy, parentId))) + var copyEventArgs = new CopyEventArgs(content, copy, true, parentId, relateToOriginal); + if (uow.Events.DispatchCancelable(Copying, this, copyEventArgs)) { uow.Commit(); return null; @@ -1598,8 +1798,20 @@ public IContent Copy(IContent content, int parentId, bool relateToOriginal, bool copy.CreatorId = userId; copy.WriterId = userId; + //get the current permissions, if there are any explicit ones they need to be copied + var currentPermissions = GetPermissionsForEntity(content); + currentPermissions.RemoveWhere(p => p.IsDefaultPermissions); + repository.AddOrUpdate(copy); repository.AddOrUpdatePreviewXml(copy, c => _entitySerializer.Serialize(this, _dataTypeService, _userService, c)); + + //add permissions + if (currentPermissions.Count > 0) + { + var permissionSet = new ContentPermissionSet(copy, currentPermissions); + repository.AddOrUpdatePermissions(permissionSet); + } + uow.Commit(); // todo - this should flush, not commit //Special case for the associated tags @@ -1627,7 +1839,8 @@ public IContent Copy(IContent content, int parentId, bool relateToOriginal, bool Copy(child, copy.Id, relateToOriginal, true, userId); } } - uow.Events.Dispatch(Copied, this, new CopyEventArgs(content, copy, false, parentId, relateToOriginal)); + copyEventArgs.CanCancel = false; + uow.Events.Dispatch(Copied, this, copyEventArgs); Audit(uow, AuditType.Copy, "Copy Content performed by user", content.WriterId, content.Id); uow.Commit(); } @@ -1647,7 +1860,8 @@ public bool SendToPublication(IContent content, int userId = 0) { using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(SendingToPublish, this, new SendToPublishEventArgs(content))) + var sendToPublishEventArgs = new SendToPublishEventArgs(content); + if (uow.Events.DispatchCancelable(SendingToPublish, this, sendToPublishEventArgs)) { uow.Commit(); return false; @@ -1655,8 +1869,8 @@ public bool SendToPublication(IContent content, int userId = 0) //Save before raising event Save(content, userId); - - uow.Events.Dispatch(SentToPublish, this, new SendToPublishEventArgs(content, false)); + sendToPublishEventArgs.CanCancel = false; + uow.Events.Dispatch(SentToPublish, this, sendToPublishEventArgs); Audit(uow, AuditType.SendToPublish, "Send to Publish performed by user", content.WriterId, content.Id); uow.Commit(); @@ -1683,7 +1897,8 @@ public IContent Rollback(int id, Guid versionId, int userId = 0) using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(RollingBack, this, new RollbackEventArgs(content))) + var rollbackEventArgs = new RollbackEventArgs(content); + if (uow.Events.DispatchCancelable(RollingBack, this, rollbackEventArgs)) { uow.Commit(); return content; @@ -1697,8 +1912,8 @@ public IContent Rollback(int id, Guid versionId, int userId = 0) repository.AddOrUpdate(content); repository.AddOrUpdatePreviewXml(content, c => _entitySerializer.Serialize(this, _dataTypeService, _userService, c)); - - uow.Events.Dispatch(RolledBack, this, new RollbackEventArgs(content, false)); + rollbackEventArgs.CanCancel = false; + uow.Events.Dispatch(RolledBack, this, rollbackEventArgs); Audit(uow, AuditType.RollBack, "Content rollback performed by user", content.WriterId, content.Id); uow.Commit(); @@ -1729,7 +1944,8 @@ public bool Sort(IEnumerable items, int userId = 0, bool raiseEvents = using (var uow = UowProvider.GetUnitOfWork()) { var asArray = items.ToArray(); - if (raiseEvents && uow.Events.DispatchCancelable(Saving, this, new SaveEventArgs(asArray))) + var saveEventArgs = new SaveEventArgs(asArray); + if (raiseEvents && uow.Events.DispatchCancelable(Saving, this, saveEventArgs, "Saving")) { uow.Commit(); return false; @@ -1774,7 +1990,10 @@ public bool Sort(IEnumerable items, int userId = 0, bool raiseEvents = } if (raiseEvents) - uow.Events.Dispatch(Saved, this, new SaveEventArgs(asArray, false)); + { + saveEventArgs.CanCancel = false; + uow.Events.Dispatch(Saved, this, saveEventArgs, "Saved"); + } if (shouldBePublished.Any()) { @@ -1790,6 +2009,25 @@ public bool Sort(IEnumerable items, int userId = 0, bool raiseEvents = return true; } + public IEnumerable GetBlueprintsForContentTypes(params int[] documentTypeIds) + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateContentBlueprintRepository(uow); + + var query = new Query(); + if (documentTypeIds.Length > 0) + { + query.Where(x => documentTypeIds.Contains(x.ContentTypeId)); + } + return repository.GetByQuery(query).Select(x => + { + ((Content) x).IsBlueprint = true; + return x; + }); + } + } + /// /// Gets paged content descendants as XML by path /// @@ -2138,7 +2376,8 @@ private Attempt SaveAndPublishDo(IContent content, int userId = 0 { using (var uow = UowProvider.GetUnitOfWork()) { - if (raiseEvents && uow.Events.DispatchCancelable(Saving, this, new SaveEventArgs(content, evtMsgs))) + var saveEventArgs = new SaveEventArgs(content, evtMsgs); + if (raiseEvents && uow.Events.DispatchCancelable(Saving, this, saveEventArgs, "Saving")) { uow.Commit(); return Attempt.Fail(new PublishStatus(content, PublishStatusType.FailedCancelledByEvent, evtMsgs)); @@ -2193,7 +2432,10 @@ private Attempt SaveAndPublishDo(IContent content, int userId = 0 } if (raiseEvents) - uow.Events.Dispatch(Saved, this, new SaveEventArgs(content, false, evtMsgs)); + { + saveEventArgs.CanCancel = false; + uow.Events.Dispatch(Saved, this, saveEventArgs, "Saved"); + } //Save xml to db and call following method to fire event through PublishingStrategy to update cache if (published) @@ -2232,7 +2474,8 @@ private Attempt Save(IContent content, bool changeState, int us { using (var uow = UowProvider.GetUnitOfWork()) { - if (raiseEvents && uow.Events.DispatchCancelable(Saving, this, new SaveEventArgs(content, evtMsgs))) + var saveEventArgs = new SaveEventArgs(content, evtMsgs); + if (raiseEvents && uow.Events.DispatchCancelable(Saving, this, saveEventArgs, "Saving")) { uow.Commit(); return OperationStatus.Cancelled(evtMsgs); @@ -2261,7 +2504,10 @@ private Attempt Save(IContent content, bool changeState, int us repository.AddOrUpdatePreviewXml(content, c => _entitySerializer.Serialize(this, _dataTypeService, _userService, c)); if (raiseEvents) - uow.Events.Dispatch(Saved, this, new SaveEventArgs(content, false, evtMsgs)); + { + saveEventArgs.CanCancel = false; + uow.Events.Dispatch(Saved, this, saveEventArgs, "Saved"); + } Audit(uow, AuditType.Save, "Save Content performed by user", userId, content.Id); uow.Commit(); @@ -2271,40 +2517,6 @@ private Attempt Save(IContent content, bool changeState, int us } } - /// - /// Checks if the passed in can be published based on the anscestors publish state. - /// - /// - /// Check current is only used when falling back to checking the Parent of non-saved content, as - /// non-saved content doesn't have a valid path yet. - /// - /// to check if anscestors are published - /// Boolean indicating whether the passed in content should also be checked for published versions - /// True if the Content can be published, otherwise False - private bool IsPublishable(IContent content, bool checkCurrent) - { - var ids = content.Path.Split(',').Select(int.Parse).ToList(); - foreach (var id in ids) - { - //If Id equals that of the recycle bin we return false because nothing in the bin can be published - if (id == Constants.System.RecycleBinContent) - return false; - - //We don't check the System Root, so just continue - if (id == Constants.System.Root) continue; - - //If the current id equals that of the passed in content and if current shouldn't be checked we skip it. - if (checkCurrent == false && id == content.Id) continue; - - //Check if the content for the current id is published - escape the loop if we encounter content that isn't published - var hasPublishedVersion = HasPublishedVersion(id); - if (hasPublishedVersion == false) - return false; - } - - return true; - } - private PublishStatusType CheckAndLogIsPublishable(IContent content) { //Check if parent is published (although not if its a root node) - if parent isn't published this Content cannot be published @@ -2524,6 +2736,17 @@ public static event TypedEventHandler public static event TypedEventHandler EmptiedRecycleBin; + + /// + /// Occurs after a blueprint has been saved. + /// + public static event TypedEventHandler> SavedBlueprint; + + /// + /// Occurs after a blueprint has been deleted. + /// + public static event TypedEventHandler> DeletedBlueprint; + #endregion } } \ No newline at end of file diff --git a/src/Umbraco.Core/Services/ContentServiceExtensions.cs b/src/Umbraco.Core/Services/ContentServiceExtensions.cs index d2ce1de2f850..6e3f75c42dcd 100644 --- a/src/Umbraco.Core/Services/ContentServiceExtensions.cs +++ b/src/Umbraco.Core/Services/ContentServiceExtensions.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Linq; using Umbraco.Core.Models; @@ -8,8 +9,43 @@ namespace Umbraco.Core.Services { + /// + /// Content service extension methods + /// public static class ContentServiceExtensions - { + { + public static IEnumerable GetByIds(this IContentService contentService, IEnumerable ids) + { + var guids = new List(); + foreach (var udi in ids) + { + var guidUdi = udi as GuidUdi; + if (guidUdi == null) + throw new InvalidOperationException("The UDI provided isn't of type " + typeof(GuidUdi) + " which is required by content"); + guids.Add(guidUdi); + } + + return contentService.GetByIds(guids.Select(x => x.Guid)); + } + + /// + /// Method to create an IContent object based on the Udi of a parent + /// + /// + /// + /// + /// + /// + /// + public static IContent CreateContent(this IContentService contentService, string name, Udi parentId, string mediaTypeAlias, int userId = 0) + { + var guidUdi = parentId as GuidUdi; + if (guidUdi == null) + throw new InvalidOperationException("The UDI provided isn't of type " + typeof(GuidUdi) + " which is required by content"); + var parent = contentService.GetById(guidUdi.Guid); + return contentService.CreateContent(name, parent, mediaTypeAlias, userId); + } + /// /// Remove all permissions for this user for all nodes /// @@ -17,7 +53,7 @@ public static class ContentServiceExtensions /// public static void RemoveContentPermissions(this IContentService contentService, int contentId) { - contentService.ReplaceContentPermissions(new EntityPermissionSet(contentId, Enumerable.Empty())); + contentService.ReplaceContentPermissions(new EntityPermissionSet(contentId, new EntityPermissionCollection())); } /// diff --git a/src/Umbraco.Core/Services/ContentTypeService.cs b/src/Umbraco.Core/Services/ContentTypeService.cs index 1b6735153df8..7de374b1407f 100644 --- a/src/Umbraco.Core/Services/ContentTypeService.cs +++ b/src/Umbraco.Core/Services/ContentTypeService.cs @@ -54,7 +54,8 @@ public Attempt> CreateCont CreatorId = userId }; - if (uow.Events.DispatchCancelable(SavingContentTypeContainer, this, new SaveEventArgs(container, evtMsgs))) + var saveEventArgs = new SaveEventArgs(container, evtMsgs); + if (uow.Events.DispatchCancelable(SavingContentTypeContainer, this, saveEventArgs)) { uow.Commit(); return Attempt.Fail(new OperationStatus(container, OperationStatusType.FailedCancelledByEvent, evtMsgs)); @@ -62,8 +63,8 @@ public Attempt> CreateCont repo.AddOrUpdate(container); uow.Commit(); - - uow.Events.Dispatch(SavedContentTypeContainer, this, new SaveEventArgs(container, evtMsgs), "SavedContentTypeContainer"); + saveEventArgs.CanCancel = false; + uow.Events.Dispatch(SavedContentTypeContainer, this, saveEventArgs, "SavedContentTypeContainer"); //TODO: Audit trail ? return Attempt.Succeed(new OperationStatus(container, OperationStatusType.Success, evtMsgs)); @@ -76,6 +77,41 @@ public Attempt> CreateCont } } + public Attempt> RenameContentTypeContainer(int id, string name, int userId = 0) + { + return RenameTypeContainer(id, name, Constants.ObjectTypes.DocumentTypeContainerGuid); + } + + private Attempt> RenameTypeContainer(int id, string name, Guid typeCode) + { + var evtMsgs = EventMessagesFactory.Get(); + var uow = UowProvider.GetUnitOfWork(); + using (var repo = RepositoryFactory.CreateEntityContainerRepository(uow, typeCode)) + { + try + { + var container = repo.Get(id); + + //throw if null, this will be caught by the catch and a failed returned + if (container == null) + throw new InvalidOperationException("No container found with id " + id); + + container.Name = name; + + repo.AddOrUpdate(container); + uow.Commit(); + + uow.Events.Dispatch(SavedContentTypeContainer, this, new SaveEventArgs(container, evtMsgs), "RenamedContainer"); + + return Attempt.Succeed(new OperationStatus(container, OperationStatusType.Success, evtMsgs)); + } + catch (Exception ex) + { + return Attempt.Fail(new OperationStatus(null, OperationStatusType.FailedExceptionThrown, evtMsgs), ex); + } + } + } + public Attempt> CreateMediaTypeContainer(int parentId, string name, int userId = 0) { var evtMsgs = EventMessagesFactory.Get(); @@ -92,7 +128,8 @@ public Attempt> CreateMedi CreatorId = userId }; - if (uow.Events.DispatchCancelable(SavingMediaTypeContainer, this, new SaveEventArgs(container, evtMsgs))) + var saveEventArgs = new SaveEventArgs(container, evtMsgs); + if (uow.Events.DispatchCancelable(SavingMediaTypeContainer, this, saveEventArgs)) { uow.Commit(); return Attempt.Fail(new OperationStatus(container, OperationStatusType.FailedCancelledByEvent, evtMsgs)); @@ -100,8 +137,8 @@ public Attempt> CreateMedi repo.AddOrUpdate(container); uow.Commit(); - - uow.Events.Dispatch(SavedMediaTypeContainer, this, new SaveEventArgs(container, evtMsgs), "SavedMediaTypeContainer"); + saveEventArgs.CanCancel = false; + uow.Events.Dispatch(SavedMediaTypeContainer, this, saveEventArgs, "SavedMediaTypeContainer"); //TODO: Audit trail ? return Attempt.Succeed(new OperationStatus(container, OperationStatusType.Success, evtMsgs)); @@ -114,6 +151,16 @@ public Attempt> CreateMedi } } + public Attempt> RenameMediaTypeContainer(int id, string name, int userId = 0) + { + return RenameTypeContainer(id, name, Constants.ObjectTypes.MediaTypeContainerGuid); + } + + public Attempt> RenameDataTypeContainer(int id, string name, int userId = 0) + { + return RenameTypeContainer(id, name, Constants.ObjectTypes.DataTypeContainerGuid); + } + public Attempt SaveContentTypeContainer(EntityContainer container, int userId = 0) { return SaveContainer( @@ -211,7 +258,7 @@ public IEnumerable GetMediaTypeContainers(string name, int leve public IEnumerable GetMediaTypeContainers(IMediaType mediaType) { - var ancestorIds = mediaType.Path.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries) + var ancestorIds = mediaType.Path.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries) .Select(x => { var asInt = x.TryConvertTo(); @@ -240,7 +287,7 @@ public IEnumerable GetContentTypeContainers(int[] containerIds) public IEnumerable GetContentTypeContainers(IContentType contentType) { - var ancestorIds = contentType.Path.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries) + var ancestorIds = contentType.Path.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries) .Select(x => { var asInt = x.TryConvertTo(); @@ -289,7 +336,8 @@ public Attempt DeleteContentTypeContainer(int containerId, int return OperationStatus.NoOperation(evtMsgs); } - if (uow.Events.DispatchCancelable(DeletingContentTypeContainer, this, new DeleteEventArgs(container, evtMsgs))) + var deleteEventArgs = new DeleteEventArgs(container, evtMsgs); + if (uow.Events.DispatchCancelable(DeletingContentTypeContainer, this, deleteEventArgs)) { uow.Commit(); return Attempt.Fail(new OperationStatus(OperationStatusType.FailedCancelledByEvent, evtMsgs)); @@ -297,8 +345,8 @@ public Attempt DeleteContentTypeContainer(int containerId, int repo.Delete(container); uow.Commit(); - - uow.Events.Dispatch(DeletedContentTypeContainer, this, new DeleteEventArgs(container, evtMsgs), "DeletedContentTypeContainer"); + deleteEventArgs.CanCancel = false; + uow.Events.Dispatch(DeletedContentTypeContainer, this, deleteEventArgs, "DeletedContentTypeContainer"); return OperationStatus.Success(evtMsgs); //TODO: Audit trail ? @@ -319,7 +367,8 @@ public Attempt DeleteMediaTypeContainer(int containerId, int us return OperationStatus.NoOperation(evtMsgs); } - if (uow.Events.DispatchCancelable(DeletingMediaTypeContainer, this, new DeleteEventArgs(container, evtMsgs))) + var deleteEventArgs = new DeleteEventArgs(container, evtMsgs); + if (uow.Events.DispatchCancelable(DeletingMediaTypeContainer, this, deleteEventArgs)) { uow.Commit(); return Attempt.Fail(new OperationStatus(OperationStatusType.FailedCancelledByEvent, evtMsgs)); @@ -327,8 +376,8 @@ public Attempt DeleteMediaTypeContainer(int containerId, int us repo.Delete(container); uow.Commit(); - - uow.Events.Dispatch(DeletedMediaTypeContainer, this, new DeleteEventArgs(container, evtMsgs)); + deleteEventArgs.CanCancel = false; + uow.Events.Dispatch(DeletedMediaTypeContainer, this, deleteEventArgs); return OperationStatus.Success(evtMsgs); //TODO: Audit trail ? @@ -367,6 +416,15 @@ public IEnumerable GetAllContentTypeAliases(params Guid[] objectTypes) } } + public IEnumerable GetAllContentTypeIds(string[] aliases) + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateContentTypeRepository(uow); + return repository.GetAllContentTypeIds(aliases); + } + } + /// /// Copies a content type as a child under the specified parent if specified (otherwise to the root) /// @@ -426,7 +484,7 @@ public IContentType Copy(IContentType original, string alias, string name, ICont clone.Name = name; - var compositionAliases = clone.CompositionAliases().Except(new[] {alias}).ToList(); + var compositionAliases = clone.CompositionAliases().Except(new[] { alias }).ToList(); //remove all composition that is not it's current alias foreach (var a in compositionAliases) { @@ -756,7 +814,8 @@ public void Save(IContentType contentType, int userId = 0) { using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(SavingContentType, this, new SaveEventArgs(contentType))) + var saveEventArgs = new SaveEventArgs(contentType); + if (uow.Events.DispatchCancelable(SavingContentType, this, saveEventArgs)) { uow.Commit(); return; @@ -779,7 +838,8 @@ public void Save(IContentType contentType, int userId = 0) UpdateContentXmlStructure(contentType); - uow.Events.Dispatch(SavedContentType, this, new SaveEventArgs(contentType, false)); + saveEventArgs.CanCancel = false; + uow.Events.Dispatch(SavedContentType, this, saveEventArgs); Audit(uow, AuditType.Save, "Save ContentType performed by user", userId, contentType.Id); uow.Commit(); @@ -800,7 +860,8 @@ public void Save(IEnumerable contentTypes, int userId = 0) { using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(SavingContentType, this, new SaveEventArgs(asArray))) + var saveEventArgs = new SaveEventArgs(asArray); + if (uow.Events.DispatchCancelable(SavingContentType, this, saveEventArgs)) { uow.Commit(); return; @@ -825,7 +886,8 @@ public void Save(IEnumerable contentTypes, int userId = 0) UpdateContentXmlStructure(asArray.Cast().ToArray()); - uow.Events.Dispatch(SavedContentType, this, new SaveEventArgs(asArray, false)); + saveEventArgs.CanCancel = false; + uow.Events.Dispatch(SavedContentType, this, saveEventArgs); Audit(uow, AuditType.Save, "Save ContentTypes performed by user", userId, -1); uow.Commit(); @@ -845,7 +907,8 @@ public void Delete(IContentType contentType, int userId = 0) { using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(DeletingContentType, this, new DeleteEventArgs(contentType))) + var deleteEventArgs = new DeleteEventArgs(contentType); + if (uow.Events.DispatchCancelable(DeletingContentType, this, deleteEventArgs)) { uow.Commit(); return; @@ -854,14 +917,15 @@ public void Delete(IContentType contentType, int userId = 0) var repository = RepositoryFactory.CreateContentTypeRepository(uow); //If we are deleting this content type, we are also deleting it's descendents! - var deletedContentTypes = new List {contentType}; + var deletedContentTypes = new List { contentType }; deletedContentTypes.AddRange(GetDescendants(contentType)); _contentService.DeleteContentOfTypes(deletedContentTypes.Select(x => x.Id), userId); repository.Delete(contentType); - - uow.Events.Dispatch(DeletedContentType, this, new DeleteEventArgs(deletedContentTypes.DistinctBy(x => x.Id), false)); + deleteEventArgs.DeletedEntities = deletedContentTypes.DistinctBy(x => x.Id); + deleteEventArgs.CanCancel = false; + uow.Events.Dispatch(DeletedContentType, this, deleteEventArgs); Audit(uow, AuditType.Delete, string.Format("Delete ContentType performed by user"), userId, contentType.Id); uow.Commit(); @@ -885,7 +949,8 @@ public void Delete(IEnumerable contentTypes, int userId = 0) { using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(DeletingContentType, this, new DeleteEventArgs(asArray))) + var deleteEventArgs = new DeleteEventArgs(asArray); + if (uow.Events.DispatchCancelable(DeletingContentType, this, deleteEventArgs)) { uow.Commit(); return; @@ -906,8 +971,9 @@ public void Delete(IEnumerable contentTypes, int userId = 0) { repository.Delete(contentType); } - - uow.Events.Dispatch(DeletedContentType, this, new DeleteEventArgs(deletedContentTypes.DistinctBy(x => x.Id), false)); + deleteEventArgs.DeletedEntities = deletedContentTypes.DistinctBy(x => x.Id); + deleteEventArgs.CanCancel = false; + uow.Events.Dispatch(DeletedContentType, this, deleteEventArgs); Audit(uow, AuditType.Delete, string.Format("Delete ContentTypes performed by user"), userId, -1); uow.Commit(); @@ -1056,7 +1122,9 @@ public Attempt> MoveMediaType(IMediaTyp var moveInfo = new List>(); using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(MovingMediaType, this, new MoveEventArgs(evtMsgs, new MoveEventInfo(toMove, toMove.Path, containerId)))) + var moveEventInfo = new MoveEventInfo(toMove, toMove.Path, containerId); + var moveEventArgs = new MoveEventArgs(evtMsgs, moveEventInfo); + if (uow.Events.DispatchCancelable(MovingMediaType, this, moveEventArgs)) { uow.Commit(); return Attempt.Fail(new OperationStatus(MoveOperationStatusType.FailedCancelledByEvent, evtMsgs)); @@ -1081,7 +1149,9 @@ public Attempt> MoveMediaType(IMediaTyp return Attempt.Fail(new OperationStatus(ex.Operation, evtMsgs)); } uow.Commit(); - uow.Events.Dispatch(MovedMediaType, this, new MoveEventArgs(false, evtMsgs, moveInfo.ToArray())); + moveEventArgs.MoveInfoCollection = moveInfo; + moveEventArgs.CanCancel = false; + uow.Events.Dispatch(MovedMediaType, this, moveEventArgs); } return Attempt.Succeed( @@ -1095,7 +1165,9 @@ public Attempt> MoveContentType(IConten var moveInfo = new List>(); using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(MovingContentType, this, new MoveEventArgs(evtMsgs, new MoveEventInfo(toMove, toMove.Path, containerId)))) + var moveEventInfo = new MoveEventInfo(toMove, toMove.Path, containerId); + var moveEventArgs = new MoveEventArgs(evtMsgs, moveEventInfo); + if (uow.Events.DispatchCancelable(MovingContentType, this, moveEventArgs)) { uow.Commit(); return Attempt.Fail(new OperationStatus(MoveOperationStatusType.FailedCancelledByEvent, evtMsgs)); @@ -1119,8 +1191,10 @@ public Attempt> MoveContentType(IConten uow.Commit(); return Attempt.Fail(new OperationStatus(ex.Operation, evtMsgs)); } + moveEventArgs.MoveInfoCollection = moveInfo; + moveEventArgs.CanCancel = false; uow.Commit(); - uow.Events.Dispatch(MovedContentType, this, new MoveEventArgs(false, evtMsgs, moveInfo.ToArray())); + uow.Events.Dispatch(MovedContentType, this, moveEventArgs); } return Attempt.Succeed( @@ -1228,7 +1302,8 @@ public void Save(IMediaType mediaType, int userId = 0) { using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(SavingMediaType, this, new SaveEventArgs(mediaType))) + var saveEventArgs = new SaveEventArgs(mediaType); + if (uow.Events.DispatchCancelable(SavingMediaType, this, saveEventArgs)) { uow.Commit(); return; @@ -1244,8 +1319,8 @@ public void Save(IMediaType mediaType, int userId = 0) uow.Commit(); UpdateContentXmlStructure(mediaType); - - uow.Events.Dispatch(SavedMediaType, this, new SaveEventArgs(mediaType, false)); + saveEventArgs.CanCancel = false; + uow.Events.Dispatch(SavedMediaType, this, saveEventArgs); Audit(uow, AuditType.Save, "Save MediaType performed by user", userId, mediaType.Id); uow.Commit(); @@ -1266,7 +1341,8 @@ public void Save(IEnumerable mediaTypes, int userId = 0) { using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(SavingMediaType, this, new SaveEventArgs(asArray))) + var saveEventArgs = new SaveEventArgs(asArray); + if (uow.Events.DispatchCancelable(SavingMediaType, this, saveEventArgs)) { uow.Commit(); return; @@ -1290,8 +1366,8 @@ public void Save(IEnumerable mediaTypes, int userId = 0) uow.Commit(); UpdateContentXmlStructure(asArray.Cast().ToArray()); - - uow.Events.Dispatch(SavedMediaType, this, new SaveEventArgs(asArray, false)); + saveEventArgs.CanCancel = false; + uow.Events.Dispatch(SavedMediaType, this, saveEventArgs); Audit(uow, AuditType.Save, "Save MediaTypes performed by user", userId, -1); uow.Commit(); @@ -1313,7 +1389,8 @@ public void Delete(IMediaType mediaType, int userId = 0) { using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(DeletingMediaType, this, new DeleteEventArgs(mediaType))) + var deleteEventArgs = new DeleteEventArgs(mediaType); + if (uow.Events.DispatchCancelable(DeletingMediaType, this, deleteEventArgs)) { uow.Commit(); return; @@ -1329,7 +1406,9 @@ public void Delete(IMediaType mediaType, int userId = 0) repository.Delete(mediaType); - uow.Events.Dispatch(DeletedMediaType, this, new DeleteEventArgs(deletedMediaTypes.DistinctBy(x => x.Id), false)); + deleteEventArgs.CanCancel = false; + deleteEventArgs.DeletedEntities = deletedMediaTypes.DistinctBy(x => x.Id); + uow.Events.Dispatch(DeletedMediaType, this, deleteEventArgs); Audit(uow, AuditType.Delete, "Delete MediaType performed by user", userId, mediaType.Id); uow.Commit(); @@ -1353,7 +1432,8 @@ public void Delete(IEnumerable mediaTypes, int userId = 0) { using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(DeletingMediaType, this, new DeleteEventArgs(asArray))) + var deleteEventArgs = new DeleteEventArgs(asArray); + if (uow.Events.DispatchCancelable(DeletingMediaType, this, deleteEventArgs)) { uow.Commit(); return; @@ -1375,7 +1455,9 @@ public void Delete(IEnumerable mediaTypes, int userId = 0) repository.Delete(mediaType); } - uow.Events.Dispatch(DeletedMediaType, this, new DeleteEventArgs(deletedMediaTypes.DistinctBy(x => x.Id), false)); + deleteEventArgs.DeletedEntities = deletedMediaTypes.DistinctBy(x => x.Id); + deleteEventArgs.CanCancel = false; + uow.Events.Dispatch(DeletedMediaType, this, deleteEventArgs); Audit(uow, AuditType.Delete, "Delete MediaTypes performed by user", userId, -1); uow.Commit(); diff --git a/src/Umbraco.Core/Services/DataTypeService.cs b/src/Umbraco.Core/Services/DataTypeService.cs index c01b13136e58..0ee3e9b82337 100644 --- a/src/Umbraco.Core/Services/DataTypeService.cs +++ b/src/Umbraco.Core/Services/DataTypeService.cs @@ -312,7 +312,9 @@ public Attempt> Move(IDataTypeDefinitio var moveInfo = new List>(); using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(Moving, this, new MoveEventArgs(evtMsgs, new MoveEventInfo(toMove, toMove.Path, parentId)))) + var moveEventInfo = new MoveEventInfo(toMove, toMove.Path, parentId); + var moveEventArgs = new MoveEventArgs(evtMsgs, moveEventInfo); + if (uow.Events.DispatchCancelable(Moving, this, moveEventArgs)) { uow.Commit(); return Attempt.Fail(new OperationStatus(MoveOperationStatusType.FailedCancelledByEvent, evtMsgs)); @@ -338,7 +340,9 @@ public Attempt> Move(IDataTypeDefinitio new OperationStatus(ex.Operation, evtMsgs)); } uow.Commit(); - uow.Events.Dispatch(Moved, this, new MoveEventArgs(false, evtMsgs, moveInfo.ToArray())); + moveEventArgs.MoveInfoCollection = moveInfo; + moveEventArgs.CanCancel = false; + uow.Events.Dispatch(Moved, this, moveEventArgs); } return Attempt.Succeed( @@ -354,7 +358,8 @@ public void Save(IDataTypeDefinition dataTypeDefinition, int userId = 0) { using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(Saving, this, new SaveEventArgs(dataTypeDefinition))) + var saveEventArgs = new SaveEventArgs(dataTypeDefinition); + if (uow.Events.DispatchCancelable(Saving, this, saveEventArgs)) { uow.Commit(); return; @@ -369,8 +374,8 @@ public void Save(IDataTypeDefinition dataTypeDefinition, int userId = 0) dataTypeDefinition.CreatorId = userId; repository.AddOrUpdate(dataTypeDefinition); - - uow.Events.Dispatch(Saved, this, new SaveEventArgs(dataTypeDefinition, false)); + saveEventArgs.CanCancel = false; + uow.Events.Dispatch(Saved, this, saveEventArgs); Audit(uow, AuditType.Save, "Save DataTypeDefinition performed by user", userId, dataTypeDefinition.Id); uow.Commit(); @@ -397,9 +402,10 @@ public void Save(IEnumerable dataTypeDefinitions, int userI { using (var uow = UowProvider.GetUnitOfWork()) { + var saveEventArgs = new SaveEventArgs(dataTypeDefinitions); if (raiseEvents) - { - if (uow.Events.DispatchCancelable(Saving, this, new SaveEventArgs(dataTypeDefinitions))) + { + if (uow.Events.DispatchCancelable(Saving, this, saveEventArgs)) { uow.Commit(); return; @@ -415,7 +421,10 @@ public void Save(IEnumerable dataTypeDefinitions, int userI } if (raiseEvents) - uow.Events.Dispatch(Saved, this, new SaveEventArgs(dataTypeDefinitions, false)); + { + saveEventArgs.CanCancel = false; + uow.Events.Dispatch(Saved, this, saveEventArgs); + } Audit(uow, AuditType.Save, string.Format("Save DataTypeDefinition performed by user"), userId, -1); uow.Commit(); @@ -504,7 +513,8 @@ public void SaveDataTypeAndPreValues(IDataTypeDefinition dataTypeDefinition, IDi { using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(Saving, this, new SaveEventArgs(dataTypeDefinition))) + var saveEventArgs = new SaveEventArgs(dataTypeDefinition); + if (uow.Events.DispatchCancelable(Saving, this, saveEventArgs)) { uow.Commit(); return; @@ -526,8 +536,8 @@ public void SaveDataTypeAndPreValues(IDataTypeDefinition dataTypeDefinition, IDi Audit(uow, AuditType.Save, string.Format("Save DataTypeDefinition performed by user"), userId, dataTypeDefinition.Id); uow.Commit(); - - uow.Events.Dispatch(Saved, this, new SaveEventArgs(dataTypeDefinition, false)); + saveEventArgs.CanCancel = false; + uow.Events.Dispatch(Saved, this, saveEventArgs); } } @@ -544,7 +554,8 @@ public void Delete(IDataTypeDefinition dataTypeDefinition, int userId = 0) { using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(Deleting, this, new DeleteEventArgs(dataTypeDefinition))) + var deleteEventArgs = new DeleteEventArgs(dataTypeDefinition); + if (uow.Events.DispatchCancelable(Deleting, this, deleteEventArgs)) { uow.Commit(); return; @@ -556,8 +567,8 @@ public void Delete(IDataTypeDefinition dataTypeDefinition, int userId = 0) Audit(uow, AuditType.Delete, "Delete DataTypeDefinition performed by user", userId, dataTypeDefinition.Id); uow.Commit(); - - uow.Events.Dispatch(Deleted, this, new DeleteEventArgs(dataTypeDefinition, false)); + deleteEventArgs.CanCancel = false; + uow.Events.Dispatch(Deleted, this, deleteEventArgs); } } diff --git a/src/Umbraco.Core/Services/DomainService.cs b/src/Umbraco.Core/Services/DomainService.cs index d5637d50bec4..7051f31fe4af 100644 --- a/src/Umbraco.Core/Services/DomainService.cs +++ b/src/Umbraco.Core/Services/DomainService.cs @@ -32,7 +32,8 @@ public Attempt Delete(IDomain domain) using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(Deleting, this, new DeleteEventArgs(domain, evtMsgs))) + var deleteEventArgs = new DeleteEventArgs(domain, evtMsgs); + if (uow.Events.DispatchCancelable(Deleting, this, deleteEventArgs)) { uow.Commit(); return OperationStatus.Cancelled(evtMsgs); @@ -42,8 +43,8 @@ public Attempt Delete(IDomain domain) repository.Delete(domain); uow.Commit(); - var args = new DeleteEventArgs(domain, false, evtMsgs); - uow.Events.Dispatch(Deleted, this, args); + deleteEventArgs.CanCancel = false; + uow.Events.Dispatch(Deleted, this, deleteEventArgs); return OperationStatus.Success(evtMsgs); } @@ -92,7 +93,8 @@ public Attempt Save(IDomain domainEntity) using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(Saving, this, new SaveEventArgs(domainEntity, evtMsgs))) + var saveEventArgs = new SaveEventArgs(domainEntity, evtMsgs); + if (uow.Events.DispatchCancelable(Saving, this, saveEventArgs)) { uow.Commit(); return OperationStatus.Cancelled(evtMsgs); @@ -101,7 +103,8 @@ public Attempt Save(IDomain domainEntity) var repository = RepositoryFactory.CreateDomainRepository(uow); repository.AddOrUpdate(domainEntity); uow.Commit(); - uow.Events.Dispatch(Saved, this, new SaveEventArgs(domainEntity, false, evtMsgs)); + saveEventArgs.CanCancel = false; + uow.Events.Dispatch(Saved, this, saveEventArgs); return OperationStatus.Success(evtMsgs); } diff --git a/src/Umbraco.Core/Services/EntityService.cs b/src/Umbraco.Core/Services/EntityService.cs index 04d6c276b24c..b660927df36b 100644 --- a/src/Umbraco.Core/Services/EntityService.cs +++ b/src/Umbraco.Core/Services/EntityService.cs @@ -1,5 +1,8 @@ using System; using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; using Umbraco.Core.Cache; using Umbraco.Core.CodeAnnotations; using Umbraco.Core.Events; @@ -345,11 +348,77 @@ public IEnumerable GetPagedDescendants(int id, UmbracoObjectType using (var uow = UowProvider.GetUnitOfWork(readOnly:true)) { var repository = RepositoryFactory.CreateEntityRepository(uow); - + var query = Query.Builder; //if the id is System Root, then just get all if (id != Constants.System.Root) - query.Where(x => x.Path.SqlContains(string.Format(",{0},", id), TextColumnType.NVarchar)); + { + //lookup the path so we can use it in the prefix query below + var itemPaths = repository.GetAllPaths(objectTypeId, id).ToArray(); + if (itemPaths.Length == 0) + { + totalRecords = 0; + return Enumerable.Empty(); + } + var itemPath = itemPaths[0].Path; + + query.Where(x => x.Path.SqlStartsWith(string.Format("{0},", itemPath), TextColumnType.NVarchar)); + } + + IQuery filterQuery = null; + if (filter.IsNullOrWhiteSpace() == false) + { + filterQuery = Query.Builder.Where(x => x.Name.Contains(filter)); + } + + var contents = repository.GetPagedResultsByQuery(query, objectTypeId, pageIndex, pageSize, out totalRecords, orderBy, orderDirection, filterQuery); + return contents; + } + } + /// + /// Returns a paged collection of descendants. + /// + public IEnumerable GetPagedDescendants(IEnumerable ids, UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords, + string orderBy = "path", Direction orderDirection = Direction.Ascending, string filter = "") + { + totalRecords = 0; + + var idsA = ids.ToArray(); + if (idsA.Length == 0) + return Enumerable.Empty(); + + var objectTypeId = umbracoObjectType.GetGuid(); + + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateEntityRepository(uow); + + var query = Query.Builder; + if (idsA.All(x => x != Constants.System.Root)) + { + //lookup the paths so we can use it in the prefix query below + var itemPaths = repository.GetAllPaths(objectTypeId, idsA).ToArray(); + if (itemPaths.Length == 0) + { + totalRecords = 0; + return Enumerable.Empty(); + } + + var clauses = new List>>(); + foreach (var id in idsA) + { + //if the id is root then don't add any clauses + if (id != Constants.System.Root) + { + var itemPath = itemPaths.FirstOrDefault(x => x.Id == id); + if (itemPath == null) continue; + var path = itemPath.Path; + var qid = id; + clauses.Add(x => x.Path.SqlStartsWith(string.Format("{0},", path), TextColumnType.NVarchar) || x.Path.SqlEndsWith(string.Format(",{0}", qid), TextColumnType.NVarchar)); + } + } + query.WhereAny(clauses); + } IQuery filterQuery = null; if (filter.IsNullOrWhiteSpace() == false) @@ -399,7 +468,7 @@ public IEnumerable GetPagedDescendantsFromRoot(UmbracoObjectType return contents; } } - + /// /// Gets a collection of descendents by the parents Id /// @@ -523,12 +592,48 @@ public IEnumerable GetAll(UmbracoObjectTypes umbracoObjectType, } } + public virtual IEnumerable GetAllPaths(UmbracoObjectTypes umbracoObjectType, params int[] ids) + { + var entityType = GetEntityType(umbracoObjectType); + var typeFullName = entityType.FullName; + Mandate.That(_supportedObjectTypes.ContainsKey(typeFullName), () => + { + throw new NotSupportedException + ("The passed in type is not supported"); + }); + + var objectTypeId = umbracoObjectType.GetGuid(); + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateEntityRepository(uow); + return repository.GetAllPaths(objectTypeId, ids); + } + } + + public virtual IEnumerable GetAllPaths(UmbracoObjectTypes umbracoObjectType, params Guid[] keys) + { + var entityType = GetEntityType(umbracoObjectType); + var typeFullName = entityType.FullName; + Mandate.That(_supportedObjectTypes.ContainsKey(typeFullName), () => + { + throw new NotSupportedException + ("The passed in type is not supported"); + }); + + var objectTypeId = umbracoObjectType.GetGuid(); + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateEntityRepository(uow); + return repository.GetAllPaths(objectTypeId, keys); + } + } + /// - /// Gets a collection of + /// Gets a collection of /// /// Guid id of the UmbracoObjectType /// - /// An enumerable list of objects + /// An enumerable list of objects public virtual IEnumerable GetAll(Guid objectTypeId, params int[] ids) { var umbracoObjectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(objectTypeId); @@ -646,5 +751,34 @@ public bool Exists(int id) return exists; } } + + /// + public int ReserveId(Guid key) + { + NodeDto node; + using (var scope = UowProvider.ScopeProvider.CreateScope()) + { + var sql = new Sql("SELECT * FROM umbracoNode WHERE uniqueID=@0 AND nodeObjectType=@1", key, Constants.ObjectTypes.IdReservationGuid); + node = scope.Database.SingleOrDefault(sql); + if (node != null) throw new InvalidOperationException("An identifier has already been reserved for this Udi."); + node = new NodeDto + { + UniqueId = key, + Text = "RESERVED.ID", + NodeObjectType = Constants.ObjectTypes.IdReservationGuid, + + CreateDate = DateTime.Now, + UserId = 0, + ParentId = -1, + Level = 1, + Path = "-1", + SortOrder = 0, + Trashed = false + }; + scope.Database.Insert(node); + scope.Complete(); + } + return node.NodeId; + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Services/FileService.cs b/src/Umbraco.Core/Services/FileService.cs index 4833401df8b7..916c036a6934 100644 --- a/src/Umbraco.Core/Services/FileService.cs +++ b/src/Umbraco.Core/Services/FileService.cs @@ -70,7 +70,8 @@ public void SaveStylesheet(Stylesheet stylesheet, int userId = 0) { using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(SavingStylesheet, this, new SaveEventArgs(stylesheet))) + var saveEventArgs = new SaveEventArgs(stylesheet); + if (uow.Events.DispatchCancelable(SavingStylesheet, this, saveEventArgs)) { uow.Commit(); return; @@ -78,8 +79,8 @@ public void SaveStylesheet(Stylesheet stylesheet, int userId = 0) var repository = RepositoryFactory.CreateStylesheetRepository(uow); repository.AddOrUpdate(stylesheet); - - uow.Events.Dispatch(SavedStylesheet, this, new SaveEventArgs(stylesheet, false)); + saveEventArgs.CanCancel = false; + uow.Events.Dispatch(SavedStylesheet, this, saveEventArgs); Audit(uow, AuditType.Save, "Save Stylesheet performed by user", userId, -1); uow.Commit(); @@ -103,15 +104,16 @@ public void DeleteStylesheet(string path, int userId = 0) return; } - if (uow.Events.DispatchCancelable(DeletingStylesheet, this, new DeleteEventArgs(stylesheet))) + var deleteEventArgs = new DeleteEventArgs(stylesheet); + if (uow.Events.DispatchCancelable(DeletingStylesheet, this, deleteEventArgs)) { uow.Commit(); return; } repository.Delete(stylesheet); - - uow.Events.Dispatch(DeletedStylesheet, this, new DeleteEventArgs(stylesheet, false)); + deleteEventArgs.CanCancel = false; + uow.Events.Dispatch(DeletedStylesheet, this, deleteEventArgs); Audit(uow, AuditType.Delete, string.Format("Delete Stylesheet performed by user"), userId, -1); uow.Commit(); @@ -171,7 +173,8 @@ public void SaveScript(Script script, int userId = 0) { using (var uow = UowProvider.GetUnitOfWork()) { - if (uow.Events.DispatchCancelable(SavingScript, this, new SaveEventArgs - -<%--Ensure that the client API is registered for the image.--%> - - - diff --git a/src/Umbraco.Web.UI/umbraco/controls/Images/ImageViewer.ascx.cs b/src/Umbraco.Web.UI/umbraco/controls/Images/ImageViewer.ascx.cs deleted file mode 100644 index e031663e8a0d..000000000000 --- a/src/Umbraco.Web.UI/umbraco/controls/Images/ImageViewer.ascx.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace Umbraco.Web.UI.Umbraco.Controls.Images -{ - [Obsolete("This is no longer used and will be removed in future versions")] - public partial class ImageViewer : global::umbraco.controls.Images.ImageViewer - { - } -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/controls/Images/ImageViewer.ascx.designer.cs b/src/Umbraco.Web.UI/umbraco/controls/Images/ImageViewer.ascx.designer.cs deleted file mode 100644 index 164c636c69dd..000000000000 --- a/src/Umbraco.Web.UI/umbraco/controls/Images/ImageViewer.ascx.designer.cs +++ /dev/null @@ -1,15 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Umbraco.Web.UI.Umbraco.Controls.Images { - - - public partial class ImageViewer { - } -} diff --git a/src/Umbraco.Web.UI/umbraco/controls/Images/ImageViewer.js b/src/Umbraco.Web.UI/umbraco/controls/Images/ImageViewer.js deleted file mode 100644 index 2924c4f81e57..000000000000 --- a/src/Umbraco.Web.UI/umbraco/controls/Images/ImageViewer.js +++ /dev/null @@ -1,133 +0,0 @@ -/// -/// - -Umbraco.Sys.registerNamespace("Umbraco.Controls"); - -(function($) { - //jQuery plugin for Umbraco image viewer control - $.fn.UmbracoImageViewer = function(opts) { - //all options must be specified - var conf = $.extend({ - style: false, - linkTarget: "_blank", - umbPath: "" - }, opts); - return this.each(function() { - new Umbraco.Controls.ImageViewer().init($(this), conf); - }); - } - $.fn.UmbracoImageViewerAPI = function() { - /// exposes the Umbraco Image Viewer api for the selected object - //if there's more than item in the selector, throw exception - if ($(this).length != 1) { - throw "UmbracoImageViewerAPI selector requires that there be exactly one control selected"; - }; - return Umbraco.Controls.ImageViewer.inst[$(this).attr("id")] || null; - }; - Umbraco.Controls.ImageViewer = function() { - return { - _cntr: ++Umbraco.Controls.ImageViewer.cntr, - _containerId: null, - _context: null, - _serviceUrl: "", - _umbPath: "", - _style: false, - _linkTarget: "", - - init: function(jItem, opts) { - //this is stored so that we search the current document/iframe for this object - //when calling _getContainer. Before this was not required but for some reason inside the - //TinyMCE popup, when doing an ajax call, the context is lost to the jquery item! - this._context = jItem.get(0).ownerDocument; - - //store a reference to this api by the id and the counter - Umbraco.Controls.ImageViewer.inst[this._cntr] = this; - if (!jItem.attr("id")) jItem.attr("id", "UmbImageViewer_" + this._cntr); - Umbraco.Controls.ImageViewer.inst[jItem.attr("id")] = Umbraco.Controls.ImageViewer.inst[this._cntr]; - - this._containerId = jItem.attr("id"); - - this._umbPath = opts.umbPath; - this._serviceUrl = this._umbPath + "/controls/Images/ImageViewerUpdater.asmx"; - this._style = opts.style; - this._linkTarget = opts.linkTarget; - - }, - - updateImage: function(mediaId, callback) { - /// Updates the image to show the mediaId parameter using AJAX - - this._showThrobber(); - - var _this = this; - $.ajax({ - type: "POST", - url: _this._serviceUrl + "/UpdateImage", - data: '{ "mediaId": ' + parseInt(mediaId) + ', "style": "' + _this._style + '", "linkTarget": "' + _this._linkTarget + '"}', - contentType: "application/json; charset=utf-8", - dataType: "json", - success: function(msg) { - var rHtml = $("
").append(msg.d.html); //get the full html response wrapped in temp div - _this._updateImageFromAjax(rHtml); - if (typeof callback == "function") { - //build the parameters to pass back to the callback method - var params = { - hasImage: _this._getContainer().find("img.noimage").length == 0, - mediaId: msg.d.mediaId, - width: msg.d.width, - height: msg.d.height, - url: msg.d.url, - alt: msg.d.alt - }; - //call the callback method - callback.call(_this, params); - } - } - }); - }, - - showImage: function(path) { - /// This will force the image to show the path passed in - if (this._style != "ThumbnailPreview") { - this._getContainer().find("img").attr("src", path); - } - else { - c = this._getContainer().find(".bgImage"); - c.css("background-image", "url('" + path + "')"); - } - }, - - _getContainer: function() { - return $("#" + this._containerId, this._context); - }, - - _updateImageFromAjax: function(rHtml) { - this._getContainer().html(rHtml.find(".imageViewer").html()); //replace the html with the inner html of the image viewer response - }, - - _showThrobber: function() { - var c = null; - if (this._style != "ThumbnailPreview") { - c = this._getContainer().find("img"); - c.attr("src", this._umbPath + "/images/throbber.gif"); - c.css("margin-top", ((c.height() - 15) / 2) + "px"); - c.css("margin-left", ((c.width() - 15) / 2) + "px"); - } - else { - c = this._getContainer().find(".bgImage"); - c.css("background-image", ""); - c.html(""); - var img = c.find("img"); - img.attr("src", this._umbPath + "/images/throbber.gif"); - img.css("margin-top", "45px"); - img.css("margin-left", "45px"); - } - } - } - } - - // instance manager - Umbraco.Controls.ImageViewer.cntr = 0; - Umbraco.Controls.ImageViewer.inst = {}; - -})(jQuery); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/controls/Images/ImageViewerUpdater.asmx b/src/Umbraco.Web.UI/umbraco/controls/Images/ImageViewerUpdater.asmx deleted file mode 100644 index e5ab3a96529e..000000000000 --- a/src/Umbraco.Web.UI/umbraco/controls/Images/ImageViewerUpdater.asmx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebService Language="C#" CodeBehind="ImageViewerUpdater.asmx.cs" Class="umbraco.controls.Images.ImageViewerUpdater" %> diff --git a/src/Umbraco.Web.UI/umbraco/controls/Images/UploadMediaImage.ascx b/src/Umbraco.Web.UI/umbraco/controls/Images/UploadMediaImage.ascx deleted file mode 100644 index 5c8cfd32573e..000000000000 --- a/src/Umbraco.Web.UI/umbraco/controls/Images/UploadMediaImage.ascx +++ /dev/null @@ -1,28 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UploadMediaImage.ascx.cs" - Inherits="umbraco.controls.Images.UploadMediaImage" %> -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="ctl" Namespace="umbraco.controls" Assembly="umbraco" %> - - - - - - - - - - - - - - - - - - - - diff --git a/src/Umbraco.Web.UI/umbraco/controls/Images/UploadMediaImage.js b/src/Umbraco.Web.UI/umbraco/controls/Images/UploadMediaImage.js deleted file mode 100644 index 323bf945a8f0..000000000000 --- a/src/Umbraco.Web.UI/umbraco/controls/Images/UploadMediaImage.js +++ /dev/null @@ -1,52 +0,0 @@ -/// - -Umbraco.Sys.registerNamespace("Umbraco.Controls"); - -(function($) { - Umbraco.Controls.UploadMediaImage = function(txtBoxTitleID, btnID, uploadFileID) { - return { - _txtBoxTitleID: txtBoxTitleID, - _btnID: btnID, - _uplaodFileID: uploadFileID, - - validateImage: function() { - // Disable save button - var imageTypes = ",jpeg,jpg,gif,bmp,png,tiff,tif,"; - var tb_title = document.getElementById(this._txtBoxTitleID); - var bt_submit = $("#" + this._btnID); - var tb_image = document.getElementById(this._uplaodFileID); - - bt_submit.attr("disabled","disabled").css("color", "gray"); - - var imageName = tb_image.value; - if (imageName.length > 0) { - var extension = imageName.substring(imageName.lastIndexOf(".") + 1, imageName.length); - if (imageTypes.indexOf(',' + extension.toLowerCase() + ',') > -1) { - bt_submit.removeAttr("disabled").css("color", "#000"); - if (tb_title.value == "") { - var curName = imageName.substring(imageName.lastIndexOf("\\") + 1, imageName.length).replace("." + extension, ""); - var curNameLength = curName.length; - var friendlyName = ""; - for (var i = 0; i < curNameLength; i++) { - currentChar = curName.substring(i, i + 1); - if (friendlyName.length == 0) - currentChar = currentChar.toUpperCase(); - - if (i < curNameLength - 1 && friendlyName != '' && curName.substring(i - 1, i) == ' ') - currentChar = currentChar.toUpperCase(); - else if (currentChar != " " && i < curNameLength - 1 && friendlyName != '' - && curName.substring(i-1, i).toUpperCase() != curName.substring(i-1, i) - && currentChar.toUpperCase() == currentChar) - friendlyName += " "; - - friendlyName += currentChar; - - } - tb_title.value = friendlyName; - } - } - } - } - }; - } -})(jQuery); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/controls/PasswordChanger.ascx.cs b/src/Umbraco.Web.UI/umbraco/controls/PasswordChanger.ascx.cs deleted file mode 100644 index 75540408b80c..000000000000 --- a/src/Umbraco.Web.UI/umbraco/controls/PasswordChanger.ascx.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration.Provider; -using System.Linq; -using System.Web; -using System.Web.Security; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Security; - -namespace Umbraco.Web.UI.Umbraco.Controls -{ - public partial class PasswordChanger : global::umbraco.controls.passwordChanger - { - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - - //always reset the control vals - ResetPasswordCheckBox.Checked = false; - umbPasswordChanger_passwordCurrent.Text = null; - umbPasswordChanger_passwordNew.Text = null; - umbPasswordChanger_passwordNewConfirm.Text = null; - //reset the flag always - IsChangingPasswordField.Value = "false"; - - var canReset = Provider.CanResetPassword(ApplicationContext.Current.Services.UserService); - - ResetPlaceHolder.Visible = canReset; - - this.DataBind(); - } - - } -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/controls/PasswordChanger.ascx.designer.cs b/src/Umbraco.Web.UI/umbraco/controls/PasswordChanger.ascx.designer.cs deleted file mode 100644 index 71269f4300c6..000000000000 --- a/src/Umbraco.Web.UI/umbraco/controls/PasswordChanger.ascx.designer.cs +++ /dev/null @@ -1,69 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Umbraco.Web.UI.Umbraco.Controls { - - - public partial class PasswordChanger { - - /// - /// ResetPlaceHolder control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder ResetPlaceHolder; - - /// - /// CurrentPasswordPlaceHolder control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder CurrentPasswordPlaceHolder; - - /// - /// CurrentPasswordValidator control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator CurrentPasswordValidator; - - /// - /// NewPasswordRequiredValidator control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator NewPasswordRequiredValidator; - - /// - /// NewPasswordLengthValidator control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RegularExpressionValidator NewPasswordLengthValidator; - - /// - /// Div1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl Div1; - } -} diff --git a/src/Umbraco.Web.UI/umbraco/controls/passwordChanger.ascx b/src/Umbraco.Web.UI/umbraco/controls/passwordChanger.ascx deleted file mode 100644 index 2990c55d557a..000000000000 --- a/src/Umbraco.Web.UI/umbraco/controls/passwordChanger.ascx +++ /dev/null @@ -1,133 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="passwordChanger.ascx.cs" Inherits="Umbraco.Web.UI.Umbraco.Controls.PasswordChanger" %> - - - -<%= umbraco.ui.Text("user", "changePassword") %>
- - - -
-

- Password has been reset to
-
- <%# ChangingPasswordModel.GeneratedPassword %> -

-
diff --git a/src/Umbraco.Web.UI/umbraco/create/DLRScripting.ascx b/src/Umbraco.Web.UI/umbraco/create/DLRScripting.ascx deleted file mode 100644 index 1b042eb4c421..000000000000 --- a/src/Umbraco.Web.UI/umbraco/create/DLRScripting.ascx +++ /dev/null @@ -1,40 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="DlrScripting.ascx.cs" Inherits="Umbraco.Web.UI.Umbraco.Create.DlrScripting" %> -<%@ Import Namespace="umbraco" %> -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> - - - - - * - - - - - - - - - - - - - - - - - - - - - - - <%=umbraco.ui.Text("cancel")%> - - - - -
- -
-
- {#fullpage_dlg.appearance_textprops} - - - - - - - - - - - - - - - - -
- -
- -
- - - - - -
 
-
-
- -
- {#fullpage_dlg.appearance_bgprops} - - - - - - - - - - -
- - - - - -
 
-
- - - - - -
 
-
-
- -
- {#fullpage_dlg.appearance_marginprops} - - - - - - - - - - - - - - -
-
- -
- {#fullpage_dlg.appearance_linkprops} - - - - - - - - - - - - - - - - - -
- - - - - -
-
- - - - - -
 
-
- - - - - -
 
-
  
-
- -
- {#fullpage_dlg.appearance_style} - - - - - - - - - - -
- - - - -
 
-
-
- - -
- - -
- - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/js/fullpage.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/js/fullpage.js deleted file mode 100644 index 3f672ad3ba33..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/js/fullpage.js +++ /dev/null @@ -1,232 +0,0 @@ -/** - * fullpage.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - tinyMCEPopup.requireLangPack(); - - var defaultDocTypes = - 'XHTML 1.0 Transitional=,' + - 'XHTML 1.0 Frameset=,' + - 'XHTML 1.0 Strict=,' + - 'XHTML 1.1=,' + - 'HTML 4.01 Transitional=,' + - 'HTML 4.01 Strict=,' + - 'HTML 4.01 Frameset='; - - var defaultEncodings = - 'Western european (iso-8859-1)=iso-8859-1,' + - 'Central European (iso-8859-2)=iso-8859-2,' + - 'Unicode (UTF-8)=utf-8,' + - 'Chinese traditional (Big5)=big5,' + - 'Cyrillic (iso-8859-5)=iso-8859-5,' + - 'Japanese (iso-2022-jp)=iso-2022-jp,' + - 'Greek (iso-8859-7)=iso-8859-7,' + - 'Korean (iso-2022-kr)=iso-2022-kr,' + - 'ASCII (us-ascii)=us-ascii'; - - var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings'; - var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px'; - - function setVal(id, value) { - var elm = document.getElementById(id); - - if (elm) { - value = value || ''; - - if (elm.nodeName == "SELECT") - selectByValue(document.forms[0], id, value); - else if (elm.type == "checkbox") - elm.checked = !!value; - else - elm.value = value; - } - }; - - function getVal(id) { - var elm = document.getElementById(id); - - if (elm.nodeName == "SELECT") - return elm.options[elm.selectedIndex].value; - - if (elm.type == "checkbox") - return elm.checked; - - return elm.value; - }; - - window.FullPageDialog = { - changedStyle : function() { - var val, styles = tinyMCEPopup.editor.dom.parseStyle(getVal('style')); - - setVal('fontface', styles['font-face']); - setVal('fontsize', styles['font-size']); - setVal('textcolor', styles['color']); - - if (val = styles['background-image']) - setVal('bgimage', val.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1")); - else - setVal('bgimage', ''); - - setVal('bgcolor', styles['background-color']); - - // Reset margin form elements - setVal('topmargin', ''); - setVal('rightmargin', ''); - setVal('bottommargin', ''); - setVal('leftmargin', ''); - - // Expand margin - if (val = styles['margin']) { - val = val.split(' '); - styles['margin-top'] = val[0] || ''; - styles['margin-right'] = val[1] || val[0] || ''; - styles['margin-bottom'] = val[2] || val[0] || ''; - styles['margin-left'] = val[3] || val[0] || ''; - } - - if (val = styles['margin-top']) - setVal('topmargin', val.replace(/px/, '')); - - if (val = styles['margin-right']) - setVal('rightmargin', val.replace(/px/, '')); - - if (val = styles['margin-bottom']) - setVal('bottommargin', val.replace(/px/, '')); - - if (val = styles['margin-left']) - setVal('leftmargin', val.replace(/px/, '')); - - updateColor('bgcolor_pick', 'bgcolor'); - updateColor('textcolor_pick', 'textcolor'); - }, - - changedStyleProp : function() { - var val, dom = tinyMCEPopup.editor.dom, styles = dom.parseStyle(getVal('style')); - - styles['font-face'] = getVal('fontface'); - styles['font-size'] = getVal('fontsize'); - styles['color'] = getVal('textcolor'); - styles['background-color'] = getVal('bgcolor'); - - if (val = getVal('bgimage')) - styles['background-image'] = "url('" + val + "')"; - else - styles['background-image'] = ''; - - delete styles['margin']; - - if (val = getVal('topmargin')) - styles['margin-top'] = val + "px"; - else - styles['margin-top'] = ''; - - if (val = getVal('rightmargin')) - styles['margin-right'] = val + "px"; - else - styles['margin-right'] = ''; - - if (val = getVal('bottommargin')) - styles['margin-bottom'] = val + "px"; - else - styles['margin-bottom'] = ''; - - if (val = getVal('leftmargin')) - styles['margin-left'] = val + "px"; - else - styles['margin-left'] = ''; - - // Serialize, parse and reserialize this will compress redundant styles - setVal('style', dom.serializeStyle(dom.parseStyle(dom.serializeStyle(styles)))); - this.changedStyle(); - }, - - update : function() { - var data = {}; - - tinymce.each(tinyMCEPopup.dom.select('select,input,textarea'), function(node) { - data[node.id] = getVal(node.id); - }); - - tinyMCEPopup.editor.plugins.fullpage._dataToHtml(data); - tinyMCEPopup.close(); - } - }; - - function init() { - var form = document.forms[0], i, item, list, editor = tinyMCEPopup.editor; - - // Setup doctype select box - list = editor.getParam("fullpage_doctypes", defaultDocTypes).split(','); - for (i = 0; i < list.length; i++) { - item = list[i].split('='); - - if (item.length > 1) - addSelectValue(form, 'doctype', item[0], item[1]); - } - - // Setup fonts select box - list = editor.getParam("fullpage_fonts", defaultFontNames).split(';'); - for (i = 0; i < list.length; i++) { - item = list[i].split('='); - - if (item.length > 1) - addSelectValue(form, 'fontface', item[0], item[1]); - } - - // Setup fontsize select box - list = editor.getParam("fullpage_fontsizes", defaultFontSizes).split(','); - for (i = 0; i < list.length; i++) - addSelectValue(form, 'fontsize', list[i], list[i]); - - // Setup encodings select box - list = editor.getParam("fullpage_encodings", defaultEncodings).split(','); - for (i = 0; i < list.length; i++) { - item = list[i].split('='); - - if (item.length > 1) - addSelectValue(form, 'docencoding', item[0], item[1]); - } - - // Setup color pickers - document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); - document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color'); - document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color'); - document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color'); - document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor'); - document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage'); - document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage'); - - // Resize some elements - if (isVisible('stylesheetbrowser')) - document.getElementById('stylesheet').style.width = '220px'; - - if (isVisible('link_href_browser')) - document.getElementById('element_link_href').style.width = '230px'; - - if (isVisible('bgimage_browser')) - document.getElementById('bgimage').style.width = '210px'; - - // Update form - tinymce.each(tinyMCEPopup.getWindowArg('data'), function(value, key) { - setVal(key, value); - }); - - FullPageDialog.changedStyle(); - - // Update colors - updateColor('textcolor_pick', 'textcolor'); - updateColor('bgcolor_pick', 'bgcolor'); - updateColor('visited_color_pick', 'visited_color'); - updateColor('active_color_pick', 'active_color'); - updateColor('link_color_pick', 'link_color'); - }; - - tinyMCEPopup.onInit.add(init); -})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/da_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/da_dlg.js deleted file mode 100644 index 79fd65897ffb..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/da_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('da.fullpage_dlg',{title:"Dokumentegenskaber","meta_tab":"Generelt","appearance_tab":"Udseende","advanced_tab":"Advanceret","meta_props":"Meta-information",langprops:"Sprog og kodning","meta_title":"Titel","meta_keywords":"N\u00f8gleord","meta_description":"Beskrivelse","meta_robots":"Robots",doctypes:"Doctype",langcode:"Sprogkode",langdir:"Sprogretning",ltr:"Venstre mod h\u00f8jre",rtl:"H\u00f8jre md venstre","xml_pi":"XML declaration",encoding:"Tegns\u00e6t","appearance_bgprops":"Baggrundsegenskaber","appearance_marginprops":"Body margins","appearance_linkprops":"Link farver","appearance_textprops":"Tekstegenskaber",bgcolor:"Baggrundsfarve",bgimage:"Baggrundsbillede","left_margin":"Venstre margin","right_margin":"H\u00f8jre margin","top_margin":"Topmargin","bottom_margin":"Bundmargin","text_color":"Tekstfarve","font_size":"Skriftst\u00f8rrelse","font_face":"Skrifttype","link_color":"Linkfarve","hover_color":"Farve ved aktivering","visited_color":"Farve efter museklik","active_color":"Farve ved museklik",textcolor:"Farve",fontsize:"Skriftst\u00f8rrelse",fontface:"Skrifttype","meta_index_follow":"Indeks og f\u00f8lg links","meta_index_nofollow":"Indeks og f\u00f8lg ikke links","meta_noindex_follow":"Ingen indeks, men f\u00f8lg links","meta_noindex_nofollow":"Ingen indeks og f\u00f8lg ikke links","appearance_style":"Stylesheet og style-egenskaber",stylesheet:"Stylesheet",style:"Style",author:"Forfatter",copyright:"Copyright",add:"Tilf\u00f8j nyt element",remove:"Slet valgte element",moveup:"Flyt valgte element op",movedown:"Flyt valgte element ned","head_elements":"Hovedelement",info:"Information","add_title":"Titelelement","add_meta":"Meta-element","add_script":"Script-element","add_style":"Style-element","add_link":"Link-element","add_base":"Base-element","add_comment":"Kommentar-node","title_element":"Titelelement","script_element":"Script-element","style_element":"Style-element","base_element":"Base-element","link_element":"Link-element","meta_element":"Meta-element","comment_element":"Kommentar",src:"Src",language:"Sprog",href:"Href",target:"Destination",type:"Type",charset:"Tegns\u00e6t",defer:"Defer",media:"Media",properties:"Egenskaber",name:"Navn",value:"V\u00e6rdi",content:"Indhold",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Generelt","advanced_props":"Advanceret"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/de_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/de_dlg.js deleted file mode 100644 index ecdff9ed60a9..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/de_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('de.fullpage_dlg',{title:"Dokument-Eigenschaften","meta_tab":"Allgemein","appearance_tab":"Aussehen","advanced_tab":"Erweitert","meta_props":"Meta-Information",langprops:"Sprache und Codierung","meta_title":"Titel","meta_keywords":"Keywords","meta_description":"Beschreibung","meta_robots":"Robots",doctypes:"DocType",langcode:"Sprachcode",langdir:"Sprachrichtung",ltr:"Links nach Rechts",rtl:"Rechts nach Links","xml_pi":"XML Deklaration",encoding:"Zeichencodierung","appearance_bgprops":"Hintergrund-Eigenschaften","appearance_marginprops":"Abst\u00e4nde des Body","appearance_linkprops":"Linkfarben","appearance_textprops":"Text-Eigenschaften",bgcolor:"Hintergrundfarbe",bgimage:"Hintergrundbild","left_margin":"Linker Abstand","right_margin":"Rechter Abstand","top_margin":"Oberer Abstand","bottom_margin":"Unterer Abstand","text_color":"Textfarbe","font_size":"Schriftgr\u00f6\u00dfe","font_face":"Schriftart","link_color":"Linkfarbe","hover_color":"Hover-Farbe","visited_color":"Visited-Farbe","active_color":"Active-Farbe",textcolor:"Farbe",fontsize:"Schriftgr\u00f6\u00dfe",fontface:"Schriftart","meta_index_follow":"Indizieren und den Links folgen","meta_index_nofollow":"Indizieren, aber den Links nicht folgen","meta_noindex_follow":"Nicht indizieren, aber den Links folgen","meta_noindex_nofollow":"Nicht indizieren und auch nicht den Links folgen","appearance_style":"CSS-Stylesheet und Stileigenschaften",stylesheet:"CSS-Stylesheet",style:"CSS-Stil",author:"Autor",copyright:"Copyright",add:"Neues Element hinzuf\u00fcgen",remove:"Ausgew\u00e4hltes Element entfernen",moveup:"Ausgew\u00e4hltes Element nach oben bewegen",movedown:"Ausgew\u00e4hltes Element nach unten bewegen","head_elements":"\u00dcberschriftenelemente",info:"Information","add_title":"Titel-Element","add_meta":"Meta-Element","add_script":"Script-Element","add_style":"Style-Element","add_link":"Link-Element","add_base":"Base-Element","add_comment":"HTML-Kommentar","title_element":"Titel-Element","script_element":"Script-Element","style_element":"Style-Element","base_element":"Base-Element","link_element":"Link-Element","meta_element":"Meta_Element","comment_element":"Kommentar",src:"Src",language:"Sprache",href:"Href",target:"Ziel",type:"Typ",charset:"Zeichensatz",defer:"Defer",media:"Media",properties:"Eigenschaften",name:"Name",value:"Wert",content:"Inhalt",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Allgemein","advanced_props":"Erweitert"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/en_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/en_dlg.js deleted file mode 100644 index 516edc74fd43..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/en_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('en.fullpage_dlg',{title:"Document Properties","meta_tab":"General","appearance_tab":"Appearance","advanced_tab":"Advanced","meta_props":"Meta Information",langprops:"Language and Encoding","meta_title":"Title","meta_keywords":"Keywords","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Language Code",langdir:"Language Direction",ltr:"Left to Right",rtl:"Right to Left","xml_pi":"XML Declaration",encoding:"Character Encoding","appearance_bgprops":"Background Properties","appearance_marginprops":"Body Margins","appearance_linkprops":"Link Colors","appearance_textprops":"Text Properties",bgcolor:"Background Color",bgimage:"Background Image","left_margin":"Left Margin","right_margin":"Right Margin","top_margin":"Top Margin","bottom_margin":"Bottom Margin","text_color":"Text Color","font_size":"Font Size","font_face":"Font Face","link_color":"Link Color","hover_color":"Hover Color","visited_color":"Visited Color","active_color":"Active Color",textcolor:"Color",fontsize:"Font Size",fontface:"Font Family","meta_index_follow":"Index and Follow the Links","meta_index_nofollow":"Index and Don\'t Follow the Links","meta_noindex_follow":"Do Not Index but Follow the Links","meta_noindex_nofollow":"Do Not Index and Don\'t Follow the Links","appearance_style":"Stylesheet and Style Properties",stylesheet:"Stylesheet",style:"Style",author:"Author",copyright:"Copyright",add:"Add New Element",remove:"Remove Selected Element",moveup:"Move Selected Element Up",movedown:"Move Selected Element Down","head_elements":"Head Elements",info:"Information","add_title":"Title Element","add_meta":"Meta Element","add_script":"Script Element","add_style":"Style Element","add_link":"Link Element","add_base":"Base Element","add_comment":"Comment Node","title_element":"Title Element","script_element":"Script Element","style_element":"Style Element","base_element":"Base Element","link_element":"Link Element","meta_element":"Meta Element","comment_element":"Comment",src:"Source",language:"Language",href:"HREF",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"HREF Lang","general_props":"General","advanced_props":"Advanced"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/en_us_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/en_us_dlg.js deleted file mode 100644 index 1104f6b6d39f..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/en_us_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('en_us.fullpage_dlg',{title:"Document Properties","meta_tab":"General","appearance_tab":"Appearance","advanced_tab":"Advanced","meta_props":"Meta Information",langprops:"Language and Encoding","meta_title":"Title","meta_keywords":"Keywords","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Language Code",langdir:"Language Direction",ltr:"Left to Right",rtl:"Right to Left","xml_pi":"XML Declaration",encoding:"Character Encoding","appearance_bgprops":"Background Properties","appearance_marginprops":"Body Margins","appearance_linkprops":"Link Colors","appearance_textprops":"Text Properties",bgcolor:"Background Color",bgimage:"Background Image","left_margin":"Left Margin","right_margin":"Right Margin","top_margin":"Top Margin","bottom_margin":"Bottom Margin","text_color":"Text Color","font_size":"Font Size","font_face":"Font Face","link_color":"Link Color","hover_color":"Hover Color","visited_color":"Visited Color","active_color":"Active Color",textcolor:"Color",fontsize:"Font Size",fontface:"Font Family","meta_index_follow":"Index and Follow the Links","meta_index_nofollow":"Index and Don\'t Follow the Links","meta_noindex_follow":"Do Not Index but Follow the Links","meta_noindex_nofollow":"Do Not Index and Don\'t Follow the Links","appearance_style":"Stylesheet and Style Properties",stylesheet:"Stylesheet",style:"Style",author:"Author",copyright:"Copyright",add:"Add New Element",remove:"Remove Selected Element",moveup:"Move Selected Element Up",movedown:"Move Selected Element Down","head_elements":"Head Elements",info:"Information","add_title":"Title Element","add_meta":"Meta Element","add_script":"Script Element","add_style":"Style Element","add_link":"Link Element","add_base":"Base Element","add_comment":"Comment Node","title_element":"Title Element","script_element":"Script Element","style_element":"Style Element","base_element":"Base Element","link_element":"Link Element","meta_element":"Meta Element","comment_element":"Comment",src:"Source",language:"Language",href:"HREF",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"HREF Lang","general_props":"General","advanced_props":"Advanced"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/fi_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/fi_dlg.js deleted file mode 100644 index 3f1fb393ff74..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/fi_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fi.fullpage_dlg',{title:"Tiedoston asetukset","meta_tab":"Yleinen","appearance_tab":"Ulkoasu","advanced_tab":"Edistynyt","meta_props":"Metatiedot",langprops:"Kieli ja koodaus","meta_title":"Otsikko","meta_keywords":"Avainsanat","meta_description":"Kuvaus","meta_robots":"Robotit",doctypes:"Dokumenttityypit",langcode:"Kielen koodi",langdir:"Kielen suunta",ltr:"Vasemmalta oikealle",rtl:"Oikealta vasemmalle","xml_pi":"XML-ilmoitus",encoding:"Tekstin koodaus","appearance_bgprops":"Taustan asetukset","appearance_marginprops":"Body-marginaalit","appearance_linkprops":"Linkkien v\u00e4rit","appearance_textprops":"Tekstin asetukset",bgcolor:"Taustan v\u00e4ri",bgimage:"Taustakuva","left_margin":"Vasen marginaali","right_margin":"Oikea marginaali","top_margin":"Yl\u00e4marginaali","bottom_margin":"Alamarginaali","text_color":"Tekstin v\u00e4ri","font_size":"Fonttikoko","font_face":"Fontti","link_color":"Linkin v\u00e4ri","hover_color":"Hover-v\u00e4ri","visited_color":"Vierailtu v\u00e4ri","active_color":"Aktiivinen v\u00e4ri",textcolor:"V\u00e4ri",fontsize:"Fonttikoko",fontface:"Fontti","meta_index_follow":"Indeksoi ja seuraa linkkej\u00e4","meta_index_nofollow":"Indeksoi, mutta \u00e4l\u00e4 seuraa linkkej\u00e4","meta_noindex_follow":"\u00c4l\u00e4 indeksoi, mutta seuraa linkkej\u00e4.","meta_noindex_nofollow":"\u00c4l\u00e4 indeksoi, \u00e4l\u00e4k\u00e4 seuraa linkkej\u00e4","appearance_style":"Tyylitiedosto ja tyylin asetukset",stylesheet:"Tyylitiedosto",style:"Tyyli",author:"Kirjoittaja",copyright:"Copyright",add:"Lis\u00e4\u00e4 uusi elementti",remove:"Poista valittu elementti",moveup:"Siirr\u00e4 valittua elementti\u00e4 yl\u00f6s",movedown:"Siirr\u00e4 valittua elementti\u00e4 alas","head_elements":"P\u00e4\u00e4elementti",info:"Informaatio","add_title":"Otsikkoelementti","add_meta":"Meta-elementti","add_script":"Script-elementti","add_style":"Tyylielementti","add_link":"Linkkielementti","add_base":"Base-elementti","add_comment":"Yleinen elementti","title_element":"Otsikkoelementti","script_element":"Script-elementti","style_element":"Tyylielementti","base_element":"Base-elementti","link_element":"Linkkielementti","meta_element":"Meta-elementti","comment_element":"Kommentti",src:"L\u00e4hde",language:"Kieli",href:"Href",target:"Kohde",type:"Tyyppi",charset:"Kirjasintyyppi",defer:"Mukautuminen",media:"Media",properties:"Asetukset",name:"Nimi",value:"Arvo",content:"Sis\u00e4lt\u00f6",rel:"Rel",rev:"Rev",hreflang:"Href-kieli","general_props":"Yleinen","advanced_props":"Edistynyt"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/fr_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/fr_dlg.js deleted file mode 100644 index c2ddc65db08d..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/fr_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fr.fullpage_dlg',{title:"Propri\u00e9t\u00e9s du document","meta_tab":"G\u00e9n\u00e9ral","appearance_tab":"Apparence","advanced_tab":"Avanc\u00e9","meta_props":"Metadonn\u00e9es",langprops:"Langue et encodage","meta_title":"Titre","meta_keywords":"Mots-cl\u00e9s","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Code de la langue",langdir:"Sens de lecture",ltr:"De gauche \u00e0 droite",rtl:"De droite \u00e0 gauche","xml_pi":"D\u00e9claration XML",encoding:"Encodage des caract\u00e8res","appearance_bgprops":"Propri\u00e9t\u00e9s du fond","appearance_marginprops":"Marge du corps de la page","appearance_linkprops":"Couleurs des liens","appearance_textprops":"Propri\u00e9t\u00e9s du texte",bgcolor:"Couleur de fond",bgimage:"Image de fond","left_margin":"Marge de gauche","right_margin":"Marge de droite","top_margin":"Marge du haut","bottom_margin":"Marge du bas","text_color":"Couleur du texte","font_size":"Taille de la police","font_face":"Nom de la police","link_color":"Couleur des liens","hover_color":"Couleur au survol","visited_color":"Couleur des liens visit\u00e9s","active_color":"Couleur du lien actif",textcolor:"Couleur",fontsize:"Taille de police",fontface:"Nom de la police","meta_index_follow":"Indexer et suivre les liens","meta_index_nofollow":"Indexer et ne pas suivre les liens","meta_noindex_follow":"Ne pas indexer et suivre les liens","meta_noindex_nofollow":"Ne pas indexer et ne pas suivre les liens","appearance_style":"Propri\u00e9t\u00e9s de la feuille de style et du style",stylesheet:"Feuille de style",style:"Style",author:"Auteur",copyright:"Copyright",add:"Ajouter un nouvel \u00e9l\u00e9ment",remove:"Retirer l\'\u00e9l\u00e9ment s\u00e9lectionn\u00e9",moveup:"D\u00e9placer l\'\u00e9l\u00e9ment s\u00e9lectionn\u00e9 vers le haut",movedown:"D\u00e9placer l\'\u00e9l\u00e9ment s\u00e9lectionn\u00e9 vers le bas","head_elements":"\u00c9l\u00e9ments d\'en-t\u00eate",info:"Information","add_title":"\u00c9l\u00e9ment de titre","add_meta":"\u00c9l\u00e9ment Meta","add_script":"\u00c9l\u00e9ment de script","add_style":"\u00c9l\u00e9ment de style","add_link":"\u00c9l\u00e9ment de lien","add_base":"\u00c9l\u00e9ment de base","add_comment":"Commentaire","title_element":"\u00c9l\u00e9ment de titre","script_element":"\u00c9l\u00e9ment de script","style_element":"\u00c9l\u00e9ment de style","base_element":"\u00c9l\u00e9ment de base","link_element":"\u00c9l\u00e9ment de lien","meta_element":"\u00c9l\u00e9ment Meta","comment_element":"Commentaire",src:"Source",language:"Langue",href:"Href",target:"Cible",type:"Type",charset:"Charset",defer:"D\u00e9f\u00e9rer",media:"M\u00e9dia",properties:"Propri\u00e9t\u00e9s",name:"Nom",value:"Valeur",content:"Contenu",rel:"Rel",rev:"Rev",hreflang:"langue Href","general_props":"G\u00e9n\u00e9ral","advanced_props":"Avanc\u00e9"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/he_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/he_dlg.js deleted file mode 100644 index 69faae39a27d..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/he_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('he.fullpage_dlg',{title:"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05de\u05e1\u05de\u05da","meta_tab":"\u05db\u05dc\u05dc\u05d9","appearance_tab":"\u05de\u05e8\u05d0\u05d4","advanced_tab":"\u05de\u05ea\u05e7\u05d3\u05dd","meta_props":"\u05ea\u05d2\u05d9 \u05de\u05d8\u05d4",langprops:"\u05e9\u05e4\u05d4 \u05d5\u05e7\u05d9\u05d3\u05d5\u05d3","meta_title":"\u05db\u05d5\u05ea\u05e8\u05ea","meta_keywords":"\u05de\u05d9\u05dc\u05d5\u05ea \u05de\u05e4\u05ea\u05d7","meta_description":"\u05ea\u05d9\u05d0\u05d5\u05e8","meta_robots":"\u05e8\u05d5\u05d1\u05d5\u05d8\u05d9\u05dd",doctypes:"Doctype",langcode:"\u05e7\u05d5\u05d3 \u05d4\u05e9\u05e4\u05d4",langdir:"\u05db\u05d9\u05d5\u05d5\u05df \u05d4\u05e9\u05e4\u05d4",ltr:"\u05de\u05e9\u05de\u05d0\u05dc \u05dc\u05d9\u05de\u05d9\u05df",rtl:"\u05de\u05d9\u05de\u05d9\u05df \u05dc\u05e9\u05de\u05d0\u05dc","xml_pi":"XML declaration",encoding:"\u05e7\u05d9\u05d3\u05d5\u05d3 \u05ea\u05d5\u05d5\u05d9\u05dd","appearance_bgprops":"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05e8\u05e7\u05e2","appearance_marginprops":"Body margins","appearance_linkprops":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8\u05d9\u05dd","appearance_textprops":"Text properties",bgcolor:"\u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2",bgimage:"\u05ea\u05de\u05d5\u05e0\u05ea \u05e8\u05e7\u05e2","left_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05e9\u05de\u05d0\u05dc\u05d9\u05d9\u05dd","right_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05d9\u05de\u05e0\u05d9\u05d9\u05dd","top_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05e2\u05dc\u05d9\u05d5\u05e0\u05d9\u05dd","bottom_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05ea\u05d7\u05ea\u05d9\u05d9\u05dd","text_color":"\u05e6\u05d1\u05e2 \u05d8\u05e7\u05e1\u05d8","font_size":"\u05d2\u05d5\u05d3\u05dc \u05d2\u05d5\u05e4\u05df","font_face":"\u05e1\u05d5\u05d2 \u05d2\u05d5\u05e4\u05df","link_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8","hover_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d1\u05de\u05e2\u05d1\u05e8 \u05e2\u05db\u05d1\u05e8","visited_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05e9\u05e0\u05e6\u05e4\u05d4","active_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05e4\u05e2\u05d9\u05dc",textcolor:"\u05e6\u05d1\u05e2",fontsize:"\u05d2\u05d5\u05d3\u05dc \u05d2\u05d5\u05e4\u05df",fontface:"\u05d2\u05d5\u05e4\u05df","meta_index_follow":"Index and follow the links","meta_index_nofollow":"Index and don\'t follow the links","meta_noindex_follow":"Do not index but follow the links","meta_noindex_nofollow":"Do not index and don\\\'t follow the links","appearance_style":"Stylesheet and style properties",stylesheet:"\u05e1\u05d2\u05e0\u05d5\u05df \u05e2\u05d9\u05e6\u05d5\u05d1",style:"\u05e2\u05d9\u05e6\u05d5\u05d1",author:"\u05db\u05d5\u05ea\u05d1",copyright:"\u05d6\u05db\u05d5\u05d9\u05d5\u05ea \u05d9\u05d5\u05e6\u05e8\u05d9\u05dd",add:"\u05d4\u05d5\u05e1\u05e3 \u05d0\u05dc\u05de\u05e0\u05d8 \u05d7\u05d3\u05e9",remove:"Remove selected element",moveup:"Move selected element up",movedown:"Move selected element down","head_elements":"Head elements",info:"\u05de\u05d9\u05d3\u05e2","add_title":"Title element","add_meta":"Meta element","add_script":"Script element","add_style":"Style element","add_link":"Link element","add_base":"Base element","add_comment":"Comment node","title_element":"Title element","script_element":"Script element","style_element":"\u05d0\u05dc\u05de\u05e0\u05d8 \u05e2\u05d9\u05e6\u05d5\u05d1","base_element":"\u05d0\u05dc\u05de\u05e0\u05d8 \u05d1\u05e1\u05d9\u05e1","link_element":"\u05d0\u05dc\u05de\u05e0\u05d8 \u05e7\u05d9\u05e9\u05d5\u05e8","meta_element":"Meta element","comment_element":"\u05ea\u05d2\u05d5\u05d1\u05d4",src:"\u05db\u05ea\u05d5\u05d1\u05ea \u05de\u05e7\u05d5\u05e8",language:"\u05e9\u05e4\u05d4",href:"HREF",target:"\u05d9\u05e2\u05d3",type:"\u05e1\u05d5\u05d2",charset:"\u05e7\u05d9\u05d3\u05d5\u05d3",defer:"Defer",media:"\u05de\u05d3\u05d9\u05d4",properties:"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9\u05dd",name:"\u05e9\u05dd",value:"\u05e2\u05e8\u05da",content:"\u05ea\u05d5\u05db\u05df",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"\u05db\u05dc\u05dc\u05d9","advanced_props":"\u05de\u05ea\u05e7\u05d3\u05dd"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/it_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/it_dlg.js deleted file mode 100644 index d5445e832714..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/it_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('it.fullpage_dlg',{title:"Propriet\u00e0 Documento","meta_tab":"Generale","appearance_tab":"Aspetto","advanced_tab":"Avanzate","meta_props":"Informazioni Metatag",langprops:"Lingua e codifica","meta_title":"Titolo","meta_keywords":"Parole chiave","meta_description":"Descrizione","meta_robots":"Robots",doctypes:"Doctype",langcode:"Codice lingua",langdir:"Direzione testo",ltr:"Sinistra verso destra",rtl:"Destra verso sinistra","xml_pi":"Dichiarazione XML",encoding:"Codifica carattere","appearance_bgprops":"Propriet\u00e0 sfondo","appearance_marginprops":"Margini body","appearance_linkprops":"Colori collegamenti","appearance_textprops":"Propriet\u00e0 testo",bgcolor:"Colore sfondo",bgimage:"Immagine sfondo","left_margin":"Margine sinistro","right_margin":"Margine destro","top_margin":"Margine superiore","bottom_margin":"Margine inferiore","text_color":"Colore testo","font_size":"Dimensione carattere","font_face":"Tipo carattere","link_color":"Colore collegamento","hover_color":"Colore \\\'Hover\\\'","visited_color":"Colore \\\'Visited\\\'","active_color":"Colore \\\'Active\\\'",textcolor:"Colore",fontsize:"Dimensione carattere",fontface:"Famiglia carattere","meta_index_follow":"Indicizzare e seguire collegamenti","meta_index_nofollow":"Indicizzare e non segure collegamenti","meta_noindex_follow":"Non indicizzare ma seguire collegamenti","meta_noindex_nofollow":"Non indicizzare e non seguire collegamenti","appearance_style":"Propriet\u00e0 stili e fogli di stile",stylesheet:"Fogli di stile",style:"Stile",author:"Autore",copyright:"Copyright",add:"Aggiungi nuovo elemento",remove:"Rimuovi elemento selezionato",moveup:"Sposta elemento selezionato in alto",movedown:"Sposta elemento selezionato in basso","head_elements":"Elementi Head",info:"Informazioni","add_title":"Elemento Titolo","add_meta":"Elemento Meta","add_script":"Elemento Script","add_style":"Elemento Style","add_link":"Elemento Link","add_base":"Elemento Base","add_comment":"Nodo Commento","title_element":"Elemento Titolo","script_element":"Elemento Script","style_element":"Elemento Style","base_element":"Elemento Base","link_element":"Elemento Link","meta_element":"Elemento Meta","comment_element":"Commento",src:"Sorgente",language:"Linguaggio",href:"Href",target:"Target",type:"Tipo",charset:"Set caratteri",defer:"Defer",media:"Media",properties:"Propriet\u00e0",name:"Nome",value:"Valore",content:"Contenuto",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Generale","advanced_props":"Avanzate"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/ja_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/ja_dlg.js deleted file mode 100644 index 656436305157..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/ja_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ja.fullpage_dlg',{title:"\u30da\u30fc\u30b8\u306e\u5c5e\u6027","meta_tab":"\u4e00\u822c","appearance_tab":"\u8868\u793a","advanced_tab":"\u9ad8\u5ea6\u306a\u8a2d\u5b9a","meta_props":"\u30e1\u30bf\u60c5\u5831",langprops:"\u8a00\u8a9e\u3068\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0","meta_title":"\u30bf\u30a4\u30c8\u30eb","meta_keywords":"\u30ad\u30fc\u30ef\u30fc\u30c9","meta_description":"\u8aac\u660e","meta_robots":"\u691c\u7d22\u30ed\u30dc\u30c3\u30c8\u306e\u5236\u5fa1",doctypes:"\u6587\u66f8\u578b",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9",langdir:"\u6587\u7ae0\u306e\u65b9\u5411",ltr:"\u5de6\u304b\u3089\u53f3",rtl:"\u53f3\u304b\u3089\u5de6","xml_pi":"XML\u5ba3\u8a00",encoding:"\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0","appearance_bgprops":"\u80cc\u666f\u306e\u5c5e\u6027","appearance_marginprops":"Body\u306e\u4f59\u767d","appearance_linkprops":"\u30ea\u30f3\u30af\u306e\u8272","appearance_textprops":"\u6587\u5b57\u306e\u5c5e\u6027",bgcolor:"\u80cc\u666f\u306e\u8272",bgimage:"\u80cc\u666f\u306e\u753b\u50cf","left_margin":"\u5de6\u306e\u4f59\u767d","right_margin":"\u53f3\u306e\u4f59\u767d","top_margin":"\u4e0a\u306e\u4f59\u767d","bottom_margin":"\u4e0b\u306e\u4f59\u767d","text_color":"\u6587\u5b57\u306e\u8272","font_size":"\u6587\u5b57\u306e\u5927\u304d\u3055","font_face":"\u30d5\u30a9\u30f3\u30c8","link_color":"\u30ea\u30f3\u30af\u306e\u8272","hover_color":"\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u304c\u3042\u308b\u30ea\u30f3\u30af\u306e\u8272(hover)","visited_color":"\u65e2\u306b\u8aad\u3093\u3060\u30ea\u30f3\u30af\u306e\u8272(visited)","active_color":"\u30af\u30ea\u30c3\u30af\u3057\u305f\u77ac\u9593\u306e\u30ea\u30f3\u30af\u306e\u8272(active)",textcolor:"\u8272",fontsize:"\u6587\u5b57\u306e\u5927\u304d\u3055",fontface:"\u30d5\u30a9\u30f3\u30c8","meta_index_follow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u3066\u30ea\u30f3\u30af\u3092\u305f\u3069\u308b","meta_index_nofollow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u3066\u30ea\u30f3\u30af\u306f\u305f\u3069\u3089\u306a\u3044","meta_noindex_follow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u306a\u3044\u304c\u30ea\u30f3\u30af\u3092\u305f\u3069\u308b","meta_noindex_nofollow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u306a\u3044\u3067\u30ea\u30f3\u30af\u3082\u305f\u3069\u3089\u306a\u3044","appearance_style":"\u30b9\u30bf\u30a4\u30eb\u30b7\u30fc\u30c8\u3068\u30b9\u30bf\u30a4\u30eb\u306e\u5c5e\u6027",stylesheet:"\u30b9\u30bf\u30a4\u30eb\u30b7\u30fc\u30c8",style:"\u30b9\u30bf\u30a4\u30eb",author:"\u4f5c\u6210\u8005",copyright:"\u8457\u4f5c\u6a29",add:"\u65b0\u3057\u304f\u8981\u7d20\u3092\u8ffd\u52a0",remove:"\u9078\u629e\u3057\u305f\u8981\u7d20\u3092\u524a\u9664",moveup:"\u9078\u629e\u3057\u305f\u8981\u7d20\u3092\u4e0a\u306b\u79fb\u52d5",movedown:"\u9078\u629e\u3057\u305f\u8981\u7d20\u3092\u4e0b\u306b\u79fb\u52d5","head_elements":"Head\u8981\u7d20",info:"\u60c5\u5831","add_title":"Title\u8981\u7d20","add_meta":"Meta\u8981\u7d20","add_script":"Script\u8981\u7d20","add_style":"Style\u8981\u7d20","add_link":"Link\u8981\u7d20","add_base":"Base\u8981\u7d20","add_comment":"Comment\u30ce\u30fc\u30c9","title_element":"Title\u8981\u7d20","script_element":"Script\u8981\u7d20","style_element":"Style\u8981\u7d20","base_element":"Base\u8981\u7d20","link_element":"Link\u8981\u7d20","meta_element":"Meta\u8981\u7d20","comment_element":"\u30b3\u30e1\u30f3\u30c8",src:"src",language:"\u8a00\u8a9e",href:"Href",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"Href\u306e\u8a00\u8a9e","general_props":"\u4e00\u822c","advanced_props":"\u8a73\u7d30\u306a\u8a2d\u5b9a"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/nl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/nl_dlg.js deleted file mode 100644 index 9124146ce74c..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/nl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('nl.fullpage_dlg',{title:"Documenteigenschappen","meta_tab":"Algemeen","appearance_tab":"Weergave","advanced_tab":"Geavanceerd","meta_props":"Meta informatie",langprops:"Taal en codering","meta_title":"Titel","meta_keywords":"Sleutelwoorden","meta_description":"Beschrijving","meta_robots":"Robots",doctypes:"Doctype",langcode:"Taalcode",langdir:"Taalrichting",ltr:"Van links naar rechts",rtl:"Van rechts naar links","xml_pi":"XML toewijzing",encoding:"Karaktercodering","appearance_bgprops":"Achtergrondeigenschappen","appearance_marginprops":"Bodymarge","appearance_linkprops":"Linkkleuren","appearance_textprops":"Teksteigenschappen",bgcolor:"Achtergrondkleur",bgimage:"Achtergrondafbeelding","left_margin":"Linkermarge","right_margin":"Rechtermarge","top_margin":"Bovenmarge","bottom_margin":"Ondermarge","text_color":"Tekstkleur","font_size":"Tekengrootte","font_face":"Lettertype","link_color":"Linkkleur","hover_color":"Hoverkleur","visited_color":"Bezocht kleur","active_color":"Actieve kleur",textcolor:"Kleur",fontsize:"Tekengrootte",fontface:"Lettertype","meta_index_follow":"Links indexeren en volgen","meta_index_nofollow":"Links indexeren maar niet volgen","meta_noindex_follow":"Links volgen maar niet indexeren","meta_noindex_nofollow":"Links niet indexeren en niet volgen","appearance_style":"Stijlblad en stijleigenschappen",stylesheet:"Stijlblad",style:"Stijl",author:"Auteur",copyright:"Copyright",add:"Nieuw element toevoegen",remove:"Geselecteerde elementen verwijderen",moveup:"Geselecteerde elementen omhoog verplaatsen",movedown:"Geselecteerde elementen omlaag verplaatsen","head_elements":"Kopelementen",info:"Informatie","add_title":"Titelelement","add_meta":"Meta-element","add_script":"Scriptelement","add_style":"Stijlelement","add_link":"Linkelement","add_base":"Basiselement","add_comment":"Opmerkingknooppunt","title_element":"Titelelement","script_element":"Scriptelement","style_element":"Stijlelement","base_element":"Basiselement","link_element":"Linkelement","meta_element":"Meta-element","comment_element":"Opmerking",src:"Bron",language:"Taal",href:"HREF",target:"Doel",type:"Type",charset:"Karakterset",defer:"Uitstellen",media:"Media",properties:"Eigenschappen",name:"Naam",value:"Waarde",content:"Inhoud",rel:"Rel",rev:"Rev",hreflang:"HREF taal","general_props":"Algemeen","advanced_props":"Geavanceerd"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/no_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/no_dlg.js deleted file mode 100644 index f84cba27772e..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/no_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('no.fullpage_dlg',{title:"Dokumentegenskaper","meta_tab":"Generelt","appearance_tab":"Utseende","advanced_tab":"Avansert","meta_props":"Metainformasjon",langprops:"Spr\u00e5k og koding","meta_title":"Tittel","meta_keywords":"N\u00f8kkelord","meta_description":"Beskrivelse","meta_robots":"Roboter",doctypes:"Dokumenttype",langcode:"Spr\u00e5kkode",langdir:"Skriftretning",ltr:"Venstre mot h\u00f8yre",rtl:"H\u00f8yre mot venstre","xml_pi":"XML deklarering",encoding:"Tegnkoding","appearance_bgprops":"Bakgrunnsegenskaper","appearance_marginprops":"Body marg","appearance_linkprops":"Lenkefarger","appearance_textprops":"Tekstegenskaper",bgcolor:"Bakgrunnsfarge",bgimage:"Bakgrunnsbilde","left_margin":"Venstre marg","right_margin":"H\u00f8yre marg","top_margin":"Toppmarg","bottom_margin":"Bunnmarg","text_color":"Tekstfarge","font_size":"Skriftst\u00f8rrelse","font_face":"Skrifttype","link_color":"Lenkefarge","hover_color":"Pekefarge","visited_color":"Farge for bes\u00f8kt lenke","active_color":"Farge for aktiv lenke",textcolor:"Farge",fontsize:"Skriftst\u00f8rrelse",fontface:"Skriftfamile","meta_index_follow":"Indekser og f\u00f8lg lenkene","meta_index_nofollow":"Indekser og ikke f\u00f8lg lenkene","meta_noindex_follow":"Ikke indekser, men f\u00f8lg lenkene","meta_noindex_nofollow":"Ikke indekser, og ikke f\u00f8lg lenkene","appearance_style":"Stilark og stilegenskaper",stylesheet:"Stilark",style:"Stil",author:"Forfatter",copyright:"Copyright",add:"Legg til nytt element",remove:"Fjern valgt element",moveup:"Flytt markert element opp",movedown:"Flytt markert element ned","head_elements":"Overskriftselement",info:"Informasjon","add_title":"Tittelelement","add_meta":"Metaelement","add_script":"Skriptelement","add_style":"Stilelement","add_link":"Lenkeelement","add_base":"Basiselement","add_comment":"Kommentar","title_element":"Tittelelement","script_element":"Skriptelement","style_element":"Stilelement","base_element":"Basiselement","link_element":"Lenkeelement","meta_element":"Metaelement","comment_element":"Kommentar",src:"Kilde",language:"Spr\u00e5k",href:"Href",target:"M\u00e5l",type:"Type",charset:"Tegnsett",defer:"Henstille",media:"Objekt",properties:"Egenskaper",name:"Navn",value:"Verdi",content:"Innhold",rel:"Rel",rev:"Rev",hreflang:"Href spr\u00e5k","general_props":"Generelt","advanced_props":"Avansert"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/pl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/pl_dlg.js deleted file mode 100644 index b94005264343..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/pl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pl.fullpage_dlg',{title:"W\u0142a\u015bciwo\u015bci dokumentu","meta_tab":"Og\u00f3lne","appearance_tab":"Wygl\u0105d","advanced_tab":"Zaawansowane","meta_props":"Meta informacje",langprops:"J\u0119zyk i kodowanie","meta_title":"Tytu\u0142","meta_keywords":"S\u0142owa kluczowe","meta_description":"Opis","meta_robots":"Roboty",doctypes:"Typ dokumentu",langcode:"Oznaczenie kodowe j\u0119zyka",langdir:"Kierunek czytania tekstu",ltr:"Kierunek z lewej do prawej",rtl:"Kierunek z prawej do lewej","xml_pi":"Deklaracja XML",encoding:"Kodowanie znak\u00f3w","appearance_bgprops":"W\u0142a\u015bciwo\u015bci t\u0142a","appearance_marginprops":"Marginesy strony","appearance_linkprops":"Kolor odno\u015bnik\u00f3w","appearance_textprops":"W\u0142a\u015bciwo\u015bci tekstu",bgcolor:"Kolor t\u0142a",bgimage:"Obrazek t\u0142a","left_margin":"Lewy margines","right_margin":"Prawy margines","top_margin":"G\u00f3rny margines","bottom_margin":"Dolny margines","text_color":"Kolor tekstu","font_size":"Rozmiar czcionki","font_face":"Czcionka","link_color":"Kolor odno\u015bnika","hover_color":"Kolor po najechaniu myszk\u0105","visited_color":"Kolor odwiedzonych link\u00f3w","active_color":"Kolor aktywnych link\u00f3w",textcolor:"Kolor",fontsize:"Rozmiar czcionki",fontface:"Rodzaj czcionki","meta_index_follow":"Indeksuj i pod\u0105\u017caj za linkami","meta_index_nofollow":"Indeksuj i nie pod\u0105\u017caj za odno\u015bnikami","meta_noindex_follow":"Nie indeksuj i pod\u0105\u017caj za odno\u015bnikami","meta_noindex_nofollow":"Nie indeksuj i nie pod\u0105\u017caj za odno\u015bnikami","appearance_style":"Arkusze i w\u0142a\u015bciwo\u015bci styl\u00f3w",stylesheet:"Arkusz styl\u00f3w",style:"Styl",author:"Autor",copyright:"Prawa autorskie",add:"Dodaj nowy element",remove:"Usu\u0144 wybrany element",moveup:"Przesu\u0144 wybrane element do g\u00f3ry",movedown:"Przesu\u0144 wybrane element w d\u00f3\u0142","head_elements":"Elementy nag\u0142\u00f3wka",info:"Informacja","add_title":"Tytu\u0142","add_meta":"Meta tag","add_script":"Skrypt","add_style":"Styl","add_link":"Odno\u015bnik","add_base":"Baza","add_comment":"Komentarz","title_element":"Tytu\u0142","script_element":"Skrypt","style_element":"Styl","base_element":"Baza","link_element":"Odno\u015bnik","meta_element":"Meta tag","comment_element":"Komentarz",src:"\u0179r\u00f3d\u0142o",language:"J\u0119zyk",href:"Odno\u015bnik",target:"Cel",type:"Typ",charset:"Kodowanie",defer:"Defer",media:"Media",properties:"W\u0142a\u015bciwo\u015bci",name:"Nazwa",value:"Warto\u015b\u0107",content:"Zawarto\u015b\u0107",rel:"Rel",rev:"Rev",hreflang:"J\u0119zyk odno\u015bnika","general_props":"G\u0142\u00f3wne","advanced_props":"Zaawansowane"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/pt_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/pt_dlg.js deleted file mode 100644 index 749f86859f32..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/pt_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pt.fullpage_dlg',{title:"Propriedades do documento","meta_tab":"Geral","appearance_tab":"Apar\u00eancia","advanced_tab":"Avan\u00e7ado","meta_props":"Meta-informa\u00e7\u00e3o",langprops:"Idioma e codifica\u00e7\u00e3o","meta_title":"T\u00edtulo","meta_keywords":"Palavras-chave","meta_description":"Descri\u00e7\u00e3o","meta_robots":"Robots",doctypes:"Doctype",langcode:"C\u00f3digo do idioma",langdir:"Dire\u00e7\u00e3o do texto",ltr:"Esquerda para direita",rtl:"Direita para esquerda","xml_pi":"Declara\u00e7\u00e3o XML",encoding:"Codifica\u00e7\u00e3o de caracteres","appearance_bgprops":"Propriedades do plano de fundo","appearance_marginprops":"Margens (BODY)","appearance_linkprops":"Cores dos links","appearance_textprops":"Propriedades de texto",bgcolor:"Cor de fundo",bgimage:"Imagem de fundo","left_margin":"Margem esquerda","right_margin":"Margem direita","top_margin":"Margem topo","bottom_margin":"Margem base","text_color":"Cor do texto","font_size":"Tamanho fonte","font_face":"Fonte","link_color":"Cores dos links","hover_color":"Hover","visited_color":"Visitado","active_color":"Ativo",textcolor:"Cor",fontsize:"Tamanho fonte",fontface:"Fonte","meta_index_follow":"Indexar e seguir os hyperlinks","meta_index_nofollow":"Indexar e n\u00e3o seguir os hyperlinks","meta_noindex_follow":"Seguir hyperlinks, mas n\u00e3o indexar","meta_noindex_nofollow":"N\u00e3o indexar / n\u00e3o seguir hyperlinks.","appearance_style":"Propriedades de folhas de estilo",stylesheet:"Folha de estilo",style:"Estilo",author:"Autor",copyright:"Copyright",add:"Acrescentar novo elemento",remove:"Remover elemento selecionado",moveup:"Subir elemento selecionado",movedown:"Descer elemento selecionado","head_elements":"Elementos HEAD",info:"Informa\u00e7\u00e3o","add_title":"TITLE","add_meta":"META","add_script":"SCRIPT","add_style":"STYLE","add_link":"LINK","add_base":"BASE","add_comment":"Coment\u00e1rio","title_element":"TITLE","script_element":"SCRIPT","style_element":"STYLE","base_element":"BASE","link_element":"LINK","meta_element":"META","comment_element":"Coment\u00e1rio",src:"src",language:"Idioma",href:"href",target:"Alvo",type:"Tipo",charset:"Charset",defer:"Adiar",media:"Media",properties:"Propriedades",name:"Nome",value:"Valor",content:"Conte\u00fado",rel:"rel",rev:"rev",hreflang:"href lang","general_props":"Geral","advanced_props":"Avan\u00e7ado"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/ru_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/ru_dlg.js deleted file mode 100644 index 67d32e6019ea..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/ru_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ru.fullpage_dlg',{title:"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430","meta_tab":"\u041e\u0431\u0449\u0435\u0435","appearance_tab":"\u0412\u0438\u0434","advanced_tab":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e","meta_props":"\u0426\u0435\u043b\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438",langprops:"\u042f\u0437\u044b\u043a \u0438 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","meta_title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","meta_keywords":"\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430","meta_description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","meta_robots":"\u0420\u0430\u0431\u043e\u0442\u044b",doctypes:"\u0422\u0438\u043f",langcode:"\u041a\u043e\u0434 \u044f\u0437\u044b\u043a\u0430",langdir:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430",ltr:"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e","xml_pi":"\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 XML",encoding:"\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430","appearance_bgprops":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0444\u043e\u043d\u0430","appearance_marginprops":"\u041e\u0442\u0441\u0442\u0443\u043f\u044b","appearance_linkprops":"\u0426\u0432\u0435\u0442 \u0441\u0441\u044b\u043b\u043e\u043a","appearance_textprops":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0442\u0435\u043a\u0441\u0442\u0430",bgcolor:"\u0426\u0432\u0435\u0442 \u0444\u043e\u043d\u0430",bgimage:"\u0424\u043e\u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","left_margin":"\u041e\u0442\u0441\u0442\u0443\u043f \u0441\u043b\u0435\u0432\u0430","right_margin":"\u041e\u0442\u0441\u0442\u0443\u043f \u0441\u043f\u0440\u0430\u0432\u0430","top_margin":"\u041e\u0442\u0441\u0442\u0443\u043f \u0441\u0432\u0435\u0440\u0445\u0443","bottom_margin":"\u041e\u0442\u0441\u0442\u0443\u043f \u0441\u043d\u0438\u0437\u0443","text_color":"\u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430","font_size":"\u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430","font_face":"\u0428\u0440\u0438\u0444\u0442","link_color":"\u0426\u0432\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0438","hover_color":"\u0426\u0432\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0438 \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438","visited_color":"\u0426\u0432\u0435\u0442 \u043d\u0430\u0436\u0430\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438","active_color":"\u0426\u0432\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438",textcolor:"\u0426\u0432\u0435\u0442",fontsize:"\u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430",fontface:"\u0421\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u0448\u0440\u0438\u0444\u0442\u043e\u0432","meta_index_follow":"Index and follow the links","meta_index_nofollow":"Index and don\'t follow the links","meta_noindex_follow":"Do not index but follow the links","meta_noindex_nofollow":"Do not index and don \\ \'t follow the links","appearance_style":"\u041b\u0438\u0441\u0442 \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0442\u0438\u043b\u0435\u0439",stylesheet:"\u041b\u0438\u0441\u0442 \u0441\u0442\u0438\u043b\u0435\u0439",style:"\u0421\u0442\u0438\u043b\u044c",author:"\u0410\u0432\u0442\u043e\u0440",copyright:"\u041a\u043e\u043f\u0438\u0440\u0430\u0439\u0442",add:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442",remove:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442",moveup:"\u041f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0432\u0435\u0440\u0445",movedown:"\u041f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u043d\u0438\u0437","head_elements":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Header",info:"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f","add_title":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Title","add_meta":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Meta","add_script":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Script","add_style":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Style","add_link":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Link","add_base":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Base","add_comment":"\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439","title_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Title","script_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Script","style_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Style","base_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Base","link_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Link","meta_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Meta","comment_element":"\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439",src:"Src",language:"\u042f\u0437\u044b\u043a",href:"\u0441\u0441\u044b\u043b\u043a\u0430",target:"\u0426\u0435\u043b\u044c",type:"Type",charset:"\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430",defer:"\u041e\u0442\u0441\u0440\u043e\u0447\u043a\u0430",media:"\u041c\u0435\u0434\u0438\u0430",properties:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",name:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435",value:"\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435",content:"\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435",rel:"Rel",rev:"Rev",hreflang:"\u042f\u0437\u044b\u043a \u0441\u0441\u044b\u043b\u043a\u0438","general_props":"\u041e\u0431\u0449\u0435\u0435","advanced_props":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e"}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/sv_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/sv_dlg.js deleted file mode 100644 index c141b235ad74..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/sv_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('sv.fullpage_dlg',{title:"Dokumentinst\u00e4llningar","meta_tab":"Generella","appearance_tab":"Utseende","advanced_tab":"Avancerat","meta_props":"Metainformation",langprops:"Spr\u00e5k och kodning","meta_title":"Titel","meta_keywords":"Nyckelord","meta_description":"Bekrivning","meta_robots":"Robots",doctypes:"Doctype",langcode:"Spr\u00e5kkod",langdir:"Skriftriktning",ltr:"V\u00e4nster till h\u00f6ger",rtl:"H\u00f6ger till v\u00e4nster","xml_pi":"XML deklaration",encoding:"Teckenkodning","appearance_bgprops":"Bakgrundsinst\u00e4llningar","appearance_marginprops":"Body marginaler","appearance_linkprops":"L\u00e4nkf\u00e4rger","appearance_textprops":"Textinst\u00e4llningar",bgcolor:"Bakgrundsf\u00e4rg",bgimage:"Bakgrundsbild","left_margin":"V\u00e4nstermarginal","right_margin":"H\u00f6germarginal","top_margin":"Toppmarginal","bottom_margin":"Bottenmarginal","text_color":"Textf\u00e4rg","font_size":"Textstorlek","font_face":"Textstil","link_color":"L\u00e4nkf\u00e4rg","hover_color":"Hover f\u00e4rg","visited_color":"Visited f\u00e4rg","active_color":"Active f\u00e4rg",textcolor:"F\u00e4rg",fontsize:"Textstorlek",fontface:"Textstil","meta_index_follow":"Indexera och f\u00f6lj l\u00e4nkar","meta_index_nofollow":"Indexera men f\u00f6lj ej l\u00e4nkar","meta_noindex_follow":"Indexera inte men f\u00f6lj l\u00e4nkar","meta_noindex_nofollow":"Indexera inte och f\u00f6lj ej l\u00e4nkar","appearance_style":"Stilmall och stilegenskaper",stylesheet:"Stilmall",style:"Stil",author:"F\u00f6rfattare",copyright:"Copyright",add:"L\u00e4gg till element",remove:"Radera det markerade elementet",moveup:"Flytta det markerade elementet upp\u00e5t",movedown:"Flytta det markerade elementet ned\u00e5t","head_elements":"Head element",info:"Information","add_title":"Titel-element","add_meta":"Meta-element","add_script":"Script-element","add_style":"Stil-element","add_link":"L\u00e4nk-element","add_base":"Base-element","add_comment":"Kommentarsnod","title_element":"Titel-element","script_element":"Script-element","style_element":"Style-element","base_element":"Base-element","link_element":"Link-element","meta_element":"Meta-element","comment_element":"Comment-element",src:"Src",language:"Spr\u00e5k",href:"Href",target:"M\u00e5l",type:"Typ",charset:"Teckenupps\u00e4ttning",defer:"Defer",media:"Media",properties:"Egenskaper",name:"Name",value:"Value",content:"Inneh\u00e5ll",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Generellt","advanced_props":"Avancerat"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/zh_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/zh_dlg.js deleted file mode 100644 index de0a74ac5c2f..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullpage/langs/zh_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('zh-cn.fullpage_dlg',{title:"\u6587\u4ef6\u5c5e\u6027","meta_tab":"\u666e\u901a","appearance_tab":"\u5916\u89c2","advanced_tab":"\u9ad8\u7ea7","meta_props":"Meta\u4fe1\u606f",langprops:"\u8bed\u8a00\u548c\u7f16\u7801","meta_title":"\u6807\u9898","meta_keywords":"Meta \u5173\u952e\u5b57","meta_description":"Meta \u63cf\u8ff0","meta_robots":"\u641c\u7d22\u673a\u5668\u4eba",doctypes:"\u6587\u6863\u7c7b\u578b",langcode:"\u8bed\u8a00\u7f16\u7801",langdir:"\u8bed\u8a00\u6587\u5b57\u65b9\u5411",ltr:"\u4ece\u5de6\u5230\u53f3",rtl:"\u4ece\u53f3\u5230\u5de6","xml_pi":"XML\u7533\u660e",encoding:"\u5b57\u7b26\u7f16\u7801","appearance_bgprops":"\u80cc\u666f\u5c5e\u6027","appearance_marginprops":"\u9875\u8fb9\u8ddd","appearance_linkprops":"\u8d85\u94fe\u63a5\u989c\u8272","appearance_textprops":"\u6587\u672c\u5c5e\u6027",bgcolor:"\u80cc\u666f\u989c\u8272",bgimage:"\u80cc\u666f\u56fe\u7247","left_margin":"\u5de6\u8fb9\u8ddd","right_margin":"\u53f3\u8fb9\u8ddd","top_margin":"\u4e0a\u8fb9\u8ddd","bottom_margin":"\u4e0b\u8fb9\u8ddd","text_color":"\u6587\u672c\u989c\u8272","font_size":"\u5b57\u4f53\u5927\u5c0f","font_face":"\u5b57\u4f53","link_color":"\u8d85\u94fe\u63a5\u989c\u8272","hover_color":"Hover\u989c\u8272","visited_color":"Visited\u989c\u8272","active_color":"Active\u989c\u8272",textcolor:"\u989c\u8272",fontsize:"\u5b57\u4f53\u5927\u5c0f",fontface:"\u5b57\u4f53","meta_index_follow":"\u7d22\u5f15\u5e76\u8fde\u7ed3","meta_index_nofollow":"\u7d22\u5f15\u4f46\u4e0d\u8fde\u7ed3","meta_noindex_follow":"\u4e0d\u7d22\u5f15\u4f46\u8fde\u7ed3","meta_noindex_nofollow":"\u4e0d\u7d22\u5f15\u4e5f\u4e0d\u8fde\u7ed3","appearance_style":"\u6837\u5f0f\u8868\u4e0e\u6837\u5f0f\u5c5e\u6027",stylesheet:"\u6837\u5f0f\u8868",style:"\u6837\u5f0f",author:"\u4f5c\u8005",copyright:"\u7248\u6743\u58f0\u660e",add:"\u6dfb\u52a0\u5143\u7d20",remove:"\u5220\u9664\u9009\u62e9\u5143\u7d20",moveup:"\u4e0a\u79fb\u9009\u62e9\u5143\u7d20",movedown:"\u4e0b\u79fb\u9009\u62e9\u5143\u7d20","head_elements":"Head\u5143\u7d20",info:"\u4fe1\u606f","add_title":"Title\u5143\u7d20","add_meta":"Meta\u5143\u7d20","add_script":"Script\u5143\u7d20","add_style":"Style\u5143\u7d20","add_link":"Link\u5143\u7d20","add_base":"Base\u5143\u7d20","add_comment":"\u6ce8\u91ca","title_element":"Title\u5143\u7d20","script_element":"Script\u5143\u7d20","style_element":"Style\u5143\u7d20","base_element":"Base\u5143\u7d20","link_element":"Link\u5143\u7d20","meta_element":"Meta\u5143\u7d20","comment_element":"\u6ce8\u91ca",src:"\u5730\u5740",language:"\u8bed\u8a00",href:"Href",target:"\u76ee\u6807",type:"\u7c7b\u578b",charset:"\u5b57\u7b26\u96c6",defer:"Defer",media:"\u5a92\u4f53",properties:"\u5c5e\u6027",name:"\u540d\u79f0",value:"\u503c",content:"\u5185\u5bb9",rel:"Rel",rev:"Rev",hreflang:"Href\u8bed\u8a00","general_props":"\u5e38\u89c4","advanced_props":"\u9ad8\u7ea7"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/editor_plugin.js deleted file mode 100644 index 1aa8cc443a21..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var b=tinymce.DOM;var a=function(d,f,e){var c=function(g){var i=d.controlManager.get(g);var h=f.controlManager.get(g);if(i&&h){h.displayColor(i.value)}};c("forecolor");c("backcolor");f.setContent(d.getContent({format:"raw"}),{format:"raw"});f.selection.moveToBookmark(e);if(d.plugins.spellchecker&&f.plugins.spellchecker){f.plugins.spellchecker.setLanguage(d.plugins.spellchecker.selectedLang)}};tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(i,c){var l=this,m={},k=b.doc.documentElement,d,o,h,g,f,e,j;i.addCommand("mceFullScreen",function(){var q,r;if(i.getParam("fullscreen_is_enabled")){if(i.getParam("fullscreen_new_window")){closeFullscreen()}else{b.win.setTimeout(function(){var t=i;var s=tinyMCE.get(t.getParam("fullscreen_editor_id"));s.plugins.fullscreen.saveState(t);tinyMCE.remove(t)},10)}return}if(i.getParam("fullscreen_new_window")){l.fullscreenSettings={bookmark:i.selection.getBookmark()};q=b.win.open(c+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{q.resizeTo(screen.availWidth,screen.availHeight)}catch(p){}}else{o=b.getStyle(b.doc.body,"overflow",1)||"auto";h=b.getStyle(k,"overflow",1);d=b.getViewPort();g=d.x;f=d.y;if(tinymce.isOpera&&o=="visible"){o="auto"}if(tinymce.isIE&&o=="scroll"){o="auto"}if(tinymce.isIE&&(h=="visible"||h=="scroll")){h="auto"}if(o=="0px"){o=""}b.setStyle(b.doc.body,"overflow","hidden");k.style.overflow="hidden";d=b.getViewPort();b.win.scrollTo(0,0);if(tinymce.isIE){d.h-=1}if(tinymce.isIE6||document.compatMode=="BackCompat"){e="absolute;top:"+d.y}else{e="fixed;top:0"}n=b.add(b.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+e+";left:0;width:"+d.w+"px;height:"+d.h+"px;z-index:200000;"});b.add(n,"div",{id:"mce_fullscreen"});tinymce.each(i.settings,function(s,t){m[t]=s});m.id="mce_fullscreen";m.width=n.clientWidth;m.height=n.clientHeight-15;m.fullscreen_is_enabled=true;m.fullscreen_editor_id=i.id;m.theme_advanced_resizing=false;m.save_onsavecallback=function(){i.setContent(tinyMCE.get(m.id).getContent());i.execCommand("mceSave")};tinymce.each(i.getParam("fullscreen_settings"),function(t,s){m[s]=t});l.fullscreenSettings={bookmark:i.selection.getBookmark(),fullscreen_overflow:o,fullscreen_html_overflow:h,fullscreen_scrollx:g,fullscreen_scrolly:f};if(m.theme_advanced_toolbar_location==="external"){m.theme_advanced_toolbar_location="top"}tinyMCE.oldSettings=tinyMCE.settings;l.fullscreenEditor=new tinymce.Editor("mce_fullscreen",m);l.fullscreenEditor.onInit.add(function(){l.loadState(l.fullscreenEditor)});l.fullscreenEditor.render();l.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");l.fullscreenElement.update();l.resizeFunc=tinymce.dom.Event.add(b.win,"resize",function(){var v=tinymce.DOM.getViewPort(),t=l.fullscreenEditor,s,u;s=t.dom.getSize(t.getContainer().getElementsByTagName("table")[0]);u=t.dom.getSize(t.getContainer().getElementsByTagName("iframe")[0]);t.theme.resizeTo(v.w-s.w+u.w,v.h-s.h+u.h)})}});i.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});i.onNodeChange.add(function(q,p){p.setActive("fullscreen",q.getParam("fullscreen_is_enabled"))});l.loadState=function(p){if(!(p&&l.fullscreenSettings)){throw"No fullscreen editor to load to"}a(i,p,l.fullscreenSettings.bookmark);p.focus()};l.saveState=function(q){if(!(q&&l.fullscreenSettings)){throw"No fullscreen editor to restore from"}var p=l.fullscreenSettings;a(q,i,q.selection.getBookmark());if(!i.getParam("fullscreen_new_window")){tinymce.dom.Event.remove(b.win,"resize",l.resizeFunc);delete l.resizeFunc;b.remove("mce_fullscreen_container");b.doc.documentElement.style.overflow=p.fullscreen_html_overflow;b.setStyle(b.doc.body,"overflow",p.fullscreen_overflow);b.win.scrollTo(p.fullscreen_scrollx,p.fullscreen_scrolly)}tinyMCE.settings=tinyMCE.oldSettings;delete tinyMCE.oldSettings;delete l.fullscreenEditor;delete l.fullscreenElement;delete l.fullscreenSettings;b.win.setTimeout(function(){i.selection.moveToBookmark(j);i.focus()},10)}},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/editor_plugin_src.js deleted file mode 100644 index bec886f74f28..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/editor_plugin_src.js +++ /dev/null @@ -1,234 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - var DOM = tinymce.DOM; - - // State Transfer function - var transferState = function(oldEditor, newEditor, bookmark) { - var transferColorButtonState = function(swapme) { - var c = oldEditor.controlManager.get(swapme); - var newC = newEditor.controlManager.get(swapme); - - if (c && newC) { - newC.displayColor(c.value); - } - - }; - - transferColorButtonState('forecolor'); - transferColorButtonState('backcolor'); - newEditor.setContent(oldEditor.getContent({format : 'raw'}), {format : 'raw'}); - newEditor.selection.moveToBookmark(bookmark); - - if (oldEditor.plugins.spellchecker && newEditor.plugins.spellchecker) { - newEditor.plugins.spellchecker.setLanguage(oldEditor.plugins.spellchecker.selectedLang); - } - }; - - tinymce.create('tinymce.plugins.FullScreenPlugin', { - init : function(ed, url) { - var t = this, s = {}, de = DOM.doc.documentElement, vp, fullscreen_overflow, fullscreen_html_overflow, fullscreen_scrollx, fullscreen_scrolly, posCss, bookmark; - - // Register commands - ed.addCommand('mceFullScreen', function() { - var win, oed; - - if (ed.getParam('fullscreen_is_enabled')) { - if (ed.getParam('fullscreen_new_window')) - closeFullscreen(); // Call to close in fullscreen.htm - else { - DOM.win.setTimeout(function() { - var fullscreenEditor = ed; - - // find the editor that opened this one, execute restore function there - var originalEditor = tinyMCE.get(fullscreenEditor.getParam('fullscreen_editor_id')); - originalEditor.plugins.fullscreen.saveState(fullscreenEditor); - - tinyMCE.remove(fullscreenEditor); - }, 10); - } - - return; - } - - if (ed.getParam('fullscreen_new_window')) { - t.fullscreenSettings = { - bookmark: ed.selection.getBookmark() - }; - win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight); - try { - win.resizeTo(screen.availWidth, screen.availHeight); - } catch (e) { - // Ignore - } - } else { - fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto'; - fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1); - vp = DOM.getViewPort(); - fullscreen_scrollx = vp.x; - fullscreen_scrolly = vp.y; - - // Fixes an Opera bug where the scrollbars doesn't reappear - if (tinymce.isOpera && fullscreen_overflow == 'visible') - fullscreen_overflow = 'auto'; - - // Fixes an IE bug where horizontal scrollbars would appear - if (tinymce.isIE && fullscreen_overflow == 'scroll') - fullscreen_overflow = 'auto'; - - // Fixes an IE bug where the scrollbars doesn't reappear - if (tinymce.isIE && (fullscreen_html_overflow == 'visible' || fullscreen_html_overflow == 'scroll')) - fullscreen_html_overflow = 'auto'; - - if (fullscreen_overflow == '0px') - fullscreen_overflow = ''; - - DOM.setStyle(DOM.doc.body, 'overflow', 'hidden'); - de.style.overflow = 'hidden'; //Fix for IE6/7 - vp = DOM.getViewPort(); - DOM.win.scrollTo(0, 0); - - if (tinymce.isIE) - vp.h -= 1; - - // Use fixed position if it exists - if (tinymce.isIE6 || document.compatMode == 'BackCompat') - posCss = 'absolute;top:' + vp.y; - else - posCss = 'fixed;top:0'; - - n = DOM.add(DOM.doc.body, 'div', { - id : 'mce_fullscreen_container', - style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'}); - DOM.add(n, 'div', {id : 'mce_fullscreen'}); - - tinymce.each(ed.settings, function(v, n) { - s[n] = v; - }); - - s.id = 'mce_fullscreen'; - s.width = n.clientWidth; - s.height = n.clientHeight - 15; - s.fullscreen_is_enabled = true; - s.fullscreen_editor_id = ed.id; - s.theme_advanced_resizing = false; - s.save_onsavecallback = function() { - ed.setContent(tinyMCE.get(s.id).getContent()); - ed.execCommand('mceSave'); - }; - - tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) { - s[k] = v; - }); - - t.fullscreenSettings = { - bookmark: ed.selection.getBookmark(), - fullscreen_overflow: fullscreen_overflow, - fullscreen_html_overflow: fullscreen_html_overflow, - fullscreen_scrollx: fullscreen_scrollx, - fullscreen_scrolly: fullscreen_scrolly - }; - - if (s.theme_advanced_toolbar_location === 'external') - s.theme_advanced_toolbar_location = 'top'; - - tinyMCE.oldSettings = tinyMCE.settings; // Store old settings, the Editor constructor overwrites them - t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s); - t.fullscreenEditor.onInit.add(function() { - t.loadState(t.fullscreenEditor); - }); - - t.fullscreenEditor.render(); - - t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container'); - t.fullscreenElement.update(); - //document.body.overflow = 'hidden'; - - t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() { - var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize; - - // Get outer/inner size to get a delta size that can be used to calc the new iframe size - outerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('table')[0]); - innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]); - - fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h); - }); - } - }); - - // Register buttons - ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'}); - - ed.onNodeChange.add(function(ed, cm) { - cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled')); - }); - - // fullscreenEditor is a param here because in window mode we don't create it - t.loadState = function(fullscreenEditor) { - if (!(fullscreenEditor && t.fullscreenSettings)) { - throw "No fullscreen editor to load to"; - } - - transferState(ed, fullscreenEditor, t.fullscreenSettings.bookmark); - fullscreenEditor.focus(); - - }; - - // fullscreenEditor is a param here because in window mode we don't create it - t.saveState = function(fullscreenEditor) { - if (!(fullscreenEditor && t.fullscreenSettings)) { - throw "No fullscreen editor to restore from"; - } - var settings = t.fullscreenSettings; - - transferState(fullscreenEditor, ed, fullscreenEditor.selection.getBookmark()); - - // cleanup only required if window mode isn't used - if (!ed.getParam('fullscreen_new_window')) { - tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc); - delete t.resizeFunc; - - DOM.remove('mce_fullscreen_container'); - - DOM.doc.documentElement.style.overflow = settings.fullscreen_html_overflow; - DOM.setStyle(DOM.doc.body, 'overflow', settings.fullscreen_overflow); - DOM.win.scrollTo(settings.fullscreen_scrollx, settings.fullscreen_scrolly); - } - tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings - - // clear variables - delete tinyMCE.oldSettings; - delete t.fullscreenEditor; - delete t.fullscreenElement; - delete t.fullscreenSettings; - - // allow the fullscreen editor to be removed before restoring focus and selection - DOM.win.setTimeout(function() { - ed.selection.moveToBookmark(bookmark); - ed.focus(); - }, 10); - }; - }, - - getInfo : function() { - return { - longname : 'Fullscreen', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin); -})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/fullscreen.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/fullscreen.htm deleted file mode 100644 index baf028b79f7f..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/fullscreen/fullscreen.htm +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - -
- -
- - - - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/iespell/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/iespell/editor_plugin.js deleted file mode 100644 index e9cba106c609..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/iespell/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.create("tinymce.plugins.IESpell",{init:function(a,b){var c=this,d;if(!tinymce.isIE){return}c.editor=a;a.addCommand("mceIESpell",function(){try{d=new ActiveXObject("ieSpell.ieSpellExtension");d.CheckDocumentNode(a.getDoc().documentElement)}catch(f){if(f.number==-2146827859){a.windowManager.confirm(a.getLang("iespell.download"),function(e){if(e){window.open("http://www.iespell.com/download.php","ieSpellDownload","")}})}else{a.windowManager.alert("Error Loading ieSpell: Exception "+f.number)}}});a.addButton("iespell",{title:"iespell.iespell_desc",cmd:"mceIESpell"})},getInfo:function(){return{longname:"IESpell (IE Only)",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("iespell",tinymce.plugins.IESpell)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/iespell/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/iespell/editor_plugin_src.js deleted file mode 100644 index 1b2bb9846095..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/iespell/editor_plugin_src.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - tinymce.create('tinymce.plugins.IESpell', { - init : function(ed, url) { - var t = this, sp; - - if (!tinymce.isIE) - return; - - t.editor = ed; - - // Register commands - ed.addCommand('mceIESpell', function() { - try { - sp = new ActiveXObject("ieSpell.ieSpellExtension"); - sp.CheckDocumentNode(ed.getDoc().documentElement); - } catch (e) { - if (e.number == -2146827859) { - ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) { - if (s) - window.open('http://www.iespell.com/download.php', 'ieSpellDownload', ''); - }); - } else - ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number); - } - }); - - // Register buttons - ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'}); - }, - - getInfo : function() { - return { - longname : 'IESpell (IE Only)', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/editor_plugin.js deleted file mode 100644 index 2d71a2e174ef..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId("mce_inlinepopups_");h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","
"));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;gf){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/editor_plugin_src.js deleted file mode 100644 index da6ee2493282..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/editor_plugin_src.js +++ /dev/null @@ -1,699 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is; - - tinymce.create('tinymce.plugins.InlinePopups', { - init : function(ed, url) { - // Replace window manager - ed.onBeforeRenderUI.add(function() { - ed.windowManager = new tinymce.InlineWindowManager(ed); - DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css"); - }); - }, - - getInfo : function() { - return { - longname : 'InlinePopups', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', { - InlineWindowManager : function(ed) { - var t = this; - - t.parent(ed); - t.zIndex = 300000; - t.count = 0; - t.windows = {}; - }, - - open : function(f, p) { - var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow; - - f = f || {}; - p = p || {}; - - // Run native windows - if (!f.inline) - return t.parent(f, p); - - parentWindow = t._frontWindow(); - if (parentWindow && DOM.get(parentWindow.id + '_ifr')) { - parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement; - } - - // Only store selection if the type is a normal window - if (!f.type) - t.bookmark = ed.selection.getBookmark(1); - - id = DOM.uniqueId("mce_inlinepopups_"); // Use a prefix so this can't conflict with other ids - vp = DOM.getViewPort(); - f.width = parseInt(f.width || 320); - f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0); - f.min_width = parseInt(f.min_width || 150); - f.min_height = parseInt(f.min_height || 100); - f.max_width = parseInt(f.max_width || 2000); - f.max_height = parseInt(f.max_height || 2000); - f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0))); - f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0))); - f.movable = f.resizable = true; - p.mce_width = f.width; - p.mce_height = f.height; - p.mce_inline = true; - p.mce_window_id = id; - p.mce_auto_focus = f.auto_focus; - - // Transpose -// po = DOM.getPos(ed.getContainer()); -// f.left -= po.x; -// f.top -= po.y; - - t.features = f; - t.params = p; - t.onOpen.dispatch(t, f, p); - - if (f.type) { - opt += ' mceModal'; - - if (f.type) - opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1); - - f.resizable = false; - } - - if (f.statusbar) - opt += ' mceStatusbar'; - - if (f.resizable) - opt += ' mceResizable'; - - if (f.minimizable) - opt += ' mceMinimizable'; - - if (f.maximizable) - opt += ' mceMaximizable'; - - if (f.movable) - opt += ' mceMovable'; - - // Create DOM objects - t._addAll(DOM.doc.body, - ['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'}, - ['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt}, - ['div', {id : id + '_top', 'class' : 'mceTop'}, - ['div', {'class' : 'mceLeft'}], - ['div', {'class' : 'mceCenter'}], - ['div', {'class' : 'mceRight'}], - ['span', {id : id + '_title'}, f.title || ''] - ], - - ['div', {id : id + '_middle', 'class' : 'mceMiddle'}, - ['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}], - ['span', {id : id + '_content'}], - ['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}] - ], - - ['div', {id : id + '_bottom', 'class' : 'mceBottom'}, - ['div', {'class' : 'mceLeft'}], - ['div', {'class' : 'mceCenter'}], - ['div', {'class' : 'mceRight'}], - ['span', {id : id + '_status'}, 'Content'] - ], - - ['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}], - ['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], - ['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], - ['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], - ['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], - ['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}], - ['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}], - ['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}], - ['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}], - ['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}], - ['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}], - ['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}], - ['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}] - ] - ] - ); - - DOM.setStyles(id, {top : -10000, left : -10000}); - - // Fix gecko rendering bug, where the editors iframe messed with window contents - if (tinymce.isGecko) - DOM.setStyle(id, 'overflow', 'auto'); - - // Measure borders - if (!f.type) { - dw += DOM.get(id + '_left').clientWidth; - dw += DOM.get(id + '_right').clientWidth; - dh += DOM.get(id + '_top').clientHeight; - dh += DOM.get(id + '_bottom').clientHeight; - } - - // Resize window - DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh}); - - u = f.url || f.file; - if (u) { - if (tinymce.relaxedDomain) - u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain; - - u = tinymce._addVer(u); - } - - if (!f.type) { - DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'}); - DOM.setStyles(id + '_ifr', {width : f.width, height : f.height}); - DOM.setAttrib(id + '_ifr', 'src', u); - } else { - DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok'); - - if (f.type == 'confirm') - DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel'); - - DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'}); - DOM.setHTML(id + '_content', f.content.replace('\n', '
')); - - Event.add(id, 'keyup', function(evt) { - var VK_ESCAPE = 27; - if (evt.keyCode === VK_ESCAPE) { - f.button_func(false); - return Event.cancel(evt); - } - }); - - Event.add(id, 'keydown', function(evt) { - var cancelButton, VK_TAB = 9; - if (evt.keyCode === VK_TAB) { - cancelButton = DOM.select('a.mceCancel', id + '_wrapper')[0]; - if (cancelButton && cancelButton !== evt.target) { - cancelButton.focus(); - } else { - DOM.get(id + '_ok').focus(); - } - return Event.cancel(evt); - } - }); - } - - // Register events - mdf = Event.add(id, 'mousedown', function(e) { - var n = e.target, w, vp; - - w = t.windows[id]; - t.focus(id); - - if (n.nodeName == 'A' || n.nodeName == 'a') { - if (n.className == 'mceClose') { - t.close(null, id); - return Event.cancel(e); - } else if (n.className == 'mceMax') { - w.oldPos = w.element.getXY(); - w.oldSize = w.element.getSize(); - - vp = DOM.getViewPort(); - - // Reduce viewport size to avoid scrollbars - vp.w -= 2; - vp.h -= 2; - - w.element.moveTo(vp.x, vp.y); - w.element.resizeTo(vp.w, vp.h); - DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight}); - DOM.addClass(id + '_wrapper', 'mceMaximized'); - } else if (n.className == 'mceMed') { - // Reset to old size - w.element.moveTo(w.oldPos.x, w.oldPos.y); - w.element.resizeTo(w.oldSize.w, w.oldSize.h); - w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight); - - DOM.removeClass(id + '_wrapper', 'mceMaximized'); - } else if (n.className == 'mceMove') - return t._startDrag(id, e, n.className); - else if (DOM.hasClass(n, 'mceResize')) - return t._startDrag(id, e, n.className.substring(13)); - } - }); - - clf = Event.add(id, 'click', function(e) { - var n = e.target; - - t.focus(id); - - if (n.nodeName == 'A' || n.nodeName == 'a') { - switch (n.className) { - case 'mceClose': - t.close(null, id); - return Event.cancel(e); - - case 'mceButton mceOk': - case 'mceButton mceCancel': - f.button_func(n.className == 'mceButton mceOk'); - return Event.cancel(e); - } - } - }); - - // Make sure the tab order loops within the dialog. - Event.add([id + '_left', id + '_right'], 'focus', function(evt) { - var iframe = DOM.get(id + '_ifr'); - if (iframe) { - var body = iframe.contentWindow.document.body; - var focusable = DOM.select(':input:enabled,*[tabindex=0]', body); - if (evt.target.id === (id + '_left')) { - focusable[focusable.length - 1].focus(); - } else { - focusable[0].focus(); - } - } else { - DOM.get(id + '_ok').focus(); - } - }); - - // Add window - w = t.windows[id] = { - id : id, - mousedown_func : mdf, - click_func : clf, - element : new Element(id, {blocker : 1, container : ed.getContainer()}), - iframeElement : new Element(id + '_ifr'), - features : f, - deltaWidth : dw, - deltaHeight : dh - }; - - w.iframeElement.on('focus', function() { - t.focus(id); - }); - - // Setup blocker - if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') { - DOM.add(DOM.doc.body, 'div', { - id : 'mceModalBlocker', - 'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker', - style : {zIndex : t.zIndex - 1} - }); - - DOM.show('mceModalBlocker'); // Reduces flicker in IE - DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'true'); - } else - DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1); - - if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel)) - DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2}); - - DOM.setAttrib(id, 'aria-hidden', 'false'); - t.focus(id); - t._fixIELayout(id, 1); - - // Focus ok button - if (DOM.get(id + '_ok')) - DOM.get(id + '_ok').focus(); - t.count++; - - return w; - }, - - focus : function(id) { - var t = this, w; - - if (w = t.windows[id]) { - w.zIndex = this.zIndex++; - w.element.setStyle('zIndex', w.zIndex); - w.element.update(); - - id = id + '_wrapper'; - DOM.removeClass(t.lastId, 'mceFocus'); - DOM.addClass(id, 'mceFocus'); - t.lastId = id; - - if (w.focussedElement) { - w.focussedElement.focus(); - } else if (DOM.get(id + '_ok')) { - DOM.get(w.id + '_ok').focus(); - } else if (DOM.get(w.id + '_ifr')) { - DOM.get(w.id + '_ifr').focus(); - } - } - }, - - _addAll : function(te, ne) { - var i, n, t = this, dom = tinymce.DOM; - - if (is(ne, 'string')) - te.appendChild(dom.doc.createTextNode(ne)); - else if (ne.length) { - te = te.appendChild(dom.create(ne[0], ne[1])); - - for (i=2; i ix) { - fw = w; - ix = w.zIndex; - } - }); - return fw; - }, - - setTitle : function(w, ti) { - var e; - - w = this._findId(w); - - if (e = DOM.get(w + '_title')) - e.innerHTML = DOM.encode(ti); - }, - - alert : function(txt, cb, s) { - var t = this, w; - - w = t.open({ - title : t, - type : 'alert', - button_func : function(s) { - if (cb) - cb.call(s || t, s); - - t.close(null, w.id); - }, - content : DOM.encode(t.editor.getLang(txt, txt)), - inline : 1, - width : 400, - height : 130 - }); - }, - - confirm : function(txt, cb, s) { - var t = this, w; - - w = t.open({ - title : t, - type : 'confirm', - button_func : function(s) { - if (cb) - cb.call(s || t, s); - - t.close(null, w.id); - }, - content : DOM.encode(t.editor.getLang(txt, txt)), - inline : 1, - width : 400, - height : 130 - }); - }, - - // Internal functions - - _findId : function(w) { - var t = this; - - if (typeof(w) == 'string') - return w; - - each(t.windows, function(wo) { - var ifr = DOM.get(wo.id + '_ifr'); - - if (ifr && w == ifr.contentWindow) { - w = wo.id; - return false; - } - }); - - return w; - }, - - _fixIELayout : function(id, s) { - var w, img; - - if (!tinymce.isIE6) - return; - - // Fixes the bug where hover flickers and does odd things in IE6 - each(['n','s','w','e','nw','ne','sw','se'], function(v) { - var e = DOM.get(id + '_resize_' + v); - - DOM.setStyles(e, { - width : s ? e.clientWidth : '', - height : s ? e.clientHeight : '', - cursor : DOM.getStyle(e, 'cursor', 1) - }); - - DOM.setStyle(id + "_bottom", 'bottom', '-1px'); - - e = 0; - }); - - // Fixes graphics glitch - if (w = this.windows[id]) { - // Fixes rendering bug after resize - w.element.hide(); - w.element.show(); - - // Forced a repaint of the window - //DOM.get(id).style.filter = ''; - - // IE has a bug where images used in CSS won't get loaded - // sometimes when the cache in the browser is disabled - // This fix tries to solve it by loading the images using the image object - each(DOM.select('div,a', id), function(e, i) { - if (e.currentStyle.backgroundImage != 'none') { - img = new Image(); - img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1'); - } - }); - - DOM.get(id).style.filter = ''; - } - } - }); - - // Register plugin - tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups); -})(); - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/alert.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/alert.gif deleted file mode 100644 index 219139857ead..000000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/alert.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/button.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/button.gif deleted file mode 100644 index f957e49a3dda..000000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/button.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif deleted file mode 100644 index 6baf64ad321a..000000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif deleted file mode 100644 index 20acbbf7aec8..000000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/corners.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/corners.gif deleted file mode 100644 index d5de1cc236c9..000000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/corners.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif deleted file mode 100644 index c2a2ad454db1..000000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif deleted file mode 100644 index 0b4cc3682a1c..000000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/window.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/window.css deleted file mode 100644 index 74416fc13125..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/clearlooks2/window.css +++ /dev/null @@ -1,90 +0,0 @@ -/* Clearlooks 2 */ - -/* Reset */ -.clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block} - -/* General */ -.clearlooks2 {position:absolute; direction:ltr} -.clearlooks2 .mceWrapper {position:static} -.mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%} -.clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)} -.clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none} - -/* Top */ -.clearlooks2 .mceTop, .clearlooks2 .mceTop div {top:0; width:100%; height:23px} -.clearlooks2 .mceTop .mceLeft {width:6px; background:url(img/corners.gif)} -.clearlooks2 .mceTop .mceCenter {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)} -.clearlooks2 .mceTop .mceRight {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0} -.clearlooks2 .mceTop span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold} -.clearlooks2 .mceFocus .mceTop .mceLeft {background:url(img/corners.gif) -6px 0} -.clearlooks2 .mceFocus .mceTop .mceCenter {background:url(img/horizontal.gif) 0 -23px} -.clearlooks2 .mceFocus .mceTop .mceRight {background:url(img/corners.gif) -18px 0} -.clearlooks2 .mceFocus .mceTop span {color:#FFF} - -/* Middle */ -.clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0} -.clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)} -.clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0} -.clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF} -.clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:url(img/vertical.gif)} - -/* Bottom */ -.clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px} -.clearlooks2 .mceBottom {left:0; bottom:0; width:100%} -.clearlooks2 .mceBottom div {top:0} -.clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:url(img/corners.gif) -34px -6px} -.clearlooks2 .mceBottom .mceCenter {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px} -.clearlooks2 .mceBottom .mceRight {right:0; width:5px; background: url(img/corners.gif) -34px 0} -.clearlooks2 .mceBottom span {display:none} -.clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px} -.clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0} -.clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px} -.clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0} -.clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px} - -/* Actions */ -.clearlooks2 a {width:29px; height:16px; top:3px;} -.clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0} -.clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0} -.clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0} -.clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0} -.clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px} -.clearlooks2 .mceMovable .mceMove {display:block} -.clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px} -.clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px} -.clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px} -.clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px} -.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px} -.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px} -.clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px} -.clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px} -.clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px} - -/* Resize */ -.clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px} -.clearlooks2 .mceResizable .mceResize {display:block} -.clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none} -.clearlooks2 .mceMinimizable .mceMin {display:block} -.clearlooks2 .mceMaximizable .mceMax {display:block} -.clearlooks2 .mceMaximized .mceMed {display:block} -.clearlooks2 .mceMaximized .mceMax {display:none} -.clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize} -.clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize} -.clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize} -.clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;} -.clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize} -.clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize} -.clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize} -.clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize} - -/* Alert/Confirm */ -.clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0} -.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px} -.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal} -.clearlooks2 a:hover {font-weight:bold;} -.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5} -.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px} -.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)} -.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px} -.clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto} -.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/alert.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/alert.gif deleted file mode 100644 index 94abd08763ff..000000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/alert.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/button.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/button.gif deleted file mode 100644 index e671094cb0eb..000000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/button.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/buttons.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/buttons.gif deleted file mode 100644 index 6baf64ad321a..000000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/buttons.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/close.png b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/close.png deleted file mode 100644 index cdd1ff748be0..000000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/close.png and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/confirm.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/confirm.gif deleted file mode 100644 index 497307a85ad3..000000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/confirm.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/corners.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/corners.gif deleted file mode 100644 index 878a993ec497..000000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/corners.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/horizontal.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/horizontal.gif deleted file mode 100644 index d7ce1a707fff..000000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/horizontal.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/vertical.gif b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/vertical.gif deleted file mode 100644 index d6ed79382fa4..000000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/img/vertical.gif and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/window.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/window.css deleted file mode 100644 index 3cb5ca2c7c23..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/skins/umbraco/window.css +++ /dev/null @@ -1,77 +0,0 @@ -/* Umbraco */ - -/* Reset */ -.umbraco, .umbraco div, .umbraco span, .umbraco a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block} - -/* General */ -.umbraco {position:absolute; direction:ltr; border: 5px solid #a3a3a3; overflow: hidden;} -.umbraco .mceWrapper {position:static;} -#mceEventBlocker{border: none !Important;} -.mceEventBlocker {position:fixed; left:0; top:0; width:100%; height:100%} -.umbraco .mcePlaceHolder {border:1px solid #a3a3a3; background:#fff; top:0; left:0;} -.umbraco_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; display:none; background: url(../../../../../modal/modalBackground.gif)} - -/* Top */ -.umbraco .mceTop{top:0; height:15px; padding: 5px 0px 5px 0px; width: 100%; border-bottom: 1px solid #ccc; background: url(../../../../../modal/modalGradiant.gif) repeat-x;} -.umbraco .mceTop .mceLeft {display: none;} -.umbraco .mceTop .mceCenter {display: none;} -.umbraco .mceTop .mceRight {display: none;} - -.umbraco .mceTop span {color: #378080; font-weight: bold; text-align:left; vertical-align:middle; display: block; padding-left: 10px;} - -/* Middle */ -.umbraco .mceMiddle, .umbraco .mceMiddle div {top:0;} -.umbraco .mceMiddle {width:100%; height:100%; clip:rect(26px auto auto auto); background:#FFF; overflow: hidden;} -.umbraco .mceMiddle .mceLeft {display: none;} -.umbraco .mceMiddle span {top:25px; left:0px; width:100%; height:100%; background:#FFF} -.umbraco .mceMiddle .mceRight {display: none;} - -/* Bottom */ -.umbraco .mceBottom, .umbraco .mceBottom div {display: none !Important;} - -/* Actions */ -.umbraco a {width:29px; height:16px; top:3px;} -.umbraco .mceClose {right:6px; background:url(img/close.png) no-repeat} -.umbraco .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0} -.umbraco .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0} -.umbraco .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0} -.umbraco .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px} -.umbraco .mceMovable .mceMove {display:block} -.umbraco .mceFocus .mceClose {right:6px; top: 6px;} - -.umbraco .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px} -.umbraco .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px} -.umbraco .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px} - -.umbraco .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px} -.umbraco .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px} -.umbraco .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px} - -/* Resize */ -.umbraco .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px} -.umbraco .mceResizable .mceResize {display:block} -.umbraco .mceResizable .mceMin, .umbraco .mceMax {display:none} -.umbraco .mceMinimizable .mceMin {display:block} -.umbraco .mceMaximizable .mceMax {display:block} -.umbraco .mceMaximized .mceMed {display:block} -.umbraco .mceMaximized .mceMax {display:none} -.umbraco a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize} -.umbraco a.mceResizeNW {top:0; left:0; cursor:nw-resize} -.umbraco a.mceResizeNE {top:0; right:0; cursor:ne-resize} -.umbraco a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;} -.umbraco a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize} -.umbraco a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize} -.umbraco a.mceResizeSW {bottom:0; left:0; cursor:sw-resize} -.umbraco a.mceResizeSE {bottom:0; right:0; cursor:se-resize} - -/* Alert/Confirm */ -.umbraco .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0} -.umbraco .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px} -.umbraco .mceAlert .mceMiddle span, .umbraco .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal} -.umbraco a:hover {font-weight:bold;} -.umbraco .mceAlert .mceMiddle, .umbraco .mceConfirm .mceMiddle {background:#D6D7D5} -.umbraco .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px} -.umbraco .mceAlert .mceIcon {background:url(img/alert.gif)} -.umbraco .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px} -.umbraco .mceConfirm .mceCancel {left:50%; top:auto} -.umbraco .mceConfirm .mceIcon {background:url(img/confirm.gif)} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/template.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/template.htm deleted file mode 100644 index f9ec64219d26..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/inlinepopups/template.htm +++ /dev/null @@ -1,387 +0,0 @@ - - - -Template for dialogs - - - - -
-
-
-
-
-
-
- Blured -
- -
-
- Content -
-
- -
-
-
-
- Statusbar text. -
- - - - - - - - - - - - - - -
-
- -
-
-
-
-
-
- Focused -
- -
-
- Content -
-
- -
-
-
-
- Statusbar text. -
- - - - - - - - - - - - - - -
-
- -
-
-
-
-
-
- Statusbar -
- -
-
- Content -
-
- -
-
-
-
- Statusbar text. -
- - - - - - - - - - - - - - -
-
- -
-
-
-
-
-
- Statusbar, Resizable -
- -
-
- Content -
-
- -
-
-
-
- Statusbar text. -
- - - - - - - - - - - - - - -
-
- -
-
-
-
-
-
- Resizable, Maximizable -
- -
-
- Content -
-
- -
-
-
-
- Statusbar text. -
- - - - - - - - - - - - - - -
-
- -
-
-
-
-
-
- Blurred, Maximizable, Statusbar, Resizable -
- -
-
- Content -
-
- -
-
-
-
- Statusbar text. -
- - - - - - - - - - - - - - -
-
- -
-
-
-
-
-
- Maximized, Maximizable, Minimizable -
- -
-
- Content -
-
- -
-
-
-
- Statusbar text. -
- - - - - - - - - - - - - - -
-
- -
-
-
-
-
-
- Blured -
- -
-
- Content -
-
- -
-
-
-
- Statusbar text. -
- - - - - - - - - - - - - - -
-
- -
-
-
-
-
-
- Alert -
- -
-
- - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - -
-
-
- -
-
-
-
-
- - - Ok - -
-
- -
-
-
-
-
-
- Confirm -
- -
-
- - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - This is a very long error message. This is a very long error message. - -
-
-
- -
-
-
-
-
- - - Ok - Cancel - -
-
-
- - - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/insertdatetime/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/insertdatetime/editor_plugin.js deleted file mode 100644 index 938ce6b17d90..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/insertdatetime/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.create("tinymce.plugins.InsertDateTime",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertDate",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_dateFormat",a.getLang("insertdatetime.date_fmt")));a.execCommand("mceInsertContent",false,d)});a.addCommand("mceInsertTime",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_timeFormat",a.getLang("insertdatetime.time_fmt")));a.execCommand("mceInsertContent",false,d)});a.addButton("insertdate",{title:"insertdatetime.insertdate_desc",cmd:"mceInsertDate"});a.addButton("inserttime",{title:"insertdatetime.inserttime_desc",cmd:"mceInsertTime"})},getInfo:function(){return{longname:"Insert date/time",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getDateTime:function(e,a){var c=this.editor;function b(g,d){g=""+g;if(g.length-1){b[e].style.zIndex=h[k];b[k].style.zIndex=h[e]}else{if(h[e]>0){b[e].style.zIndex=h[e]-1}}}else{for(g=0;gh[e]){k=g;break}}if(k>-1){b[e].style.zIndex=h[k];b[k].style.zIndex=h[e]}else{b[e].style.zIndex=h[e]+1}}c.execCommand("mceRepaint")},_getParentLayer:function(b){return this.editor.dom.getParent(b,function(c){return c.nodeType==1&&/^(absolute|relative|static)$/i.test(c.style.position)})},_insertLayer:function(){var c=this.editor,e=c.dom,d=e.getPos(e.getParent(c.selection.getNode(),"*")),b=c.getBody();c.dom.add(b,"div",{style:{position:"absolute",left:d.x,top:(d.y>20?d.y:20),width:100,height:100},"class":"mceItemVisualAid mceItemLayer"},c.selection.getContent()||c.getLang("layer.content"));if(tinymce.isIE){e.setHTML(b,b.innerHTML)}},_toggleAbsolute:function(){var b=this.editor,c=this._getParentLayer(b.selection.getNode());if(!c){c=b.dom.getParent(b.selection.getNode(),"DIV,P,IMG")}if(c){if(c.style.position.toLowerCase()=="absolute"){b.dom.setStyles(c,{position:"",left:"",top:"",width:"",height:""});b.dom.removeClass(c,"mceItemVisualAid");b.dom.removeClass(c,"mceItemLayer")}else{if(c.style.left==""){c.style.left=20+"px"}if(c.style.top==""){c.style.top=20+"px"}if(c.style.width==""){c.style.width=c.width?(c.width+"px"):"100px"}if(c.style.height==""){c.style.height=c.height?(c.height+"px"):"100px"}c.style.position="absolute";b.dom.setAttrib(c,"data-mce-style","");b.addVisual(b.getBody())}b.execCommand("mceRepaint");b.nodeChanged()}}});tinymce.PluginManager.add("layer",tinymce.plugins.Layer)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/layer/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/layer/editor_plugin_src.js deleted file mode 100644 index daed2806cba5..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/layer/editor_plugin_src.js +++ /dev/null @@ -1,262 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - function findParentLayer(node) { - do { - if (node.className && node.className.indexOf('mceItemLayer') != -1) { - return node; - } - } while (node = node.parentNode); - }; - - tinymce.create('tinymce.plugins.Layer', { - init : function(ed, url) { - var t = this; - - t.editor = ed; - - // Register commands - ed.addCommand('mceInsertLayer', t._insertLayer, t); - - ed.addCommand('mceMoveForward', function() { - t._move(1); - }); - - ed.addCommand('mceMoveBackward', function() { - t._move(-1); - }); - - ed.addCommand('mceMakeAbsolute', function() { - t._toggleAbsolute(); - }); - - // Register buttons - ed.addButton('moveforward', {title : 'layer.forward_desc', cmd : 'mceMoveForward'}); - ed.addButton('movebackward', {title : 'layer.backward_desc', cmd : 'mceMoveBackward'}); - ed.addButton('absolute', {title : 'layer.absolute_desc', cmd : 'mceMakeAbsolute'}); - ed.addButton('insertlayer', {title : 'layer.insertlayer_desc', cmd : 'mceInsertLayer'}); - - ed.onInit.add(function() { - var dom = ed.dom; - - if (tinymce.isIE) - ed.getDoc().execCommand('2D-Position', false, true); - }); - - // Remove serialized styles when selecting a layer since it might be changed by a drag operation - ed.onMouseUp.add(function(ed, e) { - var layer = findParentLayer(e.target); - - if (layer) { - ed.dom.setAttrib(layer, 'data-mce-style', ''); - } - }); - - // Fixes edit focus issues with layers on Gecko - // This will enable designMode while inside a layer and disable it when outside - ed.onMouseDown.add(function(ed, e) { - var node = e.target, doc = ed.getDoc(), parent; - - if (tinymce.isGecko) { - if (findParentLayer(node)) { - if (doc.designMode !== 'on') { - doc.designMode = 'on'; - - // Repaint caret - node = doc.body; - parent = node.parentNode; - parent.removeChild(node); - parent.appendChild(node); - } - } else if (doc.designMode == 'on') { - doc.designMode = 'off'; - } - } - }); - - ed.onNodeChange.add(t._nodeChange, t); - ed.onVisualAid.add(t._visualAid, t); - }, - - getInfo : function() { - return { - longname : 'Layer', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - }, - - // Private methods - - _nodeChange : function(ed, cm, n) { - var le, p; - - le = this._getParentLayer(n); - p = ed.dom.getParent(n, 'DIV,P,IMG'); - - if (!p) { - cm.setDisabled('absolute', 1); - cm.setDisabled('moveforward', 1); - cm.setDisabled('movebackward', 1); - } else { - cm.setDisabled('absolute', 0); - cm.setDisabled('moveforward', !le); - cm.setDisabled('movebackward', !le); - cm.setActive('absolute', le && le.style.position.toLowerCase() == "absolute"); - } - }, - - // Private methods - - _visualAid : function(ed, e, s) { - var dom = ed.dom; - - tinymce.each(dom.select('div,p', e), function(e) { - if (/^(absolute|relative|fixed)$/i.test(e.style.position)) { - if (s) - dom.addClass(e, 'mceItemVisualAid'); - else - dom.removeClass(e, 'mceItemVisualAid'); - - dom.addClass(e, 'mceItemLayer'); - } - }); - }, - - _move : function(d) { - var ed = this.editor, i, z = [], le = this._getParentLayer(ed.selection.getNode()), ci = -1, fi = -1, nl; - - nl = []; - tinymce.walk(ed.getBody(), function(n) { - if (n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position)) - nl.push(n); - }, 'childNodes'); - - // Find z-indexes - for (i=0; i -1) { - nl[ci].style.zIndex = z[fi]; - nl[fi].style.zIndex = z[ci]; - } else { - if (z[ci] > 0) - nl[ci].style.zIndex = z[ci] - 1; - } - } else { - // Move forward - - // Try find a higher one - for (i=0; i z[ci]) { - fi = i; - break; - } - } - - if (fi > -1) { - nl[ci].style.zIndex = z[fi]; - nl[fi].style.zIndex = z[ci]; - } else - nl[ci].style.zIndex = z[ci] + 1; - } - - ed.execCommand('mceRepaint'); - }, - - _getParentLayer : function(n) { - return this.editor.dom.getParent(n, function(n) { - return n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position); - }); - }, - - _insertLayer : function() { - var ed = this.editor, dom = ed.dom, p = dom.getPos(dom.getParent(ed.selection.getNode(), '*')), body = ed.getBody(); - - ed.dom.add(body, 'div', { - style : { - position : 'absolute', - left : p.x, - top : (p.y > 20 ? p.y : 20), - width : 100, - height : 100 - }, - 'class' : 'mceItemVisualAid mceItemLayer' - }, ed.selection.getContent() || ed.getLang('layer.content')); - - // Workaround for IE where it messes up the JS engine if you insert a layer on IE 6,7 - if (tinymce.isIE) - dom.setHTML(body, body.innerHTML); - }, - - _toggleAbsolute : function() { - var ed = this.editor, le = this._getParentLayer(ed.selection.getNode()); - - if (!le) - le = ed.dom.getParent(ed.selection.getNode(), 'DIV,P,IMG'); - - if (le) { - if (le.style.position.toLowerCase() == "absolute") { - ed.dom.setStyles(le, { - position : '', - left : '', - top : '', - width : '', - height : '' - }); - - ed.dom.removeClass(le, 'mceItemVisualAid'); - ed.dom.removeClass(le, 'mceItemLayer'); - } else { - if (le.style.left == "") - le.style.left = 20 + 'px'; - - if (le.style.top == "") - le.style.top = 20 + 'px'; - - if (le.style.width == "") - le.style.width = le.width ? (le.width + 'px') : '100px'; - - if (le.style.height == "") - le.style.height = le.height ? (le.height + 'px') : '100px'; - - le.style.position = "absolute"; - - ed.dom.setAttrib(le, 'data-mce-style', ''); - ed.addVisual(ed.getBody()); - } - - ed.execCommand('mceRepaint'); - ed.nodeChanged(); - } - } - }); - - // Register plugin - tinymce.PluginManager.add('layer', tinymce.plugins.Layer); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/legacyoutput/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/legacyoutput/editor_plugin.js deleted file mode 100644 index 2ed5f41ae47d..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/legacyoutput/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(a){a.onAddEditor.addToTop(function(c,b){b.settings.inline_styles=false});a.create("tinymce.plugins.LegacyOutput",{init:function(b){b.onInit.add(function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",e=a.explode(b.settings.font_size_style_values),d=b.schema;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignfull:{selector:c,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:true}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:true}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(f){return a.inArray(e,f.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}});a.each("b,i,u,strike".split(","),function(f){d.addValidElements(f+"[*]")});if(!d.getElementRule("font")){d.addValidElements("font[face|size|color|style]")}a.each(c.split(","),function(f){var h=d.getElementRule(f),g;if(h){if(!h.attributes.align){h.attributes.align={};h.attributesOrder.push("align")}}});b.onNodeChange.add(function(g,k){var j,f,h,i;f=g.dom.getParent(g.selection.getNode(),"font");if(f){h=f.face;i=f.size}if(j=k.get("fontselect")){j.select(function(l){return l==h})}if(j=k.get("fontsizeselect")){j.select(function(m){var l=a.inArray(e,m.fontSize);return l+1==i})}})})},getInfo:function(){return{longname:"LegacyOutput",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("legacyoutput",a.plugins.LegacyOutput)})(tinymce); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/legacyoutput/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/legacyoutput/editor_plugin_src.js deleted file mode 100644 index 3cdcde579df2..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/legacyoutput/editor_plugin_src.js +++ /dev/null @@ -1,139 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - * - * This plugin will force TinyMCE to produce deprecated legacy output such as font elements, u elements, align - * attributes and so forth. There are a few cases where these old items might be needed for example in email applications or with Flash - * - * However you should NOT use this plugin if you are building some system that produces web contents such as a CMS. All these elements are - * not apart of the newer specifications for HTML and XHTML. - */ - -(function(tinymce) { - // Override inline_styles setting to force TinyMCE to produce deprecated contents - tinymce.onAddEditor.addToTop(function(tinymce, editor) { - editor.settings.inline_styles = false; - }); - - // Create the legacy ouput plugin - tinymce.create('tinymce.plugins.LegacyOutput', { - init : function(editor) { - editor.onInit.add(function() { - var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', - fontSizes = tinymce.explode(editor.settings.font_size_style_values), - schema = editor.schema; - - // Override some internal formats to produce legacy elements and attributes - editor.formatter.register({ - // Change alignment formats to use the deprecated align attribute - alignleft : {selector : alignElements, attributes : {align : 'left'}}, - aligncenter : {selector : alignElements, attributes : {align : 'center'}}, - alignright : {selector : alignElements, attributes : {align : 'right'}}, - alignfull : {selector : alignElements, attributes : {align : 'justify'}}, - - // Change the basic formatting elements to use deprecated element types - bold : [ - {inline : 'b', remove : 'all'}, - {inline : 'strong', remove : 'all'}, - {inline : 'span', styles : {fontWeight : 'bold'}} - ], - italic : [ - {inline : 'i', remove : 'all'}, - {inline : 'em', remove : 'all'}, - {inline : 'span', styles : {fontStyle : 'italic'}} - ], - underline : [ - {inline : 'u', remove : 'all'}, - {inline : 'span', styles : {textDecoration : 'underline'}, exact : true} - ], - strikethrough : [ - {inline : 'strike', remove : 'all'}, - {inline : 'span', styles : {textDecoration: 'line-through'}, exact : true} - ], - - // Change font size and font family to use the deprecated font element - fontname : {inline : 'font', attributes : {face : '%value'}}, - fontsize : { - inline : 'font', - attributes : { - size : function(vars) { - return tinymce.inArray(fontSizes, vars.value) + 1; - } - } - }, - - // Setup font elements for colors as well - forecolor : {inline : 'font', attributes : {color : '%value'}}, - hilitecolor : {inline : 'font', styles : {backgroundColor : '%value'}} - }); - - // Check that deprecated elements are allowed if not add them - tinymce.each('b,i,u,strike'.split(','), function(name) { - schema.addValidElements(name + '[*]'); - }); - - // Add font element if it's missing - if (!schema.getElementRule("font")) - schema.addValidElements("font[face|size|color|style]"); - - // Add the missing and depreacted align attribute for the serialization engine - tinymce.each(alignElements.split(','), function(name) { - var rule = schema.getElementRule(name), found; - - if (rule) { - if (!rule.attributes.align) { - rule.attributes.align = {}; - rule.attributesOrder.push('align'); - } - } - }); - - // Listen for the onNodeChange event so that we can do special logic for the font size and font name drop boxes - editor.onNodeChange.add(function(editor, control_manager) { - var control, fontElm, fontName, fontSize; - - // Find font element get it's name and size - fontElm = editor.dom.getParent(editor.selection.getNode(), 'font'); - if (fontElm) { - fontName = fontElm.face; - fontSize = fontElm.size; - } - - // Select/unselect the font name in droplist - if (control = control_manager.get('fontselect')) { - control.select(function(value) { - return value == fontName; - }); - } - - // Select/unselect the font size in droplist - if (control = control_manager.get('fontsizeselect')) { - control.select(function(value) { - var index = tinymce.inArray(fontSizes, value.fontSize); - - return index + 1 == fontSize; - }); - } - }); - }); - }, - - getInfo : function() { - return { - longname : 'LegacyOutput', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('legacyoutput', tinymce.plugins.LegacyOutput); -})(tinymce); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/lists/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/lists/editor_plugin.js deleted file mode 100644 index ec21b256ec1c..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/lists/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var e=tinymce.each,r=tinymce.dom.Event,g;function p(t,s){while(t&&(t.nodeType===8||(t.nodeType===3&&/^[ \t\n\r]*$/.test(t.nodeValue)))){t=s(t)}return t}function b(s){return p(s,function(t){return t.previousSibling})}function i(s){return p(s,function(t){return t.nextSibling})}function d(s,u,t){return s.dom.getParent(u,function(v){return tinymce.inArray(t,v)!==-1})}function n(s){return s&&(s.tagName==="OL"||s.tagName==="UL")}function c(u,v){var t,w,s;t=b(u.lastChild);while(n(t)){w=t;t=b(w.previousSibling)}if(w){s=v.create("li",{style:"list-style-type: none;"});v.split(u,w);v.insertAfter(s,w);s.appendChild(w);s.appendChild(w);u=s.previousSibling}return u}function m(t,s,u){t=a(t,s,u);return o(t,s,u)}function a(u,s,v){var t=b(u.previousSibling);if(t){return h(t,u,s?t:false,v)}else{return u}}function o(u,t,v){var s=i(u.nextSibling);if(s){return h(u,s,t?s:false,v)}else{return u}}function h(u,s,t,v){if(l(u,s,!!t,v)){return f(u,s,t)}else{if(u&&u.tagName==="LI"&&n(s)){u.appendChild(s)}}return s}function l(u,t,s,v){if(!u||!t){return false}else{if(u.tagName==="LI"&&t.tagName==="LI"){return t.style.listStyleType==="none"||j(t)}else{if(n(u)){return(u.tagName===t.tagName&&(s||u.style.listStyleType===t.style.listStyleType))||q(t)}else{return v&&u.tagName==="P"&&t.tagName==="P"}}}}function q(t){var s=i(t.firstChild),u=b(t.lastChild);return s&&u&&n(t)&&s===u&&(n(s)||s.style.listStyleType==="none"||j(s))}function j(u){var t=i(u.firstChild),s=b(u.lastChild);return t&&s&&t===s&&n(t)}function f(w,v,s){var u=b(w.lastChild),t=i(v.firstChild);if(w.tagName==="P"){w.appendChild(w.ownerDocument.createElement("br"))}while(v.firstChild){w.appendChild(v.firstChild)}if(s){w.style.listStyleType=s.style.listStyleType}v.parentNode.removeChild(v);h(u,t,false);return w}function k(t,u){var s;if(!u.is(t,"li,ol,ul")){s=u.getParent(t,"li");if(s){t=s}}return t}tinymce.create("tinymce.plugins.Lists",{init:function(y){var v="TABBING";var s="EMPTY";var J="ESCAPE";var z="PARAGRAPH";var N="UNKNOWN";var x=N;function E(U){return U.keyCode===tinymce.VK.TAB&&!(U.altKey||U.ctrlKey)&&(y.queryCommandState("InsertUnorderedList")||y.queryCommandState("InsertOrderedList"))}function w(){var U=B();var W=U.parentNode.parentNode;var V=U.parentNode.lastChild===U;return V&&!t(W)&&P(U)}function t(U){if(n(U)){return U.parentNode&&U.parentNode.tagName==="LI"}else{return U.tagName==="LI"}}function F(){return y.selection.isCollapsed()&&P(B())}function B(){var U=y.selection.getStart();return((U.tagName=="BR"||U.tagName=="")&&U.parentNode.tagName=="LI")?U.parentNode:U}function P(U){var V=U.childNodes.length;if(U.tagName==="LI"){return V==0?true:V==1&&(U.firstChild.tagName==""||U.firstChild.tagName=="BR"||H(U))}return false}function H(U){var V=tinymce.grep(U.parentNode.childNodes,function(Y){return Y.tagName=="LI"});var W=U==V[V.length-1];var X=U.firstChild;return tinymce.isIE9&&W&&(X.nodeValue==String.fromCharCode(160)||X.nodeValue==String.fromCharCode(32))}function T(U){return U.keyCode===tinymce.VK.ENTER}function A(U){return T(U)&&!U.shiftKey}function M(U){if(E(U)){return v}else{if(A(U)&&w()){return N}else{if(A(U)&&F()){return s}else{return N}}}}function D(U,V){if(x==v||x==s||tinymce.isGecko&&x==J){r.cancel(V)}}function C(){var U=y.selection.getRng(true);var V=U.startContainer;if(V.nodeType==3){var W=V.nodeValue;if(tinymce.isIE9&&W.length>1&&W.charCodeAt(W.length-1)==32){return(U.endOffset==W.length-1)}else{return(U.endOffset==W.length)}}else{if(V.nodeType==1){return U.endOffset==V.childNodes.length}}return false}function I(){var W=y.selection.getNode();var V="h1,h2,h3,h4,h5,h6,p,div";var U=y.dom.is(W,V)&&W.parentNode.tagName==="LI"&&W.parentNode.lastChild===W;return y.selection.isCollapsed()&&U&&C()}function K(W,Y){if(A(Y)&&I()){var X=W.selection.getNode();var V=W.dom.create("li");var U=W.dom.getParent(X,"li");W.dom.insertAfter(V,U);if(tinymce.isIE6||tinymce.isIE7||tinyMCE.isIE8){W.selection.setCursorLocation(V,1)}else{W.selection.setCursorLocation(V,0)}Y.preventDefault()}}function u(X,Z){var ac;if(!tinymce.isGecko){return}var V=X.selection.getStart();if(Z.keyCode!=tinymce.VK.BACKSPACE||V.tagName!=="IMG"){return}function W(ag){var ah=ag.firstChild;var af=null;do{if(!ah){break}if(ah.tagName==="LI"){af=ah}}while(ah=ah.nextSibling);return af}function ae(ag,af){while(ag.childNodes.length>0){af.appendChild(ag.childNodes[0])}}ac=V.parentNode.previousSibling;if(!ac){return}var aa;if(ac.tagName==="UL"||ac.tagName==="OL"){aa=ac}else{if(ac.previousSibling&&(ac.previousSibling.tagName==="UL"||ac.previousSibling.tagName==="OL")){aa=ac.previousSibling}else{return}}var ad=W(aa);var U=X.dom.createRng();U.setStart(ad,1);U.setEnd(ad,1);X.selection.setRng(U);X.selection.collapse(true);var Y=X.selection.getBookmark();var ab=V.parentNode.cloneNode(true);if(ab.tagName==="P"||ab.tagName==="DIV"){ae(ab,ad)}else{ad.appendChild(ab)}V.parentNode.parentNode.removeChild(V.parentNode);X.selection.moveToBookmark(Y)}function G(U){var V=y.dom.getParent(U,"ol,ul");if(V!=null){var W=V.lastChild;y.selection.setCursorLocation(W,0)}}this.ed=y;y.addCommand("Indent",this.indent,this);y.addCommand("Outdent",this.outdent,this);y.addCommand("InsertUnorderedList",function(){this.applyList("UL","OL")},this);y.addCommand("InsertOrderedList",function(){this.applyList("OL","UL")},this);y.onInit.add(function(){y.editorCommands.addCommands({outdent:function(){var V=y.selection,W=y.dom;function U(X){X=W.getParent(X,W.isBlock);return X&&(parseInt(y.dom.getStyle(X,"margin-left")||0,10)+parseInt(y.dom.getStyle(X,"padding-left")||0,10))>0}return U(V.getStart())||U(V.getEnd())||y.queryCommandState("InsertOrderedList")||y.queryCommandState("InsertUnorderedList")}},"state")});y.onKeyUp.add(function(V,W){if(x==v){V.execCommand(W.shiftKey?"Outdent":"Indent",true,null);x=N;return r.cancel(W)}else{if(x==s){var U=B();var Y=V.settings.list_outdent_on_enter===true||W.shiftKey;V.execCommand(Y?"Outdent":"Indent",true,null);if(tinymce.isIE){G(U)}return r.cancel(W)}else{if(x==J){if(tinymce.isIE6||tinymce.isIE7||tinymce.isIE8){var X=V.getDoc().createTextNode("\uFEFF");V.selection.getNode().appendChild(X)}else{if(tinymce.isIE9||tinymce.isGecko){V.execCommand("Outdent");return r.cancel(W)}}}}}});function L(V,U){var W=y.getDoc().createTextNode("\uFEFF");V.insertBefore(W,U);y.selection.setCursorLocation(W,0);y.execCommand("mceRepaint")}function R(V,X){if(T(X)){var U=B();if(U){var W=U.parentNode;var Y=W&&W.parentNode;if(Y&&Y.nodeName=="LI"&&Y.firstChild==W&&U==W.firstChild){L(Y,W)}}}}function S(V,X){if(T(X)){var U=B();if(V.dom.select("ul li",U).length===1){var W=U.firstChild;L(U,W)}}}function Q(W,aa){function X(ab){var ad=[];var ae=new tinymce.dom.TreeWalker(ab.firstChild,ab);for(var ac=ae.current();ac;ac=ae.next()){if(W.dom.is(ac,"ol,ul,li")){ad.push(ac)}}return ad}if(aa.keyCode==tinymce.VK.BACKSPACE){var U=B();if(U){var Z=W.dom.getParent(U,"ol,ul"),V=W.selection.getRng();if(Z&&Z.firstChild===U&&V.startOffset==0){var Y=X(U);Y.unshift(U);W.execCommand("Outdent",false,Y);W.undoManager.add();return r.cancel(aa)}}}}function O(V,X){var U=B();if(X.keyCode===tinymce.VK.BACKSPACE&&V.dom.is(U,"li")&&U.parentNode.firstChild!==U){if(V.dom.select("ul,ol",U).length===1){var Z=U.previousSibling;V.dom.remove(V.dom.select("br",U));V.dom.remove(U,true);var W=tinymce.grep(Z.childNodes,function(aa){return aa.nodeType===3});if(W.length===1){var Y=W[0];V.selection.setCursorLocation(Y,Y.length)}V.undoManager.add();return r.cancel(X)}}}y.onKeyDown.add(function(U,V){x=M(V)});y.onKeyDown.add(D);y.onKeyDown.add(u);y.onKeyDown.add(K);if(tinymce.isGecko){y.onKeyUp.add(R)}if(tinymce.isIE8){y.onKeyUp.add(S)}if(tinymce.isGecko||tinymce.isWebKit){y.onKeyDown.add(Q)}if(tinymce.isWebKit){y.onKeyDown.add(O)}},applyList:function(y,v){var C=this,z=C.ed,I=z.dom,s=[],H=false,u=false,w=false,B,G=z.selection.getSelectedBlocks();function E(t){if(t&&t.tagName==="BR"){I.remove(t)}}function F(M){var N=I.create(y),t;function L(O){if(O.style.marginLeft||O.style.paddingLeft){C.adjustPaddingFunction(false)(O)}}if(M.tagName==="LI"){}else{if(M.tagName==="P"||M.tagName==="DIV"||M.tagName==="BODY"){K(M,function(P,O){J(P,O,M.tagName==="BODY"?null:P.parentNode);t=P.parentNode;L(t);E(O)});if(t){if(t.tagName==="LI"&&(M.tagName==="P"||G.length>1)){I.split(t.parentNode.parentNode,t.parentNode)}m(t.parentNode,true)}return}else{t=I.create("li");I.insertAfter(t,M);t.appendChild(M);L(M);M=t}}I.insertAfter(N,M);N.appendChild(M);m(N,true);s.push(M)}function J(P,L,N){var t,O=P,M;while(!I.isBlock(P.parentNode)&&P.parentNode!==I.getRoot()){P=I.split(P.parentNode,P.previousSibling);P=P.nextSibling;O=P}if(N){t=N.cloneNode(true);P.parentNode.insertBefore(t,P);while(t.firstChild){I.remove(t.firstChild)}t=I.rename(t,"li")}else{t=I.create("li");P.parentNode.insertBefore(t,P)}while(O&&O!=L){M=O.nextSibling;t.appendChild(O);O=M}if(t.childNodes.length===0){t.innerHTML='
'}F(t)}function K(Q,T){var N,R,O=3,L=1,t="br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl";function P(X,U){var V=I.createRng(),W;g.keep=true;z.selection.moveToBookmark(g);g.keep=false;W=z.selection.getRng(true);if(!U){U=X.parentNode.lastChild}V.setStartBefore(X);V.setEndAfter(U);return !(V.compareBoundaryPoints(O,W)>0||V.compareBoundaryPoints(L,W)<=0)}function S(U){if(U.nextSibling){return U.nextSibling}if(!I.isBlock(U.parentNode)&&U.parentNode!==I.getRoot()){return S(U.parentNode)}}N=Q.firstChild;var M=false;e(I.select(t,Q),function(U){if(U.hasAttribute&&U.hasAttribute("_mce_bogus")){return true}if(P(N,U)){I.addClass(U,"_mce_tagged_br");N=S(U)}});M=(N&&P(N,undefined));N=Q.firstChild;e(I.select(t,Q),function(V){var U=S(V);if(V.hasAttribute&&V.hasAttribute("_mce_bogus")){return true}if(I.hasClass(V,"_mce_tagged_br")){T(N,V,R);R=null}else{R=V}N=U});if(M){T(N,undefined,R)}}function D(t){K(t,function(M,L,N){J(M,L);E(L);E(N)})}function A(t){if(tinymce.inArray(s,t)!==-1){return}if(t.parentNode.tagName===v){I.split(t.parentNode,t);F(t);o(t.parentNode,false)}s.push(t)}function x(M){var O,N,L,t;if(tinymce.inArray(s,M)!==-1){return}M=c(M,I);while(I.is(M.parentNode,"ol,ul,li")){I.split(M.parentNode,M)}s.push(M);M=I.rename(M,"p");L=m(M,false,z.settings.force_br_newlines);if(L===M){O=M.firstChild;while(O){if(I.isBlock(O)){O=I.split(O.parentNode,O);t=true;N=O.nextSibling&&O.nextSibling.firstChild}else{N=O.nextSibling;if(t&&O.tagName==="BR"){I.remove(O)}t=false}O=N}}}e(G,function(t){t=k(t,I);if(t.tagName===v||(t.tagName==="LI"&&t.parentNode.tagName===v)){u=true}else{if(t.tagName===y||(t.tagName==="LI"&&t.parentNode.tagName===y)){H=true}else{w=true}}});if(w&&!H||u||G.length===0){B={LI:A,H1:F,H2:F,H3:F,H4:F,H5:F,H6:F,P:F,BODY:F,DIV:G.length>1?F:D,defaultAction:D,elements:this.selectedBlocks()}}else{B={defaultAction:x,elements:this.selectedBlocks(),processEvenIfEmpty:true}}this.process(B)},indent:function(){var u=this.ed,w=u.dom,x=[];function s(z){var y=w.create("li",{style:"list-style-type: none;"});w.insertAfter(y,z);return y}function t(B){var y=s(B),D=w.getParent(B,"ol,ul"),C=D.tagName,E=w.getStyle(D,"list-style-type"),A={},z;if(E!==""){A.style="list-style-type: "+E+";"}z=w.create(C,A);y.appendChild(z);return z}function v(z){if(!d(u,z,x)){z=c(z,w);var y=t(z);y.appendChild(z);m(y.parentNode,false);m(y,false);x.push(z)}}this.process({LI:v,defaultAction:this.adjustPaddingFunction(true),elements:this.selectedBlocks()})},outdent:function(y,x){var w=this,u=w.ed,z=u.dom,s=[];function A(t){var C,B,D;if(!d(u,t,s)){if(z.getStyle(t,"margin-left")!==""||z.getStyle(t,"padding-left")!==""){return w.adjustPaddingFunction(false)(t)}D=z.getStyle(t,"text-align",true);if(D==="center"||D==="right"){z.setStyle(t,"text-align","left");return}t=c(t,z);C=t.parentNode;B=t.parentNode.parentNode;if(B.tagName==="P"){z.split(B,t.parentNode)}else{z.split(C,t);if(B.tagName==="LI"){z.split(B,t)}else{if(!z.is(B,"ol,ul")){z.rename(t,"p")}}}s.push(t)}}var v=x&&tinymce.is(x,"array")?x:this.selectedBlocks();this.process({LI:A,defaultAction:this.adjustPaddingFunction(false),elements:v});e(s,m)},process:function(y){var F=this,w=F.ed.selection,z=F.ed.dom,E,u;function B(t){var s=tinymce.grep(t.childNodes,function(H){return !(H.nodeName==="BR"||H.nodeName==="SPAN"&&z.getAttrib(H,"data-mce-type")=="bookmark"||H.nodeType==3&&(H.nodeValue==String.fromCharCode(160)||H.nodeValue==""))});return s.length===0}function x(s){z.removeClass(s,"_mce_act_on");if(!s||s.nodeType!==1||!y.processEvenIfEmpty&&E.length>1&&B(s)){return}s=k(s,z);var t=y[s.tagName];if(!t){t=y.defaultAction}t(s)}function v(s){F.splitSafeEach(s.childNodes,x,true)}function C(s,t){return t>=0&&s.hasChildNodes()&&t0){t=s.shift();w.removeClass(t,"_mce_act_on");u(t);s=w.select("._mce_act_on")}},adjustPaddingFunction:function(u){var s,v,t=this.ed;s=t.settings.indentation;v=/[a-z%]+/i.exec(s);s=parseInt(s,10);return function(w){var y,x;y=parseInt(t.dom.getStyle(w,"margin-left")||0,10)+parseInt(t.dom.getStyle(w,"padding-left")||0,10);if(u){x=y+s}else{x=y-s}t.dom.setStyle(w,"padding-left","");t.dom.setStyle(w,"margin-left",x>0?x+v:"")}},selectedBlocks:function(){var s=this.ed,t=s.selection.getSelectedBlocks();return t.length==0?[s.dom.getRoot()]:t},getInfo:function(){return{longname:"Lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("lists",tinymce.plugins.Lists)}()); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/lists/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/lists/editor_plugin_src.js deleted file mode 100644 index d9ea6d1793e2..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/lists/editor_plugin_src.js +++ /dev/null @@ -1,955 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2011, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - var each = tinymce.each, Event = tinymce.dom.Event, bookmark; - - // Skips text nodes that only contain whitespace since they aren't semantically important. - function skipWhitespaceNodes(e, next) { - while (e && (e.nodeType === 8 || (e.nodeType === 3 && /^[ \t\n\r]*$/.test(e.nodeValue)))) { - e = next(e); - } - return e; - } - - function skipWhitespaceNodesBackwards(e) { - return skipWhitespaceNodes(e, function(e) { - return e.previousSibling; - }); - } - - function skipWhitespaceNodesForwards(e) { - return skipWhitespaceNodes(e, function(e) { - return e.nextSibling; - }); - } - - function hasParentInList(ed, e, list) { - return ed.dom.getParent(e, function(p) { - return tinymce.inArray(list, p) !== -1; - }); - } - - function isList(e) { - return e && (e.tagName === 'OL' || e.tagName === 'UL'); - } - - function splitNestedLists(element, dom) { - var tmp, nested, wrapItem; - tmp = skipWhitespaceNodesBackwards(element.lastChild); - while (isList(tmp)) { - nested = tmp; - tmp = skipWhitespaceNodesBackwards(nested.previousSibling); - } - if (nested) { - wrapItem = dom.create('li', { style: 'list-style-type: none;'}); - dom.split(element, nested); - dom.insertAfter(wrapItem, nested); - wrapItem.appendChild(nested); - wrapItem.appendChild(nested); - element = wrapItem.previousSibling; - } - return element; - } - - function attemptMergeWithAdjacent(e, allowDifferentListStyles, mergeParagraphs) { - e = attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs); - return attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs); - } - - function attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs) { - var prev = skipWhitespaceNodesBackwards(e.previousSibling); - if (prev) { - return attemptMerge(prev, e, allowDifferentListStyles ? prev : false, mergeParagraphs); - } else { - return e; - } - } - - function attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs) { - var next = skipWhitespaceNodesForwards(e.nextSibling); - if (next) { - return attemptMerge(e, next, allowDifferentListStyles ? next : false, mergeParagraphs); - } else { - return e; - } - } - - function attemptMerge(e1, e2, differentStylesMasterElement, mergeParagraphs) { - if (canMerge(e1, e2, !!differentStylesMasterElement, mergeParagraphs)) { - return merge(e1, e2, differentStylesMasterElement); - } else if (e1 && e1.tagName === 'LI' && isList(e2)) { - // Fix invalidly nested lists. - e1.appendChild(e2); - } - return e2; - } - - function canMerge(e1, e2, allowDifferentListStyles, mergeParagraphs) { - if (!e1 || !e2) { - return false; - } else if (e1.tagName === 'LI' && e2.tagName === 'LI') { - return e2.style.listStyleType === 'none' || containsOnlyAList(e2); - } else if (isList(e1)) { - return (e1.tagName === e2.tagName && (allowDifferentListStyles || e1.style.listStyleType === e2.style.listStyleType)) || isListForIndent(e2); - } else return mergeParagraphs && e1.tagName === 'P' && e2.tagName === 'P'; - } - - function isListForIndent(e) { - var firstLI = skipWhitespaceNodesForwards(e.firstChild), lastLI = skipWhitespaceNodesBackwards(e.lastChild); - return firstLI && lastLI && isList(e) && firstLI === lastLI && (isList(firstLI) || firstLI.style.listStyleType === 'none' || containsOnlyAList(firstLI)); - } - - function containsOnlyAList(e) { - var firstChild = skipWhitespaceNodesForwards(e.firstChild), lastChild = skipWhitespaceNodesBackwards(e.lastChild); - return firstChild && lastChild && firstChild === lastChild && isList(firstChild); - } - - function merge(e1, e2, masterElement) { - var lastOriginal = skipWhitespaceNodesBackwards(e1.lastChild), firstNew = skipWhitespaceNodesForwards(e2.firstChild); - if (e1.tagName === 'P') { - e1.appendChild(e1.ownerDocument.createElement('br')); - } - while (e2.firstChild) { - e1.appendChild(e2.firstChild); - } - if (masterElement) { - e1.style.listStyleType = masterElement.style.listStyleType; - } - e2.parentNode.removeChild(e2); - attemptMerge(lastOriginal, firstNew, false); - return e1; - } - - function findItemToOperateOn(e, dom) { - var item; - if (!dom.is(e, 'li,ol,ul')) { - item = dom.getParent(e, 'li'); - if (item) { - e = item; - } - } - return e; - } - - tinymce.create('tinymce.plugins.Lists', { - init: function(ed) { - var LIST_TABBING = 'TABBING'; - var LIST_EMPTY_ITEM = 'EMPTY'; - var LIST_ESCAPE = 'ESCAPE'; - var LIST_PARAGRAPH = 'PARAGRAPH'; - var LIST_UNKNOWN = 'UNKNOWN'; - var state = LIST_UNKNOWN; - - function isTabInList(e) { - // Don't indent on Ctrl+Tab or Alt+Tab - return e.keyCode === tinymce.VK.TAB && !(e.altKey || e.ctrlKey) && - (ed.queryCommandState('InsertUnorderedList') || ed.queryCommandState('InsertOrderedList')); - } - - function isOnLastListItem() { - var li = getLi(); - var grandParent = li.parentNode.parentNode; - var isLastItem = li.parentNode.lastChild === li; - return isLastItem && !isNestedList(grandParent) && isEmptyListItem(li); - } - - function isNestedList(grandParent) { - if (isList(grandParent)) { - return grandParent.parentNode && grandParent.parentNode.tagName === 'LI'; - } else { - return grandParent.tagName === 'LI'; - } - } - - function isInEmptyListItem() { - return ed.selection.isCollapsed() && isEmptyListItem(getLi()); - } - - function getLi() { - var n = ed.selection.getStart(); - // Get start will return BR if the LI only contains a BR or an empty element as we use these to fix caret position - return ((n.tagName == 'BR' || n.tagName == '') && n.parentNode.tagName == 'LI') ? n.parentNode : n; - } - - function isEmptyListItem(li) { - var numChildren = li.childNodes.length; - if (li.tagName === 'LI') { - return numChildren == 0 ? true : numChildren == 1 && (li.firstChild.tagName == '' || li.firstChild.tagName == 'BR' || isEmptyIE9Li(li)); - } - return false; - } - - function isEmptyIE9Li(li) { - // only consider this to be last item if there is no list item content or that content is nbsp or space since IE9 creates these - var lis = tinymce.grep(li.parentNode.childNodes, function(n) {return n.tagName == 'LI'}); - var isLastLi = li == lis[lis.length - 1]; - var child = li.firstChild; - return tinymce.isIE9 && isLastLi && (child.nodeValue == String.fromCharCode(160) || child.nodeValue == String.fromCharCode(32)); - } - - function isEnter(e) { - return e.keyCode === tinymce.VK.ENTER; - } - - function isEnterWithoutShift(e) { - return isEnter(e) && !e.shiftKey; - } - - function getListKeyState(e) { - if (isTabInList(e)) { - return LIST_TABBING; - } else if (isEnterWithoutShift(e) && isOnLastListItem()) { - // Returns LIST_UNKNOWN since breaking out of lists is handled by the EnterKey.js logic now - //return LIST_ESCAPE; - return LIST_UNKNOWN; - } else if (isEnterWithoutShift(e) && isInEmptyListItem()) { - return LIST_EMPTY_ITEM; - } else { - return LIST_UNKNOWN; - } - } - - function cancelDefaultEvents(ed, e) { - // list escape is done manually using outdent as it does not create paragraphs correctly in td's - if (state == LIST_TABBING || state == LIST_EMPTY_ITEM || tinymce.isGecko && state == LIST_ESCAPE) { - Event.cancel(e); - } - } - - function isCursorAtEndOfContainer() { - var range = ed.selection.getRng(true); - var startContainer = range.startContainer; - if (startContainer.nodeType == 3) { - var value = startContainer.nodeValue; - if (tinymce.isIE9 && value.length > 1 && value.charCodeAt(value.length-1) == 32) { - // IE9 places a space on the end of the text in some cases so ignore last char - return (range.endOffset == value.length-1); - } else { - return (range.endOffset == value.length); - } - } else if (startContainer.nodeType == 1) { - return range.endOffset == startContainer.childNodes.length; - } - return false; - } - - /* - If we are at the end of a list item surrounded with an element, pressing enter should create a - new list item instead without splitting the element e.g. don't want to create new P or H1 tag - */ - function isEndOfListItem() { - var node = ed.selection.getNode(); - var validElements = 'h1,h2,h3,h4,h5,h6,p,div'; - var isLastParagraphOfLi = ed.dom.is(node, validElements) && node.parentNode.tagName === 'LI' && node.parentNode.lastChild === node; - return ed.selection.isCollapsed() && isLastParagraphOfLi && isCursorAtEndOfContainer(); - } - - // Creates a new list item after the current selection's list item parent - function createNewLi(ed, e) { - if (isEnterWithoutShift(e) && isEndOfListItem()) { - var node = ed.selection.getNode(); - var li = ed.dom.create("li"); - var parentLi = ed.dom.getParent(node, 'li'); - ed.dom.insertAfter(li, parentLi); - - // Move caret to new list element. - if (tinymce.isIE6 || tinymce.isIE7 || tinyMCE.isIE8) { - // Removed this line since it would create an odd < > tag and placing the caret inside an empty LI is handled and should be handled by the selection logic - //li.appendChild(ed.dom.create(" ")); // IE needs an element within the bullet point - ed.selection.setCursorLocation(li, 1); - } else { - ed.selection.setCursorLocation(li, 0); - } - e.preventDefault(); - } - } - - function imageJoiningListItem(ed, e) { - var prevSibling; - - if (!tinymce.isGecko) - return; - - var n = ed.selection.getStart(); - if (e.keyCode != tinymce.VK.BACKSPACE || n.tagName !== 'IMG') - return; - - function lastLI(node) { - var child = node.firstChild; - var li = null; - do { - if (!child) - break; - - if (child.tagName === 'LI') - li = child; - } while (child = child.nextSibling); - - return li; - } - - function addChildren(parentNode, destination) { - while (parentNode.childNodes.length > 0) - destination.appendChild(parentNode.childNodes[0]); - } - - // Check if there is a previous sibling - prevSibling = n.parentNode.previousSibling; - if (!prevSibling) - return; - - var ul; - if (prevSibling.tagName === 'UL' || prevSibling.tagName === 'OL') - ul = prevSibling; - else if (prevSibling.previousSibling && (prevSibling.previousSibling.tagName === 'UL' || prevSibling.previousSibling.tagName === 'OL')) - ul = prevSibling.previousSibling; - else - return; - - var li = lastLI(ul); - - // move the caret to the end of the list item - var rng = ed.dom.createRng(); - rng.setStart(li, 1); - rng.setEnd(li, 1); - ed.selection.setRng(rng); - ed.selection.collapse(true); - - // save a bookmark at the end of the list item - var bookmark = ed.selection.getBookmark(); - - // copy the image an its text to the list item - var clone = n.parentNode.cloneNode(true); - if (clone.tagName === 'P' || clone.tagName === 'DIV') - addChildren(clone, li); - else - li.appendChild(clone); - - // remove the old copy of the image - n.parentNode.parentNode.removeChild(n.parentNode); - - // move the caret where we saved the bookmark - ed.selection.moveToBookmark(bookmark); - } - - // fix the cursor position to ensure it is correct in IE - function setCursorPositionToOriginalLi(li) { - var list = ed.dom.getParent(li, 'ol,ul'); - if (list != null) { - var lastLi = list.lastChild; - // Removed this line since IE9 would report an DOM character error and placing the caret inside an empty LI is handled and should be handled by the selection logic - //lastLi.appendChild(ed.getDoc().createElement('')); - ed.selection.setCursorLocation(lastLi, 0); - } - } - - this.ed = ed; - ed.addCommand('Indent', this.indent, this); - ed.addCommand('Outdent', this.outdent, this); - ed.addCommand('InsertUnorderedList', function() { - this.applyList('UL', 'OL'); - }, this); - ed.addCommand('InsertOrderedList', function() { - this.applyList('OL', 'UL'); - }, this); - - ed.onInit.add(function() { - ed.editorCommands.addCommands({ - 'outdent': function() { - var sel = ed.selection, dom = ed.dom; - - function hasStyleIndent(n) { - n = dom.getParent(n, dom.isBlock); - return n && (parseInt(ed.dom.getStyle(n, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(n, 'padding-left') || 0, 10)) > 0; - } - - return hasStyleIndent(sel.getStart()) || hasStyleIndent(sel.getEnd()) || ed.queryCommandState('InsertOrderedList') || ed.queryCommandState('InsertUnorderedList'); - } - }, 'state'); - }); - - ed.onKeyUp.add(function(ed, e) { - if (state == LIST_TABBING) { - ed.execCommand(e.shiftKey ? 'Outdent' : 'Indent', true, null); - state = LIST_UNKNOWN; - return Event.cancel(e); - } else if (state == LIST_EMPTY_ITEM) { - var li = getLi(); - var shouldOutdent = ed.settings.list_outdent_on_enter === true || e.shiftKey; - ed.execCommand(shouldOutdent ? 'Outdent' : 'Indent', true, null); - if (tinymce.isIE) { - setCursorPositionToOriginalLi(li); - } - - return Event.cancel(e); - } else if (state == LIST_ESCAPE) { - if (tinymce.isIE6 || tinymce.isIE7 || tinymce.isIE8) { - // append a zero sized nbsp so that caret is positioned correctly in IE after escaping and applying formatting. - // if there is no text then applying formatting for e.g a H1 to the P tag immediately following list after - // escaping from it will cause the caret to be positioned on the last li instead of staying the in P tag. - var n = ed.getDoc().createTextNode('\uFEFF'); - ed.selection.getNode().appendChild(n); - } else if (tinymce.isIE9 || tinymce.isGecko) { - // IE9 does not escape the list so we use outdent to do this and cancel the default behaviour - // Gecko does not create a paragraph outdenting inside a TD so default behaviour is cancelled and we outdent ourselves - ed.execCommand('Outdent'); - return Event.cancel(e); - } - } - }); - - function fixListItem(parent, reference) { - // a zero-sized non-breaking space is placed in the empty list item so that the nested list is - // displayed on the below line instead of next to it - var n = ed.getDoc().createTextNode('\uFEFF'); - parent.insertBefore(n, reference); - ed.selection.setCursorLocation(n, 0); - // repaint to remove rendering artifact. only visible when creating new list - ed.execCommand('mceRepaint'); - } - - function fixIndentedListItemForGecko(ed, e) { - if (isEnter(e)) { - var li = getLi(); - if (li) { - var parent = li.parentNode; - var grandParent = parent && parent.parentNode; - if (grandParent && grandParent.nodeName == 'LI' && grandParent.firstChild == parent && li == parent.firstChild) { - fixListItem(grandParent, parent); - } - } - } - } - - function fixIndentedListItemForIE8(ed, e) { - if (isEnter(e)) { - var li = getLi(); - if (ed.dom.select('ul li', li).length === 1) { - var list = li.firstChild; - fixListItem(li, list); - } - } - } - - function fixDeletingFirstCharOfList(ed, e) { - function listElements(li) { - var elements = []; - var walker = new tinymce.dom.TreeWalker(li.firstChild, li); - for (var node = walker.current(); node; node = walker.next()) { - if (ed.dom.is(node, 'ol,ul,li')) { - elements.push(node); - } - } - return elements; - } - - if (e.keyCode == tinymce.VK.BACKSPACE) { - var li = getLi(); - if (li) { - var list = ed.dom.getParent(li, 'ol,ul'), - rng = ed.selection.getRng(); - if (list && list.firstChild === li && rng.startOffset == 0) { - var elements = listElements(li); - elements.unshift(li); - ed.execCommand("Outdent", false, elements); - ed.undoManager.add(); - return Event.cancel(e); - } - } - } - } - - function fixDeletingEmptyLiInWebkit(ed, e) { - var li = getLi(); - if (e.keyCode === tinymce.VK.BACKSPACE && ed.dom.is(li, 'li') && li.parentNode.firstChild!==li) { - if (ed.dom.select('ul,ol', li).length === 1) { - var prevLi = li.previousSibling; - ed.dom.remove(ed.dom.select('br', li)); - ed.dom.remove(li, true); - var textNodes = tinymce.grep(prevLi.childNodes, function(n){ return n.nodeType === 3 }); - if (textNodes.length === 1) { - var textNode = textNodes[0]; - ed.selection.setCursorLocation(textNode, textNode.length); - } - ed.undoManager.add(); - return Event.cancel(e); - } - } - } - - ed.onKeyDown.add(function(_, e) { state = getListKeyState(e); }); - ed.onKeyDown.add(cancelDefaultEvents); - ed.onKeyDown.add(imageJoiningListItem); - ed.onKeyDown.add(createNewLi); - - if (tinymce.isGecko) { - ed.onKeyUp.add(fixIndentedListItemForGecko); - } - if (tinymce.isIE8) { - ed.onKeyUp.add(fixIndentedListItemForIE8); - } - if (tinymce.isGecko || tinymce.isWebKit) { - ed.onKeyDown.add(fixDeletingFirstCharOfList); - } - if (tinymce.isWebKit) { - ed.onKeyDown.add(fixDeletingEmptyLiInWebkit); - } - }, - - applyList: function(targetListType, oppositeListType) { - var t = this, ed = t.ed, dom = ed.dom, applied = [], hasSameType = false, hasOppositeType = false, hasNonList = false, actions, - selectedBlocks = ed.selection.getSelectedBlocks(); - - function cleanupBr(e) { - if (e && e.tagName === 'BR') { - dom.remove(e); - } - } - - function makeList(element) { - var list = dom.create(targetListType), li; - - function adjustIndentForNewList(element) { - // If there's a margin-left, outdent one level to account for the extra list margin. - if (element.style.marginLeft || element.style.paddingLeft) { - t.adjustPaddingFunction(false)(element); - } - } - - if (element.tagName === 'LI') { - // No change required. - } else if (element.tagName === 'P' || element.tagName === 'DIV' || element.tagName === 'BODY') { - processBrs(element, function(startSection, br) { - doWrapList(startSection, br, element.tagName === 'BODY' ? null : startSection.parentNode); - li = startSection.parentNode; - adjustIndentForNewList(li); - cleanupBr(br); - }); - if (li) { - if (li.tagName === 'LI' && (element.tagName === 'P' || selectedBlocks.length > 1)) { - dom.split(li.parentNode.parentNode, li.parentNode); - } - attemptMergeWithAdjacent(li.parentNode, true); - } - return; - } else { - // Put the list around the element. - li = dom.create('li'); - dom.insertAfter(li, element); - li.appendChild(element); - adjustIndentForNewList(element); - element = li; - } - dom.insertAfter(list, element); - list.appendChild(element); - attemptMergeWithAdjacent(list, true); - applied.push(element); - } - - function doWrapList(start, end, template) { - var li, n = start, tmp; - while (!dom.isBlock(start.parentNode) && start.parentNode !== dom.getRoot()) { - start = dom.split(start.parentNode, start.previousSibling); - start = start.nextSibling; - n = start; - } - if (template) { - li = template.cloneNode(true); - start.parentNode.insertBefore(li, start); - while (li.firstChild) dom.remove(li.firstChild); - li = dom.rename(li, 'li'); - } else { - li = dom.create('li'); - start.parentNode.insertBefore(li, start); - } - while (n && n != end) { - tmp = n.nextSibling; - li.appendChild(n); - n = tmp; - } - if (li.childNodes.length === 0) { - li.innerHTML = '
'; - } - makeList(li); - } - - function processBrs(element, callback) { - var startSection, previousBR, END_TO_START = 3, START_TO_END = 1, - breakElements = 'br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl'; - - function isAnyPartSelected(start, end) { - var r = dom.createRng(), sel; - bookmark.keep = true; - ed.selection.moveToBookmark(bookmark); - bookmark.keep = false; - sel = ed.selection.getRng(true); - if (!end) { - end = start.parentNode.lastChild; - } - r.setStartBefore(start); - r.setEndAfter(end); - return !(r.compareBoundaryPoints(END_TO_START, sel) > 0 || r.compareBoundaryPoints(START_TO_END, sel) <= 0); - } - - function nextLeaf(br) { - if (br.nextSibling) - return br.nextSibling; - if (!dom.isBlock(br.parentNode) && br.parentNode !== dom.getRoot()) - return nextLeaf(br.parentNode); - } - - // Split on BRs within the range and process those. - startSection = element.firstChild; - // First mark the BRs that have any part of the previous section selected. - var trailingContentSelected = false; - each(dom.select(breakElements, element), function(br) { - if (br.hasAttribute && br.hasAttribute('_mce_bogus')) { - return true; // Skip the bogus Brs that are put in to appease Firefox and Safari. - } - if (isAnyPartSelected(startSection, br)) { - dom.addClass(br, '_mce_tagged_br'); - startSection = nextLeaf(br); - } - }); - trailingContentSelected = (startSection && isAnyPartSelected(startSection, undefined)); - startSection = element.firstChild; - each(dom.select(breakElements, element), function(br) { - // Got a section from start to br. - var tmp = nextLeaf(br); - if (br.hasAttribute && br.hasAttribute('_mce_bogus')) { - return true; // Skip the bogus Brs that are put in to appease Firefox and Safari. - } - if (dom.hasClass(br, '_mce_tagged_br')) { - callback(startSection, br, previousBR); - previousBR = null; - } else { - previousBR = br; - } - startSection = tmp; - }); - if (trailingContentSelected) { - callback(startSection, undefined, previousBR); - } - } - - function wrapList(element) { - processBrs(element, function(startSection, br, previousBR) { - // Need to indent this part - doWrapList(startSection, br); - cleanupBr(br); - cleanupBr(previousBR); - }); - } - - function changeList(element) { - if (tinymce.inArray(applied, element) !== -1) { - return; - } - if (element.parentNode.tagName === oppositeListType) { - dom.split(element.parentNode, element); - makeList(element); - attemptMergeWithNext(element.parentNode, false); - } - applied.push(element); - } - - function convertListItemToParagraph(element) { - var child, nextChild, mergedElement, splitLast; - if (tinymce.inArray(applied, element) !== -1) { - return; - } - element = splitNestedLists(element, dom); - while (dom.is(element.parentNode, 'ol,ul,li')) { - dom.split(element.parentNode, element); - } - // Push the original element we have from the selection, not the renamed one. - applied.push(element); - element = dom.rename(element, 'p'); - mergedElement = attemptMergeWithAdjacent(element, false, ed.settings.force_br_newlines); - if (mergedElement === element) { - // Now split out any block elements that can't be contained within a P. - // Manually iterate to ensure we handle modifications correctly (doesn't work with tinymce.each) - child = element.firstChild; - while (child) { - if (dom.isBlock(child)) { - child = dom.split(child.parentNode, child); - splitLast = true; - nextChild = child.nextSibling && child.nextSibling.firstChild; - } else { - nextChild = child.nextSibling; - if (splitLast && child.tagName === 'BR') { - dom.remove(child); - } - splitLast = false; - } - child = nextChild; - } - } - } - - each(selectedBlocks, function(e) { - e = findItemToOperateOn(e, dom); - if (e.tagName === oppositeListType || (e.tagName === 'LI' && e.parentNode.tagName === oppositeListType)) { - hasOppositeType = true; - } else if (e.tagName === targetListType || (e.tagName === 'LI' && e.parentNode.tagName === targetListType)) { - hasSameType = true; - } else { - hasNonList = true; - } - }); - - if (hasNonList &&!hasSameType || hasOppositeType || selectedBlocks.length === 0) { - actions = { - 'LI': changeList, - 'H1': makeList, - 'H2': makeList, - 'H3': makeList, - 'H4': makeList, - 'H5': makeList, - 'H6': makeList, - 'P': makeList, - 'BODY': makeList, - 'DIV': selectedBlocks.length > 1 ? makeList : wrapList, - defaultAction: wrapList, - elements: this.selectedBlocks() - }; - } else { - actions = { - defaultAction: convertListItemToParagraph, - elements: this.selectedBlocks(), - processEvenIfEmpty: true - }; - } - this.process(actions); - }, - - indent: function() { - var ed = this.ed, dom = ed.dom, indented = []; - - function createWrapItem(element) { - var wrapItem = dom.create('li', { style: 'list-style-type: none;'}); - dom.insertAfter(wrapItem, element); - return wrapItem; - } - - function createWrapList(element) { - var wrapItem = createWrapItem(element), - list = dom.getParent(element, 'ol,ul'), - listType = list.tagName, - listStyle = dom.getStyle(list, 'list-style-type'), - attrs = {}, - wrapList; - if (listStyle !== '') { - attrs.style = 'list-style-type: ' + listStyle + ';'; - } - wrapList = dom.create(listType, attrs); - wrapItem.appendChild(wrapList); - return wrapList; - } - - function indentLI(element) { - if (!hasParentInList(ed, element, indented)) { - element = splitNestedLists(element, dom); - var wrapList = createWrapList(element); - wrapList.appendChild(element); - attemptMergeWithAdjacent(wrapList.parentNode, false); - attemptMergeWithAdjacent(wrapList, false); - indented.push(element); - } - } - - this.process({ - 'LI': indentLI, - defaultAction: this.adjustPaddingFunction(true), - elements: this.selectedBlocks() - }); - - }, - - outdent: function(ui, elements) { - var t = this, ed = t.ed, dom = ed.dom, outdented = []; - - function outdentLI(element) { - var listElement, targetParent, align; - if (!hasParentInList(ed, element, outdented)) { - if (dom.getStyle(element, 'margin-left') !== '' || dom.getStyle(element, 'padding-left') !== '') { - return t.adjustPaddingFunction(false)(element); - } - align = dom.getStyle(element, 'text-align', true); - if (align === 'center' || align === 'right') { - dom.setStyle(element, 'text-align', 'left'); - return; - } - element = splitNestedLists(element, dom); - listElement = element.parentNode; - targetParent = element.parentNode.parentNode; - if (targetParent.tagName === 'P') { - dom.split(targetParent, element.parentNode); - } else { - dom.split(listElement, element); - if (targetParent.tagName === 'LI') { - // Nested list, need to split the LI and go back out to the OL/UL element. - dom.split(targetParent, element); - } else if (!dom.is(targetParent, 'ol,ul')) { - dom.rename(element, 'p'); - } - } - outdented.push(element); - } - } - - var listElements = elements && tinymce.is(elements, 'array') ? elements : this.selectedBlocks(); - this.process({ - 'LI': outdentLI, - defaultAction: this.adjustPaddingFunction(false), - elements: listElements - }); - - each(outdented, attemptMergeWithAdjacent); - }, - - process: function(actions) { - var t = this, sel = t.ed.selection, dom = t.ed.dom, selectedBlocks, r; - - function isEmptyElement(element) { - var excludeBrsAndBookmarks = tinymce.grep(element.childNodes, function(n) { - return !(n.nodeName === 'BR' || n.nodeName === 'SPAN' && dom.getAttrib(n, 'data-mce-type') == 'bookmark' - || n.nodeType == 3 && (n.nodeValue == String.fromCharCode(160) || n.nodeValue == '')); - }); - return excludeBrsAndBookmarks.length === 0; - } - - function processElement(element) { - dom.removeClass(element, '_mce_act_on'); - if (!element || element.nodeType !== 1 || ! actions.processEvenIfEmpty && selectedBlocks.length > 1 && isEmptyElement(element)) { - return; - } - element = findItemToOperateOn(element, dom); - var action = actions[element.tagName]; - if (!action) { - action = actions.defaultAction; - } - action(element); - } - - function recurse(element) { - t.splitSafeEach(element.childNodes, processElement, true); - } - - function brAtEdgeOfSelection(container, offset) { - return offset >= 0 && container.hasChildNodes() && offset < container.childNodes.length && - container.childNodes[offset].tagName === 'BR'; - } - - function isInTable() { - var n = sel.getNode(); - var p = dom.getParent(n, 'td'); - return p !== null; - } - - selectedBlocks = actions.elements; - - r = sel.getRng(true); - if (!r.collapsed) { - if (brAtEdgeOfSelection(r.endContainer, r.endOffset - 1)) { - r.setEnd(r.endContainer, r.endOffset - 1); - sel.setRng(r); - } - if (brAtEdgeOfSelection(r.startContainer, r.startOffset)) { - r.setStart(r.startContainer, r.startOffset + 1); - sel.setRng(r); - } - } - - - if (tinymce.isIE8) { - // append a zero sized nbsp so that caret is restored correctly using bookmark - var s = t.ed.selection.getNode(); - if (s.tagName === 'LI' && !(s.parentNode.lastChild === s)) { - var i = t.ed.getDoc().createTextNode('\uFEFF'); - s.appendChild(i); - } - } - - bookmark = sel.getBookmark(); - actions.OL = actions.UL = recurse; - t.splitSafeEach(selectedBlocks, processElement); - sel.moveToBookmark(bookmark); - bookmark = null; - - // we avoid doing repaint in a table as this will move the caret out of the table in Firefox 3.6 - if (!isInTable()) { - // Avoids table or image handles being left behind in Firefox. - t.ed.execCommand('mceRepaint'); - } - }, - - splitSafeEach: function(elements, f, forceClassBase) { - if (forceClassBase || - (tinymce.isGecko && - (/Firefox\/[12]\.[0-9]/.test(navigator.userAgent) || - /Firefox\/3\.[0-4]/.test(navigator.userAgent)))) { - this.classBasedEach(elements, f); - } else { - each(elements, f); - } - }, - - classBasedEach: function(elements, f) { - var dom = this.ed.dom, nodes, element; - // Mark nodes - each(elements, function(element) { - dom.addClass(element, '_mce_act_on'); - }); - nodes = dom.select('._mce_act_on'); - while (nodes.length > 0) { - element = nodes.shift(); - dom.removeClass(element, '_mce_act_on'); - f(element); - nodes = dom.select('._mce_act_on'); - } - }, - - adjustPaddingFunction: function(isIndent) { - var indentAmount, indentUnits, ed = this.ed; - indentAmount = ed.settings.indentation; - indentUnits = /[a-z%]+/i.exec(indentAmount); - indentAmount = parseInt(indentAmount, 10); - return function(element) { - var currentIndent, newIndentAmount; - currentIndent = parseInt(ed.dom.getStyle(element, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(element, 'padding-left') || 0, 10); - if (isIndent) { - newIndentAmount = currentIndent + indentAmount; - } else { - newIndentAmount = currentIndent - indentAmount; - } - ed.dom.setStyle(element, 'padding-left', ''); - ed.dom.setStyle(element, 'margin-left', newIndentAmount > 0 ? newIndentAmount + indentUnits : ''); - }; - }, - - selectedBlocks: function() { - var ed = this.ed, selectedBlocks = ed.selection.getSelectedBlocks(); - return selectedBlocks.length == 0 ? [ ed.dom.getRoot() ] : selectedBlocks; - }, - - getInfo: function() { - return { - longname : 'Lists', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - tinymce.PluginManager.add("lists", tinymce.plugins.Lists); -}()); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/css/media.css b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/css/media.css deleted file mode 100644 index 0c45c7ff6de9..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/css/media.css +++ /dev/null @@ -1,17 +0,0 @@ -#id, #name, #hspace, #vspace, #class_name, #align { width: 100px } -#hspace, #vspace { width: 50px } -#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px } -#flash_base, #flash_flashvars, #html5_altsource1, #html5_altsource2, #html5_poster { width: 240px } -#width, #height { width: 40px } -#src, #media_type { width: 250px } -#class { width: 120px } -#prev { margin: 0; border: 1px solid black; width: 380px; height: 260px; overflow: auto } -.panel_wrapper div.current { height: 420px; overflow: auto } -#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none } -.mceAddSelectValue { background-color: #DDDDDD } -#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px } -#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px } -#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px } -#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px } -#qt_qtsrc { width: 200px } -iframe {border: 1px solid gray} diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/editor_plugin.js deleted file mode 100644 index 9ac42e0d21e4..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var b=tinymce.explode("id,name,width,height,style,align,class,hspace,vspace,bgcolor,type"),a=tinymce.makeMap(b.join(",")),f=tinymce.html.Node,d,i,h=tinymce.util.JSON,g;d=[["Flash","d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["ShockWave","166b1bca-3f9c-11cf-8075-444553540000","application/x-director","http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],["WindowsMedia","6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a","application/x-mplayer2","http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],["QuickTime","02bf25d5-8c17-4b23-bc80-d3488abddc6b","video/quicktime","http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],["RealMedia","cfcdaa03-8be4-11cf-b84b-0020afbbccfa","audio/x-pn-realaudio-plugin","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["Java","8ad9c840-044e-11d1-b3e9-00805f499d93","application/x-java-applet","http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],["Silverlight","dfeaf541-f3e1-4c24-acac-99c30715084a","application/x-silverlight-2"],["Iframe"],["Video"],["EmbeddedAudio"],["Audio"]];function e(j){return typeof(j)=="string"?j.replace(/[^0-9%]/g,""):j}function c(m){var l,j,k;if(m&&!m.splice){j=[];for(k=0;true;k++){if(m[k]){j[k]=m[k]}else{break}}return j}return m}tinymce.create("tinymce.plugins.MediaPlugin",{init:function(n,j){var r=this,l={},m,p,q,k;function o(s){return s&&s.nodeName==="IMG"&&n.dom.hasClass(s,"mceItemMedia")}r.editor=n;r.url=j;i="";for(m=0;m0){O+=(O?"&":"")+P+"="+escape(Q)}});if(O.length){G.params.flashvars=O}L=p.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(L,function(Q,P){G.params[P]=""+Q})}}G=z.attr("data-mce-json");if(!G){return}G=h.parse(G);q=this.getType(z.attr("class"));B=z.attr("data-mce-style");if(!B){B=z.attr("style");if(B){B=p.dom.serializeStyle(p.dom.parseStyle(B,"img"))}}G.width=z.attr("width")||G.width;G.height=z.attr("height")||G.height;if(q.name==="Iframe"){x=new f("iframe",1);tinymce.each(b,function(n){var J=z.attr(n);if(n=="class"&&J){J=J.replace(/mceItem.+ ?/g,"")}if(J&&J.length>0){x.attr(n,J)}});for(I in G.params){x.attr(I,G.params[I])}x.attr({style:B,src:G.params.src});z.replace(x);return}if(this.editor.settings.media_use_script){x=new f("script",1).attr("type","text/javascript");y=new f("#text",3);y.value="write"+q.name+"("+h.serialize(tinymce.extend(G.params,{width:z.attr("width"),height:z.attr("height")}))+");";x.append(y);z.replace(x);return}if(q.name==="Video"&&G.video.sources[0]){C=new f("video",1).attr(tinymce.extend({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);for(A=0;A 0) - flashVarsOutput += (flashVarsOutput ? '&' : '') + name + '=' + escape(value); - }); - - if (flashVarsOutput.length) - data.params.flashvars = flashVarsOutput; - - params = editor.getParam('flash_video_player_params', { - allowfullscreen: true, - allowscriptaccess: true - }); - - tinymce.each(params, function(value, name) { - data.params[name] = "" + value; - }); - } - }; - - data = node.attr('data-mce-json'); - if (!data) - return; - - data = JSON.parse(data); - typeItem = this.getType(node.attr('class')); - - style = node.attr('data-mce-style'); - if (!style) { - style = node.attr('style'); - - if (style) - style = editor.dom.serializeStyle(editor.dom.parseStyle(style, 'img')); - } - - // Use node width/height to override the data width/height when the placeholder is resized - data.width = node.attr('width') || data.width; - data.height = node.attr('height') || data.height; - - // Handle iframe - if (typeItem.name === 'Iframe') { - replacement = new Node('iframe', 1); - - tinymce.each(rootAttributes, function(name) { - var value = node.attr(name); - - if (name == 'class' && value) - value = value.replace(/mceItem.+ ?/g, ''); - - if (value && value.length > 0) - replacement.attr(name, value); - }); - - for (name in data.params) - replacement.attr(name, data.params[name]); - - replacement.attr({ - style: style, - src: data.params.src - }); - - node.replace(replacement); - - return; - } - - // Handle scripts - if (this.editor.settings.media_use_script) { - replacement = new Node('script', 1).attr('type', 'text/javascript'); - - value = new Node('#text', 3); - value.value = 'write' + typeItem.name + '(' + JSON.serialize(tinymce.extend(data.params, { - width: node.attr('width'), - height: node.attr('height') - })) + ');'; - - replacement.append(value); - node.replace(replacement); - - return; - } - - // Add HTML5 video element - if (typeItem.name === 'Video' && data.video.sources[0]) { - // Create new object element - video = new Node('video', 1).attr(tinymce.extend({ - id : node.attr('id'), - width: normalizeSize(node.attr('width')), - height: normalizeSize(node.attr('height')), - style : style - }, data.video.attrs)); - - // Get poster source and use that for flash fallback - if (data.video.attrs) - posterSrc = data.video.attrs.poster; - - sources = data.video.sources = toArray(data.video.sources); - for (i = 0; i < sources.length; i++) { - if (/\.mp4$/.test(sources[i].src)) - mp4Source = sources[i].src; - } - - if (!sources[0].type) { - video.attr('src', sources[0].src); - sources.splice(0, 1); - } - - for (i = 0; i < sources.length; i++) { - source = new Node('source', 1).attr(sources[i]); - source.shortEnded = true; - video.append(source); - } - - // Create flash fallback for video if we have a mp4 source - if (mp4Source) { - addPlayer(mp4Source, posterSrc); - typeItem = self.getType('flash'); - } else - data.params.src = ''; - } - - // Add HTML5 audio element - if (typeItem.name === 'Audio' && data.video.sources[0]) { - // Create new object element - audio = new Node('audio', 1).attr(tinymce.extend({ - id : node.attr('id'), - width: normalizeSize(node.attr('width')), - height: normalizeSize(node.attr('height')), - style : style - }, data.video.attrs)); - - // Get poster source and use that for flash fallback - if (data.video.attrs) - posterSrc = data.video.attrs.poster; - - sources = data.video.sources = toArray(data.video.sources); - if (!sources[0].type) { - audio.attr('src', sources[0].src); - sources.splice(0, 1); - } - - for (i = 0; i < sources.length; i++) { - source = new Node('source', 1).attr(sources[i]); - source.shortEnded = true; - audio.append(source); - } - - data.params.src = ''; - } - - if (typeItem.name === 'EmbeddedAudio') { - embed = new Node('embed', 1); - embed.shortEnded = true; - embed.attr({ - id: node.attr('id'), - width: normalizeSize(node.attr('width')), - height: normalizeSize(node.attr('height')), - style : style, - type: node.attr('type') - }); - - for (name in data.params) - embed.attr(name, data.params[name]); - - tinymce.each(rootAttributes, function(name) { - if (data[name] && name != 'type') - embed.attr(name, data[name]); - }); - - data.params.src = ''; - } - - // Do we have a params src then we can generate object - if (data.params.src) { - // Is flv movie add player for it - if (/\.flv$/i.test(data.params.src)) - addPlayer(data.params.src, ''); - - if (args && args.force_absolute) - data.params.src = editor.documentBaseURI.toAbsolute(data.params.src); - - // Create new object element - object = new Node('object', 1).attr({ - id : node.attr('id'), - width: normalizeSize(node.attr('width')), - height: normalizeSize(node.attr('height')), - style : style - }); - - tinymce.each(rootAttributes, function(name) { - var value = data[name]; - - if (name == 'class' && value) - value = value.replace(/mceItem.+ ?/g, ''); - - if (value && name != 'type') - object.attr(name, value); - }); - - // Add params - for (name in data.params) { - param = new Node('param', 1); - param.shortEnded = true; - value = data.params[name]; - - // Windows media needs to use url instead of src for the media URL - if (name === 'src' && typeItem.name === 'WindowsMedia') - name = 'url'; - - param.attr({name: name, value: value}); - object.append(param); - } - - // Setup add type and classid if strict is disabled - if (this.editor.getParam('media_strict', true)) { - object.attr({ - data: data.params.src, - type: typeItem.mimes[0] - }); - } else { - object.attr({ - classid: "clsid:" + typeItem.clsids[0], - codebase: typeItem.codebase - }); - - embed = new Node('embed', 1); - embed.shortEnded = true; - embed.attr({ - id: node.attr('id'), - width: normalizeSize(node.attr('width')), - height: normalizeSize(node.attr('height')), - style : style, - type: typeItem.mimes[0] - }); - - for (name in data.params) - embed.attr(name, data.params[name]); - - tinymce.each(rootAttributes, function(name) { - if (data[name] && name != 'type') - embed.attr(name, data[name]); - }); - - object.append(embed); - } - - // Insert raw HTML - if (data.object_html) { - value = new Node('#text', 3); - value.raw = true; - value.value = data.object_html; - object.append(value); - } - - // Append object to video element if it exists - if (video) - video.append(object); - } - - if (video) { - // Insert raw HTML - if (data.video_html) { - value = new Node('#text', 3); - value.raw = true; - value.value = data.video_html; - video.append(value); - } - } - - if (audio) { - // Insert raw HTML - if (data.video_html) { - value = new Node('#text', 3); - value.raw = true; - value.value = data.video_html; - audio.append(value); - } - } - - var n = video || audio || object || embed; - if (n) - node.replace(n); - else - node.remove(); - }, - - /** - * Converts a tinymce.html.Node video/object/embed to an img element. - * - * The video/object/embed will be converted into an image placeholder with a JSON data attribute like this: - * - * - * The JSON structure will be like this: - * {'params':{'flashvars':'something','quality':'high','src':'someurl'}, 'video':{'sources':[{src: 'someurl', type: 'video/mp4'}]}} - */ - objectToImg : function(node) { - var object, embed, video, iframe, img, name, id, width, height, style, i, html, - param, params, source, sources, data, type, lookup = this.lookup, - matches, attrs, urlConverter = this.editor.settings.url_converter, - urlConverterScope = this.editor.settings.url_converter_scope, - hspace, vspace, align, bgcolor; - - function getInnerHTML(node) { - return new tinymce.html.Serializer({ - inner: true, - validate: false - }).serialize(node); - }; - - function lookupAttribute(o, attr) { - return lookup[(o.attr(attr) || '').toLowerCase()]; - } - - function lookupExtension(src) { - var ext = src.replace(/^.*\.([^.]+)$/, '$1'); - return lookup[ext.toLowerCase() || '']; - } - - // If node isn't in document - if (!node.parent) - return; - - // Handle media scripts - if (node.name === 'script') { - if (node.firstChild) - matches = scriptRegExp.exec(node.firstChild.value); - - if (!matches) - return; - - type = matches[1]; - data = {video : {}, params : JSON.parse(matches[2])}; - width = data.params.width; - height = data.params.height; - } - - // Setup data objects - data = data || { - video : {}, - params : {} - }; - - // Setup new image object - img = new Node('img', 1); - img.attr({ - src : this.editor.theme.url + '/img/trans.gif' - }); - - // Video element - name = node.name; - if (name === 'video' || name == 'audio') { - video = node; - object = node.getAll('object')[0]; - embed = node.getAll('embed')[0]; - width = video.attr('width'); - height = video.attr('height'); - id = video.attr('id'); - data.video = {attrs : {}, sources : []}; - - // Get all video attributes - attrs = data.video.attrs; - for (name in video.attributes.map) - attrs[name] = video.attributes.map[name]; - - source = node.attr('src'); - if (source) - data.video.sources.push({src : urlConverter.call(urlConverterScope, source, 'src', node.name)}); - - // Get all sources - sources = video.getAll("source"); - for (i = 0; i < sources.length; i++) { - source = sources[i].remove(); - - data.video.sources.push({ - src: urlConverter.call(urlConverterScope, source.attr('src'), 'src', 'source'), - type: source.attr('type'), - media: source.attr('media') - }); - } - - // Convert the poster URL - if (attrs.poster) - attrs.poster = urlConverter.call(urlConverterScope, attrs.poster, 'poster', node.name); - } - - // Object element - if (node.name === 'object') { - object = node; - embed = node.getAll('embed')[0]; - } - - // Embed element - if (node.name === 'embed') - embed = node; - - // Iframe element - if (node.name === 'iframe') { - iframe = node; - type = 'Iframe'; - } - - if (object) { - // Get width/height - width = width || object.attr('width'); - height = height || object.attr('height'); - style = style || object.attr('style'); - id = id || object.attr('id'); - hspace = hspace || object.attr('hspace'); - vspace = vspace || object.attr('vspace'); - align = align || object.attr('align'); - bgcolor = bgcolor || object.attr('bgcolor'); - data.name = object.attr('name'); - - // Get all object params - params = object.getAll("param"); - for (i = 0; i < params.length; i++) { - param = params[i]; - name = param.remove().attr('name'); - - if (!excludedAttrs[name]) - data.params[name] = param.attr('value'); - } - - data.params.src = data.params.src || object.attr('data'); - } - - if (embed) { - // Get width/height - width = width || embed.attr('width'); - height = height || embed.attr('height'); - style = style || embed.attr('style'); - id = id || embed.attr('id'); - hspace = hspace || embed.attr('hspace'); - vspace = vspace || embed.attr('vspace'); - align = align || embed.attr('align'); - bgcolor = bgcolor || embed.attr('bgcolor'); - - // Get all embed attributes - for (name in embed.attributes.map) { - if (!excludedAttrs[name] && !data.params[name]) - data.params[name] = embed.attributes.map[name]; - } - } - - if (iframe) { - // Get width/height - width = normalizeSize(iframe.attr('width')); - height = normalizeSize(iframe.attr('height')); - style = style || iframe.attr('style'); - id = iframe.attr('id'); - hspace = iframe.attr('hspace'); - vspace = iframe.attr('vspace'); - align = iframe.attr('align'); - bgcolor = iframe.attr('bgcolor'); - - tinymce.each(rootAttributes, function(name) { - img.attr(name, iframe.attr(name)); - }); - - // Get all iframe attributes - for (name in iframe.attributes.map) { - if (!excludedAttrs[name] && !data.params[name]) - data.params[name] = iframe.attributes.map[name]; - } - } - - // Use src not movie - if (data.params.movie) { - data.params.src = data.params.src || data.params.movie; - delete data.params.movie; - } - - // Convert the URL to relative/absolute depending on configuration - if (data.params.src) - data.params.src = urlConverter.call(urlConverterScope, data.params.src, 'src', 'object'); - - if (video) { - if (node.name === 'video') - type = lookup.video.name; - else if (node.name === 'audio') - type = lookup.audio.name; - } - - if (object && !type) - type = (lookupAttribute(object, 'clsid') || lookupAttribute(object, 'classid') || lookupAttribute(object, 'type') || {}).name; - - if (embed && !type) - type = (lookupAttribute(embed, 'type') || lookupExtension(data.params.src) || {}).name; - - // for embedded audio we preserve the original specified type - if (embed && type == 'EmbeddedAudio') { - data.params.type = embed.attr('type'); - } - - // Replace the video/object/embed element with a placeholder image containing the data - node.replace(img); - - // Remove embed - if (embed) - embed.remove(); - - // Serialize the inner HTML of the object element - if (object) { - html = getInnerHTML(object.remove()); - - if (html) - data.object_html = html; - } - - // Serialize the inner HTML of the video element - if (video) { - html = getInnerHTML(video.remove()); - - if (html) - data.video_html = html; - } - - data.hspace = hspace; - data.vspace = vspace; - data.align = align; - data.bgcolor = bgcolor; - - // Set width/height of placeholder - img.attr({ - id : id, - 'class' : 'mceItemMedia mceItem' + (type || 'Flash'), - style : style, - width : width || (node.name == 'audio' ? "300" : "320"), - height : height || (node.name == 'audio' ? "32" : "240"), - hspace : hspace, - vspace : vspace, - align : align, - bgcolor : bgcolor, - "data-mce-json" : JSON.serialize(data, "'") - }); - } - }); - - // Register plugin - tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin); -})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/js/embed.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/js/embed.js deleted file mode 100644 index f8dc810527b4..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/js/embed.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. - */ - -function writeFlash(p) { - writeEmbed( - 'D27CDB6E-AE6D-11cf-96B8-444553540000', - 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', - 'application/x-shockwave-flash', - p - ); -} - -function writeShockWave(p) { - writeEmbed( - '166B1BCA-3F9C-11CF-8075-444553540000', - 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', - 'application/x-director', - p - ); -} - -function writeQuickTime(p) { - writeEmbed( - '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', - 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', - 'video/quicktime', - p - ); -} - -function writeRealMedia(p) { - writeEmbed( - 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', - 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', - 'audio/x-pn-realaudio-plugin', - p - ); -} - -function writeWindowsMedia(p) { - p.url = p.src; - writeEmbed( - '6BF52A52-394A-11D3-B153-00C04F79FAA6', - 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', - 'application/x-mplayer2', - p - ); -} - -function writeEmbed(cls, cb, mt, p) { - var h = '', n; - - h += ''; - - h += ''); - - function get(id) { - return document.getElementById(id); - } - - function clone(obj) { - var i, len, copy, attr; - - if (null == obj || "object" != typeof obj) - return obj; - - // Handle Array - if ('length' in obj) { - copy = []; - - for (i = 0, len = obj.length; i < len; ++i) { - copy[i] = clone(obj[i]); - } - - return copy; - } - - // Handle Object - copy = {}; - for (attr in obj) { - if (obj.hasOwnProperty(attr)) - copy[attr] = clone(obj[attr]); - } - - return copy; - } - - function getVal(id) { - var elm = get(id); - - if (elm.nodeName == "SELECT") - return elm.options[elm.selectedIndex].value; - - if (elm.type == "checkbox") - return elm.checked; - - return elm.value; - } - - function setVal(id, value, name) { - if (typeof(value) != 'undefined' && value != null) { - var elm = get(id); - - if (elm.nodeName == "SELECT") - selectByValue(document.forms[0], id, value); - else if (elm.type == "checkbox") { - if (typeof(value) == 'string') { - value = value.toLowerCase(); - value = (!name && value === 'true') || (name && value === name.toLowerCase()); - } - elm.checked = !!value; - } else - elm.value = value; - } - } - - window.Media = { - init : function() { - var html, editor, self = this; - - self.editor = editor = tinyMCEPopup.editor; - - // Setup file browsers and color pickers - get('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media'); - get('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','quicktime_qtsrc','media','media'); - get('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); - get('video_altsource1_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource1','video_altsource1','media','media'); - get('video_altsource2_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource2','video_altsource2','media','media'); - get('audio_altsource1_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource1','audio_altsource1','media','media'); - get('audio_altsource2_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource2','audio_altsource2','media','media'); - get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','image','media'); - - html = self.getMediaListHTML('medialist', 'src', 'media', 'media'); - if (html == "") - get("linklistrow").style.display = 'none'; - else - get("linklistcontainer").innerHTML = html; - - if (isVisible('filebrowser')) - get('src').style.width = '230px'; - - if (isVisible('video_filebrowser_altsource1')) - get('video_altsource1').style.width = '220px'; - - if (isVisible('video_filebrowser_altsource2')) - get('video_altsource2').style.width = '220px'; - - if (isVisible('audio_filebrowser_altsource1')) - get('audio_altsource1').style.width = '220px'; - - if (isVisible('audio_filebrowser_altsource2')) - get('audio_altsource2').style.width = '220px'; - - if (isVisible('filebrowser_poster')) - get('video_poster').style.width = '220px'; - - editor.dom.setOuterHTML(get('media_type'), self.getMediaTypeHTML(editor)); - - self.setDefaultDialogSettings(editor); - self.data = clone(tinyMCEPopup.getWindowArg('data')); - self.dataToForm(); - self.preview(); - - updateColor('bgcolor_pick', 'bgcolor'); - }, - - insert : function() { - var editor = tinyMCEPopup.editor; - - this.formToData(); - editor.execCommand('mceRepaint'); - tinyMCEPopup.restoreSelection(); - editor.selection.setNode(editor.plugins.media.dataToImg(this.data)); - tinyMCEPopup.close(); - }, - - preview : function() { - get('prev').innerHTML = this.editor.plugins.media.dataToHtml(this.data, true); - }, - - moveStates : function(to_form, field) { - var data = this.data, editor = this.editor, - mediaPlugin = editor.plugins.media, ext, src, typeInfo, defaultStates, src; - - defaultStates = { - // QuickTime - quicktime_autoplay : true, - quicktime_controller : true, - - // Flash - flash_play : true, - flash_loop : true, - flash_menu : true, - - // WindowsMedia - windowsmedia_autostart : true, - windowsmedia_enablecontextmenu : true, - windowsmedia_invokeurls : true, - - // RealMedia - realmedia_autogotourl : true, - realmedia_imagestatus : true - }; - - function parseQueryParams(str) { - var out = {}; - - if (str) { - tinymce.each(str.split('&'), function(item) { - var parts = item.split('='); - - out[unescape(parts[0])] = unescape(parts[1]); - }); - } - - return out; - }; - - function setOptions(type, names) { - var i, name, formItemName, value, list; - - if (type == data.type || type == 'global') { - names = tinymce.explode(names); - for (i = 0; i < names.length; i++) { - name = names[i]; - formItemName = type == 'global' ? name : type + '_' + name; - - if (type == 'global') - list = data; - else if (type == 'video' || type == 'audio') { - list = data.video.attrs; - - if (!list && !to_form) - data.video.attrs = list = {}; - } else - list = data.params; - - if (list) { - if (to_form) { - setVal(formItemName, list[name], type == 'video' || type == 'audio' ? name : ''); - } else { - delete list[name]; - - value = getVal(formItemName); - if ((type == 'video' || type == 'audio') && value === true) - value = name; - - if (defaultStates[formItemName]) { - if (value !== defaultStates[formItemName]) { - value = "" + value; - list[name] = value; - } - } else if (value) { - value = "" + value; - list[name] = value; - } - } - } - } - } - } - - if (!to_form) { - data.type = get('media_type').options[get('media_type').selectedIndex].value; - data.width = getVal('width'); - data.height = getVal('height'); - - // Switch type based on extension - src = getVal('src'); - if (field == 'src') { - ext = src.replace(/^.*\.([^.]+)$/, '$1'); - if (typeInfo = mediaPlugin.getType(ext)) - data.type = typeInfo.name.toLowerCase(); - - setVal('media_type', data.type); - } - - if (data.type == "video" || data.type == "audio") { - if (!data.video.sources) - data.video.sources = []; - - data.video.sources[0] = {src: getVal('src')}; - } - } - - // Hide all fieldsets and show the one active - get('video_options').style.display = 'none'; - get('audio_options').style.display = 'none'; - get('flash_options').style.display = 'none'; - get('quicktime_options').style.display = 'none'; - get('shockwave_options').style.display = 'none'; - get('windowsmedia_options').style.display = 'none'; - get('realmedia_options').style.display = 'none'; - get('embeddedaudio_options').style.display = 'none'; - - if (get(data.type + '_options')) - get(data.type + '_options').style.display = 'block'; - - setVal('media_type', data.type); - - setOptions('flash', 'play,loop,menu,swliveconnect,quality,scale,salign,wmode,base,flashvars'); - setOptions('quicktime', 'loop,autoplay,cache,controller,correction,enablejavascript,kioskmode,autohref,playeveryframe,targetcache,scale,starttime,endtime,target,qtsrcchokespeed,volume,qtsrc'); - setOptions('shockwave', 'sound,progress,autostart,swliveconnect,swvolume,swstretchstyle,swstretchhalign,swstretchvalign'); - setOptions('windowsmedia', 'autostart,enabled,enablecontextmenu,fullscreen,invokeurls,mute,stretchtofit,windowlessvideo,balance,baseurl,captioningid,currentmarker,currentposition,defaultframe,playcount,rate,uimode,volume'); - setOptions('realmedia', 'autostart,loop,autogotourl,center,imagestatus,maintainaspect,nojava,prefetch,shuffle,console,controls,numloop,scriptcallbacks'); - setOptions('video', 'poster,autoplay,loop,muted,preload,controls'); - setOptions('audio', 'autoplay,loop,preload,controls'); - setOptions('embeddedaudio', 'autoplay,loop,controls'); - setOptions('global', 'id,name,vspace,hspace,bgcolor,align,width,height'); - - if (to_form) { - if (data.type == 'video') { - if (data.video.sources[0]) - setVal('src', data.video.sources[0].src); - - src = data.video.sources[1]; - if (src) - setVal('video_altsource1', src.src); - - src = data.video.sources[2]; - if (src) - setVal('video_altsource2', src.src); - } else if (data.type == 'audio') { - if (data.video.sources[0]) - setVal('src', data.video.sources[0].src); - - src = data.video.sources[1]; - if (src) - setVal('audio_altsource1', src.src); - - src = data.video.sources[2]; - if (src) - setVal('audio_altsource2', src.src); - } else { - // Check flash vars - if (data.type == 'flash') { - tinymce.each(editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'}), function(value, name) { - if (value == '$url') - data.params.src = parseQueryParams(data.params.flashvars)[name] || data.params.src || ''; - }); - } - - setVal('src', data.params.src); - } - } else { - src = getVal("src"); - - // YouTube Embed - if (src.match(/youtube\.com\/embed\/\w+/)) { - data.width = 425; - data.height = 350; - data.params.frameborder = '0'; - data.type = 'iframe'; - setVal('src', src); - setVal('media_type', data.type); - } else { - // YouTube *NEW* - if (src.match(/youtu\.be\/[a-z1-9.-_]+/)) { - data.width = 425; - data.height = 350; - data.params.frameborder = '0'; - data.type = 'iframe'; - src = 'http://www.youtube.com/embed/' + src.match(/youtu.be\/([a-z1-9.-_]+)/)[1]; - setVal('src', src); - setVal('media_type', data.type); - } - - // YouTube - if (src.match(/youtube\.com(.+)v=([^&]+)/)) { - data.width = 425; - data.height = 350; - data.params.frameborder = '0'; - data.type = 'iframe'; - src = 'http://www.youtube.com/embed/' + src.match(/v=([^&]+)/)[1]; - setVal('src', src); - setVal('media_type', data.type); - } - } - - // Google video - if (src.match(/video\.google\.com(.+)docid=([^&]+)/)) { - data.width = 425; - data.height = 326; - data.type = 'flash'; - src = 'http://video.google.com/googleplayer.swf?docId=' + src.match(/docid=([^&]+)/)[1] + '&hl=en'; - setVal('src', src); - setVal('media_type', data.type); - } - - // Vimeo - if (src.match(/vimeo\.com\/([0-9]+)/)) { - data.width = 425; - data.height = 350; - data.params.frameborder = '0'; - data.type = 'iframe'; - src = 'http://player.vimeo.com/video/' + src.match(/vimeo.com\/([0-9]+)/)[1]; - setVal('src', src); - setVal('media_type', data.type); - } - - // stream.cz - if (src.match(/stream\.cz\/((?!object).)*\/([0-9]+)/)) { - data.width = 425; - data.height = 350; - data.params.frameborder = '0'; - data.type = 'iframe'; - src = 'http://www.stream.cz/object/' + src.match(/stream.cz\/[^/]+\/([0-9]+)/)[1]; - setVal('src', src); - setVal('media_type', data.type); - } - - // Google maps - if (src.match(/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/)) { - data.width = 425; - data.height = 350; - data.params.frameborder = '0'; - data.type = 'iframe'; - src = 'http://maps.google.com/maps/ms?msid=' + src.match(/msid=(.+)/)[1] + "&output=embed"; - setVal('src', src); - setVal('media_type', data.type); - } - - if (data.type == 'video') { - if (!data.video.sources) - data.video.sources = []; - - data.video.sources[0] = {src : src}; - - src = getVal("video_altsource1"); - if (src) - data.video.sources[1] = {src : src}; - - src = getVal("video_altsource2"); - if (src) - data.video.sources[2] = {src : src}; - } else if (data.type == 'audio') { - if (!data.video.sources) - data.video.sources = []; - - data.video.sources[0] = {src : src}; - - src = getVal("audio_altsource1"); - if (src) - data.video.sources[1] = {src : src}; - - src = getVal("audio_altsource2"); - if (src) - data.video.sources[2] = {src : src}; - } else - data.params.src = src; - - // Set default size - setVal('width', data.width || (data.type == 'audio' ? 300 : 320)); - setVal('height', data.height || (data.type == 'audio' ? 32 : 240)); - } - }, - - dataToForm : function() { - this.moveStates(true); - }, - - formToData : function(field) { - if (field == "width" || field == "height") - this.changeSize(field); - - if (field == 'source') { - this.moveStates(false, field); - setVal('source', this.editor.plugins.media.dataToHtml(this.data)); - this.panel = 'source'; - } else { - if (this.panel == 'source') { - this.data = clone(this.editor.plugins.media.htmlToData(getVal('source'))); - this.dataToForm(); - this.panel = ''; - } - - this.moveStates(false, field); - this.preview(); - } - }, - - beforeResize : function() { - this.width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10); - this.height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10); - }, - - changeSize : function(type) { - var width, height, scale, size; - - if (get('constrain').checked) { - width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10); - height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10); - - if (type == 'width') { - this.height = Math.round((width / this.width) * height); - setVal('height', this.height); - } else { - this.width = Math.round((height / this.height) * width); - setVal('width', this.width); - } - } - }, - - getMediaListHTML : function() { - if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) { - var html = ""; - - html += ''; - - return html; - } - - return ""; - }, - - getMediaTypeHTML : function(editor) { - function option(media_type, element) { - if (!editor.schema.getElementRule(element || media_type)) { - return ''; - } - - return '' - } - - var html = ""; - - html += ''; - return html; - }, - - setDefaultDialogSettings : function(editor) { - var defaultDialogSettings = editor.getParam("media_dialog_defaults", {}); - tinymce.each(defaultDialogSettings, function(v, k) { - setVal(k, v); - }); - } - }; - - tinyMCEPopup.requireLangPack(); - tinyMCEPopup.onInit.add(function() { - Media.init(); - }); -})(); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/da_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/da_dlg.js deleted file mode 100644 index d9a88d1fa5ee..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/da_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('da.media_dlg',{list:"Liste",file:"Fil/URL",advanced:"Avanceret",general:"Generelt",title:"Inds\u00e6t/rediger indlejret mediefil","align_top_left":"\u00d8verste venstre hj\u00f8rne","align_center":"Centreret","align_left":"Venstre","align_bottom":"Bund","align_right":"H\u00f8jret","align_top":"Top","qt_stream_warn":"Streamede rtsp resourcer skal tilf\u00f8jes til QT Src feltet under tabben avanceret.\nDu skal ogs\u00e5 tilf\u00f8je en ikke streamet version til Src feltet..",qtsrc:"QT Src",progress:"Fremskridt",sound:"Lyd",swstretchvalign:"Str\u00e6k V-justering",swstretchhalign:"Str\u00e6k H-justering",swstretchstyle:"Str\u00e6k stil",scriptcallbacks:"Script callbacks","align_top_right":"\u00d8verste h\u00f8jre hj\u00f8rne",uimode:"UI-tilstand",rate:"Vurder",playcount:"Afspil indhold",defaultframe:"Standard ramme",currentposition:"Aktuel position",currentmarker:"Aktuel mark\u00f8r",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Vinduesl\u00f8s video",stretchtofit:"Str\u00e6k for at tilpasse",mute:"Lydl\u00f8s",invokeurls:"Aktiver URL\'er",fullscreen:"Fuldsk\u00e6rm",enabled:"Valgt",autostart:"Afspil automatisk",volume:"Lydstyrke",target:"M\u00e5l",qtsrcchokespeed:"Choke-hastighed",href:"Href",endtime:"Sluttidspunkt",starttime:"Starttidspunkt",enablejavascript:"Tillad JavaScript",correction:"Ingen korrektion",targetcache:"M\u00e5l-cache",playeveryframe:"Afsplil alle rammer",kioskmode:"Kiosk-tilstand",controller:"Controller",menu:"Vis menu",loop:"Gentag",play:"Start",hspace:"H-afstand",vspace:"V-afstand","class_name":"Klasse",name:"Navn",id:"Id",type:"Type",size:"Dimensioner",preview:"Vis udskrift","constrain_proportions":"Bevar proportioner",controls:"Kontroller",numloop:"Antal loops",console:"Konsol",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Baggrund",wmode:"WMode",salign:"SAlign",align:"Juster",scale:"Skaler",quality:"Kvalitet",shuffle:"Bland",prefetch:"Forh\u00e5ndshent",nojava:"Ingen java",maintainaspect:"Bevar aspekt",imagestatus:"Billedstatus",center:"Center",autogotourl:"Auto g\u00e5 til URL","shockwave_options":"Shockwave options","rmp_options":"Real media player egenskaber","wmp_options":"Windows media player egenskaber","qt_options":"Quicktime egenskaber","flash_options":"Flash egenskaber",hidden:"Skjul","align_bottom_left":"Nederste venstre hj\u00f8rne","align_bottom_right":"\u00d8verste h\u00f8jre hj\u00f8rne",flash:"Flash",quicktime:"Quicktime","embedded_audio_options":"Indstillinger for indlejret audio",windowsmedia:"Windows Media",realmedia:"Realmedia",shockwave:"Shockwave",audio:"Lyd",video:"Video","html5_video_options":"HTML5 Video Indstillinger",altsource1:"Alternativ kilde 1",altsource2:"Alternativ kilde 2",preload:"Forudindl\u00e6s",poster:"Poster",source:"Kilde","html5_audio_options":"Audio indstillinger","preload_none":"Preindl\u00e6s ikke","preload_metadata":"Preindl\u00e6s video metadata","preload_auto":"Lad brugerens browser v\u00e6lge",iframe:"iframe",embeddedaudio:"Indlejret lyd"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/de_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/de_dlg.js deleted file mode 100644 index 6d0de767cdb4..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/de_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('de.media_dlg',{list:"Liste",file:"Datei/URL",advanced:"Erweitert",general:"Allgemein",title:"Multimedia-Inhalte einf\u00fcgen/bearbeiten","align_top_left":"Oben Links","align_center":"Zentriert","align_left":"Links","align_bottom":"Unten","align_right":"Rechts","align_top":"Oben","qt_stream_warn":"In den Erweiterten Einstellungen sollten im Feld \'QT Src\' gestreamte RTSP Resourcen hinzugef\u00fcgt werden.\nZus\u00e4tzlich sollten Sie dort auch eine nicht-gestreamte Resource angeben.",qtsrc:"Angabe zu QT Src",progress:"Fortschritt",sound:"Ton",swstretchvalign:"Stretch V-Ausrichtung",swstretchhalign:"Stretch H-Ausrichtung",swstretchstyle:"Stretch-Art",scriptcallbacks:"Script callbacks","align_top_right":"Oben Rechts",uimode:"UI Modus",rate:"Rate",playcount:"Z\u00e4hler",defaultframe:"Frame-Voreinstellung",currentposition:"Aktuelle Position",currentmarker:"Aktueller Marker",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Fensterloses Video",stretchtofit:"Anzeigefl\u00e4che an verf\u00fcgbaren Platz anpassen",mute:"Stumm",invokeurls:"Invoke URLs",fullscreen:"Vollbild",enabled:"Aktiviert",autostart:"Autostart",volume:"Lautst\u00e4rke",target:"Ziel",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"Endzeitpunkt",starttime:"Startzeitpunkt",enablejavascript:"JavaScript aktivieren",correction:"Ohne Korrektur",targetcache:"Ziel zwischenspeichern",playeveryframe:"Jeden Frame abspielen",kioskmode:"Kioskmodus",controller:"Controller",menu:"Men\u00fc anzeigen",loop:"Wiederholung",play:"Automatisches Abspielen",hspace:"Horizontaler Abstand",vspace:"Vertikaler Abstand","class_name":"CSS-Klasse",name:"Name",id:"Id",type:"Typ",size:"Abmessungen",preview:"Vorschau","constrain_proportions":"Proportionen erhalten",controls:"Steuerung",numloop:"Anzahl Wiederholungen",console:"Konsole",cache:"Zwischenspeicher",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvariablen",base:"Base",bgcolor:"Hintergrund",wmode:"WMode",salign:"S-Ausrichtung",align:"Ausrichtung",scale:"Skalierung",quality:"Qualit\u00e4t",shuffle:"Zuf\u00e4llige Wiedergabe",prefetch:"Prefetch",nojava:"Kein Java",maintainaspect:"Bildverh\u00e4ltnis beibehalten",imagestatus:"Bildstatus",center:"Zentriert",autogotourl:"Auto goto URL","shockwave_options":"Shockwave-Optionen","rmp_options":"Optionen f\u00fcr Real Media Player","wmp_options":"Optionen f\u00fcr Windows Media Player","qt_options":"Quicktime-Optionen","flash_options":"Flash-Optionen",hidden:"Versteckt","align_bottom_left":"Unten Links","align_bottom_right":"Unten Rechts",flash:"Flash",quicktime:"QuickTime","embedded_audio_options":"Integrierte Audio Optionen",windowsmedia:"WindowsMedia",realmedia:"RealMedia",shockwave:"ShockWave",audio:"Audio",video:"Video","html5_video_options":"HTML5 Video Optionen",altsource1:"Alternative Quelle 1",altsource2:"Alternative Quelle 2",preload:"Preload",poster:"Poster",source:"Quelle","html5_audio_options":"Audio Optionen","preload_none":"Nicht vorladen","preload_metadata":"Video Metadaten vorladen","preload_auto":"Benutzer Browser entscheidet automatisch",iframe:"iFrame",embeddedaudio:"Audio (eingebunden)"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/en_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/en_dlg.js deleted file mode 100644 index 6f98f071cbed..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/en_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide", "embedded_audio_options":"Embedded Audio Options", video:"HTML5 Video", audio:"HTML5 Audio", flash:"Flash", quicktime:"QuickTime", shockwave:"Shockwave", windowsmedia:"Windows Media", realmedia:"Real Media", iframe:"Iframe", embeddedaudio:"Embedded Audio" }); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/en_us_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/en_us_dlg.js deleted file mode 100644 index 9e5f6eecbfcc..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/en_us_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('en_us.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide", "embedded_audio_options":"Embedded Audio Options", video:"HTML5 Video", audio:"HTML5 Audio", flash:"Flash", quicktime:"QuickTime", shockwave:"Shockwave", windowsmedia:"Windows Media", realmedia:"Real Media", iframe:"Iframe", embeddedaudio:"Embedded Audio" }); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/es_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/es_dlg.js deleted file mode 100644 index 7765ab3307a6..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/es_dlg.js +++ /dev/null @@ -1,103 +0,0 @@ -tinyMCE.addI18n('es.media_dlg',{ -title:"Insertar/editar medio embebido", -general:"General", -advanced:"Avanzado", -file:"Archivo/URL", -list:"Lista", -size:"Dimensiones", -preview:"Vista Previa", -constrain_proportions:"Bloquear relaci\u00F3n de aspecto", -type:"Tipo", -id:"Id", -name:"Nombre", -class_name:"Clase", -vspace:"V-Space", -hspace:"H-Space", -play:"Comienzo Autom\u00E1tico", -loop:"Repetitivo", -menu:"Mostrar Men\u00FA", -quality:"Calidad", -scale:"Scale", -align:"Alineaci\u00F3n", -salign:"SAlign", -wmode:"WMode", -bgcolor:"Fondo", -base:"Base", -flashvars:"Flashvars", -liveconnect:"SWLiveConnect", -autohref:"AutoHREF", -cache:"Cach\u00E9", -hidden:"Hidden", -controller:"Controller", -kioskmode:"Kiosk mode", -playeveryframe:"Reproducir todo los frames", -targetcache:"Target cache", -correction:"Sin correci\u00F3n", -enablejavascript:"Habilitar JavaScript", -starttime:"Inicio", -endtime:"Fin", -href:"Href", -qtsrcchokespeed:"Vel. de choque", -target:"Target", -volume:"Volumen", -autostart:"Comienzo Autom\u00E1tico", -enabled:"Habilitado", -fullscreen:"Pantalla Completa", -invokeurls:"Invocar URLs", -mute:"Silencio", -stretchtofit:"Estirar para ajustar", -windowlessvideo:"Video sin ventana", -balance:"Balance", -baseurl:"URL Base", -captioningid:"Captioning id", -currentmarker:"Marcador actual", -currentposition:"Posici\u00F3n actual", -defaultframe:"Frame predet.", -playcount:"Cuantas reproducciones", -rate:"Ratio", -uimode:"Modo UI", -flash_options:"Opciones Flash", -qt_options:"Opciones Quicktime", -wmp_options:"Opciones Windows media player", -rmp_options:"Opciones Real media player", -shockwave_options:"Opciones Shockwave", -autogotourl:"Ir a URL autom\u00E1t.", -center:"Centrado", -imagestatus:"Estado de imagen", -maintainaspect:"Mantener aspecto", -nojava:"No java", -prefetch:"Preb\u00FAsqueda", -shuffle:"Aleatorio", -console:"Consola", -numloop:"N\u00FAm. repeticiones", -controls:"Controles", -scriptcallbacks:"Script callbacks", -swstretchstyle:"Estilo estiramiento", -swstretchhalign:"Alin. H. Estiramiento", -swstretchvalign:"Alin. V. Estiramiento", -sound:"Sonido", -progress:"Progreso", -qtsrc:"QT Src", -qt_stream_warn:"Los recursos rtsp de Streaming deber\u00EDan a\u00F1adirse en el campo QT Src de la pesta\u00F1a avanzada.\nAdem\u00E1s deber\u00EDa a\u00F1adir una versi\u00F3n no Streaming en el campo Src.", -align_top:"Arriba", -align_right:"Derecha", -align_bottom:"Debajo", -align_left:"Izquierda", -align_center:"Centrado", -align_top_left:"Arriba Izda.", -align_top_right:"Arriba Dcha.", -align_bottom_left:"Debajo Izda.", -align_bottom_right:"Debajo Dcha.", -flv_options:"Opciones Video Flash", -flv_scalemode:"Modo escalado", -flv_buffer:"Buffer", -flv_startimage:"Imagen inicio", -flv_starttime:"Tiempo inicio", -flv_defaultvolume:"Volumen predet.", -flv_hiddengui:"Ocultar GUI", -flv_autostart:"Inicio auto.", -flv_loop:"Repetitivo", -flv_showscalemodes:"Mostrar modos escala", -flv_smoothvideo:"Video suave", -flv_jscallback:"JS Callback" -}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/fi_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/fi_dlg.js deleted file mode 100644 index 2ac2fcac1311..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/fi_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fi.media_dlg',{list:"Lista",file:"Tiedosto/URL",advanced:"Edistyneet",general:"Yleiset",title:"Lis\u00e4\u00e4/muokkaa upotettua mediaa","align_top_left":"Yl\u00e4-vasemmalla","align_center":"Keskell\u00e4","align_left":"Vasemmalla","align_bottom":"Alhaalla","align_right":"Oikealla","align_top":"Ylh\u00e4\u00e4ll\u00e4","qt_stream_warn":"Streamatut rtsp-resurssit tulisi lis\u00e4t\u00e4 QT Src -kentt\u00e4\u00e4n edistynyt-v\u00e4lilehdelle.\nSinun kannattaa lis\u00e4t\u00e4 my\u00f6s ei-streamattu versio Src-kentt\u00e4\u00e4n.",qtsrc:"QT Src",progress:"Eteneminen",sound:"\u00c4\u00e4ni",swstretchvalign:"Venyt\u00e4 pystysuunnassa",swstretchhalign:"Venyt\u00e4 vaakasuunnassa",swstretchstyle:"Venytystyyli",scriptcallbacks:"Skriptin takaisinkutsut","align_top_right":"Yl\u00e4-oikealla",uimode:"UI-moodi",rate:"Rate",playcount:"Toistolaskin",defaultframe:"Oletusruutu",currentposition:"T\u00e4m\u00e4nhetkinen sijainti",currentmarker:"T\u00e4m\u00e4nhetkinen merkki",captioningid:"Otsikointi-id",baseurl:"Perus URL-osoitteet",balance:"Tasapaino",windowlessvideo:"Ikkunaton video",stretchtofit:"Venyt\u00e4 sopimaan",mute:"Hiljennys",invokeurls:"Kutsu URL-osoitteet",fullscreen:"Kokoruutu",enabled:"P\u00e4\u00e4ll\u00e4",autostart:"Automaattinen aloitus",volume:"\u00c4\u00e4nen voimakkuus",target:"Kohde",qtsrcchokespeed:"Choke-nopeus",href:"Href",endtime:"Lopetusaika",starttime:"Aloitusaika",enablejavascript:"Salli JavaScript",correction:"Ei korjausta",targetcache:"Kohteen v\u00e4limuisti",playeveryframe:"Toista jokainen ruutu",kioskmode:"Kioskitila",controller:"Ohjain",menu:"N\u00e4yt\u00e4 valikko",loop:"Silmukka",play:"Automaattinen toisto",hspace:"Vaakatason tila",vspace:"Pystytason tila","class_name":"Luokka",name:"Nimi",id:"Tunniste",type:"Tyyppi",size:"Mitat",preview:"Esikatselu","constrain_proportions":"S\u00e4ilyt\u00e4 mittasuhteet",controls:"Kontrollit",numloop:"Toistojen m\u00e4\u00e4r\u00e4",console:"Konsoli",cache:"V\u00e4limuisti",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash-muuttujat",base:"Perusta",bgcolor:"Tausta",wmode:"WMode",salign:"SAlign",align:"Tasaus",scale:"Skaala",quality:"Laatu",shuffle:"Sekoita",prefetch:"Esinouda",nojava:"Ei Javaa",maintainaspect:"S\u00e4ilyt\u00e4 kuvasuhde",imagestatus:"Kuvan tila",center:"Keskit\u00e4",autogotourl:"Mene automaattisesti URL:iin","shockwave_options":"Shockwaven asetukset","rmp_options":"Real media playerin asetukset","wmp_options":"Windows media playerin asetukset","qt_options":"Quicktimen asetukset","flash_options":"Flashin asetukset",hidden:"Piilotettu","align_bottom_left":"Ala-vasemmalla","align_bottom_right":"Ala-oikealla",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Upotetun \u00e4\u00e4nen asetukset",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"HTML5 videoasetukset",altsource1:"Vaihtoehtoinen l\u00e4hde 1",altsource2:"Vaihtoehtoinen l\u00e4hde 2",preload:"Esilataa",poster:"Posteri",source:"L\u00e4hde","html5_audio_options":"\u00c4\u00e4niasetukset","preload_none":"\u00c4l\u00e4 esilataa","preload_metadata":"Esilataa videon metatiedot","preload_auto":"Anna k\u00e4ytt\u00e4j\u00e4n selaimen p\u00e4\u00e4tt\u00e4\u00e4",iframe:"iframe",embeddedaudio:"upotettu audio"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/fr_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/fr_dlg.js deleted file mode 100644 index 90b0102dd399..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/fr_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('fr.media_dlg',{list:"Liste",file:"Fichier / URL",advanced:"Avanc\u00e9",general:"G\u00e9n\u00e9ral",title:"Ins\u00e9rer / \u00e9diter un fichier m\u00e9dia","align_top_left":"En haut \u00e0 gauche","align_center":"Centr\u00e9","align_left":"Gauche","align_bottom":"Bas","align_right":"Droite","align_top":"Haut","qt_stream_warn":"Les ressources rtsp en streaming doivent \u00eatre ajout\u00e9es au champ \u00ab Source QT \u00bb dans l\'onglet avanc\u00e9.\nVous devriez aussi ajouter une version n\'\u00e9tant pas en streaming au champ \u00ab source QT \u00bb.",qtsrc:"Source QT",progress:"Progression",sound:"Son",swstretchvalign:"Stretch vertical",swstretchhalign:"Stretch horizontal",swstretchstyle:"Stretch style",scriptcallbacks:"Callback de script","align_top_right":"En haut \u00e0 droite",uimode:"Mode UI",rate:"Taux",playcount:"Compteur",defaultframe:"Image par d\u00e9faut",currentposition:"Position actuelle",currentmarker:"Marqueur actuel",captioningid:"ID sous-titrage",baseurl:"Adresse de base",balance:"Balance",windowlessvideo:"Vid\u00e9o sans fen\u00eatre",stretchtofit:"\u00c9tendre pour adapter la taille",mute:"Muet",invokeurls:"Invoquer URLs",fullscreen:"Plein \u00e9cran",enabled:"Activ\u00e9",autostart:"Lire automatiquement",volume:"Volume",target:"Cible",qtsrcchokespeed:"D\u00e9bit maximum",href:"Href",endtime:"Fin",starttime:"D\u00e9but",enablejavascript:"Activer le JavaScript",correction:"Pas de correction",targetcache:"Cache cible",playeveryframe:"Jouer toutes les images",kioskmode:"Mode kiosque",controller:"Contr\u00f4leur",menu:"Afficher le menu",loop:"Lire en boucle",play:"Lecture automatique",hspace:"Espacement horizontal",vspace:"Espacement vertical","class_name":"Classe",name:"Nom",id:"Id",type:"Type",size:"Dimensions",preview:"Pr\u00e9visualisation","constrain_proportions":"Conserver les proportions",controls:"Contr\u00f4les",numloop:"Nombre de tours",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Variables flash",base:"Base",bgcolor:"Fond",wmode:"WMode",salign:"SAlign",align:"Alignement",scale:"\u00c9chelle",quality:"Qualit\u00e9",shuffle:"Al\u00e9atoire",prefetch:"Pr\u00e9chargement",nojava:"Pas java",maintainaspect:"Maintenir l\'aspect",imagestatus:"Statut de l\'image",center:"Centrer",autogotourl:"Aller automatiquement \u00e0 l\'URL","shockwave_options":"Options Shockwave","rmp_options":"Options Real media player","wmp_options":"Windows media player options","qt_options":"Options Quicktime","flash_options":"Options Flash",hidden:"Cach\u00e9","align_bottom_left":"En bas \u00e0 gauche","align_bottom_right":"En bas \u00e0 droite",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Options audio int\u00e9gr\u00e9es",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"vid\u00e9o","html5_video_options":"Options Vid\u00e9o HTML 5",altsource1:"Source alternative 1",altsource2:"Source alternative 2",preload:"Pr\u00e9chargement",poster:"Poster",source:"Source","html5_audio_options":"Options audio","preload_none":"Ne pas pr\u00e9charger","preload_metadata":"Pr\u00e9charger les m\u00e9tadonn\u00e9es vid\u00e9o","preload_auto":"Laisser le fureteur de l\'utilisateur d\u00e9cider",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/he_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/he_dlg.js deleted file mode 100644 index 4bd005821b7a..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/he_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('he.media_dlg',{list:"\u05e8\u05e9\u05d9\u05de\u05d4",file:"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4\u05e7\u05d5\u05d1\u05e5",advanced:"\u05de\u05ea\u05e7\u05d3\u05dd",general:"\u05db\u05dc\u05dc\u05d9",title:"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05e1\u05e8\u05d8\u05d5\u05df","align_top_left":"\u05e9\u05de\u05d0\u05dc \u05dc\u05de\u05e2\u05dc\u05d4","align_center":"\u05de\u05e8\u05db\u05d6","align_left":"\u05dc\u05e9\u05de\u05d0\u05dc","align_bottom":"\u05dc\u05de\u05d8\u05d4","align_right":"\u05d9\u05de\u05d9\u05df","align_top":"\u05dc\u05de\u05e2\u05dc\u05d4","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",progress:"\u05d4\u05ea\u05e7\u05d3\u05de\u05d5\u05ea",sound:"\u05e6\u05dc\u05d9\u05dc",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch style",scriptcallbacks:"Script callbacks","align_top_right":"\u05d9\u05de\u05d9\u05df \u05dc\u05de\u05e2\u05dc\u05d4",uimode:"\u05de\u05e6\u05d1 \u05ea\u05e6\u05d5\u05d2\u05d4",rate:"\u05e7\u05e6\u05d1",playcount:"\u05de\u05e1\u05e4\u05e8 \u05d4\u05e9\u05de\u05e2\u05d5\u05ea",defaultframe:"\u05e4\u05e8\u05d9\u05d9\u05dd \u05d1\u05e8\u05d9\u05e8\u05ea \u05de\u05d7\u05d3\u05dc",currentposition:"\u05de\u05d9\u05e7\u05d5\u05dd \u05e0\u05d5\u05db\u05d7\u05d9",currentmarker:"\u05e1\u05de\u05df \u05e0\u05d5\u05db\u05d7\u05d9",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless video",stretchtofit:"\u05de\u05ea\u05d7 \u05dc\u05d4\u05ea\u05d0\u05de\u05d4",mute:"\u05d4\u05e9\u05ea\u05e7",invokeurls:"Invoke URLs",fullscreen:"\u05de\u05e1\u05da \u05de\u05dc\u05d0",enabled:"\u05de\u05d5\u05e4\u05e2\u05dc",autostart:"\u05d4\u05ea\u05d7\u05dc \u05d0\u05d5\u05d8\u05d5\u05de\u05d8\u05d9\u05ea",volume:"\u05e2\u05d5\u05e6\u05de\u05d4",target:"\u05de\u05d8\u05e8\u05d4",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"\u05d6\u05de\u05df \u05e1\u05d9\u05d5\u05dd",starttime:"\u05d6\u05de\u05df \u05d4\u05ea\u05d7\u05dc\u05d4",enablejavascript:"\u05d0\u05e4\u05e9\u05e8 JavaScript",correction:"\u05dc\u05dc\u05d0 \u05ea\u05d9\u05e7\u05d5\u05df",targetcache:"Target cache",playeveryframe:"\u05e0\u05d2\u05df \u05db\u05dc \u05e4\u05e8\u05d9\u05d9\u05dd",kioskmode:"Kiosk mode",controller:"Controller",menu:"\u05d4\u05e6\u05d2\u05ea \u05ea\u05e4\u05e8\u05d9\u05d8",loop:"\u05e0\u05d2\u05d9\u05e0\u05d4 \u05de\u05d7\u05d6\u05d5\u05e8\u05d9\u05ea",play:"\u05e0\u05d2\u05d9\u05e0\u05d4 \u05d0\u05d5\u05d8\u05d5\u05de\u05d8\u05d9\u05ea \u05e2\u05dd \u05d4\u05d8\u05e2\u05d9\u05e0\u05d4",hspace:"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05d5\u05e4\u05e7\u05d9",vspace:"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05e0\u05db\u05d9","class_name":"\u05de\u05d7\u05dc\u05e7\u05d4",name:"\u05e9\u05dd",id:"Id",type:"\u05e1\u05d5\u05d2",size:"\u05e8\u05d5\u05d7\u05d1 \u05d5\u05d2\u05d5\u05d1\u05d4",preview:"\u05ea\u05e6\u05d5\u05d2\u05d4 \u05de\u05e7\u05d3\u05d9\u05de\u05d4","constrain_proportions":"\u05e9\u05de\u05d5\u05e8 \u05e2\u05dc \u05e4\u05e8\u05d5\u05e4\u05d5\u05e8\u05e6\u05d9\u05d5\u05ea",controls:"Controls",numloop:"Num loops",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"\u05de\u05e7\u05d5\u05e8",bgcolor:"\u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2",wmode:"WMode",salign:"SAlign",align:"\u05d9\u05d9\u05e9\u05d5\u05e8",scale:"Scale",quality:"\u05d0\u05d9\u05db\u05d5\u05ea \u05d4\u05e1\u05e8\u05d8\u05d5\u05df",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No java",maintainaspect:"Maintain aspect",imagestatus:"Image status",center:"\u05de\u05e8\u05db\u05d6",autogotourl:"Auto goto URL","shockwave_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea Shockwave","rmp_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05e0\u05d2\u05df Real Media","wmp_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05de\u05d3\u05d9\u05d4 \u05e4\u05dc\u05d9\u05d9\u05e8","qt_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea Quicktime","flash_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05e4\u05dc\u05d0\u05e9",hidden:"Hidden","align_bottom_left":"\u05dc\u05de\u05d8\u05d4 \u05de\u05e9\u05de\u05d0\u05dc","align_bottom_right":"\u05dc\u05de\u05d8\u05d4 \u05de\u05d9\u05de\u05d9\u05df",flash:"Flash",quicktime:"quicktime","embedded_audio_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05d0\u05d5\u05d3\u05d9\u05d5 \u05de\u05e9\u05d5\u05dc\u05d1",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05d5\u05d9\u05d3\u05d0\u05d5 HTML5",altsource1:"\u05de\u05e7\u05d5\u05e8 \u05d7\u05dc\u05d5\u05e4\u05d9 1",altsource2:"\u05de\u05e7\u05d5\u05e8 \u05d7\u05dc\u05d5\u05e4\u05d9 2",preload:"Preload",poster:"\u05e4\u05d5\u05e1\u05d8\u05e8",source:"\u05de\u05e7\u05d5\u05e8","html5_audio_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05d0\u05d5\u05d3\u05d9\u05d5","preload_none":"Don\'t Preload","preload_metadata":"\u05d8\u05e2\u05df \u05de\u05d8\u05d4-\u05d8\u05d0\u05d2 \u05dc\u05d5\u05d5\u05d9\u05d3\u05d0\u05d5","preload_auto":"\u05d0\u05ea\u05df \u05dc\u05d3\u05e4\u05d3\u05e4\u05df \u05dc\u05d1\u05d7\u05d5\u05e8",iframe:"iframe",embeddedaudio:"embeddedaudio "}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/it_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/it_dlg.js deleted file mode 100644 index f335edebb3e6..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/it_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('it.media_dlg',{list:"Lista",file:"File/URL",advanced:"Avanzate",general:"Generale",title:"Inserisci/modifica file multimediale","align_top_left":"Alto a sinistra","align_center":"Centro","align_left":"Sinistra","align_bottom":"Basso","align_right":"Destra","align_top":"Alto","qt_stream_warn":"Le risorse rstp \'streamed\' devono essere aggiunte al campo Sorgente QT nella tabella Avanzate.\nSi dovrebbe inserire anche una versione non \'streamed\' al campo Sorgente..",qtsrc:"Sorgente QT",progress:"Avanzamento",sound:"Suono",swstretchvalign:"Tratto V-Allineamento",swstretchhalign:"Tratto H-Allineamento",swstretchstyle:"Stile Tratto",scriptcallbacks:"Script richiamato","align_top_right":"Alto a destra",uimode:"Modalit\u00e0 Interfaccia Utente",rate:"Qualit\u00e0",playcount:"Conteggio esecuzione",defaultframe:"Frame predefinito",currentposition:"Posizione corrente",currentmarker:"Indicatore corrente",captioningid:"Didascalia dell\'Id",baseurl:"URL base",balance:"Bilanciamento",windowlessvideo:"Video senza finestra",stretchtofit:"Adatta dimensioni",mute:"Muto",invokeurls:"Invoca URLs",fullscreen:"Tutto schermo",enabled:"Abilitato",autostart:"Avvio automatico",volume:"Volume",target:"Target",qtsrcchokespeed:"Velocit\u00e0 cursore",href:"Href",endtime:"Ora fine",starttime:"Ora inizio",enablejavascript:"Abilita JavaScript",correction:"Nessuna Correzione",targetcache:"Cache del target",playeveryframe:"Esegui ogni frame",kioskmode:"Modalit\u00e0 Kiosk",controller:"Controller",menu:"Mostra menu",loop:"Riproduzione ciclica",play:"Esecuzione automatica",hspace:"H-Spazio",vspace:"V-Spazio","class_name":"Classe",name:"Nome",id:"Id",type:"Tipo",size:"Dimensioni",preview:"Anteprima","constrain_proportions":"Mantieni Proporzioni",controls:"Controlli",numloop:"Numero Cicli",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Sfondo",wmode:"WMode",salign:"SAlign",align:"Allineamento",scale:"Scala",quality:"Qualit\u00e0",shuffle:"Shuffle",prefetch:"Precaricamento",nojava:"No java",maintainaspect:"Mantieni Aspetto",imagestatus:"Stato Immagine",center:"Centra",autogotourl:"Vai a URL automatico","shockwave_options":"Opzioni Shockwave","rmp_options":"Opzioni Real media player","wmp_options":"Opzioni Windows media player","qt_options":"Opzioni Quicktime","flash_options":"Opzioni Flash",hidden:"Nascosto","align_bottom_left":"Basso a Sinistra","align_bottom_right":"Basso a Destra",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Opzioni Audio Embedded",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Opzioni Video HTML5",altsource1:"Sorgente alternativa 1",altsource2:"Sorgente alternativa 2",preload:"Precarica",poster:"Poster",source:"Sorgente","html5_audio_options":"Opzioni Audio","preload_none":"Non Precaricare","preload_metadata":"Precarica i metadati video","preload_auto":"Lascia decidere al browser dell\'utente",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ja_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ja_dlg.js deleted file mode 100644 index 9752ca22e580..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ja_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ja.media_dlg',{list:"\u4e00\u89a7",file:"\u30d5\u30a1\u30a4\u30eb\u3084URL",advanced:"\u8a73\u7d30",general:"\u4e00\u822c",title:"\u57cb\u3081\u8fbc\u307f\u30e1\u30c7\u30a3\u30a2\u306e\u633f\u5165\u3084\u7de8\u96c6","align_top_left":"\u5de6\u4e0a","align_center":"\u4e2d\u592e","align_left":"\u5de6","align_bottom":"\u4e0b","align_right":"\u53f3","align_top":"\u4e0a","qt_stream_warn":"RTSP\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u30ea\u30bd\u30fc\u30b9\u3092\u300c\u9ad8\u5ea6\u300d\u306e\u30bf\u30d6\u306e\u300cQT\u306e\u30bd\u30fc\u30b9\u300d\u6b04\u306b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u307e\u305f\u3001\u300c\u30bd\u30fc\u30b9\u300d\u6b04\u306b\u306f\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u3067\u306f\u306a\u3044\u30d0\u30fc\u30b8\u30e7\u30fc\u30f3\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002",qtsrc:"QT\u306e\u30bd\u30fc\u30b9",progress:"\u9032\u5c55",sound:"\u30b5\u30a6\u30f3\u30c9",swstretchvalign:"\u5782\u76f4\u306e\u914d\u7f6e",swstretchhalign:"\u6c34\u5e73\u306e\u914d\u7f6e",swstretchstyle:"\u4f38\u7e2e\u306e\u30b9\u30bf\u30a4\u30eb",scriptcallbacks:"\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af","align_top_right":"\u53f3\u4e0a",uimode:"UI\u3092\u8868\u793a\u3059\u308b\u30e2\u30fc\u30c9",rate:"\u518d\u751f\u30ec\u30fc\u30c8",playcount:"\u518d\u751f\u56de\u6570",defaultframe:"\u521d\u671f\u72b6\u614b\u306e\u30d5\u30ec\u30fc\u30e0",currentposition:"\u518d\u751f\u4f4d\u7f6e(\u79d2\u5358\u4f4d)",currentmarker:"\u30de\u30fc\u30ab\u30fc\u756a\u53f7",captioningid:"\u30ad\u30e3\u30d7\u30b7\u30e7\u30f3\u8868\u793a\u8981\u7d20ID",baseurl:"\u57fa\u6e96\u306eURL",balance:"\u30b9\u30c6\u30ec\u30aa\u306e\u30d0\u30e9\u30f3\u30b9",windowlessvideo:"\u30a6\u30a3\u30f3\u30c9\u30a6\u306a\u3057\u306e\u52d5\u753b",stretchtofit:"\u5408\u308f\u305b\u3066\u62e1\u5927",mute:"\u6d88\u97f3",invokeurls:"URL\u3092\u958b\u304f",fullscreen:"\u5168\u753b\u9762",enabled:"\u6709\u52b9",autostart:"\u81ea\u52d5\u518d\u751f",volume:"\u97f3\u91cf",target:"\u30bf\u30fc\u30b2\u30c3\u30c8",qtsrcchokespeed:"\u518d\u751f\u30c7\u30fc\u30bf\u30ec\u30fc\u30c8",href:"\u30ea\u30f3\u30af\u5148URL",endtime:"\u7d42\u4e86\u6642\u9593",starttime:"\u958b\u59cb\u6642\u9593",enablejavascript:"JavaScript\u3092\u6709\u52b9",correction:"\u8a02\u6b63\u306a\u3057",targetcache:"\u30bf\u30fc\u30b2\u30c3\u30c8\u3092\u30ad\u30e3\u30c3\u30b7\u30e5",playeveryframe:"\u3059\u3079\u3066\u306e\u30d5\u30ec\u30fc\u30e0\u3092\u518d\u751f",kioskmode:"Kiosk\u30e2\u30fc\u30c9",controller:"\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u8868\u793a",menu:"\u30e1\u30cb\u30e5\u30fc\u3092\u8868\u793a",loop:"\u7e70\u308a\u8fd4\u3057",play:"\u81ea\u52d5\u518d\u751f",hspace:"\u5de6\u53f3\u306e\u4f59\u767d",vspace:"\u4e0a\u4e0b\u306e\u4f59\u767d","class_name":"\u30af\u30e9\u30b9",name:"\u540d\u524d",id:"ID",type:"\u30bf\u30a4\u30d7",size:"\u5bf8\u6cd5",preview:"\u30d7\u30ec\u30d3\u30e5\u30fc","constrain_proportions":"\u7e26\u6a2a\u6bd4\u3092\u7dad\u6301",controls:"\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u8868\u793a",numloop:"\u7e70\u308a\u8fd4\u3057\u306e\u56de\u6570",console:"\u30b3\u30f3\u30bd\u30fc\u30eb",cache:"\u30ad\u30e3\u30c3\u30b7\u30e5",autohref:"\u81ea\u52d5\u8aad\u8fbc",liveconnect:"SWLiveConnect\u5c5e\u6027",flashvars:"Flash Vars",base:"Base",bgcolor:"\u80cc\u666f\u8272",wmode:"WMode",salign:"SAlign",align:"\u914d\u7f6e",scale:"\u4f38\u7e2e",quality:"\u54c1\u8cea",shuffle:"\u30b7\u30e3\u30c3\u30d5\u30eb",prefetch:"\u5148\u8aad\u307f",nojava:"Java\u3092\u7981\u6b62",maintainaspect:"\u7e26\u6a2a\u6bd4\u306e\u7dad\u6301",imagestatus:"\u753b\u50cf\u306e\u72b6\u614b",center:"\u4e2d\u592e\u63c3\u3048",autogotourl:"URL\u306b\u81ea\u52d5\u79fb\u52d5","shockwave_options":"Shockwave\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","rmp_options":"Real media player\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","wmp_options":"Windows media player\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","qt_options":"Quicktime\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","flash_options":"Flash\u306e\u30aa\u30d7\u30b7\u30e7\u30f3",hidden:"\u975e\u8868\u793a","align_bottom_left":"\u5de6\u4e0b","align_bottom_right":"\u53f3\u4e0b",flash:"flash",quicktime:"quicktime","embedded_audio_options":"\u57cb\u3081\u8fbc\u307fAudio\u306e\u30aa\u30d7\u30b7\u30e7\u30f3",windowsmedia:"Windows\u30e1\u30c7\u30a3\u30a2",realmedia:"realmedia",shockwave:"shockwave",audio:"\u30aa\u30fc\u30c7\u30a3\u30aa",video:"\u52d5\u753b","html5_video_options":"HTML5 Video\u306e\u30aa\u30d7\u30b7\u30e7\u30f3",altsource1:"\u4ee3\u66ff\u30bd\u30fc\u30b91",altsource2:"\u4ee3\u66ff\u30bd\u30fc\u30b92",preload:"preload\u5c5e\u6027",poster:"poster\u5c5e\u6027",source:"HTML","html5_audio_options":"Audio \u30aa\u30d7\u30b7\u30e7\u30f3","preload_none":"\u5148\u8aad\u307f\u3057\u306a\u3044","preload_metadata":"\u52d5\u753b\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u5148\u8aad\u307f","preload_auto":"\u30e6\u30fc\u30b6\u30fc\u306e\u30d6\u30e9\u30a6\u30b6\u30fc\u306b\u5f93\u3046",iframe:"iframe",embeddedaudio:"\u57cb\u3081\u8fbc\u307f\u97f3\u58f0"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ko_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ko_dlg.js deleted file mode 100644 index 878337af85d7..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ko_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ko.media_dlg',{list:"\ubaa9\ub85d",file:"\ud30c\uc77c/URL",advanced:"\uace0\uae09",general:"\uc77c\ubc18",title:"\ubbf8\ub514\uc5b4\uc758 \uc0bd\uc785/\ud3b8\uc9d1",align_top_left:"Top left",align_center:"Center",align_left:"Left",align_bottom:"Bottom",align_right:"Right",align_top:"Top",qt_stream_warn:"Streamed rtsp resources should be added to the QT Src field under the advanced tab.nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch style",scriptcallbacks:"Script callbacks",align_top_right:"Top right",uimode:"UI Mode",rate:"Rate",playcount:"Play count",defaultframe:"Default frame",currentposition:"Current position",currentmarker:"Current marker",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless video",stretchtofit:"Stretch to fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Fullscreen",enabled:"Enabled",autostart:"Auto start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"End time",starttime:"Start time",enablejavascript:"JavaScript\ub97c \ud5c8\uac00",correction:"No correction",targetcache:"Target cache",playeveryframe:"Play every frame",kioskmode:"Kiosk mode",controller:"Controller",menu:"\uba54\ub274 \ud45c\uc2dc",loop:"\uc5f0\uc18d \uc7ac\uc0dd",play:"\uc790\ub3d9 \uc7ac\uc0dd",hspace:"\uc88c\uc6b0 \uc5ec\ubc31",vspace:"\uc0c1\ud558 \uc5ec\ubc31",class_name:"Class",name:"Name",id:"Id",type:"\ud0c0\uc785",size:"\ud06c\uae30",preview:"\ubbf8\ub9ac\ubcf4\uae30",constrain_proportions:"\uc885\ud6a1\ube44 \uc720\uc9c0",controls:"Controls",numloop:"Num loops",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"\uc2a4\ucf00\uc77c",quality:"\ud488\uc9c8",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No java",maintainaspect:"Maintain aspect",imagestatus:"Image status",center:"Center",autogotourl:"Auto goto URL",shockwave_options:"Shockwave options",rmp_options:"Real media player options",wmp_options:"Windows media player options",qt_options:"Quicktime options",flash_options:"Flash options",hidden:"Hidden",align_bottom_left:"Bottom left",align_bottom_right:"Bottom right",flv_options:"Flash video options",flv_scalemode:"Scale mode",flv_buffer:"Buffer",flv_startimage:"Start image",flv_starttime:"Start time",flv_defaultvolume:"Default volumne",flv_hiddengui:"Hidden GUI",flv_autostart:"Auto start",flv_loop:"Loop",flv_showscalemodes:"Show scale modes",flv_smoothvideo:"Smooth video",flv_jscallback:"JS Callback"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/nl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/nl_dlg.js deleted file mode 100644 index 68ae6b008867..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/nl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('nl.media_dlg',{list:"Lijst",file:"Bestand/URL",advanced:"Geavanceerd",general:"Algemeen",title:"Media invoegen/bewerken","align_top_left":"Linksboven","align_center":"Centreren","align_left":"Links","align_bottom":"Onder","align_right":"Rechts","align_top":"Boven","qt_stream_warn":"Gestreamde RTSP bronnen dienen op het tabblad geavanceerd bij Quicktime bron te worden opgegeven.\nDe niet-gestreamde versie kan dan bij het tabblad algemeen worden opgegeven.",qtsrc:"Quicktime bron",progress:"Voortgang",sound:"Geluid",swstretchvalign:"V-Schaal",swstretchhalign:"H-Schaal",swstretchstyle:"Schaal",scriptcallbacks:"Script callbacks","align_top_right":"Rechtsboven",uimode:"UI Modus",rate:"Snelheid",playcount:"Afspeelteller",defaultframe:"Standaard frame",currentposition:"Huidige positie",currentmarker:"Huidige markering",captioningid:"Ondertiteling id",baseurl:"Basis URL",balance:"Balans",windowlessvideo:"Video zonder venster",stretchtofit:"Passend maken",mute:"Dempen",invokeurls:"URLs laden",fullscreen:"Volledig scherm",enabled:"Ingeschakeld",autostart:"Automatisch afspelen",volume:"Volume",target:"Doel",qtsrcchokespeed:"Chokesnelheid",href:"Href",endtime:"Eindtijd",starttime:"Starttijd",enablejavascript:"JavaScript Inschakelen",correction:"Geen correctie",targetcache:"Doelcache",playeveryframe:"Elk frame afspelen",kioskmode:"Kioskmodus",controller:"Controller",menu:"Menu weergeven",loop:"Herhalen",play:"Automatisch afspelen",hspace:"H-Ruimte",vspace:"V-Ruimte","class_name":"Klasse",name:"Naam",id:"Id",type:"Type",size:"Afmetingen",preview:"Voorbeeld","constrain_proportions":"Verhouding bewaren",controls:"Bediening",numloop:"Aantal herhalingen",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Variabelen",base:"Basis",bgcolor:"Achtergrond",wmode:"WMode",salign:"Schaaluitlijning",align:"Uitlijning",scale:"Schaal",quality:"Kwaliteit",shuffle:"Willekeurige volgorde",prefetch:"Voorladen",nojava:"Geen Java",maintainaspect:"Verhouding bewaren",imagestatus:"Afbeeldingstatus",center:"Centreren",autogotourl:"Automatisch naar URL","shockwave_options":"Shockwave opties","rmp_options":"Real Media Player Opties","wmp_options":"Windows Media Player Opties","qt_options":"Quicktime opties","flash_options":"Flash opties",hidden:"Verborgen","align_bottom_left":"Linksonder","align_bottom_right":"Rechtsonder",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Ge\u00efntegreerd Geluid Opties",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"geluid",video:"video","html5_video_options":"HTML5 Video Opties",altsource1:"Alternatieve bron 1",altsource2:"Alternatieve bron 2",preload:"Voorladen",poster:"Poster",source:"Bron","html5_audio_options":"Audio Opties","preload_none":"Niet voorladen","preload_metadata":"Video metadata voorladen","preload_auto":"Laat browser beslissen",iframe:"iframe",embeddedaudio:"ge\u00efntegreerd geluid"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/no_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/no_dlg.js deleted file mode 100644 index 97029c4e2241..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/no_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('no.media_dlg',{list:"Liste",file:"Fil/URL",advanced:"Avansert",general:"Generelt",title:"Sett inn/rediger innebygd objekt","align_top_left":"Topp venstre","align_center":"Midten","align_left":"Venstre","align_bottom":"Bunn","align_right":"H\u00f8yre","align_top":"Topp","qt_stream_warn":"Streamede rtsp ressurser b\u00f8r legges til QT Src-feltet under fanen avansert.\nDu b\u00f8r ogs\u00e5 legge til en ikke-streamet versjon i src-feltet.",qtsrc:"QT Src",progress:"Fremdrift",sound:"Lyd",swstretchvalign:"Strekk V-justering",swstretchhalign:"Strekk H-justering",swstretchstyle:"Strekk stil",scriptcallbacks:"Skriptreferanser","align_top_right":"\u00d8verst til h\u00f8yre",uimode:"UI-modus",rate:"Rate",playcount:"Teller",defaultframe:"Standard ramme",currentposition:"Aktiv posisjon",currentmarker:"Aktiv mark\u00f8r",captioningid:"Fange opp id",baseurl:"Utgangsadresse (URL)",balance:"Balanse",windowlessvideo:"Video uten vindu",stretchtofit:"Strekk for \u00e5 tilpasse",mute:"Dempe",invokeurls:"Aktiver URLer",fullscreen:"Fullskjerm",enabled:"Aktivert",autostart:"Autostart",volume:"Volum",target:"M\u00e5l",qtsrcchokespeed:"Choke-hastighet",href:"Href",endtime:"Stopptid",starttime:"Starttid",enablejavascript:"Tillat Javaskript",correction:"Ingen korreksjon",targetcache:"M\u00e5l-mellomlagring",playeveryframe:"Spill hver ramme",kioskmode:"Kiosk-modus",controller:"Kontroller",menu:"Vis meny",loop:"L\u00f8kke",play:"Autostart",hspace:"H-avstand",vspace:"V-avstand","class_name":"Klasse",name:"Navn",id:"Id",type:"Type",size:"Dimmensjoner",preview:"Forh\u00e5ndsvisning","constrain_proportions":"Behold proporsjoner",controls:"Kontroller",numloop:"Antall gjennomganger",console:"Konsoll",cache:"Mellomlager",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash-variabler",base:"Base",bgcolor:"Bakgrunn",wmode:"W-modus",salign:"S-justering",align:"Justering",scale:"Skala",quality:"Kvalitet",shuffle:"Mikse",prefetch:"Hente p\u00e5 forh\u00e5nd",nojava:"Ingen Java",maintainaspect:"Behold st\u00f8rrelsesforhold",imagestatus:"Bildestatus",center:"Midtstill",autogotourl:"Auto g\u00e5-til URL","shockwave_options":"Shockwave egenskaper","rmp_options":"Real Media Player egenskaper","wmp_options":"Windows Media Player egenskaper","qt_options":"Quicktime egenskaper","flash_options":"Flash egenskaper",hidden:"Skjult","align_bottom_left":"Nederst til venste","align_bottom_right":"Nederst til h\u00f8yre",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Alternativer for innebygget lydklipp",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"lyd",video:"video","html5_video_options":"HTML5-videovalg",altsource1:"Alternativ kilde 1",altsource2:"Alternativ kilde 2",preload:"Forh\u00e5ndsvis",poster:"Poster",source:"Kilde","html5_audio_options":"Lydegenskaper","preload_none":"Ikke hent p\u00e5 forh\u00e5nd","preload_metadata":"Hent videometadata p\u00e5 forh\u00e5nd","preload_auto":"La brukerens nettleser avgj\u00f8re",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/pl_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/pl_dlg.js deleted file mode 100644 index 9e054b21da6c..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/pl_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pl.media_dlg',{list:"Lista",file:"Plik/URL",advanced:"Zaawansowane",general:"G\u0142\u00f3wne",title:"Wstaw/Edytuj wbudowane media","align_top_left":"G\u00f3rny lewy","align_center":"\u015arodek","align_left":"Lewo","align_bottom":"D\u00f3\u0142","align_right":"Prawo","align_top":"G\u00f3ra","qt_stream_warn":"Emitowane \u017ar\u00f3d\u0142a rtsp powinny by\u0107 dodane do pola QT Src w zak\u0142adce zaawansowane.nPowiniene\u015b r\u00f3wnie\u017c doda\u0107 niestrumieniow\u0105 wersj\u0119 do pola Src.",qtsrc:"QT Src",progress:"Post\u0119p",sound:"D\u017awi\u0119k",swstretchvalign:"Wyr\u00f3wnaj w pionie",swstretchhalign:"Wyr\u00f3wnaj w poziomie",swstretchstyle:"Styl rozci\u0105gania",scriptcallbacks:"Funkcje zwrotne skryptu","align_top_right":"G\u00f3rny prawy",uimode:"Tryb UI",rate:"Tempo",playcount:"Ilo\u015b\u0107 odtworze\u0144",defaultframe:"Domy\u015blna ramka",currentposition:"Aktualna pozycja",currentmarker:"Aktualny znacznik",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balans",windowlessvideo:"Wideo bez okienka",stretchtofit:"Rozci\u0105gnij aby dopasowa\u0107",mute:"Wycisz",invokeurls:"Odwo\u0142aj si\u0119 do URLi",fullscreen:"Pe\u0142ny ekran",enabled:"Aktywny",autostart:"Auto start",volume:"G\u0142o\u015bno\u015b\u0107",target:"Cel",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"Ko\u0144cowy czas",starttime:"Pocz\u0105tkowy czas",enablejavascript:"W\u0142\u0105cz JavaScript",correction:"Bez korekcji",targetcache:"Target cache",playeveryframe:"Odtwarzaj ka\u017cd\u0105 ramk\u0119",kioskmode:"Tryb kiosku",controller:"Kontroler",menu:"Poka\u017c menu",loop:"Zap\u0119tlenie",play:"Autoodtwarzanie",hspace:"H-Space",vspace:"V-Space","class_name":"Klasa",name:"Nazwa",id:"Id",type:"Typ",size:"Wymiary",preview:"Podgl\u0105d","constrain_proportions":"Zachowaj proporcje",controls:"Controls",numloop:"Liczba powt\u00f3rze\u0144",console:"Konsola",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Baza",bgcolor:"T\u0142o",wmode:"WMode",salign:"SAlign",align:"Wyr\u00f3wnaj",scale:"Skala",quality:"Jako\u015b\u0107",shuffle:"Losuj",prefetch:"Prze\u0142aduj",nojava:"Bez javy",maintainaspect:"Utrzymaj aspekt",imagestatus:"Obraz statusu",center:"Wy\u015brodkuj",autogotourl:"Automatycznie przejd\u017a pod adres","shockwave_options":"Opcje Shockwave","rmp_options":"Opcje Real media player","wmp_options":"Opcje Windows media player","qt_options":"Opcje Quicktime","flash_options":"Opcje flasha",hidden:"Ukryty","align_bottom_left":"Dolny lewy","align_bottom_right":"Dolny prawy",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Opcje Embedded Audio",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Opcje HTML5 Video",altsource1:"Alternatywne \u017ar\u00f3d\u0142o 1",altsource2:"Alternatywne \u017ar\u00f3d\u0142o 2",preload:"Prze\u0142aduj",poster:"Obraz",source:"\u0179r\u00f3d\u0142o","html5_audio_options":"Opcje audio","preload_none":"Nie \u0142\u0105duj wst\u0119pnie","preload_metadata":"\u0141aduj wst\u0119pnie metadane video","preload_auto":"Pozw\u00f3l zdecydowa\u0107 przegl\u0105darce u\u017cytkownika",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/pt_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/pt_dlg.js deleted file mode 100644 index f578cd750fc7..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/pt_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('pt.media_dlg',{list:"Lista",file:"Arquivo/URL",advanced:"Avan\u00e7ado",general:"Geral",title:"Inserir/Editar m\u00eddia embutida","align_top_left":"Topo esquerda","align_center":"Centro","align_left":"Esquerda","align_bottom":"Abaixo","align_right":"Direita","align_top":"Topo","qt_stream_warn":"Fluxos de recursos RTSP devem ser acrescentados ao campo QT Src no Modo Avan\u00e7ado.\nUma vers\u00e3o sem fluxo tamb\u00e9m deve ser acrescentada ao campo Src.",qtsrc:"QT Src",progress:"Progresso",sound:"Som",swstretchvalign:"For\u00e7ar V-Alinhamento",swstretchhalign:"For\u00e7ar H-Alinhamento",swstretchstyle:"For\u00e7ar Estilo",scriptcallbacks:"Retornos de chamada de script","align_top_right":"Topo direita",uimode:"Modo UI",rate:"Taxa",playcount:"Contagem de ouvintes",defaultframe:"Frame padr\u00e3o",currentposition:"Posi\u00e7\u00e3o atual",currentmarker:"Marcador atual",captioningid:"Id de legenda",baseurl:"URL Base",balance:"Stereo",windowlessvideo:"V\u00eddeo sem janela",stretchtofit:"Estender",mute:"Mudo",invokeurls:"Chamar URLs",fullscreen:"Tela inteira",enabled:"Ativado",autostart:"Execu\u00e7\u00e3o autom\u00e1tica",volume:"Volume",target:"Alvo",qtsrcchokespeed:"Diminuir Velocidade",href:"Link",endtime:"Hora do fim",starttime:"Hora de in\u00edcio",enablejavascript:"Permitir JavaScript",correction:"Sem correc\u00e7\u00f5es",targetcache:"Cache alvo",playeveryframe:"Executar todas as frames",kioskmode:"Modo Kiosk",controller:"Controlador",menu:"Mostrar menu",loop:"Repeti\u00e7\u00e3o autom\u00e1tica",play:"Execu\u00e7\u00e3o autom\u00e1tica",hspace:"Espa\u00e7o horizontal",vspace:"Espa\u00e7o vertical","class_name":"Classe",name:"Nome",id:"ID",type:"Tipo",size:"Dimens\u00f5es",preview:"Previs\u00e3o","constrain_proportions":"Manter propor\u00e7\u00f5es",controls:"Controles",numloop:"Repeti\u00e7\u00f5es",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Fundo",wmode:"WMode",salign:"SAlign",align:"Alinhamento",scale:"Escala",quality:"Qualidade",shuffle:"Aleat\u00f3rio",prefetch:"Pr\u00e9-buscar",nojava:"Sem Java",maintainaspect:"Manter aspecto",imagestatus:"Status da imagem",center:"Centro",autogotourl:"Auto abrir URL","shockwave_options":"Op\u00e7\u00f5es Shockwave","rmp_options":"Op\u00e7\u00f5es Real Media Player","wmp_options":"Op\u00e7\u00f5es Windows Media Player","qt_options":"Op\u00e7\u00f5es Quicktime","flash_options":"Op\u00e7\u00f5es Flash",hidden:"Oculto","align_bottom_left":"Abaixo esquerda","align_bottom_right":"Abaixo direita",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Op\u00e7\u00f5es de \u00c1udio Embutido",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockware",audio:"\u00e1udio",video:"v\u00eddeo","html5_video_options":"Op\u00e7\u00f5es de v\u00eddeo HTML5",altsource1:"C\u00f3digo alternativo 1",altsource2:"C\u00f3digo alternativo 2",preload:"Pr\u00e9-carregar",poster:"Poster",source:"Fonte","html5_audio_options":"Op\u00e7\u00f5es de Audio","preload_none":"N\u00e3o Pr\u00e9-carregar","preload_metadata":"Pr\u00e9-carregar metadata de v\u00eddeo","preload_auto":"Deixar que navegador do usu\u00e1rio decida",iframe:"iframe",embeddedaudio:"\u00e1udio embutido"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ru_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ru_dlg.js deleted file mode 100644 index 62e7a527958c..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/ru_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('ru.media_dlg',{list:"\u0421\u043f\u0438\u0441\u043e\u043a",file:"\u0410\u0434\u0440\u0435\u0441",advanced:"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e",general:"\u041e\u0431\u0449\u0435\u0435",title:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043b\u0438\u043f\u0430","align_top_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_center":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","qt_stream_warn":"\u041f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0435 rtsp \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432 \u043f\u043e\u043b\u0435 QT Src.",qtsrc:"QT Src",progress:"\u041f\u0440\u043e\u0433\u0440\u0435\u0441\u0441",sound:"\u0417\u0432\u0443\u043a",swstretchvalign:"\u0412\u0435\u0440. \u0432\u044b\u0440-\u0435 \u0440\u0430\u0441\u0442\u044f\u0436\u0435\u043d\u0438\u044f",swstretchhalign:"\u0413\u043e\u0440. \u0432\u044b\u0440-\u0435 \u0440\u0430\u0441\u0442\u044f\u0436\u0435\u043d\u0438\u044f",swstretchstyle:"\u0421\u0442\u0438\u043b\u044c \u0440\u0430\u0441\u0442\u044f\u0436\u0435\u043d\u0438\u0435",scriptcallbacks:"\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430","align_top_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e",uimode:"\u0420\u0435\u0436\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430",rate:"\u0420\u0435\u0439\u0442\u0438\u043d\u0433",playcount:"\u0429\u0435\u0442\u0447\u0438\u043a \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0439",defaultframe:"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u0430\u0434\u0440",currentposition:"\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f",currentmarker:"\u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u0430\u0440\u043a\u0435\u0440",captioningid:"\u0418\u043c\u044f \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u043e\u0432",baseurl:"\u0411\u0430\u0437\u043e\u0440\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441",balance:"\u0411\u0430\u043b\u0430\u043d\u0441",windowlessvideo:"\u041e\u043a\u043e\u043d\u043d\u043e\u0435 \u0432\u0438\u0434\u0435\u043e",stretchtofit:"\u041f\u043e\u0434 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u043a\u043d\u0430",mute:"\u0411\u0435\u0437 \u0437\u0432\u0443\u043a\u0430",invokeurls:"\u0412\u044b\u0437\u0432\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441",fullscreen:"\u041d\u0430 \u0432\u0435\u0441\u044c \u044d\u043a\u0440\u0430\u043d",enabled:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e",autostart:"\u0410\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a",volume:"\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c",target:"\u0426\u0435\u043b\u044c",qtsrcchokespeed:"Choke speed",href:"\u0421\u0441\u044b\u043b\u043a\u0430",endtime:"\u0412\u0440\u0435\u043c\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f",starttime:"\u0412\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430",enablejavascript:"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c JavaScript",correction:"\u0411\u0435\u0437 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438",targetcache:"\u041a\u044d\u0448 \u0446\u0435\u043b\u0438",playeveryframe:"\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u0434\u0440",kioskmode:"\u0420\u0435\u0436\u0438\u043c \u043a\u0438\u043e\u0441\u043a",controller:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",menu:"\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u044e",loop:"\u041f\u043e\u0432\u0442\u043e\u0440",play:"\u0410\u0432\u0442\u0437\u0430\u043f\u0443\u0441\u043a",hspace:"\u0413\u043e\u0440. \u043e\u0442\u0441\u0442\u0443\u043f",vspace:"\u0412\u0435\u0440\u0442. \u043e\u0442\u0441\u0442\u0443\u043f","class_name":"\u041a\u043b\u0430\u0441\u0441",name:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435",id:"\u0418\u043c\u044f",type:"\u0422\u0438\u043f",size:"\u0420\u0430\u0437\u043c\u0435\u0440\u044b",preview:"\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440","constrain_proportions":"\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0438",controls:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",numloop:"\u041f\u043e\u0432\u0442\u043e\u0440\u044b",console:"\u041a\u043e\u043d\u0441\u043e\u043b\u044c",cache:"\u041a\u044d\u0448",autohref:"\u0410\u0432\u0442\u043e-\u0441\u0441\u044b\u043b\u043a\u0430",liveconnect:"SWLiveConnect",flashvars:"Flash \u043a\u043e\u043c\u0430\u043d\u0434\u044b",base:"Base",bgcolor:"\u0424\u043e\u043d",wmode:"\u041e\u043a\u043d\u043e",salign:"\u0412\u044b\u0440-\u0435",align:"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",scale:"\u041e\u0431\u043b\u0430\u0441\u0442\u044c",quality:"\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e",shuffle:"\u0412 \u0440\u0430\u0437\u0431\u0440\u043e\u0441",prefetch:"\u0423\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0449\u0430\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0430",nojava:"\u0411\u0435\u0437 Java",maintainaspect:"\u0417\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440",imagestatus:"\u0421\u0442\u0430\u0442\u0443\u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",center:"\u0426\u0435\u043d\u0442\u0440",autogotourl:"\u0410\u0432\u0442\u043e\u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441","shockwave_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Shockwave","rmp_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Real Media","wmp_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Windows Media","qt_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Quicktime","flash_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Flash",hidden:"\u0421\u043a\u0440\u044b\u0442\u044b\u0439","align_bottom_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_bottom_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e",flash:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Flash \u0444\u0430\u0439\u043b\u0430",quicktime:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Quick Time \u0444\u0430\u0439\u043b\u0430","embedded_audio_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u043d\u0435\u0434\u0440\u0451\u043d\u043d\u043e\u0433\u043e \u0430\u0443\u0434\u0438\u043e",windowsmedia:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Windows Media \u0444\u0430\u0439\u043b\u0430",realmedia:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Real Media \u0444\u0430\u0439\u043b\u0430",shockwave:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Shockwave \u0444\u0430\u0439\u043b\u0430",audio:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 HTML5 \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430",video:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 HTML5 \u0432\u0438\u0434\u0435\u043e \u0444\u0430\u0439\u043b\u0430","html5_video_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b HTML5 Video",altsource1:"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a 1",altsource2:"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a 2",preload:"\u041f\u0440\u0435\u0434\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430",poster:"\u041f\u043e\u0441\u0442\u0435\u0440",source:"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a","html5_audio_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0430\u0443\u0434\u0438\u043e","preload_none":"\u0411\u0435\u0437 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438","preload_metadata":"\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0438\u0434\u0435\u043e","preload_auto":"\u041d\u0430 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430",iframe:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441 \u0432 IFrame",embeddedaudio:"\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0417\u0432\u0443\u043a"}); diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/sv_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/sv_dlg.js deleted file mode 100644 index 4f71780a9615..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/sv_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('sv.media_dlg',{list:"Lista",file:"Fil/URL",advanced:"Avancerat",general:"Generellt",title:"Infoga/redigera inb\u00e4ddad media","align_top_left":"Top left","align_center":"Center","align_left":"V\u00e4nster","align_bottom":"Botten","align_right":"H\u00f6ger","align_top":"Toppen","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",progress:"Progress",sound:"Ljud",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch style",scriptcallbacks:"Script callbacks","align_top_right":"Top right",uimode:"UI Mode",rate:"Rate",playcount:"Play count",defaultframe:"Default frame",currentposition:"Current position",currentmarker:"Current marker",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless video",stretchtofit:"Stretch to fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Fullsk\u00e4rm",enabled:"Aktiverad",autostart:"Starta automatiskt",volume:"Volym",target:"M\u00e5l",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"Slut tid",starttime:"Start tid",enablejavascript:"Aktivera JavaScript",correction:"No correction",targetcache:"Target cache",playeveryframe:"Spela varje bildruta",kioskmode:"Kiosk mode",controller:"Controller",menu:"Visa menyn",loop:"Loopa",play:"Spela upp automatiskt",hspace:"H-Space",vspace:"V-Space","class_name":"Klass",name:"Namn",id:"Id",type:"Typ",size:"Dimensioner",preview:"F\u00f6rhandsvisning","constrain_proportions":"Bibeh\u00e5ll proportionerna",controls:"Controls",numloop:"Num loops",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Bakgrundsf\u00e4rg",wmode:"WMode",salign:"SAlign",align:"Justera",scale:"Skala",quality:"Kvalit\u00e9",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No java",maintainaspect:"Maintain aspect",imagestatus:"Bild status",center:"Center",autogotourl:"Auto goto URL","shockwave_options":"Inst\u00e4llningar f\u00f6r Shockwave","rmp_options":"Real media player options","wmp_options":"Windows media player options","qt_options":"Quicktime options","flash_options":"Flash options",hidden:"G\u00f6md","align_bottom_left":"Bottom left","align_bottom_right":"Bottom right",flash:"flash",quicktime:"quicktime ","embedded_audio_options":"Inst\u00e4llningar f\u00f6r inb\u00e4ddatljud",windowsmedia:"windowsmedia ",realmedia:"realmedia ",shockwave:"shockwave ",audio:"ljud",video:"video","html5_video_options":"HTML5 Filmegenskaper",altsource1:"Alternativk\u00e4lla 1",altsource2:"Alternativk\u00e4lla 2",preload:"F\u00f6rladda",poster:"Poster",source:"K\u00e4lla","html5_audio_options":"Ljudinst\u00e4llningar","preload_none":"F\u00f6rladda inte","preload_metadata":"F\u00f6rladda metadata","preload_auto":"L\u00e5t webbl\u00e4saren v\u00e4lja",iframe:"iframe",embeddedaudio:"inb\u00e4ddat ljud"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/zh_dlg.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/zh_dlg.js deleted file mode 100644 index 273a48f0c8e3..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/langs/zh_dlg.js +++ /dev/null @@ -1 +0,0 @@ -tinyMCE.addI18n('zh-cn.media_dlg',{list:"\u5217\u8868",file:"\u6587\u4ef6/URL",advanced:"\u9ad8\u7ea7",general:"\u666e\u901a",title:"\u63d2\u5165/\u7f16\u8f91 \u5d4c\u5165\u5f0f\u5a92\u4f53","align_top_left":"\u5de6\u4e0a","align_center":"\u5c45\u4e2d","align_left":"\u5c45\u5de6","align_bottom":"\u5c45\u4e0b","align_right":"\u5c45\u53f3","align_top":"\u5c45\u4e0a","qt_stream_warn":"\u6d41\u5a92\u4f53RTSP\u8d44\u6e90\u5e94\u6dfb\u52a0\u5230\u9ad8\u7ea7\u9009\u9879\u7684QT\u8d44\u6e90\u4e2d\u3002n\u540c\u65f6\uff0c\u60a8\u4e5f\u53ef\u4ee5\u5728\u8fd9\u91cc\u52a0\u5165\u4e00\u4e2a\u975e\u6d41\u5a92\u4f53\u3002",qtsrc:"QT\u8d44\u6e90",progress:"\u8fdb\u5ea6",sound:"\u58f0\u97f3",swstretchvalign:"\u5782\u76f4\u62c9\u4f38",swstretchhalign:"\u6c34\u5e73\u62c9\u4f38",swstretchstyle:"\u62c9\u4f38\u65b9\u5f0f",scriptcallbacks:"\u811a\u672c\u56de\u8c03","align_top_right":"\u53f3\u4e0a",uimode:"\u5916\u89c2\u6a21\u5f0f",rate:"\u6bd4\u7387",playcount:"\u64ad\u653e\u6b21\u6570",defaultframe:"\u9ed8\u8ba4\u5e27",currentposition:"\u5f53\u524d\u4f4d\u7f6e",currentmarker:"\u5f53\u524d\u6807\u8bb0",captioningid:"\u5b57\u5e55ID",baseurl:"\u57fa\u7840\u8def\u5f84",balance:"\u5e73\u8861",windowlessvideo:"\u65e0\u8fb9\u6846",stretchtofit:"\u62c9\u4f38\u5230\u9002\u5408",mute:"\u9759\u97f3",invokeurls:"\u5f15\u7528URL",fullscreen:"\u5168\u5c4f",enabled:"\u542f\u7528",autostart:"\u81ea\u52a8\u64ad\u653e",volume:"\u97f3\u91cf",target:"\u76ee\u6807",qtsrcchokespeed:"\u9650\u5236\u901f\u5ea6",href:"\u8d85\u94fe\u63a5",endtime:"\u7ed3\u675f\u65f6\u95f4",starttime:"\u5f00\u59cb\u65f6\u95f4",enablejavascript:"\u542f\u7528JavaScript",correction:"\u65e0\u4fee\u6b63",targetcache:"\u76ee\u6807\u7f13\u5b58",playeveryframe:"\u9010\u5e27\u64ad\u653e",kioskmode:"\u5168\u5c4f\u6a21\u5f0f",controller:"\u63a7\u5236\u53f0",menu:"\u663e\u793a\u83dc\u5355",loop:"\u5faa\u73af",play:"\u81ea\u52a8\u64ad\u653e",hspace:"\u6c34\u5e73\u8ddd\u79bb",vspace:"\u5782\u76f4\u8ddd\u79bb","class_name":"\u7c7b\u522b",name:"\u540d\u79f0",id:"ID",type:"\u7c7b\u578b",size:"\u5c3a\u5bf8",preview:"\u9884\u89c8","constrain_proportions":"\u4fdd\u6301\u6bd4\u4f8b",controls:"\u64ad\u653e\u63a7\u5236",numloop:"\u5faa\u73af\u6b21\u6570",console:"\u63a7\u5236\u53f0",cache:"\u7f13\u5b58",autohref:"\u81ea\u52a8\u8df3\u8f6c",liveconnect:"JavaScript\u5f00\u542f",flashvars:"Flash\u53d8\u91cf",base:"\u57fa\u7840\u8def\u5f84",bgcolor:"\u80cc\u666f",wmode:"\u7a97\u4f53\u6a21\u5f0f",salign:"\u5a92\u4f53\u5bf9\u9f50",align:"\u6587\u672c\u5bf9\u9f50",scale:"\u7f29\u653e",quality:"\u753b\u8d28",shuffle:"\u968f\u673a",prefetch:"\u9884\u52a0\u8f7d",nojava:"\u65e0java",maintainaspect:"\u4fdd\u6301\u5916\u89c2",imagestatus:"\u56fe\u7247\u72b6\u6001",center:"\u5c45\u4e2d",autogotourl:"\u81ea\u52a8\u8f6c\u5230URL","shockwave_options":"Shockwave\u9009\u9879","rmp_options":"Real media player\u9009\u9879","wmp_options":"Windows media player\u9009\u9879","qt_options":"Quicktime\u9009\u9879","flash_options":"Flash\u9009\u9879",hidden:"\u9690\u85cf","align_bottom_left":"\u5de6\u4e0b","align_bottom_right":"\u53f3\u4e0b","html5_video_options":"HTML5\u89c6\u9891\u9009\u9879",altsource1:"\u66ff\u4ee3\u8d44\u6e901",altsource2:"\u66ff\u4ee3\u8d44\u6e902",preload:"\u9884\u52a0\u8f7d",poster:"\u6d77\u62a5",source:"\u8d44\u6e90","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/media.htm b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/media.htm deleted file mode 100644 index 957d83a686ee..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/media.htm +++ /dev/null @@ -1,922 +0,0 @@ - - - - {#media_dlg.title} - - - - - - - - - -
- - -
-
-
- {#media_dlg.general} - - - - - - - - - - - - - - - - - - -
- -
- - - - - -
 
-
- - - - - - -
x   
-
-
- -
- {#media_dlg.preview} - -
-
- -
-
- {#media_dlg.advanced} - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
 
-
-
- -
- {#media_dlg.html5_video_options} - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
 
-
- - - - - -
 
-
- - - - - -
 
-
- -
- - - - - - - - - - - -
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
-
- -
- {#media_dlg.embedded_audio_options} - - - - - - - - - -
- - - - - -
-
- - - - - -
-
- - - - - -
-
-
- -
- {#media_dlg.html5_audio_options} - - - - - - - - - - - - - - - - -
- - - - - -
 
-
- - - - - -
 
-
- -
- - - - - - - - - -
- - - - - -
-
- - - - - -
-
- - - - - -
-
-
- -
- {#media_dlg.flash_options} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
- - - -
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - - - - - - - -
-
- -
- {#media_dlg.qt_options} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
-  
- - - - - -
 
-
-
- -
- {#media_dlg.wmp_options} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
-
- -
- {#media_dlg.rmp_options} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
-   -
-
- -
- {#media_dlg.shockwave_options} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - - - -
-
- - - - - -
-
- - - - - -
-
- - - - - -
-
-
-
- -
-
- {#media_dlg.source} - -
-
-
- -
- - -
-
- - diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/moxieplayer.swf b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/moxieplayer.swf deleted file mode 100644 index 585d772d6d3c..000000000000 Binary files a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/media/moxieplayer.swf and /dev/null differ diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/nonbreaking/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/nonbreaking/editor_plugin.js deleted file mode 100644 index 687f54866905..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/nonbreaking/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceNonBreaking",function(){a.execCommand("mceInsertContent",false,(a.plugins.visualchars&&a.plugins.visualchars.state)?' ':" ")});a.addButton("nonbreaking",{title:"nonbreaking.nonbreaking_desc",cmd:"mceNonBreaking"});if(a.getParam("nonbreaking_force_tab")){a.onKeyDown.add(function(d,f){if(f.keyCode==9){f.preventDefault();d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking")}})}},getInfo:function(){return{longname:"Nonbreaking space",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("nonbreaking",tinymce.plugins.Nonbreaking)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/nonbreaking/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/nonbreaking/editor_plugin_src.js deleted file mode 100644 index d492fbefe419..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/nonbreaking/editor_plugin_src.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - tinymce.create('tinymce.plugins.Nonbreaking', { - init : function(ed, url) { - var t = this; - - t.editor = ed; - - // Register commands - ed.addCommand('mceNonBreaking', function() { - ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? ' ' : ' '); - }); - - // Register buttons - ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'}); - - if (ed.getParam('nonbreaking_force_tab')) { - ed.onKeyDown.add(function(ed, e) { - if (e.keyCode == 9) { - e.preventDefault(); - - ed.execCommand('mceNonBreaking'); - ed.execCommand('mceNonBreaking'); - ed.execCommand('mceNonBreaking'); - } - }); - } - }, - - getInfo : function() { - return { - longname : 'Nonbreaking space', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - - // Private methods - }); - - // Register plugin - tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/noneditable/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/noneditable/editor_plugin.js deleted file mode 100644 index da411ebc09c6..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/noneditable/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var c=tinymce.dom.TreeWalker;var a="contenteditable",d="data-mce-"+a;var e=tinymce.VK;function b(n){var j=n.dom,p=n.selection,r,o="mce_noneditablecaret",r="\uFEFF";function m(t){var s;if(t.nodeType===1){s=t.getAttribute(d);if(s&&s!=="inherit"){return s}s=t.contentEditable;if(s!=="inherit"){return s}}return null}function g(s){var t;while(s){t=m(s);if(t){return t==="false"?s:null}s=s.parentNode}}function l(s){while(s){if(s.id===o){return s}s=s.parentNode}}function k(s){var t;if(s){t=new c(s,s);for(s=t.current();s;s=t.next()){if(s.nodeType===3){return s}}}}function f(v,u){var s,t;if(m(v)==="false"){if(j.isBlock(v)){p.select(v);return}}t=j.createRng();if(m(v)==="true"){if(!v.firstChild){v.appendChild(n.getDoc().createTextNode("\u00a0"))}v=v.firstChild;u=true}s=j.create("span",{id:o,"data-mce-bogus":true},r);if(u){v.parentNode.insertBefore(s,v)}else{j.insertAfter(s,v)}t.setStart(s.firstChild,1);t.collapse(true);p.setRng(t);return s}function i(s){var v,t,u;if(s){rng=p.getRng(true);rng.setStartBefore(s);rng.setEndBefore(s);v=k(s);if(v&&v.nodeValue.charAt(0)==r){v=v.deleteData(0,1)}j.remove(s,true);p.setRng(rng)}else{t=l(p.getStart());while((s=j.get(o))&&s!==u){if(t!==s){v=k(s);if(v&&v.nodeValue.charAt(0)==r){v=v.deleteData(0,1)}j.remove(s,true)}u=s}}}function q(){var s,w,u,t,v;function x(B,D){var A,F,E,C,z;A=t.startContainer;F=t.startOffset;if(A.nodeType==3){z=A.nodeValue.length;if((F>0&&F0?F-1:F;A=A.childNodes[G];if(A.hasChildNodes()){A=A.firstChild}}else{return !D?B:null}}E=new c(A,B);while(C=E[D?"prev":"next"]()){if(C.nodeType===3&&C.nodeValue.length>0){return}else{if(m(C)==="true"){return C}}}return B}i();u=p.isCollapsed();s=g(p.getStart());w=g(p.getEnd());if(s||w){t=p.getRng(true);if(u){s=s||w;var y=p.getStart();if(v=x(s,true)){f(v,true)}else{if(v=x(s,false)){f(v,false)}else{p.select(s)}}}else{t=p.getRng(true);if(s){t.setStartBefore(s)}if(w){t.setEndAfter(w)}p.setRng(t)}}}function h(z,B){var F=B.keyCode,x,C,D,v;function u(H,G){while(H=H[G?"previousSibling":"nextSibling"]){if(H.nodeType!==3||H.nodeValue.length>0){return H}}}function y(G,H){p.select(G);p.collapse(H)}function t(K){var J,I,M,H;function G(O){var N=I;while(N){if(N===O){return}N=N.parentNode}j.remove(O);q()}function L(){var O,P,N=z.schema.getNonEmptyElements();P=new tinymce.dom.TreeWalker(I,z.getBody());while(O=(K?P.prev():P.next())){if(N[O.nodeName.toLowerCase()]){break}if(O.nodeType===3&&tinymce.trim(O.nodeValue).length>0){break}if(m(O)==="false"){G(O);return true}}if(g(O)){return true}return false}if(p.isCollapsed()){J=p.getRng(true);I=J.startContainer;M=J.startOffset;I=l(I)||I;if(H=g(I)){G(H);return false}if(I.nodeType==3&&(K?M>0:M124)&&F!=e.DELETE&&F!=e.BACKSPACE){if((tinymce.isMac?B.metaKey:B.ctrlKey)&&(F==67||F==88||F==86)){return}B.preventDefault();if(F==e.LEFT||F==e.RIGHT){var w=F==e.LEFT;if(z.dom.isBlock(x)){var A=w?x.previousSibling:x.nextSibling;var s=new c(A,A);var E=w?s.prev():s.next();y(E,!w)}else{y(x,w)}}}else{if(F==e.LEFT||F==e.RIGHT||F==e.BACKSPACE||F==e.DELETE){C=l(D);if(C){if(F==e.LEFT||F==e.BACKSPACE){x=u(C,true);if(x&&m(x)==="false"){B.preventDefault();if(F==e.LEFT){y(x,true)}else{j.remove(x);return}}else{i(C)}}if(F==e.RIGHT||F==e.DELETE){x=u(C);if(x&&m(x)==="false"){B.preventDefault();if(F==e.RIGHT){y(x,false)}else{j.remove(x);return}}else{i(C)}}}if((F==e.BACKSPACE||F==e.DELETE)&&!t(F==e.BACKSPACE)){B.preventDefault();return false}}}}n.onMouseDown.addToTop(function(s,u){var t=s.selection.getNode();if(m(t)==="false"&&t==u.target){q()}});n.onMouseUp.addToTop(q);n.onKeyDown.addToTop(h);n.onKeyUp.addToTop(q)}tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(i,k){var h,g,j;function f(m,n){var o=j.length,p=n.content,l=tinymce.trim(g);if(n.format=="raw"){return}while(o--){p=p.replace(j[o],function(s){var r=arguments,q=r[r.length-2];if(q>0&&p.charAt(q-1)=='"'){return s}return''+m.dom.encode(typeof(r[1])==="string"?r[1]:r[0])+""})}n.content=p}h=" "+tinymce.trim(i.getParam("noneditable_editable_class","mceEditable"))+" ";g=" "+tinymce.trim(i.getParam("noneditable_noneditable_class","mceNonEditable"))+" ";j=i.getParam("noneditable_regexp");if(j&&!j.length){j=[j]}i.onPreInit.add(function(){b(i);if(j){i.selection.onBeforeSetContent.add(f);i.onBeforeSetContent.add(f)}i.parser.addAttributeFilter("class",function(l){var m=l.length,n,o;while(m--){o=l[m];n=" "+o.attr("class")+" ";if(n.indexOf(h)!==-1){o.attr(d,"true")}else{if(n.indexOf(g)!==-1){o.attr(d,"false")}}}});i.serializer.addAttributeFilter(d,function(l,m){var n=l.length,o;while(n--){o=l[n];if(j&&o.attr("data-mce-content")){o.name="#text";o.type=3;o.raw=true;o.value=o.attr("data-mce-content")}else{o.attr(a,null);o.attr(d,null)}}});i.parser.addAttributeFilter(a,function(l,m){var n=l.length,o;while(n--){o=l[n];o.attr(d,o.attr(a));o.attr(a,null)}})})},getInfo:function(){return{longname:"Non editable elements",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/noneditable/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/noneditable/editor_plugin_src.js deleted file mode 100644 index a18bcd786acf..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/noneditable/editor_plugin_src.js +++ /dev/null @@ -1,537 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - var TreeWalker = tinymce.dom.TreeWalker; - var externalName = 'contenteditable', internalName = 'data-mce-' + externalName; - var VK = tinymce.VK; - - function handleContentEditableSelection(ed) { - var dom = ed.dom, selection = ed.selection, invisibleChar, caretContainerId = 'mce_noneditablecaret', invisibleChar = '\uFEFF'; - - // Returns the content editable state of a node "true/false" or null - function getContentEditable(node) { - var contentEditable; - - // Ignore non elements - if (node.nodeType === 1) { - // Check for fake content editable - contentEditable = node.getAttribute(internalName); - if (contentEditable && contentEditable !== "inherit") { - return contentEditable; - } - - // Check for real content editable - contentEditable = node.contentEditable; - if (contentEditable !== "inherit") { - return contentEditable; - } - } - - return null; - }; - - // Returns the noneditable parent or null if there is a editable before it or if it wasn't found - function getNonEditableParent(node) { - var state; - - while (node) { - state = getContentEditable(node); - if (state) { - return state === "false" ? node : null; - } - - node = node.parentNode; - } - }; - - // Get caret container parent for the specified node - function getParentCaretContainer(node) { - while (node) { - if (node.id === caretContainerId) { - return node; - } - - node = node.parentNode; - } - }; - - // Finds the first text node in the specified node - function findFirstTextNode(node) { - var walker; - - if (node) { - walker = new TreeWalker(node, node); - - for (node = walker.current(); node; node = walker.next()) { - if (node.nodeType === 3) { - return node; - } - } - } - }; - - // Insert caret container before/after target or expand selection to include block - function insertCaretContainerOrExpandToBlock(target, before) { - var caretContainer, rng; - - // Select block - if (getContentEditable(target) === "false") { - if (dom.isBlock(target)) { - selection.select(target); - return; - } - } - - rng = dom.createRng(); - - if (getContentEditable(target) === "true") { - if (!target.firstChild) { - target.appendChild(ed.getDoc().createTextNode('\u00a0')); - } - - target = target.firstChild; - before = true; - } - - //caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true, style:'border: 1px solid red'}, invisibleChar); - caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true}, invisibleChar); - - if (before) { - target.parentNode.insertBefore(caretContainer, target); - } else { - dom.insertAfter(caretContainer, target); - } - - rng.setStart(caretContainer.firstChild, 1); - rng.collapse(true); - selection.setRng(rng); - - return caretContainer; - }; - - // Removes any caret container except the one we might be in - function removeCaretContainer(caretContainer) { - var child, currentCaretContainer, lastContainer; - - if (caretContainer) { - rng = selection.getRng(true); - rng.setStartBefore(caretContainer); - rng.setEndBefore(caretContainer); - - child = findFirstTextNode(caretContainer); - if (child && child.nodeValue.charAt(0) == invisibleChar) { - child = child.deleteData(0, 1); - } - - dom.remove(caretContainer, true); - - selection.setRng(rng); - } else { - currentCaretContainer = getParentCaretContainer(selection.getStart()); - while ((caretContainer = dom.get(caretContainerId)) && caretContainer !== lastContainer) { - if (currentCaretContainer !== caretContainer) { - child = findFirstTextNode(caretContainer); - if (child && child.nodeValue.charAt(0) == invisibleChar) { - child = child.deleteData(0, 1); - } - - dom.remove(caretContainer, true); - } - - lastContainer = caretContainer; - } - } - }; - - // Modifies the selection to include contentEditable false elements or insert caret containers - function moveSelection() { - var nonEditableStart, nonEditableEnd, isCollapsed, rng, element; - - // Checks if there is any contents to the left/right side of caret returns the noneditable element or any editable element if it finds one inside - function hasSideContent(element, left) { - var container, offset, walker, node, len; - - container = rng.startContainer; - offset = rng.startOffset; - - // If endpoint is in middle of text node then expand to beginning/end of element - if (container.nodeType == 3) { - len = container.nodeValue.length; - if ((offset > 0 && offset < len) || (left ? offset == len : offset == 0)) { - return; - } - } else { - // Can we resolve the node by index - if (offset < container.childNodes.length) { - // Browser represents caret position as the offset at the start of an element. When moving right - // this is the element we are moving into so we consider our container to be child node at offset-1 - var pos = !left && offset > 0 ? offset-1 : offset; - container = container.childNodes[pos]; - if (container.hasChildNodes()) { - container = container.firstChild; - } - } else { - // If not then the caret is at the last position in it's container and the caret container should be inserted after the noneditable element - return !left ? element : null; - } - } - - // Walk left/right to look for contents - walker = new TreeWalker(container, element); - while (node = walker[left ? 'prev' : 'next']()) { - if (node.nodeType === 3 && node.nodeValue.length > 0) { - return; - } else if (getContentEditable(node) === "true") { - // Found contentEditable=true element return this one to we can move the caret inside it - return node; - } - } - - return element; - }; - - // Remove any existing caret containers - removeCaretContainer(); - - // Get noneditable start/end elements - isCollapsed = selection.isCollapsed(); - nonEditableStart = getNonEditableParent(selection.getStart()); - nonEditableEnd = getNonEditableParent(selection.getEnd()); - - // Is any fo the range endpoints noneditable - if (nonEditableStart || nonEditableEnd) { - rng = selection.getRng(true); - - // If it's a caret selection then look left/right to see if we need to move the caret out side or expand - if (isCollapsed) { - nonEditableStart = nonEditableStart || nonEditableEnd; - var start = selection.getStart(); - if (element = hasSideContent(nonEditableStart, true)) { - // We have no contents to the left of the caret then insert a caret container before the noneditable element - insertCaretContainerOrExpandToBlock(element, true); - } else if (element = hasSideContent(nonEditableStart, false)) { - // We have no contents to the right of the caret then insert a caret container after the noneditable element - insertCaretContainerOrExpandToBlock(element, false); - } else { - // We are in the middle of a noneditable so expand to select it - selection.select(nonEditableStart); - } - } else { - rng = selection.getRng(true); - - // Expand selection to include start non editable element - if (nonEditableStart) { - rng.setStartBefore(nonEditableStart); - } - - // Expand selection to include end non editable element - if (nonEditableEnd) { - rng.setEndAfter(nonEditableEnd); - } - - selection.setRng(rng); - } - } - }; - - function handleKey(ed, e) { - var keyCode = e.keyCode, nonEditableParent, caretContainer, startElement, endElement; - - function getNonEmptyTextNodeSibling(node, prev) { - while (node = node[prev ? 'previousSibling' : 'nextSibling']) { - if (node.nodeType !== 3 || node.nodeValue.length > 0) { - return node; - } - } - }; - - function positionCaretOnElement(element, start) { - selection.select(element); - selection.collapse(start); - } - - function canDelete(backspace) { - var rng, container, offset, nonEditableParent; - - function removeNodeIfNotParent(node) { - var parent = container; - - while (parent) { - if (parent === node) { - return; - } - - parent = parent.parentNode; - } - - dom.remove(node); - moveSelection(); - } - - function isNextPrevTreeNodeNonEditable() { - var node, walker, nonEmptyElements = ed.schema.getNonEmptyElements(); - - walker = new tinymce.dom.TreeWalker(container, ed.getBody()); - while (node = (backspace ? walker.prev() : walker.next())) { - // Found IMG/INPUT etc - if (nonEmptyElements[node.nodeName.toLowerCase()]) { - break; - } - - // Found text node with contents - if (node.nodeType === 3 && tinymce.trim(node.nodeValue).length > 0) { - break; - } - - // Found non editable node - if (getContentEditable(node) === "false") { - removeNodeIfNotParent(node); - return true; - } - } - - // Check if the content node is within a non editable parent - if (getNonEditableParent(node)) { - return true; - } - - return false; - } - - if (selection.isCollapsed()) { - rng = selection.getRng(true); - container = rng.startContainer; - offset = rng.startOffset; - container = getParentCaretContainer(container) || container; - - // Is in noneditable parent - if (nonEditableParent = getNonEditableParent(container)) { - removeNodeIfNotParent(nonEditableParent); - return false; - } - - // Check if the caret is in the middle of a text node - if (container.nodeType == 3 && (backspace ? offset > 0 : offset < container.nodeValue.length)) { - return true; - } - - // Resolve container index - if (container.nodeType == 1) { - container = container.childNodes[offset] || container; - } - - // Check if previous or next tree node is non editable then block the event - if (isNextPrevTreeNodeNonEditable()) { - return false; - } - } - - return true; - } - - startElement = selection.getStart() - endElement = selection.getEnd(); - - // Disable all key presses in contentEditable=false except delete or backspace - nonEditableParent = getNonEditableParent(startElement) || getNonEditableParent(endElement); - if (nonEditableParent && (keyCode < 112 || keyCode > 124) && keyCode != VK.DELETE && keyCode != VK.BACKSPACE) { - // Is Ctrl+c, Ctrl+v or Ctrl+x then use default browser behavior - if ((tinymce.isMac ? e.metaKey : e.ctrlKey) && (keyCode == 67 || keyCode == 88 || keyCode == 86)) { - return; - } - - e.preventDefault(); - - // Arrow left/right select the element and collapse left/right - if (keyCode == VK.LEFT || keyCode == VK.RIGHT) { - var left = keyCode == VK.LEFT; - // If a block element find previous or next element to position the caret - if (ed.dom.isBlock(nonEditableParent)) { - var targetElement = left ? nonEditableParent.previousSibling : nonEditableParent.nextSibling; - var walker = new TreeWalker(targetElement, targetElement); - var caretElement = left ? walker.prev() : walker.next(); - positionCaretOnElement(caretElement, !left); - } else { - positionCaretOnElement(nonEditableParent, left); - } - } - } else { - // Is arrow left/right, backspace or delete - if (keyCode == VK.LEFT || keyCode == VK.RIGHT || keyCode == VK.BACKSPACE || keyCode == VK.DELETE) { - caretContainer = getParentCaretContainer(startElement); - if (caretContainer) { - // Arrow left or backspace - if (keyCode == VK.LEFT || keyCode == VK.BACKSPACE) { - nonEditableParent = getNonEmptyTextNodeSibling(caretContainer, true); - - if (nonEditableParent && getContentEditable(nonEditableParent) === "false") { - e.preventDefault(); - - if (keyCode == VK.LEFT) { - positionCaretOnElement(nonEditableParent, true); - } else { - dom.remove(nonEditableParent); - return; - } - } else { - removeCaretContainer(caretContainer); - } - } - - // Arrow right or delete - if (keyCode == VK.RIGHT || keyCode == VK.DELETE) { - nonEditableParent = getNonEmptyTextNodeSibling(caretContainer); - - if (nonEditableParent && getContentEditable(nonEditableParent) === "false") { - e.preventDefault(); - - if (keyCode == VK.RIGHT) { - positionCaretOnElement(nonEditableParent, false); - } else { - dom.remove(nonEditableParent); - return; - } - } else { - removeCaretContainer(caretContainer); - } - } - } - - if ((keyCode == VK.BACKSPACE || keyCode == VK.DELETE) && !canDelete(keyCode == VK.BACKSPACE)) { - e.preventDefault(); - return false; - } - } - } - }; - - ed.onMouseDown.addToTop(function(ed, e) { - var node = ed.selection.getNode(); - - if (getContentEditable(node) === "false" && node == e.target) { - // Expand selection on mouse down we can't block the default event since it's used for drag/drop - moveSelection(); - } - }); - - ed.onMouseUp.addToTop(moveSelection); - ed.onKeyDown.addToTop(handleKey); - ed.onKeyUp.addToTop(moveSelection); - }; - - tinymce.create('tinymce.plugins.NonEditablePlugin', { - init : function(ed, url) { - var editClass, nonEditClass, nonEditableRegExps; - - // Converts configured regexps to noneditable span items - function convertRegExpsToNonEditable(ed, args) { - var i = nonEditableRegExps.length, content = args.content, cls = tinymce.trim(nonEditClass); - - // Don't replace the variables when raw is used for example on undo/redo - if (args.format == "raw") { - return; - } - - while (i--) { - content = content.replace(nonEditableRegExps[i], function(match) { - var args = arguments, index = args[args.length - 2]; - - // Is value inside an attribute then don't replace - if (index > 0 && content.charAt(index - 1) == '"') { - return match; - } - - return '' + ed.dom.encode(typeof(args[1]) === "string" ? args[1] : args[0]) + ''; - }); - } - - args.content = content; - }; - - editClass = " " + tinymce.trim(ed.getParam("noneditable_editable_class", "mceEditable")) + " "; - nonEditClass = " " + tinymce.trim(ed.getParam("noneditable_noneditable_class", "mceNonEditable")) + " "; - - // Setup noneditable regexps array - nonEditableRegExps = ed.getParam("noneditable_regexp"); - if (nonEditableRegExps && !nonEditableRegExps.length) { - nonEditableRegExps = [nonEditableRegExps]; - } - - ed.onPreInit.add(function() { - handleContentEditableSelection(ed); - - if (nonEditableRegExps) { - ed.selection.onBeforeSetContent.add(convertRegExpsToNonEditable); - ed.onBeforeSetContent.add(convertRegExpsToNonEditable); - } - - // Apply contentEditable true/false on elements with the noneditable/editable classes - ed.parser.addAttributeFilter('class', function(nodes) { - var i = nodes.length, className, node; - - while (i--) { - node = nodes[i]; - className = " " + node.attr("class") + " "; - - if (className.indexOf(editClass) !== -1) { - node.attr(internalName, "true"); - } else if (className.indexOf(nonEditClass) !== -1) { - node.attr(internalName, "false"); - } - } - }); - - // Remove internal name - ed.serializer.addAttributeFilter(internalName, function(nodes, name) { - var i = nodes.length, node; - - while (i--) { - node = nodes[i]; - - if (nonEditableRegExps && node.attr('data-mce-content')) { - node.name = "#text"; - node.type = 3; - node.raw = true; - node.value = node.attr('data-mce-content'); - } else { - node.attr(externalName, null); - node.attr(internalName, null); - } - } - }); - - // Convert external name into internal name - ed.parser.addAttributeFilter(externalName, function(nodes, name) { - var i = nodes.length, node; - - while (i--) { - node = nodes[i]; - node.attr(internalName, node.attr(externalName)); - node.attr(externalName, null); - } - }); - }); - }, - - getInfo : function() { - return { - longname : 'Non editable elements', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('noneditable', tinymce.plugins.NonEditablePlugin); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/pagebreak/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/pagebreak/editor_plugin.js deleted file mode 100644 index 35085e8adca2..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/pagebreak/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(b,d){var f='',a="mcePageBreak",c=b.getParam("pagebreak_separator",""),e;e=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(g){return"\\"+g}),"g");b.addCommand("mcePageBreak",function(){b.execCommand("mceInsertContent",0,f)});b.addButton("pagebreak",{title:"pagebreak.desc",cmd:a});b.onInit.add(function(){if(b.theme.onResolveName){b.theme.onResolveName.add(function(g,h){if(h.node.nodeName=="IMG"&&b.dom.hasClass(h.node,a)){h.name="pagebreak"}})}});b.onClick.add(function(g,h){h=h.target;if(h.nodeName==="IMG"&&g.dom.hasClass(h,a)){g.selection.select(h)}});b.onNodeChange.add(function(h,g,i){g.setActive("pagebreak",i.nodeName==="IMG"&&h.dom.hasClass(i,a))});b.onBeforeSetContent.add(function(g,h){h.content=h.content.replace(e,f)});b.onPostProcess.add(function(g,h){if(h.get){h.content=h.content.replace(/]+>/g,function(i){if(i.indexOf('class="mcePageBreak')!==-1){i=c}return i})}})},getInfo:function(){return{longname:"PageBreak",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("pagebreak",tinymce.plugins.PageBreakPlugin)})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/pagebreak/editor_plugin_src.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/pagebreak/editor_plugin_src.js deleted file mode 100644 index a094c1916232..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/pagebreak/editor_plugin_src.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - tinymce.create('tinymce.plugins.PageBreakPlugin', { - init : function(ed, url) { - var pb = '', cls = 'mcePageBreak', sep = ed.getParam('pagebreak_separator', ''), pbRE; - - pbRE = new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function(a) {return '\\' + a;}), 'g'); - - // Register commands - ed.addCommand('mcePageBreak', function() { - ed.execCommand('mceInsertContent', 0, pb); - }); - - // Register buttons - ed.addButton('pagebreak', {title : 'pagebreak.desc', cmd : cls}); - - ed.onInit.add(function() { - if (ed.theme.onResolveName) { - ed.theme.onResolveName.add(function(th, o) { - if (o.node.nodeName == 'IMG' && ed.dom.hasClass(o.node, cls)) - o.name = 'pagebreak'; - }); - } - }); - - ed.onClick.add(function(ed, e) { - e = e.target; - - if (e.nodeName === 'IMG' && ed.dom.hasClass(e, cls)) - ed.selection.select(e); - }); - - ed.onNodeChange.add(function(ed, cm, n) { - cm.setActive('pagebreak', n.nodeName === 'IMG' && ed.dom.hasClass(n, cls)); - }); - - ed.onBeforeSetContent.add(function(ed, o) { - o.content = o.content.replace(pbRE, pb); - }); - - ed.onPostProcess.add(function(ed, o) { - if (o.get) - o.content = o.content.replace(/]+>/g, function(im) { - if (im.indexOf('class="mcePageBreak') !== -1) - im = sep; - - return im; - }); - }); - }, - - getInfo : function() { - return { - longname : 'PageBreak', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('pagebreak', tinymce.plugins.PageBreakPlugin); -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/editor_plugin.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/editor_plugin.js deleted file mode 100644 index f69f263f9958..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/paste/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_max_consecutive_linebreaks:2,paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"combined",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"
")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="

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

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

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

/g,"

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

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

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

$1

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

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

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

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

)$/,"

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

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

)$/,"

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

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

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

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

/g, '

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

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

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

$1

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

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

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

...

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

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

)$/, '

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

...

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

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

)$/, '

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

' + row + '

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

text

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

Here is a example dialog.

-

Selected text:

-

Custom arg:

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

Here is a example dialog.

-

Selected text:

-

Custom arg:

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

', 'gi'), '

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

{#advanced_dlg.about_title}

-

Version: ()

-

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

-

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

-

For more information about this software visit the TinyMCE website.

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

{#advanced_dlg.about_loaded}

- -
-
- -

 

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

{#advanced_dlg.accessibility_usage_title}

-

Toolbars

-

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

- -

Status Bar

-

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

- -

Context Menu

-

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

- -

Keyboard Shortcuts

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

{#umbraco_dlg.about_title}

-

Version: ()

-

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

-

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

-

For more information about this software visit the TinyMCE website.

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

{#umbraco_dlg.about_loaded}

- -
-
- -

 

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

{#umbraco_dlg.accessibility_usage_title}

-

Toolbars

-

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

- -

Status Bar

-

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

- -

Context Menu

-

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

- -

Keyboard Shortcuts

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

";if(A.querySelectorAll&&A.querySelectorAll(".TEST").length===0){return}d=function(L,C,G,K){C=C||document;if(!K&&!d.isXML(C)){var J=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(L);if(J&&(C.nodeType===1||C.nodeType===9)){if(J[1]){return l(C.getElementsByTagName(L),G)}else{if(J[2]&&k.find.CLASS&&C.getElementsByClassName){return l(C.getElementsByClassName(J[2]),G)}}}if(C.nodeType===9){if(L==="body"&&C.body){return l([C.body],G)}else{if(J&&J[3]){var F=C.getElementById(J[3]);if(F&&F.parentNode){if(F.id===J[3]){return l([F],G)}}else{return l([],G)}}}try{return l(C.querySelectorAll(L),G)}catch(H){}}else{if(C.nodeType===1&&C.nodeName.toLowerCase()!=="object"){var D=C,E=C.getAttribute("id"),B=E||z,N=C.parentNode,M=/^\s*[+~]/.test(L);if(!E){C.setAttribute("id",B)}else{B=B.replace(/'/g,"\\$&")}if(M&&N){C=C.parentNode}try{if(!M||N){return l(C.querySelectorAll("[id='"+B+"'] "+L),G)}}catch(I){}finally{if(!E){D.removeAttribute("id")}}}}}return e(L,C,G,K)};for(var y in e){d[y]=e[y]}A=null})()}(function(){var e=document.documentElement,z=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(z){var B=!z.call(document.createElement("div"),"div"),y=false;try{z.call(document.documentElement,"[test!='']:sizzle")}catch(A){y=true}d.matchesSelector=function(D,F){F=F.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!d.isXML(D)){try{if(y||!k.match.PSEUDO.test(F)&&!/!=/.test(F)){var C=z.call(D,F);if(C||!B||D.document&&D.document.nodeType!==11){return C}}}catch(E){}}return d(F,null,null,[D]).length>0}}})();(function(){var e=document.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}k.order.splice(1,0,"CLASS");k.find.CLASS=function(y,z,A){if(typeof z.getElementsByClassName!=="undefined"&&!A){return z.getElementsByClassName(y[1])}};e=null})();function a(y,D,C,G,E,F){for(var A=0,z=G.length;A0){B=e;break}}}e=e[y]}G[A]=B}}}if(document.documentElement.contains){d.contains=function(y,e){return y!==e&&(y.contains?y.contains(e):true)}}else{if(document.documentElement.compareDocumentPosition){d.contains=function(y,e){return !!(y.compareDocumentPosition(e)&16)}}else{d.contains=function(){return false}}}d.isXML=function(e){var y=(e?e.ownerDocument||e:0).documentElement;return y?y.nodeName!=="HTML":false};var s=function(z,e,D){var C,E=[],B="",F=e.nodeType?[e]:e;while((C=k.match.PSEUDO.exec(z))){B+=C[0];z=z.replace(k.match.PSEUDO,"")}z=k.relative[z]?z+"*":z;for(var A=0,y=F.length;A"+(i.item?i.item(0).outerHTML:i.htmlText);m.removeChild(m.firstChild)}else{m.innerHTML=i.toString()}}if(/^\s/.test(m.innerHTML)){j=" "}if(/\s+$/.test(m.innerHTML)){l=" "}h.getInner=true;h.content=g.isCollapsed()?"":j+g.serializer.serialize(m,h)+l;g.onGetContent.dispatch(g,h);return h.content},setContent:function(h,j){var o=this,g=o.getRng(),k,l=o.win.document,n,m;j=j||{format:"html"};j.set=true;h=j.content=h;if(!j.no_events){o.onBeforeSetContent.dispatch(o,j)}h=j.content;if(g.insertNode){h+='_';if(g.startContainer==l&&g.endContainer==l){l.body.innerHTML=h}else{g.deleteContents();if(l.body.childNodes.length===0){l.body.innerHTML=h}else{if(g.createContextualFragment){g.insertNode(g.createContextualFragment(h))}else{n=l.createDocumentFragment();m=l.createElement("div");n.appendChild(m);m.outerHTML=h;g.insertNode(n)}}}k=o.dom.get("__caret");g=l.createRange();g.setStartBefore(k);g.setEndBefore(k);o.setRng(g);o.dom.remove("__caret");try{o.setRng(g)}catch(i){}}else{if(g.item){l.execCommand("Delete",false,null);g=o.getRng()}if(/^\s+/.test(h)){g.pasteHTML('_'+h);o.dom.remove("__mce_tmp")}else{g.pasteHTML(h)}}if(!j.no_events){o.onSetContent.dispatch(o,j)}},getStart:function(){var i=this,h=i.getRng(),j,g,l,k;if(h.duplicate||h.item){if(h.item){return h.item(0)}l=h.duplicate();l.collapse(1);j=l.parentElement();if(j.ownerDocument!==i.dom.doc){j=i.dom.getRoot()}g=k=h.parentElement();while(k=k.parentNode){if(k==j){j=g;break}}return j}else{j=h.startContainer;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[Math.min(j.childNodes.length-1,h.startOffset)]}if(j&&j.nodeType==3){return j.parentNode}return j}},getEnd:function(){var h=this,g=h.getRng(),j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(0);j=g.parentElement();if(j.ownerDocument!==h.dom.doc){j=h.dom.getRoot()}if(j&&j.nodeName=="BODY"){return j.lastChild||j}return j}else{j=g.endContainer;i=g.endOffset;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[i>0?i-1:i]}if(j&&j.nodeType==3){return j.parentNode}return j}},getBookmark:function(s,v){var y=this,n=y.dom,h,k,j,o,i,p,q,m="\uFEFF",x;function g(z,A){var t=0;e(n.select(z),function(C,B){if(C==A){t=B}});return t}function u(t){function z(E){var A,D,C,B=E?"start":"end";A=t[B+"Container"];D=t[B+"Offset"];if(A.nodeType==1&&A.nodeName=="TR"){C=A.childNodes;A=C[Math.min(E?D:D-1,C.length-1)];if(A){D=E?0:A.childNodes.length;t["set"+(E?"Start":"End")](A,D)}}}z(true);z();return t}function l(){var z=y.getRng(true),t=n.getRoot(),A={};function B(E,J){var D=E[J?"startContainer":"endContainer"],I=E[J?"startOffset":"endOffset"],C=[],F,H,G=0;if(D.nodeType==3){if(v){for(F=D.previousSibling;F&&F.nodeType==3;F=F.previousSibling){I+=F.nodeValue.length}}C.push(I)}else{H=D.childNodes;if(I>=H.length&&H.length){G=1;I=Math.max(0,H.length-1)}C.push(y.dom.nodeIndex(H[I],v)+G)}for(;D&&D!=t;D=D.parentNode){C.push(y.dom.nodeIndex(D,v))}return C}A.start=B(z,true);if(!y.isCollapsed()){A.end=B(z)}return A}if(s==2){if(y.tridentSel){return y.tridentSel.getBookmark(s)}return l()}if(s){h=y.getRng();if(h.setStart){h={startContainer:h.startContainer,startOffset:h.startOffset,endContainer:h.endContainer,endOffset:h.endOffset}}return{rng:h}}h=y.getRng();j=n.uniqueId();o=tinyMCE.activeEditor.selection.isCollapsed();x="overflow:hidden;line-height:0px";if(h.duplicate||h.item){if(!h.item){k=h.duplicate();try{h.collapse();h.pasteHTML(''+m+"");if(!o){k.collapse(false);h.moveToElementText(k.parentElement());if(h.compareEndPoints("StartToEnd",k)===0){k.move("character",-1)}k.pasteHTML(''+m+"")}}catch(r){return null}}else{p=h.item(0);i=p.nodeName;return{name:i,index:g(i,p)}}}else{p=y.getNode();i=p.nodeName;if(i=="IMG"){return{name:i,index:g(i,p)}}k=u(h.cloneRange());if(!o){k.collapse(false);k.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_end",style:x},m))}h=u(h);h.collapse(true);h.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_start",style:x},m))}y.moveToBookmark({id:j,keep:1});return{id:j}},moveToBookmark:function(q){var v=this,n=v.dom,l,j,g,i,u,k,x,r,s;function h(C){var t=q[C?"start":"end"],z,A,B,y;if(t){B=t[0];for(A=u,z=t.length-1;z>=1;z--){y=A.childNodes;if(t[z]>y.length-1){return}A=y[t[z]]}if(A.nodeType===3){B=Math.min(t[0],A.nodeValue.length)}if(A.nodeType===1){B=Math.min(t[0],A.childNodes.length)}if(C){g.setStart(A,B)}else{g.setEnd(A,B)}}return true}function m(D){var y=n.get(q.id+"_"+D),C,t,A,B,z=q.keep;if(y){C=y.parentNode;if(D=="start"){if(!z){t=n.nodeIndex(y)}else{C=y.firstChild;t=1}k=x=C;r=s=t}else{if(!z){t=n.nodeIndex(y)}else{C=y.firstChild;t=1}x=C;s=t}if(!z){B=y.previousSibling;A=y.nextSibling;e(d.grep(y.childNodes),function(E){if(E.nodeType==3){E.nodeValue=E.nodeValue.replace(/\uFEFF/g,"")}});while(y=n.get(q.id+"_"+D)){n.remove(y,1)}if(B&&A&&B.nodeType==A.nodeType&&B.nodeType==3&&!d.isOpera){t=B.nodeValue.length;B.appendData(A.nodeValue);n.remove(A);if(D=="start"){k=x=B;r=s=t}else{x=B;s=t}}}}}function o(t){if(n.isBlock(t)&&!t.innerHTML&&!b){t.innerHTML='
'}return t}if(q){if(q.start){g=n.createRng();u=n.getRoot();if(v.tridentSel){return v.tridentSel.moveToBookmark(q)}if(h(true)&&h()){v.setRng(g)}}else{if(q.id){m("start");m("end");if(k){g=n.createRng();g.setStart(o(k),r);g.setEnd(o(x),s);v.setRng(g)}}else{if(q.name){v.select(n.select(q.name)[q.index])}else{if(q.rng){g=q.rng;if(g.startContainer){i=v.dom.createRng();try{i.setStart(g.startContainer,g.startOffset);i.setEnd(g.endContainer,g.endOffset)}catch(p){}g=i}v.setRng(g)}}}}}},select:function(l,k){var j=this,m=j.dom,h=m.createRng(),g;function i(n,p){var o=new a(n,n);do{if(n.nodeType==3&&d.trim(n.nodeValue).length!==0){if(p){h.setStart(n,0)}else{h.setEnd(n,n.nodeValue.length)}return}if(n.nodeName=="BR"){if(p){h.setStartBefore(n)}else{h.setEndBefore(n)}return}}while(n=(p?o.next():o.prev()))}if(l){g=m.nodeIndex(l);h.setStart(l.parentNode,g);h.setEnd(l.parentNode,g+1);if(k){i(l,1);i(l)}j.setRng(h)}return l},isCollapsed:function(){var g=this,i=g.getRng(),h=g.getSel();if(!i||i.item){return false}if(i.compareEndPoints){return i.compareEndPoints("StartToEnd",i)===0}return !h||i.collapsed},collapse:function(g){var i=this,h=i.getRng(),j;if(h.item){j=h.item(0);h=i.win.document.body.createTextRange();h.moveToElementText(j)}h.collapse(!!g);i.setRng(h)},getSel:function(){var h=this,g=this.win;return g.getSelection?g.getSelection():g.document.selection},getRng:function(m){var h=this,j,g,l,k=h.win.document;if(m&&h.tridentSel){return h.tridentSel.getRangeAt(0)}try{if(j=h.getSel()){g=j.rangeCount>0?j.getRangeAt(0):(j.createRange?j.createRange():k.createRange())}}catch(i){}if(d.isIE&&!d.isIE11&&g&&g.setStart&&k.selection.createRange().item){l=k.selection.createRange().item(0);g=k.createRange();g.setStartBefore(l);g.setEndAfter(l)}if(!g){g=k.createRange?k.createRange():k.body.createTextRange()}if(g.setStart&&g.startContainer.nodeType===9&&g.collapsed){l=h.dom.getRoot();g.setStart(l,0);g.setEnd(l,0)}if(h.selectedRange&&h.explicitRange){if(g.compareBoundaryPoints(g.START_TO_START,h.selectedRange)===0&&g.compareBoundaryPoints(g.END_TO_END,h.selectedRange)===0){g=h.explicitRange}else{h.selectedRange=null;h.explicitRange=null}}return g},setRng:function(k,g){var j,i=this;if(!i.tridentSel){j=i.getSel();if(j){i.explicitRange=k;try{j.removeAllRanges()}catch(h){}j.addRange(k);if(g===false&&j.extend){j.collapse(k.endContainer,k.endOffset);j.extend(k.startContainer,k.startOffset)}i.selectedRange=j.rangeCount>0?j.getRangeAt(0):null}}else{if(k.cloneRange){try{i.tridentSel.addRange(k);return}catch(h){}}try{k.select()}catch(h){}}},setNode:function(h){var g=this;g.setContent(g.dom.getOuterHTML(h));return h},getNode:function(){var i=this,h=i.getRng(),j=i.getSel(),m,l=h.startContainer,g=h.endContainer;function k(q,o){var p=q;while(q&&q.nodeType===3&&q.length===0){q=o?q.nextSibling:q.previousSibling}return q||p}if(!h){return i.dom.getRoot()}if(h.setStart){m=h.commonAncestorContainer;if(!h.collapsed){if(h.startContainer==h.endContainer){if(h.endOffset-h.startOffset<2){if(h.startContainer.hasChildNodes()){m=h.startContainer.childNodes[h.startOffset]}}}if(l.nodeType===3&&g.nodeType===3){if(l.length===h.startOffset){l=k(l.nextSibling,true)}else{l=l.parentNode}if(h.endOffset===0){g=k(g.previousSibling,false)}else{g=g.parentNode}if(l&&l===g){return l}}}if(m&&m.nodeType==3){return m.parentNode}return m}return h.item?h.item(0):h.parentElement()},getSelectedBlocks:function(p,h){var o=this,k=o.dom,m,l,i,j=[];m=k.getParent(p||o.getStart(),k.isBlock);l=k.getParent(h||o.getEnd(),k.isBlock);if(m){j.push(m)}if(m&&l&&m!=l){i=m;var g=new a(m,k.getRoot());while((i=g.next())&&i!=l){if(k.isBlock(i)){j.push(i)}}}if(l&&m!=l){j.push(l)}return j},isForward:function(){var i=this.dom,g=this.getSel(),j,h;if(!g||g.anchorNode==null||g.focusNode==null){return true}j=i.createRng();j.setStart(g.anchorNode,g.anchorOffset);j.collapse(true);h=i.createRng();h.setStart(g.focusNode,g.focusOffset);h.collapse(true);return j.compareBoundaryPoints(j.START_TO_START,h)<=0},normalize:function(){var h=this,g,m,l,j,i;function k(p){var o,r,n,s=h.dom,u=s.getRoot(),q,t,v;function y(z,A){var B=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(z=B[A?"prev":"next"]()){if(z.nodeName==="BR"){return true}}}function x(B,z){var C,A;z=z||o;C=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(q=C[B?"prev":"next"]()){if(q.nodeType===3&&q.nodeValue.length>0){o=q;r=B?q.nodeValue.length:0;m=true;return}if(s.isBlock(q)||t[q.nodeName.toLowerCase()]){return}A=q}if(l&&A){o=A;m=true;r=0}}o=g[(p?"start":"end")+"Container"];r=g[(p?"start":"end")+"Offset"];t=s.schema.getNonEmptyElements();if(o.nodeType===9){o=s.getRoot();r=0}if(o===u){if(p){q=o.childNodes[r>0?r-1:0];if(q){v=q.nodeName.toLowerCase();if(t[q.nodeName]||q.nodeName=="TABLE"){return}}}if(o.hasChildNodes()){o=o.childNodes[Math.min(!p&&r>0?r-1:r,o.childNodes.length-1)];r=0;if(o.hasChildNodes()&&!/TABLE/.test(o.nodeName)){q=o;n=new a(o,u);do{if(q.nodeType===3&&q.nodeValue.length>0){r=p?0:q.nodeValue.length;o=q;m=true;break}if(t[q.nodeName.toLowerCase()]){r=s.nodeIndex(q);o=q.parentNode;if(q.nodeName=="IMG"&&!p){r++}m=true;break}}while(q=(p?n.next():n.prev()))}}}if(l){if(o.nodeType===3&&r===0){x(true)}if(o.nodeType===1){q=o.childNodes[r];if(q&&q.nodeName==="BR"&&!y(q)&&!y(q,true)){x(true,o.childNodes[r])}}}if(p&&!l&&o.nodeType===3&&r===o.nodeValue.length){x(false)}if(m){g["set"+(p?"Start":"End")](o,r)}}if(d.isIE){return}g=h.getRng();l=g.collapsed;k(true);if(!l){k()}if(m){if(l){g.collapse(true)}h.setRng(g,h.isForward())}},selectorChanged:function(g,j){var h=this,i;if(!h.selectorChangedData){h.selectorChangedData={};i={};h.editor.onNodeChange.addToTop(function(l,k,o){var p=h.dom,m=p.getParents(o,null,p.getRoot()),n={};e(h.selectorChangedData,function(r,q){e(m,function(s){if(p.is(s,q)){if(!i[q]){e(r,function(t){t(true,{node:s,selector:q,parents:m})});i[q]=r}n[q]=r;return false}})});e(i,function(r,q){if(!n[q]){delete i[q];e(r,function(s){s(false,{node:o,selector:q,parents:m})})}})})}if(!h.selectorChangedData[g]){h.selectorChangedData[g]=[]}h.selectorChangedData[g].push(j);return h},scrollIntoView:function(k){var j,h,g=this,i=g.dom;h=i.getViewPort(g.editor.getWin());j=i.getPos(k).y;if(jh.y+h.h){g.editor.getWin().scrollTo(0,j0){p.setEndPoint("StartToStart",o)}else{p.setEndPoint("EndToEnd",o)}p.select()}}else{l()}}function l(){var p=n.selection.createRange();if(o&&!p.item&&p.compareEndPoints("StartToEnd",p)===0){o.select()}h.unbind(n,"mouseup",l);h.unbind(n,"mousemove",m);o=k=0}n.documentElement.unselectable=true;h.bind(n,["mousedown","contextmenu"],function(p){if(p.target.nodeName==="HTML"){if(k){l()}g=n.documentElement;if(g.scrollHeight>g.clientHeight){return}k=1;o=j(p.x,p.y);if(o){h.bind(n,"mouseup",l);h.bind(n,"mousemove",m);h.win.focus();o.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";e.remove_trailing_brs="remove_trailing_brs" in e?e.remove_trailing_brs:true;h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/(?:^|\s)mce(Item\w+|Selected)(?!\S)/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addAttributeFilter("data-mce-expando",function(j,l,k){var m=j.length;while(m--){j[m].attr(l,null)}});c.addNodeFilter("noscript",function(j){var k=j.length,l;while(k--){l=j[k].firstChild;if(l){l.value=a.html.Entities.decode(l.value)}}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// "}}else{if(o.length>0){n.firstChild.value=""}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select,map").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(a.trim(m.getInner?o.innerHTML:i.getOuterHTML(o)),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],e={},d=[],g=0,f;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=document.createElement("script");s.id=n;s.type="text/javascript";s.src=a._addVer(m);if(!a.isIE||a.isIE11){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==f){j.push(m);l[m]=c}if(q){if(!e[m]){e[m]=[]}e[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(e[r],function(s){s.func.call(s.scope)});e[r]=f}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,s){var i=d.startContainer,l=d.startOffset,t=d.endContainer,m=d.endOffset,j,g,o,h,r,q,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(u){s([u])});return}function f(u){var v;v=u[0];if(v.nodeType===3&&v===i&&l>=v.nodeValue.length){u.splice(0,1)}v=u[u.length-1];if(m===0&&u.length>0&&v===t&&v.nodeType===3){u.splice(u.length-1,1)}return u}function p(x,v,u){var y=[];for(;x&&x!=u;x=x[v]){y.push(x)}return y}function n(v,u){do{if(v.parentNode==u){return v}v=v.parentNode}while(v)}function k(x,v,y){var u=y?"nextSibling":"previousSibling";for(h=x,r=h.parentNode;h&&h!=v;h=r){r=h.parentNode;q=p(h==x?h:h[u],u);if(q.length){if(!y){q.reverse()}s(f(q))}}}if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[l]}if(t.nodeType==1&&t.hasChildNodes()){t=t.childNodes[Math.min(m-1,t.childNodes.length-1)]}if(i==t){return s(f([i]))}j=c.findCommonAncestor(i,t);for(h=i;h;h=h.parentNode){if(h===t){return k(i,j,true)}if(h===j){break}}for(h=t;h;h=h.parentNode){if(h===i){return k(t,j)}if(h===j){break}}g=n(i,j)||i;o=n(t,j)||t;k(i,g,true);q=p(g==i?g:g.nextSibling,"nextSibling",o==t?o.nextSibling:o);if(q.length){s(f(q))}k(t,o)};this.split=function(e){var h=e.startContainer,d=e.startOffset,i=e.endContainer,g=e.endOffset;function f(j,k){return j.splitText(k)}if(h==i&&h.nodeType==3){if(d>0&&dd){g=g-d;h=i=f(i,g).previousSibling;g=i.nodeValue.length;d=0}else{g=0}}}else{if(h.nodeType==3&&d>0&&d0&&g=m.length){r=0}}t=m[r];f.setAttrib(g,"tabindex","-1");f.setAttrib(t.id,"tabindex","0");f.get(t.id).focus();if(e.actOnFocus){e.onAction(t.id)}if(s){a.cancel(s)}};p=function(z){var v=37,u=39,y=38,A=40,r=27,t=14,s=13,x=32;switch(z.keyCode){case v:if(i){q.moveFocus(-1)}a.cancel(z);break;case u:if(i){q.moveFocus(1)}a.cancel(z);break;case y:if(o){q.moveFocus(-1)}a.cancel(z);break;case A:if(o){q.moveFocus(1)}a.cancel(z);break;case r:if(e.onCancel){e.onCancel();a.cancel(z)}break;case t:case s:case x:if(e.onAction){e.onAction(g);a.cancel(z)}break}};c(m,function(t,r){var s,u;if(!t.id){t.id=f.uniqueId("_mce_item_")}u=f.get(t.id);if(l){f.bind(u,"blur",h);s="-1"}else{s=(r===0?"0":"-1")}u.setAttribute("tabindex",s);f.bind(u,"focus",k)});if(m[0]){g=m[0].id}f.setAttrib(n,"tabindex","-1");var j=f.get(n);f.bind(j,"focus",d);f.bind(j,"keydown",p)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.offsetWidth,j.max_width):g.offsetWidth;k=j.max_height?Math.min(g.offsetHeight,j.max_height):g.offsetHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeightv){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return false}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.get("menu_"+g.id);h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){if(typeof h.settings.style=="function"){h.settings.style=h.settings.style()}c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='';if(e.image&&!(this.editor&&this.editor.forcedHighContrastMode)){d+=''+a.encode(e.title)+''+(c?''+c+"":"")}else{d+=''+(c?''+c+"":"")}d+='";d+="";return d},postRender:function(){var d=this,e=d.settings,c;if(b.isIE&&d.editor){b.dom.Event.add(d.id,"mousedown",function(f){var g=d.editor.selection.getNode().nodeName;c=g==="IMG"?d.editor.selection.getBookmark():null})}b.dom.Event.add(d.id,"click",function(f){if(!d.isDisabled()){if(b.isIE&&d.editor&&c!==null){d.editor.selection.moveToBookmark(c)}return e.onclick.call(e.scope,f)}});b.dom.Event.add(d.id,"keydown",function(f){if(!d.isDisabled()&&f.keyCode==b.VK.SPACEBAR){b.dom.Event.cancel(f);return e.onclick.call(e.scope,f)}})}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(j,i,g){var h=this;h.parent(j,i,g);h.items=[];h.onChange=new a(h);h.onPostRender=new a(h);h.onAdd=new a(h);h.onRenderMenu=new e.util.Dispatcher(this);h.classPrefix="mceListBox";h.marked={}},select:function(h){var g=this,j,i;g.marked={};if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){var i=this,j,k,h;i.marked={};if(g!=i.selectedIndex){j=d.get(i.id+"_text");h=d.get(i.id+"_voiceDesc");k=i.items[g];if(k){i.selectedValue=k.value;i.selectedIndex=g;d.setHTML(j,d.encode(k.title));d.setHTML(h,i.settings.title+" - "+k.title);d.removeClass(j,"mceTitle");d.setAttrib(i.id,"aria-valuenow",k.title)}else{d.setHTML(j,d.encode(i.settings.title));d.setHTML(h,d.encode(i.settings.title));d.addClass(j,"mceTitle");i.selectedValue=i.selectedIndex=null;d.setAttrib(i.id,"aria-valuenow",i.settings.title)}j=0}},mark:function(g){this.marked[g]=true},add:function(j,g,i){var h=this;i=i||{};i=e.extend(i,{title:j,value:g});h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var j="",g=this,i=g.settings,k=g.classPrefix;j='';j+="";j+="";j+="";return j},showMenu:function(){var h=this,j,i=d.get(this.id),g;if(h.isDisabled()||h.items.length===0){return}if(h.menu&&h.menu.isMenuVisible){return h.hideMenu()}if(!h.isMenuRendered){h.renderMenu();h.isMenuRendered=true}j=d.getPos(i);g=h.menu;g.settings.offset_x=j.x;g.settings.offset_y=j.y;g.settings.keyboard_focus=!e.isOpera;f(h.items,function(k){if(g.items[k.id]){g.items[k.id].setSelected(0)}});f(h.items,function(k){if(g.items[k.id]&&h.marked[k.value]){g.items[k.id].setSelected(1)}if(k.value===h.selectedValue){g.items[k.id].setSelected(1)}});g.showMenu(0,i.clientHeight);b.add(d.doc,"mousedown",h.hideMenu,h);d.addClass(h.id,h.classPrefix+"Selected")},hideMenu:function(h){var g=this;if(g.menu&&g.menu.isMenuVisible){d.removeClass(g.id,g.classPrefix+"Selected");if(h&&h.type=="mousedown"&&(h.target.id==g.id+"_text"||h.target.id==g.id+"_open")){return}if(!h||!d.getParent(h.target,".mceMenu")){d.removeClass(g.id,g.classPrefix+"Selected");b.remove(d.doc,"mousedown",g.hideMenu,g);g.menu.hideMenu()}}},renderMenu:function(){var h=this,g;g=h.settings.control_manager.createDropMenu(h.id+"_menu",{menu_line:1,"class":h.classPrefix+"Menu mceNoIcons",max_width:250,max_height:150});g.onHideMenu.add(function(){h.hideMenu();h.focus()});g.add({title:h.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}});f(h.items,function(i){if(i.value===c){g.add({title:i.title,role:"option","class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}})}else{i.id=d.uniqueId();i.role="option";i.onclick=function(){if(h.settings.onselect(i.value)!==false){h.select(i.value)}};g.add(i)}});h.onRenderMenu.dispatch(h,g);h.menu=g},postRender:function(){var g=this,h=g.classPrefix;b.add(g.id,"click",g.showMenu,g);b.add(g.id,"keydown",function(i){if(i.keyCode==32){g.showMenu(i);b.cancel(i)}});b.add(g.id,"focus",function(){if(!g._focused){g.keyDownHandler=b.add(g.id,"keydown",function(i){if(i.keyCode==40){g.showMenu();b.cancel(i)}});g.keyPressHandler=b.add(g.id,"keypress",function(j){var i;if(j.keyCode==13){i=g.selectedValue;g.selectedValue=null;b.cancel(j);g.settings.onselect(i)}})}g._focused=1});b.add(g.id,"blur",function(){b.remove(g.id,"keydown",g.keyDownHandler);b.remove(g.id,"keypress",g.keyPressHandler);g._focused=0});if(e.isIE6||!d.boxModel){b.add(g.id,"mouseover",function(){if(!d.hasClass(g.id,h+"Disabled")){d.addClass(g.id,h+"Hover")}});b.add(g.id,"mouseout",function(){if(!d.hasClass(g.id,h+"Disabled")){d.removeClass(g.id,h+"Hover")}})}g.onPostRender.dispatch(g,d.get(g.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(h,g){this.parent(h,g);this.classPrefix="mceNativeListBox"},setDisabled:function(g){d.get(this.id).disabled=g;this.setAriaProperty("disabled",g)},isDisabled:function(){return d.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){d.get(this.id).selectedIndex=g+1;this.selectedValue=this.items[g]?this.items[g].value:null},add:function(k,h,g){var j,i=this;g=g||{};g.value=h;if(i.isRendered()){d.add(d.get(this.id),"option",g,k)}j={title:k,value:h,attribs:g};i.items.push(j);i.onAdd.dispatch(i,j)},getLength:function(){return this.items.length},renderHTML:function(){var i,g=this;i=d.createHTML("option",{value:""},"-- "+g.settings.title+" --");f(g.items,function(h){i+=d.createHTML("option",{value:h.value},h.title)});i=d.createHTML("select",{id:g.id,"class":"mceNativeListBox","aria-labelledby":g.id+"_aria"},i);i+=d.createHTML("span",{id:g.id+"_aria",style:"display: none"},g.settings.title);return i},postRender:function(){var h=this,i,j=true;h.rendered=true;function g(l){var k=h.items[l.target.selectedIndex-1];if(k&&(k=k.value)){h.onChange.dispatch(h,k);if(h.settings.onselect){h.settings.onselect(k)}}}b.add(h.id,"change",g);b.add(h.id,"keydown",function(q){var n,p=37,m=39,l=38,r=40,k=13,o=32;b.remove(h.id,"change",i);j=false;n=b.add(h.id,"blur",function(){if(j){return}j=true;b.add(h.id,"change",g);b.remove(h.id,"blur",n)});if(q.keyCode==k||q.keyCode==o){g(q);return b.cancel(q)}else{if(q.keyCode==r||q.keyCode==l){q.stopImmediatePropagation()}}});h.onPostRender.dispatch(h,d.get(h.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.firstChild.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+=""+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'');i+=""+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"";i+="";i=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("div",{id:f.id,role:"button",tabindex:"0","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.firstChild.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.keyboardNav=new d.ui.KeyboardNavigation({root:f.id+"_menu",items:c.select("a",f.id+"_menu"),onCancel:function(){f.hideMenu();f.focus()}});f.keyboardNav.focus();f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0;f.onHideMenu.dispatch();f.keyboardNav.destroy()}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(m){m=m.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");var i={href:"javascript:;",style:{backgroundColor:"#"+m},title:p.editor.getLang("colors."+m,m),"data-mce-color":"#"+m};if(!d.isIE){i.role="option"}g=c.add(g,"a",i);if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+m;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return false});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){var f=this;f.parent();a.clear(f.id+"_menu");a.clear(f.id+"_more");c.remove(f.id+"_menu");if(f.keyboardNav){f.keyboardNav.destroy()}}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('
');i.push("");i.push('");j(e,function(h){i.push(h.renderHTML())});i.push("");i.push("
");return i.join("")},focus:function(){var e=this;d.get(e.id).focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){if(b.isWebKit){d.get(f.editor.id+"_ifr").focus()}f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,""))}}if(c.stdMode){f+=''+k.renderHTML()+""}else{f+=""+k.renderHTML()+""}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,""))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,""));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},""+f+"")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return d||[]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!==0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(x){var v=this,o,n=j.ScriptLoader,u,l=[],r;function q(t){var s=t.id;if(!s){s=t.name;if(s&&!k.get(s)){s=t.name}else{s=k.uniqueId()}t.setAttribute("id",s)}return s}function m(z,A,t){var y=z[A];if(!y){return}if(j.is(y,"string")){t=y.replace(/\.\w+$/,"");t=t?j.resolve(t):0;y=j.resolve(y)}return y.apply(t||this,Array.prototype.slice.call(arguments,2))}function p(t,s){return s.constructor===RegExp?s.test(t.className):k.hasClass(t,s)}v.settings=x;i.bind(window,"ready",function(){var s,t;m(x,"onpageload");switch(x.mode){case"exact":s=x.elements||"";if(s.length>0){g(e(s),function(y){if(k.get(y)){r=new j.Editor(y,x);l.push(r);r.render(1)}else{g(document.forms,function(z){g(z.elements,function(A){if(A.name===y){y="mce_editor_"+c++;k.setAttrib(A,"id",y);r=new j.Editor(y,x);l.push(r);r.render(1)}})})}})}break;case"textareas":case"specific_textareas":g(k.select("textarea"),function(y){if(x.editor_deselector&&p(y,x.editor_deselector)){return}if(!x.editor_selector||p(y,x.editor_selector)){r=new j.Editor(q(y),x);l.push(r);r.render(1)}});break;default:if(x.types){g(x.types,function(y){g(k.select(y.selector),function(A){var z=new j.Editor(q(A),j.extend({},x,y));l.push(z);z.render(1)})})}else{if(x.selector){g(k.select(x.selector),function(z){var y=new j.Editor(q(z),x);l.push(y);y.render(1)})}}}if(x.oninit){s=t=0;g(l,function(y){t++;if(!y.initialized){y.onInit.add(function(){s++;if(s==t){m(x,"oninit")}})}else{s++}if(s==t){m(x,"oninit")}})}})},get:function(l){if(l===a){return this.editors}if(!this.editors.hasOwnProperty(l)){return a}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l':"",visual:n,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:n,directionality:"ltr",forced_root_block:"p",hidden_input:n,padd_empty_editor:n,render_ui:n,indentation:"30px",fix_table_elements:n,inline_styles:n,convert_fonts_to_spans:n,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:n,entity_encoding:"named",url_converter:m.convertURL,url_converter_scope:m,ie7_compat:n},o);m.id=m.editorId=p;m.isNotDirty=false;m.plugins={};m.documentBaseURI=new k.util.URI(o.document_base_url||k.documentBaseURL,{base_uri:tinyMCE.baseURI});m.baseURI=k.baseURI;m.contentCSS=[];m.contentStyles=[];m.setupEvents();m.execCommands={};m.queryStateCommands={};m.queryValueCommands={};m.execCallback("setup",m)},render:function(o){var p=this,q=p.settings,r=p.id,m=k.ScriptLoader;if(!j.domLoaded){j.add(window,"ready",function(){p.render()});return}tinyMCE.settings=q;if(!p.getElement()){return}if(k.isIDevice&&!k.isIOS5){return}if(!/TEXTAREA|INPUT/i.test(p.getElement().nodeName)&&q.hidden_input&&l.getParent(r,"form")){l.insertAfter(l.create("input",{type:"hidden",name:r}),r)}if(!q.content_editable){p.orgVisibility=p.getElement().style.visibility;p.getElement().style.visibility="hidden"}if(k.WindowManager){p.windowManager=new k.WindowManager(p)}if(q.encoding=="xml"){p.onGetContent.add(function(s,t){if(t.save){t.content=l.encode(t.content)}})}if(q.add_form_submit_trigger){p.onSubmit.addToTop(function(){if(p.initialized){p.save();p.isNotDirty=1}})}if(q.add_unload_trigger){p._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(p.initialized&&!p.destroyed&&!p.isHidden()){p.save({format:"raw",no_events:true})}})}k.addUnload(p.destroy,p);if(q.submit_patch){p.onBeforeRenderUI.add(function(){var s=p.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){p.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){k.triggerSave();p.isNotDirty=1;return p.formElement._mceOldSubmit(p.formElement)}}s=null})}function n(){if(q.language&&q.language_load!==false){m.add(k.baseURL+"/langs/"+q.language+".js")}if(q.theme&&typeof q.theme!="function"&&q.theme.charAt(0)!="-"&&!h.urls[q.theme]){h.load(q.theme,"themes/"+q.theme+"/editor_template"+k.suffix+".js")}i(g(q.plugins),function(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(v){var u={prefix:"plugins/",resource:v,suffix:"/editor_plugin"+k.suffix+".js"};v=c.createUrl(u,v);c.load(v.resource,v)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+k.suffix+".js"})}}});m.loadQueue(function(){if(!p.removed){p.init()}})}n()},init:function(){var q,G=this,H=G.settings,D,y,z,C=G.getElement(),p,m,E,v,B,F,x,r=[];k.add(G);H.aria_label=H.aria_label||l.getAttrib(C,"aria-label",G.getLang("aria.rich_text_area"));if(H.theme){if(typeof H.theme!="function"){H.theme=H.theme.replace(/-/,"");p=h.get(H.theme);G.theme=new p();if(G.theme.init){G.theme.init(G,h.urls[H.theme]||k.documentBaseURL.replace(/\/$/,""))}}else{G.theme=H.theme}}function A(s){var t=c.get(s),o=c.urls[s]||k.documentBaseURL.replace(/\/$/,""),n;if(t&&k.inArray(r,s)===-1){i(c.dependencies(s),function(u){A(u)});n=new t(G,o);G.plugins[s]=n;if(n.init){n.init(G,o);r.push(s)}}}i(g(H.plugins.replace(/\-/g,"")),A);if(H.popup_css!==false){if(H.popup_css){H.popup_css=G.documentBaseURI.toAbsolute(H.popup_css)}else{H.popup_css=G.baseURI.toAbsolute("themes/"+H.theme+"/skins/"+H.skin+"/dialog.css")}}if(H.popup_css_add){H.popup_css+=","+G.documentBaseURI.toAbsolute(H.popup_css_add)}G.controlManager=new k.ControlManager(G);G.onBeforeRenderUI.dispatch(G,G.controlManager);if(H.render_ui&&G.theme){G.orgDisplay=C.style.display;if(typeof H.theme!="function"){D=H.width||C.style.width||C.offsetWidth;y=H.height||C.style.height||C.offsetHeight;z=H.min_height||100;F=/^[0-9\.]+(|px)$/i;if(F.test(""+D)){D=Math.max(parseInt(D,10)+(p.deltaWidth||0),100)}if(F.test(""+y)){y=Math.max(parseInt(y,10)+(p.deltaHeight||0),z)}p=G.theme.renderUI({targetNode:C,width:D,height:y,deltaWidth:H.delta_width,deltaHeight:H.delta_height});l.setStyles(p.sizeContainer||p.editorContainer,{width:D,height:y});y=(p.iframeHeight||y)+(typeof(y)=="number"?(p.deltaHeight||0):"");if(y';if(H.document_base_url!=k.documentBaseURL){G.iframeHTML+=''}if(k.isIE8){if(H.ie7_compat){G.iframeHTML+=''}else{G.iframeHTML+=''}}G.iframeHTML+='';for(x=0;x'}G.contentCSS=[];v=H.body_id||"tinymce";if(v.indexOf("=")!=-1){v=G.getParam("body_id","","hash");v=v[G.id]||v}B=H.body_class||"";if(B.indexOf("=")!=-1){B=G.getParam("body_class","","hash");B=B[G.id]||""}G.iframeHTML+='
";if(k.relaxedDomain&&(b||(k.isOpera&&parseFloat(opera.version())<11))){E='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+G.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()'}q=l.add(p.iframeContainer,"iframe",{id:G.id+"_ifr",src:E||'javascript:""',frameBorder:"0",allowTransparency:"true",title:H.aria_label,style:{width:"100%",height:y,display:"block"}});G.contentAreaContainer=p.iframeContainer;if(p.editorContainer){l.get(p.editorContainer).style.display=G.orgDisplay}C.style.visibility=G.orgVisibility;l.get(G.id).style.display="none";l.setAttrib(G.id,"aria-hidden",true);if(!k.relaxedDomain||!E){G.initContentBody()}C=q=p=null},initContentBody:function(){var n=this,p=n.settings,q=l.get(n.id),r=n.getDoc(),o,m,s;if((!b||!k.relaxedDomain)&&!p.content_editable){r.open();r.write(n.iframeHTML);r.close();if(k.relaxedDomain){r.domain=k.relaxedDomain}}if(p.content_editable){l.addClass(q,"mceContentBody");n.contentDocument=r=p.content_document||document;n.contentWindow=p.content_window||window;n.bodyElement=q;p.content_document=p.content_window=null}m=n.getBody();m.disabled=true;if(!p.readonly){m.contentEditable=n.getParam("content_editable_state",true)}m.disabled=false;n.schema=new k.html.Schema(p);n.dom=new k.dom.DOMUtils(r,{keep_values:true,url_converter:n.convertURL,url_converter_scope:n,hex_colors:p.force_hex_style_colors,class_filter:p.class_filter,update_styles:true,root_element:p.content_editable?n.id:null,schema:n.schema});n.parser=new k.html.DomParser(p,n.schema);n.parser.addAttributeFilter("src,href,style",function(t,u){var v=t.length,y,A=n.dom,z,x;while(v--){y=t[v];z=y.attr(u);x="data-mce-"+u;if(!y.attributes.map[x]){if(u==="style"){y.attr(x,A.serializeStyle(A.parseStyle(z),y.name))}else{y.attr(x,n.convertURL(z,u,y.name))}}}});n.parser.addNodeFilter("script",function(t,u){var v=t.length,x;while(v--){x=t[v];x.attr("type","mce-"+(x.attr("type")||"text/javascript"))}});n.parser.addNodeFilter("#cdata",function(t,u){var v=t.length,x;while(v--){x=t[v];x.type=8;x.name="#comment";x.value="[CDATA["+x.value+"]]"}});n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(u,v){var x=u.length,y,t=n.schema.getNonEmptyElements();while(x--){y=u[x];if(y.isEmpty(t)){y.empty().append(new k.html.Node("br",1)).shortEnded=true}}});n.serializer=new k.dom.Serializer(p,n.dom,n.schema);n.selection=new k.dom.Selection(n.dom,n.getWin(),n.serializer,n);n.formatter=new k.Formatter(n);n.undoManager=new k.UndoManager(n);n.forceBlocks=new k.ForceBlocks(n);n.enterKey=new k.EnterKey(n);n.editorCommands=new k.EditorCommands(n);n.onExecCommand.add(function(t,u){if(!/^(FontName|FontSize)$/.test(u)){n.nodeChanged()}});n.serializer.onPreProcess.add(function(t,u){return n.onPreProcess.dispatch(n,u,t)});n.serializer.onPostProcess.add(function(t,u){return n.onPostProcess.dispatch(n,u,t)});n.onPreInit.dispatch(n);if(!p.browser_spellcheck&&!p.gecko_spellcheck){r.body.spellcheck=false}if(!p.readonly){n.bindNativeEvents()}n.controlManager.onPostRender.dispatch(n,n.controlManager);n.onPostRender.dispatch(n);n.quirks=k.util.Quirks(n);if(p.directionality){m.dir=p.directionality}if(p.nowrap){m.style.whiteSpace="nowrap"}if(p.protect){n.onBeforeSetContent.add(function(t,u){i(p.protect,function(v){u.content=u.content.replace(v,function(x){return""})})})}n.onSetContent.add(function(){n.addVisual(n.getBody())});if(p.padd_empty_editor){n.onPostProcess.add(function(t,u){u.content=u.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
[\r\n]*)$/,"")})}n.load({initial:true,format:"html"});n.startContent=n.getContent({format:"raw"});n.initialized=true;n.onInit.dispatch(n);n.execCallback("setupcontent_callback",n.id,m,r);n.execCallback("init_instance_callback",n);n.focus(true);n.nodeChanged({initial:true});if(n.contentStyles.length>0){s="";i(n.contentStyles,function(t){s+=t+"\r\n"});n.dom.addStyle(s)}i(n.contentCSS,function(t){n.dom.loadCSS(t)});if(p.auto_focus){setTimeout(function(){var t=k.get(p.auto_focus);t.selection.select(t.getBody(),1);t.selection.collapse(1);t.getBody().focus();t.getWin().focus()},100)}q=r=m=null},focus:function(p){var o,u=this,t=u.selection,q=u.settings.content_editable,n,r,s=u.getDoc(),m;if(!p){if(u.bookmark){t.moveToBookmark(u.bookmark);u.bookmark=null}n=t.getRng();if(n.item){r=n.item(0)}u._refreshContentEditable();if(!q){u.getWin().focus()}if(k.isGecko||q){m=u.getBody();if(m.setActive&&!k.isIE11){m.setActive()}else{m.focus()}if(q){t.normalize()}}if(r&&r.ownerDocument==s){n=s.body.createControlRange();n.addElement(r);n.select()}}if(k.activeEditor!=u){if((o=k.activeEditor)!=null){o.onDeactivate.dispatch(o,u)}u.onActivate.dispatch(u,o)}k._setActive(u)},execCallback:function(q){var m=this,p=m.settings[q],o;if(!p){return}if(m.callbackLookup&&(o=m.callbackLookup[q])){p=o.func;o=o.scope}if(d(p,"string")){o=p.replace(/\.\w+$/,"");o=o?k.resolve(o):0;p=k.resolve(p);m.callbackLookup=m.callbackLookup||{};m.callbackLookup[q]={func:p,scope:o}}return p.apply(o||m,Array.prototype.slice.call(arguments,1))},translate:function(m){var o=this.settings.language||"en",n=k.i18n;if(!m){return""}return n[o+"."+m]||m.replace(/\{\#([^\}]+)\}/g,function(q,p){return n[o+"."+p]||"{#"+p+"}"})},getLang:function(o,m){return k.i18n[(this.settings.language||"en")+"."+o]||(d(m)?m:"{#"+o+"}")},getParam:function(t,q,m){var r=k.trim,p=d(this.settings[t])?this.settings[t]:q,s;if(m==="hash"){s={};if(d(p,"string")){i(p.indexOf("=")>0?p.split(/[;,](?![^=;,]*(?:[;,]|$))/):p.split(","),function(n){n=n.split("=");if(n.length>1){s[r(n[0])]=r(n[1])}else{s[r(n[0])]=r(n)}})}else{s=p}return s}return p},nodeChanged:function(q){var m=this,n=m.selection,p;if(m.initialized){q=q||{};p=n.getStart()||m.getBody();p=b&&p.ownerDocument!=m.getDoc()?m.getBody():p;q.parents=[];m.dom.getParent(p,function(o){if(o.nodeName=="BODY"){return true}q.parents.push(o)});m.onNodeChange.dispatch(m,q?q.controlManager||m.controlManager:m.controlManager,p,n.isCollapsed(),q)}},addButton:function(n,o){var m=this;m.buttons=m.buttons||{};m.buttons[n]=o},addCommand:function(m,o,n){this.execCommands[m]={func:o,scope:n||this}},addQueryStateHandler:function(m,o,n){this.queryStateCommands[m]={func:o,scope:n||this}},addQueryValueHandler:function(m,o,n){this.queryValueCommands[m]={func:o,scope:n||this}},addShortcut:function(o,q,m,p){var n=this,r;if(n.settings.custom_shortcuts===false){return false}n.shortcuts=n.shortcuts||{};if(d(m,"string")){r=m;m=function(){n.execCommand(r,false,null)}}if(d(m,"object")){r=m;m=function(){n.execCommand(r[0],r[1],r[2])}}i(g(o),function(s){var t={func:m,scope:p||this,desc:n.translate(q),alt:false,ctrl:false,shift:false};i(g(s,"+"),function(u){switch(u){case"alt":case"ctrl":case"shift":t[u]=true;break;default:t.charCode=u.charCodeAt(0);t.keyCode=u.toUpperCase().charCodeAt(0)}});n.shortcuts[(t.ctrl?"ctrl":"")+","+(t.alt?"alt":"")+","+(t.shift?"shift":"")+","+t.keyCode]=t});return true},execCommand:function(u,r,x,m){var p=this,q=0,v,n;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(u)&&(!m||!m.skip_focus)){p.focus()}m=f({},m);p.onBeforeExecCommand.dispatch(p,u,r,x,m);if(m.terminate){return false}if(p.execCallback("execcommand_callback",p.id,p.selection.getNode(),u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(v=p.execCommands[u]){n=v.func.call(v.scope,r,x);if(n!==true){p.onExecCommand.dispatch(p,u,r,x,m);return n}}i(p.plugins,function(o){if(o.execCommand&&o.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);q=1;return false}});if(q){return true}if(p.theme&&p.theme.execCommand&&p.theme.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(p.editorCommands.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}p.getDoc().execCommand(u,r,x);p.onExecCommand.dispatch(p,u,r,x,m)},queryCommandState:function(q){var n=this,r,p;if(n._isHidden()){return}if(r=n.queryStateCommands[q]){p=r.func.call(r.scope);if(p!==true){return p}}r=n.editorCommands.queryCommandState(q);if(r!==-1){return r}try{return this.getDoc().queryCommandState(q)}catch(m){}},queryCommandValue:function(r){var n=this,q,p;if(n._isHidden()){return}if(q=n.queryValueCommands[r]){p=q.func.call(q.scope);if(p!==true){return p}}q=n.editorCommands.queryCommandValue(r);if(d(q)){return q}try{return this.getDoc().queryCommandValue(r)}catch(m){}},show:function(){var m=this;l.show(m.getContainer());l.hide(m.id);m.load()},hide:function(){var m=this,n=m.getDoc();if(b&&n){n.execCommand("SelectAll")}m.save();l.hide(m.getContainer());l.setStyle(m.id,"display",m.orgDisplay)},isHidden:function(){return !l.isHidden(this.id)},setProgressState:function(m,n,p){this.onSetProgressState.dispatch(this,m,n,p);return m},load:function(q){var m=this,p=m.getElement(),n;if(p){q=q||{};q.load=true;n=m.setContent(d(p.value)?p.value:p.innerHTML,q);q.element=p;if(!q.no_events){m.onLoadContent.dispatch(m,q)}q.element=p=null;return n}},save:function(r){var m=this,q=m.getElement(),n,p;if(!q||!m.initialized){return}r=r||{};r.save=true;r.element=q;n=r.content=m.getContent(r);if(!r.no_events){m.onSaveContent.dispatch(m,r)}n=r.content;if(!/TEXTAREA|INPUT/i.test(q.nodeName)){q.innerHTML=n;if(p=l.getParent(m.id,"form")){i(p.elements,function(o){if(o.name==m.id){o.value=n;return false}})}}else{q.value=n}r.element=q=null;return n},setContent:function(r,p){var o=this,n,m=o.getBody(),q;p=p||{};p.format=p.format||"html";p.set=true;p.content=r;if(!p.no_events){o.onBeforeSetContent.dispatch(o,p)}r=p.content;if(!k.isIE&&(r.length===0||/^\s+$/.test(r))){q=o.settings.forced_root_block;if(q){r="<"+q+'>
"}else{r='
'}m.innerHTML=r;o.selection.select(m,true);o.selection.collapse(true);return}if(p.format!=="raw"){r=new k.html.Serializer({},o.schema).serialize(o.parser.parse(r))}p.content=k.trim(r);o.dom.setHTML(m,p.content);if(!p.no_events){o.onSetContent.dispatch(o,p)}if(!o.settings.content_editable||document.activeElement===o.getBody()){o.selection.normalize()}return p.content},getContent:function(o){var n=this,p,m=n.getBody();o=o||{};o.format=o.format||"html";o.get=true;o.getInner=true;if(!o.no_events){n.onBeforeGetContent.dispatch(n,o)}if(o.format=="raw"){p=m.innerHTML}else{if(o.format=="text"){p=m.innerText||m.textContent}else{p=n.serializer.serialize(m,o)}}if(o.format!="text"){o.content=k.trim(p)}else{o.content=p}if(!o.no_events){n.onGetContent.dispatch(n,o)}return o.content},isDirty:function(){var m=this;return k.trim(m.startContent)!=k.trim(m.getContent({format:"raw",no_events:1}))&&!m.isNotDirty},getContainer:function(){var m=this;if(!m.container){m.container=l.get(m.editorContainer||m.id+"_parent")}return m.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return l.get(this.settings.content_element||this.id)},getWin:function(){var m=this,n;if(!m.contentWindow){n=l.get(m.id+"_ifr");if(n){m.contentWindow=n.contentWindow}}return m.contentWindow},getDoc:function(){var m=this,n;if(!m.contentDocument){n=m.getWin();if(n){m.contentDocument=n.document}}return m.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(o,n,q){var m=this,p=m.settings;if(p.urlconverter_callback){return m.execCallback("urlconverter_callback",o,q,true,n)}if(!p.convert_urls||(q&&q.nodeName=="LINK")||o.indexOf("file:")===0){return o}if(p.relative_urls){return m.documentBaseURI.toRelative(o)}o=m.documentBaseURI.toAbsolute(o,p.remove_script_host);return o},addVisual:function(q){var n=this,o=n.settings,p=n.dom,m;q=q||n.getBody();if(!d(n.hasVisual)){n.hasVisual=o.visual}i(p.select("table,a",q),function(s){var r;switch(s.nodeName){case"TABLE":m=o.visual_table_class||"mceItemTable";r=p.getAttrib(s,"border");if(!r||r=="0"){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}return;case"A":if(!p.getAttrib(s,"href",false)){r=p.getAttrib(s,"name")||s.id;m="mceItemAnchor";if(r){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}}return}});n.onVisualAid.dispatch(n,q,n.hasVisual)},remove:function(){var m=this,o=m.getContainer(),n=m.getDoc();if(!m.removed){m.removed=1;if(b&&n){n.execCommand("SelectAll")}m.save();l.setStyle(m.id,"display",m.orgDisplay);if(!m.settings.content_editable){j.unbind(m.getWin());j.unbind(m.getDoc())}j.unbind(m.getBody());j.clear(o);m.execCallback("remove_instance_callback",m);m.onRemove.dispatch(m);m.onExecCommand.listeners=[];k.remove(m);l.remove(o)}},destroy:function(n){var m=this;if(m.destroyed){return}if(a){j.unbind(m.getDoc());j.unbind(m.getWin());j.unbind(m.getBody())}if(!n){k.removeUnload(m.destroy);tinyMCE.onBeforeUnload.remove(m._beforeUnload);if(m.theme&&m.theme.destroy){m.theme.destroy()}m.controlManager.destroy();m.selection.destroy();m.dom.destroy()}if(m.formElement){m.formElement.submit=m.formElement._mceOldSubmit;m.formElement._mceOldSubmit=null}m.contentAreaContainer=m.formElement=m.container=m.settings.content_element=m.bodyElement=m.contentDocument=m.contentWindow=null;if(m.selection){m.selection=m.selection.win=m.selection.dom=m.selection.dom.doc=null}m.destroyed=1},_refreshContentEditable:function(){var n=this,m,o;if(n._isHidden()){m=n.getBody();o=m.parentNode;o.removeChild(m);o.appendChild(m);m.focus()}},_isHidden:function(){var m;if(!a){return 0}m=this.selection.getSel();return(!m||!m.rangeCount||m.rangeCount===0)}})})(tinymce);(function(a){var b=a.each;a.Editor.prototype.setupEvents=function(){var c=this,d=c.settings;b(["onPreInit","onBeforeRenderUI","onPostRender","onLoad","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState","onSetAttrib"],function(e){c[e]=new a.util.Dispatcher(c)});if(d.cleanup_callback){c.onBeforeSetContent.add(function(e,f){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)});c.onPreProcess.add(function(e,f){if(f.set){e.execCallback("cleanup_callback","insert_to_editor_dom",f.node,f)}if(f.get){e.execCallback("cleanup_callback","get_from_editor_dom",f.node,f)}});c.onPostProcess.add(function(e,f){if(f.set){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)}if(f.get){f.content=e.execCallback("cleanup_callback","get_from_editor",f.content,f)}})}if(d.save_callback){c.onGetContent.add(function(e,f){if(f.save){f.content=e.execCallback("save_callback",e.id,f.content,e.getBody())}})}if(d.handle_event_callback){c.onEvent.add(function(f,g,h){if(c.execCallback("handle_event_callback",g,f,h)===false){g.preventDefault();g.stopPropagation()}})}if(d.handle_node_change_callback){c.onNodeChange.add(function(f,e,g){f.execCallback("handle_node_change_callback",f.id,g,-1,-1,true,f.selection.isCollapsed())})}if(d.save_callback){c.onSaveContent.add(function(e,g){var f=e.execCallback("save_callback",e.id,g.content,e.getBody());if(f){g.content=f}})}if(d.onchange_callback){c.onChange.add(function(f,e){f.execCallback("onchange_callback",f,e)})}};a.Editor.prototype.bindNativeEvents=function(){var l=this,f,d=l.settings,e=l.dom,h;h={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function c(i,m){var n=i.type;if(l.removed){return}if(l.onEvent.dispatch(l,i,m)!==false){l[h[i.fakeType||i.type]].dispatch(l,i,m)}}function j(i){l.focus(true)}function k(i,m){if(m.keyCode!=65||!a.VK.metaKeyPressed(m)){l.selection.normalize()}l.nodeChanged()}b(h,function(m,n){var i=d.content_editable?l.getBody():l.getDoc();switch(n){case"contextmenu":e.bind(i,n,c);break;case"paste":e.bind(l.getBody(),n,c);break;case"submit":case"reset":e.bind(l.getElement().form||a.DOM.getParent(l.id,"form"),n,c);break;default:e.bind(i,n,c)}});e.bind(d.content_editable?l.getBody():(a.isGecko?l.getDoc():l.getWin()),"focus",function(i){l.focus(true)});if(d.content_editable&&a.isOpera){e.bind(l.getBody(),"click",j);e.bind(l.getBody(),"keydown",j)}l.onMouseUp.add(k);l.onKeyUp.add(function(i,n){var m=n.keyCode;if((m>=33&&m<=36)||(m>=37&&m<=40)||m==13||m==45||m==46||m==8||(a.isMac&&(m==91||m==93))||n.ctrlKey){k(i,n)}});l.onReset.add(function(){l.setContent(l.startContent,{format:"raw"})});function g(m,i){if(m.altKey||m.ctrlKey||m.metaKey){b(l.shortcuts,function(n){var o=a.isMac?m.metaKey:m.ctrlKey;if(n.ctrl!=o||n.alt!=m.altKey||n.shift!=m.shiftKey){return}if(m.keyCode==n.keyCode||(m.charCode&&m.charCode==n.charCode)){m.preventDefault();if(i){n.func.call(n.scope)}return true}})}}l.onKeyUp.add(function(i,m){g(m)});l.onKeyPress.add(function(i,m){g(m)});l.onKeyDown.add(function(i,m){g(m,true)});if(a.isOpera){l.onClick.add(function(i,m){m.preventDefault()})}}})(tinymce);(function(d){var e=d.each,b,a=true,c=false;d.EditorCommands=function(n){var m=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,q=n.formatter,o;function r(z,y,x){var v;z=z.toLowerCase();if(v=j.exec[z]){v(z,y,x);return a}return c}function l(x){var v;x=x.toLowerCase();if(v=j.state[x]){return v(x)}return -1}function h(x){var v;x=x.toLowerCase();if(v=j.value[x]){return v(x)}return c}function u(v,x){x=x||"exec";e(v,function(z,y){e(y.toLowerCase().split(","),function(A){j[x][A]=z})})}d.extend(this,{execCommand:r,queryCommandState:l,queryCommandValue:h,addCommands:u});function f(y,x,v){if(x===b){x=c}if(v===b){v=null}return n.getDoc().execCommand(y,x,v)}function t(v){return q.match(v)}function s(v,x){q.toggle(v,x?{value:x}:b)}function i(v){o=p.getBookmark(v)}function g(){p.moveToBookmark(o)}u({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(z){var y=n.getDoc(),v;try{f(z)}catch(x){v=a}if(v||!y.queryCommandSupported(z)){if(d.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(A){if(A){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(v){if(p.isCollapsed()){p.select(p.getNode())}f(v);p.collapse(c)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){var x=v.substring(7);e("left,center,right,full".split(","),function(y){if(x!=y){q.remove("align"+y)}});s("align"+x);r("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(y){var v,x;f(y);v=m.getParent(p.getNode(),"ol,ul");if(v){x=v.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(x.nodeName)){i();m.split(x,v);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){s(v)},"ForeColor,HiliteColor,FontName":function(y,x,v){s(y,v)},FontSize:function(z,y,x){var v,A;if(x>=1&&x<=7){A=d.explode(k.font_size_style_values);v=d.explode(k.font_size_classes);if(v){x=v[x-1]||x}else{x=A[x-1]||x}}s(z,x)},RemoveFormat:function(v){q.remove(v)},mceBlockQuote:function(v){s("blockquote")},FormatBlock:function(y,x,v){return s(v||"p")},mceCleanup:function(){var v=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(v)},mceRemoveNode:function(z,y,x){var v=x||p.getNode();if(v!=n.getBody()){i();n.dom.remove(v,a);g()}},mceSelectNodeDepth:function(z,y,x){var v=0;m.getParent(p.getNode(),function(A){if(A.nodeType==1&&v++==x){p.select(A);return c}},n.getBody())},mceSelectNode:function(y,x,v){p.select(v)},mceInsertContent:function(B,I,K){var y,J,E,z,F,G,D,C,L,x,A,M,v,H;y=n.parser;J=new d.html.Serializer({},n.schema);v='\uFEFF';G={content:K,format:"html"};p.onBeforeSetContent.dispatch(p,G);K=G.content;if(K.indexOf("{$caret}")==-1){K+="{$caret}"}K=K.replace(/\{\$caret\}/,v);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}E=p.getNode();G={context:E.nodeName.toLowerCase()};F=y.parse(K,G);A=F.lastChild;if(A.attr("id")=="mce_marker"){D=A;for(A=A.prev;A;A=A.walk(true)){if(A.type==3||!m.isBlock(A.name)){A.parent.insert(D,A,A.name==="br");break}}}if(!G.invalid){K=J.serialize(F);A=E.firstChild;M=E.lastChild;if(!A||(A===M&&A.nodeName==="BR")){m.setHTML(E,K)}else{p.setContent(K)}}else{p.setContent(v);E=p.getNode();z=n.getBody();if(E.nodeType==9){E=A=z}else{A=E}while(A!==z){E=A;A=A.parentNode}K=E==z?z.innerHTML:m.getOuterHTML(E);K=J.serialize(y.parse(K.replace(//i,function(){return J.serialize(F)})));if(E==z){m.setHTML(z,K)}else{m.setOuterHTML(E,K)}}D=m.get("mce_marker");C=m.getRect(D);L=m.getViewPort(n.getWin());if((C.y+C.h>L.y+L.h||C.yL.x+L.w||C.x")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(y,x,v){n.execCommand("mceInsertContent",false,v.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(z,y,x){var v;if(typeof(x)=="string"){x={href:x}}v=m.getParent(p.getNode(),"a");x.href=x.href.replace(" ","%20");if(!v||!x.href){q.remove("link")}if(x.href){q.apply("link",x,v)}},selectAll:function(){var x=m.getRoot(),v=m.createRng();if(p.getRng().setStart){v.setStart(x,0);v.setEnd(x,x.childNodes.length);p.setRng(v)}else{f("SelectAll")}}});u({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(z){var x="align"+z.substring(7);var v=p.isCollapsed()?[m.getParent(p.getNode(),m.isBlock)]:p.getSelectedBlocks();var y=d.map(v,function(A){return !!q.matchNode(A,x)});return d.inArray(y,a)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){return t(v)},mceBlockQuote:function(){return t("blockquote")},Outdent:function(){var v;if(k.inline_styles){if((v=m.getParent(p.getStart(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}if((v=m.getParent(p.getEnd(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}}return l("InsertUnorderedList")||l("InsertOrderedList")||(!k.inline_styles&&!!m.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(x){var v=m.getParent(p.getNode(),"ul,ol");return v&&(x==="insertunorderedlist"&&v.tagName==="UL"||x==="insertorderedlist"&&v.tagName==="OL")}},"state");u({"FontSize,FontName":function(y){var x=0,v;if(v=m.getParent(p.getNode(),"span")){if(y=="fontsize"){x=v.style.fontSize}else{x=v.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return x}},"value");u({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(h){var l,i=0,e=[],g,k,j,f;function c(){return b.trim(h.getContent({format:"raw",no_events:1}).replace(/]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g,""))}function d(){l.typing=false;l.add()}onBeforeAdd=new a(l);k=new a(l);j=new a(l);f=new a(l);k.add(function(m,n){if(m.hasUndo()){return h.onChange.dispatch(h,n,m)}});j.add(function(m,n){return h.onUndo.dispatch(h,n,m)});f.add(function(m,n){return h.onRedo.dispatch(h,n,m)});h.onInit.add(function(){l.add()});h.onBeforeExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.beforeChange()}});h.onExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.add()}});h.onSaveContent.add(d);h.dom.bind(h.dom.getRoot(),"dragend",d);h.dom.bind(h.getBody(),"focusout",function(m){if(!h.removed&&l.typing){d()}});h.onKeyUp.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45||n==13||o.ctrlKey){d()}});h.onKeyDown.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45){if(l.typing){d()}return}if((n<16||n>20)&&n!=224&&n!=91&&!l.typing){l.beforeChange();l.typing=true;l.add()}});h.onMouseDown.add(function(m,n){if(l.typing){d()}});h.addShortcut("ctrl+z","undo_desc","Undo");h.addShortcut("ctrl+y","redo_desc","Redo");l={data:e,typing:false,onBeforeAdd:onBeforeAdd,onAdd:k,onUndo:j,onRedo:f,beforeChange:function(){g=h.selection.getBookmark(2,true)},add:function(p){var m,n=h.settings,o;p=p||{};p.content=c();l.onBeforeAdd.dispatch(l,p);o=e[i];if(o&&o.content==p.content){return null}if(e[i]){e[i].beforeBookmark=g}if(n.custom_undo_redo_levels){if(e.length>n.custom_undo_redo_levels){for(m=0;m0){n=e[--i];h.setContent(n.content,{format:"raw"});h.selection.moveToBookmark(n.beforeBookmark);l.onUndo.dispatch(l,n)}return n},redo:function(){var m;if(i0||this.typing},hasRedo:function(){return i0){g.moveEnd("character",q)}g.select()}catch(n){}}}c.nodeChanged()}}if(b.forced_root_block){c.onKeyUp.add(f);c.onNodeChange.add(f)}};(function(c){var b=c.DOM,a=c.dom.Event,d=c.each,e=c.extend;c.create("tinymce.ControlManager",{ControlManager:function(f,j){var h=this,g;j=j||{};h.editor=f;h.controls={};h.onAdd=new c.util.Dispatcher(h);h.onPostRender=new c.util.Dispatcher(h);h.prefix=j.prefix||f.id+"_";h._cls={};h.onPostRender.add(function(){d(h.controls,function(i){i.postRender()})})},get:function(f){return this.controls[this.prefix+f]||this.controls[f]},setActive:function(h,f){var g=null;if(g=this.get(h)){g.setActive(f)}return g},setDisabled:function(h,f){var g=null;if(g=this.get(h)){g.setDisabled(f)}return g},add:function(g){var f=this;if(g){f.controls[g.id]=g;f.onAdd.dispatch(g,f)}return g},createControl:function(j){var o,k,g,h=this,m=h.editor,n,f;if(!h.controlFactories){h.controlFactories=[];d(m.plugins,function(i){if(i.createControl){h.controlFactories.push(i)}})}n=h.controlFactories;for(k=0,g=n.length;k1||ag==ay||ag.tagName=="BR"){return ag}}}var aq=aa.selection.getRng();var av=aq.startContainer;var ap=aq.endContainer;if(av!=ap&&aq.endOffset===0){var au=ar(av,ap);var at=au.nodeType==3?au.length:au.childNodes.length;aq.setEnd(au,at)}return aq}function ad(at,ay,aw,av,aq){var ap=[],ar=-1,ax,aA=-1,au=-1,az;T(at.childNodes,function(aC,aB){if(aC.nodeName==="UL"||aC.nodeName==="OL"){ar=aB;ax=aC;return false}});T(at.childNodes,function(aC,aB){if(aC.nodeName==="SPAN"&&c.getAttrib(aC,"data-mce-type")=="bookmark"){if(aC.id==ay.id+"_start"){aA=aB}else{if(aC.id==ay.id+"_end"){au=aB}}}});if(ar<=0||(aAar)){T(a.grep(at.childNodes),aq);return 0}else{az=c.clone(aw,X);T(a.grep(at.childNodes),function(aC,aB){if((aAar&&aB>ar)){ap.push(aC);aC.parentNode.removeChild(aC)}});if(aAar){at.insertBefore(az,ax.nextSibling)}}av.push(az);T(ap,function(aB){az.appendChild(aB)});return az}}function an(aq,at,aw){var ap=[],av,ar,au=true;av=am.inline||am.block;ar=c.create(av);ab(ar);N.walk(aq,function(ax){var ay;function az(aA){var aF,aD,aB,aC,aE;aE=au;aF=aA.nodeName.toLowerCase();aD=aA.parentNode.nodeName.toLowerCase();if(aA.nodeType===1&&x(aA)){aE=au;au=x(aA)==="true";aC=true}if(g(aF,"br")){ay=0;if(am.block){c.remove(aA)}return}if(am.wrapper&&y(aA,ae,al)){ay=0;return}if(au&&!aC&&am.block&&!am.wrapper&&I(aF)){aA=c.rename(aA,av);ab(aA);ap.push(aA);ay=0;return}if(am.selector){T(ah,function(aG){if("collapsed" in aG&&aG.collapsed!==ai){return}if(c.is(aA,aG.selector)&&!b(aA)){ab(aA,aG);aB=true}});if(!am.inline||aB){ay=0;return}}if(au&&!aC&&d(av,aF)&&d(aD,av)&&!(!aw&&aA.nodeType===3&&aA.nodeValue.length===1&&aA.nodeValue.charCodeAt(0)===65279)&&!b(aA)&&(!am.inline||!H(aA))){if(!ay){ay=c.clone(ar,X);aA.parentNode.insertBefore(ay,aA);ap.push(ay)}ay.appendChild(aA)}else{if(aF=="li"&&at){ay=ad(aA,at,ar,ap,az)}else{ay=0;T(a.grep(aA.childNodes),az);if(aC){au=aE}ay=0}}}T(ax,az)});if(am.wrap_links===false){T(ap,function(ax){function ay(aC){var aB,aA,az;if(aC.nodeName==="A"){aA=c.clone(ar,X);ap.push(aA);az=a.grep(aC.childNodes);for(aB=0;aB1||!H(az))&&ax===0){c.remove(az,1);return}if(am.inline||am.wrapper){if(!am.exact&&ax===1){az=ay(az)}T(ah,function(aB){T(c.select(aB.inline,az),function(aD){var aC;if(aB.wrap_links===false){aC=aD.parentNode;do{if(aC.nodeName==="A"){return}}while(aC=aC.parentNode)}Z(aB,al,aD,aB.exact?aD:null)})});if(y(az.parentNode,ae,al)){c.remove(az,1);az=0;return C}if(am.merge_with_parents){c.getParent(az.parentNode,function(aB){if(y(aB,ae,al)){c.remove(az,1);az=0;return C}})}if(az&&am.merge_siblings!==false){az=u(E(az),az);az=u(az,E(az,C))}}})}if(am){if(ag){if(ag.nodeType){ac=c.createRng();ac.setStartBefore(ag);ac.setEndAfter(ag);an(p(ac,ah),null,true)}else{an(ag,null,true)}}else{if(!ai||!am.inline||c.select("td.mceSelected,th.mceSelected").length){var ao=aa.selection.getNode();if(!m&&ah[0].defaultBlock&&!c.getParent(ao,c.isBlock)){Y(ah[0].defaultBlock)}aa.selection.setRng(af());ak=r.getBookmark();an(p(r.getRng(C),ah),ak);if(am.styles&&(am.styles.color||am.styles.textDecoration)){a.walk(ao,L,"childNodes");L(ao)}r.moveToBookmark(ak);R(r.getRng(C));aa.nodeChanged()}else{U("apply",ae,al)}}}}function B(ad,am,af){var ag=V(ad),ao=ag[0],ak,aj,ac,al=true;function ae(av){var au,at,ar,aq,ax,aw;if(av.nodeType===3){return}if(av.nodeType===1&&x(av)){ax=al;al=x(av)==="true";aw=true}au=a.grep(av.childNodes);if(al&&!aw){for(at=0,ar=ag.length;at=0;ac--){ab=ah[ac].selector;if(!ab){return C}for(ag=ad.length-1;ag>=0;ag--){if(c.is(ad[ag],ab)){return C}}}}return X}function J(ab,ae,ac){var ad;if(!P){P={};ad={};aa.onNodeChange.addToTop(function(ag,af,ai){var ah=n(ai),aj={};T(P,function(ak,al){T(ah,function(am){if(y(am,al,{},ak.similar)){if(!ad[al]){T(ak,function(an){an(true,{node:am,format:al,parents:ah})});ad[al]=ak}aj[al]=ak;return false}})});T(ad,function(ak,al){if(!aj[al]){delete ad[al];T(ak,function(am){am(false,{node:ai,format:al,parents:ah})})}})})}T(ab.split(","),function(af){if(!P[af]){P[af]=[];P[af].similar=ac}P[af].push(ae)});return this}a.extend(this,{get:V,register:l,apply:Y,remove:B,toggle:F,match:k,matchAll:v,matchNode:y,canApply:z,formatChanged:J});j();W();function h(ab,ac){if(g(ab,ac.inline)){return C}if(g(ab,ac.block)){return C}if(ac.selector){return c.is(ab,ac.selector)}}function g(ac,ab){ac=ac||"";ab=ab||"";ac=""+(ac.nodeName||ac);ab=""+(ab.nodeName||ab);return ac.toLowerCase()==ab.toLowerCase()}function O(ac,ab){var ad=c.getStyle(ac,ab);if(ab=="color"||ab=="backgroundColor"){ad=c.toHex(ad)}if(ab=="fontWeight"&&ad==700){ad="bold"}return""+ad}function q(ab,ac){if(typeof(ab)!="string"){ab=ab(ac)}else{if(ac){ab=ab.replace(/%(\w+)/g,function(ae,ad){return ac[ad]||ae})}}return ab}function f(ab){return ab&&ab.nodeType===3&&/^([\t \r\n]+|)$/.test(ab.nodeValue)}function S(ad,ac,ab){var ae=c.create(ac,ab);ad.parentNode.insertBefore(ae,ad);ae.appendChild(ad);return ae}function p(ab,am,ae){var ap,an,ah,al,ad=ab.startContainer,ai=ab.startOffset,ar=ab.endContainer,ak=ab.endOffset;function ao(aA){var au,ax,az,aw,av,at;au=ax=aA?ad:ar;av=aA?"previousSibling":"nextSibling";at=c.getRoot();function ay(aB){return aB.nodeName=="BR"&&aB.getAttribute("data-mce-bogus")&&!aB.nextSibling}if(au.nodeType==3&&!f(au)){if(aA?ai>0:akan?an:ai];if(ad.nodeType==3){ai=0}}if(ar.nodeType==1&&ar.hasChildNodes()){an=ar.childNodes.length-1;ar=ar.childNodes[ak>an?an:ak-1];if(ar.nodeType==3){ak=ar.nodeValue.length}}function aq(au){var at=au;while(at){if(at.nodeType===1&&x(at)){return x(at)==="false"?at:au}at=at.parentNode}return au}function aj(au,ay,aA){var ax,av,az,at;function aw(aC,aE){var aF,aB,aD=aC.nodeValue;if(typeof(aE)=="undefined"){aE=aA?aD.length:0}if(aA){aF=aD.lastIndexOf(" ",aE);aB=aD.lastIndexOf("\u00a0",aE);aF=aF>aB?aF:aB;if(aF!==-1&&!ae){aF++}}else{aF=aD.indexOf(" ",aE);aB=aD.indexOf("\u00a0",aE);aF=aF!==-1&&(aB===-1||aF0&&ah.node.nodeType===3&&ah.node.nodeValue.charAt(ah.offset-1)===" "){if(ah.offset>1){ar=ah.node;ar.splitText(ah.offset-1)}}}}if(am[0].inline||am[0].block_expand){if(!am[0].inline||(ad.nodeType!=3||ai===0)){ad=ao(true)}if(!am[0].inline||(ar.nodeType!=3||ak===ar.nodeValue.length)){ar=ao()}}if(am[0].selector&&am[0].expand!==X&&!am[0].inline){ad=af(ad,"previousSibling");ar=af(ar,"nextSibling")}if(am[0].block||am[0].selector){ad=ac(ad,"previousSibling");ar=ac(ar,"nextSibling");if(am[0].block){if(!H(ad)){ad=ao(true)}if(!H(ar)){ar=ao()}}}if(ad.nodeType==1){ai=s(ad);ad=ad.parentNode}if(ar.nodeType==1){ak=s(ar)+1;ar=ar.parentNode}return{startContainer:ad,startOffset:ai,endContainer:ar,endOffset:ak}}function Z(ah,ag,ae,ab){var ad,ac,af;if(!h(ae,ah)){return X}if(ah.remove!="all"){T(ah.styles,function(aj,ai){aj=q(aj,ag);if(typeof(ai)==="number"){ai=aj;ab=0}if(!ab||g(O(ab,ai),aj)){c.setStyle(ae,ai,"")}af=1});if(af&&c.getAttrib(ae,"style")==""){ae.removeAttribute("style");ae.removeAttribute("data-mce-style")}T(ah.attributes,function(ak,ai){var aj;ak=q(ak,ag);if(typeof(ai)==="number"){ai=ak;ab=0}if(!ab||g(c.getAttrib(ab,ai),ak)){if(ai=="class"){ak=c.getAttrib(ae,ai);if(ak){aj="";T(ak.split(/\s+/),function(al){if(/mce\w+/.test(al)){aj+=(aj?" ":"")+al}});if(aj){c.setAttrib(ae,ai,aj);return}}}if(ai=="class"){ae.removeAttribute("className")}if(e.test(ai)){ae.removeAttribute("data-mce-"+ai)}ae.removeAttribute(ai)}});T(ah.classes,function(ai){ai=q(ai,ag);if(!ab||c.hasClass(ab,ai)){c.removeClass(ae,ai)}});ac=c.getAttribs(ae);for(ad=0;adad?ad:af]}if(ab.nodeType===3&&ag&&af>=ab.nodeValue.length){ab=new t(ab,aa.getBody()).next()||ab}if(ab.nodeType===3&&!ag&&af===0){ab=new t(ab,aa.getBody()).prev()||ab}return ab}function U(ak,ab,ai){var al="_mce_caret",ac=aa.settings.caret_debug;function ad(ap){var ao=c.create("span",{id:al,"data-mce-bogus":true,style:ac?"color:red":""});if(ap){ao.appendChild(aa.getDoc().createTextNode(G))}return ao}function aj(ap,ao){while(ap){if((ap.nodeType===3&&ap.nodeValue!==G)||ap.childNodes.length>1){return false}if(ao&&ap.nodeType===1){ao.push(ap)}ap=ap.firstChild}return true}function ag(ao){while(ao){if(ao.id===al){return ao}ao=ao.parentNode}}function af(ao){var ap;if(ao){ap=new t(ao,ao);for(ao=ap.current();ao;ao=ap.next()){if(ao.nodeType===3){return ao}}}}function ae(aq,ap){var ar,ao;if(!aq){aq=ag(r.getStart());if(!aq){while(aq=c.get(al)){ae(aq,false)}}}else{ao=r.getRng(true);if(aj(aq)){if(ap!==false){ao.setStartBefore(aq);ao.setEndBefore(aq)}c.remove(aq)}else{ar=af(aq);if(ar.nodeValue.charAt(0)===G){ar=ar.deleteData(0,1)}c.remove(aq,1)}r.setRng(ao)}}function ah(){var aq,ao,av,au,ar,ap,at;aq=r.getRng(true);au=aq.startOffset;ap=aq.startContainer;at=ap.nodeValue;ao=ag(r.getStart());if(ao){av=af(ao)}if(at&&au>0&&au=0;au--){aq.appendChild(c.clone(ay[au],false));aq=aq.firstChild}aq.appendChild(c.doc.createTextNode(G));aq=aq.firstChild;var ar=c.getParent(az,I);if(ar&&c.isEmpty(ar)){az.parentNode.replaceChild(ax,az)}else{c.insertAfter(ax,az)}r.setCursorLocation(aq,1);if(c.isEmpty(az)){c.remove(az)}}}function an(){var ap,ao,aq;ao=ag(r.getStart());if(ao&&!c.isEmpty(ao)){a.walk(ao,function(ar){if(ar.nodeType==1&&ar.id!==al&&!c.isEmpty(ar)){c.setAttrib(ar,"data-mce-bogus",null)}},"childNodes")}}if(!self._hasCaretEvents){aa.onBeforeGetContent.addToTop(function(){var ao=[],ap;if(aj(ag(r.getStart()),ao)){ap=ao.length;while(ap--){c.setAttrib(ao[ap],"data-mce-bogus","1")}}});a.each("onMouseUp onKeyUp".split(" "),function(ao){aa[ao].addToTop(function(){ae();an()})});aa.onKeyDown.addToTop(function(ao,aq){var ap=aq.keyCode;if(ap==8||ap==37||ap==39){ae(ag(r.getStart()))}an()});r.onSetContent.add(an);self._hasCaretEvents=true}if(ak=="apply"){ah()}else{am()}}function R(ac){var ab=ac.startContainer,ai=ac.startOffset,ae,ah,ag,ad,af;if(ab.nodeType==3&&ai>=ab.nodeValue.length){ai=s(ab);ab=ab.parentNode;ae=true}if(ab.nodeType==1){ad=ab.childNodes;ab=ad[Math.min(ai,ad.length-1)];ah=new t(ab,c.getParent(ab,c.isBlock));if(ai>ad.length-1||ae){ah.next()}for(ag=ah.current();ag;ag=ah.next()){if(ag.nodeType==3&&!f(ag)){af=c.create("a",null,G);ag.parentNode.insertBefore(af,ag);ac.setStart(ag,0);r.setRng(ac);c.remove(af);return}}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}if(c.inline_styles){h=e.explode(c.font_size_legacy_values);d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size,10)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}});(function(b){var a=b.dom.TreeWalker;b.EnterKey=function(f){var i=f.dom,e=f.selection,d=f.settings,h=f.undoManager,c=f.schema.getNonEmptyElements();function g(B){var v=e.getRng(true),G,j,A,u,p,M,C,o,k,n,t,J,x,D;function E(N){return N&&i.isBlock(N)&&!/^(TD|TH|CAPTION|FORM)$/.test(N.nodeName)&&!/^(fixed|absolute)/i.test(N.style.position)&&i.getContentEditable(N)!=="true"}function F(O){var N;if(b.isIE&&!b.isIE11&&i.isBlock(O)){N=e.getRng();O.appendChild(i.create("span",null,"\u00a0"));e.select(O);O.lastChild.outerHTML="";e.setRng(N)}}function z(P){var O=P,Q=[],N;while(O=O.firstChild){if(i.isBlock(O)){return}if(O.nodeType==1&&!c[O.nodeName.toLowerCase()]){Q.push(O)}}N=Q.length;while(N--){O=Q[N];if(!O.hasChildNodes()||(O.firstChild==O.lastChild&&O.firstChild.nodeValue==="")){i.remove(O)}else{if(O.nodeName=="A"&&(O.innerText||O.textContent)===" "){i.remove(O)}}}}function m(O){var T,R,N,U,S,Q=O,P;N=i.createRng();if(O.hasChildNodes()){T=new a(O,O);while(R=T.current()){if(R.nodeType==3){N.setStart(R,0);N.setEnd(R,0);break}if(c[R.nodeName.toLowerCase()]){N.setStartBefore(R);N.setEndBefore(R);break}Q=R;R=T.next()}if(!R){N.setStart(Q,0);N.setEnd(Q,0)}}else{if(O.nodeName=="BR"){if(O.nextSibling&&i.isBlock(O.nextSibling)){if(!M||M<9){P=i.create("br");O.parentNode.insertBefore(P,O)}N.setStartBefore(O);N.setEndBefore(O)}else{N.setStartAfter(O);N.setEndAfter(O)}}else{N.setStart(O,0);N.setEnd(O,0)}}e.setRng(N);i.remove(P);S=i.getViewPort(f.getWin());U=i.getPos(O).y;if(US.y+S.h){f.getWin().scrollTo(0,U'}return R}function q(Q){var P,O,N;if(A.nodeType==3&&(Q?u>0:u0){return true}}}function L(){var P,O,N;if(A&&A.nodeType==3&&u>=A.nodeValue.length){if((!b.isIE||b.isIE11)&&!y()){P=i.create("br");v.insertNode(P);v.setStartAfter(P);v.setEndAfter(P);O=true}}P=i.create("br");v.insertNode(P);if((b.isIE&&!b.isIE11)&&t=="PRE"&&(!M||M<8)){P.parentNode.insertBefore(i.doc.createTextNode("\r"),P)}N=i.create("span",{}," ");P.parentNode.insertBefore(N,P);e.scrollIntoView(N);i.remove(N);if(!O){v.setStartAfter(P);v.setEndAfter(P)}else{v.setStartBefore(P);v.setEndBefore(P)}e.setRng(v);h.add()}function s(N){do{if(N.nodeType===3){N.nodeValue=N.nodeValue.replace(/^[\r\n]+/,"")}N=N.firstChild}while(N)}function K(P){var N=i.getRoot(),O,Q;O=P;while(O!==N&&i.getContentEditable(O)!=="false"){if(i.getContentEditable(O)==="true"){Q=O}O=O.parentNode}return O!==N?Q:N}function I(O){var N;if(!b.isIE||b.isIE11){O.normalize();N=O.lastChild;if(!N||(/^(left|right)$/gi.test(i.getStyle(N,"float",true)))){i.add(O,"br")}}}if(!v.collapsed){f.execCommand("Delete");return}if(B.isDefaultPrevented()){return}A=v.startContainer;u=v.startOffset;x=(d.force_p_newlines?"p":"")||d.forced_root_block;x=x?x.toUpperCase():"";M=i.doc.documentMode;C=B.shiftKey;if(A.nodeType==1&&A.hasChildNodes()){D=u>A.childNodes.length-1;A=A.childNodes[Math.min(u,A.childNodes.length-1)]||A;if(D&&A.nodeType==3){u=A.nodeValue.length}else{u=0}}j=K(A);if(!j){return}h.beforeChange();if(!i.isBlock(j)&&j!=i.getRoot()){if(!x||C){L()}return}if((x&&!C)||(!x&&C)){A=l(A,u)}p=i.getParent(A,i.isBlock);n=p?i.getParent(p.parentNode,i.isBlock):null;t=p?p.nodeName.toUpperCase():"";J=n?n.nodeName.toUpperCase():"";if(J=="LI"&&!B.ctrlKey){p=n;t=J}if(t=="LI"){if(!x&&C){L();return}if(i.isEmpty(p)){if(/^(UL|OL|LI)$/.test(n.parentNode.nodeName)){return false}H();return}}if(t=="PRE"&&d.br_in_pre!==false){if(!C){L();return}}else{if((!x&&!C&&t!="LI")||(x&&C)){L();return}}x=x||"P";if(q()){if(/^(H[1-6]|PRE)$/.test(t)&&J!="HGROUP"){o=r(x)}else{o=r()}if(d.end_container_on_empty_block&&E(n)&&i.isEmpty(p)){o=i.split(n,p)}else{i.insertAfter(o,p)}m(o)}else{if(q(true)){o=p.parentNode.insertBefore(r(),p);F(o)}else{G=v.cloneRange();G.setEndAfter(p);k=G.extractContents();s(k);o=k.firstChild;i.insertAfter(k,p);z(o);I(p);m(o)}}i.setAttrib(o,"id","");h.add()}f.onKeyDown.add(function(k,j){if(j.keyCode==13){if(g(j)!==false){j.preventDefault()}}})}})(tinymce); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/tinymce3/tiny_mce_popup.js b/src/Umbraco.Web.UI/umbraco_client/tinymce3/tiny_mce_popup.js deleted file mode 100644 index 6dcfafc8ede1..000000000000 --- a/src/Umbraco.Web.UI/umbraco_client/tinymce3/tiny_mce_popup.js +++ /dev/null @@ -1,5 +0,0 @@ - -// Uncomment and change this document.domain value if you are loading the script cross subdomains -// document.domain = 'moxiecode.com'; - -var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document,{ownEvents:true,proxy:tinyMCEPopup._eventProxy});b.dom.bind(window,"ready",b._onDOMLoaded,b);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false&&b.editor.settings.language_load!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('"; return html.Raw(str); diff --git a/src/Umbraco.Web/HtmlStringUtilities.cs b/src/Umbraco.Web/HtmlStringUtilities.cs index 24a643b5b0cb..2caeb012bcd6 100644 --- a/src/Umbraco.Web/HtmlStringUtilities.cs +++ b/src/Umbraco.Web/HtmlStringUtilities.cs @@ -3,8 +3,10 @@ using System.IO; using System.Linq; using System.Text; +using System.Text.RegularExpressions; using System.Web; using HtmlAgilityPack; +using Umbraco.Web.WebApi.Filters; namespace Umbraco.Web { @@ -23,13 +25,14 @@ public sealed class HtmlStringUtilities /// The text with text line breaks replaced with html linebreaks (
)
public string ReplaceLineBreaksForHtml(string text) { - return text.Replace("\n", "
\n"); + return text.Replace("\r\n", @"
").Replace("\n", @"
").Replace("\r", @"
"); } public HtmlString StripHtmlTags(string html, params string[] tags) { var doc = new HtmlDocument(); doc.LoadHtml("

" + html + "

"); + var targets = new List(); var nodes = doc.DocumentNode.FirstChild.SelectNodes(".//*"); @@ -55,7 +58,7 @@ public HtmlString StripHtmlTags(string html, params string[] tags) { return new HtmlString(html); } - return new HtmlString(doc.DocumentNode.FirstChild.InnerHtml); + return new HtmlString(doc.DocumentNode.FirstChild.InnerHtml.Replace(" ", " ")); } internal string Join(string seperator, params object[] args) @@ -85,8 +88,12 @@ internal string Coalesce(params object[] args) public IHtmlString Truncate(string html, int length, bool addElipsis, bool treatTagsAsContent) { + const string hellip = "…"; + using (var outputms = new MemoryStream()) { + bool lengthReached = false; + using (var outputtw = new StreamWriter(outputms)) { using (var ms = new MemoryStream()) @@ -101,12 +108,11 @@ public IHtmlString Truncate(string html, int length, bool addElipsis, bool treat using (TextReader tr = new StreamReader(ms)) { bool isInsideElement = false, - lengthReached = false, insideTagSpaceEncountered = false, isTagClose = false; int ic = 0, - currentLength = 0, + //currentLength = 0, currentTextLength = 0; string currentTag = string.Empty, @@ -141,6 +147,10 @@ public IHtmlString Truncate(string html, int length, bool addElipsis, bool treat { string thisTag = tagStack.Pop(); outputtw.Write(""); + if (treatTagsAsContent) + { + currentTextLength++; + } } if (!isTagClose && currentTag.Length > 0) { @@ -148,6 +158,10 @@ public IHtmlString Truncate(string html, int length, bool addElipsis, bool treat { tagStack.Push(currentTag); outputtw.Write("<" + currentTag); + if (treatTagsAsContent) + { + currentTextLength++; + } if (!string.IsNullOrEmpty(tagContents)) { if (tagContents.EndsWith("/")) @@ -205,7 +219,7 @@ public IHtmlString Truncate(string html, int length, bool addElipsis, bool treat { var charToWrite = (char)ic; outputtw.Write(charToWrite); - currentLength++; + //currentLength++; } } @@ -221,7 +235,7 @@ public IHtmlString Truncate(string html, int length, bool addElipsis, bool treat // Reached truncate limit. if (addElipsis) { - outputtw.Write("…"); + outputtw.Write(hellip); } lengthReached = true; } @@ -235,10 +249,64 @@ public IHtmlString Truncate(string html, int length, bool addElipsis, bool treat outputms.Position = 0; using (TextReader outputtr = new StreamReader(outputms)) { - return new HtmlString(outputtr.ReadToEnd().Replace(" ", " ").Trim()); + string result = string.Empty; + + string firstTrim = outputtr.ReadToEnd().Replace(" ", " ").Trim(); + + //Check to see if there is an empty char between the hellip and the output string + //if there is, remove it + if (addElipsis && lengthReached && string.IsNullOrWhiteSpace(firstTrim) == false) + { + result = firstTrim[firstTrim.Length - hellip.Length - 1] == ' ' ? firstTrim.Remove(firstTrim.Length - hellip.Length - 1, 1) : firstTrim; + } + else + { + result = firstTrim; + } + + return new HtmlString(result); } } } } + + /// + /// Returns the length of the words from a html block + /// + /// Html text + /// Amount of words you would like to measure + /// + /// + public int WordsToLength(string html, int words) + { + HtmlDocument doc = new HtmlDocument(); + doc.LoadHtml(html); + + int wordCount = 0, + length = 0, + maxWords = words; + + html = StripHtmlTags(html, null).ToString(); + + while (length < html.Length) + { + // Check to see if the current wordCount reached the maxWords allowed + if (wordCount.Equals(maxWords)) break; + // Check if current char is part of a word + while (length < html.Length && char.IsWhiteSpace(html[length]) == false) + { + length++; + } + + wordCount++; + + // Skip whitespace until the next word + while (length < html.Length && char.IsWhiteSpace(html[length]) && wordCount.Equals(maxWords) == false) + { + length++; + } + } + return length; + } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web/HttpCookieExtensions.cs b/src/Umbraco.Web/HttpCookieExtensions.cs index 7aec1466daf5..d2133927a016 100644 --- a/src/Umbraco.Web/HttpCookieExtensions.cs +++ b/src/Umbraco.Web/HttpCookieExtensions.cs @@ -16,6 +16,40 @@ namespace Umbraco.Web /// internal static class HttpCookieExtensions { + /// + /// Retrieves an individual cookie from the cookies collection + /// + /// + /// + /// + /// + /// Adapted from: https://stackoverflow.com/a/29057304/5018 because there's an issue with .NET WebApi cookie parsing logic + /// when using requestHeaders.GetCookies() when an invalid cookie name is present. + /// + public static string GetCookieValue(this HttpRequestHeaders requestHeaders, string cookieName) + { + foreach (var header in requestHeaders) + { + if (header.Key.Equals("Cookie", StringComparison.InvariantCultureIgnoreCase) == false) + continue; + + var cookiesHeaderValue = header.Value.FirstOrDefault(); + if (cookiesHeaderValue == null) + return null; + + var cookieCollection = cookiesHeaderValue.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); + foreach (var cookieNameValue in cookieCollection) + { + var parts = cookieNameValue.Split(new[] { '=' }, StringSplitOptions.RemoveEmptyEntries); + if (parts.Length != 2) continue; + if (parts[0].Trim().Equals(cookieName, StringComparison.InvariantCultureIgnoreCase)) + return parts[1].Trim(); + } + } + + return null; + } + /// /// Removes the cookie from the request and the response if it exists /// diff --git a/src/Umbraco.Web/Install/Controllers/InstallController.cs b/src/Umbraco.Web/Install/Controllers/InstallController.cs index 360e35efda54..7e3336e1e8bb 100644 --- a/src/Umbraco.Web/Install/Controllers/InstallController.cs +++ b/src/Umbraco.Web/Install/Controllers/InstallController.cs @@ -47,6 +47,8 @@ public ActionResult Index() // Update ClientDependency version var clientDependencyConfig = new ClientDependencyConfiguration(ApplicationContext.Current.ProfilingLogger.Logger); var clientDependencyUpdated = clientDependencyConfig.IncreaseVersionNumber(); + // Delete ClientDependency temp directories to make sure we get fresh caches + var clientDependencyTempFilesDeleted = clientDependencyConfig.ClearTempFiles(HttpContext); var result = _umbracoContext.Security.ValidateCurrentUser(false); diff --git a/src/Umbraco.Web/Install/FilePermissionHelper.cs b/src/Umbraco.Web/Install/FilePermissionHelper.cs index 87491b93a86b..a91bd6d30600 100644 --- a/src/Umbraco.Web/Install/FilePermissionHelper.cs +++ b/src/Umbraco.Web/Install/FilePermissionHelper.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Web; using System.IO; +using System.Security.AccessControl; using Umbraco.Core.IO; using umbraco; @@ -37,8 +38,19 @@ public static bool RunFilePermissionTestSuite(out Dictionary errorReport) + + /// + /// This will test the directories for write access + /// + /// + /// + /// + /// If this is false, the easiest way to test for write access is to write a temp file, however some folder will cause + /// an App Domain restart if a file is written to the folder, so in that case we need to use the ACL APIs which aren't as + /// reliable but we cannot write a file since it will cause an app domain restart. + /// + /// + public static bool TestDirectories(string[] directories, out List errorReport, bool writeCausesRestart = false) { errorReport = new List(); bool succes = true; @@ -46,7 +58,11 @@ public static bool TestDirectories(string[] directories, out List errorR { if (Directory.Exists(dir) == false) continue; - bool result = SaveAndDeleteFile(IOHelper.MapPath(dir + "/configWizardPermissionTest.txt")); + var folder = IOHelper.MapPath(dir); + + var result = writeCausesRestart + ? HasWritePermissionOnDir(folder) + : SaveAndDeleteFile(Path.Combine(folder, "configWizardPermissionTest.txt")); if (result == false) { @@ -131,7 +147,42 @@ private static bool SaveAndDeleteFile(string file) { return false; } + } + + private static bool HasWritePermissionOnDir(string path) + { + var writeAllow = false; + var writeDeny = false; + var accessControlList = Directory.GetAccessControl(path); + if (accessControlList == null) + return false; + AuthorizationRuleCollection accessRules; + try + { + accessRules = accessControlList.GetAccessRules(true, true, typeof(System.Security.Principal.SecurityIdentifier)); + if (accessRules == null) + return false; + } + catch (Exception e) + { + //This is not 100% accurate btw because it could turn out that the current user doesn't + //have access to read the current permissions but does have write access. + //I think this is an edge case however + return false; + } + + foreach (FileSystemAccessRule rule in accessRules) + { + if ((FileSystemRights.Write & rule.FileSystemRights) != FileSystemRights.Write) + continue; + + if (rule.AccessControlType == AccessControlType.Allow) + writeAllow = true; + else if (rule.AccessControlType == AccessControlType.Deny) + writeDeny = true; + } + return writeAllow && writeDeny == false; } private static bool OpenFileForWrite(string file) diff --git a/src/Umbraco.Web/Install/InstallHelper.cs b/src/Umbraco.Web/Install/InstallHelper.cs index 6c088365a183..a3069342fcb8 100644 --- a/src/Umbraco.Web/Install/InstallHelper.cs +++ b/src/Umbraco.Web/Install/InstallHelper.cs @@ -48,6 +48,7 @@ public IEnumerable GetAllSteps() new MajorVersion7UpgradeReport(_umbContext.Application), new Version73FileCleanup(_umbContext.HttpContext, _umbContext.Application.ProfilingLogger.Logger), new DatabaseConfigureStep(_umbContext.Application), + new ConfigureMachineKey(_umbContext.Application), new DatabaseInstallStep(_umbContext.Application), new DatabaseUpgradeStep(_umbContext.Application), new StarterKitDownloadStep(_umbContext.Application, _umbContext.Security, _umbContext.HttpContext), diff --git a/src/Umbraco.Web/Install/InstallSteps/ConfigureMachineKey.cs b/src/Umbraco.Web/Install/InstallSteps/ConfigureMachineKey.cs new file mode 100644 index 000000000000..e4038df4aba7 --- /dev/null +++ b/src/Umbraco.Web/Install/InstallSteps/ConfigureMachineKey.cs @@ -0,0 +1,75 @@ +using System; +using System.Configuration; +using System.Linq; +using System.Web.Configuration; +using System.Xml.Linq; +using Umbraco.Core; +using Umbraco.Core.IO; +using Umbraco.Core.Security; +using Umbraco.Web.Install.Models; + +namespace Umbraco.Web.Install.InstallSteps +{ + [InstallSetupStep(InstallationType.NewInstall, + "ConfigureMachineKey", "machinekey", 2, + "Updating some security settings...", + PerformsAppRestart = true)] + internal class ConfigureMachineKey : InstallSetupStep + { + private readonly ApplicationContext _appContext; + + public ConfigureMachineKey(ApplicationContext appContext) + { + if (appContext == null) throw new ArgumentNullException("appContext"); + _appContext = appContext; + } + + public override string View + { + get { return HasMachineKey() == false ? base.View : ""; } + } + + /// + /// Don't display the view or execute if a machine key already exists + /// + /// + private bool HasMachineKey() + { + var section = (MachineKeySection)WebConfigurationManager.GetSection("system.web/machineKey"); + return section.ElementInformation.Source != null; + } + + /// + /// The step execution method + /// + /// + /// + public override InstallSetupResult Execute(bool? model) + { + if (model.HasValue && model.Value == false) return null; + + //install the machine key + var fileName = IOHelper.MapPath(string.Format("{0}/web.config", SystemDirectories.Root)); + var xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace); + + var systemWeb = xml.Root.DescendantsAndSelf("system.web").Single(); + + // Update appSetting if it exists, or else create a new appSetting for the given key and value + var machineKey = systemWeb.Descendants("machineKey").FirstOrDefault(); + if (machineKey != null) return null; + + var generator = new MachineKeyGenerator(); + var generatedSection = generator.GenerateConfigurationBlock(); + systemWeb.Add(XElement.Parse(generatedSection)); + + xml.Save(fileName, SaveOptions.DisableFormatting); + + return null; + } + + public override bool RequiresExecution(bool? model) + { + return HasMachineKey() == false; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Install/InstallSteps/DatabaseConfigureStep.cs b/src/Umbraco.Web/Install/InstallSteps/DatabaseConfigureStep.cs index ce28a26176d9..9f74596ca23f 100644 --- a/src/Umbraco.Web/Install/InstallSteps/DatabaseConfigureStep.cs +++ b/src/Umbraco.Web/Install/InstallSteps/DatabaseConfigureStep.cs @@ -8,6 +8,7 @@ using System.Threading.Tasks; using Umbraco.Core; using Umbraco.Core.Configuration; +using Umbraco.Core.Logging; using Umbraco.Core.Persistence; using Umbraco.Web.Install.Models; @@ -94,8 +95,9 @@ private bool ShouldDisplayView() result.DetermineInstalledVersion(); return false; } - catch (Exception) + catch (Exception ex) { + _applicationContext.ProfilingLogger.Logger.Error("An error occurred, reconfiguring...", ex); //something went wrong, could not connect so probably need to reconfigure return true; } diff --git a/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs b/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs index 7a6a54f9e7c2..2d0daf1aa9af 100644 --- a/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs +++ b/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs @@ -32,6 +32,7 @@ public NewInstallStep(HttpContextBase http, ApplicationContext applicationContex _applicationContext = applicationContext; } + //TODO: Change all logic in this step to use ASP.NET Identity NOT MembershipProviders private MembershipProvider CurrentProvider { get diff --git a/src/Umbraco.Web/MembershipProviderExtensions.cs b/src/Umbraco.Web/MembershipProviderExtensions.cs index 2a32384732b6..0aec00eb766c 100644 --- a/src/Umbraco.Web/MembershipProviderExtensions.cs +++ b/src/Umbraco.Web/MembershipProviderExtensions.cs @@ -28,7 +28,8 @@ public static IDictionary GetConfiguration( {"enableReset", canReset}, {"enablePasswordRetrieval", membershipProvider.EnablePasswordRetrieval}, {"requiresQuestionAnswer", membershipProvider.RequiresQuestionAndAnswer}, - {"allowManuallyChangingPassword", baseProvider != null && baseProvider.AllowManuallyChangingPassword} + {"allowManuallyChangingPassword", baseProvider != null && baseProvider.AllowManuallyChangingPassword}, + {"minNonAlphaNumericChars", membershipProvider.MinRequiredNonAlphanumericCharacters} //TODO: Inject the other parameters in here to change the behavior of this control - based on the membership provider settings. }; } diff --git a/src/Umbraco.Web/ModelStateExtensions.cs b/src/Umbraco.Web/ModelStateExtensions.cs index 5df479ce76fe..a36f3c89f6c8 100644 --- a/src/Umbraco.Web/ModelStateExtensions.cs +++ b/src/Umbraco.Web/ModelStateExtensions.cs @@ -61,7 +61,7 @@ internal static void AddPropertyError(this System.Web.Http.ModelBinding.ModelSta { //if there are no member names supplied then we assume that the validation message is for the overall property // not a sub field on the property editor - if (!result.MemberNames.Any()) + if (result.MemberNames.Any() == false) { //add a model state error for the entire property modelState.AddModelError(string.Format("{0}.{1}", "_Properties", propertyAlias), result.ErrorMessage); diff --git a/src/Umbraco.Web/Models/ChangingPasswordModel.cs b/src/Umbraco.Web/Models/ChangingPasswordModel.cs index bc11a53316b8..f2004bb36df8 100644 --- a/src/Umbraco.Web/Models/ChangingPasswordModel.cs +++ b/src/Umbraco.Web/Models/ChangingPasswordModel.cs @@ -20,8 +20,21 @@ public class ChangingPasswordModel public string OldPassword { get; set; } /// - /// Set to true if the password is to be reset - only valid when: EnablePasswordReset = true + /// Set to true if the password is to be reset /// + /// + /// + /// This operator is different between using ASP.NET Identity APIs and Membership APIs. + /// + /// + /// When using Membership APIs, this is only valid when: EnablePasswordReset = true and it will reset the password to something auto generated. + /// + /// + /// When using ASP.NET Identity APIs this needs to be set if an administrator user that has access to the Users section is changing another users + /// password. This flag is required to indicate that the oldPassword value is not required and that we are in fact performing a password reset and + /// then a password change if the executing user has access to do so. + /// + /// [DataMember(Name = "reset")] public bool? Reset { get; set; } diff --git a/src/Umbraco.Web/Models/ContentEditing/AssignedContentPermissions.cs b/src/Umbraco.Web/Models/ContentEditing/AssignedContentPermissions.cs new file mode 100644 index 000000000000..dc071052cc30 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/AssignedContentPermissions.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// The permissions assigned to a content node + /// + /// + /// The underlying data such as Name, etc... is that of the Content item + /// + [DataContract(Name = "contentPermissions", Namespace = "")] + public class AssignedContentPermissions : EntityBasic + { + /// + /// The assigned permissions to the content item organized by permission group name + /// + [DataMember(Name = "permissions")] + public IDictionary> AssignedPermissions { get; set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/AssignedUserGroupPermissions.cs b/src/Umbraco.Web/Models/ContentEditing/AssignedUserGroupPermissions.cs new file mode 100644 index 000000000000..5428de883f1c --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/AssignedUserGroupPermissions.cs @@ -0,0 +1,38 @@ +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// The user group permissions assigned to a content node + /// + /// + /// The underlying data such as Name, etc... is that of the User Group + /// + [DataContract(Name = "userGroupPermissions", Namespace = "")] + public class AssignedUserGroupPermissions : EntityBasic + { + /// + /// The assigned permissions for the user group organized by permission group name + /// + [DataMember(Name = "permissions")] + public IDictionary> AssignedPermissions { get; set; } + + /// + /// The default permissions for the user group organized by permission group name + /// + [DataMember(Name = "defaultPermissions")] + public IDictionary> DefaultPermissions { get; set; } + + public static IDictionary> ClonePermissions(IDictionary> permissions) + { + var result = new Dictionary>(); + foreach (var permission in permissions) + { + result[permission.Key] = new List(permission.Value.Select(x => (Permission)x.Clone())); + } + return result; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentItemBasic.cs b/src/Umbraco.Web/Models/ContentEditing/ContentItemBasic.cs index 74c6a3ea7eb3..18229d94d830 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentItemBasic.cs +++ b/src/Umbraco.Web/Models/ContentEditing/ContentItemBasic.cs @@ -29,10 +29,10 @@ public class ContentItemBasic : EntityBasic public bool HasPublishedVersion { get; set; } [DataMember(Name = "owner")] - public UserBasic Owner { get; set; } + public UserProfile Owner { get; set; } [DataMember(Name = "updater")] - public UserBasic Updater { get; set; } + public UserProfile Updater { get; set; } [DataMember(Name = "contentTypeAlias", IsRequired = true)] [Required(AllowEmptyStrings = false)] @@ -89,7 +89,7 @@ public virtual IEnumerable Properties /// /// This is not used for outgoing model information. /// - [JsonIgnore] + [IgnoreDataMember] internal TPersisted PersistedContent { get; set; } /// @@ -100,7 +100,7 @@ public virtual IEnumerable Properties /// instead of having to look up all the data individually. /// This is not used for outgoing model information. /// - [JsonIgnore] + [IgnoreDataMember] internal ContentItemDto ContentDto { get; set; } diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentItemDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/ContentItemDisplay.cs index 2615c8774d01..5d424e4dd32c 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentItemDisplay.cs +++ b/src/Umbraco.Web/Models/ContentEditing/ContentItemDisplay.cs @@ -1,15 +1,7 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Net.Http.Formatting; using System.Runtime.Serialization; -using System.Web.Http; -using System.Web.Http.ModelBinding; -using Umbraco.Core; using Umbraco.Core.Models; -using Umbraco.Core.Models.Validation; -using Umbraco.Web.Models.Trees; -using Umbraco.Web.Trees; namespace Umbraco.Web.Models.ContentEditing { @@ -56,7 +48,9 @@ public ContentItemDisplay() /// Each char represents a button which we can then map on the front-end to the correct actions /// [DataMember(Name = "allowedActions")] - public IEnumerable AllowedActions { get; set; } - + public IEnumerable AllowedActions { get; set; } + + [DataMember(Name = "isBlueprint")] + public bool IsBlueprint { get; set; } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentTypeBasic.cs b/src/Umbraco.Web/Models/ContentEditing/ContentTypeBasic.cs index 8dde1f1f970e..938c7de6575d 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentTypeBasic.cs +++ b/src/Umbraco.Web/Models/ContentEditing/ContentTypeBasic.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; @@ -18,6 +19,11 @@ namespace Umbraco.Web.Models.ContentEditing [DataContract(Name = "contentType", Namespace = "")] public class ContentTypeBasic : EntityBasic { + public ContentTypeBasic() + { + Blueprints = new Dictionary(); + } + /// /// Overridden to apply our own validation attributes since this is not always required for other classes /// @@ -105,5 +111,9 @@ public string ThumbnailFilePath : IOHelper.ResolveUrl("~/umbraco/images/thumbnails/" + Thumbnail); } } + + [DataMember(Name = "blueprints")] + [ReadOnly(true)] + public IDictionary Blueprints { get; set; } } } diff --git a/src/Umbraco.Web/Models/ContentEditing/DataTypeSave.cs b/src/Umbraco.Web/Models/ContentEditing/DataTypeSave.cs index 16c7cade0b3c..9b6c0df11083 100644 --- a/src/Umbraco.Web/Models/ContentEditing/DataTypeSave.cs +++ b/src/Umbraco.Web/Models/ContentEditing/DataTypeSave.cs @@ -31,13 +31,13 @@ public class DataTypeSave : EntityBasic /// /// The real persisted data type /// - [JsonIgnore] + [IgnoreDataMember] internal IDataTypeDefinition PersistedDataType { get; set; } /// /// The PropertyEditor assigned /// - [JsonIgnore] + [IgnoreDataMember] internal PropertyEditor PropertyEditor { get; set; } } diff --git a/src/Umbraco.Web/Models/ContentEditing/EntityTypeSearchResult.cs b/src/Umbraco.Web/Models/ContentEditing/EntityTypeSearchResult.cs deleted file mode 100644 index 47dd5005a641..000000000000 --- a/src/Umbraco.Web/Models/ContentEditing/EntityTypeSearchResult.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Collections.Generic; -using System.Runtime.Serialization; -using Examine; - -namespace Umbraco.Web.Models.ContentEditing -{ - /// - /// Represents a search result by entity type - /// - [DataContract(Name = "searchResult", Namespace = "")] - public class EntityTypeSearchResult - { - [DataMember(Name = "type")] - public string EntityType { get; set; } - - [DataMember(Name = "results")] - public IEnumerable Results { get; set; } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/Permission.cs b/src/Umbraco.Web/Models/ContentEditing/Permission.cs new file mode 100644 index 000000000000..9c40dc0aa657 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/Permission.cs @@ -0,0 +1,38 @@ +using System; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + [DataContract(Name = "permission", Namespace = "")] + public class Permission : ICloneable + { + [DataMember(Name = "name")] + public string Name { get; set; } + + [DataMember(Name = "description")] + public string Description { get; set; } + + [DataMember(Name = "checked")] + public bool Checked { get; set; } + + [DataMember(Name = "icon")] + public string Icon { get; set; } + + /// + /// We'll use this to map the categories but it wont' be returned in the json + /// + [IgnoreDataMember] + internal string Category { get; set; } + + /// + /// The letter from the IAction + /// + [DataMember(Name = "permissionCode")] + public string PermissionCode { get; set; } + + public object Clone() + { + return this.MemberwiseClone(); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/SearchResultItem.cs b/src/Umbraco.Web/Models/ContentEditing/SearchResultItem.cs index b846812e8897..495c5d0c309c 100644 --- a/src/Umbraco.Web/Models/ContentEditing/SearchResultItem.cs +++ b/src/Umbraco.Web/Models/ContentEditing/SearchResultItem.cs @@ -1,25 +1,15 @@ -namespace Umbraco.Web.Models.ContentEditing -{ - public class SearchResultItem - { - /// - /// The string representation of the ID, used for Web responses - /// - public string Id { get; set; } - - /// - /// The name/title of the search result item - /// - public string Title { get; set; } - - /// - /// The rank of the search result - /// - public int Rank { get; set; } +using System.Runtime.Serialization; +namespace Umbraco.Web.Models.ContentEditing +{ + [DataContract(Name = "searchResult", Namespace = "")] + public class SearchResultItem : EntityBasic + { /// - /// Description/Synopsis of the item + /// The score of the search result /// - public string Description { get; set; } + [DataMember(Name = "score")] + public float Score { get; set; } + } } \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/Section.cs b/src/Umbraco.Web/Models/ContentEditing/Section.cs index b0c18392978c..06ece10ddf15 100644 --- a/src/Umbraco.Web/Models/ContentEditing/Section.cs +++ b/src/Umbraco.Web/Models/ContentEditing/Section.cs @@ -23,6 +23,13 @@ public class Section [DataMember(Name = "alias")] public string Alias { get; set; } + + /// + /// In some cases a custom route path can be specified so that when clicking on a section it goes to this + /// path instead of the normal dashboard path + /// + [DataMember(Name = "routePath")] + public string RoutePath { get; set; } } } diff --git a/src/Umbraco.Web/Models/ContentEditing/TabbedContentItem.cs b/src/Umbraco.Web/Models/ContentEditing/TabbedContentItem.cs index b18118d8c27d..13c52d2a3a63 100644 --- a/src/Umbraco.Web/Models/ContentEditing/TabbedContentItem.cs +++ b/src/Umbraco.Web/Models/ContentEditing/TabbedContentItem.cs @@ -29,7 +29,7 @@ protected TabbedContentItem() /// /// This property cannot be set /// - [JsonIgnore] + [IgnoreDataMember] public override IEnumerable Properties { get { return Tabs.SelectMany(x => x.Properties); } diff --git a/src/Umbraco.Web/Models/ContentEditing/TreeSearchResult.cs b/src/Umbraco.Web/Models/ContentEditing/TreeSearchResult.cs new file mode 100644 index 000000000000..1da9d61c9867 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/TreeSearchResult.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; +using System.Runtime.Serialization; +using Examine; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// Represents a search result by entity type + /// + [DataContract(Name = "searchResult", Namespace = "")] + public class TreeSearchResult + { + [DataMember(Name = "appAlias")] + public string AppAlias { get; set; } + + [DataMember(Name = "treeAlias")] + public string TreeAlias { get; set; } + + /// + /// This is optional but if specified should be the name of an angular service to format the search result. + /// + [DataMember(Name = "jsSvc")] + public string JsFormatterService { get; set; } + + /// + /// This is optional but if specified should be the name of a method on the jsSvc angular service to use, if not + /// specfied than it will expect the method to be called `format(searchResult, appAlias, treeAlias)` + /// + [DataMember(Name = "jsMethod")] + public string JsFormatterMethod { get; set; } + + [DataMember(Name = "results")] + public IEnumerable Results { get; set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserBasic.cs b/src/Umbraco.Web/Models/ContentEditing/UserBasic.cs index c1cf3ed5c6e6..0b4a7e02d7e5 100644 --- a/src/Umbraco.Web/Models/ContentEditing/UserBasic.cs +++ b/src/Umbraco.Web/Models/ContentEditing/UserBasic.cs @@ -1,27 +1,68 @@ -using System.ComponentModel.DataAnnotations; +using System; +using System.Collections.Generic; +using System.ComponentModel; using System.Runtime.Serialization; using Umbraco.Core.Models.Membership; namespace Umbraco.Web.Models.ContentEditing { /// - /// A basic structure the represents a user + /// The user model used for paging and listing users in the UI /// [DataContract(Name = "user", Namespace = "")] - public class UserBasic : System.IComparable + [ReadOnly(true)] + public class UserBasic : EntityBasic, INotificationModel { - [DataMember(Name = "id", IsRequired = true)] - [Required] - public int UserId { get; set; } - - [DataMember(Name = "name", IsRequired = true)] - [Required] - public string Name { get; set; } + public UserBasic() + { + Notifications = new List(); + UserGroups = new List(); + } + [DataMember(Name = "username")] + public string Username { get; set; } - int System.IComparable.CompareTo(object obj) - { - return Name.CompareTo(((UserBasic)obj).Name); - } + /// + /// The MD5 lowercase hash of the email which can be used by gravatar + /// + [DataMember(Name = "emailHash")] + public string EmailHash { get; set; } + + [DataMember(Name = "lastLoginDate")] + public DateTime? LastLoginDate { get; set; } + + /// + /// Returns a list of different size avatars + /// + [DataMember(Name = "avatars")] + public string[] Avatars { get; set; } + + [DataMember(Name = "userState")] + public UserState UserState { get; set; } + + [DataMember(Name = "culture", IsRequired = true)] + public string Culture { get; set; } + + [DataMember(Name = "email", IsRequired = true)] + public string Email { get; set; } + + /// + /// The list of group aliases assigned to the user + /// + [DataMember(Name = "userGroups")] + public IEnumerable UserGroups { get; set; } + + /// + /// This is an info flag to denote if this object is the equivalent of the currently logged in user + /// + [DataMember(Name = "isCurrentUser")] + [ReadOnly(true)] + public bool IsCurrentUser { get; set; } + + /// + /// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes. + /// + [DataMember(Name = "notifications")] + public List Notifications { get; private set; } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserDetail.cs b/src/Umbraco.Web/Models/ContentEditing/UserDetail.cs index d27736576f57..75e1462ec3c9 100644 --- a/src/Umbraco.Web/Models/ContentEditing/UserDetail.cs +++ b/src/Umbraco.Web/Models/ContentEditing/UserDetail.cs @@ -1,11 +1,16 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; namespace Umbraco.Web.Models.ContentEditing -{ +{ + /// + /// Represents information for the current user + /// [DataContract(Name = "user", Namespace = "")] - public class UserDetail : UserBasic + public class UserDetail : UserProfile { [DataMember(Name = "email", IsRequired = true)] [Required] @@ -21,21 +26,39 @@ public class UserDetail : UserBasic [DataMember(Name = "emailHash")] public string EmailHash { get; set; } - [DataMember(Name = "userType", IsRequired = true)] - [Required] + [Obsolete("This should not be used it exists for legacy reasons only, use user groups instead, it will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] + [ReadOnly(true)] + [DataMember(Name = "userType")] public string UserType { get; set; } + [ReadOnly(true)] + [DataMember(Name = "userGroups")] + public string[] UserGroups { get; set; } + /// /// Gets/sets the number of seconds for the user's auth ticket to expire /// [DataMember(Name = "remainingAuthSeconds")] public double SecondsUntilTimeout { get; set; } + + /// + /// The user's calculated start nodes based on the start nodes they have assigned directly to them and via the groups they're assigned to + /// + [DataMember(Name = "startContentIds")] + public int[] StartContentIds { get; set; } + + /// + /// The user's calculated start nodes based on the start nodes they have assigned directly to them and via the groups they're assigned to + /// + [DataMember(Name = "startMediaIds")] + public int[] StartMediaIds { get; set; } - [DataMember(Name = "startContentId")] - public int StartContentId { get; set; } - - [DataMember(Name = "startMediaId")] - public int StartMediaId { get; set; } + /// + /// Returns a list of different size avatars + /// + [DataMember(Name = "avatars")] + public string[] Avatars { get; set; } /// /// A list of sections the user is allowed to view. diff --git a/src/Umbraco.Web/Models/ContentEditing/UserDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/UserDisplay.cs new file mode 100644 index 000000000000..8a79344c8e1b --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/UserDisplay.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Globalization; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// Represents a user that is being edited + /// + [DataContract(Name = "user", Namespace = "")] + [ReadOnly(true)] + public class UserDisplay : UserBasic + { + public UserDisplay() + { + AvailableCultures = new Dictionary(); + StartContentIds = new List(); + StartMediaIds = new List(); + } + + /// + /// Gets the available cultures (i.e. to populate a drop down) + /// The key is the culture stored in the database, the value is the Name + /// + [DataMember(Name = "availableCultures")] + public IDictionary AvailableCultures { get; set; } + + [DataMember(Name = "startContentIds")] + public IEnumerable StartContentIds { get; set; } + + [DataMember(Name = "startMediaIds")] + public IEnumerable StartMediaIds { get; set; } + + /// + /// If the password is reset on save, this value will be populated + /// + [DataMember(Name = "resetPasswordValue")] + [ReadOnly(true)] + public string ResetPasswordValue { get; set; } + + /// + /// A readonly value showing the user's current calculated start content ids + /// + [DataMember(Name = "calculatedStartContentIds")] + [ReadOnly(true)] + public IEnumerable CalculatedStartContentIds { get; set; } + + /// + /// A readonly value showing the user's current calculated start media ids + /// + [DataMember(Name = "calculatedStartMediaIds")] + [ReadOnly(true)] + public IEnumerable CalculatedStartMediaIds { get; set; } + + [DataMember(Name = "failedPasswordAttempts")] + [ReadOnly(true)] + public int FailedPasswordAttempts { get; set; } + + [DataMember(Name = "lastLockoutDate")] + [ReadOnly(true)] + public DateTime LastLockoutDate { get; set; } + + [DataMember(Name = "lastPasswordChangeDate")] + [ReadOnly(true)] + public DateTime LastPasswordChangeDate { get; set; } + + [DataMember(Name = "createDate")] + [ReadOnly(true)] + public DateTime CreateDate { get; set; } + + [DataMember(Name = "updateDate")] + [ReadOnly(true)] + public DateTime UpdateDate { get; set; } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserGroupBasic.cs b/src/Umbraco.Web/Models/ContentEditing/UserGroupBasic.cs new file mode 100644 index 000000000000..b52a653497b3 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/UserGroupBasic.cs @@ -0,0 +1,37 @@ +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + [DataContract(Name = "userGroup", Namespace = "")] + public class UserGroupBasic : EntityBasic, INotificationModel + { + public UserGroupBasic() + { + Notifications = new List(); + Sections = Enumerable.Empty
(); + } + + /// + /// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes. + /// + [DataMember(Name = "notifications")] + public List Notifications { get; private set; } + + [DataMember(Name = "sections")] + public IEnumerable
Sections { get; set; } + + [DataMember(Name = "contentStartNode")] + public EntityBasic ContentStartNode { get; set; } + + [DataMember(Name = "mediaStartNode")] + public EntityBasic MediaStartNode { get; set; } + + /// + /// The number of users assigned to this group + /// + [DataMember(Name = "userCount")] + public int UserCount { get; set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserGroupDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/UserGroupDisplay.cs new file mode 100644 index 000000000000..ea8eaa4b6c10 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/UserGroupDisplay.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + [DataContract(Name = "userGroup", Namespace = "")] + public class UserGroupDisplay : UserGroupBasic + { + public UserGroupDisplay() + { + Users = Enumerable.Empty(); + AssignedPermissions = Enumerable.Empty(); + } + + [DataMember(Name = "users")] + public IEnumerable Users { get; set; } + + /// + /// The default permissions for the user group organized by permission group name + /// + [DataMember(Name = "defaultPermissions")] + public IDictionary> DefaultPermissions { get; set; } + + /// + /// The assigned permissions for the user group organized by permission group name + /// + [DataMember(Name = "assignedPermissions")] + public IEnumerable AssignedPermissions { get; set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserGroupPermissionsSave.cs b/src/Umbraco.Web/Models/ContentEditing/UserGroupPermissionsSave.cs new file mode 100644 index 000000000000..b38a6d75e374 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/UserGroupPermissionsSave.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Runtime.Serialization; +using Umbraco.Core; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// Used to assign user group permissions to a content node + /// + [DataContract(Name = "contentPermission", Namespace = "")] + public class UserGroupPermissionsSave : IValidatableObject + { + public UserGroupPermissionsSave() + { + AssignedPermissions = new Dictionary>(); + } + + //TODO: we should have an option to clear the permissions assigned to this node and instead just have them inherit - yes once we actually have inheritance! + + [DataMember(Name = "contentId", IsRequired = true)] + [Required] + public int ContentId { get; set; } + + /// + /// A dictionary of permissions to assign, the key is the user group id + /// + [DataMember(Name = "permissions")] + public IDictionary> AssignedPermissions { get; set; } + + public IEnumerable Validate(ValidationContext validationContext) + { + if (AssignedPermissions.SelectMany(x => x.Value).Any(x => x.IsNullOrWhiteSpace())) + { + yield return new ValidationResult("A permission value cannot be null or empty", new[] { "Permissions" }); + } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserGroupSave.cs b/src/Umbraco.Web/Models/ContentEditing/UserGroupSave.cs new file mode 100644 index 000000000000..872834988da0 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/UserGroupSave.cs @@ -0,0 +1,80 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Umbraco.Core; +using Umbraco.Core.Models; +using Umbraco.Core.Models.Membership; + +namespace Umbraco.Web.Models.ContentEditing +{ + [DataContract(Name = "userGroup", Namespace = "")] + public class UserGroupSave : EntityBasic, IValidatableObject + { + /// + /// The action to perform when saving this user group + /// + /// + /// If either of the Publish actions are specified an exception will be thrown. + /// + [DataMember(Name = "action", IsRequired = true)] + [Required] + public ContentSaveAction Action { get; set; } + + [DataMember(Name = "alias", IsRequired = true)] + [Required] + public override string Alias { get; set; } + + [DataMember(Name = "sections")] + public IEnumerable Sections { get; set; } + + [DataMember(Name = "users")] + public IEnumerable Users { get; set; } + + [DataMember(Name = "startContentId")] + public int? StartContentId { get; set; } + + [DataMember(Name = "startMediaId")] + public int? StartMediaId { get; set; } + + /// + /// The list of letters (permission codes) to assign as the default for the user group + /// + [DataMember(Name = "defaultPermissions")] + public IEnumerable DefaultPermissions { get; set; } + + /// + /// The assigned permissions for content + /// + /// + /// The key is the content id and the list is the list of letters (permission codes) to assign + /// + [DataMember(Name = "assignedPermissions")] + public IDictionary> AssignedPermissions { get; set; } + + /// + /// The real persisted user group + /// + [IgnoreDataMember] + internal IUserGroup PersistedUserGroup { get; set; } + + public IEnumerable Validate(ValidationContext validationContext) + { + if (DefaultPermissions.Any(x => x.IsNullOrWhiteSpace())) + { + yield return new ValidationResult("A permission value cannot be null or empty", new[] { "Permissions" }); + } + + foreach (var assignedPermission in AssignedPermissions) + { + foreach (var permission in assignedPermission.Value) + { + if (permission.IsNullOrWhiteSpace()) + yield return new ValidationResult("A permission value cannot be null or empty", new[] { "AssignedPermissions" }); + } + } + + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserInvite.cs b/src/Umbraco.Web/Models/ContentEditing/UserInvite.cs new file mode 100644 index 000000000000..368067814dfd --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/UserInvite.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Runtime.Serialization; +using Umbraco.Core; +using Umbraco.Core.Configuration; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// Represents the data used to invite a user + /// + [DataContract(Name = "user", Namespace = "")] + public class UserInvite : EntityBasic, IValidatableObject + { + [DataMember(Name = "userGroups")] + [Required] + public IEnumerable UserGroups { get; set; } + + [DataMember(Name = "email", IsRequired = true)] + [Required] + [EmailAddress] + public string Email { get; set; } + + [DataMember(Name = "username")] + public string Username { get; set; } + + [DataMember(Name = "message")] + public string Message { get; set; } + + public IEnumerable Validate(ValidationContext validationContext) + { + if (UserGroups.Any() == false) + yield return new ValidationResult("A user must be assigned to at least one group", new[] { "UserGroups" }); + + if (UmbracoConfig.For.UmbracoSettings().Security.UsernameIsEmail == false && Username.IsNullOrWhiteSpace()) + yield return new ValidationResult("A username cannot be empty", new[] { "Username" }); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserProfile.cs b/src/Umbraco.Web/Models/ContentEditing/UserProfile.cs new file mode 100644 index 000000000000..eca28e140807 --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/UserProfile.cs @@ -0,0 +1,28 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using Umbraco.Core.Models.Membership; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// A bare minimum structure that represents a user, usually attached to other objects + /// + [DataContract(Name = "user", Namespace = "")] + public class UserProfile : IComparable + { + [DataMember(Name = "id", IsRequired = true)] + [Required] + public int UserId { get; set; } + + [DataMember(Name = "name", IsRequired = true)] + [Required] + public string Name { get; set; } + + + int IComparable.CompareTo(object obj) + { + return String.Compare(Name, ((UserProfile)obj).Name, StringComparison.Ordinal); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/ContentEditing/UserSave.cs b/src/Umbraco.Web/Models/ContentEditing/UserSave.cs new file mode 100644 index 000000000000..1b6a76ae994c --- /dev/null +++ b/src/Umbraco.Web/Models/ContentEditing/UserSave.cs @@ -0,0 +1,55 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// Represents the data used to persist a user + /// + /// + /// This will be different from the model used to display a user and we don't want to "Overpost" data back to the server, + /// and there will most likely be different bits of data required for updating passwords which will be different from the + /// data used to display vs save + /// + [DataContract(Name = "user", Namespace = "")] + public class UserSave : EntityBasic, IValidatableObject + { + [DataMember(Name = "changePassword", IsRequired = true)] + public ChangingPasswordModel ChangePassword { get; set; } + + [DataMember(Name = "id", IsRequired = true)] + [Required] + public new int Id { get; set; } + + [DataMember(Name = "username", IsRequired = true)] + [Required] + public string Username { get; set; } + + [DataMember(Name = "culture", IsRequired = true)] + [Required] + public string Culture { get; set; } + + [DataMember(Name = "email", IsRequired = true)] + [Required] + [EmailAddress] + public string Email { get; set; } + + [DataMember(Name = "userGroups")] + [Required] + public IEnumerable UserGroups { get; set; } + + [DataMember(Name = "startContentIds")] + public int[] StartContentIds { get; set; } + + [DataMember(Name = "startMediaIds")] + public int[] StartMediaIds { get; set; } + + public IEnumerable Validate(ValidationContext validationContext) + { + if (UserGroups.Any() == false) + yield return new ValidationResult("A user must be assigned to at least one group", new[] { "UserGroups" }); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/DetachedPublishedContent.cs b/src/Umbraco.Web/Models/DetachedPublishedContent.cs new file mode 100644 index 000000000000..b088d9be3ce2 --- /dev/null +++ b/src/Umbraco.Web/Models/DetachedPublishedContent.cs @@ -0,0 +1,166 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Umbraco.Core; +using Umbraco.Core.Models; +using Umbraco.Core.Models.PublishedContent; + +namespace Umbraco.Web.Models +{ + public class DetachedPublishedContent : PublishedContentWithKeyBase + { + private readonly Guid _key; + private readonly string _name; + private readonly PublishedContentType _contentType; + private readonly IEnumerable _properties; + private readonly int _sortOrder; + private readonly bool _isPreviewing; + private readonly IPublishedContent _containerNode; + + public DetachedPublishedContent( + Guid key, + string name, + PublishedContentType contentType, + IEnumerable properties, + IPublishedContent containerNode = null, + int sortOrder = 0, + bool isPreviewing = false) + { + _key = key; + _name = name; + _contentType = contentType; + _properties = properties; + _sortOrder = sortOrder; + _isPreviewing = isPreviewing; + _containerNode = containerNode; + } + + public override Guid Key + { + get { return _key; } + } + + public override int Id + { + get { return 0; } + } + + public override string Name + { + get { return _name; } + } + + public override bool IsDraft + { + get { return _isPreviewing; } + } + + public override PublishedItemType ItemType + { + get { return PublishedItemType.Content; } + } + + public override PublishedContentType ContentType + { + get { return _contentType; } + } + + public override string DocumentTypeAlias + { + get { return _contentType.Alias; } + } + + public override int DocumentTypeId + { + get { return _contentType.Id; } + } + + public override ICollection Properties + { + get { return _properties.ToArray(); } + } + + public override IPublishedProperty GetProperty(string alias) + { + return _properties.FirstOrDefault(x => x.PropertyTypeAlias.InvariantEquals(alias)); + } + + public override IPublishedProperty GetProperty(string alias, bool recurse) + { + if (recurse) + throw new NotSupportedException(); + + return GetProperty(alias); + } + + public override IPublishedContent Parent + { + get { return null; } + } + + public override IEnumerable Children + { + get { return Enumerable.Empty(); } + } + + public override int TemplateId + { + get { return 0; } + } + + public override int SortOrder + { + get { return _sortOrder; } + } + + public override string UrlName + { + get { return null; } + } + + public override string WriterName + { + get { return _containerNode != null ? _containerNode.WriterName : null; } + } + + public override string CreatorName + { + get { return _containerNode != null ? _containerNode.CreatorName : null; } + } + + public override int WriterId + { + get { return _containerNode != null ? _containerNode.WriterId : 0; } + } + + public override int CreatorId + { + get { return _containerNode != null ? _containerNode.CreatorId : 0; } + } + + public override string Path + { + get { return null; } + } + + public override DateTime CreateDate + { + get { return _containerNode != null ? _containerNode.CreateDate : DateTime.MinValue; } + } + + public override DateTime UpdateDate + { + get { return _containerNode != null ? _containerNode.UpdateDate : DateTime.MinValue; } + } + + public override Guid Version + { + get { return _containerNode != null ? _containerNode.Version : Guid.Empty; } + } + + public override int Level + { + get { return 0; } + } + } +} diff --git a/src/Umbraco.Web/Models/DetachedPublishedProperty.cs b/src/Umbraco.Web/Models/DetachedPublishedProperty.cs new file mode 100644 index 000000000000..4a76942dd663 --- /dev/null +++ b/src/Umbraco.Web/Models/DetachedPublishedProperty.cs @@ -0,0 +1,52 @@ +using System; +using Umbraco.Core.Models; +using Umbraco.Core.Models.PublishedContent; + +namespace Umbraco.Web.Models +{ + internal class DetachedPublishedProperty : IPublishedProperty + { + private readonly PublishedPropertyType _propertyType; + private readonly object _rawValue; + private readonly Lazy _sourceValue; + private readonly Lazy _objectValue; + private readonly Lazy _xpathValue; + private readonly bool _isPreview; + + public DetachedPublishedProperty(PublishedPropertyType propertyType, object value) + : this(propertyType, value, false) + { + } + + public DetachedPublishedProperty(PublishedPropertyType propertyType, object value, bool isPreview) + { + _propertyType = propertyType; + _isPreview = isPreview; + + _rawValue = value; + + _sourceValue = new Lazy(() => _propertyType.ConvertDataToSource(_rawValue, _isPreview)); + _objectValue = new Lazy(() => _propertyType.ConvertSourceToObject(_sourceValue.Value, _isPreview)); + _xpathValue = new Lazy(() => _propertyType.ConvertSourceToXPath(_sourceValue.Value, _isPreview)); + } + + public string PropertyTypeAlias + { + get + { + return _propertyType.PropertyTypeAlias; + } + } + + public bool HasValue + { + get { return DataValue != null && DataValue.ToString().Trim().Length > 0; } + } + + public object DataValue { get { return _rawValue; } } + + public object Value { get { return _objectValue.Value; } } + + public object XPathValue { get { return _xpathValue.Value; } } + } +} diff --git a/src/Umbraco.Web/Models/DynamicPublishedContent.cs b/src/Umbraco.Web/Models/DynamicPublishedContent.cs index 141eeefae145..e776865fb087 100644 --- a/src/Umbraco.Web/Models/DynamicPublishedContent.cs +++ b/src/Umbraco.Web/Models/DynamicPublishedContent.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.Dynamic; using System.Linq; @@ -17,11 +18,13 @@ using Umbraco.Core.Models.PublishedContent; namespace Umbraco.Web.Models -{ - - /// - /// The base dynamic model for views - /// +{ + + /// + /// The base dynamic model for views + /// + [Obsolete("The use of dynamics has been deprecated, use strongly typed syntax instead, dynamics will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] [DebuggerDisplay("Content Id: {Id}, Name: {Name}")] public class DynamicPublishedContent : DynamicObject, IPublishedContent { diff --git a/src/Umbraco.Web/Models/DynamicPublishedContentList.cs b/src/Umbraco.Web/Models/DynamicPublishedContentList.cs index ef794737a508..382073332c9e 100644 --- a/src/Umbraco.Web/Models/DynamicPublishedContentList.cs +++ b/src/Umbraco.Web/Models/DynamicPublishedContentList.cs @@ -6,6 +6,7 @@ using Umbraco.Core.Cache; using Umbraco.Core.Dynamics; using System.Collections; +using System.ComponentModel; using System.Reflection; using Umbraco.Core.Models; using Umbraco.Core.Models.PublishedContent; @@ -16,6 +17,8 @@ namespace Umbraco.Web.Models /// /// Represents a collection of DynamicPublishedContent items. /// + [Obsolete("The use of dynamics has been deprecated, use strongly typed syntax instead, dynamics will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] public class DynamicPublishedContentList : DynamicObject, IEnumerable { private readonly List _content; diff --git a/src/Umbraco.Web/Models/LoginModel.cs b/src/Umbraco.Web/Models/LoginModel.cs index 650fa067a3a8..5e6b2e5c18cf 100644 --- a/src/Umbraco.Web/Models/LoginModel.cs +++ b/src/Umbraco.Web/Models/LoginModel.cs @@ -10,7 +10,8 @@ public class LoginModel : PostRedirectModel public string Username { get; set; } [Required] - [DataMember(Name = "password", IsRequired = true)] + [DataMember(Name = "password", IsRequired = true)] + [StringLength(maximumLength:256)] public string Password { get; set; } } diff --git a/src/Umbraco.Web/Models/LoginStatusModel.cs b/src/Umbraco.Web/Models/LoginStatusModel.cs index e10b42b09601..23fb2039e97d 100644 --- a/src/Umbraco.Web/Models/LoginStatusModel.cs +++ b/src/Umbraco.Web/Models/LoginStatusModel.cs @@ -23,9 +23,9 @@ public static LoginStatusModel CreateModel() private LoginStatusModel(bool doLookup) { - if (doLookup && HttpContext.Current != null && ApplicationContext.Current != null) + if (doLookup && UmbracoContext.Current != null) { - var helper = new MembershipHelper(ApplicationContext.Current, new HttpContextWrapper(HttpContext.Current)); + var helper = new MembershipHelper(UmbracoContext.Current); var model = helper.GetCurrentLoginStatus(); if (model != null) { diff --git a/src/Umbraco.Web/Models/Mapping/CodeFileDisplayMapper.cs b/src/Umbraco.Web/Models/Mapping/CodeFileDisplayMapper.cs index dec0930c0741..b99765384470 100644 --- a/src/Umbraco.Web/Models/Mapping/CodeFileDisplayMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/CodeFileDisplayMapper.cs @@ -28,12 +28,10 @@ public override void ConfigureMappings(IConfiguration config, ApplicationContext .ForMember(x => x.Snippet, exp => exp.Ignore()); config.CreateMap() - .ForMember(x => x.DeletedDate, exp => exp.Ignore()) + .IgnoreDeletableEntityCommonProperties() .ForMember(x => x.Id, exp => exp.Ignore()) .ForMember(x => x.Key, exp => exp.Ignore()) .ForMember(x => x.Path, exp => exp.Ignore()) - .ForMember(x => x.CreateDate, exp => exp.Ignore()) - .ForMember(x => x.UpdateDate, exp => exp.Ignore()) .ForMember(x => x.Path, exp => exp.Ignore()) .ForMember(x => x.Alias, exp => exp.Ignore()) .ForMember(x => x.Name, exp => exp.Ignore()) @@ -41,12 +39,10 @@ public override void ConfigureMappings(IConfiguration config, ApplicationContext .ForMember(x => x.HasIdentity, exp => exp.Ignore()); config.CreateMap() - .ForMember(x => x.DeletedDate, exp => exp.Ignore()) + .IgnoreDeletableEntityCommonProperties() .ForMember(x => x.Id, exp => exp.Ignore()) .ForMember(x => x.Key, exp => exp.Ignore()) .ForMember(x => x.Path, exp => exp.Ignore()) - .ForMember(x => x.CreateDate, exp => exp.Ignore()) - .ForMember(x => x.UpdateDate, exp => exp.Ignore()) .ForMember(x => x.Path, exp => exp.Ignore()) .ForMember(x => x.Alias, exp => exp.Ignore()) .ForMember(x => x.Name, exp => exp.Ignore()) diff --git a/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs b/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs index a33921b7b98d..1809bffd3d40 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs @@ -4,7 +4,6 @@ using System.Linq; using System.Web; using System.Web.Mvc; -using System.Web.Routing; using AutoMapper; using Umbraco.Core; using Umbraco.Core.Models; @@ -28,7 +27,7 @@ public override void ConfigureMappings(IConfiguration config, ApplicationContext //FROM IContent TO ContentItemDisplay config.CreateMap() - .ForMember(display => display.Udi, expression => expression.MapFrom(content => Udi.Create(Constants.UdiEntityType.Document, content.Key))) + .ForMember(display => display.Udi, expression => expression.MapFrom(content => Udi.Create(content.IsBlueprint ? Constants.UdiEntityType.DocumentBluePrint : Constants.UdiEntityType.Document, content.Key))) .ForMember(display => display.Owner, expression => expression.ResolveUsing(new OwnerResolver())) .ForMember(display => display.Updater, expression => expression.ResolveUsing(new CreatorResolver())) .ForMember(display => display.Icon, expression => expression.MapFrom(content => content.ContentType.Icon)) @@ -59,7 +58,7 @@ public override void ConfigureMappings(IConfiguration config, ApplicationContext //FROM IContent TO ContentItemBasic config.CreateMap>() - .ForMember(display => display.Udi, expression => expression.MapFrom(content => Udi.Create(Constants.UdiEntityType.Document, content.Key))) + .ForMember(display => display.Udi, expression => expression.MapFrom(content => Udi.Create(content.IsBlueprint ? Constants.UdiEntityType.DocumentBluePrint : Constants.UdiEntityType.Document, content.Key))) .ForMember(dto => dto.Owner, expression => expression.ResolveUsing(new OwnerResolver())) .ForMember(dto => dto.Updater, expression => expression.ResolveUsing(new CreatorResolver())) .ForMember(dto => dto.Icon, expression => expression.MapFrom(content => content.ContentType.Icon)) @@ -70,7 +69,7 @@ public override void ConfigureMappings(IConfiguration config, ApplicationContext //FROM IContent TO ContentItemDto config.CreateMap>() - .ForMember(display => display.Udi, expression => expression.MapFrom(content => Udi.Create(Constants.UdiEntityType.Document, content.Key))) + .ForMember(display => display.Udi, expression => expression.MapFrom(content => Udi.Create(content.IsBlueprint ? Constants.UdiEntityType.DocumentBluePrint : Constants.UdiEntityType.Document, content.Key))) .ForMember(dto => dto.Owner, expression => expression.ResolveUsing(new OwnerResolver())) .ForMember(dto => dto.HasPublishedVersion, expression => expression.MapFrom(content => content.HasPublishedVersion)) .ForMember(dto => dto.Updater, expression => expression.Ignore()) @@ -135,7 +134,7 @@ private static void AfterMap(IContent content, ContentItemDisplay display, IData Label = localizedText.Localize("content/releaseDate"), Value = display.ReleaseDate.HasValue ? display.ReleaseDate.Value.ToIsoString() : null, //Not editible for people without publish permission (U4-287) - View = display.AllowedActions.Contains(ActionPublish.Instance.Letter) ? "datepicker" : PropertyEditorResolver.Current.GetByAlias(Constants.PropertyEditors.NoEditAlias).ValueEditor.View, + View = display.AllowedActions.Contains(ActionPublish.Instance.Letter.ToString(CultureInfo.InvariantCulture)) ? "datepicker" : PropertyEditorResolver.Current.GetByAlias(Constants.PropertyEditors.NoEditAlias).ValueEditor.View, Config = new Dictionary { {"offsetTime", "1"} @@ -148,7 +147,7 @@ private static void AfterMap(IContent content, ContentItemDisplay display, IData Label = localizedText.Localize("content/unpublishDate"), Value = display.ExpireDate.HasValue ? display.ExpireDate.Value.ToIsoString() : null, //Not editible for people without publish permission (U4-287) - View = display.AllowedActions.Contains(ActionPublish.Instance.Letter) ? "datepicker" : PropertyEditorResolver.Current.GetByAlias(Constants.PropertyEditors.NoEditAlias).ValueEditor.View, + View = display.AllowedActions.Contains(ActionPublish.Instance.Letter.ToString(CultureInfo.InvariantCulture)) ? "datepicker" : PropertyEditorResolver.Current.GetByAlias(Constants.PropertyEditors.NoEditAlias).ValueEditor.View, Config = new Dictionary { {"offsetTime", "1"} @@ -213,10 +212,9 @@ private static void AfterMap(IContent content, ContentItemDisplay display, IData } /// - //TODO: This is horribly inneficient /// Creates the list of action buttons allowed for this user - Publish, Send to publish, save, unpublish returned as the button's 'letter' /// - private class ActionButtonsResolver : ValueResolver> + private class ActionButtonsResolver : ValueResolver> { private readonly Lazy _userService; @@ -225,12 +223,12 @@ public ActionButtonsResolver(Lazy userService) _userService = userService; } - protected override IEnumerable ResolveCore(IContent source) + protected override IEnumerable ResolveCore(IContent source) { if (UmbracoContext.Current == null) { //cannot check permissions without a context - return Enumerable.Empty(); + return Enumerable.Empty(); } var svc = _userService.Value; @@ -242,11 +240,9 @@ protected override IEnumerable ResolveCore(IContent source) // Here we need to do a special check since this could be new content, in which case we need to get the permissions // from the parent, not the existing one otherwise permissions would be coming from the root since Id is 0. source.HasIdentity ? source.Id : source.ParentId) - .FirstOrDefault(); + .GetAllPermissions(); - return permissions == null - ? Enumerable.Empty() - : permissions.AssignedPermissions.Where(x => x.Length == 1).Select(x => x.ToUpperInvariant()[0]); + return permissions; } } } diff --git a/src/Umbraco.Web/Models/Mapping/ContentTypeModelMapper.cs b/src/Umbraco.Web/Models/Mapping/ContentTypeModelMapper.cs index 24620509e918..515104d02cd9 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentTypeModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentTypeModelMapper.cs @@ -38,6 +38,7 @@ public override void ConfigureMappings(IConfiguration config, ApplicationContext config.CreateMap() .ConstructUsing(basic => new PropertyType(applicationContext.Services.DataTypeService.GetDataTypeDefinitionById(basic.DataTypeId))) + .IgnoreEntityCommonProperties() .ForMember(type => type.ValidationRegExp, expression => expression.ResolveUsing(basic => basic.Validation.Pattern)) .ForMember(type => type.Mandatory, expression => expression.ResolveUsing(basic => basic.Validation.Mandatory)) .ForMember(type => type.Name, expression => expression.ResolveUsing(basic => basic.Label)) @@ -45,10 +46,8 @@ public override void ConfigureMappings(IConfiguration config, ApplicationContext .ForMember(type => type.DataTypeId, expression => expression.Ignore()) .ForMember(type => type.PropertyEditorAlias, expression => expression.Ignore()) .ForMember(type => type.HelpText, expression => expression.Ignore()) - .ForMember(type => type.Key, expression => expression.Ignore()) - .ForMember(type => type.CreateDate, expression => expression.Ignore()) - .ForMember(type => type.UpdateDate, expression => expression.Ignore()) - .ForMember(type => type.DeletedDate, expression => expression.Ignore()) + .ForMember(type => type.Key, expression => expression.Ignore()) + .ForMember(type => type.DeletedDate, expression => expression.Ignore()) .ForMember(type => type.HasIdentity, expression => expression.Ignore()); config.CreateMap() @@ -163,11 +162,14 @@ public override void ConfigureMappings(IConfiguration config, ApplicationContext }); config.CreateMap() - .ForMember(x => x.Udi, expression => expression.MapFrom(content => Udi.Create(Constants.UdiEntityType.MemberType, content.Key))); + .ForMember(x => x.Udi, expression => expression.MapFrom(content => Udi.Create(Constants.UdiEntityType.MemberType, content.Key))) + .ForMember(x => x.Blueprints, expression => expression.Ignore()); config.CreateMap() - .ForMember(x => x.Udi, expression => expression.MapFrom(content => Udi.Create(Constants.UdiEntityType.MediaType, content.Key))); + .ForMember(x => x.Udi, expression => expression.MapFrom(content => Udi.Create(Constants.UdiEntityType.MediaType, content.Key))) + .ForMember(x => x.Blueprints, expression => expression.Ignore()); config.CreateMap() - .ForMember(x => x.Udi, expression => expression.MapFrom(content => Udi.Create(Constants.UdiEntityType.DocumentType, content.Key))); + .ForMember(x => x.Udi, expression => expression.MapFrom(content => Udi.Create(Constants.UdiEntityType.DocumentType, content.Key))) + .ForMember(x => x.Blueprints, expression => expression.Ignore()); config.CreateMap() diff --git a/src/Umbraco.Web/Models/Mapping/ContentTypeModelMapperExtensions.cs b/src/Umbraco.Web/Models/Mapping/ContentTypeModelMapperExtensions.cs index 274771feada3..fea46ddedb41 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentTypeModelMapperExtensions.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentTypeModelMapperExtensions.cs @@ -22,15 +22,14 @@ internal static class ContentTypeModelMapperExtensions public static IMappingExpression MapPropertyGroupBasicToPropertyGroupPersistence( this IMappingExpression mapping) - where TSource : PropertyGroupBasic + where TSource : PropertyGroupBasic where TPropertyTypeBasic : PropertyTypeBasic { return mapping + .IgnoreEntityCommonProperties() .ForMember(dest => dest.Id, map => map.Condition(source => source.Id > 0)) .ForMember(dest => dest.Key, map => map.Ignore()) - .ForMember(dest => dest.HasIdentity, map => map.Ignore()) - .ForMember(dest => dest.CreateDate, map => map.Ignore()) - .ForMember(dest => dest.UpdateDate, map => map.Ignore()) + .ForMember(dest => dest.HasIdentity, map => map.Ignore()) .ForMember(dest => dest.DeletedDate, map => map.Ignore()) .ForMember(dest => dest.PropertyTypes, map => map.Ignore()); } @@ -38,7 +37,7 @@ public static IMappingExpression MapPropertyGroupBasicTo public static IMappingExpression> MapPropertyGroupBasicToPropertyGroupDisplay( this IMappingExpression> mapping) where TSource : PropertyGroupBasic - where TPropertyTypeBasic : PropertyTypeBasic + where TPropertyTypeBasic : PropertyTypeBasic where TPropertyTypeDisplay : PropertyTypeDisplay { return mapping @@ -106,8 +105,8 @@ public static void AfterMapMediaTypeSaveToEntity( public static IMappingExpression MapBaseContentTypeSaveToDisplay( this IMappingExpression mapping) where TSource : ContentTypeSave - where TDestination : ContentTypeCompositionDisplay - where TPropertyTypeDestination : PropertyTypeDisplay + where TDestination : ContentTypeCompositionDisplay + where TPropertyTypeDestination : PropertyTypeDisplay where TPropertyTypeSource : PropertyTypeBasic { return mapping @@ -129,6 +128,7 @@ public static IMappingExpression MapBaseContentTypeEntity return mapping .ForMember(x => x.Udi, expression => expression.ResolveUsing(new ContentTypeUdiResolver())) .ForMember(display => display.Notifications, expression => expression.Ignore()) + .ForMember(display => display.Blueprints, expression => expression.Ignore()) .ForMember(display => display.Errors, expression => expression.Ignore()) .ForMember(display => display.AllowAsRoot, expression => expression.MapFrom(type => type.AllowedAsRoot)) .ForMember(display => display.ListViewEditorName, expression => expression.Ignore()) @@ -138,7 +138,7 @@ public static IMappingExpression MapBaseContentTypeEntity .ForMember( dto => dto.AllowedContentTypes, expression => expression.MapFrom(dto => dto.AllowedContentTypes.Select(x => x.Id.Value))) - + .ForMember( dto => dto.CompositeContentTypes, expression => expression.MapFrom(dto => dto.ContentTypeComposition)) @@ -165,7 +165,7 @@ public static IMappingExpression MapBaseContentTypeSaveTo this IMappingExpression mapping, ApplicationContext applicationContext) //where TSource : ContentTypeCompositionDisplay where TSource : ContentTypeSave - where TDestination : IContentTypeComposition + where TDestination : IContentTypeComposition where TSourcePropertyType : PropertyTypeBasic { return mapping @@ -174,9 +174,7 @@ public static IMappingExpression MapBaseContentTypeSaveTo .ForMember(dto => dto.Id, expression => expression.MapFrom(display => Convert.ToInt32(display.Id))) //These get persisted as part of the saving procedure, nothing to do with the display model - .ForMember(dto => dto.CreateDate, expression => expression.Ignore()) - .ForMember(dto => dto.UpdateDate, expression => expression.Ignore()) - .ForMember(dto => dto.DeletedDate, expression => expression.Ignore()) + .IgnoreDeletableEntityCommonProperties() .ForMember(dto => dto.AllowedAsRoot, expression => expression.MapFrom(display => display.AllowAsRoot)) .ForMember(dto => dto.CreatorId, expression => expression.Ignore()) @@ -187,7 +185,7 @@ public static IMappingExpression MapBaseContentTypeSaveTo .ForMember(dto => dto.NoGroupPropertyTypes, expression => expression.Ignore()) // ignore, composition is managed in AfterMapContentTypeSaveToEntity .ForMember(dest => dest.ContentTypeComposition, opt => opt.Ignore()) - + .ForMember( dto => dto.AllowedContentTypes, expression => expression.MapFrom(dto => dto.AllowedContentTypes.Select((t, i) => new ContentTypeSort(t, i)))) @@ -265,7 +263,7 @@ public static IMappingExpression MapBaseContentTypeSaveTo } private static PropertyGroup MapSaveGroup(PropertyGroupBasic sourceGroup, IEnumerable destOrigGroups) - where TPropertyType: PropertyTypeBasic + where TPropertyType : PropertyTypeBasic { PropertyGroup destGroup; if (sourceGroup.Id > 0) diff --git a/src/Umbraco.Web/Models/Mapping/CreatorResolver.cs b/src/Umbraco.Web/Models/Mapping/CreatorResolver.cs index 0f67a974f641..28e9799861ea 100644 --- a/src/Umbraco.Web/Models/Mapping/CreatorResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/CreatorResolver.cs @@ -2,17 +2,18 @@ using Umbraco.Core.Models; using Umbraco.Core.Models.Membership; using Umbraco.Web.Models.ContentEditing; +using UserProfile = Umbraco.Web.Models.ContentEditing.UserProfile; namespace Umbraco.Web.Models.Mapping { /// /// Maps the Creator for content /// - internal class CreatorResolver : ValueResolver + internal class CreatorResolver : ValueResolver { - protected override UserBasic ResolveCore(IContent source) + protected override UserProfile ResolveCore(IContent source) { - return Mapper.Map(source.GetWriterProfile()); + return Mapper.Map(source.GetWriterProfile()); } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Models/Mapping/DataTypeModelMapper.cs b/src/Umbraco.Web/Models/Mapping/DataTypeModelMapper.cs index 7e9a00f7602a..32d25028e47b 100644 --- a/src/Umbraco.Web/Models/Mapping/DataTypeModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/DataTypeModelMapper.cs @@ -96,6 +96,7 @@ public override void ConfigureMappings(IConfiguration config, ApplicationContext config.CreateMap() .ConstructUsing(save => new DataTypeDefinition(save.SelectedEditor) {CreateDate = DateTime.Now}) + .IgnoreDeletableEntityCommonProperties() .ForMember(definition => definition.Id, expression => expression.MapFrom(save => Convert.ToInt32(save.Id))) //we have to ignore the Key otherwise this will reset the UniqueId field which should never change! // http://issues.umbraco.org/issue/U4-3911 @@ -106,10 +107,7 @@ public override void ConfigureMappings(IConfiguration config, ApplicationContext .ForMember(x => x.ControlId, expression => expression.Ignore()) .ForMember(x => x.CreatorId, expression => expression.Ignore()) .ForMember(x => x.Level, expression => expression.Ignore()) - .ForMember(x => x.SortOrder, expression => expression.Ignore()) - .ForMember(x => x.CreateDate, expression => expression.Ignore()) - .ForMember(x => x.DeletedDate, expression => expression.Ignore()) - .ForMember(x => x.UpdateDate, expression => expression.Ignore()); + .ForMember(x => x.SortOrder, expression => expression.Ignore()); //Converts a property editor to a new list of pre-value fields - used when creating a new data type or changing a data type with new pre-vals config.CreateMap>() diff --git a/src/Umbraco.Web/Models/Mapping/EntityModelMapper.cs b/src/Umbraco.Web/Models/Mapping/EntityModelMapper.cs index 5be9d550e5c1..273dbd34f32e 100644 --- a/src/Umbraco.Web/Models/Mapping/EntityModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/EntityModelMapper.cs @@ -6,6 +6,7 @@ using Examine.LuceneEngine.Providers; using Umbraco.Core; using Umbraco.Core.Models; +using Umbraco.Core.Models.EntityBase; using Umbraco.Core.Models.Mapping; using Umbraco.Core.Models.Membership; using Umbraco.Web.Models.ContentEditing; @@ -28,7 +29,7 @@ public override void ConfigureMappings(IConfiguration config, ApplicationContext { basic.Icon = "icon-user"; } - }); + }); config.CreateMap() .ForMember(x => x.Udi, expression => expression.Ignore()) @@ -64,20 +65,7 @@ public override void ConfigureMappings(IConfiguration config, ApplicationContext .ForMember(basic => basic.ParentId, expression => expression.UseValue(-1)) .ForMember(dto => dto.Trashed, expression => expression.Ignore()) .ForMember(x => x.AdditionalData, expression => expression.Ignore()); - - //config.CreateMap() - // .ConstructUsing(basic => new Template(basic.Name, basic.Alias) - // { - // Id = Convert.ToInt32(basic.Id), - // Key = basic.Key - // }) - // .ForMember(t => t.Path, expression => expression.Ignore()) - // .ForMember(t => t.Id, expression => expression.MapFrom(template => Convert.ToInt32(template.Id))) - // .ForMember(x => x.VirtualPath, expression => expression.Ignore()) - // .ForMember(x => x.CreateDate, expression => expression.Ignore()) - // .ForMember(x => x.UpdateDate, expression => expression.Ignore()) - // .ForMember(x => x.Content, expression => expression.Ignore()); - + config.CreateMap() .ForMember(x => x.Id, expression => expression.MapFrom(entity => new Lazy(() => Convert.ToInt32(entity.Id)))) .ForMember(x => x.SortOrder, expression => expression.Ignore()); @@ -89,8 +77,32 @@ public override void ConfigureMappings(IConfiguration config, ApplicationContext .ForMember(dto => dto.Trashed, expression => expression.Ignore()) .ForMember(x => x.AdditionalData, expression => expression.Ignore()); - config.CreateMap() + config.CreateMap() + .ForMember(x => x.Udi, expression => expression.MapFrom(x => Udi.Create(UmbracoObjectTypesExtensions.GetUdiType(x.NodeObjectTypeId), x.Key))) + .ForMember(basic => basic.Icon, expression => expression.MapFrom(entity => entity.ContentTypeIcon)) + .ForMember(dto => dto.Trashed, expression => expression.Ignore()) + .ForMember(x => x.Alias, expression => expression.Ignore()) + .ForMember(x => x.Score, expression => expression.Ignore()) + .AfterMap((entity, basic) => + { + if (basic.Icon.IsNullOrWhiteSpace()) + { + if (entity.NodeObjectTypeId == Constants.ObjectTypes.MemberGuid) + basic.Icon = "icon-user"; + else if (entity.NodeObjectTypeId == Constants.ObjectTypes.DataTypeGuid) + basic.Icon = "icon-autofill"; + else if (entity.NodeObjectTypeId == Constants.ObjectTypes.DocumentTypeGuid) + basic.Icon = "icon-item-arrangement"; + else if (entity.NodeObjectTypeId == Constants.ObjectTypes.MediaTypeGuid) + basic.Icon = "icon-thumbnails"; + else if (entity.NodeObjectTypeId == Constants.ObjectTypes.TemplateTypeGuid) + basic.Icon = "icon-newspaper-alt"; + } + }); + + config.CreateMap() //default to document icon + .ForMember(x => x.Score, expression => expression.MapFrom(result => result.Score)) .ForMember(x => x.Udi, expression => expression.Ignore()) .ForMember(x => x.Icon, expression => expression.Ignore()) .ForMember(x => x.Id, expression => expression.MapFrom(result => result.Id)) @@ -156,11 +168,11 @@ public override void ConfigureMappings(IConfiguration config, ApplicationContext } }); - config.CreateMap>() - .ConvertUsing(results => results.Select(Mapper.Map).ToList()); + config.CreateMap>() + .ConvertUsing(results => results.Select(Mapper.Map).ToList()); - config.CreateMap, IEnumerable>() - .ConvertUsing(results => results.Select(Mapper.Map).ToList()); + config.CreateMap, IEnumerable>() + .ConvertUsing(results => results.Select(Mapper.Map).ToList()); } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Models/Mapping/EntityModelMapperExtensions.cs b/src/Umbraco.Web/Models/Mapping/EntityModelMapperExtensions.cs new file mode 100644 index 000000000000..39f92af5d25c --- /dev/null +++ b/src/Umbraco.Web/Models/Mapping/EntityModelMapperExtensions.cs @@ -0,0 +1,42 @@ +using AutoMapper; +using Umbraco.Core.Models.EntityBase; +using Umbraco.Web.Models.ContentEditing; + +namespace Umbraco.Web.Models.Mapping +{ + /// + /// Mapping extension methods for re-use with other mappers (saves code duplication) + /// + internal static class EntityModelMapperExtensions + { + /// + /// Ignores readonly properties and the date values + /// + /// + /// + public static IMappingExpression IgnoreDeletableEntityCommonProperties( + this IMappingExpression mapping) + where TDest: IDeletableEntity + { + return mapping + .IgnoreEntityCommonProperties() + .ForMember(dest => dest.DeletedDate, map => map.Ignore()); + } + + /// + /// Ignores readonly properties and the date values + /// + /// + /// + public static IMappingExpression IgnoreEntityCommonProperties( + this IMappingExpression mapping) + where TDest : IEntity + { + return mapping + .IgnoreAllPropertiesWithAnInaccessibleSetter() + .ForMember(dest => dest.CreateDate, map => map.Ignore()) + .ForMember(dest => dest.UpdateDate, map => map.Ignore()); + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/Mapping/MemberModelMapper.cs b/src/Umbraco.Web/Models/Mapping/MemberModelMapper.cs index 976026bd97eb..e3c82cf782fe 100644 --- a/src/Umbraco.Web/Models/Mapping/MemberModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/MemberModelMapper.cs @@ -15,6 +15,7 @@ using Umbraco.Core.PropertyEditors; using Umbraco.Core.Security; using Umbraco.Web.Trees; +using UserProfile = Umbraco.Web.Models.ContentEditing.UserProfile; namespace Umbraco.Web.Models.Mapping { @@ -106,7 +107,7 @@ public override void ConfigureMappings(IConfiguration config, ApplicationContext .ForMember(member => member.CreateDate, expression => expression.MapFrom(user => user.CreationDate)) .ForMember(member => member.UpdateDate, expression => expression.MapFrom(user => user.LastActivityDate)) .ForMember(member => member.Key, expression => expression.MapFrom(user => user.ProviderUserKey.TryConvertTo().Result.ToString("N"))) - .ForMember(member => member.Owner, expression => expression.UseValue(new UserBasic {Name = "Admin", UserId = 0})) + .ForMember(member => member.Owner, expression => expression.UseValue(new UserProfile {Name = "Admin", UserId = 0})) .ForMember(member => member.Icon, expression => expression.UseValue("icon-user")) .ForMember(member => member.Name, expression => expression.MapFrom(user => user.UserName)) .ForMember(member => member.Email, expression => expression.MapFrom(content => content.Email)) diff --git a/src/Umbraco.Web/Models/Mapping/OwnerResolver.cs b/src/Umbraco.Web/Models/Mapping/OwnerResolver.cs index 067d4955915e..8992451e9e41 100644 --- a/src/Umbraco.Web/Models/Mapping/OwnerResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/OwnerResolver.cs @@ -3,6 +3,7 @@ using Umbraco.Core.Models.EntityBase; using Umbraco.Core.Models.Membership; using Umbraco.Web.Models.ContentEditing; +using UserProfile = Umbraco.Web.Models.ContentEditing.UserProfile; namespace Umbraco.Web.Models.Mapping { @@ -10,12 +11,12 @@ namespace Umbraco.Web.Models.Mapping /// Maps the Owner for IContentBase /// /// - internal class OwnerResolver : ValueResolver + internal class OwnerResolver : ValueResolver where TPersisted : IContentBase { - protected override UserBasic ResolveCore(TPersisted source) + protected override UserProfile ResolveCore(TPersisted source) { - return Mapper.Map(source.GetCreatorProfile()); + return Mapper.Map(source.GetCreatorProfile()); } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Models/Mapping/SectionModelMapper.cs b/src/Umbraco.Web/Models/Mapping/SectionModelMapper.cs index 4f6015967d8e..787eea5bc478 100644 --- a/src/Umbraco.Web/Models/Mapping/SectionModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/SectionModelMapper.cs @@ -11,6 +11,7 @@ internal class SectionModelMapper : MapperConfiguration public override void ConfigureMappings(IConfiguration config, ApplicationContext applicationContext) { config.CreateMap() + .ForMember(section => section.RoutePath, x => x.Ignore()) .ForMember( dto => dto.Name, expression => expression.MapFrom(section => ui.Text("sections", section.Alias))) diff --git a/src/Umbraco.Web/Models/Mapping/TemplateModelMapper.cs b/src/Umbraco.Web/Models/Mapping/TemplateModelMapper.cs index 6111941084ce..43c75f416b29 100644 --- a/src/Umbraco.Web/Models/Mapping/TemplateModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/TemplateModelMapper.cs @@ -14,10 +14,8 @@ public override void ConfigureMappings(IConfiguration config, ApplicationContext .ForMember(x => x.Notifications, exp => exp.Ignore()); config.CreateMap() - .ForMember(x => x.DeletedDate, exp => exp.Ignore()) - .ForMember(x => x.Path, exp => exp.Ignore()) - .ForMember(x => x.CreateDate, exp => exp.Ignore()) - .ForMember(x => x.UpdateDate, exp => exp.Ignore()) + .IgnoreDeletableEntityCommonProperties() + .ForMember(x => x.Path, exp => exp.Ignore()) .ForMember(x => x.VirtualPath, exp => exp.Ignore()) .ForMember(x => x.Path, exp => exp.Ignore()) .ForMember(x => x.MasterTemplateId, exp => exp.Ignore()) // ok, assigned when creating the template diff --git a/src/Umbraco.Web/Models/Mapping/UserGroupDefaultPermissionsResolver.cs b/src/Umbraco.Web/Models/Mapping/UserGroupDefaultPermissionsResolver.cs new file mode 100644 index 000000000000..20f43fc74c36 --- /dev/null +++ b/src/Umbraco.Web/Models/Mapping/UserGroupDefaultPermissionsResolver.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using AutoMapper; +using umbraco.interfaces; +using Umbraco.Core; +using Umbraco.Core.CodeAnnotations; +using Umbraco.Core.Models; +using Umbraco.Core.Models.Membership; +using Umbraco.Core.Services; +using Umbraco.Web.Models.ContentEditing; + +namespace Umbraco.Web.Models.Mapping +{ + /// + /// Converts an IUserGroup instance into a dictionary of permissions by category + /// + internal class UserGroupDefaultPermissionsResolver : ValueResolver>> + { + private readonly ILocalizedTextService _textService; + + public UserGroupDefaultPermissionsResolver(ILocalizedTextService textService) + { + if (textService == null) throw new ArgumentNullException("textService"); + _textService = textService; + } + + protected override IDictionary> ResolveCore(IUserGroup source) + { + return ActionsResolver.Current.Actions + .Where(x => x.CanBePermissionAssigned) + .Select(x => GetPermission(x, source)) + .GroupBy(x => x.Category) + .ToDictionary(x => x.Key, x => (IEnumerable)x.ToArray()); + } + + private Permission GetPermission(IAction action, IUserGroup source) + { + var result = new Permission(); + var attribute = action.GetType().GetCustomAttribute(false); + result.Category = attribute == null + ? _textService.Localize(string.Format("actionCategories/{0}", Constants.Conventions.PermissionCategories.OtherCategory)) + : _textService.Localize(string.Format("actionCategories/{0}", attribute.Category)); + result.Name = attribute == null || attribute.Name.IsNullOrWhiteSpace() + ? _textService.Localize(string.Format("actions/{0}", action.Alias)) + : attribute.Name; + result.Description = _textService.Localize(String.Format("actionDescriptions/{0}", action.Alias)); + result.Icon = action.Icon; + result.Checked = source.Permissions != null && source.Permissions.Contains(action.Letter.ToString(CultureInfo.InvariantCulture)); + result.PermissionCode = action.Letter.ToString(CultureInfo.InvariantCulture); + return result; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs b/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs index eedc2cafca1d..6c406437668b 100644 --- a/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs @@ -1,13 +1,20 @@ using System; +using System.Collections.Generic; +using System.Linq; using AutoMapper; using Umbraco.Core; using Umbraco.Core.Models.Mapping; using Umbraco.Core.Models.Membership; using Umbraco.Web.Models.ContentEditing; using umbraco; +using umbraco.BusinessLogic.Actions; +using Umbraco.Core.IO; using Umbraco.Core.Models; +using Umbraco.Core.Models.EntityBase; using Umbraco.Core.Models.Identity; using Umbraco.Core.Security; +using Umbraco.Core.Services; +using UserProfile = Umbraco.Web.Models.ContentEditing.UserProfile; namespace Umbraco.Web.Models.Mapping { @@ -15,46 +22,417 @@ internal class UserModelMapper : MapperConfiguration { public override void ConfigureMappings(IConfiguration config, ApplicationContext applicationContext) { - config.CreateMap() - .ForMember(detail => detail.UserId, opt => opt.MapFrom(user => GetIntId(user.Id))) - .ForMember(detail => detail.UserType, opt => opt.MapFrom(user => user.UserType.Alias)) - .ForMember(detail => detail.StartContentId, opt => opt.MapFrom(user => user.StartContentId)) - .ForMember(detail => detail.StartMediaId, opt => opt.MapFrom(user => user.StartMediaId)) - .ForMember(detail => detail.Culture, opt => opt.MapFrom(user => user.GetUserCulture(applicationContext.Services.TextService))) + + config.CreateMap() + .ConstructUsing((UserGroupSave save) => new UserGroup() { CreateDate = DateTime.Now }) + .IgnoreDeletableEntityCommonProperties() + .ForMember(dest => dest.Id, map => map.Condition(source => GetIntId(source.Id) > 0)) + .ForMember(dest => dest.Id, map => map.MapFrom(source => GetIntId(source.Id))) + .ForMember(dest => dest.Permissions, map => map.MapFrom(source => source.DefaultPermissions)) + .AfterMap((save, userGroup) => + { + userGroup.ClearAllowedSections(); + foreach (var section in save.Sections) + { + userGroup.AddAllowedSection(section); + } + }); + + //Used for merging existing UserSave to an existing IUser instance - this will not create an IUser instance! + config.CreateMap() + .IgnoreDeletableEntityCommonProperties() + .ForMember(dest => dest.Id, map => map.Condition(source => GetIntId(source.Id) > 0)) + .ForMember(detail => detail.SessionTimeout, opt => opt.Ignore()) + .ForMember(detail => detail.EmailConfirmedDate, opt => opt.Ignore()) + .ForMember(detail => detail.UserType, opt => opt.Ignore()) + .ForMember(detail => detail.StartContentId, opt => opt.Ignore()) + .ForMember(detail => detail.StartMediaId, opt => opt.Ignore()) + .ForMember(detail => detail.InvitedDate, opt => opt.Ignore()) + .ForMember(detail => detail.SecurityStamp, opt => opt.Ignore()) + .ForMember(detail => detail.Avatar, opt => opt.Ignore()) + .ForMember(detail => detail.ProviderUserKey, opt => opt.Ignore()) + .ForMember(detail => detail.RawPasswordValue, opt => opt.Ignore()) + .ForMember(detail => detail.RawPasswordAnswerValue, opt => opt.Ignore()) + .ForMember(detail => detail.PasswordQuestion, opt => opt.Ignore()) + .ForMember(detail => detail.Comments, opt => opt.Ignore()) + .ForMember(detail => detail.IsApproved, opt => opt.Ignore()) + .ForMember(detail => detail.IsLockedOut, opt => opt.Ignore()) + .ForMember(detail => detail.LastLoginDate, opt => opt.Ignore()) + .ForMember(detail => detail.LastPasswordChangeDate, opt => opt.Ignore()) + .ForMember(detail => detail.LastLockoutDate, opt => opt.Ignore()) + .ForMember(detail => detail.FailedPasswordAttempts, opt => opt.Ignore()) + .ForMember(user => user.Language, expression => expression.MapFrom(save => save.Culture)) + .AfterMap((save, user) => + { + user.ClearGroups(); + var foundGroups = applicationContext.Services.UserService.GetUserGroupsByAlias(save.UserGroups.ToArray()); + foreach (var group in foundGroups) + { + user.AddGroup(group.ToReadOnlyGroup()); + } + }); + + config.CreateMap() + .IgnoreDeletableEntityCommonProperties() + .ForMember(detail => detail.Id, opt => opt.Ignore()) + .ForMember(detail => detail.StartContentIds, opt => opt.Ignore()) + .ForMember(detail => detail.StartMediaIds, opt => opt.Ignore()) + .ForMember(detail => detail.UserType, opt => opt.Ignore()) + .ForMember(detail => detail.StartContentId, opt => opt.Ignore()) + .ForMember(detail => detail.StartMediaId, opt => opt.Ignore()) + .ForMember(detail => detail.Language, opt => opt.Ignore()) + .ForMember(detail => detail.Username, opt => opt.Ignore()) + .ForMember(detail => detail.PasswordQuestion, opt => opt.Ignore()) + .ForMember(detail => detail.SessionTimeout, opt => opt.Ignore()) + .ForMember(detail => detail.EmailConfirmedDate, opt => opt.Ignore()) + .ForMember(detail => detail.InvitedDate, opt => opt.Ignore()) + .ForMember(detail => detail.SecurityStamp, opt => opt.Ignore()) + .ForMember(detail => detail.Avatar, opt => opt.Ignore()) + .ForMember(detail => detail.ProviderUserKey, opt => opt.Ignore()) + .ForMember(detail => detail.RawPasswordValue, opt => opt.Ignore()) + .ForMember(detail => detail.RawPasswordAnswerValue, opt => opt.Ignore()) + .ForMember(detail => detail.Comments, opt => opt.Ignore()) + .ForMember(detail => detail.IsApproved, opt => opt.Ignore()) + .ForMember(detail => detail.IsLockedOut, opt => opt.Ignore()) + .ForMember(detail => detail.LastLoginDate, opt => opt.Ignore()) + .ForMember(detail => detail.LastPasswordChangeDate, opt => opt.Ignore()) + .ForMember(detail => detail.LastLockoutDate, opt => opt.Ignore()) + .ForMember(detail => detail.FailedPasswordAttempts, opt => opt.Ignore()) + //all invited users will not be approved, completing the invite will approve the user + .ForMember(user => user.IsApproved, expression => expression.UseValue(false)) + .AfterMap((invite, user) => + { + user.ClearGroups(); + var foundGroups = applicationContext.Services.UserService.GetUserGroupsByAlias(invite.UserGroups.ToArray()); + foreach (var group in foundGroups) + { + user.AddGroup(group.ToReadOnlyGroup()); + } + }); + + config.CreateMap() + .ForMember(detail => detail.ContentStartNode, opt => opt.Ignore()) + .ForMember(detail => detail.UserCount, opt => opt.Ignore()) + .ForMember(detail => detail.MediaStartNode, opt => opt.Ignore()) + .ForMember(detail => detail.Key, opt => opt.Ignore()) + .ForMember(detail => detail.Sections, opt => opt.Ignore()) + .ForMember(detail => detail.Notifications, opt => opt.Ignore()) + .ForMember(detail => detail.Udi, opt => opt.Ignore()) + .ForMember(detail => detail.Trashed, opt => opt.Ignore()) + .ForMember(detail => detail.ParentId, opt => opt.UseValue(-1)) + .ForMember(detail => detail.Path, opt => opt.MapFrom(userGroup => "-1," + userGroup.Id)) + .ForMember(detail => detail.AdditionalData, opt => opt.Ignore()) + .AfterMap((group, display) => + { + MapUserGroupBasic(applicationContext.Services, group, display); + }); + + config.CreateMap() + .ForMember(detail => detail.ContentStartNode, opt => opt.Ignore()) + .ForMember(detail => detail.MediaStartNode, opt => opt.Ignore()) + .ForMember(detail => detail.Sections, opt => opt.Ignore()) + .ForMember(detail => detail.Notifications, opt => opt.Ignore()) + .ForMember(detail => detail.Udi, opt => opt.Ignore()) + .ForMember(detail => detail.Trashed, opt => opt.Ignore()) + .ForMember(detail => detail.ParentId, opt => opt.UseValue(-1)) + .ForMember(detail => detail.Path, opt => opt.MapFrom(userGroup => "-1," + userGroup.Id)) + .ForMember(detail => detail.AdditionalData, opt => opt.Ignore()) + .AfterMap((group, display) => + { + MapUserGroupBasic(applicationContext.Services, group, display); + }); + + //create a map to assign a user group's default permissions to the AssignedUserGroupPermissions instance + config.CreateMap() + .ForMember(detail => detail.Udi, opt => opt.Ignore()) + .ForMember(detail => detail.Trashed, opt => opt.Ignore()) + .ForMember(detail => detail.AdditionalData, opt => opt.Ignore()) + .ForMember(detail => detail.Id, opt => opt.MapFrom(group => group.Id)) + .ForMember(detail => detail.ParentId, opt => opt.UseValue(-1)) + .ForMember(detail => detail.Path, opt => opt.MapFrom(userGroup => "-1," + userGroup.Id)) + .ForMember(detail => detail.DefaultPermissions, expression => expression.ResolveUsing(new UserGroupDefaultPermissionsResolver(applicationContext.Services.TextService))) + //these will be manually mapped and by default they are null + .ForMember(detail => detail.AssignedPermissions, opt => opt.Ignore()) + .AfterMap((group, display) => + { + if (display.Icon.IsNullOrWhiteSpace()) + { + display.Icon = "icon-users"; + } + }); + + config.CreateMap() + .ForMember(x => x.Udi, expression => expression.MapFrom(x => Udi.Create(UmbracoObjectTypesExtensions.GetUdiType(x.NodeObjectTypeId), x.Key))) + .ForMember(basic => basic.Icon, expression => expression.MapFrom(entity => entity.ContentTypeIcon)) + .ForMember(dto => dto.Trashed, expression => expression.Ignore()) + .ForMember(x => x.Alias, expression => expression.Ignore()) + .ForMember(x => x.AssignedPermissions, expression => expression.Ignore()) + .AfterMap((entity, basic) => + { + if (entity.NodeObjectTypeId == Constants.ObjectTypes.MemberGuid && basic.Icon.IsNullOrWhiteSpace()) + { + basic.Icon = "icon-user"; + } + }); + + config.CreateMap() + .ForMember(detail => detail.ContentStartNode, opt => opt.Ignore()) + .ForMember(detail => detail.MediaStartNode, opt => opt.Ignore()) + .ForMember(detail => detail.Sections, opt => opt.Ignore()) + .ForMember(detail => detail.Notifications, opt => opt.Ignore()) + .ForMember(detail => detail.Udi, opt => opt.Ignore()) + .ForMember(detail => detail.Trashed, opt => opt.Ignore()) + .ForMember(detail => detail.ParentId, opt => opt.UseValue(-1)) + .ForMember(detail => detail.Path, opt => opt.MapFrom(userGroup => "-1," + userGroup.Id)) + .ForMember(detail => detail.AdditionalData, opt => opt.Ignore()) + .ForMember(detail => detail.Users, opt => opt.Ignore()) + .ForMember(detail => detail.DefaultPermissions, expression => expression.ResolveUsing(new UserGroupDefaultPermissionsResolver(applicationContext.Services.TextService))) + .ForMember(detail => detail.AssignedPermissions, opt => opt.Ignore()) + .AfterMap((group, display) => + { + MapUserGroupBasic(applicationContext.Services, group, display); + + //Important! Currently we are never mapping to multiple UserGroupDisplay objects but if we start doing that + // this will cause an N+1 and we'll need to change how this works. + var users = applicationContext.Services.UserService.GetAllInGroup(group.Id); + display.Users = Mapper.Map>(users); + + //Deal with assigned permissions: + + var allContentPermissions = applicationContext.Services.UserService.GetPermissions(@group, true) + .ToDictionary(x => x.EntityId, x => x); + + var contentEntities = allContentPermissions.Keys.Count == 0 + ? new IUmbracoEntity[0] + : applicationContext.Services.EntityService.GetAll(UmbracoObjectTypes.Document, allContentPermissions.Keys.ToArray()); + + var allAssignedPermissions = new List(); + foreach (var entity in contentEntities) + { + var contentPermissions = allContentPermissions[entity.Id]; + + var assignedContentPermissions = Mapper.Map(entity); + assignedContentPermissions.AssignedPermissions = AssignedUserGroupPermissions.ClonePermissions(display.DefaultPermissions); + + //since there is custom permissions assigned to this node for this group, we need to clear all of the default permissions + //and we'll re-check it if it's one of the explicitly assigned ones + foreach (var permission in assignedContentPermissions.AssignedPermissions.SelectMany(x => x.Value)) + { + permission.Checked = false; + permission.Checked = contentPermissions.AssignedPermissions.Contains(permission.PermissionCode, StringComparer.InvariantCulture); + } + + allAssignedPermissions.Add(assignedContentPermissions); + } + + display.AssignedPermissions = allAssignedPermissions; + }); + + //Important! Currently we are never mapping to multiple UserDisplay objects but if we start doing that + // this will cause an N+1 and we'll need to change how this works. + config.CreateMap() + .ForMember(detail => detail.Avatars, opt => opt.MapFrom(user => user.GetCurrentUserAvatarUrls(applicationContext.Services.UserService, applicationContext.ApplicationCache.RuntimeCache))) + .ForMember(detail => detail.Username, opt => opt.MapFrom(user => user.Username)) + .ForMember(detail => detail.LastLoginDate, opt => opt.MapFrom(user => user.LastLoginDate == default(DateTime) ? null : (DateTime?) user.LastLoginDate)) + .ForMember(detail => detail.UserGroups, opt => opt.MapFrom(user => user.Groups)) + .ForMember( + detail => detail.CalculatedStartContentIds, + opt => opt.MapFrom(user => GetStartNodeValues( + user.CalculateContentStartNodeIds(applicationContext.Services.EntityService), + applicationContext.Services.TextService, + applicationContext.Services.EntityService, + UmbracoObjectTypes.Document, + "content/contentRoot"))) + .ForMember( + detail => detail.CalculatedStartMediaIds, + opt => opt.MapFrom(user => GetStartNodeValues( + user.CalculateMediaStartNodeIds(applicationContext.Services.EntityService), + applicationContext.Services.TextService, + applicationContext.Services.EntityService, + UmbracoObjectTypes.Media, + "media/mediaRoot"))) + .ForMember( + detail => detail.StartContentIds, + opt => opt.MapFrom(user => GetStartNodeValues( + user.StartContentIds.ToArray(), + applicationContext.Services.TextService, + applicationContext.Services.EntityService, + UmbracoObjectTypes.Document, + "content/contentRoot"))) + .ForMember( + detail => detail.StartMediaIds, + opt => opt.MapFrom(user => GetStartNodeValues( + user.StartMediaIds.ToArray(), + applicationContext.Services.TextService, + applicationContext.Services.EntityService, + UmbracoObjectTypes.Media, + "media/mediaRoot"))) + .ForMember(detail => detail.Culture, opt => opt.MapFrom(user => user.GetUserCulture(applicationContext.Services.TextService))) + .ForMember( + detail => detail.AvailableCultures, + opt => opt.MapFrom(user => applicationContext.Services.TextService.GetSupportedCultures().ToDictionary(x => x.Name, x => x.DisplayName))) .ForMember( detail => detail.EmailHash, opt => opt.MapFrom(user => user.Email.ToLowerInvariant().Trim().GenerateHash())) - .ForMember(detail => detail.SecondsUntilTimeout, opt => opt.Ignore()); - - config.CreateMap() - .ForMember(detail => detail.UserId, opt => opt.MapFrom(user => user.Id)) - .ForMember(detail => detail.UserType, opt => opt.MapFrom(user => user.UserTypeAlias)) - .ForMember(detail => detail.StartContentId, opt => opt.MapFrom(user => user.StartContentId)) - .ForMember(detail => detail.StartMediaId, opt => opt.MapFrom(user => user.StartMediaId)) - .ForMember(detail => detail.Culture, opt => opt.MapFrom(user => user.Culture)) - .ForMember(detail => detail.AllowedSections, opt => opt.MapFrom(user => user.AllowedSections)) + .ForMember(detail => detail.ParentId, opt => opt.UseValue(-1)) + .ForMember(detail => detail.Path, opt => opt.MapFrom(user => "-1," + user.Id)) + .ForMember(detail => detail.Notifications, opt => opt.Ignore()) + .ForMember(detail => detail.Udi, opt => opt.Ignore()) + .ForMember(detail => detail.Icon, opt => opt.Ignore()) + .ForMember(detail => detail.IsCurrentUser, opt => opt.Ignore()) + .ForMember(detail => detail.Trashed, opt => opt.Ignore()) + .ForMember(detail => detail.ResetPasswordValue, opt => opt.Ignore()) + .ForMember(detail => detail.Alias, opt => opt.Ignore()) + .ForMember(detail => detail.Trashed, opt => opt.Ignore()) + .ForMember(detail => detail.AdditionalData, opt => opt.Ignore()); + + config.CreateMap() + //Loading in the user avatar's requires an external request if they don't have a local file avatar, this means that initial load of paging may incur a cost + //Alternatively, if this is annoying the back office UI would need to be updated to request the avatars for the list of users separately so it doesn't look + //like the load time is waiting. + .ForMember(detail => + detail.Avatars, + opt => opt.MapFrom(user => user.GetCurrentUserAvatarUrls(applicationContext.Services.UserService, applicationContext.ApplicationCache.RuntimeCache))) + .ForMember(detail => detail.Username, opt => opt.MapFrom(user => user.Username)) + .ForMember(detail => detail.UserGroups, opt => opt.MapFrom(user => user.Groups)) + .ForMember(detail => detail.LastLoginDate, opt => opt.MapFrom(user => user.LastLoginDate == default(DateTime) ? null : (DateTime?) user.LastLoginDate)) + .ForMember(detail => detail.Culture, opt => opt.MapFrom(user => user.GetUserCulture(applicationContext.Services.TextService))) + .ForMember( + detail => detail.EmailHash, + opt => opt.MapFrom(user => user.Email.ToLowerInvariant().Trim().ToMd5())) + .ForMember(detail => detail.ParentId, opt => opt.UseValue(-1)) + .ForMember(detail => detail.Path, opt => opt.MapFrom(user => "-1," + user.Id)) + .ForMember(detail => detail.Notifications, opt => opt.Ignore()) + .ForMember(detail => detail.IsCurrentUser, opt => opt.Ignore()) + .ForMember(detail => detail.Udi, opt => opt.Ignore()) + .ForMember(detail => detail.Icon, opt => opt.Ignore()) + .ForMember(detail => detail.Trashed, opt => opt.Ignore()) + .ForMember(detail => detail.Alias, opt => opt.Ignore()) + .ForMember(detail => detail.Trashed, opt => opt.Ignore()) + .ForMember(detail => detail.AdditionalData, opt => opt.Ignore()); + + config.CreateMap() + .ForMember(detail => detail.Avatars, opt => opt.MapFrom(user => user.GetCurrentUserAvatarUrls(applicationContext.Services.UserService, applicationContext.ApplicationCache.RuntimeCache))) + .ForMember(detail => detail.UserId, opt => opt.MapFrom(user => GetIntId(user.Id))) + .ForMember(detail => detail.StartContentIds, opt => opt.MapFrom(user => user.CalculateContentStartNodeIds(applicationContext.Services.EntityService))) + .ForMember(detail => detail.StartMediaIds, opt => opt.MapFrom(user => user.CalculateMediaStartNodeIds(applicationContext.Services.EntityService))) + .ForMember(detail => detail.Culture, opt => opt.MapFrom(user => user.GetUserCulture(applicationContext.Services.TextService))) .ForMember( detail => detail.EmailHash, opt => opt.MapFrom(user => user.Email.ToLowerInvariant().Trim().GenerateHash())) - .ForMember(detail => detail.SecondsUntilTimeout, opt => opt.Ignore()); + .ForMember(detail => detail.SecondsUntilTimeout, opt => opt.Ignore()) + .ForMember(detail => detail.UserGroups, opt => opt.Ignore()) + .AfterMap((user, detail) => + { + //we need to map the legacy UserType + //the best we can do here is to return the user's first user group as a IUserType object + //but we should attempt to return any group that is the built in ones first + var groups = user.Groups.ToArray(); + detail.UserGroups = user.Groups.Select(x => x.Alias).ToArray(); + + if (groups.Length == 0) + { + //In backwards compatibility land, a user type cannot be null! so we need to return a fake one. + detail.UserType = "temp"; + } + else + { + var builtIns = new[] { Constants.Security.AdminGroupAlias, "writer", "editor", Constants.Security.TranslatorGroupAlias }; + var foundBuiltIn = groups.FirstOrDefault(x => builtIns.Contains(x.Alias)); + if (foundBuiltIn != null) + { + detail.UserType = foundBuiltIn.Alias; + } + else + { + //otherwise return the first + detail.UserType = groups[0].Alias; + } + } + + }); - config.CreateMap() + config.CreateMap() .ForMember(detail => detail.UserId, opt => opt.MapFrom(profile => GetIntId(profile.Id))); config.CreateMap() .ConstructUsing((IUser user) => new UserData()) .ForMember(detail => detail.Id, opt => opt.MapFrom(user => user.Id)) - .ForMember(detail => detail.AllowedApplications, opt => opt.MapFrom(user => user.AllowedSections)) + .ForMember(detail => detail.AllowedApplications, opt => opt.MapFrom(user => user.AllowedSections.ToArray())) .ForMember(detail => detail.RealName, opt => opt.MapFrom(user => user.Name)) - .ForMember(detail => detail.Roles, opt => opt.MapFrom(user => new[] {user.UserType.Alias})) - .ForMember(detail => detail.StartContentNode, opt => opt.MapFrom(user => user.StartContentId)) - .ForMember(detail => detail.StartMediaNode, opt => opt.MapFrom(user => user.StartMediaId)) + .ForMember(detail => detail.Roles, opt => opt.MapFrom(user => user.Groups.Select(x => x.Alias).ToArray())) + .ForMember(detail => detail.StartContentNodes, opt => opt.MapFrom(user => user.CalculateContentStartNodeIds(applicationContext.Services.EntityService))) + .ForMember(detail => detail.StartMediaNodes, opt => opt.MapFrom(user => user.CalculateMediaStartNodeIds(applicationContext.Services.EntityService))) .ForMember(detail => detail.Username, opt => opt.MapFrom(user => user.Username)) .ForMember(detail => detail.Culture, opt => opt.MapFrom(user => user.GetUserCulture(applicationContext.Services.TextService))) .ForMember(detail => detail.SessionId, opt => opt.MapFrom(user => user.SecurityStamp.IsNullOrWhiteSpace() ? Guid.NewGuid().ToString("N") : user.SecurityStamp)); - } - + } + + private IEnumerable GetStartNodeValues(int[] startNodeIds, + ILocalizedTextService textService, IEntityService entityService, UmbracoObjectTypes objectType, + string localizedKey) + { + if (startNodeIds.Length > 0) + { + var startNodes = new List(); + if (startNodeIds.Contains(-1)) + { + startNodes.Add(RootNode(textService.Localize(localizedKey))); + } + var mediaItems = entityService.GetAll(objectType, startNodeIds); + startNodes.AddRange(Mapper.Map, IEnumerable>(mediaItems)); + return startNodes; + } + return Enumerable.Empty(); + } + + private void MapUserGroupBasic(ServiceContext services, dynamic group, UserGroupBasic display) + { + var allSections = services.SectionService.GetSections(); + display.Sections = allSections.Where(x => Enumerable.Contains(group.AllowedSections, x.Alias)).Select(Mapper.Map); + + if (group.StartMediaId > 0) + { + display.MediaStartNode = Mapper.Map( + services.EntityService.Get(group.StartMediaId, UmbracoObjectTypes.Media)); + } + else if (group.StartMediaId == -1) + { + //create the root node + display.MediaStartNode = RootNode(services.TextService.Localize("media/mediaRoot")); + } + + if (group.StartContentId > 0) + { + display.ContentStartNode = Mapper.Map( + services.EntityService.Get(group.StartContentId, UmbracoObjectTypes.Document)); + } + else if (group.StartContentId == -1) + { + //create the root node + display.ContentStartNode = RootNode(services.TextService.Localize("content/contentRoot")); + } + + if (display.Icon.IsNullOrWhiteSpace()) + { + display.Icon = "icon-users"; + } + } + + private EntityBasic RootNode(string name) + { + return new EntityBasic + { + Name = name, + Path = "-1", + Icon = "icon-folder", + Id = -1, + Trashed = false, + ParentId = -1 + }; + } + private static int GetIntId(object id) { var result = id.TryConvertTo(); diff --git a/src/Umbraco.Web/Models/ProfileModel.cs b/src/Umbraco.Web/Models/ProfileModel.cs index 118f9a9f7a72..39043a4b11c6 100644 --- a/src/Umbraco.Web/Models/ProfileModel.cs +++ b/src/Umbraco.Web/Models/ProfileModel.cs @@ -32,9 +32,9 @@ public static ProfileModel CreateModel() private ProfileModel(bool doLookup) { MemberProperties = new List(); - if (doLookup) + if (doLookup && UmbracoContext.Current != null) { - var helper = new MembershipHelper(ApplicationContext.Current, new HttpContextWrapper(HttpContext.Current)); + var helper = new MembershipHelper(UmbracoContext.Current); var model = helper.GetCurrentMemberProfileModel(); MemberProperties = model.MemberProperties; } diff --git a/src/Umbraco.Web/Models/RegisterModel.cs b/src/Umbraco.Web/Models/RegisterModel.cs index 237f6d784516..b51f09b63131 100644 --- a/src/Umbraco.Web/Models/RegisterModel.cs +++ b/src/Umbraco.Web/Models/RegisterModel.cs @@ -32,9 +32,9 @@ private RegisterModel(bool doLookup) MemberProperties = new List(); LoginOnSuccess = true; CreatePersistentLoginCookie = true; - if (doLookup && HttpContext.Current != null && ApplicationContext.Current != null) + if (doLookup && UmbracoContext.Current != null) { - var helper = new MembershipHelper(ApplicationContext.Current, new HttpContextWrapper(HttpContext.Current)); + var helper = new MembershipHelper(UmbracoContext.Current); var model = helper.CreateRegistrationModel(MemberTypeAlias); MemberProperties = model.MemberProperties; } diff --git a/src/Umbraco.Web/Models/RelatedLink.cs b/src/Umbraco.Web/Models/RelatedLink.cs index 884bdebeef45..2dcb63dd5c6f 100644 --- a/src/Umbraco.Web/Models/RelatedLink.cs +++ b/src/Umbraco.Web/Models/RelatedLink.cs @@ -1,8 +1,11 @@ -namespace Umbraco.Web.Models +using Umbraco.Core.Models; + +namespace Umbraco.Web.Models { - public class RelatedLink : RelatedLinkBase - { - public int? Id { get; internal set; } - internal bool IsDeleted { get; set; } - } + public class RelatedLink : RelatedLinkBase + { + public int? Id { get; internal set; } + internal bool IsDeleted { get; set; } + public IPublishedContent Content { get; set; } + } } diff --git a/src/Umbraco.Web/Models/RelatedLinkBase.cs b/src/Umbraco.Web/Models/RelatedLinkBase.cs index b347e25e0ac2..c2077ce4a944 100644 --- a/src/Umbraco.Web/Models/RelatedLinkBase.cs +++ b/src/Umbraco.Web/Models/RelatedLinkBase.cs @@ -1,5 +1,4 @@ using Newtonsoft.Json; -using Umbraco.Core.Models; namespace Umbraco.Web.Models { @@ -15,7 +14,5 @@ public abstract class RelatedLinkBase public bool IsInternal { get; set; } [JsonProperty("type")] public RelatedLinkType Type { get; set; } - [JsonIgnore] - public IPublishedContent Content { get; set; } } } diff --git a/src/Umbraco.Web/Mvc/ControllerExtensions.cs b/src/Umbraco.Web/Mvc/ControllerExtensions.cs index 734e60e8f55a..9e5574500206 100644 --- a/src/Umbraco.Web/Mvc/ControllerExtensions.cs +++ b/src/Umbraco.Web/Mvc/ControllerExtensions.cs @@ -2,6 +2,7 @@ using System.IO; using System.Threading; using System.Web.Mvc; +using System.Web.Routing; namespace Umbraco.Web.Mvc { @@ -101,16 +102,65 @@ internal static string RenderViewToString(this ControllerBase controller, string using (var sw = new StringWriter()) { - var viewResult = !isPartial + var viewResult = isPartial == false ? ViewEngines.Engines.FindView(controller.ControllerContext, viewName, null) : ViewEngines.Engines.FindPartialView(controller.ControllerContext, viewName); - var viewContext = new ViewContext(controller.ControllerContext, viewResult.View, controller.ViewData, controller.TempData, sw); + if (viewResult.View == null) + throw new InvalidOperationException("No view could be found by name " + viewName); + var viewContext = new ViewContext(controller.ControllerContext, viewResult.View, controller.ViewData, controller.TempData, sw); viewResult.View.Render(viewContext, sw); viewResult.ViewEngine.ReleaseView(controller.ControllerContext, viewResult.View); return sw.GetStringBuilder().ToString(); } } + /// + /// Renders the partial view to string. + /// + /// The request context. + /// + /// + /// Name of the view. + /// The model. + /// true if it is a Partial view, otherwise false for a normal view + /// + internal static string RenderViewToString( + this RequestContext requestContext, + ViewDataDictionary viewData, + TempDataDictionary tempData, + string viewName, object model, bool isPartial = false) + { + if (requestContext == null) throw new ArgumentNullException("requestContext"); + if (viewData == null) throw new ArgumentNullException("viewData"); + if (tempData == null) throw new ArgumentNullException("tempData"); + + var routeData = requestContext.RouteData; + if (routeData.Values.ContainsKey("controller") == false) + routeData.Values.Add("controller", "Fake"); + viewData.Model = model; + var controllerContext = new ControllerContext( + requestContext.HttpContext, routeData, + new FakeController + { + ViewData = viewData + }); + + using (var sw = new StringWriter()) + { + var viewResult = isPartial == false + ? ViewEngines.Engines.FindView(controllerContext, viewName, null) + : ViewEngines.Engines.FindPartialView(controllerContext, viewName); + if (viewResult.View == null) + throw new InvalidOperationException("No view could be found by name " + viewName); + var viewContext = new ViewContext(controllerContext, viewResult.View, viewData, tempData, sw); + viewResult.View.Render(viewContext, sw); + viewResult.ViewEngine.ReleaseView(controllerContext, viewResult.View); + return sw.GetStringBuilder().ToString(); + } + } + + private class FakeController : ControllerBase { protected override void ExecuteCore() { } } + /// /// Normally in MVC the way that the View object gets assigned to the result is to Execute the ViewResult, this however /// will write to the Response output stream which isn't what we want. Instead, this method will use the same logic inside diff --git a/src/Umbraco.Web/PluginManagerExtensions.cs b/src/Umbraco.Web/PluginManagerExtensions.cs index bda4b3a95f78..76b71245e5ee 100644 --- a/src/Umbraco.Web/PluginManagerExtensions.cs +++ b/src/Umbraco.Web/PluginManagerExtensions.cs @@ -9,6 +9,7 @@ using Umbraco.Web.WebApi; using umbraco; using umbraco.interfaces; +using Umbraco.Web.Search; namespace Umbraco.Web { @@ -48,12 +49,22 @@ internal static IEnumerable ResolveTrees(this PluginManager resolver) return resolver.ResolveTypes(); } - /// - /// Returns all classes attributed with RestExtensionAttribute attribute - /// - /// - /// - internal static IEnumerable ResolveRestExtensions(this PluginManager resolver) + /// + /// Returns all available in application + /// + /// + /// + internal static IEnumerable ResolveSearchableTrees(this PluginManager resolver) + { + return resolver.ResolveTypes(); + } + + /// + /// Returns all classes attributed with RestExtensionAttribute attribute + /// + /// + /// + internal static IEnumerable ResolveRestExtensions(this PluginManager resolver) { return resolver.ResolveAttributedTypes(); } diff --git a/src/Umbraco.Web/Profiling/WebProfiler.cs b/src/Umbraco.Web/Profiling/WebProfiler.cs index b1c2d9eefb7f..fd980db2d1f4 100644 --- a/src/Umbraco.Web/Profiling/WebProfiler.cs +++ b/src/Umbraco.Web/Profiling/WebProfiler.cs @@ -99,13 +99,17 @@ private bool ShouldProfile(object sender) if (request.Success == false || request.Result.Url.IsClientSideRequest()) return false; - if (string.IsNullOrEmpty(request.Result.QueryString["umbDebug"])) - return false; + //if there is an umbDebug query string than profile it + bool umbDebug; + if (string.IsNullOrEmpty(request.Result.QueryString["umbDebug"]) == false && bool.TryParse(request.Result.QueryString["umbDebug"], out umbDebug)) + return true; - if (request.Result.Url.IsBackOfficeRequest(HttpRuntime.AppDomainAppVirtualPath)) - return false; + //if there is an umbDebug header than profile it + if (string.IsNullOrEmpty(request.Result.Headers["X-UMB-DEBUG"]) == false && bool.TryParse(request.Result.Headers["X-UMB-DEBUG"], out umbDebug)) + return true; - return true; + //everything else is ok to profile + return false; } /// diff --git a/src/Umbraco.Web/PropertyEditors/NestedContentController.cs b/src/Umbraco.Web/PropertyEditors/NestedContentController.cs new file mode 100644 index 000000000000..3e8b0027fddd --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/NestedContentController.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using System.Linq; +using Umbraco.Web.Editors; +using Umbraco.Web.Mvc; + +namespace Umbraco.Web.PropertyEditors +{ + [PluginController("UmbracoApi")] + public class NestedContentController : UmbracoAuthorizedJsonController + { + [System.Web.Http.HttpGet] + public IEnumerable GetContentTypes() + { + return Services.ContentTypeService.GetAllContentTypes() + .OrderBy(x => x.SortOrder) + .Select(x => new + { + id = x.Id, + guid = x.Key, + name = x.Name, + alias = x.Alias, + icon = x.Icon, + tabs = x.CompositionPropertyGroups.Select(y => y.Name).Distinct() + }); + } + } +} diff --git a/src/Umbraco.Web/PropertyEditors/NestedContentHelper.cs b/src/Umbraco.Web/PropertyEditors/NestedContentHelper.cs new file mode 100644 index 000000000000..079a2e33a482 --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/NestedContentHelper.cs @@ -0,0 +1,131 @@ +using System; +using System.Linq; +using Newtonsoft.Json.Linq; +using Umbraco.Core; +using Umbraco.Core.Models; + +namespace Umbraco.Web.PropertyEditors +{ + internal static class NestedContentHelper + { + private const string CacheKeyPrefix = "Umbraco.Web.PropertyEditors.NestedContent.GetPreValuesCollectionByDataTypeId_"; + + public static PreValueCollection GetPreValuesCollectionByDataTypeId(int dtdId) + { + var preValueCollection = (PreValueCollection)ApplicationContext.Current.ApplicationCache.RuntimeCache.GetCacheItem( + string.Concat(CacheKeyPrefix, dtdId), + () => ApplicationContext.Current.Services.DataTypeService.GetPreValuesCollectionByDataTypeId(dtdId)); + + return preValueCollection; + } + + public static void ClearCache(int id) + { + ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheItem( + string.Concat(CacheKeyPrefix, id)); + } + + public static string GetContentTypeAliasFromItem(JObject item) + { + var contentTypeAliasProperty = item[NestedContentPropertyEditor.ContentTypeAliasPropertyKey]; + if (contentTypeAliasProperty == null) + { + return null; + } + + return contentTypeAliasProperty.ToObject(); + } + + public static IContentType GetContentTypeFromItem(JObject item) + { + var contentTypeAlias = GetContentTypeAliasFromItem(item); + if (string.IsNullOrEmpty(contentTypeAlias)) + { + return null; + } + + return ApplicationContext.Current.Services.ContentTypeService.GetContentType(contentTypeAlias); + } + + #region Conversion from v0.1.1 data formats + + public static void ConvertItemValueFromV011(JObject item, int dtdId, ref PreValueCollection preValues) + { + var contentTypeAlias = GetContentTypeAliasFromItem(item); + if (contentTypeAlias != null) + { + // the item is already in >v0.1.1 format + return; + } + + // old style (v0.1.1) data, let's attempt a conversion + // - get the prevalues (if they're not loaded already) + preValues = preValues ?? GetPreValuesCollectionByDataTypeId(dtdId); + + // - convert the prevalues (if necessary) + ConvertPreValueCollectionFromV011(preValues); + + // - get the content types prevalue as JArray + var preValuesAsDictionary = preValues.PreValuesAsDictionary.ToDictionary(x => x.Key, x => x.Value.Value); + if (!preValuesAsDictionary.ContainsKey(ContentTypesPreValueKey) || string.IsNullOrEmpty(preValuesAsDictionary[ContentTypesPreValueKey]) != false) + { + return; + } + + var preValueContentTypes = JArray.Parse(preValuesAsDictionary[ContentTypesPreValueKey]); + if (preValueContentTypes.Any()) + { + // the only thing we can really do is assume that the item is the first available content type + item[NestedContentPropertyEditor.ContentTypeAliasPropertyKey] = preValueContentTypes.First().Value("ncAlias"); + } + } + + public static void ConvertPreValueCollectionFromV011(PreValueCollection preValueCollection) + { + if (preValueCollection == null) + { + return; + } + + var persistedPreValuesAsDictionary = preValueCollection.PreValuesAsDictionary.ToDictionary(x => x.Key, x => x.Value.Value); + + // do we have a "docTypeGuid" prevalue and no "contentTypes" prevalue? + if (persistedPreValuesAsDictionary.ContainsKey("docTypeGuid") == false || persistedPreValuesAsDictionary.ContainsKey(ContentTypesPreValueKey)) + { + // the prevalues are already in >v0.1.1 format + return; + } + + // attempt to parse the doc type guid + Guid guid; + if (Guid.TryParse(persistedPreValuesAsDictionary["docTypeGuid"], out guid) == false) + { + // this shouldn't happen... but just in case. + return; + } + + // find the content type + var contentType = ApplicationContext.Current.Services.ContentTypeService.GetAllContentTypes().FirstOrDefault(c => c.Key == guid); + if (contentType == null) + { + return; + } + + // add a prevalue in the format expected by the new (>0.1.1) content type picker/configurator + preValueCollection.PreValuesAsDictionary[ContentTypesPreValueKey] = new PreValue( + string.Format(@"[{{""ncAlias"": ""{0}"", ""ncTabAlias"": ""{1}"", ""nameTemplate"": ""{2}"", }}]", + contentType.Alias, + persistedPreValuesAsDictionary["tabAlias"], + persistedPreValuesAsDictionary["nameTemplate"] + ) + ); + } + + private static string ContentTypesPreValueKey + { + get { return NestedContentPropertyEditor.NestedContentPreValueEditor.ContentTypesPreValueKey; } + } + + #endregion + } +} diff --git a/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs new file mode 100644 index 000000000000..38944d0a3473 --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs @@ -0,0 +1,413 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Umbraco.Core; +using Umbraco.Core.Models; +using Umbraco.Core.Models.Editors; +using Umbraco.Core.PropertyEditors; +using Umbraco.Core.Services; + +namespace Umbraco.Web.PropertyEditors +{ + [PropertyEditor(Constants.PropertyEditors.NestedContentAlias, "Nested Content", "nestedcontent", ValueType = "JSON", Group = "lists", Icon = "icon-thumbnail-list")] + public class NestedContentPropertyEditor : PropertyEditor + { + internal const string ContentTypeAliasPropertyKey = "ncContentTypeAlias"; + + private IDictionary _defaultPreValues; + public override IDictionary DefaultPreValues + { + get { return _defaultPreValues; } + set { _defaultPreValues = value; } + } + + public NestedContentPropertyEditor() + { + // Setup default values + _defaultPreValues = new Dictionary + { + {NestedContentPreValueEditor.ContentTypesPreValueKey, ""}, + {"minItems", 0}, + {"maxItems", 0}, + {"confirmDeletes", "1"}, + {"showIcons", "1"} + }; + } + + #region Pre Value Editor + + protected override PreValueEditor CreatePreValueEditor() + { + return new NestedContentPreValueEditor(); + } + + internal class NestedContentPreValueEditor : PreValueEditor + { + internal const string ContentTypesPreValueKey = "contentTypes"; + + [PreValueField(ContentTypesPreValueKey, "Doc Types", "views/propertyeditors/nestedcontent/nestedcontent.doctypepicker.html", Description = "Select the doc types to use as the data blueprint.")] + public string[] ContentTypes { get; set; } + + [PreValueField("minItems", "Min Items", "number", Description = "Set the minimum number of items allowed.")] + public string MinItems { get; set; } + + [PreValueField("maxItems", "Max Items", "number", Description = "Set the maximum number of items allowed.")] + public string MaxItems { get; set; } + + [PreValueField("confirmDeletes", "Confirm Deletes", "boolean", Description = "Set whether item deletions should require confirming.")] + public string ConfirmDeletes { get; set; } + + [PreValueField("showIcons", "Show Icons", "boolean", Description = "Set whether to show the items doc type icon in the list.")] + public string ShowIcons { get; set; } + + [PreValueField("hideLabel", "Hide Label", "boolean", Description = "Set whether to hide the editor label and have the list take up the full width of the editor window.")] + public string HideLabel { get; set; } + + public override IDictionary ConvertDbToEditor(IDictionary defaultPreVals, PreValueCollection persistedPreVals) + { + // re-format old style (v0.1.1) pre values if necessary + NestedContentHelper.ConvertPreValueCollectionFromV011(persistedPreVals); + + return base.ConvertDbToEditor(defaultPreVals, persistedPreVals); + } + } + + #endregion + + #region Value Editor + + protected override PropertyValueEditor CreateValueEditor() + { + return new NestedContentPropertyValueEditor(base.CreateValueEditor()); + } + + internal class NestedContentPropertyValueEditor : PropertyValueEditorWrapper + { + public NestedContentPropertyValueEditor(PropertyValueEditor wrapped) + : base(wrapped) + { + Validators.Add(new NestedContentValidator()); + } + + internal ServiceContext Services + { + get { return ApplicationContext.Current.Services; } + } + + public override void ConfigureForDisplay(PreValueCollection preValues) + { + base.ConfigureForDisplay(preValues); + + var asDictionary = preValues.PreValuesAsDictionary.ToDictionary(x => x.Key, x => x.Value.Value); + if (asDictionary.ContainsKey("hideLabel")) + { + var boolAttempt = asDictionary["hideLabel"].TryConvertTo(); + if (boolAttempt.Success) + { + HideLabel = boolAttempt.Result; + } + } + } + + #region DB to String + + public override string ConvertDbToString(Property property, PropertyType propertyType, IDataTypeService dataTypeService) + { + // Convert / validate value + if (property.Value == null || string.IsNullOrWhiteSpace(property.Value.ToString())) + return string.Empty; + + var value = JsonConvert.DeserializeObject>(property.Value.ToString()); + if (value == null) + return string.Empty; + + // Process value + PreValueCollection preValues = null; + for (var i = 0; i < value.Count; i++) + { + var o = value[i]; + var propValues = ((JObject)o); + + // convert from old style (v0.1.1) data format if necessary + NestedContentHelper.ConvertItemValueFromV011(propValues, propertyType.DataTypeDefinitionId, ref preValues); + + var contentType = NestedContentHelper.GetContentTypeFromItem(propValues); + if (contentType == null) + { + continue; + } + + var propValueKeys = propValues.Properties().Select(x => x.Name).ToArray(); + + foreach (var propKey in propValueKeys) + { + var propType = contentType.CompositionPropertyTypes.FirstOrDefault(x => x.Alias == propKey); + if (propType == null) + { + if (IsSystemPropertyKey(propKey) == false) + { + // Property missing so just delete the value + propValues[propKey] = null; + } + } + else + { + try + { + // Create a fake property using the property abd stored value + var prop = new Property(propType, propValues[propKey] == null ? null : propValues[propKey].ToString()); + + // Lookup the property editor + var propEditor = PropertyEditorResolver.Current.GetByAlias(propType.PropertyEditorAlias); + + // Get the editor to do it's conversion, and store it back + propValues[propKey] = propEditor.ValueEditor.ConvertDbToString(prop, propType, dataTypeService); + } + catch (InvalidOperationException) + { + // https://github.com/umco/umbraco-nested-content/issues/111 + // Catch any invalid cast operations as likely means courier failed due to missing + // or trashed item so couldn't convert a guid back to an int + + propValues[propKey] = null; + } + } + + } + } + + // Update the value on the property + property.Value = JsonConvert.SerializeObject(value); + + // Pass the call down + return base.ConvertDbToString(property, propertyType, dataTypeService); + } + + #endregion + + #region DB to Editor + + public override object ConvertDbToEditor(Property property, PropertyType propertyType, IDataTypeService dataTypeService) + { + if (property.Value == null || string.IsNullOrWhiteSpace(property.Value.ToString())) + return string.Empty; + + var value = JsonConvert.DeserializeObject>(property.Value.ToString()); + if (value == null) + return string.Empty; + + // Process value + PreValueCollection preValues = null; + for (var i = 0; i < value.Count; i++) + { + var o = value[i]; + var propValues = ((JObject)o); + + // convert from old style (v0.1.1) data format if necessary + NestedContentHelper.ConvertItemValueFromV011(propValues, propertyType.DataTypeDefinitionId, ref preValues); + + var contentType = NestedContentHelper.GetContentTypeFromItem(propValues); + if (contentType == null) + { + continue; + } + + var propValueKeys = propValues.Properties().Select(x => x.Name).ToArray(); + + foreach (var propKey in propValueKeys) + { + var propType = contentType.CompositionPropertyTypes.FirstOrDefault(x => x.Alias == propKey); + if (propType == null) + { + if (IsSystemPropertyKey(propKey) == false) + { + // Property missing so just delete the value + propValues[propKey] = null; + } + } + else + { + try + { + // Create a fake property using the property and stored value + var prop = new Property(propType, propValues[propKey] == null ? null : propValues[propKey].ToString()); + + // Lookup the property editor + var propEditor = PropertyEditorResolver.Current.GetByAlias(propType.PropertyEditorAlias); + + // Get the editor to do it's conversion + var newValue = propEditor.ValueEditor.ConvertDbToEditor(prop, propType, dataTypeService); + + // Store the value back + propValues[propKey] = (newValue == null) ? null : JToken.FromObject(newValue); + } + catch (InvalidOperationException) + { + // https://github.com/umco/umbraco-nested-content/issues/111 + // Catch any invalid cast operations as likely means courier failed due to missing + // or trashed item so couldn't convert a guid back to an int + + propValues[propKey] = null; + } + } + + } + } + + // Update the value on the property + property.Value = JsonConvert.SerializeObject(value); + + // Pass the call down + return base.ConvertDbToEditor(property, propertyType, dataTypeService); + } + + #endregion + + #region Editor to DB + + public override object ConvertEditorToDb(ContentPropertyData editorValue, object currentValue) + { + if (editorValue.Value == null || string.IsNullOrWhiteSpace(editorValue.Value.ToString())) + return null; + + var value = JsonConvert.DeserializeObject>(editorValue.Value.ToString()); + if (value == null) + return null; + + // Issue #38 - Keep recursive property lookups working + if (!value.Any()) + return null; + + // Process value + for (var i = 0; i < value.Count; i++) + { + var o = value[i]; + var propValues = ((JObject)o); + + var contentType = NestedContentHelper.GetContentTypeFromItem(propValues); + if (contentType == null) + { + continue; + } + + var propValueKeys = propValues.Properties().Select(x => x.Name).ToArray(); + + foreach (var propKey in propValueKeys) + { + var propType = contentType.CompositionPropertyTypes.FirstOrDefault(x => x.Alias == propKey); + if (propType == null) + { + if (IsSystemPropertyKey(propKey) == false) + { + // Property missing so just delete the value + propValues[propKey] = null; + } + } + else + { + // Fetch the property types prevalue + var propPreValues = Services.DataTypeService.GetPreValuesCollectionByDataTypeId( + propType.DataTypeDefinitionId); + + // Lookup the property editor + var propEditor = PropertyEditorResolver.Current.GetByAlias(propType.PropertyEditorAlias); + + // Create a fake content property data object + var contentPropData = new ContentPropertyData( + propValues[propKey], propPreValues, + new Dictionary()); + + // Get the property editor to do it's conversion + var newValue = propEditor.ValueEditor.ConvertEditorToDb(contentPropData, propValues[propKey]); + + // Store the value back + propValues[propKey] = (newValue == null) ? null : JToken.FromObject(newValue); + } + + } + } + + return JsonConvert.SerializeObject(value); + } + + #endregion + } + + internal class NestedContentValidator : IPropertyValidator + { + public IEnumerable Validate(object rawValue, PreValueCollection preValues, PropertyEditor editor) + { + var value = JsonConvert.DeserializeObject>(rawValue.ToString()); + if (value == null) + yield break; + + IDataTypeService dataTypeService = ApplicationContext.Current.Services.DataTypeService; + for (var i = 0; i < value.Count; i++) + { + var o = value[i]; + var propValues = ((JObject)o); + + var contentType = NestedContentHelper.GetContentTypeFromItem(propValues); + if (contentType == null) + { + continue; + } + + var propValueKeys = propValues.Properties().Select(x => x.Name).ToArray(); + + foreach (var propKey in propValueKeys) + { + var propType = contentType.CompositionPropertyTypes.FirstOrDefault(x => x.Alias == propKey); + if (propType != null) + { + PreValueCollection propPrevalues = dataTypeService.GetPreValuesCollectionByDataTypeId(propType.DataTypeDefinitionId); + PropertyEditor propertyEditor = PropertyEditorResolver.Current.GetByAlias(propType.PropertyEditorAlias); + + foreach (IPropertyValidator validator in propertyEditor.ValueEditor.Validators) + { + foreach (ValidationResult result in validator.Validate(propValues[propKey], propPrevalues, propertyEditor)) + { + result.ErrorMessage = "Item " + (i + 1) + " '" + propType.Name + "' " + result.ErrorMessage; + yield return result; + } + } + + // Check mandatory + if (propType.Mandatory) + { + if (propValues[propKey] == null) + yield return new ValidationResult("Item " + (i + 1) + " '" + propType.Name + "' cannot be null", new[] { propKey }); + else if (propValues[propKey].ToString().IsNullOrWhiteSpace()) + yield return new ValidationResult("Item " + (i + 1) + " '" + propType.Name + "' cannot be empty", new[] { propKey }); + } + + // Check regex + if (!propType.ValidationRegExp.IsNullOrWhiteSpace() + && propValues[propKey] != null && !propValues[propKey].ToString().IsNullOrWhiteSpace()) + { + var regex = new Regex(propType.ValidationRegExp); + if (!regex.IsMatch(propValues[propKey].ToString())) + { + yield return new ValidationResult("Item " + (i + 1) + " '" + propType.Name + "' is invalid, it does not match the correct pattern", new[] { propKey }); + } + } + } + } + } + } + } + + #endregion + + private static bool IsSystemPropertyKey(string propKey) + { + return propKey == "name" || propKey == "key" || propKey == ContentTypeAliasPropertyKey; + } + } +} diff --git a/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs index 7006befdcd03..659b1b32246d 100644 --- a/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs @@ -6,6 +6,11 @@ namespace Umbraco.Web.PropertyEditors [PropertyEditor(Constants.PropertyEditors.TextboxMultipleAlias, "Textarea", "textarea", IsParameterEditor = true, ValueType = PropertyEditorValueTypes.Text, Icon="icon-application-window-alt")] public class TextAreaPropertyEditor : PropertyEditor { + protected override PropertyValueEditor CreateValueEditor() + { + return new TextOnlyValueEditor(base.CreateValueEditor()); + } + protected override PreValueEditor CreatePreValueEditor() { return new TextAreaPreValueEditor(); diff --git a/src/Umbraco.Web/PropertyEditors/TextOnlyValueEditor.cs b/src/Umbraco.Web/PropertyEditors/TextOnlyValueEditor.cs new file mode 100644 index 000000000000..7222ee13e421 --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/TextOnlyValueEditor.cs @@ -0,0 +1,46 @@ +using System; +using Umbraco.Core.Models; +using Umbraco.Core.PropertyEditors; +using Umbraco.Core.Services; + +namespace Umbraco.Web.PropertyEditors +{ + /// + /// Custom value editor which ensures that the value stored is just plain text and that + /// no magic json formatting occurs when translating it to and from the database values + /// + public class TextOnlyValueEditor : PropertyValueEditorWrapper + { + public TextOnlyValueEditor(PropertyValueEditor wrapped) : base(wrapped) + { + } + + /// + /// A method used to format the database value to a value that can be used by the editor + /// + /// + /// + /// + /// + /// + /// The object returned will always be a string and if the database type is not a valid string type an exception is thrown + /// + public override object ConvertDbToEditor(Property property, PropertyType propertyType, IDataTypeService dataTypeService) + { + if (property.Value == null) return string.Empty; + + switch (GetDatabaseType()) + { + case DataTypeDatabaseType.Ntext: + case DataTypeDatabaseType.Nvarchar: + return property.Value.ToString(); + case DataTypeDatabaseType.Integer: + case DataTypeDatabaseType.Decimal: + case DataTypeDatabaseType.Date: + default: + throw new InvalidOperationException("The " + typeof(TextOnlyValueEditor) + " can only be used with string based property editors"); + } + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs index 0fd243180c21..bd07d503facb 100644 --- a/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs @@ -1,19 +1,21 @@ -using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; +using Newtonsoft.Json; using Umbraco.Core; -using Umbraco.Core.Models; using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; namespace Umbraco.Web.PropertyEditors { [PropertyEditor(Constants.PropertyEditors.TextboxAlias, "Textbox", "textbox", IsParameterEditor = true, Group = "Common")] public class TextboxPropertyEditor : PropertyEditor { - + protected override PropertyValueEditor CreateValueEditor() + { + return new TextOnlyValueEditor(base.CreateValueEditor()); + } protected override PreValueEditor CreatePreValueEditor() { @@ -24,7 +26,7 @@ internal class TextboxPreValueEditor : PreValueEditor { [PreValueField("maxChars", "Maximum allowed characters", "number", Description = "If empty - no character limit")] public bool MaxChars { get; set; } - } + } } } diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/NestedContentManyValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/NestedContentManyValueConverter.cs new file mode 100644 index 000000000000..c504601d358c --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/NestedContentManyValueConverter.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using Umbraco.Core.Logging; +using Umbraco.Core.Models; +using Umbraco.Core.Models.PublishedContent; +using Umbraco.Core.PropertyEditors; + +namespace Umbraco.Web.PropertyEditors.ValueConverters +{ + public class NestedContentManyValueConverter : PropertyValueConverterBase, IPropertyValueConverterMeta + { + public override bool IsConverter(PublishedPropertyType propertyType) + { + return propertyType.IsNestedContentProperty() && !propertyType.IsSingleNestedContentProperty(); + } + + public override object ConvertDataToSource(PublishedPropertyType propertyType, object source, bool preview) + { + try + { + return propertyType.ConvertPropertyToNestedContent(source, preview); + } + catch (Exception e) + { + LogHelper.Error("Error converting value", e); + } + + return null; + } + + public virtual Type GetPropertyValueType(PublishedPropertyType propertyType) + { + return typeof(IEnumerable); + } + + public virtual PropertyCacheLevel GetPropertyCacheLevel(PublishedPropertyType propertyType, PropertyCacheValue cacheValue) + { + return PropertyCacheLevel.Content; + } + } +} diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/NestedContentPublishedPropertyTypeExtensions.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/NestedContentPublishedPropertyTypeExtensions.cs new file mode 100644 index 000000000000..ebfdbd33d370 --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/NestedContentPublishedPropertyTypeExtensions.cs @@ -0,0 +1,133 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Umbraco.Core; +using Umbraco.Core.Models; +using Umbraco.Core.Models.PublishedContent; +using Umbraco.Web.Models; + +namespace Umbraco.Web.PropertyEditors.ValueConverters +{ + internal static class NestedContentPublishedPropertyTypeExtensions + { + public static bool IsNestedContentProperty(this PublishedPropertyType publishedProperty) + { + return publishedProperty.PropertyEditorAlias.InvariantEquals(Constants.PropertyEditors.NestedContentAlias); + } + + public static bool IsSingleNestedContentProperty(this PublishedPropertyType publishedProperty) + { + if (!publishedProperty.IsNestedContentProperty()) + { + return false; + } + + var preValueCollection = NestedContentHelper.GetPreValuesCollectionByDataTypeId(publishedProperty.DataTypeId); + var preValueDictionary = preValueCollection.PreValuesAsDictionary.ToDictionary(x => x.Key, x => x.Value.Value); + + int minItems, maxItems; + return preValueDictionary.ContainsKey("minItems") && + int.TryParse(preValueDictionary["minItems"], out minItems) && minItems == 1 + && preValueDictionary.ContainsKey("maxItems") && + int.TryParse(preValueDictionary["maxItems"], out maxItems) && maxItems == 1; + } + + public static object ConvertPropertyToNestedContent(this PublishedPropertyType propertyType, object source, bool preview) + { + using (DisposableTimer.DebugDuration(string.Format("ConvertPropertyToNestedContent ({0})", propertyType.DataTypeId))) + { + if (source != null && !source.ToString().IsNullOrWhiteSpace()) + { + var rawValue = JsonConvert.DeserializeObject>(source.ToString()); + var processedValue = new List(); + + var preValueCollection = NestedContentHelper.GetPreValuesCollectionByDataTypeId(propertyType.DataTypeId); + var preValueDictionary = preValueCollection.PreValuesAsDictionary.ToDictionary(x => x.Key, x => x.Value.Value); + + for (var i = 0; i < rawValue.Count; i++) + { + var item = (JObject)rawValue[i]; + + // Convert from old style (v.0.1.1) data format if necessary + // - Please note: This call has virtually no impact on rendering performance for new style (>v0.1.1). + // Even so, this should be removed eventually, when it's safe to assume that there is + // no longer any need for conversion. + NestedContentHelper.ConvertItemValueFromV011(item, propertyType.DataTypeId, ref preValueCollection); + + var contentTypeAlias = NestedContentHelper.GetContentTypeAliasFromItem(item); + if (string.IsNullOrEmpty(contentTypeAlias)) + { + continue; + } + + var publishedContentType = PublishedContentType.Get(PublishedItemType.Content, contentTypeAlias); + if (publishedContentType == null) + { + continue; + } + + var propValues = item.ToObject>(); + var properties = new List(); + + foreach (var jProp in propValues) + { + var propType = publishedContentType.GetPropertyType(jProp.Key); + if (propType != null) + { + properties.Add(new DetachedPublishedProperty(propType, jProp.Value, preview)); + } + } + + // Parse out the name manually + object nameObj = null; + if (propValues.TryGetValue("name", out nameObj)) + { + // Do nothing, we just want to parse out the name if we can + } + + object keyObj; + var key = Guid.Empty; + if (propValues.TryGetValue("key", out keyObj)) + { + key = Guid.Parse(keyObj.ToString()); + } + + // Get the current request node we are embedded in + var pcr = UmbracoContext.Current == null ? null : UmbracoContext.Current.PublishedContentRequest; + var containerNode = pcr != null && pcr.HasPublishedContent ? pcr.PublishedContent : null; + + // Create the model based on our implementation of IPublishedContent + IPublishedContent content = new DetachedPublishedContent( + key, + nameObj == null ? null : nameObj.ToString(), + publishedContentType, + properties.ToArray(), + containerNode, + i, + preview); + + if (PublishedContentModelFactoryResolver.HasCurrent && PublishedContentModelFactoryResolver.Current.HasValue) + { + // Let the current model factory create a typed model to wrap our model + content = PublishedContentModelFactoryResolver.Current.Factory.CreateModel(content); + } + + // Add the (typed) model as a result + processedValue.Add(content); + } + + if (propertyType.IsSingleNestedContentProperty()) + { + return processedValue.FirstOrDefault(); + } + + return processedValue; + } + } + + return null; + } + } +} diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/NestedContentSingleValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/NestedContentSingleValueConverter.cs new file mode 100644 index 000000000000..a7af2fd8ae2e --- /dev/null +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/NestedContentSingleValueConverter.cs @@ -0,0 +1,40 @@ +using System; +using Umbraco.Core.Logging; +using Umbraco.Core.Models; +using Umbraco.Core.Models.PublishedContent; +using Umbraco.Core.PropertyEditors; + +namespace Umbraco.Web.PropertyEditors.ValueConverters +{ + public class NestedContentSingleValueConverter : PropertyValueConverterBase, IPropertyValueConverterMeta + { + public override bool IsConverter(PublishedPropertyType propertyType) + { + return propertyType.IsSingleNestedContentProperty(); + } + + public override object ConvertDataToSource(PublishedPropertyType propertyType, object source, bool preview) + { + try + { + return propertyType.ConvertPropertyToNestedContent(source, preview); + } + catch (Exception e) + { + LogHelper.Error("Error converting value", e); + } + + return null; + } + + public virtual Type GetPropertyValueType(PublishedPropertyType propertyType) + { + return typeof(IPublishedContent); + } + + public virtual PropertyCacheLevel GetPropertyCacheLevel(PublishedPropertyType propertyType, PropertyCacheValue cacheValue) + { + return PropertyCacheLevel.Content; + } + } +} diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksEditorValueConvertor.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksEditorValueConvertor.cs index 67ff40fed4c1..2fce29ae93d6 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksEditorValueConvertor.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksEditorValueConvertor.cs @@ -110,6 +110,7 @@ public override object ConvertSourceToObject(PublishedPropertyType propertyType, { relatedLink.Id = contentId; relatedLink = CreateLink(relatedLink); + relatedLink.Content = UmbracoContext.Current.ContentCache.GetById(contentId); } else { diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index 213d46ceb758..6091c6c7dc9b 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Data; using System.Globalization; using System.Linq; @@ -501,21 +502,23 @@ public static PublishedContentOrderedSet ToContentSet(this IOrderedEnumera where T : class, IPublishedContent { return new PublishedContentOrderedSet(source); - } - + } + #endregion - + #region Dynamic Linq Extensions - - // todo - we should keep this file clean and remove dynamic linq stuff from it - + + [Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead")] + [EditorBrowsable(EditorBrowsableState.Never)] public static IQueryable OrderBy(this IEnumerable source, string predicate) { var dList = new DynamicPublishedContentList(source); return dList.OrderBy(predicate); } - public static IQueryable Where(this IEnumerable list, string predicate) + [Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead")] + [EditorBrowsable(EditorBrowsableState.Never)] + public static IQueryable Where(this IEnumerable list, string predicate) { // wrap in DynamicPublishedContentList so that the ContentSet is correct // though that code is somewhat ugly. @@ -526,30 +529,40 @@ public static IQueryable Where(this IEnumerable(); } - public static IEnumerable> GroupBy(this IEnumerable list, string predicate) + [Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead")] + [EditorBrowsable(EditorBrowsableState.Never)] + public static IEnumerable> GroupBy(this IEnumerable list, string predicate) { var dList = new DynamicPublishedContentList(list); return dList.GroupBy(predicate); } - public static IQueryable Select(this IEnumerable list, string predicate, params object[] values) + [Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead")] + [EditorBrowsable(EditorBrowsableState.Never)] + public static IQueryable Select(this IEnumerable list, string predicate, params object[] values) { var dList = new DynamicPublishedContentList(list); return dList.Select(predicate); } + [Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead")] + [EditorBrowsable(EditorBrowsableState.Never)] public static HtmlString Where(this IPublishedContent content, string predicate, string valueIfTrue) { if (content == null) throw new ArgumentNullException("content"); return content.Where(predicate, valueIfTrue, string.Empty); } + [Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead")] + [EditorBrowsable(EditorBrowsableState.Never)] public static HtmlString Where(this IPublishedContent content, string predicate, string valueIfTrue, string valueIfFalse) { if (content == null) throw new ArgumentNullException("content"); return new HtmlString(content.Where(predicate) ? valueIfTrue : valueIfFalse); } - + + [Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead: Where(x => x.IsVisible())")] + [EditorBrowsable(EditorBrowsableState.Never)] public static bool Where(this IPublishedContent content, string predicate) { if (content == null) throw new ArgumentNullException("content"); @@ -562,16 +575,16 @@ public static bool Where(this IPublishedContent content, string predicate) #region AsDynamic - // it is ok to have dynamic here - - // content should NOT be null - public static dynamic AsDynamic(this IPublishedContent content) + [Obsolete("The use of dynamics has been deprecated, use strongly typed syntax instead, dynamics will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] + public static dynamic AsDynamic(this IPublishedContent content) { if (content == null) throw new ArgumentNullException("content"); return new DynamicPublishedContent(content); } - // content CAN be null + [Obsolete("The use of dynamics has been deprecated, use strongly typed syntax instead, dynamics will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] internal static DynamicPublishedContent AsDynamicOrNull(this IPublishedContent content) { return content == null ? null : new DynamicPublishedContent(content); diff --git a/src/Umbraco.Web/Routing/DomainHelper.cs b/src/Umbraco.Web/Routing/DomainHelper.cs index 6934b08cf2e8..88488db83f9e 100644 --- a/src/Umbraco.Web/Routing/DomainHelper.cs +++ b/src/Umbraco.Web/Routing/DomainHelper.cs @@ -269,7 +269,7 @@ internal static IDomain FindWildcardDomainInPath(IEnumerable domains, s /// Eg the relative part of /foo/bar/nil to domain example.com/foo is /bar/nil. public static string PathRelativeToDomain(Uri domainUri, string path) { - return path.Substring(domainUri.AbsolutePath.Length).EnsureStartsWith('/'); + return path.Substring(domainUri.GetAbsolutePathDecoded().Length).EnsureStartsWith('/'); } #endregion diff --git a/src/Umbraco.Web/Routing/PublishedContentRequest.cs b/src/Umbraco.Web/Routing/PublishedContentRequest.cs index 9c2195860385..641821ddd648 100644 --- a/src/Umbraco.Web/Routing/PublishedContentRequest.cs +++ b/src/Umbraco.Web/Routing/PublishedContentRequest.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Globalization; +using System.Linq; using System.Web; using System.Web.Security; using Umbraco.Core; @@ -63,7 +64,7 @@ public PublishedContentRequest(Uri uri, RoutingContext routingContext, IWebRouti Uri = uri; RoutingContext = routingContext; - GetRolesForLogin = getRolesForLogin; + _getRolesForLoginCallback = getRolesForLogin; _engine = new PublishedContentRequestEngine( routingConfig, @@ -446,8 +447,28 @@ public CultureInfo Culture /// Gets or sets the current RoutingContext. /// public RoutingContext RoutingContext { get; private set; } + + /// + /// Returns the current members roles if a member is logged in + /// + /// + /// + /// + /// This ensures that the callback is only executed once in case this method is accessed a few times + /// + public IEnumerable GetRolesForLogin(string username) + { + string[] roles; + if (_rolesForLogin.TryGetValue(username, out roles)) + return roles; + + roles = _getRolesForLoginCallback(username).ToArray(); + _rolesForLogin[username] = roles; + return roles; + } - internal Func> GetRolesForLogin { get; private set; } + private readonly IDictionary _rolesForLogin = new Dictionary(); + private readonly Func> _getRolesForLoginCallback; /// /// The "umbraco page" object. diff --git a/src/Umbraco.Web/Routing/RedirectTrackingEventHandler.cs b/src/Umbraco.Web/Routing/RedirectTrackingEventHandler.cs index 80e4192f72f8..77577e26e25a 100644 --- a/src/Umbraco.Web/Routing/RedirectTrackingEventHandler.cs +++ b/src/Umbraco.Web/Routing/RedirectTrackingEventHandler.cs @@ -271,6 +271,7 @@ private static void ContentService_Published(IPublishingStrategy sender, Publish private static void ContentService_Moving(IContentService sender, MoveEventArgs e) { + //TODO: Use the new e.EventState to track state between Moving/Moved events! Moving = true; } diff --git a/src/Umbraco.Web/Scheduling/HealthCheckNotifier.cs b/src/Umbraco.Web/Scheduling/HealthCheckNotifier.cs new file mode 100644 index 000000000000..c10c1c5315ee --- /dev/null +++ b/src/Umbraco.Web/Scheduling/HealthCheckNotifier.cs @@ -0,0 +1,83 @@ +using System.Configuration; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Umbraco.Core; +using Umbraco.Core.Configuration; +using Umbraco.Core.Configuration.HealthChecks; +using Umbraco.Core.Logging; +using Umbraco.Core.Sync; +using Umbraco.Web.HealthCheck; + +namespace Umbraco.Web.Scheduling +{ + internal class HealthCheckNotifier : RecurringTaskBase + { + private readonly ApplicationContext _appContext; + private readonly IHealthCheckResolver _healthCheckResolver; + + public HealthCheckNotifier(IBackgroundTaskRunner runner, int delayMilliseconds, int periodMilliseconds, + ApplicationContext appContext) + : base(runner, delayMilliseconds, periodMilliseconds) + { + _appContext = appContext; + _healthCheckResolver = HealthCheckResolver.Current; + } + + public override async Task PerformRunAsync(CancellationToken token) + { + if (_appContext == null) return true; // repeat... + + switch (_appContext.GetCurrentServerRole()) + { + case ServerRole.Slave: + LogHelper.Debug("Does not run on slave servers."); + return true; // DO repeat, server role can change + case ServerRole.Unknown: + LogHelper.Debug("Does not run on servers with unknown role."); + return true; // DO repeat, server role can change + } + + // ensure we do not run if not main domain, but do NOT lock it + if (_appContext.MainDom.IsMainDom == false) + { + LogHelper.Debug("Does not run if not MainDom."); + return false; // do NOT repeat, going down + } + + using (_appContext.ProfilingLogger.DebugDuration("Health checks executing", "Health checks complete")) + { + var healthCheckConfig = UmbracoConfig.For.HealthCheck(); + + // Don't notify for any checks that are disabled, nor for any disabled + // just for notifications + var disabledCheckIds = healthCheckConfig.NotificationSettings.DisabledChecks + .Select(x => x.Id) + .Union(healthCheckConfig.DisabledChecks + .Select(x => x.Id)) + .Distinct() + .ToArray(); + + var checks = _healthCheckResolver.HealthChecks + .Where(x => disabledCheckIds.Contains(x.Id) == false); + + var results = new HealthCheckResults(checks); + results.LogResults(); + + // Send using registered notification methods that are enabled + var registeredNotificationMethods = HealthCheckNotificationMethodResolver.Current.NotificationMethods.Where(x => x.Enabled); + foreach (var notificationMethod in registeredNotificationMethods) + { + await notificationMethod.SendAsync(results); + } + } + + return true; // repeat + } + + public override bool IsAsync + { + get { return true; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs b/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs index 24359d2b50e3..46a756e0ada9 100644 --- a/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs +++ b/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs @@ -1,12 +1,18 @@ using System; -using System.Net.Http; +using System.IO; using System.Threading; using System.Threading.Tasks; +using System.Web; +using System.Web.Hosting; +using umbraco; using Umbraco.Core; +using Umbraco.Core.Configuration; using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.Logging; +using Umbraco.Core.Publishing; using Umbraco.Core.Sync; -using Umbraco.Web.Mvc; +using Umbraco.Web.Routing; +using Umbraco.Web.Security; namespace Umbraco.Web.Scheduling { @@ -23,17 +29,22 @@ public ScheduledPublishing(IBackgroundTaskRunner runner, int _settings = settings; } + private ILogger Logger { get { return _appContext.ProfilingLogger.Logger; } } + public override async Task PerformRunAsync(CancellationToken token) { if (_appContext == null) return true; // repeat... + if (Suspendable.ScheduledPublishing.CanRun == false) + return true; // repeat, later + switch (_appContext.GetCurrentServerRole()) { case ServerRole.Slave: - LogHelper.Debug("Does not run on slave servers."); + Logger.Debug("Does not run on slave servers."); return true; // DO repeat, server role can change case ServerRole.Unknown: - LogHelper.Debug("Does not run on servers with unknown role."); + Logger.Debug("Does not run on servers with unknown role."); return true; // DO repeat, server role can change } @@ -44,72 +55,38 @@ public override async Task PerformRunAsync(CancellationToken token) return false; // do NOT repeat, going down } - string umbracoAppUrl; + UmbracoContext tempContext = null; try { - umbracoAppUrl = _appContext == null || _appContext.UmbracoApplicationUrl.IsNullOrWhiteSpace() - ? null - : _appContext.UmbracoApplicationUrl; - if (umbracoAppUrl.IsNullOrWhiteSpace()) + // DO not run publishing if content is re-loading + if (content.Instance.isInitializing == false) { - LogHelper.Warn("No url for service (yet), skip."); - return true; // repeat + //TODO: We should remove this in v8, this is a backwards compat hack + // see notes in CacheRefresherEventHandler + // because notifications will not be sent if there is no UmbracoContext + // see NotificationServiceExtensions + var httpContext = new HttpContextWrapper(new HttpContext(new SimpleWorkerRequest("temp.aspx", "", new StringWriter()))); + tempContext = UmbracoContext.EnsureContext( + httpContext, + _appContext, + new WebSecurity(httpContext, _appContext), + _settings, + UrlProviderResolver.Current.Providers, + true); + + var publisher = new ScheduledPublisher(_appContext.Services.ContentService); + var count = publisher.CheckPendingAndProcess(); + Logger.Debug(() => string.Format("Processed {0} items", count)); } } catch (Exception e) { - LogHelper.Error("Could not acquire application url", e); - return true; // repeat + Logger.Error("Failed (see exception).", e); } - - var url = umbracoAppUrl + "/RestServices/ScheduledPublish/Index"; - - using (DisposableTimer.DebugDuration( - () => string.Format("Scheduled publishing executing @ {0}", url), - () => "Scheduled publishing complete")) + finally { - try - { - using (var wc = new HttpClient()) - { - var request = new HttpRequestMessage(HttpMethod.Post, url) - { - Content = new StringContent(string.Empty) - }; - - // running on a background task, requires its own (safe) scope - // (GetAuthenticationHeaderValue uses UserService to load the current user, hence requires a database) - // (might not need a scope but we don't know really) - using (var scope = ApplicationContext.Current.ScopeProvider.CreateScope()) - { - //pass custom the authorization header - request.Headers.Authorization = AdminTokenAuthorizeAttribute.GetAuthenticationHeaderValue(_appContext); - scope.Complete(); - } - - var result = await wc.SendAsync(request, token); - var content = await result.Content.ReadAsStringAsync(); - - if (result.IsSuccessStatusCode) - { - LogHelper.Debug( - () => string.Format( - "Request successfully sent to url = \"{0}\". ", url)); - } - else - { - var msg = string.Format( - "Request failed with status code \"{0}\". Request content = \"{1}\".", - result.StatusCode, content); - var ex = new HttpRequestException(msg); - LogHelper.Error(msg, ex); - } - } - } - catch (Exception e) - { - LogHelper.Error(string.Format("Failed (at \"{0}\").", umbracoAppUrl), e); - } + if (tempContext != null) + tempContext.Dispose(); // nulls the ThreadStatic context } return true; // repeat diff --git a/src/Umbraco.Web/Scheduling/Scheduler.cs b/src/Umbraco.Web/Scheduling/Scheduler.cs index 82dd32b870f8..9eeefbf54a9a 100644 --- a/src/Umbraco.Web/Scheduling/Scheduler.cs +++ b/src/Umbraco.Web/Scheduling/Scheduler.cs @@ -1,9 +1,12 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.Configuration; using System.Threading; -using System.Web; using Umbraco.Core; using Umbraco.Core.Configuration; +using Umbraco.Core.Configuration.HealthChecks; using Umbraco.Core.Logging; +using Umbraco.Web.HealthCheck; using Umbraco.Web.Routing; namespace Umbraco.Web.Scheduling @@ -21,6 +24,7 @@ internal sealed class Scheduler : ApplicationEventHandler private BackgroundTaskRunner _publishingRunner; private BackgroundTaskRunner _tasksRunner; private BackgroundTaskRunner _scrubberRunner; + private BackgroundTaskRunner _healthCheckRunner; private bool _started = false; private object _locker = new object(); private IBackgroundTask[] _tasks; @@ -35,6 +39,7 @@ protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplica _publishingRunner = new BackgroundTaskRunner("ScheduledPublishing", applicationContext.ProfilingLogger.Logger); _tasksRunner = new BackgroundTaskRunner("ScheduledTasks", applicationContext.ProfilingLogger.Logger); _scrubberRunner = new BackgroundTaskRunner("LogScrubber", applicationContext.ProfilingLogger.Logger); + _healthCheckRunner = new BackgroundTaskRunner("HealthCheckNotifier", applicationContext.ProfilingLogger.Logger); //We will start the whole process when a successful request is made UmbracoModule.RouteAttempt += UmbracoModuleRouteAttempt; @@ -61,14 +66,39 @@ private void RegisterBackgroundTasks(UmbracoRequestEventArgs e) LogHelper.Debug(() => "Initializing the scheduler"); var settings = UmbracoConfig.For.UmbracoSettings(); + var healthCheckConfig = UmbracoConfig.For.HealthCheck(); + + const int delayMilliseconds = 60000; var tasks = new List { - new KeepAlive(_keepAliveRunner, 60000, 300000, e.UmbracoContext.Application), - new ScheduledPublishing(_publishingRunner, 60000, 60000, e.UmbracoContext.Application, settings), - new ScheduledTasks(_tasksRunner, 60000, 60000, e.UmbracoContext.Application, settings), - new LogScrubber(_scrubberRunner, 60000, LogScrubber.GetLogScrubbingInterval(settings), e.UmbracoContext.Application, settings) + new KeepAlive(_keepAliveRunner, delayMilliseconds, 300000, e.UmbracoContext.Application), + new ScheduledPublishing(_publishingRunner, delayMilliseconds, 60000, e.UmbracoContext.Application, settings), + new ScheduledTasks(_tasksRunner, delayMilliseconds, 60000, e.UmbracoContext.Application, settings), + new LogScrubber(_scrubberRunner, delayMilliseconds, LogScrubber.GetLogScrubbingInterval(settings), e.UmbracoContext.Application, settings), }; + if (healthCheckConfig.NotificationSettings.Enabled) + { + // If first run time not set, start with just small delay after application start + int delayInMilliseconds; + if (string.IsNullOrEmpty(healthCheckConfig.NotificationSettings.FirstRunTime)) + { + delayInMilliseconds = delayMilliseconds; + } + else + { + // Otherwise start at scheduled time + delayInMilliseconds = DateTime.Now.PeriodicMinutesFrom(healthCheckConfig.NotificationSettings.FirstRunTime) * 60 * 1000; + if (delayInMilliseconds < delayMilliseconds) + { + delayInMilliseconds = delayMilliseconds; + } + } + + var periodInMilliseconds = healthCheckConfig.NotificationSettings.PeriodInHours * 60 * 60 * 1000; + tasks.Add(new HealthCheckNotifier(_healthCheckRunner, delayInMilliseconds, periodInMilliseconds, e.UmbracoContext.Application)); + } + // ping/keepalive // on all servers _keepAliveRunner.TryAdd(tasks[0]); @@ -83,6 +113,11 @@ private void RegisterBackgroundTasks(UmbracoRequestEventArgs e) // install on all, will only run on non-slaves servers _scrubberRunner.TryAdd(tasks[3]); + if (healthCheckConfig.NotificationSettings.Enabled) + { + _healthCheckRunner.TryAdd(tasks[4]); + } + return tasks.ToArray(); }); } diff --git a/src/Umbraco.Web/Search/ExamineEvents.cs b/src/Umbraco.Web/Search/ExamineEvents.cs index 7fbbf29b89f7..e018bac2147a 100644 --- a/src/Umbraco.Web/Search/ExamineEvents.cs +++ b/src/Umbraco.Web/Search/ExamineEvents.cs @@ -24,7 +24,6 @@ namespace Umbraco.Web.Search /// public sealed class ExamineEvents : ApplicationEventHandler { - /// /// Once the application has started we should bind to all events and initialize the providers. /// @@ -32,9 +31,9 @@ public sealed class ExamineEvents : ApplicationEventHandler /// /// /// We need to do this on the Started event as to guarantee that all resolvers are setup properly. - /// + /// protected override void ApplicationStarted(UmbracoApplicationBase httpApplication, ApplicationContext applicationContext) - { + { LogHelper.Info("Initializing Examine and binding to business logic events"); var registeredProviders = ExamineManager.Instance.IndexProviderCollection @@ -46,14 +45,14 @@ protected override void ApplicationStarted(UmbracoApplicationBase httpApplicatio if (registeredProviders == 0) return; - //Bind to distributed cache events - this ensures that this logic occurs on ALL servers that are taking part + //Bind to distributed cache events - this ensures that this logic occurs on ALL servers that are taking part // in a load balanced environment. CacheRefresherBase.CacheUpdated += UnpublishedPageCacheRefresherCacheUpdated; CacheRefresherBase.CacheUpdated += PublishedPageCacheRefresherCacheUpdated; CacheRefresherBase.CacheUpdated += MediaCacheRefresherCacheUpdated; CacheRefresherBase.CacheUpdated += MemberCacheRefresherCacheUpdated; CacheRefresherBase.CacheUpdated += ContentTypeCacheRefresherCacheUpdated; - + var contentIndexer = ExamineManager.Instance.IndexProviderCollection[Constants.Examine.InternalIndexer] as UmbracoContentIndexer; if (contentIndexer != null) { @@ -77,6 +76,9 @@ protected override void ApplicationStarted(UmbracoApplicationBase httpApplicatio /// static void ContentTypeCacheRefresherCacheUpdated(ContentTypeCacheRefresher sender, CacheRefresherEventArgs e) { + if (Suspendable.ExamineEvents.CanIndex == false) + return; + var indexersToUpdated = ExamineManager.Instance.IndexProviderCollection.OfType(); foreach (var provider in indexersToUpdated) { @@ -114,7 +116,7 @@ static void ContentTypeCacheRefresherCacheUpdated(ContentTypeCacheRefresher send } } - //TODO: We need to update Examine to support re-indexing multiple items at once instead of one by one which will speed up + //TODO: We need to update Examine to support re-indexing multiple items at once instead of one by one which will speed up // the re-indexing process, we don't want to revert to rebuilding the whole thing! if (contentTypesChanged.Count > 0) @@ -129,8 +131,8 @@ static void ContentTypeCacheRefresherCacheUpdated(ContentTypeCacheRefresher send { ReIndexForContent(contentItem, contentItem.HasPublishedVersion && contentItem.Trashed == false); } - } - } + } + } } if (mediaTypesChanged.Count > 0) { @@ -163,11 +165,14 @@ static void ContentTypeCacheRefresherCacheUpdated(ContentTypeCacheRefresher send } } } - + } static void MemberCacheRefresherCacheUpdated(MemberCacheRefresher sender, CacheRefresherEventArgs e) { + if (Suspendable.ExamineEvents.CanIndex == false) + return; + switch (e.MessageType) { case MessageType.RefreshById: @@ -215,6 +220,9 @@ static void MemberCacheRefresherCacheUpdated(MemberCacheRefresher sender, CacheR /// static void MediaCacheRefresherCacheUpdated(MediaCacheRefresher sender, CacheRefresherEventArgs e) { + if (Suspendable.ExamineEvents.CanIndex == false) + return; + switch (e.MessageType) { case MessageType.RefreshById: @@ -252,13 +260,13 @@ static void MediaCacheRefresherCacheUpdated(MediaCacheRefresher sender, CacheRef if (media1 != null) { ReIndexForMedia(media1, media1.Trashed == false); - } + } break; case MediaCacheRefresher.OperationType.Trashed: - + //keep if trashed for indexes supporting unpublished //(delete the index from all indexes not supporting unpublished content) - + DeleteIndexForEntity(payload.Id, true); //We then need to re-index this item for all indexes supporting unpublished content @@ -272,20 +280,20 @@ static void MediaCacheRefresherCacheUpdated(MediaCacheRefresher sender, CacheRef case MediaCacheRefresher.OperationType.Deleted: //permanently remove from all indexes - + DeleteIndexForEntity(payload.Id, false); break; default: throw new ArgumentOutOfRangeException(); - } - } + } + } } break; - case MessageType.RefreshByInstance: - case MessageType.RemoveByInstance: - case MessageType.RefreshAll: + case MessageType.RefreshByInstance: + case MessageType.RemoveByInstance: + case MessageType.RefreshAll: default: //We don't support these, these message types will not fire for media break; @@ -302,6 +310,9 @@ static void MediaCacheRefresherCacheUpdated(MediaCacheRefresher sender, CacheRef /// static void PublishedPageCacheRefresherCacheUpdated(PageCacheRefresher sender, CacheRefresherEventArgs e) { + if (Suspendable.ExamineEvents.CanIndex == false) + return; + switch (e.MessageType) { case MessageType.RefreshById: @@ -312,8 +323,8 @@ static void PublishedPageCacheRefresherCacheUpdated(PageCacheRefresher sender, C } break; case MessageType.RemoveById: - - //This is triggered when the item has been unpublished or trashed (which also performs an unpublish). + + //This is triggered when the item has been unpublished or trashed (which also performs an unpublish). var c2 = ApplicationContext.Current.Services.ContentService.GetById((int)e.MessageObject); if (c2 != null) @@ -368,6 +379,9 @@ static void PublishedPageCacheRefresherCacheUpdated(PageCacheRefresher sender, C /// static void UnpublishedPageCacheRefresherCacheUpdated(UnpublishedPageCacheRefresher sender, CacheRefresherEventArgs e) { + if (Suspendable.ExamineEvents.CanIndex == false) + return; + switch (e.MessageType) { case MessageType.RefreshById: @@ -378,9 +392,9 @@ static void UnpublishedPageCacheRefresherCacheUpdated(UnpublishedPageCacheRefres } break; case MessageType.RemoveById: - + // This is triggered when the item is permanently deleted - + DeleteIndexForEntity((int)e.MessageObject, false); break; case MessageType.RefreshByInstance: @@ -399,7 +413,7 @@ static void UnpublishedPageCacheRefresherCacheUpdated(UnpublishedPageCacheRefres { DeleteIndexForEntity(c4.Id, false); } - break; + break; case MessageType.RefreshByJson: var jsonPayloads = UnpublishedPageCacheRefresher.DeserializeFromJsonPayload((string)e.MessageObject); @@ -409,29 +423,28 @@ static void UnpublishedPageCacheRefresherCacheUpdated(UnpublishedPageCacheRefres { switch (payload.Operation) { - case UnpublishedPageCacheRefresher.OperationType.Deleted: + case UnpublishedPageCacheRefresher.OperationType.Deleted: //permanently remove from all indexes - + DeleteIndexForEntity(payload.Id, false); break; default: throw new ArgumentOutOfRangeException(); - } - } + } + } } break; - case MessageType.RefreshAll: + case MessageType.RefreshAll: default: //We don't support these, these message types will not fire for unpublished content break; } } - private static void ReIndexForMember(IMember member) { ExamineManager.Instance.ReIndexNode( @@ -447,7 +460,7 @@ private static void ReIndexForMember(IMember member) /// /// /// - + private static void IndexerDocumentWriting(object sender, DocumentWritingEventArgs e) { if (e.Fields.Keys.Contains("nodeName")) @@ -463,7 +476,7 @@ private static void IndexerDocumentWriting(object sender, DocumentWritingEventAr )); } } - + private static void ReIndexForMedia(IMedia sender, bool isMediaPublished) { var xml = sender.ToXml(); @@ -497,7 +510,7 @@ private static void DeleteIndexForEntity(int entityId, bool keepIfUnpublished) //if keepIfUnpublished == true then only delete this item from indexes not supporting unpublished content, // otherwise if keepIfUnpublished == false then remove from all indexes - + .Where(x => keepIfUnpublished == false || x.SupportUnpublishedContent == false) .Where(x => x.EnableDefaultEventHandler)); } @@ -518,7 +531,7 @@ private static void ReIndexForContent(IContent sender, bool isContentPublished) ExamineManager.Instance.ReIndexNode( xml, IndexTypes.Content, ExamineManager.Instance.IndexProviderCollection.OfType() - + //Index this item for all indexers if the content is published, otherwise if the item is not published // then only index this for indexers supporting unpublished content @@ -531,10 +544,10 @@ private static void ReIndexForContent(IContent sender, bool isContentPublished) /// /// /// true if data is going to be returned from cache - /// + /// [Obsolete("This method is no longer used and will be removed from the core in future versions, the cacheOnly parameter has no effect. Use the other ToXDocument overload instead")] public static XDocument ToXDocument(Content node, bool cacheOnly) - { + { return ToXDocument(node); } @@ -542,7 +555,7 @@ public static XDocument ToXDocument(Content node, bool cacheOnly) /// Converts a content node to Xml /// /// - /// + /// private static XDocument ToXDocument(Content node) { if (TypeHelper.IsTypeAssignableFrom(node)) @@ -561,7 +574,7 @@ private static XDocument ToXDocument(Content node) if (xNode.Attributes["nodeTypeAlias"] == null) { - //we'll add the nodeTypeAlias ourselves + //we'll add the nodeTypeAlias ourselves XmlAttribute d = xDoc.CreateAttribute("nodeTypeAlias"); d.Value = node.ContentType.Alias; xNode.Attributes.Append(d); @@ -569,6 +582,5 @@ private static XDocument ToXDocument(Content node) return new XDocument(ExamineXmlExtensions.ToXElement(xNode)); } - } } \ No newline at end of file diff --git a/src/Umbraco.Web/Search/ISearchableTree.cs b/src/Umbraco.Web/Search/ISearchableTree.cs new file mode 100644 index 000000000000..6e25724bfad1 --- /dev/null +++ b/src/Umbraco.Web/Search/ISearchableTree.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using Umbraco.Web.Models.ContentEditing; + +namespace Umbraco.Web.Search +{ + public interface ISearchableTree + { + /// + /// The alias of the tree that the belongs to + /// + string TreeAlias { get; } + + /// + /// Searches for results based on the entity type + /// + /// + /// + /// + /// + /// + /// A starting point for the search, generally a node id, but for members this is a member type alias + /// + /// + IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null); + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Search/SearchableApplicationTree.cs b/src/Umbraco.Web/Search/SearchableApplicationTree.cs new file mode 100644 index 000000000000..8ce0fd52fc65 --- /dev/null +++ b/src/Umbraco.Web/Search/SearchableApplicationTree.cs @@ -0,0 +1,17 @@ +namespace Umbraco.Web.Search +{ + public class SearchableApplicationTree + { + public SearchableApplicationTree(string appAlias, string treeAlias, ISearchableTree searchableTree) + { + AppAlias = appAlias; + TreeAlias = treeAlias; + SearchableTree = searchableTree; + } + + public string AppAlias { get; private set; } + public string TreeAlias { get; private set; } + public ISearchableTree SearchableTree { get; private set; } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Search/SearchableTreeAttribute.cs b/src/Umbraco.Web/Search/SearchableTreeAttribute.cs new file mode 100644 index 000000000000..c24f494d624a --- /dev/null +++ b/src/Umbraco.Web/Search/SearchableTreeAttribute.cs @@ -0,0 +1,35 @@ +using System; + +namespace Umbraco.Web.Search +{ + [AttributeUsage(AttributeTargets.Class)] + public sealed class SearchableTreeAttribute : Attribute + { + /// + /// This constructor defines both the angular service and method name to use + /// + /// + /// + public SearchableTreeAttribute(string serviceName, string methodName) + { + if (string.IsNullOrWhiteSpace(serviceName)) throw new ArgumentException("Value cannot be null or whitespace.", "serviceName"); + if (string.IsNullOrWhiteSpace(methodName)) throw new ArgumentException("Value cannot be null or whitespace.", "methodName"); + MethodName = methodName; + ServiceName = serviceName; + } + + /// + /// This constructor will assume that the method name equals `format(searchResult, appAlias, treeAlias)` + /// + /// + public SearchableTreeAttribute(string serviceName) + { + if (string.IsNullOrWhiteSpace(serviceName)) throw new ArgumentException("Value cannot be null or whitespace.", "serviceName"); + MethodName = ""; + ServiceName = serviceName; + } + + public string MethodName { get; private set; } + public string ServiceName { get; private set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Search/SearchableTreeCollection.cs b/src/Umbraco.Web/Search/SearchableTreeCollection.cs new file mode 100644 index 000000000000..463ae54f1da5 --- /dev/null +++ b/src/Umbraco.Web/Search/SearchableTreeCollection.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using System.Collections.ObjectModel; + +namespace Umbraco.Web.Search +{ + internal class SearchableTreeCollection : KeyedCollection + { + protected override string GetKeyForItem(SearchableApplicationTree item) + { + return item.TreeAlias; + } + + public IReadOnlyDictionary AsReadOnlyDictionary() + { + return new ReadOnlyDictionary(Dictionary); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Search/SearchableTreeResolver.cs b/src/Umbraco.Web/Search/SearchableTreeResolver.cs new file mode 100644 index 000000000000..4831595072ea --- /dev/null +++ b/src/Umbraco.Web/Search/SearchableTreeResolver.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Configuration; +using System.Linq; +using Umbraco.Core; +using Umbraco.Core.Logging; +using Umbraco.Core.Models; +using Umbraco.Core.ObjectResolution; +using Umbraco.Core.Services; +using Umbraco.Web.Editors; +using Umbraco.Web.Trees; + +namespace Umbraco.Web.Search +{ + /// + /// A resolver to return the collection of searchable trees + /// + /// + /// This collection has a request scoped lifetime therefore any instance of ISearchableTree needs to support being a request scoped lifetime + /// + public class SearchableTreeResolver : LazyManyObjectsResolverBase + { + private readonly IApplicationTreeService _treeService; + + public SearchableTreeResolver(IServiceProvider serviceProvider, ILogger logger, IApplicationTreeService treeService, Func> searchableTrees) + : base(serviceProvider, logger, searchableTrees, ObjectLifetimeScope.HttpRequest) + { + _treeService = treeService; + } + + /// + /// Returns the a dictionary of tree alias with it's affiliated + /// + public IReadOnlyDictionary GetSearchableTrees() + { + var appTrees = _treeService.GetAll().ToArray(); + var collection = new SearchableTreeCollection(); + var searchableTrees = Values.ToArray(); + foreach (var searchableTree in searchableTrees) + { + var found = appTrees.FirstOrDefault(x => x.Alias == searchableTree.TreeAlias); + if (found != null) + { + collection.Add(new SearchableApplicationTree(found.ApplicationAlias, found.Alias, searchableTree)); + } + } + return collection.AsReadOnlyDictionary(); + } + } +} diff --git a/src/Umbraco.Web/Search/UmbracoTreeSearcher.cs b/src/Umbraco.Web/Search/UmbracoTreeSearcher.cs new file mode 100644 index 000000000000..0dac79590f91 --- /dev/null +++ b/src/Umbraco.Web/Search/UmbracoTreeSearcher.cs @@ -0,0 +1,335 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using AutoMapper; +using Examine; +using Umbraco.Core; +using Umbraco.Core.Models; +using Umbraco.Core.Services; +using Umbraco.Web.Models.ContentEditing; + +namespace Umbraco.Web.Search +{ + internal class UmbracoTreeSearcher + { + /// + /// Searches for results based on the entity type + /// + /// + /// + /// + /// + /// + /// A starting point for the search, generally a node id, but for members this is a member type alias + /// + /// + /// + /// + public IEnumerable ExamineSearch( + UmbracoHelper umbracoHelper, + string query, + UmbracoEntityTypes entityType, + int pageSize, + long pageIndex, out long totalFound, string searchFrom = null) + { + var sb = new StringBuilder(); + + string type; + var searcher = Constants.Examine.InternalSearcher; + var fields = new[] { "id", "__NodeId" }; + + var umbracoContext = umbracoHelper.UmbracoContext; + var appContext = umbracoContext.Application; + + //TODO: WE should really just allow passing in a lucene raw query + switch (entityType) + { + case UmbracoEntityTypes.Member: + searcher = Constants.Examine.InternalMemberSearcher; + type = "member"; + fields = new[] { "id", "__NodeId", "email", "loginName" }; + if (searchFrom != null && searchFrom != Constants.Conventions.MemberTypes.AllMembersListId && searchFrom.Trim() != "-1") + { + sb.Append("+__NodeTypeAlias:"); + sb.Append(searchFrom); + sb.Append(" "); + } + break; + case UmbracoEntityTypes.Media: + type = "media"; + var allMediaStartNodes = umbracoContext.Security.CurrentUser.CalculateMediaStartNodeIds(appContext.Services.EntityService); + AppendPath(sb, UmbracoObjectTypes.Media, allMediaStartNodes, searchFrom, appContext.Services.EntityService); + break; + case UmbracoEntityTypes.Document: + type = "content"; + var allContentStartNodes = umbracoContext.Security.CurrentUser.CalculateContentStartNodeIds(appContext.Services.EntityService); + AppendPath(sb, UmbracoObjectTypes.Document, allContentStartNodes, searchFrom, appContext.Services.EntityService); + break; + default: + throw new NotSupportedException("The " + typeof(UmbracoTreeSearcher) + " currently does not support searching against object type " + entityType); + } + + var internalSearcher = ExamineManager.Instance.SearchProviderCollection[searcher]; + + //build a lucene query: + // the __nodeName will be boosted 10x without wildcards + // then __nodeName will be matched normally with wildcards + // the rest will be normal without wildcards + + + //check if text is surrounded by single or double quotes, if so, then exact match + var surroundedByQuotes = Regex.IsMatch(query, "^\".*?\"$") + || Regex.IsMatch(query, "^\'.*?\'$"); + + if (surroundedByQuotes) + { + //strip quotes, escape string, the replace again + query = query.Trim(new[] { '\"', '\'' }); + + query = Lucene.Net.QueryParsers.QueryParser.Escape(query); + + //nothing to search + if (searchFrom.IsNullOrWhiteSpace() && query.IsNullOrWhiteSpace()) + { + totalFound = 0; + return new List(); + } + + //update the query with the query term + if (query.IsNullOrWhiteSpace() == false) + { + //add back the surrounding quotes + query = string.Format("{0}{1}{0}", "\"", query); + + //node name exactly boost x 10 + sb.Append("+(__nodeName: ("); + sb.Append(query.ToLower()); + sb.Append(")^10.0 "); + + foreach (var f in fields) + { + //additional fields normally + sb.Append(f); + sb.Append(": ("); + sb.Append(query); + sb.Append(") "); + } + + sb.Append(") "); + } + } + else + { + var trimmed = query.Trim(new[] { '\"', '\'' }); + + //nothing to search + if (searchFrom.IsNullOrWhiteSpace() && trimmed.IsNullOrWhiteSpace()) + { + totalFound = 0; + return new List(); + } + + //update the query with the query term + if (trimmed.IsNullOrWhiteSpace() == false) + { + query = Lucene.Net.QueryParsers.QueryParser.Escape(query); + + var querywords = query.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); + + //node name exactly boost x 10 + sb.Append("+(__nodeName:"); + sb.Append("\""); + sb.Append(query.ToLower()); + sb.Append("\""); + sb.Append("^10.0 "); + + //node name normally with wildcards + sb.Append(" __nodeName:"); + sb.Append("("); + foreach (var w in querywords) + { + sb.Append(w.ToLower()); + sb.Append("* "); + } + sb.Append(") "); + + + foreach (var f in fields) + { + //additional fields normally + sb.Append(f); + sb.Append(":"); + sb.Append("("); + foreach (var w in querywords) + { + sb.Append(w.ToLower()); + sb.Append("* "); + } + sb.Append(")"); + sb.Append(" "); + } + + sb.Append(") "); + } + } + + //must match index type + sb.Append("+__IndexType:"); + sb.Append(type); + + var raw = internalSearcher.CreateSearchCriteria().RawQuery(sb.ToString()); + + var result = internalSearcher + //only return the number of items specified to read up to the amount of records to fill from 0 -> the number of items on the page requested + .Search(raw, Convert.ToInt32(pageSize * (pageIndex + 1))); + + totalFound = result.TotalItemCount; + + var pagedResult = result.Skip(Convert.ToInt32(pageIndex)); + + switch (entityType) + { + case UmbracoEntityTypes.Member: + return MemberFromSearchResults(pagedResult.ToArray()); + case UmbracoEntityTypes.Media: + return MediaFromSearchResults(pagedResult); + case UmbracoEntityTypes.Document: + return ContentFromSearchResults(umbracoHelper, pagedResult); + default: + throw new NotSupportedException("The " + typeof(UmbracoTreeSearcher) + " currently does not support searching against object type " + entityType); + } + } + + private void AppendPath(StringBuilder sb, UmbracoObjectTypes objectType, int[] startNodeIds, string searchFrom, IEntityService entityService) + { + if (sb == null) throw new ArgumentNullException("sb"); + if (entityService == null) throw new ArgumentNullException("entityService"); + + int searchFromId; + var entityPath = int.TryParse(searchFrom, out searchFromId) && searchFromId > 0 + ? entityService.GetAllPaths(objectType, searchFromId).FirstOrDefault() + : null; + if (entityPath != null) + { + // find... only what's underneath + sb.Append("+__Path:"); + AppendPath(sb, entityPath.Path, false); + sb.Append(" "); + } + else if (startNodeIds.Length == 0) + { + // make sure we don't find anything + sb.Append("+__Path:none "); + } + else if (startNodeIds.Contains(-1) == false) // -1 = no restriction + { + var entityPaths = entityService.GetAllPaths(objectType, startNodeIds); + + // for each start node, find the start node, and what's underneath + // +__Path:(-1*,1234 -1*,1234,* -1*,5678 -1*,5678,* ...) + sb.Append("+__Path:("); + var first = true; + foreach (var ep in entityPaths) + { + if (first) + first = false; + else + sb.Append(" "); + AppendPath(sb, ep.Path, true); + } + sb.Append(") "); + } + } + + private void AppendPath(StringBuilder sb, string path, bool includeThisNode) + { + path = path.Replace("-", "\\-").Replace(",", "\\,"); + if (includeThisNode) + { + sb.Append(path); + sb.Append(" "); + } + sb.Append(path); + sb.Append("\\,*"); + } + + /// + /// Returns a collection of entities for media based on search results + /// + /// + /// + private IEnumerable MemberFromSearchResults(SearchResult[] results) + { + var mapped = Mapper.Map>(results).ToArray(); + //add additional data + foreach (var m in mapped) + { + //if no icon could be mapped, it will be set to document, so change it to picture + if (m.Icon == "icon-document") + { + m.Icon = "icon-user"; + } + + var searchResult = results.First(x => x.Id.ToInvariantString() == m.Id.ToString()); + if (searchResult.Fields.ContainsKey("email") && searchResult.Fields["email"] != null) + { + m.AdditionalData["Email"] = results.First(x => x.Id.ToInvariantString() == m.Id.ToString()).Fields["email"]; + } + if (searchResult.Fields.ContainsKey("__key") && searchResult.Fields["__key"] != null) + { + Guid key; + if (Guid.TryParse(searchResult.Fields["__key"], out key)) + { + m.Key = key; + } + } + } + return mapped; + } + + /// + /// Returns a collection of entities for media based on search results + /// + /// + /// + private IEnumerable MediaFromSearchResults(IEnumerable results) + { + var mapped = Mapper.Map>(results).ToArray(); + //add additional data + foreach (var m in mapped) + { + //if no icon could be mapped, it will be set to document, so change it to picture + if (m.Icon == "icon-document") + { + m.Icon = "icon-picture"; + } + } + return mapped; + } + + /// + /// Returns a collection of entities for content based on search results + /// + /// + /// + /// + private IEnumerable ContentFromSearchResults(UmbracoHelper umbracoHelper, IEnumerable results) + { + var mapped = Mapper.Map>(results).ToArray(); + //add additional data + foreach (var m in mapped) + { + var intId = m.Id.TryConvertTo(); + if (intId.Success) + { + m.AdditionalData["Url"] = umbracoHelper.NiceUrl(intId.Result); + } + } + return mapped; + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Security/Identity/AppBuilderExtensions.cs b/src/Umbraco.Web/Security/Identity/AppBuilderExtensions.cs index 7e4c9c45aab5..9953eea664d8 100644 --- a/src/Umbraco.Web/Security/Identity/AppBuilderExtensions.cs +++ b/src/Umbraco.Web/Security/Identity/AppBuilderExtensions.cs @@ -88,8 +88,10 @@ public static void ConfigureUserManagerForUmbracoBackOffice(this IAppBuilder app (options, owinContext) => BackOfficeUserManager.Create( options, appContext.Services.UserService, + appContext.Services.EntityService, appContext.Services.ExternalLoginService, - userMembershipProvider)); + userMembershipProvider, + UmbracoConfig.For.UmbracoSettings().Content)); app.SetBackOfficeUserManagerType(); @@ -118,7 +120,8 @@ public static void ConfigureUserManagerForUmbracoBackOffice(this IAppBuilder app (options, owinContext) => BackOfficeUserManager.Create( options, customUserStore, - userMembershipProvider)); + userMembershipProvider, + UmbracoConfig.For.UmbracoSettings().Content)); app.SetBackOfficeUserManagerType(); diff --git a/src/Umbraco.Web/Security/Identity/BackOfficeCookieManager.cs b/src/Umbraco.Web/Security/Identity/BackOfficeCookieManager.cs index 07f4a3317f6b..2f067212f3ad 100644 --- a/src/Umbraco.Web/Security/Identity/BackOfficeCookieManager.cs +++ b/src/Umbraco.Web/Security/Identity/BackOfficeCookieManager.cs @@ -96,8 +96,8 @@ internal bool ShouldAuthenticateRequest(IOwinContext ctx, Uri originalRequestUrl if (request.Uri.AbsolutePath.InvariantEquals(_getRemainingSecondsPath)) return false; if (//check the explicit flag - (checkForceAuthTokens && ctx.Get("umbraco-force-auth") != null) - || (checkForceAuthTokens && httpCtx.Success && httpCtx.Result.Items["umbraco-force-auth"] != null) + (checkForceAuthTokens && ctx.Get(Constants.Security.ForceReAuthFlag) != null) + || (checkForceAuthTokens && httpCtx.Success && httpCtx.Result.Items[Constants.Security.ForceReAuthFlag] != null) //check back office || request.Uri.IsBackOfficeRequest(HttpRuntime.AppDomainAppVirtualPath) //check installer diff --git a/src/Umbraco.Web/Security/Identity/ExternalSignInAutoLinkOptions.cs b/src/Umbraco.Web/Security/Identity/ExternalSignInAutoLinkOptions.cs index 3f8a1480a4e9..ab4f9482ad8f 100644 --- a/src/Umbraco.Web/Security/Identity/ExternalSignInAutoLinkOptions.cs +++ b/src/Umbraco.Web/Security/Identity/ExternalSignInAutoLinkOptions.cs @@ -1,4 +1,5 @@ using System; +using System.ComponentModel; using Microsoft.AspNet.Identity.Owin; using Microsoft.Owin; using Umbraco.Core; @@ -12,6 +13,8 @@ namespace Umbraco.Web.Security.Identity /// public class ExternalSignInAutoLinkOptions { + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("Use the overload specifying user groups instead and defaultAllowedSections now serves no purpose")] public ExternalSignInAutoLinkOptions( bool autoLinkExternalAccount = false, string defaultUserType = "editor", @@ -20,35 +23,57 @@ public ExternalSignInAutoLinkOptions( { Mandate.ParameterNotNullOrEmpty(defaultUserType, "defaultUserType"); - _defaultUserType = defaultUserType; - _defaultAllowedSections = defaultAllowedSections ?? new[] { "content", "media" }; + _defaultUserGroups = new[] {defaultUserType}; _autoLinkExternalAccount = autoLinkExternalAccount; _defaultCulture = defaultCulture ?? GlobalSettings.DefaultUILanguage; } - private readonly string _defaultUserType; + /// + /// Creates a new instance + /// + /// + /// If null, the default will be the 'editor' group + /// + public ExternalSignInAutoLinkOptions( + bool autoLinkExternalAccount = false, + string[] defaultUserGroups = null, + string defaultCulture = null) + { + _defaultUserGroups = defaultUserGroups ?? new[] { "editor" }; + _autoLinkExternalAccount = autoLinkExternalAccount; + _defaultCulture = defaultCulture ?? GlobalSettings.DefaultUILanguage; + } + + private readonly string[] _defaultUserGroups; /// /// A callback executed during account auto-linking and before the user is persisted /// public Action OnAutoLinking { get; set; } - /// - /// The default User Type alias to use for auto-linking users - /// + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("Use the overload specifying user groups instead")] public string GetDefaultUserType(UmbracoContext umbracoContext, ExternalLoginInfo loginInfo) { - return _defaultUserType; + return _defaultUserGroups.Length == 0 ? "editor" : _defaultUserGroups[0]; } - private readonly string[] _defaultAllowedSections; - /// - /// The default allowed sections to use for auto-linking users + /// The default User group aliases to use for auto-linking users /// + /// + /// + /// + public string[] GetDefaultUserGroups(UmbracoContext umbracoContext, ExternalLoginInfo loginInfo) + { + return _defaultUserGroups; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("The default sections are based on the default user group, this is no longer used")] public string[] GetDefaultAllowedSections(UmbracoContext umbracoContext, ExternalLoginInfo loginInfo) { - return _defaultAllowedSections; + return new string[0]; } private readonly bool _autoLinkExternalAccount; diff --git a/src/Umbraco.Web/Security/Identity/ForceRenewalCookieAuthenticationHandler.cs b/src/Umbraco.Web/Security/Identity/ForceRenewalCookieAuthenticationHandler.cs index c7030b2558e7..1bf5663884f6 100644 --- a/src/Umbraco.Web/Security/Identity/ForceRenewalCookieAuthenticationHandler.cs +++ b/src/Umbraco.Web/Security/Identity/ForceRenewalCookieAuthenticationHandler.cs @@ -71,7 +71,7 @@ protected override Task ApplyResponseGrantAsync() var httpCtx = Context.TryGetHttpContext(); //check for the special flag in either the owin or http context - var shouldRenew = Context.Get("umbraco-force-auth") != null || (httpCtx.Success && httpCtx.Result.Items["umbraco-force-auth"] != null); + var shouldRenew = Context.Get(Constants.Security.ForceReAuthFlag) != null || (httpCtx.Success && httpCtx.Result.Items[Constants.Security.ForceReAuthFlag] != null); if (shouldRenew) { diff --git a/src/Umbraco.Web/Security/Identity/FormsAuthenticationSecureDataFormat.cs b/src/Umbraco.Web/Security/Identity/FormsAuthenticationSecureDataFormat.cs index 77e0fe9faf6e..ef858e52642f 100644 --- a/src/Umbraco.Web/Security/Identity/FormsAuthenticationSecureDataFormat.cs +++ b/src/Umbraco.Web/Security/Identity/FormsAuthenticationSecureDataFormat.cs @@ -63,7 +63,18 @@ public AuthenticationTicket Unprotect(string protectedText) return null; } - var identity = new UmbracoBackOfficeIdentity(decrypt); + UmbracoBackOfficeIdentity identity; + + try + { + identity = new UmbracoBackOfficeIdentity(decrypt); + } + catch (Exception) + { + //if it cannot be created return null, will be due to serialization errors in user data most likely due to corrupt cookies or cookies + //for previous versions of Umbraco + return null; + } var ticket = new AuthenticationTicket(identity, new AuthenticationProperties { diff --git a/src/Umbraco.Web/Security/MembershipHelper.cs b/src/Umbraco.Web/Security/MembershipHelper.cs index 605b5137d83b..eeb9bad52bde 100644 --- a/src/Umbraco.Web/Security/MembershipHelper.cs +++ b/src/Umbraco.Web/Security/MembershipHelper.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; @@ -13,7 +14,9 @@ using Umbraco.Web.Models; using Umbraco.Web.PublishedCache; using Umbraco.Core.Cache; +using Umbraco.Web.Editors; using Umbraco.Web.Security.Providers; +using Umbraco.Core.Services; using MPE = global::Umbraco.Core.Security.MembershipProviderExtensions; namespace Umbraco.Web.Security @@ -28,13 +31,19 @@ public class MembershipHelper private readonly RoleProvider _roleProvider; private readonly ApplicationContext _applicationContext; private readonly HttpContextBase _httpContext; + private readonly UmbracoContext _umbracoContext; #region Constructors + + [Obsolete("Use the constructor specifying an UmbracoContext")] + [EditorBrowsable(EditorBrowsableState.Never)] public MembershipHelper(ApplicationContext applicationContext, HttpContextBase httpContext) : this(applicationContext, httpContext, MPE.GetMembersMembershipProvider(), Roles.Enabled ? Roles.Provider : new MembersRoleProvider(applicationContext.Services.MemberService)) - { + { } + [Obsolete("Use the constructor specifying an UmbracoContext")] + [EditorBrowsable(EditorBrowsableState.Never)] public MembershipHelper(ApplicationContext applicationContext, HttpContextBase httpContext, MembershipProvider membershipProvider, RoleProvider roleProvider) { if (applicationContext == null) throw new ArgumentNullException("applicationContext"); @@ -45,11 +54,11 @@ public MembershipHelper(ApplicationContext applicationContext, HttpContextBase h _httpContext = httpContext; _membershipProvider = membershipProvider; _roleProvider = roleProvider; - } + } public MembershipHelper(UmbracoContext umbracoContext) - : this(umbracoContext, MPE.GetMembersMembershipProvider(), Roles.Enabled ? Roles.Provider: new MembersRoleProvider(umbracoContext.Application.Services.MemberService)) - { + : this(umbracoContext, MPE.GetMembersMembershipProvider(), Roles.Enabled ? Roles.Provider : new MembersRoleProvider(umbracoContext.Application.Services.MemberService)) + { } public MembershipHelper(UmbracoContext umbracoContext, MembershipProvider membershipProvider, RoleProvider roleProvider) @@ -61,9 +70,58 @@ public MembershipHelper(UmbracoContext umbracoContext, MembershipProvider member _applicationContext = umbracoContext.Application; _membershipProvider = membershipProvider; _roleProvider = roleProvider; + _umbracoContext = umbracoContext; } #endregion + /// + /// Check if a document object is protected by the "Protect Pages" functionality in umbraco + /// + /// The full path of the document object to check + /// True if the document object is protected + public virtual bool IsProtected(string path) + { + //this is a cached call + return _applicationContext.Services.PublicAccessService.IsProtected(path); + } + + /// + /// Check if the current user has access to a document + /// + /// The full path of the document object to check + /// True if the current user has access or if the current document isn't protected + public virtual bool MemberHasAccess(string path) + { + //cache this in the request cache + return _applicationContext.ApplicationCache.RequestCache.GetCacheItem(string.Format("{0}.{1}-{2}", typeof(MembershipHelper), "MemberHasAccess", path), () => + { + if (IsProtected(path)) + { + return IsLoggedIn() && HasAccess(path, Roles.Provider); + } + return true; + }); + } + + /// + /// This will check if the member has access to this path + /// + /// + /// + /// + /// + /// This is essentially the same as the PublicAccessServiceExtensions.HasAccess however this will use the PCR cache + /// of the already looked up roles for the member so this doesn't need to happen more than once. + /// This does a safety check in case of things like unit tests where there is no PCR and if that is the case it will use + /// lookup the roles directly. + /// + private bool HasAccess(string path, RoleProvider roleProvider) + { + return _umbracoContext.PublishedContentRequest == null + ? _applicationContext.Services.PublicAccessService.HasAccess(path, CurrentUserName, roleProvider.GetRolesForUser) + : _applicationContext.Services.PublicAccessService.HasAccess(path, CurrentUserName, _umbracoContext.PublishedContentRequest.GetRolesForLogin); + } + /// /// Returns true if the current membership provider is the Umbraco built-in one. /// @@ -195,7 +253,7 @@ public virtual MembershipUser RegisterMember(RegisterModel model, out Membership { //Set member online provider.GetUser(model.Username, true); - + //Log them in FormsAuthentication.SetAuthCookie(membershipUser.UserName, model.CreatePersistentLoginCookie); } @@ -222,7 +280,7 @@ public virtual bool Login(string username, string password) if (member == null) { //this should not happen - LogHelper.Warn("The member validated but then no member was returned with the username " + username); + LogHelper.Warn("The member validated but then no member was returned with the username " + username); return false; } //Log them in @@ -331,7 +389,7 @@ public int GetCurrentMemberId() var result = GetCurrentMember(); return result == null ? -1 : result.Id; } - + #endregion #region Model Creation methods for member data editing on the front-end @@ -350,7 +408,7 @@ public virtual ProfileModel GetCurrentMemberProfileModel() var provider = _membershipProvider; if (provider.IsUmbracoMembershipProvider()) - { + { var membershipUser = provider.GetCurrentUserOnline(); var member = GetCurrentPersistedMember(); //this shouldn't happen but will if the member is deleted in the back office while the member is trying @@ -438,7 +496,7 @@ private IEnumerable GetMemberPropertiesViewModel(IMemberType me if (propValue != null && propValue.Value != null) { value = propValue.Value.ToString(); - } + } } var viewProperty = new UmbracoProperty @@ -578,7 +636,7 @@ public virtual bool IsMemberAuthorized( // Allow by default var allowAction = true; - + if (IsLoggedIn() == false) { // If not logged on, not allowed @@ -613,7 +671,7 @@ public virtual bool IsMemberAuthorized( var member = provider.GetCurrentUser(); username = member.UserName; } - + // If groups defined, check member is of one of those groups var allowGroupsList = allowGroups as IList ?? allowGroups.ToList(); if (allowAction && allowGroupsList.Any(allowGroup => allowGroup != string.Empty)) @@ -623,7 +681,7 @@ public virtual bool IsMemberAuthorized( allowAction = allowGroupsList.Select(s => s.ToLowerInvariant()).Intersect(groups.Select(myGroup => myGroup.ToLowerInvariant())).Any(); } - + } return allowAction; @@ -643,6 +701,7 @@ public virtual Attempt ChangePassword(string username, Cha { throw new InvalidOperationException("Could not find provider with name " + membershipProviderName); } + return ChangePassword(username, passwordModel, provider); } @@ -655,130 +714,10 @@ public virtual Attempt ChangePassword(string username, Cha /// public virtual Attempt ChangePassword(string username, ChangingPasswordModel passwordModel, MembershipProvider membershipProvider) { - // YES! It is completely insane how many options you have to take into account based on the membership provider. yikes! - - if (passwordModel == null) throw new ArgumentNullException("passwordModel"); - if (membershipProvider == null) throw new ArgumentNullException("membershipProvider"); - - //Are we resetting the password?? - if (passwordModel.Reset.HasValue && passwordModel.Reset.Value) - { - var canReset = membershipProvider.CanResetPassword(_applicationContext.Services.UserService); - if (canReset == false) - { - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Password reset is not enabled", new[] { "resetPassword" }) }); - } - if (membershipProvider.RequiresQuestionAndAnswer && passwordModel.Answer.IsNullOrWhiteSpace()) - { - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Password reset requires a password answer", new[] { "resetPassword" }) }); - } - //ok, we should be able to reset it - try - { - var newPass = membershipProvider.ResetPassword( - username, - membershipProvider.RequiresQuestionAndAnswer ? passwordModel.Answer : null); - - //return the generated pword - return Attempt.Succeed(new PasswordChangedModel { ResetPassword = newPass }); - } - catch (Exception ex) - { - LogHelper.WarnWithException("Could not reset member password", ex); - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not reset password, error: " + ex.Message + " (see log for full details)", new[] { "resetPassword" }) }); - } - } - - //we're not resetting it so we need to try to change it. - - if (passwordModel.NewPassword.IsNullOrWhiteSpace()) - { - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Cannot set an empty password", new[] { "value" }) }); - } - - //This is an edge case and is only necessary for backwards compatibility: - var umbracoBaseProvider = membershipProvider as MembershipProviderBase; - if (umbracoBaseProvider != null && umbracoBaseProvider.AllowManuallyChangingPassword) - { - //this provider allows manually changing the password without the old password, so we can just do it - try - { - var result = umbracoBaseProvider.ChangePassword(username, "", passwordModel.NewPassword); - return result == false - ? Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, invalid username or password", new[] { "value" }) }) - : Attempt.Succeed(new PasswordChangedModel()); - } - catch (Exception ex) - { - LogHelper.WarnWithException("Could not change member password", ex); - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, error: " + ex.Message + " (see log for full details)", new[] { "value" }) }); - } - } - - //The provider does not support manually chaning the password but no old password supplied - need to return an error - if (passwordModel.OldPassword.IsNullOrWhiteSpace() && membershipProvider.EnablePasswordRetrieval == false) - { - //if password retrieval is not enabled but there is no old password we cannot continue - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Password cannot be changed without the old password", new[] { "value" }) }); - } - - if (passwordModel.OldPassword.IsNullOrWhiteSpace() == false) - { - //if an old password is suplied try to change it - - try - { - var result = membershipProvider.ChangePassword(username, passwordModel.OldPassword, passwordModel.NewPassword); - return result == false - ? Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, invalid username or password", new[] { "value" }) }) - : Attempt.Succeed(new PasswordChangedModel()); - } - catch (Exception ex) - { - LogHelper.WarnWithException("Could not change member password", ex); - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, error: " + ex.Message + " (see log for full details)", new[] { "value" }) }); - } - } - - if (membershipProvider.EnablePasswordRetrieval == false) - { - //we cannot continue if we cannot get the current password - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Password cannot be changed without the old password", new[] { "value" }) }); - } - if (membershipProvider.RequiresQuestionAndAnswer && passwordModel.Answer.IsNullOrWhiteSpace()) - { - //if the question answer is required but there isn't one, we cannot continue - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Password cannot be changed without the password answer", new[] { "value" }) }); - } - - //lets try to get the old one so we can change it - try - { - var oldPassword = membershipProvider.GetPassword( - username, - membershipProvider.RequiresQuestionAndAnswer ? passwordModel.Answer : null); - - try - { - var result = membershipProvider.ChangePassword(username, oldPassword, passwordModel.NewPassword); - return result == false - ? Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password", new[] { "value" }) }) - : Attempt.Succeed(new PasswordChangedModel()); - } - catch (Exception ex1) - { - LogHelper.WarnWithException("Could not change member password", ex1); - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, error: " + ex1.Message + " (see log for full details)", new[] { "value" }) }); - } - - } - catch (Exception ex2) - { - LogHelper.WarnWithException("Could not retrieve member password", ex2); - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, error: " + ex2.Message + " (see log for full details)", new[] { "value" }) }); - } + var passwordChanger = new PasswordChanger(_applicationContext.ProfilingLogger.Logger, _applicationContext.Services.UserService, UmbracoContext.Current.HttpContext); + return passwordChanger.ChangePasswordWithMembershipProvider(username, passwordModel, membershipProvider); } - + /// /// Updates a membership user with all of it's writable properties /// @@ -837,7 +776,7 @@ internal Attempt UpdateMember(MembershipUser member, MembershipP return Attempt.Fail(member); } - + /// /// Returns the currently logged in IMember object - this should never be exposed to the front-end since it's returning a business logic entity! /// @@ -861,7 +800,7 @@ private IMember GetCurrentPersistedMember() private string GetCacheKey(string key, params object[] additional) { - var sb = new StringBuilder(string.Format("{0}-{1}", typeof (MembershipHelper).Name, key)); + var sb = new StringBuilder(string.Format("{0}-{1}", typeof(MembershipHelper).Name, key)); foreach (var s in additional) { sb.Append("-"); diff --git a/src/Umbraco.Web/Security/Providers/MembersMembershipProvider.cs b/src/Umbraco.Web/Security/Providers/MembersMembershipProvider.cs index 4576b36da9e2..3d762d8d1afa 100644 --- a/src/Umbraco.Web/Security/Providers/MembersMembershipProvider.cs +++ b/src/Umbraco.Web/Security/Providers/MembersMembershipProvider.cs @@ -74,7 +74,7 @@ public override void Initialize(string name, NameValueCollection config) _defaultMemberTypeAlias = config["defaultMemberTypeAlias"]; if (_defaultMemberTypeAlias.IsNullOrWhiteSpace()) { - throw new ProviderException("No default user type alias is specified in the web.config string. Please add a 'defaultUserTypeAlias' to the add element in the provider declaration in web.config"); + throw new ProviderException("No default member type alias is specified in the web.config string. Please add a 'defaultUserTypeAlias' to the add element in the provider declaration in web.config"); } _hasDefaultMember = true; } @@ -89,6 +89,13 @@ public override void Initialize(string name, NameValueCollection config) } } + protected override Attempt GetRawPassword(string username) + { + var found = MemberService.GetByUsername(username); + if (found == null) return Attempt.Fail(); + return Attempt.Succeed(found.RawPasswordValue); + } + public override string DefaultMemberTypeAlias { get @@ -102,7 +109,7 @@ public override string DefaultMemberTypeAlias _defaultMemberTypeAlias = MemberService.GetDefaultMemberType(); if (_defaultMemberTypeAlias.IsNullOrWhiteSpace()) { - throw new ProviderException("No default user type alias is specified in the web.config string. Please add a 'defaultUserTypeAlias' to the add element in the provider declaration in web.config"); + throw new ProviderException("No default member type alias is specified in the web.config string. Please add a 'defaultUserTypeAlias' to the add element in the provider declaration in web.config"); } _hasDefaultMember = true; } diff --git a/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs b/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs index 71e2b1d0f376..099611fbc046 100644 --- a/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs +++ b/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs @@ -3,6 +3,7 @@ using System.Configuration.Provider; using System.Linq; using System.Text; +using System.Web; using System.Web.Configuration; using System.Web.Security; using Umbraco.Core; @@ -12,10 +13,11 @@ using Umbraco.Core.Persistence.Querying; using Umbraco.Core.Security; using Umbraco.Core.Services; +using Umbraco.Core.Models.Identity; namespace Umbraco.Web.Security.Providers { - + /// /// Abstract Membership Provider that users any implementation of IMembershipMemberService{TEntity} service @@ -26,7 +28,7 @@ public abstract class UmbracoMembershipProvider : UmbracoMembershipP { protected IMembershipMemberService MemberService { get; private set; } - + protected UmbracoMembershipProvider(IMembershipMemberService memberService) { MemberService = memberService; @@ -36,10 +38,10 @@ protected UmbracoMembershipProvider(IMembershipMemberService memberServ protected abstract MembershipUser ConvertToMembershipUser(TEntity entity); - private bool _allowManuallyChangingPassword = true; + private bool _allowManuallyChangingPassword = false; /// - /// For backwards compatibility, this provider supports this option by default it is true + /// For backwards compatibility, this provider supports this option by default it is false /// public override bool AllowManuallyChangingPassword { @@ -58,14 +60,14 @@ public override bool AllowManuallyChangingPassword /// The name of the provider has a length of zero. public override void Initialize(string name, NameValueCollection config) { - if (config == null) {throw new ArgumentNullException("config");} + if (config == null) { throw new ArgumentNullException("config"); } if (string.IsNullOrEmpty(name)) name = ProviderName; // Initialize base provider class base.Initialize(name, config); - _allowManuallyChangingPassword = config.GetValue("allowManuallyChangingPassword", true); + _allowManuallyChangingPassword = config.GetValue("allowManuallyChangingPassword", false); } /// @@ -86,7 +88,7 @@ protected override bool PerformChangePassword(string username, string oldPasswor // in order to support updating passwords from the umbraco core, we can't validate the old password var m = MemberService.GetByUsername(username); if (m == null) return false; - + string salt; var encodedPassword = EncryptOrHashNewPassword(newPassword, out salt); @@ -139,7 +141,7 @@ protected override bool PerformChangePasswordQuestionAndAnswer(string username, /// /// A object populated with the information for the newly created user. /// - protected override MembershipUser PerformCreateUser(string memberTypeAlias, string username, string password, string email, string passwordQuestion, + protected override MembershipUser PerformCreateUser(string memberTypeAlias, string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status) { // See if the user already exists @@ -164,11 +166,11 @@ protected override MembershipUser PerformCreateUser(string memberTypeAlias, stri var member = MemberService.CreateWithIdentity( username, - email, - FormatPasswordForStorage(encodedPassword, salt), + email, + FormatPasswordForStorage(encodedPassword, salt), memberTypeAlias, isApproved); - + member.PasswordQuestion = passwordQuestion; member.RawPasswordAnswerValue = EncryptString(passwordAnswer); member.LastLoginDate = DateTime.Now; @@ -212,7 +214,7 @@ public override bool DeleteUser(string username, bool deleteAllRelatedData) public override MembershipUserCollection FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize, out int totalRecords) { var byEmail = MemberService.FindByEmail(emailToMatch, pageIndex, pageSize, out totalRecords, StringPropertyMatchType.Wildcard).ToArray(); - + var collection = new MembershipUserCollection(); foreach (var m in byEmail) { @@ -257,7 +259,7 @@ public override MembershipUserCollection GetAllUsers(int pageIndex, int pageSize var membersList = new MembershipUserCollection(); var pagedMembers = MemberService.GetAll(pageIndex, pageSize, out totalRecords); - + foreach (var m in pagedMembers) { membersList.Add(ConvertToMembershipUser(m)); @@ -290,7 +292,7 @@ public override int GetNumberOfUsersOnline() /// The password for the specified user name. /// protected override string PerformGetPassword(string username, string answer) - { + { var m = MemberService.GetByUsername(username); if (m == null) { @@ -410,10 +412,9 @@ protected override string PerformResetPassword(string username, string answer, s //if (answer == null && RequiresQuestionAndAnswer) //{ // UpdateFailureCount(username, "passwordAnswer"); - // throw new ProviderException("Password answer required for password reset."); //} - + var m = MemberService.GetByUsername(username); if (m == null) { @@ -437,37 +438,43 @@ protected override string PerformResetPassword(string username, string answer, s m.RawPasswordValue = FormatPasswordForStorage(encodedPassword, salt); m.LastPasswordChangeDate = DateTime.Now; MemberService.Save(m); - + return generatedPassword; } - /// - /// Clears a lock so that the membership user can be validated. - /// - /// The membership user to clear the lock status for. - /// - /// true if the membership user was successfully unlocked; otherwise, false. - /// - public override bool UnlockUser(string username) + internal virtual bool PerformUnlockUser(string username, out TEntity member) { - var member = MemberService.GetByUsername(username); - + member = MemberService.GetByUsername(username); if (member == null) { throw new ProviderException(string.Format("No member with the username '{0}' found", username)); - } + } - // Non need to update + // Non need to update if (member.IsLockedOut == false) return true; member.IsLockedOut = false; member.FailedPasswordAttempts = 0; MemberService.Save(member); - + return true; } + /// + /// Clears a lock so that the membership user can be validated. + /// + /// The membership user to clear the lock status for. + /// + /// true if the membership user was successfully unlocked; otherwise, false. + /// + public override bool UnlockUser(string username) + { + TEntity member; + var result = PerformUnlockUser(username, out member); + return result; + } + /// /// Updates e-mail approved status, lock status and comment on a user. /// @@ -491,7 +498,7 @@ public override void UpdateUser(MembershipUser user) } } m.Email = user.Email; - + m.IsApproved = user.IsApproved; m.IsLockedOut = user.IsLockedOut; if (user.IsLockedOut) @@ -503,15 +510,9 @@ public override void UpdateUser(MembershipUser user) MemberService.Save(m); } - /// - /// Verifies that the specified user name and password exist in the data source. - /// - /// The name of the user to validate. - /// The password for the specified user. - /// - /// true if the specified username and password are valid; otherwise, false. - /// - public override bool ValidateUser(string username, string password) + + + internal virtual ValidateUserResult PerformValidateUser(string username, string password) { var member = MemberService.GetByUsername(username); @@ -523,7 +524,10 @@ public override bool ValidateUser(string username, string password) username, GetCurrentRequestIpAddress())); - return false; + return new ValidateUserResult + { + Authenticated = false + }; } if (member.IsApproved == false) @@ -534,7 +538,11 @@ public override bool ValidateUser(string username, string password) username, GetCurrentRequestIpAddress())); - return false; + return new ValidateUserResult + { + Member = member, + Authenticated = false + }; } if (member.IsLockedOut) { @@ -544,7 +552,11 @@ public override bool ValidateUser(string username, string password) username, GetCurrentRequestIpAddress())); - return false; + return new ValidateUserResult + { + Member = member, + Authenticated = false + }; } var authenticated = CheckPassword(password, member.RawPasswordValue); @@ -566,7 +578,7 @@ public override bool ValidateUser(string username, string password) string.Format( "Login attempt failed for username {0} from IP address {1}, the user is now locked out, max invalid password attempts exceeded", username, - GetCurrentRequestIpAddress())); + GetCurrentRequestIpAddress())); } else { @@ -579,14 +591,19 @@ public override bool ValidateUser(string username, string password) } else { - member.FailedPasswordAttempts = 0; + if (member.FailedPasswordAttempts > 0) + { + //we have successfully logged in, reset the AccessFailedCount + member.FailedPasswordAttempts = 0; + } + member.LastLoginDate = DateTime.Now; LogHelper.Info( string.Format( "Login attempt succeeded for username {0} from IP address {1}", username, - GetCurrentRequestIpAddress())); + GetCurrentRequestIpAddress())); } //don't raise events for this! It just sets the member dates, if we do raise events this will @@ -599,12 +616,31 @@ public override bool ValidateUser(string username, string password) if (UmbracoVersion.Current >= new Version(7, 3, 0, 0)) MemberService.Save(member, false); - return authenticated; + return new ValidateUserResult + { + Authenticated = authenticated, + Member = member + }; } + /// + /// Verifies that the specified user name and password exist in the data source. + /// + /// The name of the user to validate. + /// The password for the specified user. + /// + /// true if the specified username and password are valid; otherwise, false. + /// + public override bool ValidateUser(string username, string password) + { + var result = PerformValidateUser(username, password); + return result.Authenticated; + } - - - + internal class ValidateUserResult + { + public TEntity Member { get; set; } + public bool Authenticated { get; set; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Security/Providers/UsersMembershipProvider.cs b/src/Umbraco.Web/Security/Providers/UsersMembershipProvider.cs index 267bc0b4337a..35d24558f003 100644 --- a/src/Umbraco.Web/Security/Providers/UsersMembershipProvider.cs +++ b/src/Umbraco.Web/Security/Providers/UsersMembershipProvider.cs @@ -2,9 +2,11 @@ using System.Configuration.Provider; using System.Security.Cryptography; using System.Text; +using System.Web; using System.Web.Security; using Umbraco.Core; using Umbraco.Core.Configuration; +using Umbraco.Core.Models.Identity; using Umbraco.Core.Models.Membership; using Umbraco.Core.Security; using Umbraco.Core.Services; @@ -42,19 +44,54 @@ protected override MembershipUser ConvertToMembershipUser(IUser entity) return entity.AsConcreteMembershipUser(Name, true); } + private bool _allowManuallyChangingPassword = false; + private bool _enablePasswordReset = false; + + /// + /// Indicates whether the membership provider is configured to allow users to reset their passwords. + /// + /// + /// true if the membership provider supports password reset; otherwise, false. The default is FALSE for users. + public override bool EnablePasswordReset + { + get { return _enablePasswordReset; } + } + + /// + /// For backwards compatibility, this provider supports this option by default it is FALSE for users + /// + public override bool AllowManuallyChangingPassword + { + get { return _allowManuallyChangingPassword; } + } + public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config) { base.Initialize(name, config); + if (config == null) { throw new ArgumentNullException("config"); } + + _allowManuallyChangingPassword = config.GetValue("allowManuallyChangingPassword", false); + _enablePasswordReset = config.GetValue("enablePasswordReset", false); + // test for membertype (if not specified, choose the first member type available) + // We'll support both names for legacy reasons: defaultUserTypeAlias & defaultUserGroupAlias + if (config["defaultUserTypeAlias"] != null) { - _defaultMemberTypeAlias = config["defaultUserTypeAlias"]; - if (_defaultMemberTypeAlias.IsNullOrWhiteSpace()) + if (config["defaultUserTypeAlias"].IsNullOrWhiteSpace() == false) { - throw new ProviderException("No default user type alias is specified in the web.config string. Please add a 'defaultUserTypeAlias' to the add element in the provider declaration in web.config"); + _defaultMemberTypeAlias = config["defaultUserTypeAlias"]; + _hasDefaultMember = true; + } + } + if (_hasDefaultMember == false && config["defaultUserGroupAlias"] != null) + { + if (config["defaultUserGroupAlias"].IsNullOrWhiteSpace() == false) + { + _defaultMemberTypeAlias = config["defaultUserGroupAlias"]; + _hasDefaultMember = true; } - _hasDefaultMember = true; } } @@ -71,7 +108,7 @@ public override string DefaultMemberTypeAlias _defaultMemberTypeAlias = MemberService.GetDefaultMemberType(); if (_defaultMemberTypeAlias.IsNullOrWhiteSpace()) { - throw new ProviderException("No default user type alias is specified in the web.config string. Please add a 'defaultUserTypeAlias' to the add element in the provider declaration in web.config"); + throw new ProviderException("No default user group alias is specified in the web.config string. Please add a 'defaultUserTypeAlias' to the add element in the provider declaration in web.config"); } _hasDefaultMember = true; } @@ -80,5 +117,69 @@ public override string DefaultMemberTypeAlias return _defaultMemberTypeAlias; } } + + /// + /// Overridden in order to call the BackOfficeUserManager.UnlockUser method in order to raise the user audit events + /// + /// + /// + /// + internal override bool PerformUnlockUser(string username, out IUser member) + { + var result = base.PerformUnlockUser(username, out member); + if (result) + { + var userManager = GetBackofficeUserManager(); + if (userManager != null) + { + userManager.RaiseAccountUnlockedEvent(member.Id); + } + } + return result; + } + + /// + /// Override in order to raise appropriate events via the + /// + /// + /// + /// + internal override ValidateUserResult PerformValidateUser(string username, string password) + { + var result = base.PerformValidateUser(username, password); + + var userManager = GetBackofficeUserManager(); + + if (userManager == null) return result; + + if (result.Authenticated == false) + { + var count = result.Member.FailedPasswordAttempts; + if (count >= MaxInvalidPasswordAttempts) + { + userManager.RaiseAccountLockedEvent(result.Member.Id); + } + } + else + { + if (result.Member.FailedPasswordAttempts > 0) + { + //we have successfully logged in, if the failed password attempts was modified it means it was reset + if (result.Member.WasPropertyDirty("FailedPasswordAttempts")) + { + userManager.RaiseResetAccessFailedCountEvent(result.Member.Id); + } + } + } + + return result; + } + + internal BackOfficeUserManager GetBackofficeUserManager() + { + return HttpContext.Current == null + ? null + : HttpContext.Current.GetOwinContext().GetBackOfficeUserManager(); + } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Security/ValidateRequestAttempt.cs b/src/Umbraco.Web/Security/ValidateRequestAttempt.cs index 62fd68a2ef18..fdd894aa6026 100644 --- a/src/Umbraco.Web/Security/ValidateRequestAttempt.cs +++ b/src/Umbraco.Web/Security/ValidateRequestAttempt.cs @@ -1,13 +1,14 @@ namespace Umbraco.Web.Security { - internal enum ValidateRequestAttempt + public enum ValidateRequestAttempt { - Success, - FailedNoPrivileges, + Success = 0, + + FailedNoPrivileges = 100, //FailedTimedOut, - FailedNoContextId, - FailedNoSsl + FailedNoContextId = 101, + FailedNoSsl = 102 } } \ No newline at end of file diff --git a/src/Umbraco.Web/Security/WebSecurity.cs b/src/Umbraco.Web/Security/WebSecurity.cs index cda9f04fad94..ab692b900637 100644 --- a/src/Umbraco.Web/Security/WebSecurity.cs +++ b/src/Umbraco.Web/Security/WebSecurity.cs @@ -12,6 +12,7 @@ using Microsoft.AspNet.Identity.Owin; using Microsoft.Owin; using umbraco.businesslogic.Exceptions; +using Umbraco.Core.Models; using Umbraco.Core.Models.Identity; using Umbraco.Web.Models.ContentEditing; using GlobalSettings = Umbraco.Core.Configuration.GlobalSettings; @@ -30,7 +31,7 @@ public class WebSecurity : DisposableObject public WebSecurity(HttpContextBase httpContext, ApplicationContext applicationContext) { _httpContext = httpContext; - _applicationContext = applicationContext; + _applicationContext = applicationContext; } /// @@ -48,11 +49,11 @@ public bool IsMemberAuthorized( IEnumerable allowGroups = null, IEnumerable allowMembers = null) { - if (HttpContext.Current == null || ApplicationContext.Current == null) + if (UmbracoContext.Current == null) { return false; } - var helper = new MembershipHelper(ApplicationContext.Current, new HttpContextWrapper(HttpContext.Current)); + var helper = new MembershipHelper(UmbracoContext.Current); return helper.IsMemberAuthorized(allowAll, allowTypes, allowGroups, allowMembers); } @@ -66,7 +67,7 @@ public virtual IUser CurrentUser { get { - //only load it once per instance! + //only load it once per instance! (but make sure groups are loaded) if (_currentUser == null) { var id = GetUserId(); @@ -170,112 +171,24 @@ public virtual void RenewLoginTimeout() /// /// /// + /// + /// This uses ASP.NET Identity to perform the validation + /// public virtual bool ValidateBackOfficeCredentials(string username, string password) - { - var membershipProvider = Core.Security.MembershipProviderExtensions.GetUsersMembershipProvider(); - return membershipProvider != null && membershipProvider.ValidateUser(username, password); + { + //find the user by username + var user = UserManager.FindByNameAsync(username).Result; + return user != null && UserManager.CheckPasswordAsync(user, password).Result; } - - /// - /// Returns the MembershipUser from the back office membership provider - /// - /// - /// - /// + + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("Back office users shouldn't be resolved from the membership provider, they should be resolved usign the BackOfficeUserManager or the IUserService")] public virtual MembershipUser GetBackOfficeMembershipUser(string username, bool setOnline) { var membershipProvider = Core.Security.MembershipProviderExtensions.GetUsersMembershipProvider(); return membershipProvider != null ? membershipProvider.GetUser(username, setOnline) : null; } - /// - /// Gets (and creates if not found) the back office instance for the username specified - /// - /// - /// - /// - /// This will return an instance no matter what membership provider is installed for the back office, it will automatically - /// create any missing accounts if one is not found and a custom membership provider or is being used. - /// - internal IUser GetBackOfficeUser(string username) - { - //get the membership user (set user to be 'online' in the provider too) - var membershipUser = GetBackOfficeMembershipUser(username, true); - var provider = Core.Security.MembershipProviderExtensions.GetUsersMembershipProvider(); - - if (membershipUser == null) - { - throw new InvalidOperationException( - "The username & password validated but the membership provider '" + - provider.Name + - "' did not return a MembershipUser with the username supplied"); - } - - //regarldess of the membership provider used, see if this user object already exists in the umbraco data - var user = _applicationContext.Services.UserService.GetByUsername(membershipUser.UserName); - - //we're using the built-in membership provider so the user will already be available - if (provider.IsUmbracoUsersProvider()) - { - if (user == null) - { - //this should never happen - throw new InvalidOperationException("The user '" + username + "' could not be found in the Umbraco database"); - } - return user; - } - - //we are using a custom membership provider for the back office, in this case we need to create user accounts for the logged in member. - //if we already have a user object in Umbraco we don't need to do anything, otherwise we need to create a mapped Umbraco account. - if (user != null) return user; - - //we need to create an Umbraco IUser of a 'writer' type with access to only content - this was how v6 operates. - var writer = _applicationContext.Services.UserService.GetUserTypeByAlias("writer"); - - var email = membershipUser.Email; - if (email.IsNullOrWhiteSpace()) - { - //in some cases if there is no email we have to generate one since it is required! - email = Guid.NewGuid().ToString("N") + "@example.com"; - } - - user = new Core.Models.Membership.User(writer) - { - Email = email, - Language = GlobalSettings.DefaultUILanguage, - Name = membershipUser.UserName, - RawPasswordValue = Guid.NewGuid().ToString("N"), //Need to set this to something - will not be used though - Username = membershipUser.UserName, - StartContentId = -1, - StartMediaId = -1, - IsLockedOut = false, - IsApproved = true - }; - user.AddAllowedSection("content"); - - _applicationContext.Services.UserService.Save(user); - - return user; - } - - /// - /// Validates the user node tree permissions. - /// - /// - /// The path. - /// The action. - /// - internal bool ValidateUserNodeTreePermissions(User umbracoUser, string path, string action) - { - var permissions = umbracoUser.GetPermissions(path); - if (permissions.IndexOf(action, StringComparison.Ordinal) > -1 && (path.Contains("-20") || ("," + path + ",").Contains("," + umbracoUser.StartNodeId + ","))) - return true; - - var user = umbracoUser; - LogHelper.Info("User {0} has insufficient permissions in UmbracoEnsuredPage: '{1}', '{2}', '{3}'", () => user.Name, () => path, () => permissions, () => action); - return false; - } - /// /// Validates the current user to see if they have access to the specified app /// @@ -343,16 +256,16 @@ public bool ValidateUserContextId(string currentUmbracoUserContextId) /// public virtual bool ValidateCurrentUser() { - var result = ValidateCurrentUser(false); - return result == ValidateRequestAttempt.Success; - } + return ValidateCurrentUser(false, true) == ValidateRequestAttempt.Success; + } /// /// Validates the current user assigned to the request and ensures the stored user data is valid /// /// set to true if you want exceptions to be thrown if failed + /// If true requires that the user is approved to be validated /// - internal ValidateRequestAttempt ValidateCurrentUser(bool throwExceptions) + public virtual ValidateRequestAttempt ValidateCurrentUser(bool throwExceptions, bool requiresApproval = true) { //This will first check if the current user is already authenticated - which should be the case in nearly all circumstances // since the authentication happens in the Module, that authentication also checks the ticket expiry. We don't @@ -368,7 +281,7 @@ internal ValidateRequestAttempt ValidateCurrentUser(bool throwExceptions) var user = CurrentUser; // Check for console access - if (user == null || user.IsApproved == false || (user.IsLockedOut && GlobalSettings.RequestIsInUmbracoApplication(_httpContext))) + if (user == null || (requiresApproval && user.IsApproved == false) || (user.IsLockedOut && GlobalSettings.RequestIsInUmbracoApplication(_httpContext))) { if (throwExceptions) throw new ArgumentException("You have no priviledges to the umbraco console. Please contact your administrator"); return ValidateRequestAttempt.FailedNoPrivileges; @@ -396,35 +309,34 @@ internal ValidateRequestAttempt AuthorizeRequest(bool throwExceptions = false) /// /// Checks if the specified user as access to the app /// - /// + /// /// /// - internal bool UserHasAppAccess(string app, IUser user) + internal virtual bool UserHasSectionAccess(string section, IUser user) { - var apps = user.AllowedSections; - return apps.Any(uApp => uApp.InvariantEquals(app)); + return user.HasSectionAccess(section); } [Obsolete("Do not use this method if you don't have to, use the overload with IUser instead")] - internal bool UserHasAppAccess(string app, User user) + internal bool UserHasSectionAccess(string section, User user) { - return user.Applications.Any(uApp => uApp.alias == app); + return user.Applications.Any(uApp => uApp.alias == section); } /// /// Checks if the specified user by username as access to the app /// - /// + /// /// /// - internal bool UserHasAppAccess(string app, string username) + internal bool UserHasSectionAccess(string section, string username) { var user = _applicationContext.Services.UserService.GetByUsername(username); if (user == null) { return false; } - return UserHasAppAccess(app, user); + return user.HasSectionAccess(section); } [Obsolete("Returns the current user's unique umbraco sesion id - this cannot be set and isn't intended to be used in your code")] diff --git a/src/Umbraco.Web/Suspendable.cs b/src/Umbraco.Web/Suspendable.cs new file mode 100644 index 000000000000..db4ef5348598 --- /dev/null +++ b/src/Umbraco.Web/Suspendable.cs @@ -0,0 +1,116 @@ +using System; +using System.Diagnostics; +using Examine; +using Examine.Providers; +using Umbraco.Core; +using Umbraco.Web.Cache; + +namespace Umbraco.Web +{ + internal static class Suspendable + { + public static class PageCacheRefresher + { + private static bool _tried, _suspended; + + public static bool CanRefreshDocumentCacheFromDatabase + { + get + { + // trying a full refresh + if (_suspended == false) return true; + _tried = true; // remember we tried + return false; + } + } + + public static bool CanUpdateDocumentCache + { + get + { + // trying a partial update + // ok if not suspended, or if we haven't done a full already + return _suspended == false || _tried == false; + } + } + + public static void SuspendDocumentCache() + { + ApplicationContext.Current.ProfilingLogger.Logger.Info(typeof (PageCacheRefresher), "Suspend document cache."); + _suspended = true; + } + + public static void ResumeDocumentCache() + { + _suspended = false; + + ApplicationContext.Current.ProfilingLogger.Logger.Info(typeof (PageCacheRefresher), string.Format("Resume document cache (reload:{0}).", _tried ? "true" : "false")); + + if (_tried == false) return; + _tried = false; + + var pageRefresher = CacheRefreshersResolver.Current.GetById(new Guid(DistributedCache.PageCacheRefresherId)); + pageRefresher.RefreshAll(); + } + } + + public static class ExamineEvents + { + private static bool _tried, _suspended; + + public static bool CanIndex + { + get + { + if (_suspended == false) return true; + _tried = true; // remember we tried + return false; + } + } + + public static void SuspendIndexers() + { + ApplicationContext.Current.ProfilingLogger.Logger.Info(typeof (ExamineEvents), "Suspend indexers."); + _suspended = true; + } + + public static void ResumeIndexers() + { + _suspended = false; + + ApplicationContext.Current.ProfilingLogger.Logger.Info(typeof (ExamineEvents), string.Format("Resume indexers (rebuild:{0}).", _tried ? "true" : "false")); + + if (_tried == false) return; + _tried = false; + + // fixme - could we fork this on a background thread? + foreach (BaseIndexProvider indexer in ExamineManager.Instance.IndexProviderCollection) + { + indexer.RebuildIndex(); + } + } + } + + public static class ScheduledPublishing + { + private static bool _suspended; + + public static bool CanRun + { + get { return _suspended == false; } + } + + public static void Suspend() + { + ApplicationContext.Current.ProfilingLogger.Logger.Info(typeof (ScheduledPublishing), "Suspend scheduled publishing."); + _suspended = true; + } + + public static void Resume() + { + ApplicationContext.Current.ProfilingLogger.Logger.Info(typeof (ScheduledPublishing), "Resume scheduled publishing."); + _suspended = false; + } + } + } +} diff --git a/src/Umbraco.Web/Trees/ApplicationTreeController.cs b/src/Umbraco.Web/Trees/ApplicationTreeController.cs index f6b5e82fc36b..89a615f353bf 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeController.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeController.cs @@ -1,15 +1,12 @@ using System; using System.Globalization; using System.Linq; -using System.Management.Instrumentation; using System.Net; using System.Net.Http.Formatting; using System.Threading.Tasks; using System.Web.Http; -using System.Web.Mvc; using Umbraco.Core; using Umbraco.Core.Models; -using Umbraco.Core.Services; using Umbraco.Web.Models.Trees; using Umbraco.Web.Mvc; using Umbraco.Web.WebApi; @@ -40,9 +37,9 @@ public async Task GetApplicationTrees(string application, strin var rootId = Constants.System.Root.ToString(CultureInfo.InvariantCulture); //find all tree definitions that have the current application alias - var appTrees = ApplicationContext.Current.Services.ApplicationTreeService.GetApplicationTrees(application, onlyInitialized).ToArray(); + var appTrees = Services.ApplicationTreeService.GetApplicationTrees(application, onlyInitialized).ToArray(); - if (appTrees.Count() == 1 || string.IsNullOrEmpty(tree) == false ) + if (string.IsNullOrEmpty(tree) == false || appTrees.Length == 1) { var apptree = string.IsNullOrEmpty(tree) == false ? appTrees.SingleOrDefault(x => x.Alias == tree) @@ -56,10 +53,11 @@ public async Task GetApplicationTrees(string application, strin queryStrings, application); - return result; + //this will be null if it cannot convert to ta single root section + if (result != null) + return result; } - var collection = new TreeNodeCollection(); foreach (var apptree in appTrees) { @@ -107,6 +105,7 @@ private async Task GetRootForMultipleAppTree(ApplicationTree configTre /// /// /// + /// /// private async Task GetRootForSingleAppTree(ApplicationTree configTree, string id, FormDataCollection queryStrings, string application) { @@ -122,6 +121,16 @@ private async Task GetRootForSingleAppTree(ApplicationTree conf throw new InvalidOperationException("Could not create root node for tree " + configTree.Alias); } + //if the root node has a route path, we cannot create a single root section because by specifying the route path this would + //override the dashboard route and that means there can be no dashboard for that section which is a breaking change. + if (rootNode.Result.RoutePath.IsNullOrWhiteSpace() == false + && rootNode.Result.RoutePath != "#" + && rootNode.Result.RoutePath != application) + { + //null indicates this cannot be converted + return null; + } + var sectionRoot = SectionRootNode.CreateSingleTreeSectionRoot( rootId, rootNode.Result.ChildNodesUrl, @@ -129,6 +138,10 @@ private async Task GetRootForSingleAppTree(ApplicationTree conf rootNode.Result.Name, byControllerAttempt.Result); + //This can't be done currently because the root will default to routing to a dashboard and if we disable dashboards for a section + //that is really considered a breaking change. See above. + //sectionRoot.RoutePath = rootNode.Result.RoutePath; + foreach (var d in rootNode.Result.AdditionalData) { sectionRoot.AdditionalData[d.Key] = d.Value; diff --git a/src/Umbraco.Web/Trees/ApplicationTreeExtensions.cs b/src/Umbraco.Web/Trees/ApplicationTreeExtensions.cs index 4ab3c12a518f..c312452a397b 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeExtensions.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeExtensions.cs @@ -1,12 +1,9 @@ using System; -using System.Collections.Generic; -using System.Globalization; +using System.Collections.Concurrent; using System.Linq; using System.Management.Instrumentation; using System.Net.Http; using System.Net.Http.Formatting; -using System.Text; -using System.Threading; using System.Threading.Tasks; using System.Web.Http; using System.Web.Http.Controllers; @@ -16,10 +13,9 @@ using Umbraco.Web.Models.Trees; using Umbraco.Web.Mvc; using Umbraco.Web.WebApi; -using umbraco.BusinessLogic; using umbraco.cms.presentation.Trees; +using Umbraco.Core.Services; using ApplicationTree = Umbraco.Core.Models.ApplicationTree; -using IAuthorizationFilter = System.Web.Http.Filters.IAuthorizationFilter; using UrlHelper = System.Web.Http.Routing.UrlHelper; namespace Umbraco.Web.Trees @@ -27,6 +23,48 @@ namespace Umbraco.Web.Trees internal static class ApplicationTreeExtensions { + private static readonly ConcurrentDictionary TreeAttributeCache = new ConcurrentDictionary(); + + internal static TreeAttribute GetTreeAttribute(this Type treeControllerType) + { + return TreeAttributeCache.GetOrAdd(treeControllerType, type => + { + //Locate the tree attribute + var treeAttributes = type + .GetCustomAttributes(false) + .ToArray(); + + if (treeAttributes.Length == 0) + { + throw new InvalidOperationException("The Tree controller is missing the " + typeof(TreeAttribute).FullName + " attribute"); + } + + //assign the properties of this object to those of the metadata attribute + return treeAttributes[0]; + }); + } + + internal static TreeAttribute GetTreeAttribute(this ApplicationTree tree) + { + return tree.GetRuntimeType().GetTreeAttribute(); + } + + internal static string GetRootNodeDisplayName(this TreeAttribute attribute, ILocalizedTextService textService) + { + //if title is defined, return that + if (string.IsNullOrEmpty(attribute.Title) == false) + return attribute.Title; + + + //try to look up a tree header matching the tree alias + var localizedLabel = textService.Localize("treeHeaders/" + attribute.Alias); + if (string.IsNullOrEmpty(localizedLabel) == false) + return localizedLabel; + + //is returned to signal that a label was not found + return "[" + attribute.Alias + "]"; + } + internal static Attempt TryGetControllerTree(this ApplicationTree appTree) { //get reference to all TreeApiControllers diff --git a/src/Umbraco.Web/Trees/ContentBlueprintTreeController.cs b/src/Umbraco.Web/Trees/ContentBlueprintTreeController.cs new file mode 100644 index 000000000000..0f9da51e63d9 --- /dev/null +++ b/src/Umbraco.Web/Trees/ContentBlueprintTreeController.cs @@ -0,0 +1,128 @@ +using System; +using System.Linq; +using System.Collections.Generic; +using System.Globalization; +using System.Net; +using System.Net.Http.Formatting; +using System.Web.Http; +using umbraco; +using umbraco.businesslogic.Actions; +using umbraco.BusinessLogic.Actions; +using Umbraco.Core; +using Umbraco.Core.Services; +using Umbraco.Core.Models; +using Umbraco.Core.Models.EntityBase; +using Umbraco.Core.Persistence; +using Umbraco.Web.Models.Trees; +using Umbraco.Web.Mvc; +using Umbraco.Web.WebApi.Filters; +using Constants = Umbraco.Core.Constants; + +namespace Umbraco.Web.Trees +{ + /// + /// The content blueprint tree controller + /// + /// + /// This authorizes based on access to the content section even though it exists in the settings + /// + [UmbracoApplicationAuthorize(Constants.Applications.Content)] + [Tree(Constants.Applications.Settings, Constants.Trees.ContentBlueprints, null, sortOrder: 8)] + [PluginController("UmbracoTrees")] + [CoreTree] + public class ContentBlueprintTreeController : TreeController + { + + protected override TreeNode CreateRootNode(FormDataCollection queryStrings) + { + var root = base.CreateRootNode(queryStrings); + + //this will load in a custom UI instead of the dashboard for the root node + root.RoutePath = string.Format("{0}/{1}/{2}", Constants.Applications.Settings, Constants.Trees.ContentBlueprints, "intro"); + + return root; + } + protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) + { + var nodes = new TreeNodeCollection(); + + //get all blueprints + var entities = Services.EntityService.GetChildren(Constants.System.Root, UmbracoObjectTypes.DocumentBlueprint).ToArray(); + + //check if we're rendering the root in which case we'll render the content types that have blueprints + if (id == Constants.System.Root.ToInvariantString()) + { + //get all blueprint content types + var contentTypeAliases = entities.Select(x => ((UmbracoEntity) x).ContentTypeAlias).Distinct(); + //get the ids + var contentTypeIds = Services.ContentTypeService.GetAllContentTypeIds(contentTypeAliases.ToArray()).ToArray(); + + //now get the entities ... it's a bit round about but still smaller queries than getting all document types + var docTypeEntities = contentTypeIds.Length == 0 + ? new IUmbracoEntity[0] + : Services.EntityService.GetAll(UmbracoObjectTypes.DocumentType, contentTypeIds).ToArray(); + + nodes.AddRange(docTypeEntities + .Select(entity => + { + var treeNode = CreateTreeNode(entity, Constants.ObjectTypes.DocumentBlueprintGuid, id, queryStrings, "icon-item-arrangement", true); + treeNode.Path = string.Format("-1,{0}", entity.Id); + treeNode.NodeType = "document-type-blueprints"; + //TODO: This isn't the best way to ensure a noop process for clicking a node but it works for now. + treeNode.AdditionalData["jsClickCallback"] = "javascript:void(0);"; + return treeNode; + })); + + return nodes; + } + else + { + var intId = id.TryConvertTo(); + //Get the content type + var ct = Services.ContentTypeService.GetContentType(intId.Result); + if (ct == null) return nodes; + + var blueprintsForDocType = entities.Where(x => ct.Alias == ((UmbracoEntity) x).ContentTypeAlias); + nodes.AddRange(blueprintsForDocType + .Select(entity => + { + var treeNode = CreateTreeNode(entity, Constants.ObjectTypes.DocumentBlueprintGuid, id, queryStrings, "icon-blueprint", false); + treeNode.Path = string.Format("-1,{0},{1}", ct.Id, entity.Id); + return treeNode; + })); + } + + return nodes; + } + + protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings) + { + var menu = new MenuItemCollection(); + + if (id == Constants.System.Root.ToInvariantString()) + { + // root actions + menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionNew.Instance.Alias))); + menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionRefresh.Instance.Alias)), true); + return menu; + } + var cte = Services.EntityService.Get(int.Parse(id), UmbracoObjectTypes.DocumentType); + //only refresh & create if it's a content type + if (cte != null) + { + var ct = Services.ContentTypeService.GetContentType(cte.Id); + var createItem = menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionCreateBlueprintFromContent.Instance.Alias))); + createItem.NavigateToRoute("/settings/contentBlueprints/edit/-1?create=true&doctype=" + ct.Alias); + + menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionRefresh.Instance.Alias)), true); + + return menu; + } + + menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionDelete.Instance.Alias))); + + return menu; + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/ContentTreeController.cs b/src/Umbraco.Web/Trees/ContentTreeController.cs index a9f0bda805ce..ea644f5dc8fe 100644 --- a/src/Umbraco.Web/Trees/ContentTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentTreeController.cs @@ -16,8 +16,11 @@ using umbraco; using umbraco.BusinessLogic.Actions; using umbraco.businesslogic; +using umbraco.businesslogic.Actions; using umbraco.cms.businesslogic.web; using umbraco.interfaces; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Search; using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees @@ -25,8 +28,8 @@ namespace Umbraco.Web.Trees //We will not allow the tree to render unless the user has access to any of the sections that the tree gets rendered // this is not ideal but until we change permissions to be tree based (not section) there's not much else we can do here. [UmbracoApplicationAuthorize( - Constants.Applications.Content, - Constants.Applications.Media, + Constants.Applications.Content, + Constants.Applications.Media, Constants.Applications.Users, Constants.Applications.Settings, Constants.Applications.Developer, @@ -35,21 +38,11 @@ namespace Umbraco.Web.Trees [Tree(Constants.Applications.Content, Constants.Trees.Content)] [PluginController("UmbracoTrees")] [CoreTree] - public class ContentTreeController : ContentTreeControllerBase + [SearchableTree("searchResultFormatter", "configureContentResult")] + public class ContentTreeController : ContentTreeControllerBase, ISearchableTree { - - protected override TreeNode CreateRootNode(FormDataCollection queryStrings) - { - var node = base.CreateRootNode(queryStrings); - //if the user's start node is not default, then ensure the root doesn't have a menu - if (Security.CurrentUser.StartContentId != Constants.System.Root) - { - node.MenuUrl = ""; - } - node.Name = ui.Text("sections", Constants.Trees.Content); - return node; - } - + private readonly UmbracoTreeSearcher _treeSearcher = new UmbracoTreeSearcher(); + protected override int RecycleBinId { get { return Constants.System.RecycleBinContent; } @@ -60,11 +53,12 @@ protected override bool RecycleBinSmells get { return Services.ContentService.RecycleBinSmells(); } } - protected override int UserStartNode + private int[] _userStartNodes; + protected override int[] UserStartNodes { - get { return Security.CurrentUser.StartContentId; } + get { return _userStartNodes ?? (_userStartNodes = Security.CurrentUser.CalculateContentStartNodeIds(Services.EntityService)); } } - + /// /// Creates a tree node for a content item based on an UmbracoEntity /// @@ -74,7 +68,7 @@ protected override int UserStartNode /// protected override TreeNode GetSingleTreeNode(IUmbracoEntity e, string parentId, FormDataCollection queryStrings) { - var entity = (UmbracoEntity) e; + var entity = (UmbracoEntity)e; var allowedUserOptions = GetAllowedUserMenuItemsForNode(e); if (CanUserAccessNode(e, allowedUserOptions)) @@ -87,7 +81,7 @@ protected override TreeNode GetSingleTreeNode(IUmbracoEntity e, string parentId, entity, Constants.ObjectTypes.DocumentGuid, parentId, - queryStrings, + queryStrings, entity.HasChildren && (isContainer == false)); node.AdditionalData.Add("contentType", entity.ContentTypeAlias); @@ -97,7 +91,7 @@ protected override TreeNode GetSingleTreeNode(IUmbracoEntity e, string parentId, node.AdditionalData.Add("isContainer", true); node.SetContainerStyle(); } - + if (entity.IsPublished == false) node.SetNotPublishedStyle(); @@ -115,14 +109,17 @@ protected override TreeNode GetSingleTreeNode(IUmbracoEntity e, string parentId, } protected override MenuItemCollection PerformGetMenuForNode(string id, FormDataCollection queryStrings) - { + { if (id == Constants.System.Root.ToInvariantString()) { var menu = new MenuItemCollection(); - - //if the user's start node is not the root then ensure the root menu is empty/doesn't exist - if (Security.CurrentUser.StartContentId != Constants.System.Root) + + // if the user's start node is not the root then the only menu item to display is refresh + if (UserStartNodes.Contains(Constants.System.Root) == false) { + menu.Items.Add( + Services.TextService.Localize(string.Concat("actions/", ActionRefresh.Instance.Alias)), + true); return menu; } @@ -150,7 +147,7 @@ protected override MenuItemCollection PerformGetMenuForNode(string id, FormDataC // add default actions for *all* users menu.Items.Add(ui.Text("actions", ActionRePublish.Instance.Alias)).ConvertLegacyMenuItem(null, "content", "content"); menu.Items.Add(ui.Text("actions", ActionRefresh.Instance.Alias), true); - + return menu; } @@ -166,14 +163,24 @@ protected override MenuItemCollection PerformGetMenuForNode(string id, FormDataC { throw new HttpResponseException(HttpStatusCode.NotFound); } + + //if the user has no path access for this node, all they can do is refresh + if (Security.CurrentUser.HasPathAccess(item, Services.EntityService, RecycleBinId) == false) + { + var menu = new MenuItemCollection(); + menu.Items.Add( + Services.TextService.Localize(string.Concat("actions/", ActionRefresh.Instance.Alias)), + true); + return menu; + } var nodeMenu = GetAllNodeMenuItems(item); var allowedMenuItems = GetAllowedUserMenuItemsForNode(item); - + FilterUserAllowedMenuItems(nodeMenu, allowedMenuItems); //if the media item is in the recycle bin, don't have a default menu, just show the regular menu - if (item.Path.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries).Contains(RecycleBinId.ToInvariantString())) + if (item.Path.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Contains(RecycleBinId.ToInvariantString())) { nodeMenu.DefaultMenuAlias = null; nodeMenu.Items.Insert(2, new MenuItem(ActionRestore.Instance, ui.Text("actions", ActionRestore.Instance.Alias))); @@ -181,9 +188,9 @@ protected override MenuItemCollection PerformGetMenuForNode(string id, FormDataC else { //set the default to create - nodeMenu.DefaultMenuAlias = ActionNew.Instance.Alias; + nodeMenu.DefaultMenuAlias = ActionNew.Instance.Alias; } - + return nodeMenu; } @@ -202,17 +209,7 @@ protected override UmbracoObjectTypes UmbracoObjectType protected override bool HasPathAccess(string id, FormDataCollection queryStrings) { var entity = GetEntityFromId(id); - if (entity == null) - { - return false; - } - - var content = Services.ContentService.GetById(entity.Id); - if (content == null) - { - return false; - } - return Security.CurrentUser.HasPathAccess(content); + return HasPathAccess(entity, queryStrings); } /// @@ -225,7 +222,9 @@ protected MenuItemCollection GetAllNodeMenuItems(IUmbracoEntity item) var menu = new MenuItemCollection(); menu.Items.Add(ui.Text("actions", ActionNew.Instance.Alias)); menu.Items.Add(ui.Text("actions", ActionDelete.Instance.Alias)); - + + menu.Items.Add(ui.Text("actions", ActionCreateBlueprintFromContent.Instance.Alias)); + //need to ensure some of these are converted to the legacy system - until we upgrade them all to be angularized. menu.Items.Add(ui.Text("actions", ActionMove.Instance.Alias), true); menu.Items.Add(ui.Text("actions", ActionCopy.Instance.Alias)); @@ -238,9 +237,9 @@ protected MenuItemCollection GetAllNodeMenuItems(IUmbracoEntity item) menu.Items.Add(ui.Text("actions", ActionPublish.Instance.Alias), true).ConvertLegacyMenuItem(item, "content", "content"); menu.Items.Add(ui.Text("actions", ActionToPublish.Instance.Alias)).ConvertLegacyMenuItem(item, "content", "content"); menu.Items.Add(ui.Text("actions", ActionAssignDomain.Instance.Alias)).ConvertLegacyMenuItem(item, "content", "content"); - menu.Items.Add(ui.Text("actions", ActionRights.Instance.Alias)).ConvertLegacyMenuItem(item, "content", "content"); + menu.Items.Add(ui.Text("actions", ActionRights.Instance.Alias), true); menu.Items.Add(ui.Text("actions", ActionProtect.Instance.Alias), true).ConvertLegacyMenuItem(item, "content", "content"); - + menu.Items.Add(ui.Text("actions", ActionNotify.Instance.Alias), true).ConvertLegacyMenuItem(item, "content", "content"); menu.Items.Add(ui.Text("actions", ActionSendToTranslate.Instance.Alias)).ConvertLegacyMenuItem(item, "content", "content"); @@ -249,5 +248,9 @@ protected MenuItemCollection GetAllNodeMenuItems(IUmbracoEntity item) return menu; } + public IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null) + { + return _treeSearcher.ExamineSearch(Umbraco, query, UmbracoEntityTypes.Document, pageSize, pageIndex, out totalFound, searchFrom); + } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs index 97c5daed964a..8fabc1677ec7 100644 --- a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs @@ -1,5 +1,7 @@ using System; +using System.Collections.Concurrent; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Net; using System.Net.Http; @@ -52,8 +54,48 @@ public TreeNode GetTreeNode(string id, FormDataCollection queryStrings) } #endregion + + /// + /// Ensure the noAccess metadata is applied for the root node if in dialog mode and the user doesn't have path access to it + /// + /// + /// + protected override TreeNode CreateRootNode(FormDataCollection queryStrings) + { + var node = base.CreateRootNode(queryStrings); + + if (IsDialog(queryStrings) && UserStartNodes.Contains(Constants.System.Root) == false) + { + node.AdditionalData["noAccess"] = true; + } + + return node; + } protected abstract TreeNode GetSingleTreeNode(IUmbracoEntity e, string parentId, FormDataCollection queryStrings); + + /// + /// Returns a for the and + /// attaches some meta data to the node if the user doesn't have start node access to it when in dialog mode + /// + /// + /// + /// + /// + internal TreeNode GetSingleTreeNodeWithAccessCheck(IUmbracoEntity e, string parentId, FormDataCollection queryStrings) + { + bool hasPathAccess; + var entityIsAncestorOfStartNodes = Security.CurrentUser.IsInBranchOfStartNode(e, Services.EntityService, RecycleBinId, out hasPathAccess); + if (entityIsAncestorOfStartNodes == false) + return null; + + var treeNode = GetSingleTreeNode(e, parentId, queryStrings); + if (hasPathAccess == false) + { + treeNode.AdditionalData["noAccess"] = true; + } + return treeNode; + } /// /// Returns the @@ -68,14 +110,8 @@ public TreeNode GetTreeNode(string id, FormDataCollection queryStrings) /// /// Returns the user's start node for this tree /// - protected abstract int UserStartNode { get; } - - /// - /// Gets the tree nodes for the given id - /// - /// - /// - /// + protected abstract int[] UserStartNodes { get; } + protected virtual TreeNodeCollection PerformGetTreeNodes(string id, FormDataCollection queryStrings) { var nodes = new TreeNodeCollection(); @@ -83,9 +119,10 @@ protected virtual TreeNodeCollection PerformGetTreeNodes(string id, FormDataColl var altStartId = string.Empty; if (queryStrings.HasKey(TreeQueryStringParameters.StartNodeId)) altStartId = queryStrings.GetValue(TreeQueryStringParameters.StartNodeId); + var rootIdString = Constants.System.Root.ToString(CultureInfo.InvariantCulture); //check if a request has been made to render from a specific start node - if (string.IsNullOrEmpty(altStartId) == false && altStartId != "undefined" && altStartId != Constants.System.Root.ToString(CultureInfo.InvariantCulture)) + if (string.IsNullOrEmpty(altStartId) == false && altStartId != "undefined" && altStartId != rootIdString) { id = altStartId; @@ -105,16 +142,48 @@ protected virtual TreeNodeCollection PerformGetTreeNodes(string id, FormDataColl // Therefore, in the latter case, we want to change the id to -1 since we want to render the current user's root node // and the GetChildEntities method will take care of rendering the correct root node. // If it is in dialog mode, then we don't need to change anything and the children will just render as per normal. - if (IsDialog(queryStrings) == false && UserStartNode != Constants.System.Root) + if (IsDialog(queryStrings) == false && UserStartNodes.Contains(Constants.System.Root) == false) { id = Constants.System.Root.ToString(CultureInfo.InvariantCulture); } } - var entities = GetChildEntities(id); - nodes.AddRange(entities.Select(entity => GetSingleTreeNode(entity, id, queryStrings)).Where(node => node != null)); + var entities = GetChildEntities(id).ToList(); + + //If we are looking up the root and there is more than one node ... + //then we want to lookup those nodes' 'site' nodes and render those so that the + //user has some context of where they are in the tree, this is generally for pickers in a dialog. + //for any node they don't have access too, we need to add some metadata + if (id == rootIdString && entities.Count > 1) + { + var siteNodeIds = new List(); + //put into array since we might modify the list + foreach (var e in entities.ToArray()) + { + var pathParts = e.Path.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries); + if (pathParts.Length < 2) + continue; // this should never happen but better to check + + int siteNodeId; + if (int.TryParse(pathParts[1], out siteNodeId) == false) + continue; + + //we'll look up this + siteNodeIds.Add(siteNodeId); + } + var siteNodes = Services.EntityService.GetAll(UmbracoObjectType, siteNodeIds.ToArray()) + .DistinctBy(e => e.Id) + .ToArray(); + + //add site nodes + nodes.AddRange(siteNodes.Select(e => GetSingleTreeNodeWithAccessCheck(e, id, queryStrings)).Where(node => node != null)); + + return nodes; + } + + nodes.AddRange(entities.Select(e => GetSingleTreeNodeWithAccessCheck(e, id, queryStrings)).Where(node => node != null)); return nodes; - } + } protected abstract MenuItemCollection PerformGetMenuForNode(string id, FormDataCollection queryStrings); @@ -128,7 +197,6 @@ protected IEnumerable GetChildEntities(string id) // look up from GUID if it's not an integer if (int.TryParse(id, out iid) == false) { - var idEntity = GetEntityFromId(id); if (idEntity == null) { @@ -137,19 +205,13 @@ protected IEnumerable GetChildEntities(string id) iid = idEntity.Id; } - - //if a request is made for the root node data but the user's start node is not the default, then - // we need to return their start node data - if (iid == Constants.System.Root && UserStartNode != Constants.System.Root) + // if a request is made for the root node but user has no access to + // root node, return start nodes instead + if (iid == Constants.System.Root && UserStartNodes.Contains(Constants.System.Root) == false) { - //just return their single start node, it will show up under the 'Content' label - var startNode = Services.EntityService.Get(UserStartNode, UmbracoObjectType); - if (startNode != null) - return new[] { startNode }; - else - { - throw new EntityNotFoundException(UserStartNode, "User's start content node could not be found"); - } + return UserStartNodes.Length > 0 + ? Services.EntityService.GetAll(UmbracoObjectType, UserStartNodes) + : Enumerable.Empty(); } return Services.EntityService.GetChildren(iid, UmbracoObjectType).ToArray(); @@ -161,8 +223,21 @@ protected IEnumerable GetChildEntities(string id) /// /// /// + //we should remove this in v8, it's now here for backwards compat only protected abstract bool HasPathAccess(string id, FormDataCollection queryStrings); + /// + /// Returns true or false if the current user has access to the node based on the user's allowed start node (path) access + /// + /// + /// + /// + protected bool HasPathAccess(IUmbracoEntity entity, FormDataCollection queryStrings) + { + if (entity == null) return false; + return Security.CurrentUser.HasPathAccess(entity, Services.EntityService, RecycleBinId); + } + /// /// Ensures the recycle bin is appended when required (i.e. user has access to the root and it's not in dialog mode) /// @@ -175,7 +250,7 @@ protected IEnumerable GetChildEntities(string id) protected sealed override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) { //check if we're rendering the root - if (id == Constants.System.Root.ToInvariantString() && UserStartNode == Constants.System.Root) + if (id == Constants.System.Root.ToInvariantString() && UserStartNodes.Contains(Constants.System.Root)) { var altStartId = string.Empty; @@ -221,7 +296,7 @@ protected sealed override TreeNodeCollection GetTreeNodes(string id, FormDataCol /// private TreeNodeCollection GetTreeNodesInternal(string id, FormDataCollection queryStrings) { - IUmbracoEntity current = GetEntityFromId(id); + var current = GetEntityFromId(id); //before we get the children we need to see if this is a container node @@ -249,7 +324,8 @@ protected sealed override MenuItemCollection GetMenuForNode(string id, FormDataC menu.Items.Add(ui.Text("actions", "emptyTrashcan")); menu.Items.Add(ui.Text("actions", ActionRefresh.Instance.Alias), true); return menu; - } + } + return PerformGetMenuForNode(id, queryStrings); } @@ -278,10 +354,11 @@ protected void FilterUserAllowedMenuItems(MenuItemCollection menuWithAllItems, I internal IEnumerable GetAllowedUserMenuItemsForNode(IUmbracoEntity dd) { - var actions = global::umbraco.BusinessLogic.Actions.Action.FromString(UmbracoUser.GetPermissions(dd.Path)); - + var actions = ActionsResolver.Current.FromActionSymbols(Security.CurrentUser.GetPermissions(dd.Path, Services.UserService)) + .ToList(); + // A user is allowed to delete their own stuff - if (dd.CreatorId == UmbracoUser.Id && actions.Contains(ActionDelete.Instance) == false) + if (dd.CreatorId == Security.GetUserId() && actions.Contains(ActionDelete.Instance) == false) actions.Add(ActionDelete.Instance); return actions.Select(x => new MenuItem(x)); @@ -298,39 +375,78 @@ internal bool CanUserAccessNode(IUmbracoEntity doc, IEnumerable allowe { return allowedUserOptions.Select(x => x.Action).OfType().Any(); } - + /// - /// Get an entity via an id that can be either an integer, Guid or UDI + /// this will parse the string into either a GUID or INT /// /// /// - internal IUmbracoEntity GetEntityFromId(string id) + internal Tuple GetIdentifierFromString(string id) { - IUmbracoEntity entity; - Guid idGuid; int idInt; Udi idUdi; if (Guid.TryParse(id, out idGuid)) { - entity = Services.EntityService.GetByKey(idGuid, UmbracoObjectType); + return new Tuple(idGuid, null); } - else if (int.TryParse(id, out idInt)) + if (int.TryParse(id, out idInt)) { - entity = Services.EntityService.Get(idInt, UmbracoObjectType); + return new Tuple(null, idInt); } - else if (Udi.TryParse(id, out idUdi)) + if (Udi.TryParse(id, out idUdi)) { var guidUdi = idUdi as GuidUdi; - entity = guidUdi != null ? Services.EntityService.GetByKey(guidUdi.Guid, UmbracoObjectType) : null; - } - else + if (guidUdi != null) + return new Tuple(guidUdi.Guid, null); + } + + return null; + } + + /// + /// Get an entity via an id that can be either an integer, Guid or UDI + /// + /// + /// + /// + /// This object has it's own contextual cache for these lookups + /// + internal IUmbracoEntity GetEntityFromId(string id) + { + return _entityCache.GetOrAdd(id, s => { - return null; - } + IUmbracoEntity entity; - return entity; - } + Guid idGuid; + int idInt; + Udi idUdi; + + if (Guid.TryParse(s, out idGuid)) + { + entity = Services.EntityService.GetByKey(idGuid, UmbracoObjectType); + } + else if (int.TryParse(s, out idInt)) + { + entity = Services.EntityService.Get(idInt, UmbracoObjectType); + } + else if (Udi.TryParse(s, out idUdi)) + { + var guidUdi = idUdi as GuidUdi; + entity = guidUdi != null ? Services.EntityService.GetByKey(guidUdi.Guid, UmbracoObjectType) : null; + } + else + { + return null; + } + + return entity; + }); + + + } + + private readonly ConcurrentDictionary _entityCache = new ConcurrentDictionary(); } } \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/ContentTypeTreeController.cs b/src/Umbraco.Web/Trees/ContentTypeTreeController.cs index 6df71341cd59..33ae50dbbf50 100644 --- a/src/Umbraco.Web/Trees/ContentTypeTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentTypeTreeController.cs @@ -1,6 +1,8 @@ using System; +using System.Collections.Generic; using System.Linq; using System.Net.Http.Formatting; +using AutoMapper; using umbraco; using umbraco.BusinessLogic.Actions; using Umbraco.Core; @@ -9,6 +11,8 @@ using Umbraco.Web.Models.Trees; using Umbraco.Web.WebApi.Filters; using Umbraco.Core.Services; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Search; namespace Umbraco.Web.Trees { @@ -17,7 +21,7 @@ namespace Umbraco.Web.Trees [Mvc.PluginController("UmbracoTrees")] [CoreTree] [LegacyBaseTree(typeof(loadNodeTypes))] - public class ContentTypeTreeController : TreeController + public class ContentTypeTreeController : TreeController, ISearchableTree { protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) { @@ -91,12 +95,19 @@ protected override MenuItemCollection GetMenuForNode(string id, FormDataCollecti menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionNew.Instance.Alias))); + menu.Items.Add(new MenuItem("rename", Services.TextService.Localize(String.Format("actions/{0}", "rename"))) + { + Icon = "icon icon-edit" + }); + if (container.HasChildren() == false) { //can delete doc type menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionDelete.Instance.Alias)), true); } - menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionRefresh.Instance.Alias)), true); + menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionRefresh.Instance.Alias)), true); + + } else { @@ -137,5 +148,11 @@ protected override MenuItemCollection GetMenuForNode(string id, FormDataCollecti return menu; } + + public IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null) + { + var results = Services.EntityService.GetPagedDescendantsFromRoot(UmbracoObjectTypes.DocumentType, pageIndex, pageSize, out totalFound, filter: query); + return Mapper.Map>(results); + } } } diff --git a/src/Umbraco.Web/Trees/DataTypeTreeController.cs b/src/Umbraco.Web/Trees/DataTypeTreeController.cs index 0baadaf6caed..70da27c1bfc9 100644 --- a/src/Umbraco.Web/Trees/DataTypeTreeController.cs +++ b/src/Umbraco.Web/Trees/DataTypeTreeController.cs @@ -5,6 +5,7 @@ using System.Net; using System.Net.Http.Formatting; using System.Web.Http; +using AutoMapper; using Umbraco.Core; using Umbraco.Core.Models; using Umbraco.Web.Models.Trees; @@ -14,6 +15,8 @@ using umbraco.BusinessLogic.Actions; using Umbraco.Core.Models.EntityBase; using Umbraco.Core.Services; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Search; using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees @@ -22,7 +25,7 @@ namespace Umbraco.Web.Trees [Tree(Constants.Applications.Developer, Constants.Trees.DataTypes, null, sortOrder:1)] [PluginController("UmbracoTrees")] [CoreTree] - public class DataTypeTreeController : TreeController + public class DataTypeTreeController : TreeController, ISearchableTree { protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) { @@ -102,12 +105,18 @@ protected override MenuItemCollection GetMenuForNode(string id, FormDataCollecti menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionNew.Instance.Alias))); + menu.Items.Add(new MenuItem("rename", Services.TextService.Localize(String.Format("actions/{0}", "rename"))) + { + Icon = "icon icon-edit" + }); + if (container.HasChildren() == false) { //can delete data type menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionDelete.Instance.Alias))); } - menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionRefresh.Instance.Alias)), hasSeparator: true); + menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionRefresh.Instance.Alias)), hasSeparator: true); + } else { @@ -123,5 +132,11 @@ protected override MenuItemCollection GetMenuForNode(string id, FormDataCollecti return menu; } + + public IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null) + { + var results = Services.EntityService.GetPagedDescendantsFromRoot(UmbracoObjectTypes.DataType, pageIndex, pageSize, out totalFound, filter: query); + return Mapper.Map>(results); + } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/FileSystemTreeController.cs b/src/Umbraco.Web/Trees/FileSystemTreeController.cs index 0d612b5d4ed4..4f414a941d90 100644 --- a/src/Umbraco.Web/Trees/FileSystemTreeController.cs +++ b/src/Umbraco.Web/Trees/FileSystemTreeController.cs @@ -1,18 +1,21 @@ using System; using System.IO; +using System.Linq; using System.Net.Http.Formatting; using umbraco.BusinessLogic.Actions; using Umbraco.Core; using Umbraco.Core.IO; -using Umbraco.Web.Models.Trees; using Umbraco.Core.Services; +using Umbraco.Web.Models.Trees; +using System.Web; namespace Umbraco.Web.Trees { public abstract class FileSystemTreeController : TreeController { - protected abstract string FilePath { get; } - protected abstract string FileSearchPattern { get; } + protected abstract IFileSystem2 FileSystem { get; } + protected abstract string[] Extensions { get; } + protected abstract string FileIcon { get; } /// /// Inheritors can override this method to modify the file node that is created. @@ -28,64 +31,39 @@ protected virtual void OnRenderFolderNode(ref TreeNode treeNode) { } protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) { - var orgPath = ""; - string path; - if (string.IsNullOrEmpty(id) == false && id != "-1") - { - orgPath = id; - path = IOHelper.MapPath(FilePath + "/" + orgPath); - orgPath += "/"; - } - else - { - path = IOHelper.MapPath(FilePath); - } + var path = string.IsNullOrEmpty(id) == false && id != Constants.System.Root.ToInvariantString() + ? HttpUtility.UrlDecode(id).TrimStart("/") + : ""; - var dirInfo = new DirectoryInfo(path); - var dirInfos = dirInfo.GetDirectories(); + var directories = FileSystem.GetDirectories(path); var nodes = new TreeNodeCollection(); - foreach (var dir in dirInfos) + foreach (var directory in directories) { - if ((dir.Attributes & FileAttributes.Hidden) != 0) - continue; - - var hasChildren = dir.GetFiles().Length > 0 || dir.GetDirectories().Length > 0; - var node = CreateTreeNode(orgPath + dir.Name, orgPath, queryStrings, dir.Name, "icon-folder", hasChildren); + var hasChildren = FileSystem.GetFiles(directory).Any() || FileSystem.GetDirectories(directory).Any(); + var name = Path.GetFileName(directory); + var node = CreateTreeNode(HttpUtility.UrlEncode(directory), path, queryStrings, name, "icon-folder", hasChildren); OnRenderFolderNode(ref node); - if (node != null) + if(node != null) nodes.Add(node); } //this is a hack to enable file system tree to support multiple file extension look-up //so the pattern both support *.* *.xml and xml,js,vb for lookups - var allowedExtensions = new string[0]; - var filterByMultipleExtensions = FileSearchPattern.Contains(","); - FileInfo[] fileInfo; - - if (filterByMultipleExtensions) + var files = FileSystem.GetFiles(path).Where(x => { - fileInfo = dirInfo.GetFiles(); - allowedExtensions = FileSearchPattern.ToLower().Split(','); - } - else - fileInfo = dirInfo.GetFiles(FileSearchPattern); + var extension = Path.GetExtension(x); + return extension != null && Extensions.Contains(extension.Trim('.'), StringComparer.InvariantCultureIgnoreCase); + }); - foreach (var file in fileInfo) + foreach (var file in files) { - if ((file.Attributes & FileAttributes.Hidden) != 0) - continue; - - if (filterByMultipleExtensions && Array.IndexOf(allowedExtensions, file.Extension.ToLower().Trim('.')) < 0) - continue; - - var withoutExt = Path.GetFileNameWithoutExtension(file.Name); - if (withoutExt.IsNullOrWhiteSpace()) - continue; - - var node = CreateTreeNode(orgPath + file.Name, orgPath, queryStrings, file.Name, "icon-file", false); + var withoutExt = Path.GetFileNameWithoutExtension(file); + if (withoutExt.IsNullOrWhiteSpace()) continue; + var name = Path.GetFileName(file); + var node = CreateTreeNode(HttpUtility.UrlEncode(file), path, queryStrings, name, FileIcon, false); OnRenderFileNode(ref node); if (node != null) nodes.Add(node); @@ -111,27 +89,22 @@ protected override MenuItemCollection GetMenuForNode(string id, FormDataCollecti return menu; } - string path; - if (string.IsNullOrEmpty(id) == false) - { - var orgPath = System.Web.HttpUtility.UrlDecode(id); - path = IOHelper.MapPath(FilePath + "/" + orgPath); - } - else - { - path = IOHelper.MapPath(FilePath); - } + var path = string.IsNullOrEmpty(id) == false && id != Constants.System.Root.ToInvariantString() + ? HttpUtility.UrlDecode(id).TrimStart("/") + : ""; + + var isFile = FileSystem.FileExists(path); + var isDirectory = FileSystem.DirectoryExists(path); - var dirInfo = new DirectoryInfo(path); - //check if it's a directory - if (dirInfo.Attributes == FileAttributes.Directory) + if (isDirectory) { //set the default to create menu.DefaultMenuAlias = ActionNew.Instance.Alias; //create action menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionNew.Instance.Alias))); - - var hasChildren = dirInfo.GetFiles().Length > 0 || dirInfo.GetDirectories().Length > 0; + + var hasChildren = FileSystem.GetFiles(path).Any() || FileSystem.GetDirectories(path).Any(); + //We can only delete folders if it doesn't have any children (folders or files) if (hasChildren == false) { @@ -142,10 +115,9 @@ protected override MenuItemCollection GetMenuForNode(string id, FormDataCollecti //refresh action menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionRefresh.Instance.Alias)), true); } - //if it's not a directory then we only allow to delete the item - else + else if (isFile) { - //delete action + //if it's not a directory then we only allow to delete the item menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionDelete.Instance.Alias))); } diff --git a/src/Umbraco.Web/Trees/FileSystemTreeController2.cs b/src/Umbraco.Web/Trees/FileSystemTreeController2.cs deleted file mode 100644 index d43d68ee7736..000000000000 --- a/src/Umbraco.Web/Trees/FileSystemTreeController2.cs +++ /dev/null @@ -1,127 +0,0 @@ -using System; -using System.IO; -using System.Linq; -using System.Net.Http.Formatting; -using umbraco.BusinessLogic.Actions; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.Services; -using Umbraco.Web.Models.Trees; -using System.Web; - -namespace Umbraco.Web.Trees -{ - public abstract class FileSystemTreeController2 : TreeController - { - protected abstract IFileSystem2 FileSystem { get; } - protected abstract string[] Extensions { get; } - protected abstract string FileIcon { get; } - - /// - /// Inheritors can override this method to modify the file node that is created. - /// - /// - protected virtual void OnRenderFileNode(ref TreeNode treeNode) { } - - /// - /// Inheritors can override this method to modify the folder node that is created. - /// - /// - protected virtual void OnRenderFolderNode(ref TreeNode treeNode) { } - - protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) - { - var path = string.IsNullOrEmpty(id) == false && id != Constants.System.Root.ToInvariantString() - ? HttpUtility.UrlDecode(id).TrimStart("/") - : ""; - - var directories = FileSystem.GetDirectories(path); - - var nodes = new TreeNodeCollection(); - foreach (var directory in directories) - { - var hasChildren = FileSystem.GetFiles(directory).Any() || FileSystem.GetDirectories(directory).Any(); - - var name = Path.GetFileName(directory); - var node = CreateTreeNode(HttpUtility.UrlEncode(directory), path, queryStrings, name, "icon-folder", hasChildren); - OnRenderFolderNode(ref node); - if(node != null) - nodes.Add(node); - } - - //this is a hack to enable file system tree to support multiple file extension look-up - //so the pattern both support *.* *.xml and xml,js,vb for lookups - var files = FileSystem.GetFiles(path).Where(x => - { - var extension = Path.GetExtension(x); - return extension != null && Extensions.Contains(extension.Trim('.'), StringComparer.InvariantCultureIgnoreCase); - }); - - foreach (var file in files) - { - var withoutExt = Path.GetFileNameWithoutExtension(file); - if (withoutExt.IsNullOrWhiteSpace()) continue; - - var name = Path.GetFileName(file); - var node = CreateTreeNode(HttpUtility.UrlEncode(file), path, queryStrings, name, FileIcon, false); - OnRenderFileNode(ref node); - if (node != null) - nodes.Add(node); - } - - return nodes; - } - - protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings) - { - var menu = new MenuItemCollection(); - - //if root node no need to visit the filesystem so lets just create the menu and return it - if (id == Constants.System.Root.ToInvariantString()) - { - //set the default to create - menu.DefaultMenuAlias = ActionNew.Instance.Alias; - //create action - menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionNew.Instance.Alias))); - //refresh action - menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionRefresh.Instance.Alias)), true); - - return menu; - } - - var path = string.IsNullOrEmpty(id) == false && id != Constants.System.Root.ToInvariantString() - ? HttpUtility.UrlDecode(id).TrimStart("/") - : ""; - - var isFile = FileSystem.FileExists(path); - var isDirectory = FileSystem.DirectoryExists(path); - - if (isDirectory) - { - //set the default to create - menu.DefaultMenuAlias = ActionNew.Instance.Alias; - //create action - menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionNew.Instance.Alias))); - - var hasChildren = FileSystem.GetFiles(path).Any() || FileSystem.GetDirectories(path).Any(); - - //We can only delete folders if it doesn't have any children (folders or files) - if (hasChildren == false) - { - //delete action - menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionDelete.Instance.Alias)), true); - } - - //refresh action - menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionRefresh.Instance.Alias)), true); - } - else if (isFile) - { - //if it's not a directory then we only allow to delete the item - menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionDelete.Instance.Alias))); - } - - return menu; - } - } -} diff --git a/src/Umbraco.Web/Trees/ISearchableTree.cs b/src/Umbraco.Web/Trees/ISearchableTree.cs deleted file mode 100644 index 680256f304c9..000000000000 --- a/src/Umbraco.Web/Trees/ISearchableTree.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Collections.Generic; -using Umbraco.Web.Models.ContentEditing; - -namespace Umbraco.Web.Trees -{ - public interface ISearchableTree - { - IEnumerable Search(string searchText); - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs b/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs index 1d142158e317..32a7ad5d9996 100644 --- a/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs +++ b/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs @@ -215,11 +215,7 @@ internal static Attempt GetUrlAndTitleFromLegacyAction(IAction new LegacyUrlAction( "dialogs/sort.aspx?id=" + nodeId + "&nodeType=" + nodeType + "&app=" + currentSection + "&rnd=" + DateTime.UtcNow.Ticks, ui.GetText("actions", "sort"))); - case "UmbClientMgr.appActions().actionRights()": - return Attempt.Succeed( - new LegacyUrlAction( - "dialogs/cruds.aspx?id=" + nodeId + "&rnd=" + DateTime.UtcNow.Ticks, - ui.GetText("actions", "rights"))); + case "UmbClientMgr.appActions().actionProtect()": return Attempt.Succeed( new LegacyUrlAction( @@ -265,11 +261,7 @@ internal static Attempt GetUrlAndTitleFromLegacyAction(IAction new LegacyUrlAction( "dialogs/sendToTranslation.aspx?id=" + nodeId + "&rnd=" + DateTime.UtcNow.Ticks, ui.GetText("actions", "sendToTranslate"))); - case "UmbClientMgr.appActions().actionEmptyTranscan()": - return Attempt.Succeed( - new LegacyUrlAction( - "dialogs/emptyTrashcan.aspx?type=" + currentSection, - ui.GetText("actions", "emptyTrashcan"))); + case "UmbClientMgr.appActions().actionImport()": return Attempt.Succeed( new LegacyUrlAction( @@ -285,16 +277,7 @@ internal static Attempt GetUrlAndTitleFromLegacyAction(IAction new LegacyUrlAction( "dialogs/viewAuditTrail.aspx?nodeId=" + nodeId + "&rnd=" + DateTime.UtcNow.Ticks, ui.GetText("actions", "auditTrail"))); - case "UmbClientMgr.appActions().actionMove()": - return Attempt.Succeed( - new LegacyUrlAction( - "dialogs/moveOrCopy.aspx?app=" + currentSection + "&mode=cut&id=" + nodeId + "&rnd=" + DateTime.UtcNow.Ticks, - ui.GetText("actions", "move"))); - case "UmbClientMgr.appActions().actionCopy()": - return Attempt.Succeed( - new LegacyUrlAction( - "dialogs/moveOrCopy.aspx?app=" + currentSection + "&mode=copy&id=" + nodeId + "&rnd=" + DateTime.UtcNow.Ticks, - ui.GetText("actions", "copy"))); + } return Attempt.Fail(); } diff --git a/src/Umbraco.Web/Trees/LegacyTreeParams.cs b/src/Umbraco.Web/Trees/LegacyTreeParams.cs index bf905a6f4c1d..09124e8689aa 100644 --- a/src/Umbraco.Web/Trees/LegacyTreeParams.cs +++ b/src/Umbraco.Web/Trees/LegacyTreeParams.cs @@ -15,13 +15,16 @@ public LegacyTreeParams() public LegacyTreeParams(IEnumerable> formCollection) { - var p = TreeRequestParams.FromDictionary(formCollection.ToDictionary(x => x.Key, x => x.Value)); - NodeKey = p.NodeKey; - StartNodeID = p.StartNodeID; - ShowContextMenu = p.ShowContextMenu; - IsDialog = p.IsDialog; - DialogMode = p.DialogMode; - FunctionToCall = p.FunctionToCall; + if (formCollection != null) + { + var p = TreeRequestParams.FromDictionary(formCollection.ToDictionary(x => x.Key, x => x.Value)); + NodeKey = p.NodeKey; + StartNodeID = p.StartNodeID; + ShowContextMenu = p.ShowContextMenu; + IsDialog = p.IsDialog; + DialogMode = p.DialogMode; + FunctionToCall = p.FunctionToCall; + } } public string NodeKey { get; set; } diff --git a/src/Umbraco.Web/Trees/MediaTreeController.cs b/src/Umbraco.Web/Trees/MediaTreeController.cs index ed72857a406d..99117b3b04b7 100644 --- a/src/Umbraco.Web/Trees/MediaTreeController.cs +++ b/src/Umbraco.Web/Trees/MediaTreeController.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http.Formatting; @@ -13,6 +14,8 @@ using Umbraco.Web.WebApi.Filters; using umbraco; using umbraco.BusinessLogic.Actions; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Search; using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees @@ -29,20 +32,11 @@ namespace Umbraco.Web.Trees [Tree(Constants.Applications.Media, Constants.Trees.Media)] [PluginController("UmbracoTrees")] [CoreTree] - public class MediaTreeController : ContentTreeControllerBase + [SearchableTree("searchResultFormatter", "configureMediaResult")] + public class MediaTreeController : ContentTreeControllerBase, ISearchableTree { - protected override TreeNode CreateRootNode(FormDataCollection queryStrings) - { - var node = base.CreateRootNode(queryStrings); - //if the user's start node is not default, then ensure the root doesn't have a menu - if (Security.CurrentUser.StartMediaId != Constants.System.Root) - { - node.MenuUrl = ""; - } - node.Name = ui.Text("sections", Constants.Trees.Media); - return node; - } - + private readonly UmbracoTreeSearcher _treeSearcher = new UmbracoTreeSearcher(); + protected override int RecycleBinId { get { return Constants.System.RecycleBinMedia; } @@ -53,9 +47,10 @@ protected override bool RecycleBinSmells get { return Services.MediaService.RecycleBinSmells(); } } - protected override int UserStartNode + private int[] _userStartNodes; + protected override int[] UserStartNodes { - get { return Security.CurrentUser.StartMediaId; } + get { return _userStartNodes ?? (_userStartNodes = Security.CurrentUser.CalculateMediaStartNodeIds(Services.EntityService)); } } /// @@ -99,9 +94,12 @@ protected override MenuItemCollection PerformGetMenuForNode(string id, FormDataC if (id == Constants.System.Root.ToInvariantString()) { - //if the user's start node is not the root then ensure the root menu is empty/doesn't exist - if (Security.CurrentUser.StartMediaId != Constants.System.Root) + // if the user's start node is not the root then the only menu item to display is refresh + if (UserStartNodes.Contains(Constants.System.Root) == false) { + menu.Items.Add( + Services.TextService.Localize(string.Concat("actions/", ActionRefresh.Instance.Alias)), + true); return menu; } @@ -122,6 +120,16 @@ protected override MenuItemCollection PerformGetMenuForNode(string id, FormDataC { throw new HttpResponseException(HttpStatusCode.NotFound); } + + //if the user has no path access for this node, all they can do is refresh + if (Security.CurrentUser.HasPathAccess(item, Services.EntityService, RecycleBinId) == false) + { + menu.Items.Add( + Services.TextService.Localize(string.Concat("actions/", ActionRefresh.Instance.Alias)), + true); + return menu; + } + //return a normal node menu: menu.Items.Add(ui.Text("actions", ActionNew.Instance.Alias)); menu.Items.Add(ui.Text("actions", ActionMove.Instance.Alias)); @@ -152,17 +160,12 @@ protected override UmbracoObjectTypes UmbracoObjectType protected override bool HasPathAccess(string id, FormDataCollection queryStrings) { var entity = GetEntityFromId(id); - if (entity == null) - { - return false; - } + return HasPathAccess(entity, queryStrings); + } - var media = Services.MediaService.GetById(entity.Id); - if (media == null) - { - return false; - } - return Security.CurrentUser.HasPathAccess(media); + public IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null) + { + return _treeSearcher.ExamineSearch(Umbraco, query, UmbracoEntityTypes.Media, pageSize, pageIndex, out totalFound, searchFrom); } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/MediaTypeTreeController.cs b/src/Umbraco.Web/Trees/MediaTypeTreeController.cs index e116e43825bb..c0fde0db923e 100644 --- a/src/Umbraco.Web/Trees/MediaTypeTreeController.cs +++ b/src/Umbraco.Web/Trees/MediaTypeTreeController.cs @@ -1,6 +1,8 @@ using System; +using System.Collections.Generic; using System.Linq; using System.Net.Http.Formatting; +using AutoMapper; using umbraco; using umbraco.BusinessLogic.Actions; using Umbraco.Core; @@ -9,6 +11,8 @@ using Umbraco.Web.Models.Trees; using Umbraco.Web.WebApi.Filters; using Umbraco.Core.Services; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Search; namespace Umbraco.Web.Trees { @@ -17,7 +21,7 @@ namespace Umbraco.Web.Trees [Mvc.PluginController("UmbracoTrees")] [CoreTree] [LegacyBaseTree(typeof(loadMediaTypes))] - public class MediaTypeTreeController : TreeController + public class MediaTypeTreeController : TreeController, ISearchableTree { protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) { @@ -47,7 +51,7 @@ protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection .OrderBy(entity => entity.Name) .Select(dt => { - var node = CreateTreeNode(dt, Constants.ObjectTypes.MediaTypeGuid, id, queryStrings, "icon-item-arrangement", + var node = CreateTreeNode(dt, Constants.ObjectTypes.MediaTypeGuid, id, queryStrings, "icon-thumbnails", //NOTE: Since 7.4+ child type creation is enabled by a config option. It defaults to on, but can be disabled if we decide to. //We need this check to keep supporting sites where childs have already been created. dt.HasChildren()); @@ -83,13 +87,20 @@ protected override MenuItemCollection GetMenuForNode(string id, FormDataCollecti menu.DefaultMenuAlias = ActionNew.Instance.Alias; menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionNew.Instance.Alias))); - + + menu.Items.Add(new MenuItem("rename", Services.TextService.Localize(String.Format("actions/{0}", "rename"))) + { + Icon = "icon icon-edit" + }); + if (container.HasChildren() == false) { //can delete doc type menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionDelete.Instance.Alias))); } menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionRefresh.Instance.Alias)), hasSeparator: true); + + } else { @@ -124,5 +135,11 @@ protected override MenuItemCollection GetMenuForNode(string id, FormDataCollecti return menu; } + + public IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null) + { + var results = Services.EntityService.GetPagedDescendantsFromRoot(UmbracoObjectTypes.MediaType, pageIndex, pageSize, out totalFound, filter: query); + return Mapper.Map>(results); + } } } diff --git a/src/Umbraco.Web/Trees/MemberTreeController.cs b/src/Umbraco.Web/Trees/MemberTreeController.cs index fe7aa8a68969..68f12ef6ca18 100644 --- a/src/Umbraco.Web/Trees/MemberTreeController.cs +++ b/src/Umbraco.Web/Trees/MemberTreeController.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Net; @@ -16,6 +17,8 @@ using Umbraco.Web.WebApi.Filters; using umbraco; using umbraco.BusinessLogic.Actions; +using Umbraco.Web.Models.ContentEditing; +using Umbraco.Web.Search; using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees @@ -30,7 +33,8 @@ namespace Umbraco.Web.Trees [Tree(Constants.Applications.Members, Constants.Trees.Members, null, sortOrder: 0)] [PluginController("UmbracoTrees")] [CoreTree] - public class MemberTreeController : TreeController + [SearchableTree("searchResultFormatter", "configureMemberResult")] + public class MemberTreeController : TreeController, ISearchableTree { public MemberTreeController() { @@ -38,6 +42,7 @@ public MemberTreeController() _isUmbracoProvider = _provider.IsUmbracoMembershipProvider(); } + private readonly UmbracoTreeSearcher _treeSearcher = new UmbracoTreeSearcher(); private readonly MembershipProvider _provider; private readonly bool _isUmbracoProvider; @@ -178,5 +183,10 @@ protected override MenuItemCollection GetMenuForNode(string id, FormDataCollecti return menu; } + + public IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null) + { + return _treeSearcher.ExamineSearch(Umbraco, query, UmbracoEntityTypes.Member, pageSize, pageIndex, out totalFound, searchFrom); + } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs b/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs index ba4724aeadee..6e77c12fbafd 100644 --- a/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs +++ b/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs @@ -1,6 +1,8 @@ -using Umbraco.Core; -using Umbraco.Core.IO; +using Umbraco.Core.IO; using Umbraco.Web.Models.Trees; +using Umbraco.Web.Mvc; +using Umbraco.Web.WebApi.Filters; +using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees { @@ -8,7 +10,10 @@ namespace Umbraco.Web.Trees /// Tree for displaying partial view macros in the developer app /// [Tree(Constants.Applications.Developer, "partialViewMacros", null, sortOrder: 6)] - public class PartialViewMacrosTreeController : FileSystemTreeController2 + [UmbracoTreeAuthorize(Constants.Trees.PartialViewMacros)] + [PluginController("UmbracoTrees")] + [CoreTree] + public class PartialViewMacrosTreeController : FileSystemTreeController { protected override IFileSystem2 FileSystem { diff --git a/src/Umbraco.Web/Trees/PartialViewsTreeController.cs b/src/Umbraco.Web/Trees/PartialViewsTreeController.cs index bf4ec65a2eaa..f301845fe1bc 100644 --- a/src/Umbraco.Web/Trees/PartialViewsTreeController.cs +++ b/src/Umbraco.Web/Trees/PartialViewsTreeController.cs @@ -1,6 +1,9 @@ -using Umbraco.Core; +using umbraco; using Umbraco.Core.IO; using Umbraco.Web.Models.Trees; +using Umbraco.Web.Mvc; +using Umbraco.Web.WebApi.Filters; +using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees { @@ -8,7 +11,10 @@ namespace Umbraco.Web.Trees /// Tree for displaying partial views in the settings app /// [Tree(Constants.Applications.Settings, "partialViews", null, sortOrder: 2)] - public class PartialViewsTreeController : FileSystemTreeController2 + [UmbracoTreeAuthorize(Constants.Trees.PartialViews)] + [PluginController("UmbracoTrees")] + [CoreTree] + public class PartialViewsTreeController : FileSystemTreeController { protected override IFileSystem2 FileSystem { diff --git a/src/Umbraco.Web/Trees/ScriptTreeController.cs b/src/Umbraco.Web/Trees/ScriptTreeController.cs index cb9954019b22..171688bd1a20 100644 --- a/src/Umbraco.Web/Trees/ScriptTreeController.cs +++ b/src/Umbraco.Web/Trees/ScriptTreeController.cs @@ -1,11 +1,18 @@ -using Umbraco.Core; +using umbraco; using Umbraco.Core.IO; using Umbraco.Web.Models.Trees; +using Umbraco.Web.Mvc; +using Umbraco.Web.WebApi.Filters; +using Constants = Umbraco.Core.Constants; namespace Umbraco.Web.Trees { + [UmbracoTreeAuthorize(Constants.Trees.Scripts)] [Tree(Constants.Applications.Settings, "scripts", null, sortOrder: 4)] - public class ScriptTreeController : FileSystemTreeController2 + [LegacyBaseTree(typeof(loadScripts))] + [PluginController("UmbracoTrees")] + [CoreTree] + public class ScriptTreeController : FileSystemTreeController { protected override IFileSystem2 FileSystem { diff --git a/src/Umbraco.Web/Trees/TemplatesTreeController.cs b/src/Umbraco.Web/Trees/TemplatesTreeController.cs index 3869f58a2ad7..33ce91cf6dae 100644 --- a/src/Umbraco.Web/Trees/TemplatesTreeController.cs +++ b/src/Umbraco.Web/Trees/TemplatesTreeController.cs @@ -6,14 +6,17 @@ using System.Linq; using System.Net.Http.Formatting; using System.Web.Services.Description; +using AutoMapper; using umbraco; using umbraco.BusinessLogic.Actions; using umbraco.cms.businesslogic.template; using Umbraco.Core; using Umbraco.Core.Configuration; using Umbraco.Core.Models; +using Umbraco.Web.Models.ContentEditing; using Umbraco.Web.Models.Trees; using Umbraco.Web.Mvc; +using Umbraco.Web.Search; using Umbraco.Web.WebApi.Filters; using Constants = Umbraco.Core.Constants; @@ -24,7 +27,7 @@ namespace Umbraco.Web.Trees [Tree(Constants.Applications.Settings, Constants.Trees.Templates, null, sortOrder:1)] [PluginController("UmbracoTrees")] [CoreTree] - public class TemplatesTreeController : TreeController + public class TemplatesTreeController : TreeController, ISearchableTree { /// /// The method called to render the contents of the tree structure @@ -91,10 +94,7 @@ protected override MenuItemCollection GetMenuForNode(string id, FormDataCollecti if (template.IsMasterTemplate == false) { //add delete option if it doesn't have children - menu.Items.Add(ui.Text("actions", ActionDelete.Instance.Alias), true) - //Since we haven't implemented anything for languages in angular, this needs to be converted to - //use the legacy format - .ConvertLegacyMenuItem(entity, "templates", queryStrings.GetValue("application")); + menu.Items.Add(ui.Text("actions", ActionDelete.Instance.Alias), true); } //add refresh @@ -129,5 +129,11 @@ private string GetEditorPath(ITemplate template, FormDataCollection queryStrings Uri.EscapeDataString("settings/editTemplate.aspx?templateID=" + template.Id) : null; } + + public IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null) + { + var results = Services.EntityService.GetPagedDescendantsFromRoot(UmbracoObjectTypes.Template, pageIndex, pageSize, out totalFound, filter: query); + return Mapper.Map>(results); + } } } diff --git a/src/Umbraco.Web/Trees/TreeController.cs b/src/Umbraco.Web/Trees/TreeController.cs index 0f975a986092..47d5454dcd4a 100644 --- a/src/Umbraco.Web/Trees/TreeController.cs +++ b/src/Umbraco.Web/Trees/TreeController.cs @@ -40,22 +40,7 @@ protected TreeController(UmbracoContext umbracoContext, UmbracoHelper umbracoHel /// public override string RootNodeDisplayName { - get - { - - //if title is defined, return that - if(string.IsNullOrEmpty(_attribute.Title) == false) - return _attribute.Title; - - - //try to look up a tree header matching the tree alias - var localizedLabel = Services.TextService.Localize("treeHeaders/" + _attribute.Alias); - if (string.IsNullOrEmpty(localizedLabel) == false) - return localizedLabel; - - //is returned to signal that a label was not found - return "[" + _attribute.Alias + "]"; - } + get { return _attribute.GetRootNodeDisplayName(Services.TextService); } } /// @@ -68,19 +53,7 @@ public override string TreeAlias private void Initialize() { - //Locate the tree attribute - var treeAttributes = GetType() - .GetCustomAttributes(typeof(TreeAttribute), false) - .OfType() - .ToArray(); - - if (treeAttributes.Any() == false) - { - throw new InvalidOperationException("The Tree controller is missing the " + typeof(TreeAttribute).FullName + " attribute"); - } - - //assign the properties of this object to those of the metadata attribute - _attribute = treeAttributes.First(); + _attribute = GetType().GetTreeAttribute(); } } } diff --git a/src/Umbraco.Web/Trees/TreeControllerBase.cs b/src/Umbraco.Web/Trees/TreeControllerBase.cs index 751f83db1644..4547e5e32d27 100644 --- a/src/Umbraco.Web/Trees/TreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/TreeControllerBase.cs @@ -9,6 +9,7 @@ using Umbraco.Web.WebApi.Filters; using Umbraco.Core.Models; using Umbraco.Core.Models.EntityBase; +using Umbraco.Web.Search; namespace Umbraco.Web.Trees { diff --git a/src/Umbraco.Web/Trees/UserTreeController.cs b/src/Umbraco.Web/Trees/UserTreeController.cs new file mode 100644 index 000000000000..8b70be9c952f --- /dev/null +++ b/src/Umbraco.Web/Trees/UserTreeController.cs @@ -0,0 +1,59 @@ +using System.Net.Http.Formatting; +using umbraco; +using Umbraco.Web.Models.Trees; +using Umbraco.Web.Mvc; +using Umbraco.Web.WebApi.Filters; +using Constants = Umbraco.Core.Constants; + +namespace Umbraco.Web.Trees +{ + [UmbracoTreeAuthorize(Constants.Trees.Users)] + [Tree(Constants.Applications.Users, Constants.Trees.Users, null, sortOrder: 0)] + [PluginController("UmbracoTrees")] + [LegacyBaseTree(typeof(loadUsers))] + [CoreTree] + public class UserTreeController : TreeController + { + public UserTreeController() + { + } + + public UserTreeController(UmbracoContext umbracoContext) : base(umbracoContext) + { + } + + public UserTreeController(UmbracoContext umbracoContext, UmbracoHelper umbracoHelper) : base(umbracoContext, umbracoHelper) + { + } + + /// + /// Helper method to create a root model for a tree + /// + /// + protected override TreeNode CreateRootNode(FormDataCollection queryStrings) + { + var root = base.CreateRootNode(queryStrings); + + //this will load in a custom UI instead of the dashboard for the root node + root.RoutePath = string.Format("{0}/{1}/{2}", Constants.Applications.Users, Constants.Trees.Users, "overview"); + root.Icon = "icon-users"; + + root.HasChildren = false; + return root; + } + + protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) + { + var baseUrl = Constants.Applications.Users + "/users/"; + + var nodes = new TreeNodeCollection(); + return nodes; + } + + protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings) + { + var menu = new MenuItemCollection(); + return menu; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/UI/LegacyDialogHandler.cs b/src/Umbraco.Web/UI/LegacyDialogHandler.cs index dfa7fbc15329..c51a8bb08bdc 100644 --- a/src/Umbraco.Web/UI/LegacyDialogHandler.cs +++ b/src/Umbraco.Web/UI/LegacyDialogHandler.cs @@ -125,6 +125,10 @@ private static ITask GetTaskForOperation(HttpContextBase httpContext, User umbra internal static bool UserHasCreateAccess(HttpContextBase httpContext, User umbracoUser, string nodeType) { var task = GetTaskForOperation(httpContext, umbracoUser, Operation.Create, nodeType); + if (task == null) + throw new InvalidOperationException( + string.Format("Could not task for operation {0} for node type {1}", Operation.Create, nodeType)); + var dialogTask = task as LegacyDialogTask; if (dialogTask != null) { @@ -149,6 +153,10 @@ internal static bool UserHasCreateAccess(HttpContextBase httpContext, User umbra internal static bool UserHasDeleteAccess(HttpContextBase httpContext, User umbracoUser, string nodeType) { var task = GetTaskForOperation(httpContext, umbracoUser, Operation.Delete, nodeType); + if (task == null) + throw new InvalidOperationException( + string.Format("Could not task for operation {0} for node type {1}", Operation.Delete, nodeType)); + var dialogTask = task as LegacyDialogTask; if (dialogTask != null) { @@ -160,7 +168,10 @@ internal static bool UserHasDeleteAccess(HttpContextBase httpContext, User umbra public static void Delete(HttpContextBase httpContext, User umbracoUser, string nodeType, int nodeId, string text) { var typeInstance = GetTaskForOperation(httpContext, umbracoUser, Operation.Delete, nodeType); - + if (typeInstance == null) + throw new InvalidOperationException( + string.Format("Could not task for operation {0} for node type {1}", Operation.Delete, nodeType)); + typeInstance.ParentID = nodeId; typeInstance.Alias = text; @@ -170,7 +181,10 @@ public static void Delete(HttpContextBase httpContext, User umbracoUser, string public static string Create(HttpContextBase httpContext, User umbracoUser, string nodeType, int nodeId, string text, int typeId = 0) { var typeInstance = GetTaskForOperation(httpContext, umbracoUser, Operation.Create, nodeType); - + if (typeInstance == null) + throw new InvalidOperationException( + string.Format("Could not task for operation {0} for node type {1}", Operation.Create, nodeType)); + typeInstance.TypeID = typeId; typeInstance.ParentID = nodeId; typeInstance.Alias = text; @@ -187,6 +201,9 @@ public static string Create(HttpContextBase httpContext, User umbracoUser, strin internal static string Create(HttpContextBase httpContext, User umbracoUser, string nodeType, int nodeId, string text, IDictionary additionalValues, int typeId = 0) { var typeInstance = GetTaskForOperation(httpContext, umbracoUser, Operation.Create, nodeType); + if (typeInstance == null) + throw new InvalidOperationException( + string.Format("Could not task for operation {0} for node type {1}", Operation.Create, nodeType)); typeInstance.TypeID = typeId; typeInstance.ParentID = nodeId; diff --git a/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs b/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs index c09fd0fa0c9a..c78f66ab9706 100644 --- a/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs +++ b/src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs @@ -7,7 +7,9 @@ using umbraco; using umbraco.BusinessLogic; using umbraco.businesslogic.Exceptions; +using umbraco.interfaces; using Umbraco.Core; +using Umbraco.Core.Models; using Umbraco.Core.Security; namespace Umbraco.Web.UI.Pages @@ -32,6 +34,40 @@ public UmbracoEnsuredPage() } } + /// + /// Performs an authorization check for the user against the requested entity/path and permission set, this is only relevant to content and media + /// + /// + /// + /// + protected void CheckPathAndPermissions(int entityId, UmbracoObjectTypes objectType, IAction actionToCheck) + { + if (objectType == UmbracoObjectTypes.Document || objectType == UmbracoObjectTypes.Media) + { + //check path access + + var entity = entityId == Constants.System.Root + ? UmbracoEntity.Root + : Services.EntityService.Get( + entityId, + objectType); + var hasAccess = Security.CurrentUser.HasPathAccess( + entity, + Services.EntityService, + objectType == UmbracoObjectTypes.Document ? Constants.System.RecycleBinContent : Constants.System.RecycleBinMedia); + if (hasAccess == false) + throw new UserAuthorizationException(string.Format("The current user doesn't have access to the path '{0}'", entity.Path)); + + //only documents have action permissions + if (objectType == UmbracoObjectTypes.Document) + { + var allowedActions = ActionsResolver.Current.FromActionSymbols(Security.CurrentUser.GetPermissions(entity.Path, Services.UserService)).ToArray(); + if (allowedActions.Contains(actionToCheck) == false) + throw new UserAuthorizationException(string.Format("The current user doesn't have permission to {0} on the path '{1}'", actionToCheck.Alias, entity.Path)); + } + } + } + private bool _hasValidated = false; /// diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 0eb3a2a27c54..c86b86db3093 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -109,16 +109,11 @@ ..\packages\ClientDependency.1.9.2\lib\net45\ClientDependency.Core.dll True - - ..\packages\xmlrpcnet.2.5.0\lib\net20\CookComputing.XmlRpcV2.dll - True - ..\packages\dotless.1.5.2\lib\dotless.Core.dll - - ..\packages\Examine.0.1.83\lib\net45\Examine.dll - True + + ..\packages\Examine.0.1.85\lib\net45\Examine.dll ..\packages\HtmlAgilityPack.1.4.9.5\lib\Net45\HtmlAgilityPack.dll @@ -149,25 +144,20 @@ True - - ..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll - True + + ..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll - - ..\packages\Microsoft.Owin.Host.SystemWeb.3.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll - True + + ..\packages\Microsoft.Owin.Host.SystemWeb.3.1.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll - - ..\packages\Microsoft.Owin.Security.3.0.1\lib\net45\Microsoft.Owin.Security.dll - True + + ..\packages\Microsoft.Owin.Security.3.1.0\lib\net45\Microsoft.Owin.Security.dll - - ..\packages\Microsoft.Owin.Security.Cookies.3.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll - True + + ..\packages\Microsoft.Owin.Security.Cookies.3.1.0\lib\net45\Microsoft.Owin.Security.Cookies.dll - - ..\packages\Microsoft.Owin.Security.OAuth.3.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll - True + + ..\packages\Microsoft.Owin.Security.OAuth.3.1.0\lib\net45\Microsoft.Owin.Security.OAuth.dll ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll @@ -304,15 +294,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + @@ -330,18 +350,28 @@ + + + + + + + + + + @@ -360,17 +390,30 @@ + + + + + + + + + + + + + @@ -402,7 +445,11 @@ + + + + @@ -412,6 +459,9 @@ + + + @@ -419,7 +469,13 @@ + + + + + + @@ -434,8 +490,10 @@ + + + - @@ -471,29 +529,7 @@ - - - - - - - - - - - - - - - - - - - - - - - + @@ -509,7 +545,7 @@ - + @@ -566,7 +602,7 @@ - + @@ -713,7 +749,7 @@ - + @@ -729,22 +765,12 @@ ASPXCodeBehind - - ASPXCodeBehind - ASPXCodeBehind - - ASPXCodeBehind - - ASPXCodeBehind - - ASPXCodeBehind - @@ -756,8 +782,10 @@ + + @@ -772,6 +800,7 @@ + @@ -814,7 +843,7 @@ - + @@ -843,7 +872,7 @@ - + @@ -949,9 +978,6 @@ - - ASPXCodeBehind - ASPXCodeBehind @@ -964,15 +990,9 @@ ASPXCodeBehind - - ASPXCodeBehind - ASPXCodeBehind - - ASPXCodeBehind - AssignDomain2.aspx ASPXCodeBehind @@ -980,9 +1000,6 @@ AssignDomain2.aspx - - ASPXCodeBehind - ASPXCodeBehind @@ -1122,25 +1139,9 @@ - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - ASPXCodeBehind - - ASPXCodeBehind - - - ASPXCodeBehind - - ASPXCodeBehind @@ -1159,8 +1160,6 @@ ASPXCodeBehind - - ASPXCodeBehind @@ -1189,9 +1188,6 @@ ASPXCodeBehind - - ASPXCodeBehind - ASPXCodeBehind @@ -1230,6 +1226,8 @@ + + @@ -1340,31 +1338,12 @@ publish.aspx - - - - - - - - ASPXCodeBehind - - ImageViewerUpdater.asmx - Component - - - UploadMediaImage.ascx - ASPXCodeBehind - - - UploadMediaImage.ascx - @@ -1390,14 +1369,10 @@ - - - - FeedProxy.aspx @@ -1465,13 +1440,6 @@ insertMasterpagePlaceholder.aspx - - mediaPicker.aspx - ASPXCodeBehind - - - mediaPicker.aspx - republish.aspx ASPXCodeBehind @@ -1499,13 +1467,6 @@ Code - - LatestEdits.ascx - ASPXCodeBehind - - - LatestEdits.ascx - assemblyBrowser.aspx ASPXCodeBehind @@ -1513,13 +1474,6 @@ assemblyBrowser.aspx - - autoDoc.aspx - ASPXCodeBehind - - - autoDoc.aspx - editPackage.aspx ASPXCodeBehind @@ -1545,42 +1499,14 @@ xsltInsertValueOf.aspx - - about.aspx - ASPXCodeBehind - - - about.aspx - exportDocumenttype.aspx ASPXCodeBehind - - imageViewer.aspx - ASPXCodeBehind - - - imageViewer.aspx - importDocumenttype.aspx ASPXCodeBehind - - insertMacro.aspx - ASPXCodeBehind - - - insertMacro.aspx - - - insertTable.aspx - ASPXCodeBehind - - - insertTable.aspx - notifications.aspx ASPXCodeBehind @@ -1588,13 +1514,6 @@ notifications.aspx - - RegexWs.aspx - ASPXCodeBehind - - - RegexWs.aspx - rollBack.aspx ASPXCodeBehind @@ -1609,13 +1528,6 @@ sendToTranslation.aspx - - uploadImage.aspx - ASPXCodeBehind - - - uploadImage.aspx - viewAuditTrail.aspx ASPXCodeBehind @@ -1623,13 +1535,6 @@ viewAuditTrail.aspx - - language.aspx - ASPXCodeBehind - - - language.aspx - EditMemberGroup.aspx ASPXCodeBehind @@ -1658,41 +1563,6 @@ - - InsertAnchor.aspx - ASPXCodeBehind - - - InsertAnchor.aspx - - - insertChar.aspx - ASPXCodeBehind - - - insertChar.aspx - - - insertImage.aspx - ASPXCodeBehind - - - insertImage.aspx - - - insertLink.aspx - ASPXCodeBehind - - - insertLink.aspx - - - insertMacro.aspx - ASPXCodeBehind - - - insertMacro.aspx - @@ -1727,10 +1597,6 @@ editLanguage.aspx - - editScript.aspx - ASPXCodeBehind - @@ -1755,9 +1621,6 @@ MacroContainerService.asmx Component - - MediaUploader.ashx - TagsAutoCompleteHandler.ashx @@ -1840,39 +1703,10 @@ - - XmlTree.xsd - - EditUserType.aspx - ASPXCodeBehind - - - EditUserType.aspx - - - NodePermissions.ascx - ASPXCodeBehind - - - NodePermissions.ascx - - - PermissionEditor.aspx - ASPXCodeBehind - - - PermissionEditor.aspx - - - PermissionsHandler.asmx - Component - - - CacheRefresher.asmx @@ -1890,10 +1724,6 @@ codeEditorSave.asmx Component - - Developer.asmx - Component - legacyAjaxCalls.asmx Component @@ -1911,21 +1741,6 @@ Component - - Settings.asmx - Component - - - templates.asmx - Component - - - trashcan.asmx - Component - - - UltimatePickerAutoCompleteHandler.ashx - ASPXCodeBehind @@ -1957,9 +1772,6 @@ uQuery.cs - - - @@ -1977,7 +1789,6 @@ - @@ -2016,69 +1827,39 @@ ASPXCodeBehind - - - ASPXCodeBehind - - + + ASPXCodeBehind + ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - ASPXCodeBehind - - ASPXCodeBehind - - ASPXCodeBehind - - - - ASPXCodeBehind - - ASPXCodeBehind - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - @@ -2094,34 +1875,17 @@ - - ASPXCodeBehind - - - ASPXCodeBehind - - ASPXCodeBehind - - ASPXCodeBehind - - - ASPXCodeBehind - - - - ASPXCodeBehind - Form @@ -2132,27 +1896,18 @@ ASPXCodeBehind - - ASPXCodeBehind - Form - Form - - Form - - - @@ -2163,8 +1918,6 @@ XmlTree.xsd - - @@ -2180,10 +1933,6 @@ ResXFileCodeGenerator Strings.Designer.cs - - language.aspx.cs - Designer - ResXFileCodeGenerator Resources.Designer.cs @@ -2233,7 +1982,9 @@ umbraco_org_umbraco_update_CheckForUpgrade - + + + 11.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v11.0 @@ -2254,6 +2005,5 @@ - \ No newline at end of file diff --git a/src/Umbraco.Web/UmbracoContext.cs b/src/Umbraco.Web/UmbracoContext.cs index 90f4e4df03e8..dbb165a526aa 100644 --- a/src/Umbraco.Web/UmbracoContext.cs +++ b/src/Umbraco.Web/UmbracoContext.cs @@ -259,7 +259,7 @@ internal UmbracoContext( var requestUrl = new Uri("http://localhost"); var request = GetRequestFromContext(); - if (request != null) + if (request != null && request.Url != null) { requestUrl = request.Url; } diff --git a/src/Umbraco.Web/UmbracoDefaultOwinStartup.cs b/src/Umbraco.Web/UmbracoDefaultOwinStartup.cs index c11252d2ca7b..5773d88f739d 100644 --- a/src/Umbraco.Web/UmbracoDefaultOwinStartup.cs +++ b/src/Umbraco.Web/UmbracoDefaultOwinStartup.cs @@ -37,12 +37,7 @@ public virtual void Configuration(IAppBuilder app) protected virtual void ConfigureServices(IAppBuilder app) { app.SetUmbracoLoggerFactory(); - - //Configure the Identity user manager for use with Umbraco Back office - // (EXPERT: an overload accepts a custom BackOfficeUserStore implementation) - app.ConfigureUserManagerForUmbracoBackOffice( - ApplicationContext, - Core.Security.MembershipProviderExtensions.GetUsersMembershipProvider().AsUmbracoMembershipProvider()); + ConfigureUmbracoUserManager(app); } /// @@ -62,7 +57,19 @@ protected virtual void ConfigureMiddleware(IAppBuilder app) } /// - /// Raised when the middelware has been configured + /// Configure the Identity user manager for use with Umbraco Back office + /// + /// + protected virtual void ConfigureUmbracoUserManager(IAppBuilder app) + { + // (EXPERT: an overload accepts a custom BackOfficeUserStore implementation) + app.ConfigureUserManagerForUmbracoBackOffice( + ApplicationContext, + Core.Security.MembershipProviderExtensions.GetUsersMembershipProvider().AsUmbracoMembershipProvider()); + } + + /// + /// Raised when the middleware has been configured /// public static event EventHandler MiddlewareConfigured; diff --git a/src/Umbraco.Web/UmbracoHelper.cs b/src/Umbraco.Web/UmbracoHelper.cs index 6f3da1725432..d94476b31c4e 100644 --- a/src/Umbraco.Web/UmbracoHelper.cs +++ b/src/Umbraco.Web/UmbracoHelper.cs @@ -433,7 +433,7 @@ public bool IsProtected(int documentId, string path) /// True if the document object is protected public bool IsProtected(string path) { - return UmbracoContext.Application.Services.PublicAccessService.IsProtected(path); + return MembershipHelper.IsProtected(path); } [EditorBrowsable(EditorBrowsableState.Never)] @@ -450,25 +450,7 @@ public bool MemberHasAccess(int nodeId, string path) /// True if the current user has access or if the current document isn't protected public bool MemberHasAccess(string path) { - if (IsProtected(path)) - { - return MembershipHelper.IsLoggedIn() - && UmbracoContext.Application.Services.PublicAccessService.HasAccess(path, GetCurrentMember(), Roles.Provider); - } - return true; - } - - /// - /// Gets (or adds) the current member from the current request cache - /// - private MembershipUser GetCurrentMember() - { - return UmbracoContext.Application.ApplicationCache.RequestCache - .GetCacheItem("UmbracoHelper.GetCurrentMember", () => - { - var provider = Core.Security.MembershipProviderExtensions.GetMembersMembershipProvider(); - return provider.GetCurrentUser(); - }); + return MembershipHelper.MemberHasAccess(path); } /// @@ -535,10 +517,10 @@ public string NiceUrlWithDomain(int nodeId) public string UrlAbsolute(int contentId) { return UrlProvider.GetUrl(contentId, true); - } - + } + #endregion - + #region Members public IPublishedContent TypedMember(Udi id) @@ -551,7 +533,7 @@ public IPublishedContent TypedMember(Udi id) public IPublishedContent TypedMember(Guid id) { return MembershipHelper.GetByProviderKey(id); - } + } public IPublishedContent TypedMember(object id) { @@ -638,7 +620,7 @@ public IPublishedContent TypedContent(Guid id) { return ContentQuery.TypedContent(id); } - + /// /// Gets a content item from the cache /// @@ -986,10 +968,10 @@ private static bool ConvertIdsObjectToGuids(IEnumerable ids, out IEnumer } guidIds = list; return true; - } - + } + #endregion - + #region Media public IPublishedContent TypedMedia(Udi id) @@ -1000,15 +982,15 @@ public IPublishedContent TypedMedia(Udi id) } public IPublishedContent TypedMedia(Guid id) - { - //TODO: This is horrible but until the media cache properly supports GUIDs we have no choice here and - // currently there won't be any way to add this method correctly to `ITypedPublishedContentQuery` without breaking an interface and adding GUID support for media - + { + //TODO: This is horrible but until the media cache properly supports GUIDs we have no choice here and + // currently there won't be any way to add this method correctly to `ITypedPublishedContentQuery` without breaking an interface and adding GUID support for media + var entityService = UmbracoContext.Application.Services.EntityService; var mediaAttempt = entityService.GetIdForKey(id, UmbracoObjectTypes.Media); return mediaAttempt.Success ? ContentQuery.TypedMedia(mediaAttempt.Result) : null; - } - + } + /// /// Overloaded method accepting an 'object' type /// @@ -1036,8 +1018,8 @@ private IPublishedContent TypedMediaForObject(object id) if (ConvertIdObjectToUdi(id, out udiId)) return TypedMedia(udiId); return null; - } - + } + public IPublishedContent TypedMedia(int id) { return ContentQuery.TypedMedia(id); @@ -1457,18 +1439,58 @@ public IHtmlString Truncate(string html, int length, bool addElipsis) /// public IHtmlString Truncate(string html, int length, bool addElipsis, bool treatTagsAsContent) { - return _stringUtilities.Truncate(html, length, addElipsis, treatTagsAsContent); - } + return _stringUtilities.Truncate(html, length, addElipsis, treatTagsAsContent); + } + #region Truncate by Words + /// + /// Truncates a string to a given amount of words, can add a elipsis at the end (...). Method checks for open html tags, and makes sure to close them + /// + public IHtmlString TruncateByWords(string html, int words) + { + int length = _stringUtilities.WordsToLength(html, words); - #endregion + return Truncate(html, length, true, false); + } - #region If + /// + /// Truncates a string to a given amount of words, can add a elipsis at the end (...). Method checks for open html tags, and makes sure to close them + /// + public IHtmlString TruncateByWords(string html, int words, bool addElipsis) + { + int length = _stringUtilities.WordsToLength(html, words); - /// - /// If the test is true, the string valueIfTrue will be returned, otherwise the valueIfFalse will be returned. - /// - public HtmlString If(bool test, string valueIfTrue, string valueIfFalse) + return Truncate(html, length, addElipsis, false); + } + + /// + /// Truncates a string to a given amount of words, can add a elipsis at the end (...). Method checks for open html tags, and makes sure to close them + /// + public IHtmlString TruncateByWords(IHtmlString html, int words) + { + int length = _stringUtilities.WordsToLength(html.ToHtmlString(), words); + + return Truncate(html, length, true, false); + } + + /// + /// Truncates a string to a given amount of words, can add a elipsis at the end (...). Method checks for open html tags, and makes sure to close them + /// + public IHtmlString TruncateByWords(IHtmlString html, int words, bool addElipsis) + { + int length = _stringUtilities.WordsToLength(html.ToHtmlString(), words); + + return Truncate(html, length, addElipsis, false); + } + #endregion + #endregion + + #region If + + /// + /// If the test is true, the string valueIfTrue will be returned, otherwise the valueIfFalse will be returned. + /// + public HtmlString If(bool test, string valueIfTrue, string valueIfFalse) { return test ? new HtmlString(valueIfTrue) : new HtmlString(valueIfFalse); } diff --git a/src/Umbraco.Web/WebApi/AngularJsonMediaTypeFormatter.cs b/src/Umbraco.Web/WebApi/AngularJsonMediaTypeFormatter.cs index 66a79376aa67..8dca204597d7 100644 --- a/src/Umbraco.Web/WebApi/AngularJsonMediaTypeFormatter.cs +++ b/src/Umbraco.Web/WebApi/AngularJsonMediaTypeFormatter.cs @@ -21,6 +21,8 @@ namespace Umbraco.Web.WebApi public class AngularJsonMediaTypeFormatter : JsonMediaTypeFormatter { + public const string XsrfPrefix = ")]}',\n"; + /// /// This will prepend the special chars to the stream output that angular will strip /// @@ -30,24 +32,25 @@ public class AngularJsonMediaTypeFormatter : JsonMediaTypeFormatter /// /// /// - public override Task WriteToStreamAsync(Type type, object value, Stream writeStream, HttpContent content, TransportContext transportContext) + public override async Task WriteToStreamAsync(Type type, object value, Stream writeStream, HttpContent content, TransportContext transportContext) { - if (type == null) throw new ArgumentNullException("type"); if (writeStream == null) throw new ArgumentNullException("writeStream"); var effectiveEncoding = SelectCharacterEncoding(content == null ? null : content.Headers); - using (var streamWriter = new StreamWriter(writeStream, effectiveEncoding)) + using (var streamWriter = new StreamWriter(writeStream, effectiveEncoding, + //we are only writing a few chars so we don't need to allocate a large buffer + 128, + //this is important! We don't want to close the stream, the base class is in charge of stream management, we just want to write to it. + leaveOpen:true)) { //write the special encoding for angular json to the start // (see: http://docs.angularjs.org/api/ng.$http) - streamWriter.Write(")]}',\n"); + streamWriter.Write(XsrfPrefix); streamWriter.Flush(); - return base.WriteToStreamAsync(type, value, writeStream, content, transportContext); + await base.WriteToStreamAsync(type, value, writeStream, content, transportContext); } - - } } diff --git a/src/Umbraco.Web/WebApi/EnableDetailedErrorsAttribute.cs b/src/Umbraco.Web/WebApi/EnableDetailedErrorsAttribute.cs new file mode 100644 index 000000000000..1d35d19134fe --- /dev/null +++ b/src/Umbraco.Web/WebApi/EnableDetailedErrorsAttribute.cs @@ -0,0 +1,17 @@ +using System.Web.Http; +using System.Web.Http.Controllers; +using System.Web.Http.Filters; + +namespace Umbraco.Web.WebApi +{ + /// + /// Ensures controllers have detailed error messages even when debug mode is off + /// + public class EnableDetailedErrorsAttribute : ActionFilterAttribute + { + public override void OnActionExecuting(HttpActionContext actionContext) + { + actionContext.ControllerContext.Configuration.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always; + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/WebApi/Filters/AngularAntiForgeryHelper.cs b/src/Umbraco.Web/WebApi/Filters/AngularAntiForgeryHelper.cs index 962183f7ef66..dfeeee536d7d 100644 --- a/src/Umbraco.Web/WebApi/Filters/AngularAntiForgeryHelper.cs +++ b/src/Umbraco.Web/WebApi/Filters/AngularAntiForgeryHelper.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; -using System.Collections.Specialized; using System.Linq; -using System.Net.Http; using System.Net.Http.Headers; using System.Web.Helpers; using Umbraco.Core; @@ -18,19 +16,17 @@ public static class AngularAntiForgeryHelper /// /// The cookie name that is used to store the validation value /// - public const string CsrfValidationCookieName = "XSRF-V"; + public const string CsrfValidationCookieName = "UMB-XSRF-V"; /// - /// The cookie name that is set for angular to use to pass in to the header value for "X-XSRF-TOKEN" + /// The cookie name that is set for angular to use to pass in to the header value for "X-UMB-XSRF-TOKEN" /// - public const string AngularCookieName = "XSRF-TOKEN"; + public const string AngularCookieName = "UMB-XSRF-TOKEN"; /// /// The header name that angular uses to pass in the token to validate the cookie /// - public const string AngularHeadername = "X-XSRF-TOKEN"; - - + public const string AngularHeadername = "X-UMB-XSRF-TOKEN"; /// /// Returns 2 tokens - one for the cookie value and one that angular should set as the header value @@ -68,8 +64,8 @@ public static bool ValidateTokens(string cookieToken, string headerToken) return true; } - internal static bool ValidateHeaders( - KeyValuePair>[] requestHeaders, + internal static bool ValidateHeaders( + KeyValuePair>[] requestHeaders, string cookieToken, out string failedReason) { @@ -86,7 +82,7 @@ internal static bool ValidateHeaders( .Select(z => z.Value) .SelectMany(z => z) .FirstOrDefault(); - + // both header and cookie must be there if (cookieToken == null || headerToken == null) { @@ -111,15 +107,13 @@ internal static bool ValidateHeaders( /// public static bool ValidateHeaders(HttpRequestHeaders requestHeaders, out string failedReason) { - var cookieToken = requestHeaders - .GetCookies() - .Select(c => c[CsrfValidationCookieName]) - .FirstOrDefault(); + var cookieToken = requestHeaders.GetCookieValue(CsrfValidationCookieName); return ValidateHeaders( requestHeaders.ToDictionary(x => x.Key, x => x.Value).ToArray(), - cookieToken == null ? null : cookieToken.Value, + cookieToken == null ? null : cookieToken, out failedReason); } + } } \ No newline at end of file diff --git a/src/Umbraco.Web/WebApi/Filters/AppendUserModifiedHeaderAttribute.cs b/src/Umbraco.Web/WebApi/Filters/AppendUserModifiedHeaderAttribute.cs new file mode 100644 index 000000000000..77fee756934e --- /dev/null +++ b/src/Umbraco.Web/WebApi/Filters/AppendUserModifiedHeaderAttribute.cs @@ -0,0 +1,76 @@ +using System; +using System.Web.Http.Filters; +using Umbraco.Core; +using Umbraco.Core.Models; + +namespace Umbraco.Web.WebApi.Filters +{ + /// + /// Appends a custom response header to notify the UI that the current user data has been modified + /// + public sealed class AppendUserModifiedHeaderAttribute : ActionFilterAttribute + { + private readonly string _userIdParameter; + + /// + /// An empty constructor which will always set the header + /// + public AppendUserModifiedHeaderAttribute() + { + } + + /// + /// A constructor specifying the action parameter name containing the user id to match against the current user and if they match the header will be appended + /// + /// + public AppendUserModifiedHeaderAttribute(string userIdParameter) + { + if (userIdParameter == null) throw new ArgumentNullException("userIdParameter"); + _userIdParameter = userIdParameter; + } + + public static void AppendHeader(HttpActionExecutedContext actionExecutedContext) + { + if (actionExecutedContext.Response.Headers.Contains("X-Umb-User-Modified") == false) + { + actionExecutedContext.Response.Headers.Add("X-Umb-User-Modified", "1"); + } + } + + public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext) + { + base.OnActionExecuted(actionExecutedContext); + + if (_userIdParameter.IsNullOrWhiteSpace()) + { + AppendHeader(actionExecutedContext); + } + else + { + var actionContext = actionExecutedContext.ActionContext; + if (actionContext.ActionArguments[_userIdParameter] == null) + { + throw new InvalidOperationException("No argument found for the current action with the name: " + _userIdParameter); + } + + var user = UmbracoContext.Current.Security.CurrentUser; + if (user == null) return; + + var userId = GetUserIdFromParameter(actionContext.ActionArguments[_userIdParameter]); + + if (userId == user.Id) + AppendHeader(actionExecutedContext); + } + + } + + private int GetUserIdFromParameter(object parameterValue) + { + if (parameterValue is int) + { + return (int)parameterValue; + } + throw new InvalidOperationException("The id type: " + parameterValue.GetType() + " is not a supported id"); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/WebApi/Filters/CheckIfUserTicketDataIsStaleAttribute.cs b/src/Umbraco.Web/WebApi/Filters/CheckIfUserTicketDataIsStaleAttribute.cs new file mode 100644 index 000000000000..46c36e9acd16 --- /dev/null +++ b/src/Umbraco.Web/WebApi/Filters/CheckIfUserTicketDataIsStaleAttribute.cs @@ -0,0 +1,121 @@ +using System; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using System.Web.Http.Controllers; +using System.Web.Http.Filters; +using AutoMapper; +using Umbraco.Core; +using Umbraco.Core.Models.Identity; +using Umbraco.Core.Models.Membership; +using Umbraco.Core.Security; +using Umbraco.Web.Security; +using UserExtensions = Umbraco.Core.Models.UserExtensions; + +namespace Umbraco.Web.WebApi.Filters +{ + /// + /// This filter will check if the current Principal/Identity assigned to the request has stale data in it compared + /// to what is persisted for the current user and will update the current auth ticket with the correct data if required and output + /// a custom response header for the UI to be notified of it. + /// + public sealed class CheckIfUserTicketDataIsStaleAttribute : ActionFilterAttribute + { + public override async Task OnActionExecutingAsync(HttpActionContext actionContext, CancellationToken cancellationToken) + { + await CheckStaleData(actionContext); + } + + public override async Task OnActionExecutedAsync(HttpActionExecutedContext actionExecutedContext, CancellationToken cancellationToken) + { + await CheckStaleData(actionExecutedContext.ActionContext); + + //we need new tokens and append the custom header if changes have been made + if (actionExecutedContext.ActionContext.Request.Properties.ContainsKey(typeof(CheckIfUserTicketDataIsStaleAttribute).Name)) + { + var tokenFilter = new SetAngularAntiForgeryTokensAttribute(); + tokenFilter.OnActionExecuted(actionExecutedContext); + + //add the header + AppendUserModifiedHeaderAttribute.AppendHeader(actionExecutedContext); + } + } + + private async Task CheckStaleData(HttpActionContext actionContext) + { + if (actionContext == null + || actionContext.Request == null + || actionContext.RequestContext == null + || actionContext.RequestContext.Principal == null + || actionContext.RequestContext.Principal.Identity == null) + { + return; + } + + //don't execute if it's already been done + if (actionContext.Request.Properties.ContainsKey(typeof(CheckIfUserTicketDataIsStaleAttribute).Name)) + return; + + var identity = actionContext.RequestContext.Principal.Identity as UmbracoBackOfficeIdentity; + if (identity == null) return; + + var userId = identity.Id.TryConvertTo(); + if (userId == false) return; + + var user = ApplicationContext.Current.Services.UserService.GetUserById(userId.Result); + if (user == null) return; + + //a list of checks to execute, if any of them pass then we resync + var checks = new Func[] + { + () => user.Username != identity.Username, + () => + { + var culture = UserExtensions.GetUserCulture(user, ApplicationContext.Current.Services.TextService); + return culture != null && culture.ToString() != identity.Culture; + }, + () => user.AllowedSections.UnsortedSequenceEqual(identity.AllowedApplications) == false, + () => user.Groups.Select(x => x.Alias).UnsortedSequenceEqual(identity.Roles) == false, + () => + { + var startContentIds = UserExtensions.CalculateContentStartNodeIds(user, ApplicationContext.Current.Services.EntityService); + return startContentIds.UnsortedSequenceEqual(identity.StartContentNodes) == false; + }, + () => + { + var startMediaIds = UserExtensions.CalculateMediaStartNodeIds(user, ApplicationContext.Current.Services.EntityService); + return startMediaIds.UnsortedSequenceEqual(identity.StartMediaNodes) == false; + } + }; + + if (checks.Any(check => check())) + { + await ReSync(user, actionContext); + } + } + + /// + /// This will update the current request IPrincipal to be correct and re-create the auth ticket + /// + /// + /// + /// + private async Task ReSync(IUser user, HttpActionContext actionContext) + { + var owinCtx = actionContext.Request.TryGetOwinContext(); + if (owinCtx) + { + var signInManager = owinCtx.Result.GetBackOfficeSignInManager(); + + //ensure the remainder of the request has the correct principal set + actionContext.Request.SetPrincipalForRequest(user); + + var backOfficeIdentityUser = Mapper.Map(user); + await signInManager.SignInAsync(backOfficeIdentityUser, isPersistent: true, rememberBrowser: false); + + //flag that we've made changes + actionContext.Request.Properties[typeof(CheckIfUserTicketDataIsStaleAttribute).Name] = true; + } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/WebApi/Filters/EnableOverrideAuthorizationAttribute.cs b/src/Umbraco.Web/WebApi/Filters/EnableOverrideAuthorizationAttribute.cs index a8c26fc16765..b2fdcb3c56dc 100644 --- a/src/Umbraco.Web/WebApi/Filters/EnableOverrideAuthorizationAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/EnableOverrideAuthorizationAttribute.cs @@ -11,6 +11,6 @@ namespace Umbraco.Web.WebApi.Filters [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)] public sealed class EnableOverrideAuthorizationAttribute : Attribute { - + //TODO: Can we remove this and use the System.Web.Http.OverrideAuthorizationAttribute which uses IOverrideFilter instead? } } \ No newline at end of file diff --git a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs index 2e3eea490e06..129bac1c4dcb 100644 --- a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForContentAttribute.cs @@ -42,10 +42,12 @@ public EnsureUserPermissionForContentAttribute(int nodeId) public EnsureUserPermissionForContentAttribute(string paramName) { - Mandate.ParameterNotNullOrEmpty(paramName, "paramName"); + if (string.IsNullOrWhiteSpace(paramName)) throw new ArgumentException("Value cannot be null or whitespace.", "paramName"); + _paramName = paramName; _permissionToCheck = ActionBrowse.Instance.Letter; - } + } + public EnsureUserPermissionForContentAttribute(string paramName, char permissionToCheck) : this(paramName) { @@ -100,7 +102,9 @@ public override void OnActionExecuting(HttpActionContext actionContext) actionContext.Request.Properties, UmbracoContext.Current.Security.CurrentUser, ApplicationContext.Current.Services.UserService, - ApplicationContext.Current.Services.ContentService, nodeId, _permissionToCheck.HasValue ? new[]{_permissionToCheck.Value}: null)) + ApplicationContext.Current.Services.ContentService, + ApplicationContext.Current.Services.EntityService, + nodeId, _permissionToCheck.HasValue ? new[]{_permissionToCheck.Value}: null)) { base.OnActionExecuting(actionContext); } diff --git a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForMediaAttribute.cs b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForMediaAttribute.cs index e126d42c2199..1289f25063fb 100644 --- a/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForMediaAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/EnsureUserPermissionForMediaAttribute.cs @@ -123,7 +123,9 @@ public override void OnActionExecuting(HttpActionContext actionContext) if (MediaController.CheckPermissions( actionContext.Request.Properties, UmbracoContext.Current.Security.CurrentUser, - ApplicationContext.Current.Services.MediaService, nodeId)) + ApplicationContext.Current.Services.MediaService, + ApplicationContext.Current.Services.EntityService, + nodeId)) { base.OnActionExecuting(actionContext); } diff --git a/src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingContentAttribute.cs b/src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingContentAttribute.cs index 3feb3b682a44..808d7c6da186 100644 --- a/src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingContentAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingContentAttribute.cs @@ -8,6 +8,7 @@ using Umbraco.Core.Services; using umbraco.BusinessLogic.Actions; using Umbraco.Core; +using Umbraco.Core.Models; namespace Umbraco.Web.WebApi.Filters { @@ -17,36 +18,70 @@ namespace Umbraco.Web.WebApi.Filters /// internal sealed class FilterAllowedOutgoingContentAttribute : FilterAllowedOutgoingMediaAttribute { + private readonly IUserService _userService; + private readonly IEntityService _entityService; private readonly char _permissionToCheck; public FilterAllowedOutgoingContentAttribute(Type outgoingType) - : base(outgoingType) + : this(outgoingType, ApplicationContext.Current.Services.UserService, ApplicationContext.Current.Services.EntityService) { _permissionToCheck = ActionBrowse.Instance.Letter; } public FilterAllowedOutgoingContentAttribute(Type outgoingType, char permissionToCheck) - : base(outgoingType) + : this(outgoingType, ApplicationContext.Current.Services.UserService, ApplicationContext.Current.Services.EntityService) { _permissionToCheck = permissionToCheck; } public FilterAllowedOutgoingContentAttribute(Type outgoingType, string propertyName) - : base(outgoingType, propertyName) + : this(outgoingType, propertyName, ApplicationContext.Current.Services.UserService, ApplicationContext.Current.Services.EntityService) { _permissionToCheck = ActionBrowse.Instance.Letter; } + + public FilterAllowedOutgoingContentAttribute(Type outgoingType, IUserService userService, IEntityService entityService) + : base(outgoingType) + { + if (userService == null) throw new ArgumentNullException("userService"); + if (entityService == null) throw new ArgumentNullException("entityService"); + _userService = userService; + _entityService = entityService; + _permissionToCheck = ActionBrowse.Instance.Letter; + } + + public FilterAllowedOutgoingContentAttribute(Type outgoingType, char permissionToCheck, IUserService userService, IEntityService entityService) + : base(outgoingType) + { + if (userService == null) throw new ArgumentNullException("userService"); + if (entityService == null) throw new ArgumentNullException("entityService"); + _userService = userService; + _entityService = entityService; + _permissionToCheck = permissionToCheck; + } + + public FilterAllowedOutgoingContentAttribute(Type outgoingType, string propertyName, IUserService userService, IEntityService entityService) + : base(outgoingType, propertyName) + { + if (userService == null) throw new ArgumentNullException("userService"); + if (entityService == null) throw new ArgumentNullException("entityService"); + _userService = userService; + _entityService = entityService; + _permissionToCheck = ActionBrowse.Instance.Letter; + } + + protected override void FilterItems(IUser user, IList items) { base.FilterItems(user, items); - FilterBasedOnPermissions(items, user, ApplicationContext.Current.Services.UserService); + FilterBasedOnPermissions(items, user); } - protected override int GetUserStartNode(IUser user) + protected override int[] GetUserStartNodes(IUser user) { - return user.StartContentId; + return user.CalculateContentStartNodeIds(_entityService); } protected override int RecycleBinId @@ -54,7 +89,7 @@ protected override int RecycleBinId get { return Constants.System.RecycleBinContent; } } - internal void FilterBasedOnPermissions(IList items, IUser user, IUserService userService) + internal void FilterBasedOnPermissions(IList items, IUser user) { var length = items.Count; @@ -66,30 +101,19 @@ internal void FilterBasedOnPermissions(IList items, IUser user, IUserService use ids.Add(((dynamic)items[i]).Id); } //get all the permissions for these nodes in one call - var permissions = userService.GetPermissions(user, ids.ToArray()).ToArray(); + var permissions = _userService.GetPermissions(user, ids.ToArray()); var toRemove = new List(); foreach (dynamic item in items) - { - var nodePermission = permissions.Where(x => x.EntityId == Convert.ToInt32(item.Id)).ToArray(); - //if there are no permissions for this id then we need to check what the user's default - // permissions are. - if (nodePermission.Any() == false) + { + //get the combined permission set across all user groups for this node + //we're in the world of dynamics here so we need to cast + var nodePermission = ((IEnumerable)permissions.GetAllPermissions(item.Id)).ToArray(); + + //if the permission being checked doesn't exist then remove the item + if (nodePermission.Contains(_permissionToCheck.ToString(CultureInfo.InvariantCulture)) == false) { - //var defaultP = user.DefaultPermissions - toRemove.Add(item); - } - else - { - foreach (var n in nodePermission) - { - //if the permission being checked doesn't exist then remove the item - if (n.AssignedPermissions.Contains(_permissionToCheck.ToString(CultureInfo.InvariantCulture)) == false) - { - toRemove.Add(item); - } - } - } + } } foreach (var item in toRemove) { diff --git a/src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingMediaAttribute.cs b/src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingMediaAttribute.cs index 36170627d9e1..beb67f339539 100644 --- a/src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingMediaAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/FilterAllowedOutgoingMediaAttribute.cs @@ -39,9 +39,9 @@ public override bool AllowMultiple get { return true; } } - protected virtual int GetUserStartNode(IUser user) + protected virtual int[] GetUserStartNodes(IUser user) { - return user.StartMediaId; + return user.CalculateMediaStartNodeIds(ApplicationContext.Current.Services.EntityService); } protected virtual int RecycleBinId @@ -85,8 +85,8 @@ internal void FilterBasedOnStartNode(IList items, IUser user) var toRemove = new List(); foreach (dynamic item in items) { - var hasPathAccess = (item != null && UserExtensions.HasPathAccess(item.Path, GetUserStartNode(user), RecycleBinId)); - if (!hasPathAccess) + var hasPathAccess = (item != null && UserExtensions.HasPathAccess(item.Path, GetUserStartNodes(user), RecycleBinId)); + if (hasPathAccess == false) { toRemove.Add(item); } diff --git a/src/Umbraco.Web/WebApi/Filters/LegacyTreeAuthorizeAttribute.cs b/src/Umbraco.Web/WebApi/Filters/LegacyTreeAuthorizeAttribute.cs index a337b3698956..9a7094f266d1 100644 --- a/src/Umbraco.Web/WebApi/Filters/LegacyTreeAuthorizeAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/LegacyTreeAuthorizeAttribute.cs @@ -18,7 +18,7 @@ protected override bool IsAuthorized(HttpActionContext actionContext) if (tree == null) return false; return UmbracoContext.Current.Security.CurrentUser != null - && UmbracoContext.Current.Security.UserHasAppAccess(tree.ApplicationAlias, UmbracoContext.Current.Security.CurrentUser); + && UmbracoContext.Current.Security.UserHasSectionAccess(tree.ApplicationAlias, UmbracoContext.Current.Security.CurrentUser); } return false; diff --git a/src/Umbraco.Web/WebApi/Filters/UmbracoApplicationAuthorizeAttribute.cs b/src/Umbraco.Web/WebApi/Filters/UmbracoApplicationAuthorizeAttribute.cs index 23e0fde1c267..1899584d6f02 100644 --- a/src/Umbraco.Web/WebApi/Filters/UmbracoApplicationAuthorizeAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/UmbracoApplicationAuthorizeAttribute.cs @@ -33,10 +33,12 @@ protected override bool IsAuthorized(HttpActionContext actionContext) { return true; } - - return UmbracoContext.Current.Security.CurrentUser != null - && _appNames.Any(app => UmbracoContext.Current.Security.UserHasAppAccess( + + var authorized = UmbracoContext.Current.Security.CurrentUser != null + && _appNames.Any(app => UmbracoContext.Current.Security.UserHasSectionAccess( app, UmbracoContext.Current.Security.CurrentUser)); + + return authorized; } } } \ No newline at end of file diff --git a/src/Umbraco.Web/WebApi/Filters/UmbracoTreeAuthorizeAttribute.cs b/src/Umbraco.Web/WebApi/Filters/UmbracoTreeAuthorizeAttribute.cs index 685f32cc8c3e..8d0286809172 100644 --- a/src/Umbraco.Web/WebApi/Filters/UmbracoTreeAuthorizeAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/UmbracoTreeAuthorizeAttribute.cs @@ -47,7 +47,7 @@ protected override bool IsAuthorized(HttpActionContext actionContext) .ToArray(); return UmbracoContext.Current.Security.CurrentUser != null - && apps.Any(app => UmbracoContext.Current.Security.UserHasAppAccess( + && apps.Any(app => UmbracoContext.Current.Security.UserHasSectionAccess( app, UmbracoContext.Current.Security.CurrentUser)); } } diff --git a/src/Umbraco.Web/WebApi/HttpRequestMessageExtensions.cs b/src/Umbraco.Web/WebApi/HttpRequestMessageExtensions.cs index 00b66094e826..6263428969ec 100644 --- a/src/Umbraco.Web/WebApi/HttpRequestMessageExtensions.cs +++ b/src/Umbraco.Web/WebApi/HttpRequestMessageExtensions.cs @@ -28,9 +28,17 @@ public static class HttpRequestMessageExtensions internal static Attempt TryGetOwinContext(this HttpRequestMessage request) { var httpContext = request.TryGetHttpContext(); - return httpContext - ? Attempt.Succeed(httpContext.Result.GetOwinContext()) - : Attempt.Fail(); + try + { + return httpContext + ? Attempt.Succeed(httpContext.Result.GetOwinContext()) + : Attempt.Fail(); + } + catch (InvalidOperationException) + { + //this will occur if there is no OWIN environment which generally would only be in things like unit tests + return Attempt.Fail(); + } } /// diff --git a/src/Umbraco.Web/WebApi/UmbracoAuthorizeAttribute.cs b/src/Umbraco.Web/WebApi/UmbracoAuthorizeAttribute.cs index 028c835d908f..858027b62aca 100644 --- a/src/Umbraco.Web/WebApi/UmbracoAuthorizeAttribute.cs +++ b/src/Umbraco.Web/WebApi/UmbracoAuthorizeAttribute.cs @@ -1,6 +1,7 @@ using System; using System.Web.Http; using Umbraco.Core; +using Umbraco.Web.Security; namespace Umbraco.Web.WebApi { @@ -10,6 +11,8 @@ namespace Umbraco.Web.WebApi /// public sealed class UmbracoAuthorizeAttribute : AuthorizeAttribute { + private readonly bool _requireApproval; + /// /// Can be used by unit tests to enable/disable this filter /// @@ -39,8 +42,14 @@ public UmbracoAuthorizeAttribute(UmbracoContext umbracoContext) _applicationContext = _umbracoContext.Application; } - public UmbracoAuthorizeAttribute() + public UmbracoAuthorizeAttribute() : this(true) + { + + } + + public UmbracoAuthorizeAttribute(bool requireApproval) { + _requireApproval = requireApproval; } protected override bool IsAuthorized(System.Web.Http.Controllers.HttpActionContext actionContext) @@ -59,7 +68,7 @@ protected override bool IsAuthorized(System.Web.Http.Controllers.HttpActionConte if (appContext.IsConfigured == false) return false; - var isLoggedIn = umbContext.Security.ValidateCurrentUser(); + var isLoggedIn = umbContext.Security.ValidateCurrentUser(false, _requireApproval) == ValidateRequestAttempt.Success; return isLoggedIn; } diff --git a/src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs b/src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs index 9577e840e18a..dfe8ee5ce59c 100644 --- a/src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs +++ b/src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs @@ -5,6 +5,8 @@ using Umbraco.Web.Security; using Umbraco.Web.WebApi.Filters; using umbraco.BusinessLogic; +using Umbraco.Core.Models.Identity; +using Umbraco.Core.Security; namespace Umbraco.Web.WebApi { @@ -20,8 +22,13 @@ namespace Umbraco.Web.WebApi [UmbracoAuthorize] [DisableBrowserCache] [UmbracoWebApiRequireHttps] + [CheckIfUserTicketDataIsStale] + [UnhandedExceptionLoggerConfiguration] + [EnableDetailedErrors] public abstract class UmbracoAuthorizedApiController : UmbracoApiController { + + protected UmbracoAuthorizedApiController() { } @@ -34,6 +41,17 @@ protected UmbracoAuthorizedApiController(UmbracoContext umbracoContext, UmbracoH { } + protected UmbracoAuthorizedApiController(UmbracoContext umbracoContext, UmbracoHelper umbracoHelper, BackOfficeUserManager backOfficeUserManager) : base(umbracoContext, umbracoHelper) + { + _userManager = backOfficeUserManager; + } + + private BackOfficeUserManager _userManager; + protected BackOfficeUserManager UserManager + { + get { return _userManager ?? (_userManager = TryGetOwinContext().Result.GetBackOfficeUserManager()); } + } + private bool _userisValidated = false; /// diff --git a/src/Umbraco.Web/WebApi/UnhandedExceptionLoggerConfigurationAttribute.cs b/src/Umbraco.Web/WebApi/UnhandedExceptionLoggerConfigurationAttribute.cs new file mode 100644 index 000000000000..51c43b082163 --- /dev/null +++ b/src/Umbraco.Web/WebApi/UnhandedExceptionLoggerConfigurationAttribute.cs @@ -0,0 +1,29 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using System.Web.Http.Controllers; +using System.Web.Http.ExceptionHandling; +using System.Web.Http.Filters; +using Umbraco.Core; +using Umbraco.Core.Logging; + +namespace Umbraco.Web.WebApi +{ + /// + /// Adds our unhandled exception logger to the controller's services + /// + /// + /// Important to note that the will only be called if the controller has an ExceptionFilter applied + /// to it, so to kill two birds with one stone, this class inherits from ExceptionFilterAttribute purely to force webapi to use the + /// IExceptionLogger (strange) + /// + public class UnhandedExceptionLoggerConfigurationAttribute : ExceptionFilterAttribute, IControllerConfiguration + { + public virtual void Initialize(HttpControllerSettings controllerSettings, HttpControllerDescriptor controllerDescriptor) + { + controllerSettings.Services.Add(typeof(IExceptionLogger), new UnhandledExceptionLogger()); + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/WebApi/UnhandledExceptionLogger.cs b/src/Umbraco.Web/WebApi/UnhandledExceptionLogger.cs new file mode 100644 index 000000000000..7c6d9df294c6 --- /dev/null +++ b/src/Umbraco.Web/WebApi/UnhandledExceptionLogger.cs @@ -0,0 +1,36 @@ +using System.Web.Http.ExceptionHandling; +using Umbraco.Core; +using Umbraco.Core.Logging; + +namespace Umbraco.Web.WebApi +{ + /// + /// Used to log unhandled exceptions in webapi controllers + /// + public class UnhandledExceptionLogger : ExceptionLogger + { + private readonly ILogger _logger; + + public UnhandledExceptionLogger() + : this(ApplicationContext.Current.ProfilingLogger.Logger) + { + } + + public UnhandledExceptionLogger(ILogger logger) + { + _logger = logger; + } + + public override void Log(ExceptionLoggerContext context) + { + if (context != null && context.ExceptionContext != null + && context.ExceptionContext.ActionContext != null && context.ExceptionContext.ActionContext.ControllerContext != null + && context.ExceptionContext.ActionContext.ControllerContext.Controller != null + && context.Exception != null) + { + _logger.Error(context.ExceptionContext.ActionContext.ControllerContext.Controller.GetType(), "Unhandled controller exception occurred", context.Exception); + } + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/WebBootManager.cs b/src/Umbraco.Web/WebBootManager.cs index 43d130529be9..2f6b81820f01 100644 --- a/src/Umbraco.Web/WebBootManager.cs +++ b/src/Umbraco.Web/WebBootManager.cs @@ -51,6 +51,7 @@ using Umbraco.Web.Editors; using Umbraco.Web.HealthCheck; using Umbraco.Web.Profiling; +using Umbraco.Web.Search; using GlobalSettings = Umbraco.Core.Configuration.GlobalSettings; using ProfilingViewEngine = Umbraco.Core.Profiling.ProfilingViewEngine; @@ -376,6 +377,8 @@ protected override void InitializeResolvers() { base.InitializeResolvers(); + SearchableTreeResolver.Current = new SearchableTreeResolver(ServiceProvider, LoggerResolver.Current.Logger, ApplicationContext.Services.ApplicationTreeService, () => PluginManager.ResolveSearchableTrees()); + XsltExtensionsResolver.Current = new XsltExtensionsResolver(ServiceProvider, LoggerResolver.Current.Logger, () => PluginManager.ResolveXsltExtensions()); EditorValidationResolver.Current= new EditorValidationResolver(ServiceProvider, LoggerResolver.Current.Logger, () => PluginManager.ResolveTypes()); @@ -546,6 +549,8 @@ protected override void InitializeResolvers() HealthCheckResolver.Current = new HealthCheckResolver(LoggerResolver.Current.Logger, () => PluginManager.ResolveTypes()); + HealthCheckNotificationMethodResolver.Current = new HealthCheckNotificationMethodResolver(LoggerResolver.Current.Logger, + () => PluginManager.ResolveTypes()); } /// diff --git a/src/Umbraco.Web/WebServices/ScheduledPublishController.cs b/src/Umbraco.Web/WebServices/ScheduledPublishController.cs deleted file mode 100644 index 433930dda9c0..000000000000 --- a/src/Umbraco.Web/WebServices/ScheduledPublishController.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Web.Mvc; -using umbraco; -using Umbraco.Core.Logging; -using Umbraco.Core.Publishing; -using Umbraco.Web.Mvc; - -namespace Umbraco.Web.WebServices -{ - /// - /// A REST controller used for running the scheduled publishing, this is called from the background worker timer - /// - [AdminTokenAuthorize] - public class ScheduledPublishController : UmbracoController - { - private static bool _isPublishingRunning = false; - - [HttpPost] - public JsonResult Index() - { - if (_isPublishingRunning) - { - Logger.Debug(() => "Scheduled publishing is currently executing this request will exit"); - return null; - } - - _isPublishingRunning = true; - - try - { - // DO not run publishing if content is re-loading - if (content.Instance.isInitializing == false) - { - var publisher = new ScheduledPublisher(Services.ContentService); - var count = publisher.CheckPendingAndProcess(); - Logger.Debug(() => string.Format("The scheduler processed {0} items", count)); - } - - return Json(new - { - success = true - }); - - } - catch (Exception ee) - { - var errorMessage = "Error executing scheduled task"; - if (HttpContext != null && HttpContext.Request != null) - { - if (HttpContext.Request.Url != null) - errorMessage = string.Format("{0} | Request to {1}", errorMessage, HttpContext.Request.Url); - if (HttpContext.Request.UserHostAddress != null) - errorMessage = string.Format("{0} | Coming from {1}", errorMessage, HttpContext.Request.UserHostAddress); - if (HttpContext.Request.UrlReferrer != null) - errorMessage = string.Format("{0} | Referrer {1}", errorMessage, HttpContext.Request.UrlReferrer); - } - LogHelper.Error(errorMessage, ee); - - Response.StatusCode = 400; - - return Json(new - { - success = false, - message = ee.Message - }); - } - finally - { - _isPublishingRunning = false; - } - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/WebServices/UmbracoAuthorizedHttpHandler.cs b/src/Umbraco.Web/WebServices/UmbracoAuthorizedHttpHandler.cs index 84f684ca50be..c4a9b8d9d2cd 100644 --- a/src/Umbraco.Web/WebServices/UmbracoAuthorizedHttpHandler.cs +++ b/src/Umbraco.Web/WebServices/UmbracoAuthorizedHttpHandler.cs @@ -76,7 +76,7 @@ protected bool AuthorizeRequest(string app, bool throwExceptions = false) /// protected bool UserHasAppAccess(string app, User user) { - return Security.UserHasAppAccess(app, user); + return Security.UserHasSectionAccess(app, user); } /// @@ -87,7 +87,7 @@ protected bool UserHasAppAccess(string app, User user) /// protected bool UserHasAppAccess(string app, string username) { - return Security.UserHasAppAccess(app, username); + return Security.UserHasSectionAccess(app, username); } /// diff --git a/src/Umbraco.Web/WebServices/UmbracoAuthorizedWebService.cs b/src/Umbraco.Web/WebServices/UmbracoAuthorizedWebService.cs index 8ad4e99ceb88..abc216d943a6 100644 --- a/src/Umbraco.Web/WebServices/UmbracoAuthorizedWebService.cs +++ b/src/Umbraco.Web/WebServices/UmbracoAuthorizedWebService.cs @@ -81,7 +81,7 @@ protected bool AuthorizeRequest(string app, bool throwExceptions = false) /// protected bool UserHasAppAccess(string app, User user) { - return Security.UserHasAppAccess(app, user); + return Security.UserHasSectionAccess(app, user); } /// @@ -92,7 +92,7 @@ protected bool UserHasAppAccess(string app, User user) /// protected bool UserHasAppAccess(string app, string username) { - return Security.UserHasAppAccess(app, username); + return Security.UserHasSectionAccess(app, username); } /// diff --git a/src/Umbraco.Web/app.config b/src/Umbraco.Web/app.config index b4178cfb1828..13d7964935e7 100644 --- a/src/Umbraco.Web/app.config +++ b/src/Umbraco.Web/app.config @@ -53,19 +53,19 @@ - + - + - + - + diff --git a/src/Umbraco.Web/packages.config b/src/Umbraco.Web/packages.config index daef6ee7fd79..2067ef68f990 100644 --- a/src/Umbraco.Web/packages.config +++ b/src/Umbraco.Web/packages.config @@ -3,7 +3,7 @@ - + @@ -17,11 +17,11 @@ - - - - - + + + + + @@ -29,5 +29,4 @@ - \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/content.cs b/src/Umbraco.Web/umbraco.presentation/content.cs index 54bb1ac2f1a7..a7d40fa088df 100644 --- a/src/Umbraco.Web/umbraco.presentation/content.cs +++ b/src/Umbraco.Web/umbraco.presentation/content.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.ComponentModel; +using System.Diagnostics; using System.Globalization; using System.IO; using System.Text; diff --git a/src/Umbraco.Web/umbraco.presentation/library.cs b/src/Umbraco.Web/umbraco.presentation/library.cs index 4ab89c5c7dc5..5118de709e40 100644 --- a/src/Umbraco.Web/umbraco.presentation/library.cs +++ b/src/Umbraco.Web/umbraco.presentation/library.cs @@ -1393,17 +1393,17 @@ public static string GetDictionaryItem(string Key) /// An XpathNodeIterator containing the current page as Xml. public static XPathNodeIterator GetXmlNodeCurrent() { - var pageId = ""; + var pageId = ""; try { var nav = Umbraco.Web.UmbracoContext.Current.ContentCache.GetXPathNavigator(); - var pageIdItem = HttpContext.Current.Items["pageID"]; - + var pageIdItem = HttpContext.Current.Items["pageID"]; + if (pageIdItem == null) { throw new NullReferenceException("pageID not found in the current HTTP context"); - } + } pageId = pageIdItem.ToString(); nav.MoveToId(pageId); @@ -1613,7 +1613,8 @@ public static string GetNodeFromLevel(string path, int level) public static void SendMail(string fromMail, string toMail, string subject, string body, bool isHtml) { try - { + { + var mailSender = new EmailSender(); using (var mail = new MailMessage()) { mail.From = new MailAddress(fromMail.Trim()); @@ -1622,8 +1623,7 @@ public static void SendMail(string fromMail, string toMail, string subject, stri mail.Subject = subject; mail.IsBodyHtml = isHtml; mail.Body = body; - using (var smtpClient = new SmtpClient()) - smtpClient.Send(mail); + mailSender.Send(mail); } } catch (Exception ee) diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Help.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Help.cs deleted file mode 100644 index 9ff4a8efcb8a..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Help.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Xml; - -namespace umbraco.presentation.umbraco -{ - public class Help - { - public string DefaultURL { get; set; } - public List HelpConfigPages { get; set; } - - public Help(XmlNode helpConfigNode) - { - DefaultURL = GetXmlAttributeAsString(helpConfigNode.Attributes["defaultUrl"]); - - HelpConfigPages = new List(); - - foreach (XmlNode linkNode in helpConfigNode.SelectNodes("link")) - { - - HelpConfigPages.Add(new HelpConfigPage - { - Application = GetXmlAttributeAsString(linkNode.Attributes["application"]), - ApplicationUrl = GetXmlAttributeAsString(linkNode.Attributes["applicationUrl"]), - Language = GetXmlAttributeAsString(linkNode.Attributes["language"]), - UserType = GetXmlAttributeAsString(linkNode.Attributes["userType"]), - HelpUrl = GetXmlAttributeAsString(linkNode.Attributes["helpUrl"]) - }); - } - } - - public string ResolveHelpUrl(HelpPage requestedHelpPage) - { - HelpConfigPage bestMatchingConfigPage = null; - - int currentBestMatchCount = 0; - - foreach (HelpConfigPage helpConfigPage in HelpConfigPages) - { - int attributeMatchCount = 0; - - if ((helpConfigPage.Application != "" && String.Compare(helpConfigPage.Application, requestedHelpPage.Application, true) != 0) || - (helpConfigPage.ApplicationUrl != "" && String.Compare(helpConfigPage.ApplicationUrl, requestedHelpPage.ApplicationUrl, true) != 0) || - (helpConfigPage.Language != "" && String.Compare(helpConfigPage.Language, requestedHelpPage.Language, true) != 0) || - (helpConfigPage.UserType != "" && String.Compare(helpConfigPage.UserType, requestedHelpPage.UserType, true) != 0)) - { - continue; - } - - if (String.Compare(helpConfigPage.Application, requestedHelpPage.Application, true) == 0) attributeMatchCount++; - if (String.Compare(helpConfigPage.ApplicationUrl, requestedHelpPage.ApplicationUrl, true) == 0) attributeMatchCount++; - if (String.Compare(helpConfigPage.Language, requestedHelpPage.Language, true) == 0) attributeMatchCount++; - if (String.Compare(helpConfigPage.UserType, requestedHelpPage.UserType, true) == 0) attributeMatchCount++; - - if (attributeMatchCount > currentBestMatchCount) - { - currentBestMatchCount = attributeMatchCount; - bestMatchingConfigPage = helpConfigPage; - } - } - return bestMatchingConfigPage == null ? GenerateDefaultUrl(requestedHelpPage) : GenerateConfiguredUrl(bestMatchingConfigPage); - } - - public string GenerateConfiguredUrl(HelpConfigPage helpConfigPage) - { - return String.Format(helpConfigPage.HelpUrl, - helpConfigPage.Application, - helpConfigPage.ApplicationUrl, - helpConfigPage.Language, - helpConfigPage.UserType).ToLower(); - } - - public string GenerateDefaultUrl(HelpPage helpPage) - { - return string.Format(DefaultURL, - helpPage.Application, - helpPage.ApplicationUrl); - } - - private string GetXmlAttributeAsString(XmlAttribute attribute) { - - if (attribute == null) return ""; - - return attribute.Value.Trim(); - - } - } - - public class HelpPage - { - public string Application { get; set; } - public string ApplicationUrl { get; set; } - public string Language { get; set; } - public string UserType { get; set; } - } - - public class HelpConfigPage : HelpPage - { - public string HelpUrl { get; set; } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs index 1eacc072bd61..e448d9653a03 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs @@ -360,7 +360,7 @@ protected void SetActionAttribute(ref XmlTreeNode treeElement, Document dd) } else if (!this.IsDialog || (this.DialogMode == TreeDialogModes.id)) { - if (CurrentUser.GetPermissions(dd.Path).Contains(ActionUpdate.Instance.Letter.ToString())) + if (CurrentUser.GetPermissions(dd.Path).Contains(ActionUpdate.Instance.Letter.ToString(CultureInfo.InvariantCulture))) { treeElement.Action = String.Format("javascript:openContent({0});", dd.Id); } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/UserPermissions.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/UserPermissions.cs deleted file mode 100644 index 3309c0ff8d20..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/UserPermissions.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.HtmlControls; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using umbraco.businesslogic; -using umbraco.interfaces; -using System.Xml; -using System.Collections.Generic; -using System.Text; -using umbraco.BusinessLogic.Actions; -using Umbraco.Core; - -namespace umbraco.cms.presentation.Trees -{ - [Tree(Constants.Applications.Users, "userPermissions", "User Permissions", sortOrder: 2)] - public class UserPermissions : BaseTree - { - - public UserPermissions(string application) : base(application) { } - - /// - /// don't allow any actions on this tree - /// - /// - protected override void CreateAllowedActions(ref List actions) - { - actions.Clear(); - } - - /// - /// no actions should be able to be performed on the parent node except for refresh - /// - /// - protected override void CreateRootNodeActions(ref List actions) - { - actions.Clear(); - actions.Add(ActionRefresh.Instance); - } - - public override void Render(ref XmlTree tree) - { - foreach (umbraco.BusinessLogic.User user in umbraco.BusinessLogic.User.getAll()) - { - if (user.Id > 0 && !user.Disabled) - { - XmlTreeNode node = XmlTreeNode.Create(this); - node.NodeID = user.Id.ToString(); - node.Text = user.Name; - node.Action = "javascript:openUserPermissions('" + user.Id.ToString() + "');"; - node.Icon = "icon-users"; - - OnBeforeNodeRender(ref tree, ref node, EventArgs.Empty); - if (node != null) - { - tree.Add(node); - OnAfterNodeRender(ref tree, ref node, EventArgs.Empty); - } - - } - } - } - - protected override void CreateRootNode(ref XmlTreeNode rootNode) - { - rootNode.Text = ui.Text("user", "userPermissions"); - } - - public override void RenderJS(ref StringBuilder Javascript) - { - Javascript.Append( - @" -function openUserPermissions(id) { - UmbClientMgr.contentFrame('users/PermissionEditor.aspx?id=' + id); -} -"); - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/UserTypes.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/UserTypes.cs deleted file mode 100644 index 8ac477167203..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/UserTypes.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using umbraco.BusinessLogic; -using System.Collections.Generic; -using umbraco.businesslogic; -using Umbraco.Core; - -namespace umbraco.cms.presentation.Trees -{ - [Tree(Constants.Applications.Users, "userTypes", "User Types", sortOrder: 1)] - public class UserTypes : BaseTree - { - - public UserTypes(string application) : base(application) { } - - public override void RenderJS(ref System.Text.StringBuilder Javascript) - { - Javascript.Append( - @" -function openUserTypes(id) { - UmbClientMgr.contentFrame('users/EditUserType.aspx?id=' + id); -} -"); - } - - public override void Render(ref XmlTree tree) - { - List userTypes = UserType.GetAllUserTypes(); - foreach (UserType userType in userTypes) - { - if (userType.Id > 1) //don't show the admin user type, they should always have full permissions - { - XmlTreeNode node = XmlTreeNode.Create(this); - node.NodeID = userType.Id.ToString(); - node.Action = string.Format("javascript:openUserTypes({0})", userType.Id.ToString()); - node.Icon = "icon-users"; - node.Text = userType.Name; - - OnBeforeNodeRender(ref tree, ref node, EventArgs.Empty); - if (node != null) - { - tree.Add(node); - OnAfterNodeRender(ref tree, ref node, EventArgs.Empty); - } - } - } - } - - protected override void CreateRootNode(ref XmlTreeNode rootNode) - { - rootNode.Text = ui.Text("user", "userTypes"); - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadContent.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadContent.cs index 49251f2ebd9e..a2a8b26dea5c 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadContent.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadContent.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using Umbraco.Core.Configuration; using umbraco.BusinessLogic.Actions; using umbraco.businesslogic; @@ -11,11 +12,8 @@ namespace umbraco { - /// - /// Handles loading the content tree into umbraco's application tree - /// + [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This is no longer used and will be removed from the codebase in the future")] - //[Tree(Constants.Applications.Content, "content", "Content", silent: true)] public class loadContent : BaseContentTree { diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadDLRScripts.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadDLRScripts.cs index a941772b230b..7ab99e93a776 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadDLRScripts.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadDLRScripts.cs @@ -1,4 +1,6 @@ -using System.Text; +using System; +using System.ComponentModel; +using System.Text; using umbraco.cms.presentation.Trees; using Umbraco.Core.IO; using Umbraco.Core; @@ -6,9 +8,8 @@ namespace umbraco { - /// - /// Handles loading of python items into the developer application tree - /// + [Obsolete("This is no longer used and will be removed in future versions")] + [EditorBrowsable(EditorBrowsableState.Never)] public class loadDLRScripts : FileSystemTree { public loadDLRScripts(string application) : base(application) { } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadScripts.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadScripts.cs index 563a491ec538..7379c89963c0 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadScripts.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadScripts.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.ComponentModel; using System.Data; using System.IO; using System.Linq; @@ -31,8 +32,9 @@ namespace umbraco -{ - [Tree(Constants.Applications.Settings, "scripts", "Scripts", "icon-folder", "icon-folder", sortOrder: 2)] +{ + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This is no longer used and will be removed from the codebase in the future")] public class loadScripts : FileSystemTree { public loadScripts(string application) : base(application) { } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadTemplates.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadTemplates.cs index ad03d9922376..a15ede760699 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadTemplates.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadTemplates.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.ComponentModel; using System.Data; using System.Globalization; using System.IO; @@ -34,6 +35,7 @@ namespace umbraco { + [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This is no longer used and will be removed from the codebase in the future")] public class loadTemplates : BaseTree { diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadUsers.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadUsers.cs index 5db7a06dab13..35cf9878a595 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadUsers.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadUsers.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.ComponentModel; using System.Data; using System.IO; using System.Text; @@ -31,10 +32,8 @@ namespace umbraco { - /// - /// Handles loading of all umbraco users into the users application tree - /// - [Tree(Constants.Applications.Users, "users", "Users")] + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This is no longer used and will be removed from the codebase in the future")] public class loadUsers : BaseTree { public loadUsers(string application) : base(application) { } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/Blogger.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/Blogger.cs deleted file mode 100644 index 280be0f5b99c..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/Blogger.cs +++ /dev/null @@ -1,161 +0,0 @@ - -using CookComputing.XmlRpc; - -namespace CookComputing.Blogger -{ - /// - /// Struct representing a blog category - /// - public struct Category - { - public string categoryid; - public string title; - public string description; - public string htmlUrl; - public string rssUrl; - } - - /// - /// Struct representing a blog post - /// - public struct Post - { - public System.DateTime dateCreated; - [XmlRpcMember( - Description = "Depending on server may be either string or integer. " - + "Use Convert.ToInt32(userid) to treat as integer or " - + "Convert.ToString(userid) to treat as string")] - - //Livejournal sometimes drops these - [XmlRpcMissingMapping(MappingAction.Ignore)] - public object userid; - [XmlRpcMissingMapping(MappingAction.Ignore)] - public string postid; - public string content; - } - - /// - /// Struct containing user information - /// - public struct UserInfo - { - public string url; - public string email; - public string nickname; - public string lastname; - public string firstname; - } - - /// - /// Struct containing Blog information - /// - public struct BlogInfo - { - public string blogid; - public string url; - public string blogName; - } - - public interface IBlogger - { - [XmlRpcMethod("blogger.deletePost", - Description = "Deletes a post.")] - [return: XmlRpcReturnValue(Description = "Always returns true.")] - bool deletePost( - string appKey, - string postid, - string username, - string password, - [XmlRpcParameter( - Description = "Where applicable, this specifies whether the blog " - + "should be republished after the post has been deleted.")] - bool publish); - - [XmlRpcMethod("blogger.editPost", - Description = "Edits a given post. Optionally, will publish the " - + "blog after making the edit.")] - [return: XmlRpcReturnValue(Description = "Always returns true.")] - object editPost( - string appKey, - string postid, - string username, - string password, - string content, - bool publish); - - [XmlRpcMethod("blogger.getCategories", - Description = "Returns a list of the categories that you can use " - + "to log against a post.")] - Category[] getCategories( - string blogid, - string username, - string password); - - [XmlRpcMethod("blogger.getPost", - Description = "Returns a single post.")] - Post getPost( - string appKey, - string postid, - string username, - string password); - - [XmlRpcMethod("blogger.getRecentPosts", - Description = "Returns a list of the most recent posts in the system.")] - Post[] getRecentPosts( - string appKey, - string blogid, - string username, - string password, - int numberOfPosts); - - [XmlRpcMethod("blogger.getTemplate", - Description = "Returns the main or archive index template of " - + "a given blog.")] - string getTemplate( - string appKey, - string blogid, - string username, - string password, - string templateType); - - [XmlRpcMethod("blogger.getUserInfo", - Description = "Authenticates a user and returns basic user info " - + "(name, email, userid, etc.).")] - UserInfo getUserInfo( - string appKey, - string username, - string password); - - [XmlRpcMethod("blogger.getUsersBlogs", - Description = "Returns information on all the blogs a given user " - + "is a member.")] - BlogInfo[] getUsersBlogs( - string appKey, - string username, - string password); - - [XmlRpcMethod("blogger.newPost", - Description = "Makes a new post to a designated blog. Optionally, " - + "will publish the blog after making the post.")] - [return: XmlRpcReturnValue(Description = "Id of new post")] - string newPost( - string appKey, - string blogid, - string username, - string password, - string content, - bool publish); - - [XmlRpcMethod("blogger.setTemplate", - Description = "Edits the main or archive index template of a given blog.")] - bool setTemplate( - string appKey, - string blogid, - string username, - string password, - string template, - string templateType); - } -} - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/DocumentDateComparer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/DocumentDateComparer.cs deleted file mode 100644 index f5951b9ffbce..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/DocumentDateComparer.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections; -using System.Text; -using umbraco.cms.businesslogic; -using umbraco.cms.businesslogic.web; -namespace umbraco.presentation.channels -{ - class DocumentDateComparer : IComparer - { - - int IComparer.Compare(Object x, Object y) - { - - if (((Document)x).CreateDateTime > ((Document)y).CreateDateTime) - { - return -1; - } - else - { - return 0; - } - - } - - } - - - class DocumentSortOrderComparer : IComparer - { - - int IComparer.Compare(Object x, Object y) - { - - if (((CMSNode)x).sortOrder > ((CMSNode)y).sortOrder) - { - return -1; - } - else - { - return 0; - } - - } - - } - - -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/MetaWeblog.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/MetaWeblog.cs deleted file mode 100644 index 74b7d5d72497..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/MetaWeblog.cs +++ /dev/null @@ -1,139 +0,0 @@ - -using System; -using CookComputing.XmlRpc; - -namespace CookComputing.MetaWeblog -{ - [XmlRpcMissingMapping(MappingAction.Ignore)] - public struct Enclosure - { - public int length; - public string type; - public string url; - } - - [XmlRpcMissingMapping(MappingAction.Ignore)] - public struct Source - { - public string name; - public string url; - } - - [XmlRpcMissingMapping(MappingAction.Ignore)] - public struct Post - { - [XmlRpcMissingMapping(MappingAction.Error)] - [XmlRpcMember(Description = "Required when posting.")] - public DateTime dateCreated; - [XmlRpcMissingMapping(MappingAction.Error)] - [XmlRpcMember(Description = "Required when posting.")] - public string description; - [XmlRpcMissingMapping(MappingAction.Error)] - [XmlRpcMember(Description = "Required when posting.")] - public string title; - - public string[] categories; - public Enclosure enclosure; - public string link; - public string permalink; - [XmlRpcMember( - Description = "Not required when posting. Depending on server may " - + "be either string or integer. " - + "Use Convert.ToInt32(postid) to treat as integer or " - + "Convert.ToString(postid) to treat as string")] - public object postid; - public Source source; - public string userid; - - public object mt_allow_comments; - public object mt_allow_pings; - public object mt_convert_breaks; - public string mt_text_more; - public string mt_excerpt; - } - - public struct CategoryInfo - { - public string description; - public string htmlUrl; - public string rssUrl; - public string title; - public string categoryid; - } - - public struct Category - { - public string categoryId; - public string categoryName; - } - - public struct FileData - { - public byte[] bits; - public string name; - public string type; - } - - public struct UrlData - { - public string url; - } - - public struct MediaObjectInfo - { - public string url; - } - - public interface IMetaWeblog - { - [XmlRpcMethod("metaWeblog.editPost", - Description = "Updates and existing post to a designated blog " - + "using the metaWeblog API. Returns true if completed.")] - object editPost( - string postid, - string username, - string password, - Post post, - bool publish); - - [XmlRpcMethod("metaWeblog.getCategories", - Description = "Retrieves a list of valid categories for a post " - + "using the metaWeblog API. Returns the metaWeblog categories " - + "struct collection.")] - CategoryInfo[] getCategories( - string blogid, - string username, - string password); - - [XmlRpcMethod("metaWeblog.getPost", - Description = "Retrieves an existing post using the metaWeblog " - + "API. Returns the metaWeblog struct.")] - Post getPost( - string postid, - string username, - string password); - - [XmlRpcMethod("metaWeblog.getRecentPosts", - Description = "Retrieves a list of the most recent existing post " - + "using the metaWeblog API. Returns the metaWeblog struct collection.")] - Post[] getRecentPosts( - string blogid, - string username, - string password, - int numberOfPosts); - - [XmlRpcMethod("metaWeblog.newPost", - Description = "Makes a new post to a designated blog using the " - + "metaWeblog API. Returns postid as a string.")] - string newPost( - string blogid, - string username, - string password, - Post post, - bool publish); - - - } -} - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs deleted file mode 100644 index b4fa6ed573ef..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs +++ /dev/null @@ -1,568 +0,0 @@ -using System; -using System.Collections; -using System.Drawing; -using System.IO; -using System.Web; -using CookComputing.Blogger; -using CookComputing.MetaWeblog; -using CookComputing.XmlRpc; -using Umbraco.Core.Configuration; -using Umbraco.Core.IO; -using umbraco.BusinessLogic; -using umbraco.cms.businesslogic; -using umbraco.cms.businesslogic.datatype; -using umbraco.cms.businesslogic.media; -using umbraco.cms.businesslogic.property; -using umbraco.cms.businesslogic.propertytype; -using umbraco.cms.businesslogic.web; -using Umbraco.Core.Logging; -using Umbraco.Core.Security; -using umbraco.presentation.channels.businesslogic; -using Post = CookComputing.MetaWeblog.Post; - -using System.Collections.Generic; -using System.Web.Security; -using Umbraco.Core.IO; -using Umbraco.Core; - -namespace umbraco.presentation.channels -{ - public abstract class UmbracoMetaWeblogAPI : XmlRpcService, IMetaWeblog - { - internal readonly MediaFileSystem _fs; - - protected UmbracoMetaWeblogAPI() - { - _fs = FileSystemProviderManager.Current.GetFileSystemProvider(); - } - - [XmlRpcMethod("blogger.deletePost", - Description = "Deletes a post.")] - [return: XmlRpcReturnValue(Description = "Always returns true.")] - public bool deletePost( - string appKey, - string postid, - string username, - string password, - [XmlRpcParameter( - Description = "Where applicable, this specifies whether the blog " - + "should be republished after the post has been deleted.")] bool publish) - { - if (ValidateUser(username, password)) - { - Channel userChannel = new Channel(username); - new Document(int.Parse(postid)) - .delete(); - return true; - } - return false; - } - - public object editPost( - string postid, - string username, - string password, - Post post, - bool publish) - { - if (ValidateUser(username, password)) - { - Channel userChannel = new Channel(username); - Document doc = new Document(Convert.ToInt32(postid)); - - - doc.Text = HttpContext.Current.Server.HtmlDecode(post.title); - - // Excerpt - if (userChannel.FieldExcerptAlias != null && userChannel.FieldExcerptAlias != "") - doc.getProperty(userChannel.FieldExcerptAlias).Value = RemoveLeftUrl(post.mt_excerpt); - - - if (UmbracoConfig.For.UmbracoSettings().Content.TidyEditorContent) - doc.getProperty(userChannel.FieldDescriptionAlias).Value = library.Tidy(RemoveLeftUrl(post.description), false); - else - doc.getProperty(userChannel.FieldDescriptionAlias).Value = RemoveLeftUrl(post.description); - - UpdateCategories(doc, post, userChannel); - - - if (publish) - { - doc.SaveAndPublish(new User(username)); - } - return true; - } - else - { - return false; - } - } - - private static void UpdateCategories(Document doc, Post post, Channel userChannel) - { - if (userChannel.FieldCategoriesAlias != null && userChannel.FieldCategoriesAlias != "") - { - ContentType blogPostType = ContentType.GetByAlias(userChannel.DocumentTypeAlias); - PropertyType categoryType = blogPostType.getPropertyType(userChannel.FieldCategoriesAlias); - - String[] categories = post.categories; - string categoryValue = ""; - interfaces.IUseTags tags = UseTags(categoryType); - if (tags != null) - { - tags.RemoveTagsFromNode(doc.Id); - for (int i = 0; i < categories.Length; i++) - { - tags.AddTagToNode(doc.Id, categories[i]); - } - //If the IUseTags provider manually set the property value to something on the IData interface then we should persist this - //code commented as for some reason, even though the IUseTags control is setting IData.Value it is null here - //could be a cache issue, or maybe it's a different instance of the IData or something, rather odd - //doc.getProperty(userChannel.FieldCategoriesAlias).Value = categoryType.DataTypeDefinition.DataType.Data.Value; - - //Instead, set the document property to CSV of the tags - this WILL break custom editors for tags which don't adhere to the - //pseudo standard that the .Value of the property contains CSV tags. - doc.getProperty(userChannel.FieldCategoriesAlias).Value = string.Join(",", categories); - } - else - { - for (int i = 0; i < categories.Length; i++) - { - PreValue pv = new PreValue(categoryType.DataTypeDefinition.Id, categories[i]); - categoryValue += pv.Id + ","; - } - if (categoryValue.Length > 0) - categoryValue = categoryValue.Substring(0, categoryValue.Length - 1); - - doc.getProperty(userChannel.FieldCategoriesAlias).Value = categoryValue; - } - } - } - - public CategoryInfo[] getCategories( - string blogid, - string username, - string password) - { - if (ValidateUser(username, password)) - { - Channel userChannel = new Channel(username); - if (userChannel.FieldCategoriesAlias != null && userChannel.FieldCategoriesAlias != "") - { - // Find the propertytype via the document type - ContentType blogPostType = ContentType.GetByAlias(userChannel.DocumentTypeAlias); - PropertyType categoryType = blogPostType.getPropertyType(userChannel.FieldCategoriesAlias); - - // check if the datatype uses tags or prevalues - CategoryInfo[] returnedCategories = null; - interfaces.IUseTags tags = UseTags(categoryType); - if (tags != null) - { - List alltags = tags.GetAllTags(); - if (alltags != null) - { - returnedCategories = new CategoryInfo[alltags.Count]; - int counter = 0; - foreach (interfaces.ITag t in alltags) - { - CategoryInfo ci = new CategoryInfo(); - ci.title = t.TagCaption; - ci.categoryid = t.Id.ToString(); - ci.description = ""; - ci.rssUrl = ""; - ci.htmlUrl = ""; - returnedCategories[counter] = ci; - counter++; - } - } - else - { - returnedCategories = new CategoryInfo[0]; - } - } - else - { - SortedList categories = PreValues.GetPreValues(categoryType.DataTypeDefinition.Id); - returnedCategories = new CategoryInfo[categories.Count]; - IDictionaryEnumerator ide = categories.GetEnumerator(); - int counter = 0; - while (ide.MoveNext()) - { - PreValue category = (PreValue)ide.Value; - CategoryInfo ci = new CategoryInfo(); - ci.title = category.Value; - ci.categoryid = category.Id.ToString(); - ci.description = ""; - ci.rssUrl = ""; - ci.htmlUrl = ""; - returnedCategories[counter] = ci; - counter++; - } - } - - return returnedCategories; - } - } - - throw new ArgumentException("Categories doesn't work for this channel, they might not have been activated. Contact your umbraco administrator."); - } - - public static interfaces.IUseTags UseTags(PropertyType categoryType) - { - if (typeof(interfaces.IUseTags).IsAssignableFrom(categoryType.DataTypeDefinition.DataType.DataEditor.GetType())) - { - interfaces.IUseTags tags = (interfaces.IUseTags)categoryType.DataTypeDefinition.DataType.DataEditor as interfaces.IUseTags; - return tags; - } - return null; - } - - public Post getPost( - string postid, - string username, - string password) - { - if (ValidateUser(username, password)) - { - Channel userChannel = new Channel(username); - Document d = new Document(int.Parse(postid)); - Post p = new Post(); - p.title = d.Text; - p.description = d.getProperty(userChannel.FieldDescriptionAlias).Value.ToString(); - - // Excerpt - if (userChannel.FieldExcerptAlias != null && userChannel.FieldExcerptAlias != "") - p.mt_excerpt = d.getProperty(userChannel.FieldExcerptAlias).Value.ToString(); - - // Categories - if (userChannel.FieldCategoriesAlias != null && userChannel.FieldCategoriesAlias != "" && - d.getProperty(userChannel.FieldCategoriesAlias) != null && - d.getProperty(userChannel.FieldCategoriesAlias).Value != null && - d.getProperty(userChannel.FieldCategoriesAlias).Value.ToString() != "") - { - String categories = d.getProperty(userChannel.FieldCategoriesAlias).Value.ToString(); - char[] splitter = { ',' }; - String[] categoryIds = categories.Split(splitter); - p.categories = categoryIds; - } - - p.postid = postid; - p.permalink = library.NiceUrl(d.Id); - p.dateCreated = d.CreateDateTime; - p.link = p.permalink; - return p; - } - else - throw new ArgumentException(string.Format("Error retriving post with id: '{0}'", postid)); - } - - public Post[] getRecentPosts( - string blogid, - string username, - string password, - int numberOfPosts) - { - if (ValidateUser(username, password)) - { - ArrayList blogPosts = new ArrayList(); - ArrayList blogPostsObjects = new ArrayList(); - - User u = new User(username); - Channel userChannel = new Channel(u.Id); - - - Document rootDoc; - if (userChannel.StartNode > 0) - rootDoc = new Document(userChannel.StartNode); - else - { - if (u.StartNodeId == -1) - { - rootDoc = Document.GetRootDocuments()[0]; - } - else - { - rootDoc = new Document(u.StartNodeId); - } - } - - //store children array here because iterating over an Array object is very inneficient. - var c = rootDoc.Children; - foreach (Document d in c) - { - int count = 0; - blogPosts.AddRange( - findBlogPosts(userChannel, d, u.Name, ref count, numberOfPosts, userChannel.FullTree)); - } - - blogPosts.Sort(new DocumentSortOrderComparer()); - - foreach (Object o in blogPosts) - { - Document d = (Document)o; - Post p = new Post(); - p.dateCreated = d.CreateDateTime; - p.userid = username; - p.title = d.Text; - p.permalink = library.NiceUrl(d.Id); - p.description = d.getProperty(userChannel.FieldDescriptionAlias).Value.ToString(); - p.link = library.NiceUrl(d.Id); - p.postid = d.Id.ToString(); - - if (userChannel.FieldCategoriesAlias != null && userChannel.FieldCategoriesAlias != "" && - d.getProperty(userChannel.FieldCategoriesAlias) != null && - d.getProperty(userChannel.FieldCategoriesAlias).Value != null && - d.getProperty(userChannel.FieldCategoriesAlias).Value.ToString() != "") - { - String categories = d.getProperty(userChannel.FieldCategoriesAlias).Value.ToString(); - char[] splitter = { ',' }; - String[] categoryIds = categories.Split(splitter); - p.categories = categoryIds; - } - - // Excerpt - if (userChannel.FieldExcerptAlias != null && userChannel.FieldExcerptAlias != "") - p.mt_excerpt = d.getProperty(userChannel.FieldExcerptAlias).Value.ToString(); - - - blogPostsObjects.Add(p); - } - - - return (Post[])blogPostsObjects.ToArray(typeof(Post)); - } - else - { - return null; - } - } - - protected ArrayList findBlogPosts(Channel userChannel, Document d, String userName, ref int count, int max, - bool fullTree) - { - ArrayList list = new ArrayList(); - - ContentType ct = d.ContentType; - - if (ct.Alias.Equals(userChannel.DocumentTypeAlias) & - (count < max)) - { - list.Add(d); - count = count + 1; - } - - if (d.Children != null && d.Children.Length > 0 && fullTree) - { - //store children array here because iterating over an Array object is very inneficient. - var c = d.Children; - foreach (Document child in c) - { - if (count < max) - { - list.AddRange(findBlogPosts(userChannel, child, userName, ref count, max, true)); - } - } - } - return list; - } - - public string newPost( - string blogid, - string username, - string password, - Post post, - bool publish) - { - if (ValidateUser(username, password)) - { - Channel userChannel = new Channel(username); - User u = new User(username); - Document doc = - Document.MakeNew(HttpContext.Current.Server.HtmlDecode(post.title), - DocumentType.GetByAlias(userChannel.DocumentTypeAlias), u, - userChannel.StartNode); - - - // Excerpt - if (userChannel.FieldExcerptAlias != null && userChannel.FieldExcerptAlias != "") - doc.getProperty(userChannel.FieldExcerptAlias).Value = RemoveLeftUrl(post.mt_excerpt); - - - // Description - if (UmbracoConfig.For.UmbracoSettings().Content.TidyEditorContent) - doc.getProperty(userChannel.FieldDescriptionAlias).Value = library.Tidy(RemoveLeftUrl(post.description), false); - else - doc.getProperty(userChannel.FieldDescriptionAlias).Value = RemoveLeftUrl(post.description); - - // Categories - UpdateCategories(doc, post, userChannel); - - // check release date - if (post.dateCreated.Year > 0001) - { - publish = false; - doc.ReleaseDate = post.dateCreated; - } - - if (publish) - { - doc.SaveAndPublish(new User(username)); - } - return doc.Id.ToString(); - } - else - throw new ArgumentException("Error creating post"); - } - - protected MediaObjectInfo newMediaObjectLogicForWord( - string blogid, - string username, - string password, - FileData file) - { - UrlData ud = newMediaObjectLogic(blogid, username, password, file); - MediaObjectInfo moi = new MediaObjectInfo(); - moi.url = ud.url; - return moi; - } - protected UrlData newMediaObjectLogic( - string blogid, - string username, - string password, - FileData file) - { - if (ValidateUser(username, password)) - { - User u = new User(username); - Channel userChannel = new Channel(username); - UrlData fileUrl = new UrlData(); - if (userChannel.ImageSupport) - { - Media rootNode; - if (userChannel.MediaFolder > 0) - rootNode = new Media(userChannel.MediaFolder); - else - rootNode = new Media(u.StartMediaId); - - // Create new media - Media m = Media.MakeNew(file.name, MediaType.GetByAlias(userChannel.MediaTypeAlias), u, rootNode.Id); - - Property fileObject = m.getProperty(userChannel.MediaTypeFileProperty); - - var filename = file.name.Replace("/", "_"); - var relativeFilePath = UmbracoMediaFactory.GetRelativePath(fileObject.Id, filename); - - fileObject.Value = _fs.GetUrl(relativeFilePath); - fileUrl.url = fileObject.Value.ToString(); - - if (!fileUrl.url.StartsWith("http")) - { - var protocol = GlobalSettings.UseSSL ? "https" : "http"; - fileUrl.url = protocol + "://" + HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + fileUrl.url; - } - - _fs.AddFile(relativeFilePath, new MemoryStream(file.bits)); - - // Try updating standard file values - try - { - string orgExt = ""; - // Size - if (m.getProperty(Constants.Conventions.Media.Bytes) != null) - m.getProperty(Constants.Conventions.Media.Bytes).Value = file.bits.Length; - // Extension - if (m.getProperty(Constants.Conventions.Media.Extension) != null) - { - orgExt = - ((string) - file.name.Substring(file.name.LastIndexOf(".") + 1, - file.name.Length - file.name.LastIndexOf(".") - 1)); - m.getProperty(Constants.Conventions.Media.Extension).Value = orgExt.ToLower(); - } - // Width and Height - // Check if image and then get sizes, make thumb and update database - if (m.getProperty(Constants.Conventions.Media.Width) != null && m.getProperty(Constants.Conventions.Media.Height) != null && - ",jpeg,jpg,gif,bmp,png,tiff,tif,".IndexOf("," + orgExt.ToLower() + ",") > 0) - { - int fileWidth; - int fileHeight; - - using (var stream = _fs.OpenFile(relativeFilePath)) - { - Image image = Image.FromStream(stream); - fileWidth = image.Width; - fileHeight = image.Height; - stream.Close(); - try - { - m.getProperty(Constants.Conventions.Media.Width).Value = fileWidth.ToString(); - m.getProperty(Constants.Conventions.Media.Height).Value = fileHeight.ToString(); - } - catch (Exception ex) - { - LogHelper.Error("An error occurred reading the media stream", ex); - } - } - - - } - } - catch (Exception ex) - { - LogHelper.Error("An error occurred in newMediaObjectLogic", ex); - } - - return fileUrl; - } - else - throw new ArgumentException( - "Image Support is turned off in this channel. Modify channel settings in umbraco to enable image support."); - } - return new UrlData(); - } - - private static bool ValidateUser(string username, string password) - { - var provider = MembershipProviderExtensions.GetUsersMembershipProvider(); - - return provider.ValidateUser(username, password); - } - - [XmlRpcMethod("blogger.getUsersBlogs", - Description = "Returns information on all the blogs a given user " - + "is a member.")] - public BlogInfo[] getUsersBlogs( - string appKey, - string username, - string password) - { - if (ValidateUser(username, password)) - { - BlogInfo[] blogs = new BlogInfo[1]; - User u = new User(username); - Channel userChannel = new Channel(u.Id); - Document rootDoc; - if (userChannel.StartNode > 0) - rootDoc = new Document(userChannel.StartNode); - else - rootDoc = new Document(u.StartNodeId); - - BlogInfo bInfo = new BlogInfo(); - bInfo.blogName = userChannel.Name; - bInfo.blogid = rootDoc.Id.ToString(); - bInfo.url = library.NiceUrlWithDomain(rootDoc.Id, true); - blogs[0] = bInfo; - - return blogs; - } - - throw new ArgumentException(string.Format("No data found for user with username: '{0}'", username)); - } - - private static string RemoveLeftUrl(string text) - { - return - text.Replace(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority), ""); - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/api.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/api.cs deleted file mode 100644 index ace78f68030e..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/api.cs +++ /dev/null @@ -1,223 +0,0 @@ -using System; -using System.Collections; -using CookComputing.MetaWeblog; -using CookComputing.XmlRpc; -using umbraco.BusinessLogic; -using umbraco.cms.businesslogic; -using umbraco.cms.businesslogic.datatype; -using umbraco.cms.businesslogic.propertytype; -using umbraco.cms.businesslogic.web; -using umbraco.presentation.channels.businesslogic; - -namespace umbraco.presentation.channels -{ - /// - /// the umbraco channels API is xml-rpc webservice based on the metaweblog and blogger APIs - /// for editing umbraco data froom external clients - /// - [XmlRpcService( - Name = "umbraco metablog api", - Description = "For editing umbraco data from external clients", - AutoDocumentation = true)] - public class api : UmbracoMetaWeblogAPI, IRemixWeblogApi - { - /// - /// Initializes a new instance of the class. - /// - public api() - { - } - - - /// - /// Makes a new file to a designated blog using the metaWeblog API - /// - /// The blogid. - /// The username. - /// The password. - /// The file. - /// Returns url as a string of a struct. - [XmlRpcMethod("metaWeblog.newMediaObject", - Description = "Makes a new file to a designated blog using the " - + "metaWeblog API. Returns url as a string of a struct.")] - public UrlData newMediaObject( - string blogid, - string username, - string password, - FileData file) - { - return newMediaObjectLogic(blogid, username, password, file); - } - - #region IRemixWeblogApi Members - - /// - /// Gets a summary of all the pages from the blog with the spefied blogId. - /// - /// The blogid. - /// The username. - /// The password. - /// - public wpPageSummary[] getPageList(string blogid, string username, string password) - { - if (User.validateCredentials(username, password, false)) - { - ArrayList blogPosts = new ArrayList(); - ArrayList blogPostsObjects = new ArrayList(); - - User u = new User(username); - Channel userChannel = new Channel(u.Id); - - - Document rootDoc; - if (userChannel.StartNode > 0) - rootDoc = new Document(userChannel.StartNode); - else - rootDoc = new Document(u.StartNodeId); - - //store children array here because iterating over an Array object is very inneficient. - var c = rootDoc.Children; - foreach (Document d in c) - { - int count = 0; - blogPosts.AddRange( - findBlogPosts(userChannel, d, u.Name, ref count, 999, userChannel.FullTree)); - } - - blogPosts.Sort(new DocumentSortOrderComparer()); - - foreach (Object o in blogPosts) - { - Document d = (Document)o; - wpPageSummary p = new wpPageSummary(); - p.dateCreated = d.CreateDateTime; - p.page_title = d.Text; - p.page_id = d.Id; - p.page_parent_id = d.ParentId; - - blogPostsObjects.Add(p); - } - - - return (wpPageSummary[])blogPostsObjects.ToArray(typeof(wpPageSummary)); - } - else - { - return null; - } - } - - /// - /// Gets a specified number of pages from the blog with the spefied blogId - /// - /// The blogid. - /// The username. - /// The password. - /// The number of pages. - /// - public wpPage[] getPages(string blogid, string username, string password, int numberOfItems) - { - if (User.validateCredentials(username, password, false)) - { - ArrayList blogPosts = new ArrayList(); - ArrayList blogPostsObjects = new ArrayList(); - - User u = new User(username); - Channel userChannel = new Channel(u.Id); - - - Document rootDoc; - if (userChannel.StartNode > 0) - rootDoc = new Document(userChannel.StartNode); - else - rootDoc = new Document(u.StartNodeId); - - //store children array here because iterating over an Array object is very inneficient. - var c = rootDoc.Children; - foreach (Document d in c) - { - int count = 0; - blogPosts.AddRange( - findBlogPosts(userChannel, d, u.Name, ref count, numberOfItems, userChannel.FullTree)); - } - - blogPosts.Sort(new DocumentSortOrderComparer()); - - foreach (Object o in blogPosts) - { - Document d = (Document)o; - wpPage p = new wpPage(); - p.dateCreated = d.CreateDateTime; - p.title = d.Text; - p.page_id = d.Id; - p.wp_page_parent_id = d.ParentId; - p.wp_page_parent_title = d.Parent.Text; - p.permalink = library.NiceUrl(d.Id); - p.description = d.getProperty(userChannel.FieldDescriptionAlias).Value.ToString(); - p.link = library.NiceUrl(d.Id); - - if (userChannel.FieldCategoriesAlias != null && userChannel.FieldCategoriesAlias != "" && - d.getProperty(userChannel.FieldCategoriesAlias) != null && - ((string)d.getProperty(userChannel.FieldCategoriesAlias).Value) != "") - { - String categories = d.getProperty(userChannel.FieldCategoriesAlias).Value.ToString(); - char[] splitter = { ',' }; - String[] categoryIds = categories.Split(splitter); - p.categories = categoryIds; - } - - - blogPostsObjects.Add(p); - } - - - return (wpPage[])blogPostsObjects.ToArray(typeof(wpPage)); - } - else - { - return null; - } - } - - /// - /// Creates a new blog category / tag. - /// - /// The blogid. - /// The username. - /// The password. - /// The category. - /// - public string newCategory( - string blogid, - string username, - string password, - wpCategory category) - { - if (User.validateCredentials(username, password, false)) - { - Channel userChannel = new Channel(username); - if (userChannel.FieldCategoriesAlias != null && userChannel.FieldCategoriesAlias != "") - { - // Find the propertytype via the document type - ContentType blogPostType = ContentType.GetByAlias(userChannel.DocumentTypeAlias); - PropertyType categoryType = blogPostType.getPropertyType(userChannel.FieldCategoriesAlias); - interfaces.IUseTags tags = UseTags(categoryType); - if (tags != null) - { - tags.AddTag(category.name); - } - else - { - PreValue pv = new PreValue(); - pv.DataTypeId = categoryType.DataTypeDefinition.Id; - pv.Value = category.name; - pv.Save(); - } - } - } - return ""; - } - - #endregion - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/config.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/config.cs deleted file mode 100644 index 3cb25cb765ab..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/config.cs +++ /dev/null @@ -1,239 +0,0 @@ -using System; -using System.IO; -using System.Web; -using System.Xml; -using umbraco.BusinessLogic; -using Umbraco.Core.IO; - -namespace umbraco.presentation.channels.businesslogic -{ - public class config - { - private static XmlDocument _metablogConfigFile; - - public static XmlDocument MetaBlogConfigFile - { - get - { - if (_metablogConfigFile == null) - { - _metablogConfigFile = new XmlDocument(); - _metablogConfigFile.Load(IOHelper.MapPath(SystemFiles.MetablogConfig)); - } - - return _metablogConfigFile; - } - } - } - - public class Channel - { - public Channel(string username) - { - User u = new User(username); - initialize(u.Id); - } - - public Channel(int UserId) - { - initialize(UserId); - } - - private void initialize(int UserId) - { - XmlDocument configFile = config.MetaBlogConfigFile; - XmlNode channelXml = configFile.SelectSingleNode(string.Format("//channel [user = '{0}']", UserId)); - if (channelXml != null) - { - Id = UserId; - User = new User(UserId); - Name = channelXml.SelectSingleNode("./name").FirstChild.Value; - StartNode = int.Parse(channelXml.SelectSingleNode("./startNode").FirstChild.Value); - FullTree = bool.Parse(channelXml.SelectSingleNode("./fullTree").FirstChild.Value); - DocumentTypeAlias = channelXml.SelectSingleNode("./documentTypeAlias").FirstChild.Value; - if (channelXml.SelectSingleNode("./fields/categories").FirstChild != null) - FieldCategoriesAlias = channelXml.SelectSingleNode("./fields/categories").FirstChild.Value; - if (channelXml.SelectSingleNode("./fields/description").FirstChild != null) - FieldDescriptionAlias = channelXml.SelectSingleNode("./fields/description").FirstChild.Value; - if (channelXml.SelectSingleNode("./fields/excerpt") != null && channelXml.SelectSingleNode("./fields/excerpt").FirstChild != null) - FieldExcerptAlias = channelXml.SelectSingleNode("./fields/excerpt").FirstChild.Value; - - XmlNode mediaSupport = channelXml.SelectSingleNode("./mediaObjectSupport"); - ImageSupport = bool.Parse(mediaSupport.Attributes.GetNamedItem("enabled").Value); - MediaFolder = int.Parse(mediaSupport.Attributes.GetNamedItem("folderId").Value); - MediaTypeAlias = mediaSupport.Attributes.GetNamedItem("mediaTypeAlias").Value; - MediaTypeFileProperty = mediaSupport.Attributes.GetNamedItem("mediaTypeFileProperty").Value; - } - else - throw new ArgumentException(string.Format("No channel found for user with id: '{0}'", UserId)); - } - - public Channel() - { - } - - public void Save() - { - // update node - XmlDocument configFile = config.MetaBlogConfigFile; - XmlNode channelXml = null; - if (User != null && User.Id > -1) - channelXml = configFile.SelectSingleNode(string.Format("//channel [user = '{0}']", this.User.Id)); - if (channelXml != null) - configFile.DocumentElement.RemoveChild(channelXml); - - // add new node - XmlElement newChannelxml = configFile.CreateElement("channel"); - newChannelxml.AppendChild( - xmlHelper.addTextNode(configFile, "name", Name)); - newChannelxml.AppendChild( - xmlHelper.addTextNode(configFile, "user", User.Id.ToString())); - newChannelxml.AppendChild( - xmlHelper.addTextNode(configFile, "startNode", StartNode.ToString())); - newChannelxml.AppendChild( - xmlHelper.addTextNode(configFile, "fullTree", FullTree.ToString())); - newChannelxml.AppendChild( - xmlHelper.addTextNode(configFile, "documentTypeAlias", DocumentTypeAlias)); - - // fields - XmlElement fieldsxml = configFile.CreateElement("fields"); - fieldsxml.AppendChild( - xmlHelper.addTextNode(configFile, "categories", FieldCategoriesAlias)); - fieldsxml.AppendChild( - xmlHelper.addTextNode(configFile, "description", FieldDescriptionAlias)); - fieldsxml.AppendChild( - xmlHelper.addTextNode(configFile, "excerpt", FieldExcerptAlias)); - newChannelxml.AppendChild(fieldsxml); - - - // media - XmlElement media = configFile.CreateElement("mediaObjectSupport"); - media.Attributes.Append(xmlHelper.addAttribute(configFile, "enabled", ImageSupport.ToString())); - media.Attributes.Append(xmlHelper.addAttribute(configFile, "folderId", MediaFolder.ToString())); - media.Attributes.Append(xmlHelper.addAttribute(configFile, "mediaTypeAlias", MediaTypeAlias)); - media.Attributes.Append(xmlHelper.addAttribute(configFile, "mediaTypeFileProperty", MediaTypeFileProperty)); - newChannelxml.AppendChild(media); - configFile.DocumentElement.AppendChild(newChannelxml); - - configFile.Save( IOHelper.MapPath( SystemFiles.MetablogConfig )); - - - } - - private string _fieldExcerptAlias; - - public string FieldExcerptAlias - { - get { return _fieldExcerptAlias; } - set { _fieldExcerptAlias = value; } - } - - - private string _mediaTypeFileProperty; - - public string MediaTypeFileProperty - { - get { return _mediaTypeFileProperty; } - set { _mediaTypeFileProperty = value; } - } - - - private string _mediaTypeAlias; - - public string MediaTypeAlias - { - get { return _mediaTypeAlias; } - set { _mediaTypeAlias = value; } - } - - - private int _mediaFolder; - - public int MediaFolder - { - get { return _mediaFolder; } - set { _mediaFolder = value; } - } - - - private bool _imageSupport; - - public bool ImageSupport - { - get { return _imageSupport; } - set { _imageSupport = value; } - } - - - private int _startNode; - - public int StartNode - { - get { return _startNode; } - set { _startNode = value; } - } - - - private int _id; - - public int Id - { - get { return _id; } - set { _id = value; } - } - - - private string _fieldCategoriesAlias; - - public string FieldCategoriesAlias - { - get { return _fieldCategoriesAlias; } - set { _fieldCategoriesAlias = value; } - } - - - private string _fieldDescriptionAlias; - - public string FieldDescriptionAlias - { - get { return _fieldDescriptionAlias; } - set { _fieldDescriptionAlias = value; } - } - - - private string _documentTypeAlias; - - public string DocumentTypeAlias - { - get { return _documentTypeAlias; } - set { _documentTypeAlias = value; } - } - - - private bool _fulltree; - - public bool FullTree - { - get { return _fulltree; } - set { _fulltree = value; } - } - - - private User _user; - - public User User - { - get { return _user; } - set { _user = value; } - } - - - private string _name; - - public string Name - { - get { return _name; } - set { _name = value; } - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/remixWeblogApi.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/remixWeblogApi.cs deleted file mode 100644 index 6c9103e6693b..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/remixWeblogApi.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using CookComputing.MetaWeblog; -using CookComputing.XmlRpc; - -namespace umbraco.presentation.channels -{ - - [XmlRpcMissingMapping(MappingAction.Ignore)] - public struct wpPage - { - public DateTime dateCreated; - public int userid; - public int page_id; - public string page_status; - public string description; - public string title; - public string link; - public string permalink; - public string[] categories; - public string excerpt; - public string text_more; - public int mt_allow_comments; - public int mt_allow_pings; - - public string wp_slug; - public string wp_password; - public string wp_author; - public int wp_page_parent_id; - public string wp_page_parent_title; - public int wp_page_order; - public int wp_author_id; - public string wp_author_display_name; - - } - - [XmlRpcMissingMapping(MappingAction.Ignore)] - public struct wpPageSummary - { - public int page_id; - public string page_title; - public int page_parent_id; - public DateTime dateCreated; - - } - [XmlRpcMissingMapping(MappingAction.Ignore)] - public struct wpCategory - { - public string name; - public string slug; - public int parent_id; - string description; - } - - - public interface IRemixWeblogApi - { - [XmlRpcMethod("wp.getPageList", - Description = "Retrieves a list of pages as summary from the current channel")] - wpPageSummary[] getPageList( - string blogid, - string username, - string password); - - [XmlRpcMethod("wp.getPages", - Description = "Retrieves a list of pages from the current channel")] - wpPage[] getPages( - string blogid, - string username, - string password, - int numberOfItems); - - [XmlRpcMethod("wp.newCategory", - Description = "Adds a new category")] - string newCategory( - string blogid, - string username, - string password, - wpCategory category); - - } - -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx.cs deleted file mode 100644 index 7686a487384e..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; - -namespace umbraco.presentation.umbraco.channels -{ - [Obsolete("This class is no longer used and will be removed from the codebase in future versions")] - public partial class rsd : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - Response.ContentType = "text/xml"; - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx.cs deleted file mode 100644 index 51b7b38335bc..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; - -namespace umbraco.presentation.channels -{ - [Obsolete("This class is no longer used and will be removed from the codebase in future versions")] - public partial class wlwmanifest : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - bool useXhtml = false; - if (bool.TryParse(GlobalSettings.EditXhtmlMode, out useXhtml) && !useXhtml) - { - xhtml.Text = "no"; - } - else - { - xhtml.Text = "yes"; - } - } - - /// - /// xhtml control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal xhtml; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wordApi.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wordApi.cs deleted file mode 100644 index cc9fcf1e64ba..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wordApi.cs +++ /dev/null @@ -1,32 +0,0 @@ -using CookComputing.MetaWeblog; -using CookComputing.XmlRpc; - -namespace umbraco.presentation.channels -{ - /// - /// Summary description for Test. - /// - [XmlRpcService( - Name = "umbraco metablog test", - Description = "For editing umbraco data from external clients", - AutoDocumentation = true)] - public class wordApi : UmbracoMetaWeblogAPI - { - public wordApi() - { - } - - [XmlRpcMethod("metaWeblog.newMediaObject", - Description = "Makes a new file to a designated blog using the " - + "metaWeblog API. Returns url as a string of a struct.")] - public MediaObjectInfo newMediaObject( - string blogid, - string username, - string password, - FileData file) - { - return newMediaObjectLogicForWord(blogid.ToString(), username, password, file); - } - - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/ImageViewerUpdater.asmx b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/ImageViewerUpdater.asmx deleted file mode 100644 index e5ab3a96529e..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/ImageViewerUpdater.asmx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebService Language="C#" CodeBehind="ImageViewerUpdater.asmx.cs" Class="umbraco.controls.Images.ImageViewerUpdater" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/ImageViewerUpdater.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/ImageViewerUpdater.asmx.cs deleted file mode 100644 index 4818edfd81bd..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/ImageViewerUpdater.asmx.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.Services; -using System.ComponentModel; -using System.Web.Script.Services; -using System.Web.UI; -using umbraco.controls.Images; -using System.IO; -using System.Web.Script.Serialization; -using umbraco.businesslogic.Utils; -using umbraco.presentation.webservices; - -namespace umbraco.controls.Images -{ - /// - /// An ajax service to return the html for an image based on a media id - /// - [WebService(Namespace = "http://tempuri.org/")] - [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] - [ToolboxItem(false)] - [ScriptService] - [Obsolete("This is no longer used and will be removed in future versions")] - public class ImageViewerUpdater : System.Web.Services.WebService - { - - /// - /// return the a json object with the properties - /// html = the html returned for rendering the image viewer - /// mediaId = the media id loaded - /// width = the width of the media (0) if not found - /// height = the height of the media (0) if not found - /// url = the url of the image - /// alt = the alt text for the image - /// - /// - [WebMethod] - public Dictionary UpdateImage(int mediaId, string style, string linkTarget) - { - legacyAjaxCalls.Authorize(); - - - //load the control with the specified properties and render the output as a string and return it - Page page = new Page(); - string path = Umbraco.Core.IO.IOHelper.ResolveUrl(Umbraco.Core.IO.SystemDirectories.Umbraco) + "/controls/Images/ImageViewer.ascx"; - - ImageViewer imageViewer = page.LoadControl(path) as ImageViewer; - imageViewer.MediaId = mediaId; - ImageViewer.Style _style = (ImageViewer.Style)Enum.Parse(typeof(ImageViewer.Style), style); - imageViewer.ViewerStyle = _style; - imageViewer.LinkTarget = linkTarget; - - //this adds only the anchor with image to be rendered, not the whole control! - page.Controls.Add(imageViewer); - - imageViewer.DataBind(); - - StringWriter sw = new StringWriter(); - HttpContext.Current.Server.Execute(page, sw, false); - - Dictionary rVal = new Dictionary(); - rVal.Add("html", sw.ToString()); - rVal.Add("mediaId", imageViewer.MediaId.ToString()); - rVal.Add("width", imageViewer.FileWidth.ToString()); - rVal.Add("height", imageViewer.FileHeight.ToString()); - rVal.Add("url", imageViewer.MediaItemPath); - rVal.Add("alt", imageViewer.AltText); - - return rVal; - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx deleted file mode 100644 index 5c8cfd32573e..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx +++ /dev/null @@ -1,28 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UploadMediaImage.ascx.cs" - Inherits="umbraco.controls.Images.UploadMediaImage" %> -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="ctl" Namespace="umbraco.controls" Assembly="umbraco" %> - - - - - - - - - - - - - - - - - - - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx.cs deleted file mode 100644 index 24d115c6d6b2..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx.cs +++ /dev/null @@ -1,115 +0,0 @@ -using System; -using System.Web.UI; -using System.Web.UI.HtmlControls; -using System.Linq; -using System.Xml; -using umbraco.BasePages; -using umbraco.cms.businesslogic.datatype; -using umbraco.interfaces; -using Media = umbraco.cms.businesslogic.media.Media; -using Umbraco.Core; - -namespace umbraco.controls.Images -{ - - /// - /// A control to render out the controls to upload a new image to media. - /// Includes ability to select where in the media you would like it to upload and also supports client - /// callback methods once complete. - /// - public partial class UploadMediaImage : UserControl - { - - public UploadMediaImage() - { - OnClientUpload = ""; - } - - /// - /// The JavaScript method to be invoked once the image is uploaded, the page is rendered and the document is ready. - /// The method will receive a JSON object with the following parameters: - /// - imagePath - /// - thumbnailPath - /// - width - /// - height - /// - id - /// - public string OnClientUpload { get; set; } - - protected IDataType UploadField = DataTypeDefinition.GetByDataTypeId(new Guid(Constants.PropertyEditors.UploadField)).DataType; - - protected override void OnInit(EventArgs e) - { - - base.OnInit(e); - // Get upload field from datafield factory - UploadControl.Controls.Add((Control)UploadField.DataEditor); - } - - protected void Page_Load(object sender, EventArgs e) - { - - ((HtmlInputFile)UploadField.DataEditor).ID = "uploadFile"; - if (!IsPostBack) - { - DataBind(); - } - - - } - - protected void SubmitButton_Click(object sender, EventArgs e) - { - var media = Media.MakeNew(TextBoxTitle.Text, cms.businesslogic.media.MediaType.GetByAlias(Constants.Conventions.MediaTypes.Image), BasePage.Current.getUser(), int.Parse(MediaPickerControl.Value)); - - foreach (var property in media.GenericProperties) - { - if (property.PropertyType.DataTypeDefinition.DataType.Id == UploadField.Id) - { - UploadField.DataTypeDefinitionId = property.PropertyType.DataTypeDefinition.Id; - UploadField.Data.PropertyId = property.Id; - } - } - UploadField.DataEditor.Save(); - //MCH NOTE: After having refactored the legacy api to use the new api under the hood, it is necessary to set the property value and save the media. - var prop = media.GenericProperties.FirstOrDefault(x => x.PropertyType.DataTypeDefinition.DataType.Id == UploadField.Id); - prop.Value = UploadField.Data.Value; - media.Save(); - - pane_upload.Visible = false; - - //this seems real ugly since we apparently already have the properties above (props)... but this data layer is insane and undecipherable:) - string mainImage = media.getProperty(Constants.Conventions.Media.File).Value.ToString(); - string extension = mainImage.Substring(mainImage.LastIndexOf(".") + 1, mainImage.Length - mainImage.LastIndexOf(".") - 1); - var thumbnail = mainImage.Remove(mainImage.Length - extension.Length - 1, extension.Length + 1) + "_thumb." + extension; - string width = media.getProperty(Constants.Conventions.Media.Width).Value.ToString(); - string height = media.getProperty(Constants.Conventions.Media.Height).Value.ToString(); - int id = media.Id; - - feedback.Style.Add("margin-top", "8px"); - feedback.type = uicontrols.Feedback.feedbacktype.success; - if (mainImage.StartsWith("~")) mainImage = mainImage.Substring(1); - if (thumbnail.StartsWith("~")) thumbnail = thumbnail.Substring(1); - feedback.Text += ""; - - if (!string.IsNullOrEmpty(OnClientUpload)) - { - feedback.Text += @" - "; - } - - } - - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - - ((HtmlInputFile)UploadField.DataEditor).Attributes.Add("onChange", "uploader_" + this.ClientID + ".validateImage();"); - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx.designer.cs deleted file mode 100644 index 0ecc358f57fa..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/UploadMediaImage.ascx.designer.cs +++ /dev/null @@ -1,109 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4200 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.controls.Images -{ - - - public partial class UploadMediaImage { - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - - /// - /// pane_upload control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_upload; - - /// - /// pp_name control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_name; - - /// - /// TextBoxTitle control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextBoxTitle; - - /// - /// pp_file control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_file; - - /// - /// UploadControl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder UploadControl; - - /// - /// pp_target control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_target; - - /// - /// pp_button control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_button; - - /// - /// SubmitButton control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button SubmitButton; - - /// - /// feedback control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Feedback feedback; - - protected global::umbraco.controls.ContentPicker MediaPickerControl; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/passwordChanger.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/passwordChanger.ascx.cs deleted file mode 100644 index c7e5aedc5a3d..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/passwordChanger.ascx.cs +++ /dev/null @@ -1,151 +0,0 @@ -using System; -using System.Configuration.Provider; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Umbraco.Core; -using Umbraco.Core.Security; -using Umbraco.Web.Models; - -namespace umbraco.controls -{ - public partial class passwordChanger : UserControl - { - public string MembershipProviderName { get; set; } - - protected MembershipProvider Provider - { - get { return Membership.Providers[MembershipProviderName]; } - } - - private bool? _showOldPassword; - - /// - /// Determines whether to show the old password field or not - /// - internal protected bool ShowOldPassword - { - get - { - if (_showOldPassword.HasValue == false) - { - var umbProvider = Provider as MembershipProviderBase; - if (umbProvider != null && umbProvider.AllowManuallyChangingPassword) - { - _showOldPassword = false; - } - else - { - _showOldPassword = Provider.EnablePasswordRetrieval == false; - } - } - return _showOldPassword.Value; - } - internal set { _showOldPassword = value; } - } - - public bool IsChangingPassword - { - get - { - var convertAttempt = IsChangingPasswordField.Value.TryConvertTo(); - return convertAttempt.Success && convertAttempt.Result; - } - } - - private readonly ChangingPasswordModel _model = new ChangingPasswordModel(); - - public ChangingPasswordModel ChangingPasswordModel - { - get - { - _model.NewPassword = umbPasswordChanger_passwordNew.Text; - _model.OldPassword = umbPasswordChanger_passwordCurrent.Text; - _model.Reset = ResetPasswordCheckBox.Checked; - return _model; - } - } - - [Obsolete("Use the ChangingPasswordModel instead")] - public string Password - { - get { return ChangingPasswordModel.NewPassword; } - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - if (Membership.Providers[MembershipProviderName] == null) - { - throw new ProviderException("The membership provider " + MembershipProviderName + " was not found"); - } - - //TODO: WE need to support this! - requires UI updates, etc... - if (Provider.RequiresQuestionAndAnswer) - { - throw new NotSupportedException("Currently the user editor does not support providers that have RequiresQuestionAndAnswer specified"); - } - } - - /// - /// umbPasswordChanger_passwordNew control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox umbPasswordChanger_passwordNew; - - /// - /// umbPasswordChanger_passwordNewConfirm control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox umbPasswordChanger_passwordNewConfirm; - - /// - /// CompareValidator1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CompareValidator ConfirmPasswordValidator; - - /// - /// IsChangingPassword control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.HiddenField IsChangingPasswordField; - - /// - /// ResetPasswordCheckBox control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox ResetPasswordCheckBox; - - /// - /// umbPasswordChanger_passwordCurrent control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox umbPasswordChanger_passwordCurrent; - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/DLRScripting.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/DLRScripting.ascx.cs deleted file mode 100644 index 1b8a29ee56a2..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/DLRScripting.ascx.cs +++ /dev/null @@ -1,185 +0,0 @@ -using System; -using System.Collections; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.HtmlControls; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Xml.Linq; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Web.UI; -using umbraco.cms.businesslogic.macro; -using umbraco.scripting; -using umbraco.BasePages; - -namespace umbraco.presentation.create -{ - public partial class DLRScripting : System.Web.UI.UserControl - { - protected System.Web.UI.WebControls.ListBox nodeType; - - protected void Page_Load(object sender, System.EventArgs e) - { - sbmt.Text = ui.Text("create"); - if (!Page.IsPostBack) - { - foreach (MacroEngineLanguage lang in MacroEngineFactory.GetSupportedUILanguages()) - { - filetype.Items.Add(new ListItem(string.Format(".{0} ({1})", lang.Extension.ToLowerInvariant(), lang.EngineName), lang.Extension)); - } - filetype.SelectedIndex = 0; - } - LoadTemplates(template, filetype.SelectedValue); - } - - protected void MacroExistsValidator_OnServerValidate(object source, ServerValidateEventArgs args) - { - if (createMacro.Checked) - { - //TODO: Shouldn't this use our string functions to create the alias ? - var fileName = rename.Text + "." + filetype.SelectedValue; - var name = fileName - .Substring(0, (fileName.LastIndexOf('.') + 1)).Trim('.') - .SplitPascalCasing().ToFirstUpperInvariant(); - - var macro = ApplicationContext.Current.Services.MacroService.GetByAlias(name); - if (macro != null) - { - args.IsValid = false; - } - } - } - - protected void sbmt_Click(object sender, System.EventArgs e) - { - if (Page.IsValid) - { - var createMacroVal = 0; - if (createMacro.Checked) - createMacroVal = 1; - - var returnUrl = LegacyDialogHandler.Create( - new HttpContextWrapper(Context), - BasePage.Current.getUser(), - helper.Request("nodeType"), - createMacroVal, - template.SelectedValue + "|||" + rename.Text + "." + filetype.SelectedValue); - - BasePage.Current.ClientTools - .ChangeContentFrameUrl(returnUrl) - .ChildNodeCreated() - .CloseModalWindow(); - } - } - - public void loadTemplates(object sender, EventArgs e) - { - LoadTemplates(template, filetype.SelectedValue); - } - - private void LoadTemplates(ListBox list, string scriptType) - { - string path = SystemDirectories.Umbraco + "/scripting/templates/" + scriptType + "/"; - string abPath = IOHelper.MapPath(path); - list.Items.Clear(); - - // always add the option of an empty one - list.Items.Add(scriptType == "cshtml" - ? new ListItem("Empty template", "cshtml/EmptyTemplate.cshtml") - : new ListItem("Empty template", "")); - - if (System.IO.Directory.Exists(abPath)) - { - string extension = "." + scriptType; - - //Already adding Empty Template as the first item, so don't add it again - foreach (System.IO.FileInfo fi in new System.IO.DirectoryInfo(abPath).GetFiles("*" + extension).Where(fi => fi.Name != "EmptyTemplate.cshtml")) - { - string filename = System.IO.Path.GetFileName(fi.FullName); - - var liText = filename.Replace(extension, "").SplitPascalCasing().ToFirstUpperInvariant(); - list.Items.Add(new ListItem(liText, scriptType + "/" + filename)); - } - } - } - - protected global::System.Web.UI.WebControls.CustomValidator MacroExistsValidator; - - /// - /// rename control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox rename; - - /// - /// RequiredFieldValidator1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; - - /// - /// UpdatePanel1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.UpdatePanel UpdatePanel1; - - /// - /// filetype control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ListBox filetype; - - /// - /// template control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ListBox template; - - /// - /// createMacro control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox createMacro; - - /// - /// sbmt control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button sbmt; - - /// - /// Textbox1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox Textbox1; - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/DLRScriptingTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/DLRScriptingTasks.cs deleted file mode 100644 index fd13010167d6..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/DLRScriptingTasks.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System; -using System.IO; -using Umbraco.Core.IO; -using Umbraco.Core.Logging; -using Umbraco.Core; -using Umbraco.Web.UI; -using Umbraco.Core.Logging; -using umbraco.BusinessLogic; - -namespace umbraco -{ - public class DLRScriptingTasks : LegacyDialogTask - { - - public override bool PerformSave() - { - var template = Alias.Substring(0, Alias.IndexOf("|||")).Trim(); - var fileName = Alias.Substring(Alias.IndexOf("|||") + 3, Alias.Length - Alias.IndexOf("|||") - 3).Replace(" ", ""); - - if (!fileName.Contains(".")) - fileName = Alias + ".py"; - - var scriptContent = ""; - if (!string.IsNullOrEmpty(template)) - { - var templateFile = System.IO.File.OpenText(IOHelper.MapPath(SystemDirectories.Umbraco + "/scripting/templates/" + template)); - scriptContent = templateFile.ReadToEnd(); - templateFile.Close(); - } - - var abFileName = IOHelper.MapPath(SystemDirectories.MacroScripts + "/" + fileName); - - if (!System.IO.File.Exists(abFileName)) - { - if (fileName.Contains("/")) //if there's a / create the folder structure for it - { - var folders = fileName.Split("/".ToCharArray()); - var basePath = IOHelper.MapPath(SystemDirectories.MacroScripts); - for (var i = 0; i < folders.Length - 1; i++) - { - basePath = System.IO.Path.Combine(basePath, folders[i]); - System.IO.Directory.CreateDirectory(basePath); - } - } - - var abFileFolder = Path.GetDirectoryName(abFileName); - if (string.IsNullOrWhiteSpace(abFileFolder) == false) - if (Directory.Exists(abFileFolder) == false) - Directory.CreateDirectory(abFileFolder); - - var scriptWriter = System.IO.File.CreateText(abFileName); - scriptWriter.Write(scriptContent); - scriptWriter.Flush(); - scriptWriter.Close(); - - if (ParentID == 1) - { - var name = fileName - .Substring(0, (fileName.LastIndexOf('.') + 1)).Trim('.') - .SplitPascalCasing().ToFirstUpperInvariant(); - cms.businesslogic.macro.Macro m = cms.businesslogic.macro.Macro.MakeNew(name); - m.ScriptingFile = fileName; - m.Save(); - } - } - - _returnUrl = string.Format(SystemDirectories.Umbraco + "/developer/python/editPython.aspx?file={0}", fileName); - return true; - } - - public override bool PerformDelete() - { - var path = IOHelper.MapPath(SystemDirectories.MacroScripts + "/" + Alias.TrimStart('/')); - try - { - System.IO.File.Delete(path); - } - catch (Exception ex) - { - LogHelper.Error(string.Format("Could not remove DLR file {0} - User {1}", Alias, User.Id), ex); - } - return true; - } - - private string _returnUrl = ""; - - public override string ReturnUrl - { - get { return _returnUrl; } - } - - public override string AssignedApp - { - get { return DefaultApps.developer.ToString(); } - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewMacrosTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewMacrosTasks.cs deleted file mode 100644 index 9d1926bee43a..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewMacrosTasks.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Umbraco.Core.CodeAnnotations; -using umbraco.BusinessLogic; - -namespace umbraco -{ - /// - /// The UI 'tasks' for the create dialog and delete processes - /// - [UmbracoWillObsolete("http://issues.umbraco.org/issue/U4-1373", "This will one day be removed when we overhaul the create process")] - public class PartialViewMacroTasks : PartialViewTasksBase - { - public override string AssignedApp - { - get { return DefaultApps.developer.ToString(); } - } - - protected override bool IsPartialViewMacro - { - get { return true; } - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasks.cs deleted file mode 100644 index 326479ee34c3..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasks.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Umbraco.Core.CodeAnnotations; -using umbraco.BusinessLogic; - -namespace umbraco -{ - /// - /// The UI 'tasks' for the create dialog and delete processes - /// - [UmbracoWillObsolete("http://issues.umbraco.org/issue/U4-1373", "This will one day be removed when we overhaul the create process")] - public class PartialViewTasks : PartialViewTasksBase - { - public override string AssignedApp - { - get { return DefaultApps.settings.ToString(); } - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasksBase.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasksBase.cs deleted file mode 100644 index 9f810c01b8c6..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasksBase.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.IO; -using System.Web; -using Umbraco.Core.CodeAnnotations; -using Umbraco.Core.Configuration; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using Umbraco.Web; -using Umbraco.Web.UI; -using umbraco.BasePages; -using Umbraco.Core; - -namespace umbraco -{ - /// - /// The base UI 'tasks' for the create dialog and delete processes - /// - [UmbracoWillObsolete("http://issues.umbraco.org/issue/U4-1373", "This will one day be removed when we overhaul the create process")] - public abstract class PartialViewTasksBase : LegacyDialogTask - { - private string _returnUrl = string.Empty; - - public override string ReturnUrl - { - get { return _returnUrl; } - } - - protected virtual string EditViewFile - { - get { return "Settings/Views/EditView.aspx"; } - } - - protected virtual bool IsPartialViewMacro - { - get { return false; } - } - - public override bool PerformSave() - { - var pipesIndex = Alias.IndexOf("|||", StringComparison.Ordinal); - var snippetName = Alias.Substring(0, pipesIndex).Trim(); - var fileName = Alias.Substring(pipesIndex + 3, Alias.Length - pipesIndex - 3); - if (fileName.ToLowerInvariant().EndsWith(".cshtml") == false) - { - fileName += ".cshtml"; - } - - var model = new PartialView(IsPartialViewMacro ? PartialViewType.PartialViewMacro : PartialViewType.PartialView, fileName); - var fileService = (FileService)ApplicationContext.Current.Services.FileService; - var macroService = ApplicationContext.Current.Services.MacroService; - - if (IsPartialViewMacro == false) - { - var attempt = fileService.CreatePartialView(model, snippetName, User.Id); - _returnUrl = string.Format("settings/views/EditView.aspx?treeType=partialViews&file={0}", HttpUtility.UrlEncode(model.Path.TrimStart('/').Replace("\\", "/"))); - return attempt.Success; - } - else - { - - var attempt = fileService.CreatePartialViewMacro(model, /*ParentID == 1,*/ snippetName, User.Id); - // if ParentId = 0 then that means that the "Create macro" checkbox was OFF, so don't try to create an actual macro - // See PartialViewMacro.ascx.cs and PartialView.ascx.cs: SubmitButton_Click - if (attempt && ParentID != 0) - { - //The partial view path to be saved with the macro must be a fully qualified virtual path - var virtualPath = string.Format("{0}/{1}/{2}", SystemDirectories.MvcViews, "MacroPartials", attempt.Result.Path); - macroService.Save(new Macro(attempt.Result.Alias, attempt.Result.Alias) { ScriptPath = virtualPath }); - } - - _returnUrl = string.Format("settings/views/EditView.aspx?treeType=partialViewMacros&file={0}", HttpUtility.UrlEncode(model.Path.TrimStart('/').Replace("\\", "/"))); - return attempt.Success; - } - - } - - public override bool PerformDelete() - { - var fileService = (FileService)ApplicationContext.Current.Services.FileService; - - if (IsPartialViewMacro == false) - { - if (Alias.Contains(".") == false) - { - //there is no extension so we'll assume it's a folder - fileService.DeletePartialViewFolder(Alias.TrimStart('/')); - return true; - } - return fileService.DeletePartialView(Alias.TrimStart('/'), User.Id); - } - - if (Alias.Contains(".") == false) - { - //there is no extension so we'll assume it's a folder - fileService.DeletePartialViewMacroFolder(Alias.TrimStart('/')); - return true; - } - return fileService.DeletePartialViewMacro(Alias.TrimStart('/'), User.Id); - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/ScriptTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/ScriptTasks.cs deleted file mode 100644 index 876fd6d343a6..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/ScriptTasks.cs +++ /dev/null @@ -1,76 +0,0 @@ -using Umbraco.Core.IO; -using Umbraco.Web.UI; -using Umbraco.Core; -using Umbraco.Core.Logging; -using Umbraco.Core.Models; -using umbraco.BusinessLogic; -using umbraco.BasePages; - -namespace umbraco -{ - public class ScriptTasks : LegacyDialogTask - { - - public override bool PerformSave() - { - var scriptFileAr = Alias.Split('\u00A4'); - - var fileName = scriptFileAr[0]; - var fileType = scriptFileAr[1]; - - var createFolder = ParentID; - - if (createFolder == 1) - { - ApplicationContext.Current.Services.FileService.CreateScriptFolder(fileName); - return true; - } - - // remove file extension - if (fileName.ToLowerInvariant().EndsWith(fileType.ToLowerInvariant())) - { - fileName = fileName.Substring(0, - fileName.ToLowerInvariant().LastIndexOf(fileType.ToLowerInvariant(), System.StringComparison.Ordinal) - 1); - } - - var scriptPath = fileName + "." + fileType; - var found = ApplicationContext.Current.Services.FileService.GetScriptByName(scriptPath); - if (found != null) - { - _returnUrl = string.Format("settings/scripts/editScript.aspx?file={0}", scriptPath.TrimStart('/')); - return true; - } - var script = new Script(fileName + "." + fileType); - ApplicationContext.Current.Services.FileService.SaveScript(script); - _returnUrl = string.Format("settings/scripts/editScript.aspx?file={0}", scriptPath.TrimStart('/')); - return true; - } - - public override bool PerformDelete() - { - if (Alias.Contains(".") == false) - { - //there is no extension so we'll assume it's a folder - ApplicationContext.Current.Services.FileService.DeleteScriptFolder(Alias.TrimStart('/')); - } - else - { - ApplicationContext.Current.Services.FileService.DeleteScript(Alias.TrimStart('/'), User.Id); - } - - return true; - } - - private string _returnUrl = ""; - - public override string ReturnUrl - { - get { return _returnUrl; } - } - - public override string AssignedApp - { - get { return DefaultApps.settings.ToString(); } - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/script.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/script.ascx.cs deleted file mode 100644 index 68bb6582e297..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/script.ascx.cs +++ /dev/null @@ -1,125 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Linq; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Web.UI; -using umbraco.cms.helpers; -using umbraco.BasePages; -using Umbraco.Core.IO; - -namespace umbraco.presentation.umbraco.create -{ - public partial class script : System.Web.UI.UserControl - { - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - sbmt.Text = ui.Text("create"); - - // Enable new item in folders to place items in that folder. - if (Request["nodeType"] == "scriptsFolder") - rename.Text = Request["nodeId"].EnsureEndsWith('/'); - } - - protected void SubmitClick(object sender, System.EventArgs e) - { - int createFolder = 0; - if (scriptType.SelectedValue == "") - { - createFolder = 1; - ContainsValidator.Enabled = true; - Page.Validate(); - } - - if (Page.IsValid) - { - string returnUrl = LegacyDialogHandler.Create( - new HttpContextWrapper(Context), - BasePage.Current.getUser(), - helper.Request("nodeType"), - createFolder, - rename.Text + '\u00A4' + scriptType.SelectedValue); - - BasePage.Current.ClientTools - .ChangeContentFrameUrl(returnUrl) - .ReloadActionNode(false, true) - .CloseModalWindow(); - - } - } - - override protected void OnInit(EventArgs e) - { - base.OnInit(e); - - ContainsValidator.Enabled = false; - - string[] fileTypes = UmbracoConfig.For.UmbracoSettings().Content.ScriptFileTypes.ToArray(); - - scriptType.Items.Add(new ListItem(ui.Text("folder"), "")); - scriptType.Items.FindByText(ui.Text("folder")).Selected = true; - - foreach (string str in fileTypes) - { - scriptType.Items.Add(new ListItem("." + str + " file", str)); - } - } - - /// - /// rename control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox rename; - - /// - /// RequiredFieldValidator1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; - protected global::System.Web.UI.WebControls.RegularExpressionValidator EndsWithValidator; - protected global::System.Web.UI.WebControls.RegularExpressionValidator ContainsValidator; - - /// - /// scriptType control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ListBox scriptType; - - /// - /// CreateMacroCheckBox control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox CreateMacroCheckBox; - - /// - /// sbmt control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button sbmt; - - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/templateTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/templateTasks.cs deleted file mode 100644 index 8c1cab8e7882..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/templateTasks.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Data; -using System.Web.Security; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Web.UI; -using umbraco.BusinessLogic; -using umbraco.DataLayer; -using umbraco.BasePages; -using Umbraco.Core.IO; -using umbraco.cms.businesslogic.member; - -namespace umbraco -{ - public class templateTasks : LegacyDialogTask - { - public override bool PerformSave() - { - var masterId = ParentID; - - var editor = "settings/editTemplate.aspx"; - if (UmbracoConfig.For.UmbracoSettings().Templates.DefaultRenderingEngine == RenderingEngine.Mvc) - editor = "settings/views/editView.aspx"; - - if (masterId > 0) - { - var id = cms.businesslogic.template.Template.MakeNew(Alias, User, new cms.businesslogic.template.Template(masterId)).Id; - _returnUrl = string.Format("{1}?treeType=templates&templateID={0}", id, editor); - } - else - { - var id = cms.businesslogic.template.Template.MakeNew(Alias, User).Id; - _returnUrl = string.Format("{1}?treeType=templates&templateID={0}", id, editor); - - } - return true; - } - - public override bool PerformDelete() - { - new cms.businesslogic.template.Template(ParentID).delete(); - return false; - } - - private string _returnUrl = ""; - - public override string ReturnUrl - { - get { return _returnUrl; } - } - - public override string AssignedApp - { - get { return DefaultApps.settings.ToString(); } - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/userTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/userTasks.cs deleted file mode 100644 index f62915cfb160..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/userTasks.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Data; -using System.Web.Security; -using Umbraco.Core.Configuration; -using Umbraco.Core.Logging; -using Umbraco.Web.UI; -using umbraco.BusinessLogic; -using Umbraco.Core.Security; -using umbraco.DataLayer; -using umbraco.BasePages; -using Umbraco.Core.IO; -using umbraco.cms.businesslogic.member; - -namespace umbraco -{ - public class userTasks : LegacyDialogTask - { - private string _returnUrl = ""; - - public override string ReturnUrl - { - get { return _returnUrl; } - } - - public override string AssignedApp - { - get { return DefaultApps.users.ToString(); } - } - - public override bool PerformSave() - { - // Hot damn HACK > user is allways UserType with id = 1 = administrator ??? - // temp password deleted by NH - //BusinessLogic.User.MakeNew(Alias, Alias, "", BusinessLogic.UserType.GetUserType(1)); - //return true; - - var provider = MembershipProviderExtensions.GetUsersMembershipProvider(); - - var status = MembershipCreateStatus.ProviderError; - try - { - // Password is auto-generated. They are they required to change the password by editing the user information. - - var password = Membership.GeneratePassword( - provider.MinRequiredPasswordLength, - provider.MinRequiredNonAlphanumericCharacters); - - var parts = Alias.Split(new[] {'|'}, StringSplitOptions.RemoveEmptyEntries); - if (parts.Length != 2) - { - return false; - } - var login = parts[0]; - var email = parts[1]; - - var u = provider.CreateUser( - login, password, email.Trim().ToLower(), "", "", true, null, out status); - - if (u == null) - { - return false; - } - - _returnUrl = string.Format("users/EditUser.aspx?id={0}", u.ProviderUserKey); - - return status == MembershipCreateStatus.Success; - } - catch (Exception ex) - { - LogHelper.Error(string.Format("Failed to create the user. Error from provider: {0}", status.ToString()), ex); - return false; - } - } - - public override bool PerformDelete() - { - var u = User.GetUser(ParentID); - u.disable(); - return true; - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/LatestEdits.ascx b/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/LatestEdits.ascx deleted file mode 100644 index 48ad25fec345..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/LatestEdits.ascx +++ /dev/null @@ -1,14 +0,0 @@ -<%@ Control Language="c#" AutoEventWireup="True" Codebehind="LatestEdits.ascx.cs" Inherits="dashboardUtilities.LatestEdits" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> - - - -
-

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

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

" + dt.Text + "

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

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

Property Types:

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

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

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

Tabs:

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

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

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

Allowed children:

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

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

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

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

-
- - - -
- - -
-

-

- -

-

-

-

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

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

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

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

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

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

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

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

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

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

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

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

-
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/mediaPicker.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/mediaPicker.aspx.cs deleted file mode 100644 index 0b30058780c2..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/mediaPicker.aspx.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using umbraco.BasePages; - -namespace umbraco.presentation.umbraco.dialogs -{ - public partial class mediaPicker : UmbracoEnsuredPage - { - protected void Page_Load(object sender, EventArgs e) - { - if (!IsPostBack) - DataBind(); - - } - - protected override void OnInit(EventArgs e) - { - uicontrols.TabPage tp = tv_options.NewTabPage(ui.Text("choose")); - tp.HasMenu = false; - tp.Controls.Add(pane_select); - - uicontrols.TabPage tp2 = tv_options.NewTabPage(ui.Text("create") + " " + ui.Text("new")); - tp2.HasMenu = false; - tp2.Controls.Add(pane_upload); - - base.OnInit(e); - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/mediaPicker.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/mediaPicker.aspx.designer.cs deleted file mode 100644 index e1342377a4c4..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/mediaPicker.aspx.designer.cs +++ /dev/null @@ -1,79 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ -using System; - -namespace umbraco.presentation.umbraco.dialogs { - - [Obsolete("This is no longer used and will be removed in future versions")] - public partial class mediaPicker { - - /// - /// pane_src control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_src; - - /// - /// ImageViewer control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.controls.Images.ImageViewer ImageViewer; - - /// - /// tv_options control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.TabView tv_options; - - /// - /// pane_select control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_select; - - /// - /// DialogTree control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.controls.Tree.TreeControl DialogTree; - - /// - /// pane_upload control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel pane_upload; - - /// - /// MediaUploader control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.controls.Images.UploadMediaImage MediaUploader; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs deleted file mode 100644 index c7ae70e246be..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs +++ /dev/null @@ -1,444 +0,0 @@ -using System; -using System.Collections; -using System.Globalization; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Xml; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using umbraco.BasePages; -using System.Linq; -using umbraco.cms.presentation.user; -using umbraco.interfaces; -using Umbraco.Web; -using Umbraco.Core; - -namespace umbraco.dialogs -{ - /// - /// Summary description for moveOrCopy. - /// - public partial class moveOrCopy : UmbracoEnsuredPage - { - - protected override void OnInit(EventArgs e) - { - CurrentApp = Request["app"]; - - base.OnInit(e); - } - - protected void Page_Load(object sender, EventArgs e) - { - JTree.DataBind(); - - // Put user code to initialize the page here - if (IsPostBack == false) - { - pp_relate.Text = ui.Text("moveOrCopy", "relateToOriginal"); - - //Document Type copy Hack... - - if (CurrentApp == Constants.Applications.Settings) - { - pane_form.Visible = false; - pane_form_notice.Visible = false; - pane_settings.Visible = true; - - ok.Text = ui.Text("general", "ok", UmbracoUser); - ok.Attributes.Add("style", "width: 60px"); - - var documentType = Services.ContentTypeService.GetContentType(int.Parse(Request.GetItemAsString("id"))); - - //Load master types... - masterType.Attributes.Add("style", "width: 350px;"); - masterType.Items.Add(new ListItem(ui.Text("none") + "...", "0")); - - foreach (var docT in Services.ContentTypeService.GetAllContentTypes().OrderBy(x => x.Name)) - { - masterType.Items.Add(new ListItem(docT.Name, docT.Id.ToString(CultureInfo.InvariantCulture))); - } - - masterType.SelectedValue = (documentType.ParentId > 0 ? documentType.ParentId : 0).ToString(CultureInfo.InvariantCulture); - - rename.Text = documentType.Name + " (copy)"; - pane_settings.Text = "Make a copy of the document type '" + documentType.Name + "' and save it under a new name"; - - } - else - { - pane_form.Visible = true; - pane_form_notice.Visible = true; - - pane_settings.Visible = false; - - // Caption and properies on BUTTON - ok.Text = ui.Text("general", "ok", UmbracoUser); - ok.Attributes.Add("style", "width: 60px"); - ok.Attributes.Add("disabled", "true"); - - IContentBase currContent; - if (CurrentApp == "content") - { - currContent = Services.ContentService.GetById(Request.GetItemAs("id")); - } - else - { - currContent = Services.MediaService.GetById(Request.GetItemAs("id")); - } - - // Preselect the parent of the seslected item. - if (currContent.ParentId > 0) - JTree.SelectedNodePath = currContent.Path.Substring(0, currContent.Path.LastIndexOf(',')); - - var validAction = true; - if (CurrentApp == Constants.Applications.Content && Umbraco.Core.Models.ContentExtensions.HasChildren(currContent, Services)) - { - validAction = ValidAction(currContent, Request.GetItemAsString("mode") == "cut" ? 'M' : 'O'); - } - - if (Request.GetItemAsString("mode") == "cut") - { - pane_form.Text = ui.Text("moveOrCopy", "moveTo", currContent.Name, UmbracoUser); - pp_relate.Visible = false; - } - else - { - pane_form.Text = ui.Text("moveOrCopy", "copyTo", currContent.Name, UmbracoUser); - pp_relate.Visible = true; - } - - if (validAction == false) - { - panel_buttons.Visible = false; - ScriptManager.RegisterStartupScript(this, GetType(), "notvalid", "notValid();", true); - } - } - } - - } - - private bool ValidAction(IContentBase cmsNode, char actionLetter) - { - var currentAction = BusinessLogic.Actions.Action.GetPermissionAssignable().First(a => a.Letter == actionLetter); - return CheckPermissions(cmsNode, currentAction); - } - - /// - /// Checks if the current user has permissions to execute this action against this node - /// - /// - /// - /// - /// - /// This used to do a recursive check for all descendent nodes but this is not required and is a massive CPU hog. - /// See: http://issues.umbraco.org/issue/U4-2632, https://groups.google.com/forum/?fromgroups=#!topic/umbraco-dev/L1D4LwVSP2Y - /// - private bool CheckPermissions(IContentBase node, IAction currentAction) - { - var currUserPermissions = new UserPermissions(CurrentUser); - var lstCurrUserActions = currUserPermissions.GetExistingNodePermission(node.Id); - - return lstCurrUserActions.Contains(currentAction); - } - - private void HandleDocumentTypeCopy() - { - var contentTypeService = ApplicationContext.Current.Services.ContentTypeService; - var contentType = contentTypeService.GetContentType( - int.Parse(Request.GetItemAsString("id"))); - - //set the master - //http://issues.umbraco.org/issue/U4-2843 - //http://issues.umbraco.org/issue/U4-3552 - var parentId = int.Parse(masterType.SelectedValue); - - var alias = rename.Text.Trim().Replace("'", "''"); - var clone = contentTypeService.Copy(contentType, alias, rename.Text.Trim(), parentId); - - var returnUrl = string.Format("{0}/settings/editNodeTypeNew.aspx?id={1}", SystemDirectories.Umbraco, clone.Id); - - pane_settings.Visible = false; - panel_buttons.Visible = false; - - feedback.Text = "Document type copied"; - feedback.type = uicontrols.Feedback.feedbacktype.success; - - ClientTools.ChangeContentFrameUrl(returnUrl); - } - - public void HandleMoveOrCopy(object sender, EventArgs e) - { - if (CurrentApp == Constants.Applications.Settings) - HandleDocumentTypeCopy(); - else - HandleDocumentMoveOrCopy(); - } - - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/cmsnode.asmx")); - ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/legacyAjaxCalls.asmx")); - } - - private void HandleDocumentMoveOrCopy() - { - if (Request.GetItemAsString("copyTo") != "" && Request.GetItemAsString("id") != "") - { - // Check if the current node is allowed at new position - var nodeAllowed = false; - - IContentBase currContent; - IContentBase parentContent = null; - IContentTypeBase parentContentType = null; - if (CurrentApp == "content") - { - currContent = Services.ContentService.GetById(Request.GetItemAs("id")); - if (Request.GetItemAs("copyTo") != -1) - { - parentContent = Services.ContentService.GetById(Request.GetItemAs("copyTo")); - if (parentContent != null) - { - parentContentType = Services.ContentTypeService.GetContentType(parentContent.ContentTypeId); - } - } - } - else - { - currContent = Services.MediaService.GetById(Request.GetItemAs("id")); - if (Request.GetItemAs("copyTo") != -1) - { - parentContent = Services.MediaService.GetById(Request.GetItemAs("copyTo")); - if (parentContent != null) - { - parentContentType = Services.ContentTypeService.GetMediaType(parentContent.ContentTypeId); - } - } - } - - // Check on contenttypes - if (parentContentType == null) - { - //check if this is allowed at root - IContentTypeBase currContentType; - if (CurrentApp == "content") - { - currContentType = Services.ContentTypeService.GetContentType(currContent.ContentTypeId); - } - else - { - currContentType = Services.ContentTypeService.GetMediaType(currContent.ContentTypeId); - } - nodeAllowed = currContentType.AllowedAsRoot; - if (!nodeAllowed) - { - feedback.Text = ui.Text("moveOrCopy", "notAllowedAtRoot", UmbracoUser); - feedback.type = uicontrols.Feedback.feedbacktype.error; - } - } - else - { - var allowedChildContentTypeIds = parentContentType.AllowedContentTypes.Select(x => x.Id).ToArray(); - if (allowedChildContentTypeIds.Any(x => x.Value == currContent.ContentTypeId)) - { - nodeAllowed = true; - } - - if (nodeAllowed == false) - { - feedback.Text = ui.Text("moveOrCopy", "notAllowedByContentType", UmbracoUser); - feedback.type = uicontrols.Feedback.feedbacktype.error; - } - else - { - // Check on paths - if ((string.Format(",{0},", parentContent.Path)).IndexOf(string.Format(",{0},", currContent.Id)) > -1) - { - nodeAllowed = false; - feedback.Text = ui.Text("moveOrCopy", "notAllowedByPath", UmbracoUser); - feedback.type = uicontrols.Feedback.feedbacktype.error; - } - } - } - - if (nodeAllowed) - { - pane_form.Visible = false; - pane_form_notice.Visible = false; - panel_buttons.Visible = false; - - var newNodeCaption = parentContent == null - ? ui.Text(CurrentApp) - : parentContent.Name; - - string[] nodes = { currContent.Name, newNodeCaption }; - - if (Request["mode"] == "cut") - { - if (CurrentApp == Constants.Applications.Content) - { - var doc = (IContent)currContent; - var copyToId = Request.GetItemAs("copyTo"); - Services.ContentService.Move(doc, copyToId, UmbracoUser.Id); - - } - else - { - var media = (IMedia)currContent; - var copyToId = Request.GetItemAs("copyTo"); - Services.MediaService.Move(media, copyToId, UmbracoUser.Id); - } - - feedback.Text = ui.Text("moveOrCopy", "moveDone", nodes, UmbracoUser) + "

" + ui.Text("closeThisWindow") + ""; - feedback.type = uicontrols.Feedback.feedbacktype.success; - - // refresh tree - ClientTools.MoveNode(currContent.Id.ToString(), currContent.Path); - } - else - { - //NOTE: We ONLY support Copy on content not media for some reason. - - var newContent = (IContent)currContent; - Services.ContentService.Copy(newContent, Request.GetItemAs("copyTo"), RelateDocuments.Checked, UmbracoUser.Id); - - feedback.Text = ui.Text("moveOrCopy", "copyDone", nodes, UmbracoUser) + "

" + ui.Text("closeThisWindow") + ""; - feedback.type = uicontrols.Feedback.feedbacktype.success; - - // refresh tree - ClientTools.CopyNode(currContent.Id.ToString(), newContent.Path); - } - } - } - } - - ///

- /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - - /// - /// feedback control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Feedback feedback; - - /// - /// pane_form control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_form; - - /// - /// JTree control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.controls.Tree.TreeControl JTree; - - /// - /// pp_relate control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_relate; - - /// - /// RelateDocuments control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox RelateDocuments; - - /// - /// pane_form_notice control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder pane_form_notice; - - /// - /// pane_settings control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pane_settings; - - /// - /// PropertyPanel1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel PropertyPanel1; - - /// - /// masterType control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ListBox masterType; - - /// - /// rename control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox rename; - - /// - /// RequiredFieldValidator1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; - - /// - /// panel_buttons control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel panel_buttons; - - /// - /// ok control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button ok; - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs index 97dc8d84d372..195ac15ec80e 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs @@ -1,5 +1,6 @@ using System; using System.Collections; +using System.Globalization; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; @@ -26,7 +27,7 @@ public notifications() protected void Page_Load(object sender, EventArgs e) { Button1.Text = ui.Text("update"); - pane_form.Text = ui.Text("notifications", "editNotifications", node.Text, base.getUser()); + pane_form.Text = ui.Text("notifications", "editNotifications", Server.HtmlEncode(node.Text), base.getUser()); } #region Web Form Designer generated code @@ -49,7 +50,7 @@ protected override void OnInit(EventArgs e) { CheckBox c = new CheckBox(); - c.ID = a.Letter.ToString(); + c.ID = a.Letter.ToString(CultureInfo.InvariantCulture); if (base.getUser().GetNotifications(node.Path).IndexOf(a.Letter) > -1) c.Checked = true; diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx.cs deleted file mode 100644 index 255c61cbe80b..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx.cs +++ /dev/null @@ -1,240 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.Generic; -using System.Web.UI; -using System.Web.UI.WebControls; -using Umbraco.Core.Logging; -using umbraco.cms.businesslogic.web; -using umbraco.BusinessLogic; -using Umbraco.Core.Logging; -using umbraco.BasePages; - -namespace umbraco.dialogs -{ - /// - /// Summary description for publish. - /// - [Obsolete("This is no longer used whatsoever and will be removed from the codebase")] - public partial class publish : UmbracoEnsuredPage - { - protected Literal total; - - private int _nodeId; - private int _nodesPublished = 0; - private readonly List _documents = new List(); - public static string pageName = ""; - - public publish() - { - CurrentApp = DefaultApps.content.ToString(); - } - - protected void Page_Load(object sender, EventArgs e) - { - _nodeId = int.Parse(helper.Request("id")); - var d = new cms.businesslogic.web.Document(_nodeId); - pageName = d.Text; - - if (d.Level > 1 && d.PathPublished == false) - { - TheForm.Visible = false; - theEnd.Visible = true; - feedbackMsg.type = uicontrols.Feedback.feedbacktype.notice; - feedbackMsg.Text = ui.Text("publish", "contentPublishedFailedByParent", d.Text, getUser()) + "

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

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

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

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

- /// masterPagePrefix control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal masterPagePrefix; - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - - /// - /// TheForm control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel TheForm; - - /// - /// PublishAll control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox PublishAll; - - /// - /// PublishUnpublishedItems control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox PublishUnpublishedItems; - - /// - /// ok control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button ok; - - /// - /// ProgBar1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.ProgressBar ProgBar1; - - /// - /// theEnd control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel theEnd; - - /// - /// feedbackMsg control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Feedback feedbackMsg; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.cs index 34ff19907edd..b28e40163b0e 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.cs @@ -3,6 +3,7 @@ using System.ComponentModel; using System.Data; using System.Drawing; +using System.Linq; using System.Web; using System.Web.SessionState; using System.Web.UI; @@ -117,36 +118,23 @@ protected void Page_Load(object sender, System.EventArgs e) if (!IsPostBack) { allVersions.Items.Add(new ListItem(ui.Text("rollback", "selectVersion")+ "...", "")); - foreach (DocumentVersionList dl in currentDoc.GetVersions()) { + + foreach (DocumentVersionList dl in currentDoc.GetVersions()) + { + //we don't need to show the current version + if (dl.Version == currentDoc.Version) + continue; + allVersions.Items.Add(new ListItem(dl.Text + " (" + ui.Text("content", "createDate") + ": " + dl.Date.ToShortDateString() + " " + dl.Date.ToShortTimeString() + ")", dl.Version.ToString())); } Button1.Text = ui.Text("actions", "rollback"); } } - - #region Web Form Designer generated code - override protected void OnInit(EventArgs e) - { - // - // CODEGEN: This call is required by the ASP.NET Web Form Designer. - // - InitializeComponent(); - base.OnInit(e); - } - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - - } - #endregion - + protected void doRollback_Click(object sender, System.EventArgs e) { - if (allVersions.SelectedValue.Trim() != "") { + if (allVersions.SelectedValue.Trim() != "") + { Document d = new Document(int.Parse(helper.Request("nodeId"))); d.RollBack(new Guid(allVersions.SelectedValue), base.getUser()); @@ -159,6 +147,8 @@ protected void doRollback_Click(object sender, System.EventArgs e) feedBackMsg.Text = ui.Text("rollback", "documentRolledBack", vars, new global::umbraco.BusinessLogic.User(0)) + "

" + ui.Text("closeThisWindow") + ""; diffPanel.Visible = false; pl_buttons.Visible = false; + + ClientTools.ReloadLocationIfMatched(string.Format("/content/content/edit/{0}", d.Id)); } } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.cs index c02baaaa7b84..a7483901a9ff 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.cs @@ -1,4 +1,5 @@ using System; +using System.Linq; using System.Data; using System.Configuration; using System.Collections; @@ -13,6 +14,7 @@ using umbraco.cms.businesslogic; using umbraco.BusinessLogic; using umbraco.BasePages; +using Umbraco.Core; namespace umbraco.presentation.dialogs { @@ -70,7 +72,7 @@ protected void Page_Load(object sender, EventArgs e) // Translators foreach (var u in BusinessLogic.User.getAll()) - if (u.UserType.Alias.ToLower() == "translator" || UserHasTranslatePermission(u, _currentPage)) + if (u.GetGroups().Contains(Constants.Security.TranslatorGroupAlias, StringComparer.InvariantCultureIgnoreCase) || UserHasTranslatePermission(u, _currentPage)) translator.Items.Add(new ListItem(u.Name, u.Id.ToString())); if (translator.Items.Count == 0) { diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sort.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sort.aspx.cs index f3dbb435192e..f3bb4c8fdc55 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sort.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sort.aspx.cs @@ -13,6 +13,8 @@ using umbraco.cms.businesslogic.web; using System.Web.UI; using System.Collections.Generic; +using umbraco.businesslogic.Exceptions; +using Umbraco.Core.Models; namespace umbraco.cms.presentation { @@ -20,7 +22,13 @@ namespace umbraco.cms.presentation /// Summary description for sort. ///

public partial class sort : UmbracoEnsuredPage - { + { + /// + /// The Parent Id being sorted + /// + protected int? ParentIdAsInt { get; private set; } + protected string ParentIdAsString { get; private set; } + private readonly List _nodes = new List(); protected bool HideDateColumn @@ -33,6 +41,21 @@ protected override void OnInit(EventArgs e) { CurrentApp = helper.Request("app"); + ParentIdAsString = Request.GetItemAsString("ID"); + int parentId; + if (int.TryParse(ParentIdAsString, out parentId)) + { + ParentIdAsInt = parentId; + + if (CurrentApp == Constants.Applications.Content || CurrentApp == Constants.Applications.Media) + { + CheckPathAndPermissions( + ParentIdAsInt.Value, + CurrentApp == Constants.Applications.Content ? UmbracoObjectTypes.Document : UmbracoObjectTypes.Media, + ActionSort.Instance); + } + } + base.OnInit(e); } @@ -50,23 +73,22 @@ protected override void OnPreRender(EventArgs e) var app = Request.GetItemAsString("app"); var icon = "../images/umbraco/doc.gif"; - - int parentId; - if (int.TryParse(Request.GetItemAsString("ID"), out parentId)) + + if (ParentIdAsInt.HasValue) { if (app == Constants.Applications.Media) { icon = "../images/umbraco/mediaPhoto.gif"; var mediaService = ApplicationContext.Current.Services.MediaService; - if (parentId == -1) + if (ParentIdAsInt.Value == -1) { foreach (var child in mediaService.GetRootMedia().ToList().OrderBy(x => x.SortOrder)) _nodes.Add(CreateNode(child.Id.ToInvariantString(), child.SortOrder, child.Name, child.CreateDate, icon)); } else { - var children = mediaService.GetChildren(parentId); + var children = mediaService.GetChildren(ParentIdAsInt.Value); foreach (var child in children.OrderBy(x => x.SortOrder)) _nodes.Add(CreateNode(child.Id.ToInvariantString(), child.SortOrder, child.Name, child.CreateDate, icon)); } @@ -76,14 +98,14 @@ protected override void OnPreRender(EventArgs e) { var contentService = ApplicationContext.Current.Services.ContentService; - if (parentId == -1) + if (ParentIdAsInt.Value == -1) { foreach (var child in contentService.GetRootContent().ToList().OrderBy(x => x.SortOrder)) _nodes.Add(CreateNode(child.Id.ToInvariantString(), child.SortOrder, child.Name, child.CreateDate, icon)); } else { - var children = contentService.GetChildren(parentId); + var children = contentService.GetChildren(ParentIdAsInt.Value); foreach (var child in children) _nodes.Add(CreateNode(child.Id.ToInvariantString(), child.SortOrder, child.Name, child.CreateDate, icon)); } @@ -100,7 +122,7 @@ protected override void OnPreRender(EventArgs e) HideDateColumn = true; - var stylesheetName = Request.GetItemAsString("ID"); + var stylesheetName = ParentIdAsString; if (stylesheetName.IsNullOrWhiteSpace())throw new NullReferenceException("No Id passed in to editor"); var stylesheet = Services.FileService.GetStylesheetByName(stylesheetName.EnsureEndsWith(".css")); if (stylesheet == null) throw new InvalidOperationException("No stylesheet found by name " + stylesheetName); diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx deleted file mode 100644 index f72dba32d0f6..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx +++ /dev/null @@ -1,28 +0,0 @@ -<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoDialog.Master" CodeBehind="uploadImage.aspx.cs" - AutoEventWireup="True" Inherits="umbraco.dialogs.uploadImage" %> - -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> -<%@ Register TagName="MediaUpload" TagPrefix="umb" Src="../controls/Images/UploadMediaImage.ascx" %> - - - - - - - - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx.cs deleted file mode 100644 index f5b9415f854c..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Web; -using System.Web.SessionState; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.HtmlControls; - -using System.Xml; -using umbraco.BusinessLogic; -using Umbraco.Core.IO; - -namespace umbraco.dialogs -{ - [Obsolete("Use the UploadMediaImage control instead")] - public partial class uploadImage : BasePages.UmbracoEnsuredPage - { - public uploadImage() - { - CurrentApp = DefaultApps.media.ToString(); - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx.designer.cs deleted file mode 100644 index b34a3851bf86..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/uploadImage.aspx.designer.cs +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4200 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.dialogs { - - - public partial class uploadImage { - - /// - /// MediaUploader control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.controls.Images.UploadMediaImage MediaUploader; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx.cs deleted file mode 100644 index b09ef1565fe1..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace umbraco.presentation.umbraco -{ - - - public partial class helpRedirect : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - Help help = new Help(UmbracoSettings.HelpPages); - - HelpPage requestedHelpPage = new HelpPage - { - Application = Request.QueryString["Application"], - ApplicationUrl = Request.QueryString["ApplicationUrl"], - Language = Request.QueryString["Language"], - UserType = Request.QueryString["UserType"] - }; - - Response.Redirect(help.ResolveHelpUrl(requestedHelpPage)); - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx deleted file mode 100644 index ce4cc6ede90f..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx +++ /dev/null @@ -1 +0,0 @@ -<%@ Page language="c#" Codebehind="language.aspx.cs" AutoEventWireup="True" Inherits="umbraco.js.language" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.cs deleted file mode 100644 index 3d38d897d3ca..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Text; -using System.Xml; -using umbraco.BasePages; -using umbraco.BusinessLogic; - -namespace umbraco.js -{ - [Obsolete("This is no longer used and will be removed from the codebase in future versions")] - public partial class language : BasePage - { - protected void Page_Load(object sender, EventArgs e) - { - Response.ContentType = "application/json"; - string lang = "en"; - if(ValidateCurrentUser()){ - lang = UmbracoUser.Language; - } - - XmlDocument all = ui.getLanguageFile(lang); - - if(all == null) - return; - - StringBuilder sb = new StringBuilder(); - - foreach(XmlNode x in all.DocumentElement.ChildNodes) - { - if(x == null) - continue; - - for (int i = 0; i < x.ChildNodes.Count; i++) - { - sb.Append("\n"); - - XmlNode key = x.ChildNodes[i]; - if (key.FirstChild == null || string.IsNullOrEmpty(key.FirstChild.Value)) - continue; - - XmlNode n1 = x.Attributes.GetNamedItem("alias"); - if (n1 == null) - continue; - XmlNode n2 = key.Attributes.GetNamedItem("alias"); - if (n2 == null) - continue; - string _tempKey = string.Format("{0}_{1}", n1.Value, n2.Value); - - // we need to remove linie breaks as they can't break js - string tmpStr = key.FirstChild.Value.Replace("\\", "\\\\").Replace("\"", "'").Replace("\t", "").Replace("\r", "").Replace("\n", ""); - - sb.Append("\"" + _tempKey + "\": \"" + tmpStr + "\","); - - } - } - var f = "{" + sb.ToString().Trim().Trim(',').Trim() + "}"; - Response.Write(f); - } - - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.designer.cs deleted file mode 100644 index 41417754ea95..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.designer.cs +++ /dev/null @@ -1,15 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.js { - - public partial class language { - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.resx b/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.resx deleted file mode 100644 index dd0ea4d8e395..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/js/language.aspx.resx +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.0.0.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx deleted file mode 100644 index b3b8a9b19839..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx +++ /dev/null @@ -1,41 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InsertAnchor.aspx.cs" Inherits="umbraco.presentation.umbraco.plugins.tinymce3.InsertAnchor" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> - - - - <%= umbraco.ui.Text("insertAnchor") %> - - - - - - - - - - - - - - -
- - - - - -
<%= umbraco.ui.Text("name") %>:
- -
-
- " /> -
- -
- " onclick="tinyMCEPopup.close();" /> -
-
-
- - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx.cs deleted file mode 100644 index 0b50bb9b72b4..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using umbraco.BusinessLogic; -using umbraco.businesslogic.Exceptions; - -namespace umbraco.presentation.umbraco.plugins.tinymce3 -{ - public partial class InsertAnchor : BasePages.UmbracoEnsuredPage - { - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - //this could be used for media or content so we need to at least validate that the user has access to one or the other - if (!ValidateUserApp(DefaultApps.content.ToString()) && !ValidateUserApp(DefaultApps.media.ToString())) - throw new UserAuthorizationException("The current user doesn't have access to the section/app"); - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - ClientLoader.DataBind(); - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx.designer.cs deleted file mode 100644 index 8b94002a14d9..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/InsertAnchor.aspx.designer.cs +++ /dev/null @@ -1,42 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.presentation.umbraco.plugins.tinymce3 { - - - public partial class InsertAnchor { - - /// - /// ClientLoader control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.UmbracoClientDependencyLoader ClientLoader; - - /// - /// JsInclude4 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude4; - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellChecker.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellChecker.cs deleted file mode 100644 index 87599b44457c..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellChecker.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Web; - -// NB: This class was moved out of the client tinymce folder to aid with upgrades -// but we'll keep the old namespace to make things easier for now (MB) -namespace umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker -{ - /// - /// Base class for a spellchecker for TinyMCE - /// - public abstract class SpellChecker - { - /// - /// Checks all the words submitted - /// - /// The language. - /// The words. - /// - public abstract SpellCheckerResult CheckWords(string language, string[] words); - /// - /// Gets the suggestions for a single word - /// - /// The language. - /// The word. - /// - public abstract SpellCheckerResult GetSuggestions(string language, string word); - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellCheckerInput.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellCheckerInput.cs deleted file mode 100644 index f4cdb3808053..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellCheckerInput.cs +++ /dev/null @@ -1,80 +0,0 @@ - -using System.IO; -using System; -using System.Web.Script.Serialization; -using System.Collections.Generic; - -// NB: This class was moved out of the client tinymce folder to aid with upgrades -// but we'll keep the old namespace to make things easier for now (MB) -namespace umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker -{ - /// - /// Object representation of the input from TinyMCE's spellchecker plugin - /// - public class SpellCheckerInput - { - private SpellCheckerInput() - { - Words = new List(); - } - - /// - /// Gets or sets the id from TinyMCE - /// - /// The id. - public string Id { get; set; } - /// - /// Gets or sets the spellchecking method. eg: checkWords, getSuggestions - /// - /// The method. - public string Method { get; set; } - /// - /// Gets or sets the language used by the content - /// - /// The language. - public string Language { get; set; } - /// - /// Gets or sets the words which are to be spell checked - /// - /// The words. - public List Words { get; set; } - - - /// - /// Parses the specified stream into the object - /// - /// The stream. - /// - public static SpellCheckerInput Parse(StreamReader inputStream) - { - if (inputStream == null) - { - throw new ArgumentNullException("stream"); - } - if (inputStream.EndOfStream) - { - throw new ArgumentException("Stream end reached before we started!"); - } - var jsonString = inputStream.ReadLine(); - var deserialized = (Dictionary)new JavaScriptSerializer().DeserializeObject(jsonString); - - var input = new SpellCheckerInput(); - input.Id = (string)deserialized["id"]; - input.Method = (string)deserialized["method"]; - input.Language = (string)((object[])deserialized["params"])[0]; - if (((object[])deserialized["params"])[1] is string) - { - input.Words.Add((string)((object[])deserialized["params"])[1]); - } - else - { - var words = ((object[])((object[])deserialized["params"])[1]); - foreach (var word in words) - { - input.Words.Add((string)word); - } - } - return input; - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellCheckerResult.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellCheckerResult.cs deleted file mode 100644 index 1372629cf873..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/SpellCheckerResult.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Web; - -// NB: This class was moved out of the client tinymce folder to aid with upgrades -// but we'll keep the old namespace to make things easier for now (MB) -namespace umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker -{ - /// - /// Object which will be returned to TinyMCE from the spellchecker - /// - public class SpellCheckerResult - { - public SpellCheckerResult() - { - result = new List(); - } - - /// - /// Gets or sets the spellcheck words - /// - /// The result. - public List result { get; set; } - /// - /// Gets or sets the id of the initial request - /// - /// The id. - public string id { get; set; } - /// - /// Gets or sets the error details if there was a problem when performing the spellcheck - /// - /// The error. - public string error { get; set; } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx deleted file mode 100644 index 3341ce4bf10a..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx +++ /dev/null @@ -1,64 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="insertChar.aspx.cs" Inherits="umbraco.presentation.umbraco.plugins.tinymce3.insertChar" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> - - - - - <%= umbraco.ui.Text("insertCharacter")%> - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
 
 
-
- - - - - - - - - - - - - - - - -
HTML-Code
 
 
NUM-Code
 
-
- - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.cs deleted file mode 100644 index 6b81b2c12917..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using umbraco.BusinessLogic; -using umbraco.businesslogic.Exceptions; - -namespace umbraco.presentation.umbraco.plugins.tinymce3 -{ - public partial class insertChar : BasePages.UmbracoEnsuredPage - { - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - //this could be used for media or content so we need to at least validate that the user has access to one or the other - if (!ValidateUserApp(DefaultApps.content.ToString()) && !ValidateUserApp(DefaultApps.media.ToString())) - throw new UserAuthorizationException("The current user doesn't have access to the section/app"); - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - ClientLoader.DataBind(); - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.designer.cs deleted file mode 100644 index fc3cc23f13be..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.designer.cs +++ /dev/null @@ -1,42 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.presentation.umbraco.plugins.tinymce3 { - - - public partial class insertChar { - - /// - /// ClientLoader control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.UmbracoClientDependencyLoader ClientLoader; - - /// - /// JsInclude4 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude4; - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertImage.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertImage.aspx deleted file mode 100644 index 7c4a878ee56b..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertImage.aspx +++ /dev/null @@ -1,202 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="insertImage.aspx.cs" Inherits="umbraco.presentation.plugins.tinymce3.insertImage" %> -<%@ Register TagPrefix="ui" Namespace="umbraco.uicontrols" Assembly="controls" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="umb2" TagName="Tree" Src="../../controls/Tree/TreeControl.ascx" %> -<%@ Register TagPrefix="umb3" TagName="Image" Src="../../controls/Images/ImageViewer.ascx" %> -<%@ Register TagName="MediaUpload" TagPrefix="umb4" Src="../../controls/Images/UploadMediaImage.ascx" %> -<%@ Register TagPrefix="umbClient" Namespace="Umbraco.Web.UI.Bundles" %> - - - - - {#advimage_dlg.dialog_title} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - : - : - - - - -
- - - - -
- - <%--Manual initialization is set to true because the tree doesn't load properly in some browsers in this TinyMCE window--%> - - -
-
- - - -
- -

- or {#cancel} -

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

- or cancel -

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

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

-
- - - - - - -

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

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

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

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

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

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

- - -

- - - - -

-
- - - - -
    - - -
  • - /> - -
  • -
    - -
- -
\ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/NodePermissions.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/NodePermissions.ascx.cs deleted file mode 100644 index 26a601a9acea..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/NodePermissions.ascx.cs +++ /dev/null @@ -1,145 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using umbraco.BusinessLogic.Actions; -using System.Collections.Generic; -using umbraco.interfaces; -using System.Drawing; -using umbraco.BusinessLogic; -using umbraco.BasePages; - -namespace umbraco.cms.presentation.user -{ - - /// - /// An object to display the current permissions for a user and a node. - /// - public partial class NodePermissions : System.Web.UI.UserControl - { - - protected override void OnInit(EventArgs e) { - base.OnInit(e); - } - - protected void Page_Load(object sender, EventArgs e) - { - DataBind(); - } - - private User m_umbracoUser; - private int[] m_nodeID = {-1}; - private UserPermissions m_userPermissions; - private string m_clientItemChecked = "void(0);"; - - public int UserID - { - get { return m_umbracoUser.Id; } - set - { - m_umbracoUser = BusinessLogic.User.GetUser(value); - m_userPermissions = new UserPermissions(m_umbracoUser); - } - } - - private bool m_viewOnly = false; - public bool ViewOnly { - get { return m_viewOnly; } - set { m_viewOnly = value; } - } - - public int[] NodeID - { - get { return m_nodeID; } - set { m_nodeID = value; } - } - - /// - /// The JavaScript method to call when a node is checked. The method will receive a comma separated list of node IDs that are checked. - /// - public string OnClientItemChecked - { - get { return m_clientItemChecked; } - set { m_clientItemChecked = value; } - } - - public override void DataBind() - { - base.DataBind(); - - - if (m_umbracoUser == null) - throw new ArgumentNullException("No User specified"); - - //get the logged in user's permissions - UserPermissions currUserPermissions = new UserPermissions(UmbracoEnsuredPage.CurrentUser); - - //lookup permissions for last node selected - int selectedNodeId = m_nodeID[m_nodeID.Length - 1]; - - List lstCurrUserActions = currUserPermissions.GetExistingNodePermission(selectedNodeId); - List lstLookupUserActions = m_userPermissions.GetExistingNodePermission(selectedNodeId); - - List lstAllActions = umbraco.BusinessLogic.Actions.Action.GetPermissionAssignable(); - - //no node is selected, disable the check boxes - if (m_nodeID[0] == -1) - { - ShowMessage("No node selected"); - return; - } - - //ensure the current user has access to assign permissions. - //if their actions list is null then it means that the node is not published. - if (lstCurrUserActions == null || lstCurrUserActions.Contains(ActionRights.Instance)) - BindExistingPermissions(lstAllActions, lstLookupUserActions); - else - ShowMessage("You do not have access to assign permissions to this node"); - - string names = ""; - foreach (int id in m_nodeID) { - if(id > 0) - names += new cms.businesslogic.web.Document(id).Text + ", "; - } - - lt_names.Text = names.Trim().Trim(','); - } - - private void ShowMessage(string msg) - { - lblMessage.Visible = true; - lblMessage.Text = msg; - - } - - private void BindExistingPermissions(List allActions, List userActions) - { - - List assignedPermissions = new List(); - foreach (umbraco.interfaces.IAction a in allActions) - { - AssignedPermission p = new AssignedPermission(); - p.Permission = a; - p.HasPermission = (userActions != null ? userActions.Contains(a) : false); - assignedPermissions.Add(p); - } - - rptPermissionsList.DataSource = assignedPermissions; - rptPermissionsList.DataBind(); - - } - - protected struct AssignedPermission - { - public IAction Permission; - public bool HasPermission; - } - - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/NodePermissions.ascx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/NodePermissions.ascx.designer.cs deleted file mode 100644 index c981de682ba5..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/NodePermissions.ascx.designer.cs +++ /dev/null @@ -1,51 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.cms.presentation.user { - - - public partial class NodePermissions { - - /// - /// lt_names control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal lt_names; - - /// - /// pnlReplaceChildren control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel pnlReplaceChildren; - - /// - /// lblMessage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblMessage; - - /// - /// rptPermissionsList control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Repeater rptPermissionsList; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx deleted file mode 100644 index 75b5d6e66a36..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx +++ /dev/null @@ -1,47 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../masterpages/umbracoPage.Master" CodeBehind="PermissionEditor.aspx.cs" Inherits="umbraco.cms.presentation.user.PermissionEditor" %> -<%@ Import Namespace="Umbraco.Web" %> -<%@ Register Src="../controls/Tree/TreeControl.ascx" TagName="TreeControl" TagPrefix="umbraco" %> -<%@ Register Src="NodePermissions.ascx" TagName="NodePermissions" TagPrefix="user" %> -<%@ Register TagPrefix="ui" Namespace="umbraco.uicontrols" Assembly="controls" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> - - - - - - - - - - - -
- -
- -
- -
- - - -
-
- - -
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx.cs deleted file mode 100644 index ae98eb5c2c6e..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx.cs +++ /dev/null @@ -1,108 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using System.Xml; -using System.IO; -using Umbraco.Core; -using umbraco; -using umbraco.BusinessLogic; -using System.Collections.Generic; -using umbraco.BasePages; -using umbraco.BusinessLogic.Actions; -using umbraco.interfaces; -using umbraco.cms.presentation.Trees; -using System.Xml.XPath; -using Umbraco.Core.IO; - -namespace umbraco.cms.presentation.user -{ - - public partial class PermissionEditor : UmbracoEnsuredPage - { - public PermissionEditor() - { - CurrentApp = BusinessLogic.DefaultApps.users.ToString(); - - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - if (!IsPostBack) - { - JTree.App = Constants.Applications.Content; - JTree.ShowContextMenu = false; - JTree.IsDialog = true; - } - } - - protected void Page_Load(object sender, EventArgs e) - { - if (string.IsNullOrEmpty(Request.QueryString["id"])) - return; - - CheckUser(Request.QueryString["id"]); - - var save = pnlUmbraco.Menu.NewButton(); - save.ID = "btnSave"; - save.ButtonType = uicontrols.MenuButtonType.Primary; - save.OnClientClick = "SavePermissions(); return false;"; - save.Text = ui.Text("save"); - save.ToolTip = ui.Text("save"); - - - nodePermissions.UserID = Convert.ToInt32(Request.QueryString["id"]); - pnlUmbraco.Text = ui.Text("user", "userPermissions"); - pnl1.Text = ui.Text("user", "permissionSelectPages"); - - if (!IsPostBack) - { - ClientTools cTools = new ClientTools(this); - cTools.SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree().Tree.Alias) - .SyncTree(Request.QueryString["id"], false); - } - } - - /// - /// Since Umbraco stores users in cache, we'll use this method to retrieve our user object by the selected id - /// - protected umbraco.BusinessLogic.User UmbracoUser - { - get - { - return BusinessLogic.User.GetUser(Convert.ToInt32(Request.QueryString["id"])); - } - } - - /// - /// Makes sure the user exists with the id specified - /// - /// - private void CheckUser(string strID) - { - int id; - bool parsed = false; - umbraco.BusinessLogic.User oUser = null; - if (parsed = int.TryParse(strID, out id)) - oUser = umbraco.BusinessLogic.User.GetUser(id); - - if (oUser == null || oUser.UserType == null || !parsed) - throw new Exception("No user found with id: " + strID); - } - - - protected override void OnPreRender(EventArgs e) { - base.OnPreRender(e); - ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference(SystemDirectories.Umbraco + "/users/PermissionsHandler.asmx")); - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx.designer.cs deleted file mode 100644 index e0c1494dd4e4..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx.designer.cs +++ /dev/null @@ -1,78 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.cms.presentation.user { - - - public partial class PermissionEditor { - - /// - /// CssInclude2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.CssInclude CssInclude2; - - /// - /// CssInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.CssInclude CssInclude1; - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - - /// - /// pnlUmbraco control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.UmbracoPanel pnlUmbraco; - - /// - /// pnl1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane pnl1; - - /// - /// JTree control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.controls.Tree.TreeControl JTree; - - /// - /// nodePermissions control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.cms.presentation.user.NodePermissions nodePermissions; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionsHandler.asmx b/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionsHandler.asmx deleted file mode 100644 index 274efb0789d5..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionsHandler.asmx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebService Language="C#" CodeBehind="PermissionsHandler.asmx.cs" Class="umbraco.cms.presentation.user.PermissionsHandler" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionsHandler.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionsHandler.asmx.cs deleted file mode 100644 index 7813e7e5cb07..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionsHandler.asmx.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using System.Data; -using System.Web; -using System.Collections; -using System.Web.Services; -using System.Web.Services.Protocols; -using System.ComponentModel; -using System.Web.Script.Services; -using System.Web.UI; -using System.IO; -using System.Reflection; -using System.Web.UI.HtmlControls; -using umbraco.BasePages; -using System.Collections.Generic; -using umbraco.interfaces; -using umbraco.BusinessLogic.Actions; -using Umbraco.Core.IO; - -namespace umbraco.cms.presentation.user -{ - /// - /// Summary description for PermissionsHandler - /// - [WebService(Namespace = "http://tempuri.org/")] - [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] - [ToolboxItem(false)] - [ScriptService] - public class PermissionsHandler : System.Web.Services.WebService - { - - /// - /// Loads the NodePermissions UserControl with the appropriate properties, renders the contents and returns the output html. - /// - /// - /// - /// - [WebMethod] - public string GetNodePermissions(int userID, string nodes) - { - Authorize(); - - Page page = new Page(); - - string path = SystemDirectories.Umbraco + "/users/NodePermissions.ascx"; - NodePermissions nodePermissions = page.LoadControl(path) as NodePermissions; - - nodePermissions.UserID = userID; - nodePermissions.NodeID = toIntArray(nodes); - nodePermissions.ID = "nodePermissions"; - - page.Controls.Add(nodePermissions); - StringWriter sw = new StringWriter(); - HttpContext.Current.Server.Execute(page, sw, false); - return sw.ToString(); - } - - - - - [WebMethod] - public string SaveNodePermissions(int userID, string nodes, string permissions, bool replaceChild) - { - Authorize(); - - UserPermissions uPermissions = new UserPermissions(BusinessLogic.User.GetUser(userID)); - List actions = umbraco.BusinessLogic.Actions.Action.FromString(permissions); - uPermissions.SaveNewPermissions(toIntArray(nodes), actions, replaceChild); - - return GetNodePermissions(userID, nodes); - } - - private void Authorize() - { - if (!BasePage.ValidateUserContextID(BasePage.umbracoUserContextID)) - throw new Exception("Client authorization failed. User is not logged in"); - - } - - private int[] toIntArray(string nodeIds) { - - string[] s_nodes = nodeIds.Split(','); - int[] i_nodes = new int[s_nodes.Length]; - - for (int i = 0; i < s_nodes.Length; i++) { - i_nodes[i] = int.Parse(s_nodes[i]); - } - - return i_nodes; - - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/UserPermissions.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/UserPermissions.cs deleted file mode 100644 index 33818d43dfff..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/UserPermissions.cs +++ /dev/null @@ -1,149 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Xml; -using System.IO; -using System.Collections; -using System.Web.UI.WebControls; -using System.Data.SqlClient; -using System.Data; -using Umbraco.Core; -using Umbraco.Web; -using Umbraco.Web.Security; -using umbraco; -using umbraco.BusinessLogic; -using System.Web; -using umbraco.BusinessLogic.Actions; -using umbraco.DataLayer; -using umbraco.cms.businesslogic; -using umbraco.interfaces; -using umbraco.BasePages; -using umbraco.cms.businesslogic.web; - -namespace umbraco.cms.presentation.user -{ - /// - /// Provides umbraco user permission functionality on various nodes. Only nodes that are published are queried via the cache. - /// - public class UserPermissions - { - readonly User _user; - - public UserPermissions(User user) - { - _user = user; - } - - /// - /// saves new permissions with the parameters supplied - /// - /// - /// - /// - public void SaveNewPermissions(int[] nodeIDs, List actions, bool replaceChildren) - { - //ensure permissions that are permission assignable - var permissions = actions.FindAll(a => (a.CanBePermissionAssigned)); - - //ensure that only the nodes that the user has permissions to update are updated - var lstNoPermissions = new List(); - foreach (var nodeId in nodeIDs) - { - var nodeActions = UmbracoContext.Current.UmbracoUser.GetPermissions(GetNodePath(nodeId)); - var lstActions = BusinessLogic.Actions.Action.FromString(nodeActions); - if (lstActions == null || !lstActions.Contains(ActionRights.Instance)) - lstNoPermissions.Add(nodeId); - } - //remove the nodes that the user doesn't have permission to update - var lstNodeIDs = new List(); - lstNodeIDs.AddRange(nodeIDs); - foreach (var noPermission in lstNoPermissions) - lstNodeIDs.Remove(noPermission); - nodeIDs = lstNodeIDs.ToArray(); - - //get the complete list of node ids that this change will affect - var allNodes = new List(); - if (replaceChildren) - { - foreach (var nodeId in nodeIDs) - { - allNodes.Add(nodeId); - allNodes.AddRange(FindChildNodes(nodeId)); - } - } - else - { - allNodes.AddRange(nodeIDs); - } - - //if permissions are to be assigned, then assign them - if (permissions.Count > 0) - { - ApplicationContext.Current.Services.UserService.ReplaceUserPermissions( - _user.Id, permissions.Select(x => x.Letter), allNodes.ToArray()); - } - else - { - //If there are NO permissions for this node, we need to assign the ActionNull permission otherwise - //the node will inherit from it's parent. - ApplicationContext.Current.Services.UserService.ReplaceUserPermissions( - _user.Id, new[] { ActionNull.Instance.Letter }, allNodes.ToArray()); - } - - } - - /// - /// Returns the current user permissions for the node specified - /// - /// - /// - public List GetExistingNodePermission(int nodeId) - { - var path = GetNodePath(nodeId); - if (path != "") - { - //get the user and their permissions - string permissions = _user.GetPermissions(path); - return umbraco.BusinessLogic.Actions.Action.FromString(permissions); - } - return null; - } - - /// - /// gets path attribute for node id passed - /// - /// - /// - private static string GetNodePath(int iNodeId) - { - if (Document.IsDocument(iNodeId)) - { - var doc = new Document(iNodeId); - return doc.Path; - } - - return ""; - } - - /// - /// Finds all child node IDs - /// - /// - /// - private static IEnumerable FindChildNodes(int nodeId) - { - var docs = Document.GetChildrenForTree(nodeId); - var nodeIds = new List(); - foreach (var doc in docs) - { - nodeIds.Add(doc.Id); - if (doc.HasChildren) - { - nodeIds.AddRange(FindChildNodes(doc.Id)); - } - } - return nodeIds; - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/UserTypeTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/UserTypeTasks.cs deleted file mode 100644 index 0a8e02341a38..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/UserTypeTasks.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Data; -using System.Configuration; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Umbraco.Web.UI; -using umbraco.interfaces; -using umbraco.BusinessLogic; - -namespace umbraco.cms.presentation.user -{ - public class UserTypeTasks : LegacyDialogTask - { - public override bool PerformSave() - { - try - { - var u = UserType.MakeNew(Alias, "", Alias); - _returnUrl = string.Format("users/EditUserType.aspx?id={0}", u.Id); - return true; - } - catch - { - return false; - } - } - - public override bool PerformDelete() - { - var userType = UserType.GetUserType(ParentID); - if (userType == null) - return false; - userType.Delete(); - return true; - } - - private string _returnUrl = ""; - public override string ReturnUrl - { - get { return _returnUrl; } - } - - public override string AssignedApp - { - get { return DefaultApps.users.ToString(); } - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Developer.asmx b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Developer.asmx deleted file mode 100644 index 2ca307ed1046..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Developer.asmx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebService Language="c#" Codebehind="Developer.asmx.cs" Class="umbraco.webservices.Developer" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Developer.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Developer.asmx.cs deleted file mode 100644 index 6d579d6fc90a..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Developer.asmx.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System.Globalization; -using System.Web.Services; -using System.Xml; -using Umbraco.Core; -using Umbraco.Web.WebServices; -using umbraco.BusinessLogic; -using umbraco.presentation.webservices; - -namespace umbraco.webservices -{ - /// - /// Summary description for Developer. - /// - [WebService(Namespace="http://umbraco.org/webservices/")] - public class Developer : UmbracoAuthorizedWebService - { - - [WebMethod] - public string BootStrapTidy(string html, string ContextID) - { - //pretty sure this is legacy and it used to throw an exception so we'll continue to do the same - //true = throw if invalid - AuthorizeRequest(true); - - return cms.helpers.xhtml.BootstrapTidy(html); - } - - [WebMethod] - public XmlNode GetMacros(string Login, string Password) - { - if (ValidateCredentials(Login, Password) - && UserHasAppAccess(DefaultApps.developer.ToString(), Login)) - { - var xmlDoc = new XmlDocument(); - var macros = xmlDoc.CreateElement("macros"); - foreach (var m in cms.businesslogic.macro.Macro.GetAll()) - { - var mXml = xmlDoc.CreateElement("macro"); - mXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "id", m.Id.ToString(CultureInfo.InvariantCulture))); - mXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "alias", m.Alias)); - mXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "name", m.Name)); - macros.AppendChild(mXml); - } - return macros; - } - return null; - } - - [WebMethod] - public XmlNode GetMacro(int Id, string Login, string Password) - { - if (ValidateCredentials(Login, Password) - && UserHasAppAccess(DefaultApps.developer.ToString(), Login)) - { - var xmlDoc = new XmlDocument(); - var macro = xmlDoc.CreateElement("macro"); - var m = new cms.businesslogic.macro.Macro(Id); - macro.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "id", m.Id.ToString(CultureInfo.InvariantCulture))); - macro.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "refreshRate", m.RefreshRate.ToString(CultureInfo.InvariantCulture))); - macro.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "useInEditor", m.UseInEditor.ToString())); - macro.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "alias", m.Alias)); - macro.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "name", m.Name)); - macro.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "assembly", m.Assembly)); - macro.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "type", m.Type)); - macro.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "xslt", m.Xslt)); - var properties = xmlDoc.CreateElement("properties"); - foreach (var mp in m.Properties) - { - var pXml = xmlDoc.CreateElement("property"); - pXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "alias", mp.Alias)); - pXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "name", mp.Name)); - pXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "public", true.ToString())); - properties.AppendChild(pXml); - } - macro.AppendChild(properties); - return macro; - } - return null; - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/MediaUploader.ashx b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/MediaUploader.ashx deleted file mode 100644 index 3dab7a3f91ea..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/MediaUploader.ashx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebHandler Language="C#" CodeBehind="MediaUploader.ashx.cs" Class="umbraco.presentation.umbraco.webservices.MediaUploader" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/MediaUploader.ashx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/MediaUploader.ashx.cs deleted file mode 100644 index 54ab4aa12d7e..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/MediaUploader.ashx.cs +++ /dev/null @@ -1,399 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.IO; -using System.Linq; -using System.Web; -using System.Web.Configuration; -using System.Web.Script.Serialization; -using System.Web.Security; -using System.Web.UI; -using System.Xml; -using System.Xml.Serialization; -using Umbraco.Core.Configuration; -using Umbraco.Core.Logging; -using umbraco.BasePages; -using umbraco.BusinessLogic; -using umbraco.businesslogic.Exceptions; -using umbraco.cms.businesslogic.media; -using Umbraco.Core; -using Umbraco.Core.Security; - -namespace umbraco.presentation.umbraco.webservices -{ - [Obsolete("This should no longer be used, use the WebApi methods to upload media")] - public class MediaUploader : IHttpHandler - { - protected User AuthenticatedUser { get; set; } - - public bool IsReusable - { - get { return false; } - } - - public void ProcessRequest(HttpContext context) - { - MediaResponse response = null; - - var action = context.Request["action"]; - - if (IsValidRequest(context) && !string.IsNullOrEmpty(action)) - { - switch (action.ToLower()) - { - case "config": - response = ProcessConfigRequest(context); - break; - case "folderlist": - response = ProcessFolderListRequest(context); - break; - case "upload": - response = ProcessUploadRequest(context); - break; - } - } - - // Set success flag - if (response != null) - response.success = true; - else - response = new MediaResponse { success = false }; - - context.Response.Clear(); - context.Response.Charset = "UTF-8"; - context.Response.Cache.SetCacheability(HttpCacheability.NoCache); - context.Response.Cache.SetAllowResponseInBrowserHistory(true); - - var format = context.Request["format"]; - switch (format) - { - case "json": - // Format as JSON - // Weirdly, this should be set to text/html to make it respond as json according to: - // http://stackoverflow.com/questions/6934393/resource-interpreted-as-document-but-transferred-with-mime-type-application-jso - context.Response.ContentType = @"text/html"; - - context.Response.Write(new JavaScriptSerializer().Serialize(response)); - - break; - default: - // Format as XML - context.Response.ContentType = @"text/xml"; - - var serializer = new XmlSerializer(response.GetType()); - serializer.Serialize(context.Response.OutputStream, response); - - break; - } - - - context.Response.End(); - } - - public ConfigResponse ProcessConfigRequest(HttpContext context) - { - return new ConfigResponse - { - displayName = new User(context.Request["username"]).Name, - umbracoPath = VirtualPathUtility.ToAbsolute(GlobalSettings.Path), - maxRequestLength = GetMaxRequestLength() - }; - } - - public FolderListResponse ProcessFolderListRequest(HttpContext context) - { - var response = new FolderListResponse - { - folder = new FolderListItem() - }; - - var startMediaId = AuthenticatedUser.StartMediaId; - if (startMediaId < 1) - { - response.folder.id = -1; - response.folder.name = "Media"; - - CreateMediaTree(Media.GetRootMedias(), response.folder); - } - else - { - var root = new Media(startMediaId); - - response.folder.id = root.Id; - response.folder.name = root.Text; - - CreateMediaTree(root.Children, response.folder); - } - - return response; - } - - public UploadResponse ProcessUploadRequest(HttpContext context) - { - int parentNodeId; - if (int.TryParse(context.Request["parentNodeId"], out parentNodeId) && context.Request.Files.Count > 0) - { - try - { - var parentNode = new Media(parentNodeId); - // Check FilePath - if (!string.IsNullOrEmpty(context.Request["path"])) - { - var pathParts = context.Request["path"].Trim('/').Split('/'); - - foreach (var pathPart in pathParts.Where(part => string.IsNullOrWhiteSpace(part) == false)) - parentNode = GetOrCreateFolder(parentNode, pathPart); - - parentNodeId = parentNode.Id; - } - - // Check whether to replace existing - bool parsed; - var replaceExisting = (context.Request["replaceExisting"] == "1" || (bool.TryParse(context.Request["replaceExisting"], out parsed) && parsed)); - - // loop through uploaded files - for (var j = 0; j < context.Request.Files.Count; j++) - { - // get the current file - var uploadFile = context.Request.Files[j]; - - //Are we allowed to upload this? - var ext = uploadFile.FileName.Substring(uploadFile.FileName.LastIndexOf('.') + 1).ToLower(); - if (UmbracoConfig.For.UmbracoSettings().Content.DisallowedUploadFiles.Contains(ext)) - { - LogHelper.Warn("Cannot upload file " + uploadFile.FileName + ", it is not approved in `disallowedUploadFiles` in ~/config/UmbracoSettings.config"); - continue; - } - - using (var inputStream = uploadFile.InputStream) - { - // if there was a file uploded - if (uploadFile.ContentLength > 0) - { - // Ensure we get the filename without the path in IE in intranet mode - // http://stackoverflow.com/questions/382464/httppostedfile-filename-different-from-ie - var fileName = uploadFile.FileName; - if (fileName.LastIndexOf(@"\") > 0) - fileName = fileName.Substring(fileName.LastIndexOf(@"\") + 1); - - fileName = Umbraco.Core.IO.IOHelper.SafeFileName(fileName); - - var postedMediaFile = new PostedMediaFile - { - FileName = fileName, - DisplayName = context.Request["name"], - ContentType = uploadFile.ContentType, - ContentLength = uploadFile.ContentLength, - InputStream = inputStream, - ReplaceExisting = replaceExisting - }; - - // Get concrete MediaFactory - var factory = MediaFactory.GetMediaFactory(parentNodeId, postedMediaFile, AuthenticatedUser); - - // Handle media Item - var media = factory.HandleMedia(parentNodeId, postedMediaFile, AuthenticatedUser); - } - } - } - - var scripts = new ClientTools(new Page()); - scripts.SyncTree(parentNode.Path, true); - - // log succes - LogHelper.Info(string.Format("Success uploading to parent {0}", parentNodeId)); - } - catch (Exception e) - { - // log error - LogHelper.Error(string.Format("Error uploading to parent {0}", parentNodeId), e); - } - } - else - { - // log error - LogHelper.Warn(string.Format("Parent node id is in incorrect format: {0}", parentNodeId)); - } - - return new UploadResponse(); - } - - #region Helper Methods - - private bool IsValidRequest(HttpContext context) - { - // check for secure connection - if (GlobalSettings.UseSSL && !context.Request.IsSecureConnection) - throw new UserAuthorizationException("This installation requires a secure connection (via SSL). Please update the URL to include https://"); - - var username = context.Request["username"]; - var password = context.Request["password"]; - var ticket = context.Request["ticket"]; - - var isValid = false; - - if (!string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(password)) - { - var mp = MembershipProviderExtensions.GetUsersMembershipProvider(); - if (mp != null && mp.ValidateUser(username, password)) - { - var user = new User(username); - isValid = user.Applications.Any(app => app.alias == Constants.Applications.Media); - - if (isValid) - AuthenticatedUser = user; - } - } - else if (!string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(ticket)) - { - var t = FormsAuthentication.Decrypt(ticket); - var user = new User(username); - - if (t != null) - isValid = user.LoginName.ToLower() == t.Name.ToLower() && user.Applications.Any(app => app.alias == Constants.Applications.Media); - - if (isValid) - AuthenticatedUser = user; - } - else - { - var usr = User.GetCurrent(); - - if (BasePage.ValidateUserContextID(BasePage.umbracoUserContextID) && usr != null) - { - //The user is valid based on their cookies, but is the request valid? We need to validate - // against CSRF here. We'll do this by ensuring that the request contains a token which will - // be equal to the decrypted version of the current user's user context id. - var token = context.Request["__reqver"]; - if (token.IsNullOrWhiteSpace() == false) - { - //try decrypting it - try - { - var decrypted = token.DecryptWithMachineKey(); - //now check if it matches - if (decrypted == BasePage.umbracoUserContextID) - { - isValid = true; - AuthenticatedUser = usr; - } - } - catch - { - //couldn't decrypt, so it's invalid - } - - } - } - } - - return isValid; - } - - private void CreateMediaTree(IEnumerable nodes, FolderListItem folder) - { - foreach (var media in nodes.Where(media => media != null && media.ContentType != null && media.ContentType.Alias == Constants.Conventions.MediaTypes.Folder)) - { - var subFolder = new FolderListItem - { - id = media.Id, - name = media.Text - }; - - if (media.HasChildren) - { - CreateMediaTree(media.Children, subFolder); - } - - folder.folders.Add(subFolder); - } - } - - private int GetMaxRequestLength() - { - var appSetting = Convert.ToInt32(ConfigurationManager.AppSettings["DesktopMediaUploaderMaxRequestLength"]); - if (appSetting > 0) - return appSetting; - - var configXml = new XmlDocument { PreserveWhitespace = true }; - configXml.Load(HttpContext.Current.Server.MapPath("/web.config")); - - var requestLimitsNode = configXml.SelectSingleNode("//configuration/system.webServer/security/requestFiltering/requestLimits"); - if (requestLimitsNode != null) - { - if (requestLimitsNode.Attributes != null && requestLimitsNode.Attributes["maxAllowedContentLength"] != null) - { - var maxAllowedContentLength = Convert.ToInt32(requestLimitsNode.Attributes["maxAllowedContentLength"].Value); - if (maxAllowedContentLength > 0) - return maxAllowedContentLength; - } - } - - var httpRuntime = ConfigurationManager.GetSection("system.web/httpRuntime") as HttpRuntimeSection; - - return httpRuntime == null ? 4096 : httpRuntime.MaxRequestLength; - } - - private Media GetOrCreateFolder(Media parent, string name) - { - var children = parent.Id == -1 ? Media.GetRootMedias() : parent.Children; - if (children.Length > 0) - { - foreach (var node in children.Where(node => node.Text.ToLower() == name.ToLower())) - { - return node; - } - } - - var media = Media.MakeNew(name, MediaType.GetByAlias(Constants.Conventions.MediaTypes.Folder), User.GetUser(0), parent.Id); - media.sortOrder = 0; - media.Save(); - - return media; - } - - #endregion - } - - public class MediaResponse - { - [XmlAttribute] - public bool success { get; set; } - } - - [XmlRoot("response")] - public class ConfigResponse : MediaResponse - { - public string displayName { get; set; } - public string umbracoPath { get; set; } - public int maxRequestLength { get; set; } - } - - [XmlRoot("response")] - public class FolderListResponse : MediaResponse - { - public FolderListItem folder { get; set; } - } - - [XmlType("folder")] - public class FolderListItem - { - [XmlAttribute] - public int id { get; set; } - - [XmlAttribute] - public string name { get; set; } - - [XmlElement("folder")] - public List folders { get; set; } - - public FolderListItem() - { - folders = new List(); - } - } - - [XmlRoot("response")] - public class UploadResponse : MediaResponse - { } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Settings.asmx b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Settings.asmx deleted file mode 100644 index 0b2a13a8549d..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Settings.asmx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebService Language="c#" Codebehind="Settings.asmx.cs" Class="umbraco.webservices.Settings" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Settings.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Settings.asmx.cs deleted file mode 100644 index d33e9b842ee7..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/Settings.asmx.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections; -using System.ComponentModel; -using System.Data; -using System.Diagnostics; -using System.Web; -using System.Web.Services; -using System.Linq; -using System.Xml; -using Umbraco.Core; -using Umbraco.Web.WebServices; -using umbraco.BusinessLogic; - -namespace umbraco.webservices -{ - - public class Settings : UmbracoAuthorizedWebService - { - - [WebMethod] - public XmlNode GetTabs(string ContextID, int ContentTypeId) - { - if (!AuthorizeRequest(DefaultApps.settings.ToString())) - { - var xmlDoc = new XmlDocument(); - var tabs = xmlDoc.CreateElement("tabs"); - foreach (var t in new cms.businesslogic.ContentType(ContentTypeId).getVirtualTabs.ToList()) - { - var mXml = xmlDoc.CreateElement("tab"); - mXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "id", t.Id.ToString())); - mXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "caption", t.Caption)); - tabs.AppendChild(mXml); - } - return tabs; - } - - return null; - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/UltimatePickerAutoCompleteHandler.ashx b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/UltimatePickerAutoCompleteHandler.ashx deleted file mode 100644 index 9b5b98a9b821..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/UltimatePickerAutoCompleteHandler.ashx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebHandler Language="C#" CodeBehind="UltimatePickerAutoCompleteHandler.ashx.cs" Class="umbraco.presentation.umbraco.webservices.UltimatePickerAutoCompleteHandler" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/UltimatePickerAutoCompleteHandler.ashx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/UltimatePickerAutoCompleteHandler.ashx.cs deleted file mode 100644 index 8d2acf4f8f54..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/UltimatePickerAutoCompleteHandler.ashx.cs +++ /dev/null @@ -1,163 +0,0 @@ -using System; -using System.Linq; -using System.Web; -using System.Web.Services; -using Umbraco.Web.WebServices; -using umbraco.BasePages; -using umbraco.BusinessLogic; -using umbraco.cms.businesslogic.web; -using umbraco.cms.businesslogic; - -namespace umbraco.presentation.umbraco.webservices -{ - /// - /// Summary description for $codebehindclassname$ - /// - [WebService(Namespace = "http://tempuri.org/")] - [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] - public class UltimatePickerAutoCompleteHandler : UmbracoAuthorizedHttpHandler - { - - private int _nodeCount; - private int _counter; - private string[] _output; - private string _prefix; - - public override void ProcessRequest(HttpContext context) - { - if (BasePage.ValidateUserContextID(BasePage.umbracoUserContextID) == false) - throw new Exception("Client authorization failed. User is not logged in"); - - //user must be allowed to see content or media - if (AuthorizeRequest(DefaultApps.content.ToString()) == false && AuthorizeRequest(DefaultApps.media.ToString()) == false) - return; - - context.Response.ContentType = "text/plain"; - - _prefix = context.Request.QueryString["q"]; - - var parentNodeId = Convert.ToInt32(context.Request.QueryString["id"]); - var showGrandChildren = Convert.ToBoolean(context.Request.QueryString["showchildren"]); - - var documentAliasFilter = context.Request.QueryString["filter"]; - var documentAliasFilters = documentAliasFilter.Split(",".ToCharArray()); - - var parent = new CMSNode(parentNodeId); - - _nodeCount = 0; - - //store children array here because iterating over an Array property object is very inneficient. - var children = parent.Children; - foreach (CMSNode child in children) - { - NodeChildrenCount(child, showGrandChildren, documentAliasFilters); - } - - _output = new string[_nodeCount]; - _counter = 0; - int level = 1; - - foreach (CMSNode child in children) - { - AddNode(child, level, showGrandChildren, documentAliasFilters); - } - - foreach (var item in _output) - { - context.Response.Write(item + Environment.NewLine); - } - } - - private bool ValidNode(string nodeText) - { - return nodeText.Length >= _prefix.Length && nodeText.Substring(0, _prefix.Length).ToLower() == _prefix.ToLower(); - } - - private void NodeChildrenCount(CMSNode node, bool countChildren, string[] documentAliasFilters) - { - if (documentAliasFilters.Length > 0) - { - foreach (var filter in documentAliasFilters) - { - var trimmedFilter = filter.TrimStart(" ".ToCharArray()); - trimmedFilter = trimmedFilter.TrimEnd(" ".ToCharArray()); - - if ((new Document(node.Id).ContentType.Alias == trimmedFilter || trimmedFilter == string.Empty) && ValidNode(node.Text)) - { - _nodeCount += 1; - } - } - } - else - { - if (ValidNode(node.Text)) - { - _nodeCount += 1; - } - } - - if (countChildren) - { - //store children array here because iterating over an Array property object is very inneficient. - var children = node.Children; - foreach (CMSNode child in children) - { - NodeChildrenCount(child, countChildren, documentAliasFilters); - } - } - - } - - private void AddNode(CMSNode node, int level, bool showGrandChildren, string[] documentAliasFilters) - { - var preText = string.Empty; - - for (var i = 1; i < level; i++) - { - preText += "- "; - } - - if (documentAliasFilters.Length > 0) - { - foreach (var filter in documentAliasFilters) - { - var trimmedFilter = filter.TrimStart(" ".ToCharArray()); - trimmedFilter = trimmedFilter.TrimEnd(" ".ToCharArray()); - - if ((new Document(node.Id).ContentType.Alias == trimmedFilter || trimmedFilter == string.Empty) && ValidNode(node.Text)) - { - _output[_counter] = preText + node.Text + " [" + node.Id + "]"; - _counter++; - } - - } - } - else - { - if (ValidNode(node.Text)) - { - _output[_counter] = preText + node.Text + " [" + node.Id + "]"; - _counter++; - } - } - - if (showGrandChildren) - { - if (node.HasChildren) - { - //store children array here because iterating over an Array property object is very inneficient. - var children = node.Children; - foreach (CMSNode child in children) - { - AddNode(child, level + 1, showGrandChildren, documentAliasFilters); - } - } - } - } - - public override bool IsReusable - { - get { return false; } - } - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/templates.asmx b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/templates.asmx deleted file mode 100644 index 318840e4f7d9..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/templates.asmx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebService Language="c#" Codebehind="templates.asmx.cs" Class="umbraco.webservices.templates" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/templates.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/templates.asmx.cs deleted file mode 100644 index b790c5d22545..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/templates.asmx.cs +++ /dev/null @@ -1,113 +0,0 @@ -using System; -using System.Collections; -using System.ComponentModel; -using System.Data; -using System.Diagnostics; -using System.Web; -using System.Web.Services; -using System.Xml; -using System.Web.Script.Services; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Web.WebServices; -using umbraco.BusinessLogic; -using umbraco.presentation.webservices; - -namespace umbraco.webservices -{ - /// - /// Summary description for templates. - /// - [WebService(Namespace="http://umbraco.org/webservices/")] - [ScriptService] - public class templates : UmbracoAuthorizedWebService - { - - [WebMethod] - public XmlNode GetTemplates(string Login, string Password) - { - if (ValidateCredentials(Login, Password) && UserHasAppAccess(DefaultApps.settings.ToString(), Login)) - { - var xmlDoc = new XmlDocument(); - xmlDoc.LoadXml(""); - foreach (cms.businesslogic.template.Template t in cms.businesslogic.template.Template.GetAllAsList()) - { - var tt = xmlDoc.CreateElement("template"); - tt.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "id", t.Id.ToString())); - tt.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "name", t.Text)); - xmlDoc.DocumentElement.AppendChild(tt); - } - return xmlDoc.DocumentElement; - } - return null; - } - - [WebMethod] - public XmlNode GetTemplate(int Id, string Login, string Password) - { - if (ValidateCredentials(Login, Password) && UserHasAppAccess(DefaultApps.settings.ToString(), Login)) - { - var t = new cms.businesslogic.template.Template(Id); - var xmlDoc = new XmlDocument(); - var tXml = xmlDoc.CreateElement("template"); - tXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "id", t.Id.ToString())); - tXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "master", t.MasterTemplate.ToString())); - tXml.Attributes.Append(XmlHelper.AddAttribute(xmlDoc, "name", t.Text)); - tXml.AppendChild(XmlHelper.AddCDataNode(xmlDoc, "design", t.Design)); - return tXml; - } - return null; - } - - [WebMethod] - public bool UpdateTemplate(int Id, int Master, string Design, string Login, string Password) - { - if (ValidateCredentials(Login, Password) && UserHasAppAccess(DefaultApps.settings.ToString(), Login)) - { - try - { - var t = new cms.businesslogic.template.Template(Id) - { - MasterTemplate = Master, - Design = Design - }; - //ensure events are raised - t.Save(); - return true; - } - catch (ArgumentException) - { - return false; - } - } - return false; - } - - [WebMethod] - [ScriptMethod] - public string GetCodeSnippet(object templateId) - { - //NOTE: The legacy code threw an exception so will continue to do that. - AuthorizeRequest(DefaultApps.settings.ToString(), true); - - var snippetPath = SystemDirectories.Umbraco + "/scripting/templates/cshtml/"; - var filePath = IOHelper.MapPath(snippetPath + templateId); - - //Directory check.. only allow files in script dir and below to be edited - if (filePath.StartsWith(IOHelper.MapPath(snippetPath))) - { - var templateFile = - System.IO.File.OpenText(filePath); - var content = templateFile.ReadToEnd(); - templateFile.Close(); - return content; - } - else - { - throw new ArgumentException("Couldn't open snippet - Illegal path"); - - } - } - - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/trashcan.asmx b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/trashcan.asmx deleted file mode 100644 index f0750575173f..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/trashcan.asmx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebService Language="C#" CodeBehind="trashcan.asmx.cs" Class="umbraco.presentation.webservices.trashcan" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/trashcan.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/trashcan.asmx.cs deleted file mode 100644 index f1bdd6d3d525..000000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/trashcan.asmx.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Web.Script.Services; -using System.Web.Services; -using System.ComponentModel; -using Umbraco.Web.WebServices; -using umbraco.BasePages; -using umbraco.BusinessLogic; -using umbraco.cms.businesslogic; - -namespace umbraco.presentation.webservices -{ - /// - /// Summary description for trashcan - /// - [WebService(Namespace = "http://umbraco.org/webservices")] - [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] - [ToolboxItem(false)] - [ScriptService] - public class trashcan : UmbracoAuthorizedWebService - { - [WebMethod] - public void EmptyTrashcan(RecycleBin.RecycleBinType type) - { - //validate against the app type! - switch (type) - { - case RecycleBin.RecycleBinType.Content: - if (!AuthorizeRequest(DefaultApps.content.ToString())) return; - break; - case RecycleBin.RecycleBinType.Media: - if (!AuthorizeRequest(DefaultApps.media.ToString())) return; - break; - default: - throw new ArgumentOutOfRangeException("type"); - } - - //TODO: This will never work in LB scenarios - Application["trashcanEmptyLeft"] = RecycleBin.Count(type).ToString(); - emptyTrashCanDo(type); - } - - [WebMethod] - public string GetTrashStatus() - { - //TODO: This will never work in LB scenarios - - if (AuthorizeRequest()) - { - return Application["trashcanEmptyLeft"] != null - ? Application["trashcanEmptyLeft"].ToString() - : ""; - } - - return "-"; - - } - - private void emptyTrashCanDo(RecycleBin.RecycleBinType type) - { - var trashCan = new RecycleBin(type); - - var callback = new Action(x => - { - Application.Lock(); - Application["trashcanEmptyLeft"] = x.ToString(); - Application.UnLock(); - }); - - trashCan.CallTheGarbageMan(callback); - - } - } -} diff --git a/src/UmbracoExamine/UmbracoExamine.csproj b/src/UmbracoExamine/UmbracoExamine.csproj index 9a3299fb7ec8..8fdd5b2d04fa 100644 --- a/src/UmbracoExamine/UmbracoExamine.csproj +++ b/src/UmbracoExamine/UmbracoExamine.csproj @@ -82,9 +82,8 @@ ..\Solution Items\TheFARM-Public.snk - - ..\packages\Examine.0.1.83\lib\net45\Examine.dll - True + + ..\packages\Examine.0.1.85\lib\net45\Examine.dll ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll @@ -189,7 +188,6 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/WebPi/parameters.xml b/src/WebPi/parameters.xml deleted file mode 100644 index 350520407df7..000000000000 --- a/src/WebPi/parameters.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/WebPi/umbraco/favicon.ico b/src/WebPi/umbraco/favicon.ico deleted file mode 100644 index e3ea01cf106d..000000000000 Binary files a/src/WebPi/umbraco/favicon.ico and /dev/null differ diff --git a/src/umbraco.MacroEngines/app.config b/src/umbraco.MacroEngines/app.config index 457c804e51d4..f9c36a3865fc 100644 --- a/src/umbraco.MacroEngines/app.config +++ b/src/umbraco.MacroEngines/app.config @@ -28,19 +28,19 @@
- + - + - + - + diff --git a/src/umbraco.MacroEngines/packages.config b/src/umbraco.MacroEngines/packages.config index 7479987df20c..a46f0572eff3 100644 --- a/src/umbraco.MacroEngines/packages.config +++ b/src/umbraco.MacroEngines/packages.config @@ -1,6 +1,6 @@  - + diff --git a/src/umbraco.MacroEngines/umbraco.MacroEngines.csproj b/src/umbraco.MacroEngines/umbraco.MacroEngines.csproj index 07b70e24a48f..929ab4ae733e 100644 --- a/src/umbraco.MacroEngines/umbraco.MacroEngines.csproj +++ b/src/umbraco.MacroEngines/umbraco.MacroEngines.csproj @@ -45,9 +45,8 @@ false - - ..\packages\Examine.0.1.83\lib\net45\Examine.dll - True + + ..\packages\Examine.0.1.85\lib\net45\Examine.dll ..\packages\HtmlAgilityPack.1.4.9.5\lib\Net45\HtmlAgilityPack.dll @@ -234,7 +233,6 @@ -