Merge branch temp8 into temp8-11502
This commit is contained in:
+11
-25
@@ -70,7 +70,7 @@ umbraco/presentation/packages/uComponents/MultiNodePicker/CustomTreeService.asmx
|
||||
src/Umbraco.Tests/config/applications.config
|
||||
src/Umbraco.Tests/config/trees.config
|
||||
src/Umbraco.Web.UI/web.config
|
||||
src/Umbraco.Web.UI/Config/ClientDependency.config
|
||||
src/Umbraco.Web.UI/[Cc]onfig/ClientDependency.config
|
||||
src/Umbraco.Tests/config/404handlers.config
|
||||
src/Umbraco.Web.UI/[Vv]iews/*.cshtml
|
||||
src/Umbraco.Web.UI/[Vv]iews/*.vbhtml
|
||||
@@ -87,18 +87,15 @@ lib-bower
|
||||
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Ll]ib/*
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/umbraco.*
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/*.loader.js
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/init.js
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/routes.js
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/app.dev.js
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/loader.js
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/loader.dev.js
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/main.js
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/app.js
|
||||
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/tuning.panel.js
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/tuning.palettes.js
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/tuning.loader.js
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/tuning.front.js
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/tuning.config.js
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/canvasdesigner.*.js
|
||||
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Vv]iews/
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Vv]iews/**/*.js
|
||||
@@ -114,24 +111,18 @@ src/Umbraco.Web.UI.Client/src/[Ll]ess/*.css
|
||||
src/Umbraco.Web.UI/App_Plugins/*
|
||||
src/*.psess
|
||||
src/*.vspx
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/routes.js.*
|
||||
|
||||
NDependOut/*
|
||||
QueryResult.htm
|
||||
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Aa]ssets/*
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Ll]ib/*
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Vv]iews/**/*.html
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/[Vv]iews/**/*.js
|
||||
|
||||
src/Umbraco.Web.UI/[Cc]onfig/appSettings.config
|
||||
src/Umbraco.Web.UI/[Cc]onfig/connectionStrings.config
|
||||
src/Umbraco.Web.UI/umbraco/plugins/*
|
||||
src/Umbraco.Web.UI/umbraco/js/init.js
|
||||
src/Umbraco.Web.UI/[Uu]mbraco/plugins/*
|
||||
build/ApiDocs/*
|
||||
build/ApiDocs/Output/*
|
||||
src/Umbraco.Web.UI.Client/bower_components/*
|
||||
/src/Umbraco.Web.UI/Umbraco/preview
|
||||
/src/Umbraco.Web.UI/Umbraco/preview.old
|
||||
/src/Umbraco.Web.UI/[Uu]mbraco/preview
|
||||
/src/Umbraco.Web.UI/[Uu]mbraco/preview.old
|
||||
|
||||
# ignore rule for clearing out Belle (avoid rebuilding all the time)
|
||||
preserve.belle
|
||||
@@ -139,16 +130,11 @@ preserve.belle
|
||||
#Ignore Rule for output of generated documentation files from Grunt docserve
|
||||
src/Umbraco.Web.UI.Client/docs/api
|
||||
src/*.boltdata/
|
||||
/src/Umbraco.Web.UI/Umbraco/Js/canvasdesigner.loader.js
|
||||
/src/Umbraco.Web.UI/Umbraco/Js/canvasdesigner.palettes.js
|
||||
/src/Umbraco.Web.UI/Umbraco/Js/canvasdesigner.panel.js
|
||||
/src/Umbraco.Web.UI/Umbraco/Js/canvasdesigner.config.js
|
||||
/src/Umbraco.Web.UI/Umbraco/Js/canvasdesigner.front.js
|
||||
src/umbraco.sln.ide/*
|
||||
src/.vs/
|
||||
src/Umbraco.Web.UI/umbraco/js/install.loader.js
|
||||
src/Umbraco.Web.UI/js/*
|
||||
src/Umbraco.Tests/media
|
||||
|
||||
src/Umbraco.Web.UI/[Jj]s/*
|
||||
src/Umbraco.Tests/[Mm]edia
|
||||
tools/docfx/*
|
||||
apidocs/_site/*
|
||||
src/*/project.lock.json
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
@ECHO OFF
|
||||
SETLOCAL
|
||||
REM SETLOCAL is on, so changes to the path not persist to the actual user's path
|
||||
|
||||
git.exe --version
|
||||
IF %ERRORLEVEL%==9009 GOTO :trydefaultpath
|
||||
REM OK, DONE
|
||||
GOTO :EOF
|
||||
|
||||
:trydefaultpath
|
||||
PATH=C:\Program Files (x86)\Git\cmd;C:\Program Files\Git\cmd;%PATH%
|
||||
git.exe --version
|
||||
IF %ERRORLEVEL%==9009 GOTO :showerror
|
||||
REM OK, DONE
|
||||
GOTO :EOF
|
||||
|
||||
:showerror
|
||||
ECHO Git is not in your path and could not be found in C:\Program Files (x86)\Git\cmd nor in C:\Program Files\Git\cmd
|
||||
SET /p install=" Do you want to install Git through Chocolatey [y/n]? " %=%
|
||||
IF %install%==y (
|
||||
:: Create a temporary batch file to execute either after elevating to admin or as-is when the user is already admin
|
||||
ECHO @ECHO OFF > "%temp%\ChocoInstallGit.cmd"
|
||||
ECHO SETLOCAL >> "%temp%\ChocoInstallGit.cmd"
|
||||
ECHO ECHO Installing Chocolatey first >> "%temp%\ChocoInstallGit.cmd"
|
||||
ECHO @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" >> "%temp%\ChocoInstallGit.cmd"
|
||||
ECHO SET PATH=%%PATH%%;%%ALLUSERSPROFILE%%\chocolatey\bin >> "%temp%\ChocoInstallGit.cmd"
|
||||
ECHO choco install git -y >> "%temp%\ChocoInstallGit.cmd"
|
||||
|
||||
GOTO :installgit
|
||||
) ELSE (
|
||||
GOTO :cantcontinue
|
||||
)
|
||||
|
||||
:cantcontinue
|
||||
ECHO Can't complete the build without Git being in the path. Please add it to be able to continue.
|
||||
GOTO :EOF
|
||||
|
||||
:installgit
|
||||
pushd %~dp0
|
||||
:: Running prompt elevated
|
||||
|
||||
:: --> Check for permissions
|
||||
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
|
||||
|
||||
:: --> If error flag set, we do not have admin.
|
||||
IF '%errorlevel%' NEQ '0' (
|
||||
GOTO UACPrompt
|
||||
) ELSE ( GOTO gotAdmin )
|
||||
|
||||
:UACPrompt
|
||||
ECHO You're not currently running this with admin privileges, we'll now try to execute the install of Git through Chocolatey after elevating to admin privileges
|
||||
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
|
||||
ECHO UAC.ShellExecute "%temp%\ChocoInstallGit.cmd", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
|
||||
|
||||
"%temp%\getadmin.vbs"
|
||||
EXIT /B
|
||||
|
||||
:gotAdmin
|
||||
IF EXIST "%temp%\getadmin.vbs" ( DEL "%temp%\getadmin.vbs" )
|
||||
pushd "%CD%"
|
||||
CD /D "%~dp0"
|
||||
|
||||
CALL "%temp%\ChocoInstallGit.cmd"
|
||||
@@ -20,7 +20,7 @@ Publish this won't affect you.
|
||||
The following items will now be automatically included when creating a deploy package or publishing to the file
|
||||
system: umbraco, umbraco_client, config\splashes and global.asax.
|
||||
|
||||
Please read the release notes on our.umbraco.org:
|
||||
http://our.umbraco.org/contribute/releases
|
||||
Please read the release notes on our.umbraco.com:
|
||||
http://our.umbraco.com/contribute/releases
|
||||
|
||||
- Umbraco
|
||||
@@ -11,7 +11,7 @@
|
||||
*** IMPORTANT NOTICE FOR UPGRADES FROM VERSIONS BELOW 7.7.0 ***
|
||||
|
||||
Be sure to read the version specific upgrade information before proceeding:
|
||||
https://our.umbraco.org/documentation/Getting-Started/Setup/Upgrading/version-specific#version-7-7-0
|
||||
https://our.umbraco.com/documentation/Getting-Started/Setup/Upgrading/version-specific#version-7-7-0
|
||||
|
||||
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.
|
||||
@@ -33,7 +33,7 @@ Publish this won't affect you.
|
||||
The following items will now be automatically included when creating a deploy package or publishing to the file
|
||||
system: umbraco, umbraco_client, config\splashes and global.asax.
|
||||
|
||||
Please read the release notes on our.umbraco.org:
|
||||
http://our.umbraco.org/contribute/releases
|
||||
Please read the release notes on our.umbraco.com:
|
||||
http://our.umbraco.com/contribute/releases
|
||||
|
||||
- Umbraco
|
||||
@@ -1,42 +1,32 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
xdt:Locator="Match(name)"
|
||||
xdt:Transform="SetAttributes(type)">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
xdt:Locator="Match(name)"
|
||||
xdt:Transform="SetAttributes(type)" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
xdt:Locator="Match(name)"
|
||||
xdt:Transform="SetAttributes(type)" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
xdt:Locator="Match(factoryType)"
|
||||
xdt:Transform="SetAttributes(factoryType)" />
|
||||
<pages pageBaseType="System.Web.Mvc.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="Umbraco.Web.PublishedContentModels" xdt:Transform="InsertIfMissing" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
<system.web>
|
||||
<pages
|
||||
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
xdt:Locator="Match(pageParserFilterType,pageBaseType,userControlBaseType)"
|
||||
xdt:Transform="SetAttributes(pageParserFilterType,pageBaseType,userControlBaseType)">
|
||||
<controls>
|
||||
<add assembly="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc"
|
||||
xdt:Locator="Match(namespace)"
|
||||
xdt:Transform="SetAttributes(assembly)" />
|
||||
</controls>
|
||||
</pages>
|
||||
</system.web>
|
||||
|
||||
</configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" xdt:Locator="Match(name)" xdt:Transform="SetAttributes(type)">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" xdt:Locator="Match(name)" xdt:Transform="SetAttributes(type)" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" xdt:Locator="Match(name)" xdt:Transform="SetAttributes(type)" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" xdt:Locator="Match(factoryType)" xdt:Transform="SetAttributes(factoryType)" />
|
||||
<pages pageBaseType="System.Web.Mvc.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="Umbraco.Web.PublishedContentModels" xdt:Transform="InsertIfMissing" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
<system.web>
|
||||
<pages
|
||||
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
xdt:Locator="Match(pageParserFilterType,pageBaseType,userControlBaseType)"
|
||||
xdt:Transform="SetAttributes(pageParserFilterType,pageBaseType,userControlBaseType)">
|
||||
<controls>
|
||||
<add assembly="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" xdt:Locator="Match(namespace)" xdt:Transform="SetAttributes(assembly)" />
|
||||
</controls>
|
||||
</pages>
|
||||
</system.web>
|
||||
|
||||
</configuration>
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
@ECHO OFF
|
||||
|
||||
:choice
|
||||
set /P c=WARNING! Are you sure you want to continue, this will remove all package files, view files, sqlce database, etc... Press 'Y' to auto-remove all files/folders, 'N' to cancel or 'C' to prompt for each folder removal?
|
||||
if /I "%c%" EQU "C" goto :prompt
|
||||
if /I "%c%" EQU "Y" goto :auto
|
||||
if /I "%c%" EQU "N" goto :exit
|
||||
goto :choice
|
||||
|
||||
|
||||
:prompt
|
||||
|
||||
echo Current folder: %CD%
|
||||
|
||||
echo Removing sqlce database
|
||||
del ..\src\Umbraco.Web.UI\App_Data\Umbraco.sdf
|
||||
|
||||
echo Resetting installedPackages.config
|
||||
echo ^<?xml version="1.0" encoding="utf-8"?^>^<packages^>^</packages^> >..\src\Umbraco.Web.UI\App_Data\packages\installed\installedPackages.config
|
||||
|
||||
echo Removing plugin cache files
|
||||
del ..\src\Umbraco.Web.UI\App_Data\TEMP\PluginCache\*.*
|
||||
|
||||
echo Removing cache files and examine index
|
||||
del ..\src\Umbraco.Web.UI\App_Data\TEMP\*.*
|
||||
|
||||
echo Removing log files
|
||||
del ..\src\Umbraco.Web.UI\App_Data\Logs\*.*
|
||||
|
||||
echo Removing packages
|
||||
del ..\src\Umbraco.Web.UI\App_Data\packages\*.*
|
||||
|
||||
echo Removing previews
|
||||
del ..\src\Umbraco.Web.UI\App_Data\preview\*.*
|
||||
|
||||
echo Removing app code files (typically added by starterkits)
|
||||
del ..\src\Umbraco.Web.UI\App_Code\*.*
|
||||
|
||||
echo Removing xslt files
|
||||
del ..\src\Umbraco.Web.UI\xslt\*.*
|
||||
|
||||
echo Removing user control files
|
||||
del ..\src\Umbraco.Web.UI\UserControls\*.*
|
||||
|
||||
echo Removing masterpage files
|
||||
del ..\src\Umbraco.Web.UI\masterpages\*.*
|
||||
|
||||
echo Removing razor files
|
||||
del ..\src\Umbraco.Web.UI\macroScripts\*.*
|
||||
|
||||
echo Removing media files
|
||||
del ..\src\Umbraco.Web.UI\media\*.*
|
||||
|
||||
echo Removing script files
|
||||
del ..\src\Umbraco.Web.UI\scripts\*.*
|
||||
|
||||
echo Removing css files
|
||||
del ..\src\Umbraco.Web.UI\css\*.*
|
||||
|
||||
echo "Umbraco install reverted to clean install"
|
||||
pause
|
||||
exit
|
||||
|
||||
|
||||
|
||||
:auto
|
||||
|
||||
echo Current folder: %CD%
|
||||
|
||||
echo Removing sqlce database
|
||||
del ..\src\Umbraco.Web.UI\App_Data\Umbraco.sdf
|
||||
|
||||
echo Resetting installedPackages.config
|
||||
echo ^<?xml version="1.0" encoding="utf-8"?^>^<packages^>^</packages^> >..\src\Umbraco.Web.UI\App_Data\packages\installed\installedPackages.config
|
||||
|
||||
echo Removing plugin cache files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\TEMP\PluginCache\*.*) DO DEL %%A
|
||||
|
||||
echo Removing cache files and examine index
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\TEMP\*.*) DO DEL %%A
|
||||
|
||||
echo Removing log files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\Logs\*.*) DO DEL %%A
|
||||
|
||||
echo Removing packages
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\packages\*.*) DO DEL %%A
|
||||
|
||||
echo Removing previews
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\preview\*.*) DO DEL %%A
|
||||
|
||||
echo Removing app code files (typically added by starterkits)
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\App_Code\*.*) DO DEL %%A
|
||||
|
||||
echo Removing xslt files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\xslt\*.*) DO DEL %%A
|
||||
|
||||
echo Removing masterpage files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\masterpages\*.*) DO DEL %%A
|
||||
|
||||
echo Removing user control files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\usercontrols\*.*) DO DEL %%A
|
||||
|
||||
echo Removing view files
|
||||
ATTRIB +H ..\src\Umbraco.Web.UI\Views\Partials\Grid\*.cshtml /S
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\Views\) DO DEL /Q /S *.cshtml -H
|
||||
ATTRIB -H ..\src\Umbraco.Web.UI\Views\Partials\Grid\*.cshtml /S
|
||||
|
||||
echo Removing razor files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\macroScripts\*.*) DO DEL %%A
|
||||
|
||||
echo Removing media files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\media\*.*) DO DEL %%A
|
||||
|
||||
echo Removing script files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\scripts\*.*) DO DEL %%A
|
||||
|
||||
echo Removing css files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\css\*.*) DO DEL %%A
|
||||
|
||||
echo "Umbraco install reverted to clean install"
|
||||
pause
|
||||
exit
|
||||
|
||||
|
||||
|
||||
:exit
|
||||
exit
|
||||
@@ -1,163 +0,0 @@
|
||||
@ECHO OFF
|
||||
|
||||
:choice
|
||||
set /P c=WARNING! Are you sure you want to continue, this will remove all package files, view files, sqlce database, etc... Press 'Y' to auto-remove all files/folders, 'N' to cancel or 'C' to prompt for each folder removal?
|
||||
if /I "%c%" EQU "C" goto :prompt
|
||||
if /I "%c%" EQU "Y" goto :auto
|
||||
if /I "%c%" EQU "N" goto :exit
|
||||
goto :choice
|
||||
|
||||
|
||||
:prompt
|
||||
|
||||
echo Current folder: %CD%
|
||||
|
||||
echo Regenerating SQL CE database
|
||||
SET buildfolder=%CD%
|
||||
CD ..\tools\RegenerateUmbracoSQLCEDatabase\
|
||||
RegenerateUmbracoSQLCEDatabase.exe %CD%\..\..\src\Umbraco.Web.UI
|
||||
CD %buildfolder%
|
||||
|
||||
echo Removing bin files
|
||||
del ..\src\Umbraco.Web.UI\bin\*.*
|
||||
|
||||
echo Building solution
|
||||
"%ProgramFiles(x86)%"\MSBuild\14.0\Bin\MSBuild.exe ..\src\umbraco.sln /t:Clean,Build
|
||||
|
||||
echo Resetting installedPackages.config
|
||||
echo ^<?xml version="1.0" encoding="utf-8"?^>^<packages^>^</packages^> >..\src\Umbraco.Web.UI\App_Data\packages\installed\installedPackages.config
|
||||
|
||||
echo Removing plugin cache files
|
||||
del ..\src\Umbraco.Web.UI\App_Data\TEMP\PluginCache\*.*
|
||||
|
||||
echo Removing cache files and examine index
|
||||
del ..\src\Umbraco.Web.UI\App_Data\TEMP\*.*
|
||||
|
||||
echo Removing log files
|
||||
del ..\src\Umbraco.Web.UI\App_Data\Logs\*.*
|
||||
|
||||
echo Removing packages
|
||||
del ..\src\Umbraco.Web.UI\App_Data\packages\*.*
|
||||
|
||||
echo Removing previews
|
||||
del ..\src\Umbraco.Web.UI\App_Data\preview\*.*
|
||||
|
||||
echo Removing app code files (typically added by starterkits)
|
||||
del ..\src\Umbraco.Web.UI\App_Code\*.*
|
||||
|
||||
echo Removing xslt files
|
||||
del ..\src\Umbraco.Web.UI\xslt\*.*
|
||||
|
||||
echo Removing user control files
|
||||
del ..\src\Umbraco.Web.UI\UserControls\*.*
|
||||
|
||||
echo Removing masterpage files
|
||||
del ..\src\Umbraco.Web.UI\masterpages\*.*
|
||||
|
||||
echo Removing razor files
|
||||
del ..\src\Umbraco.Web.UI\macroScripts\*.*
|
||||
|
||||
echo Removing media files
|
||||
del ..\src\Umbraco.Web.UI\media\*.*
|
||||
|
||||
echo Removing script files
|
||||
del ..\src\Umbraco.Web.UI\scripts\*.*
|
||||
|
||||
echo Removing css files
|
||||
del ..\src\Umbraco.Web.UI\css\*.*
|
||||
|
||||
echo "Umbraco install reverted to clean install"
|
||||
pause
|
||||
exit
|
||||
|
||||
|
||||
|
||||
:auto
|
||||
|
||||
echo Current folder: %CD%
|
||||
|
||||
echo Regenerating SQL CE database
|
||||
SET buildfolder=%CD%
|
||||
CD ..\tools\RegenerateUmbracoSQLCEDatabase\
|
||||
RegenerateUmbracoSQLCEDatabase.exe %CD%\..\..\src\Umbraco.Web.UI
|
||||
CD %buildfolder%
|
||||
|
||||
echo Removing bin files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\bin\*.*) DO DEL %%A
|
||||
|
||||
echo Building solution
|
||||
"%ProgramFiles(x86)%"\MSBuild\14.0\Bin\MSBuild.exe ..\src\umbraco.sln /t:Clean,Build
|
||||
|
||||
echo Resetting installedPackages.config
|
||||
echo ^<?xml version="1.0" encoding="utf-8"?^>^<packages^>^</packages^> >..\src\Umbraco.Web.UI\App_Data\packages\installed\installedPackages.config
|
||||
|
||||
echo Removing plugin cache files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\TEMP\PluginCache\*.*) DO DEL %%A
|
||||
|
||||
echo Removing cache files and examine index
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\TEMP\*.*) DO DEL %%A
|
||||
|
||||
echo Removing log files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\Logs\*.*) DO DEL %%A
|
||||
|
||||
echo Removing packages
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\packages\*.*) DO DEL %%A
|
||||
|
||||
echo Removing previews
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\preview\*.*) DO DEL %%A
|
||||
|
||||
echo Removing app code files (typically added by starterkits)
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\App_Code\*.*) DO DEL %%A
|
||||
|
||||
echo Removing xslt files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\xslt\*.*) DO DEL %%A
|
||||
|
||||
echo Removing masterpage files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\masterpages\*.*) DO DEL %%A
|
||||
|
||||
echo Removing user control files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\usercontrols\*.*) DO DEL %%A
|
||||
|
||||
echo Removing view files
|
||||
ATTRIB +H ..\src\Umbraco.Web.UI\Views\Partials\Grid\*.cshtml /S
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\Views\) DO DEL /Q /S *.cshtml -H
|
||||
ATTRIB -H ..\src\Umbraco.Web.UI\Views\Partials\Grid\*.cshtml /S
|
||||
|
||||
echo Removing razor files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\macroScripts\*.*) DO DEL %%A
|
||||
|
||||
echo Removing media files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\media\*.*) DO DEL %%A
|
||||
|
||||
echo Removing script files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\scripts\*.*) DO DEL %%A
|
||||
|
||||
echo Removing css files
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\css\*.*) DO DEL %%A
|
||||
|
||||
echo Removing Courier files
|
||||
del ..\src\Umbraco.Web.UI\config\courier.config
|
||||
del ..\src\Umbraco.Web.UI\umbraco\images\tray\courier.jpg
|
||||
rmdir "..\src\Umbraco.Web.UI\umbraco\plugins\courier\" /S /Q
|
||||
|
||||
echo Removing Contour files
|
||||
del ..\src\Umbraco.Web.UI\umbraco\images\tray\contour.png
|
||||
FOR %%A IN (..\src\Umbraco.Web.UI\umbraco\images\umbraco\icon_*.*) DO DEL %%A
|
||||
rmdir "..\src\Umbraco.Web.UI\umbraco\plugins\umbracoContour\" /S /Q
|
||||
del ..\src\Umbraco.Web.UI\umbraco\xslt\templates\UmbracoContour*.* /S /Q
|
||||
rmdir "..\src\Umbraco.Web.UI\usercontrols\umbracoContour\" /S /Q
|
||||
|
||||
echo Start with a clean web.config
|
||||
copy ..\src\Umbraco.Web.UI\web.Template.config ..\src\Umbraco.Web.UI\web.config /Y
|
||||
|
||||
echo Start with a clean web.config
|
||||
copy ..\src\Umbraco.Web.UI\web.Template.config ..\src\Umbraco.Web.UI\web.config /Y
|
||||
|
||||
echo "Umbraco install reverted to clean install"
|
||||
pause
|
||||
exit
|
||||
|
||||
|
||||
|
||||
:exit
|
||||
exit
|
||||
@@ -62,6 +62,7 @@
|
||||
$global:node_path = $env:path
|
||||
$nodePath = $this.BuildEnv.NodePath
|
||||
$gitExe = (Get-Command git).Source
|
||||
if (-not $gitExe) { $gitExe = (Get-Command git).Path }
|
||||
$gitPath = [System.IO.Path]::GetDirectoryName($gitExe)
|
||||
$env:path = "$nodePath;$gitPath"
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
Umbraco Cms Clear
|
||||
--
|
||||
----
|
||||
|
||||
Once the solution has been used to run a site, one may want to "reset" the solution in order to run a fresh new site again.
|
||||
|
||||
## Fast
|
||||
|
||||
At the very minimum, you want
|
||||
|
||||
git clean -Xdf src/Umbraco.Web.UI/App_Data
|
||||
rm src/Umbraco.Web.UI/web.config
|
||||
|
||||
Then, a simple 'Rebuild All' in Visual Studio will recreate a fresh `web.config` but should be quite fast (since it does not really need to rebuild anything).
|
||||
|
||||
The `clean` Git command force (`-f`) removes (`-X`, note the capital X) all files and directories (`-d`) that are ignored by Git.
|
||||
|
||||
This will leave medias and views around, but in most cases, it will be enough.
|
||||
|
||||
## More
|
||||
|
||||
To perform a more complete clear, you will want to also delete the content of the media, views, masterpages, scripts... directories.
|
||||
|
||||
## Full
|
||||
|
||||
The following command will force remove all untracked files and directories, be they ignored by Git or not. Combined with `git reset` it can recreate a pristine working directory.
|
||||
|
||||
git clean -xdf .
|
||||
|
||||
## Docs
|
||||
|
||||
See
|
||||
* git [clean](<https://git-scm.com/docs/git-clean>)
|
||||
* git [reset](<https://git-scm.com/docs/git-reset>)
|
||||
+7
-7
@@ -19,26 +19,26 @@ Umbraco is a free open source Content Management System built on the ASP.NET pla
|
||||
|
||||
## Umbraco - The Friendly CMS
|
||||
|
||||
For the first time on the Microsoft platform, there is a free user and developer friendly CMS that makes it quick and easy to create websites - or a breeze to build complex web applications. Umbraco has award-winning integration capabilities and supports ASP.NET MVC or Web Forms, including User and Custom Controls, out of the box.
|
||||
For the first time on the Microsoft platform, there is a free user and developer friendly CMS that makes it quick and easy to create websites - or a breeze to build complex web applications. Umbraco has award-winning integration capabilities and supports ASP.NET MVC or Web Forms, including User and Custom Controls, out of the box.
|
||||
|
||||
Umbraco is not only loved by developers, but is a content editors dream. Enjoy intuitive editing tools, media management, responsive views and approval workflows to send your content live.
|
||||
|
||||
Used by more than 443,000 active websites including Carlsberg, Segway, Amazon and Heinz and **The Official ASP.NET and IIS.NET website from Microsoft** ([https://asp.net](https://asp.net) / [https://iis.net](https://iis.net)), you can be sure that the technology is proven, stable and scales. Backed by the team at Umbraco HQ, and supported by a dedicated community of over 220,000 craftspeople globally, you can trust that Umbraco is a safe choice and is here to stay.
|
||||
Used by more than 443,000 active websites including Carlsberg, Segway, Amazon and Heinz and **The Official ASP.NET and IIS.NET website from Microsoft** ([https://asp.net](https://asp.net) / [https://iis.net](https://iis.net)), you can be sure that the technology is proven, stable and scales. Backed by the team at Umbraco HQ, and supported by a dedicated community of over 220,000 craftspeople globally, you can trust that Umbraco is a safe choice and is here to stay.
|
||||
|
||||
To view more examples, please visit [https://umbraco.com/why-umbraco/#caseStudies](https://umbraco.com/why-umbraco/#caseStudies)
|
||||
To view more examples, please visit [https://umbraco.com/case-studies-testimonials/](https://umbraco.com/case-studies-testimonials/)
|
||||
|
||||
## Why Open Source?
|
||||
As an Open Source platform, Umbraco is more than just a CMS. We are transparent with our roadmap for future versions, our incremental sprint planning notes are publicly accessible and community contributions and packages are available for all to use.
|
||||
|
||||
## Trying out Umbraco CMS
|
||||
|
||||
[Umbraco Cloud](https://umbraco.com) is the easiest and fastest way to use Umbraco yet with full support for all your custom .NET code and intergrations. You're up and running in less than a minute and your life will be made easier with automated upgrades and a built-in deployment engine. We offer a free 14 day trial, no credit card needed.
|
||||
[Umbraco Cloud](https://umbraco.com/cloud) is the easiest and fastest way to use Umbraco yet with full support for all your custom .NET code and intergrations. You're up and running in less than a minute and your life will be made easier with automated upgrades and a built-in deployment engine. We offer a free 14 day trial, no credit card needed.
|
||||
|
||||
If you want to DIY you can [download Umbraco](https://our.umbraco.org/download) either as a ZIP file or via NuGet. It's the same version of Umbraco CMS that powers Umbraco Cloud, but you'll need to find a place to host yourself and handling deployments and upgrades is all down to you.
|
||||
If you want to DIY you can [download Umbraco](https://our.umbraco.com/download) either as a ZIP file or via NuGet. It's the same version of Umbraco CMS that powers Umbraco Cloud, but you'll need to find a place to host yourself and handling deployments and upgrades is all down to you.
|
||||
|
||||
## Community
|
||||
|
||||
Our friendly community is available 24/7 at the community hub we call ["Our Umbraco"](https://our.umbraco.org). Our Umbraco feature forums for questions and answers, documentation, downloadable plugins for Umbraco and a rich collection of community resources.
|
||||
Our friendly community is available 24/7 at the community hub we call ["Our Umbraco"](https://our.umbraco.com). Our Umbraco feature forums for questions and answers, documentation, downloadable plugins for Umbraco and a rich collection of community resources.
|
||||
|
||||
## Contribute to Umbraco
|
||||
|
||||
@@ -46,6 +46,6 @@ Umbraco is contribution focused and community driven. If you want to contribute
|
||||
|
||||
## Found a bug?
|
||||
|
||||
Another way you can contribute to Umbraco is by providing issue reports. For information on how to submit an issue report refer to our [online guide for reporting issues](https://our.umbraco.org/contribute/report-an-issue-or-request-a-feature).
|
||||
Another way you can contribute to Umbraco is by providing issue reports. For information on how to submit an issue report refer to our [online guide for reporting issues](CONTRIBUTING_DETAILED.md#reporting-bugs).
|
||||
|
||||
To view existing issues, please visit [http://issues.umbraco.org](http://issues.umbraco.org).
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
* [Visual Studio 2017 Community (Free)](https://www.visualstudio.com/vs/community/), or Professional, Enterprise, etc... _(**Minimum of Version 15.7** or higher, this is important, you WILL get issues with lesser versions)_
|
||||
* .NET Framework 4.7.2 installed, get it here: https://www.microsoft.com/net/download/thank-you/net472?survey=false
|
||||
* .NET Framework 4.7.2 developer pack, get it here: https://www.microsoft.com/net/download/thank-you/net472-developer-pack _(be sure this is the ENU file which will be named `NDP472-DevPack-ENU.exe`)_
|
||||
* Clone the Umbraco repository and ensure you have the `temp8` branch checked out
|
||||
* Clone the Umbraco repository using the `temp8` branch. If your git client doesn't support specifying the branch as you clone then use the command `git clone --single-branch -b temp8 <your fork url>`. _(If you clone the repo using the default v7 branch and then checkout the `temp8` branch you **might** get problems)_
|
||||
|
||||
### Start the solution
|
||||
|
||||
* Open the `/src/umbraco.sln` Visual Studio solution
|
||||
* Start the solution (easiest way is to use `ctrl + F5`)
|
||||
* When the solution is first built this may take some time since it will restore all nuget, npm and bower packages, build the .net solution and also build the angular solution.
|
||||
* When the solution is first built this may take some time since it will restore all nuget, npm and bower packages, build the .net solution and also build the angular solution
|
||||
* When the website starts you'll see the Umbraco installer and just follow the prompts
|
||||
* Your all set!
|
||||
* You're all set!
|
||||
|
||||
### Want to run from a zip instead?
|
||||
|
||||
@@ -26,7 +26,8 @@ We recommend running the site with the Visual Studio since you'll be able to rem
|
||||
* _[The process for making code changes in v8 is the same as v7](https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/docs/CONTRIBUTING.md)_
|
||||
* Any .NET changes you make you just need to compile
|
||||
* Any Angular/JS changes you make you will need to make sure you are running the Gulp build. Easiest way to do this is from within Visual Studio in the `Task Runner Explorer`. You can find this window by pressing `ctrl + q` and typing in `Task Runner Explorer`. In this window you'll see all Gulp tasks, double click on the `dev` task, this will compile the angular solution and start a file watcher, then any html/js changes you make are automatically built.
|
||||
* When making js changes, you should have the chrome developer tools open to ensure that cache is disabled
|
||||
* When making js changes, you should have the chrome developer tools open to ensure that cache is disabled
|
||||
* If you are only making C# changes and are not touching the UI code at all, you can significantly speed up the VS build by adding an empty file specifically called `~/src/preserve.belle`. The UI (Belle) build will then be skipped during a Rebuild.
|
||||
|
||||
### What to work on?
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
|
||||
- name: Umbraco.Core Documentation
|
||||
href: https://our.umbraco.org/apidocs/csharp/api/Umbraco.Core.html
|
||||
href: https://our.umbraco.com/apidocs/csharp/api/Umbraco.Core.html
|
||||
- name: Umbraco.Web Documentation
|
||||
href: https://our.umbraco.org/apidocs/csharp/api/Umbraco.Web.html
|
||||
href: https://our.umbraco.com/apidocs/csharp/api/Umbraco.Web.html
|
||||
@@ -215,10 +215,7 @@ namespace Umbraco.Core.Configuration
|
||||
ConfigurationManager.RefreshSection("appSettings");
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete("Use IOHelper.GetRootDirectorySafe() instead")]
|
||||
public static string FullPathToRoot => IOHelper.GetRootDirectorySafe();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether umbraco is running in [debug mode].
|
||||
/// </summary>
|
||||
|
||||
@@ -330,6 +330,16 @@ namespace Umbraco.Core
|
||||
/// ContentType alias for default relation type "Relate Parent Document On Delete".
|
||||
/// </summary>
|
||||
public const string RelateParentDocumentOnDeleteAlias = "relateParentDocumentOnDelete";
|
||||
|
||||
/// <summary>
|
||||
/// ContentType name for default relation type "Relate Parent Media Folder On Delete".
|
||||
/// </summary>
|
||||
public const string RelateParentMediaFolderOnDeleteName = "Relate Parent Media Folder On Delete";
|
||||
|
||||
/// <summary>
|
||||
/// ContentType alias for default relation type "Relate Parent Media Folder On Delete".
|
||||
/// </summary>
|
||||
public const string RelateParentMediaFolderOnDeleteAlias = "relateParentMediaFolderOnDelete";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
/// </summary>
|
||||
public static class PackageRepository
|
||||
{
|
||||
public const string RestApiBaseUrl = "https://our.umbraco.org/webapi/packages/v1";
|
||||
public const string RestApiBaseUrl = "https://our.umbraco.com/webapi/packages/v1";
|
||||
public const string DefaultRepositoryName = "Umbraco package Repository";
|
||||
public const string DefaultRepositoryId = "65194810-1f85-11dd-bd0b-0800200c9a66";
|
||||
}
|
||||
|
||||
@@ -75,6 +75,26 @@ namespace Umbraco.Core
|
||||
/// </summary>
|
||||
public static bool VariesByCultureAndSegment(this PublishedContentType contentType) => contentType.Variations.VariesByCultureAndSegment();
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the property type is invariant.
|
||||
/// </summary>
|
||||
public static bool VariesByNothing(this PublishedPropertyType propertyType) => propertyType.Variations.VariesByNothing();
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the property type varies by culture.
|
||||
/// </summary>
|
||||
public static bool VariesByCulture(this PublishedPropertyType propertyType) => propertyType.Variations.VariesByCulture();
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the property type varies by segment.
|
||||
/// </summary>
|
||||
public static bool VariesBySegment(this PublishedPropertyType propertyType) => propertyType.Variations.VariesBySegment();
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the property type varies by culture and segment.
|
||||
/// </summary>
|
||||
public static bool VariesByCultureAndSegment(this PublishedPropertyType propertyType) => propertyType.Variations.VariesByCultureAndSegment();
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether a variation is invariant.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,206 +0,0 @@
|
||||
using log4net.Core;
|
||||
using log4net.Util;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Security.Principal;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using log4net.Appender;
|
||||
|
||||
namespace Umbraco.Core.Logging
|
||||
{
|
||||
/// <summary>
|
||||
/// Based on https://github.com/cjbhaines/Log4Net.Async
|
||||
/// which is based on code by Chris Haines http://cjbhaines.wordpress.com/2012/02/13/asynchronous-log4net-appenders/
|
||||
/// This is an old/deprecated logger and has been superceded by ParallelForwardingAppender which is included in Umbraco and
|
||||
/// also by AsyncForwardingAppender in the Log4Net.Async library.
|
||||
/// </summary>
|
||||
[Obsolete("This is superceded by the ParallelForwardingAppender, this will be removed in v8, do not use this")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public class AsynchronousRollingFileAppender : RollingFileAppender
|
||||
{
|
||||
private RingBuffer<LoggingEvent> pendingAppends;
|
||||
private readonly ManualResetEvent manualResetEvent;
|
||||
private bool shuttingDown;
|
||||
private bool hasFinished;
|
||||
private bool forceStop;
|
||||
private bool logBufferOverflow;
|
||||
private int bufferOverflowCounter;
|
||||
private DateTime lastLoggedBufferOverflow;
|
||||
private int queueSizeLimit = 1000;
|
||||
public int QueueSizeLimit
|
||||
{
|
||||
get
|
||||
{
|
||||
return queueSizeLimit;
|
||||
}
|
||||
set
|
||||
{
|
||||
queueSizeLimit = value;
|
||||
}
|
||||
}
|
||||
|
||||
public AsynchronousRollingFileAppender()
|
||||
{
|
||||
manualResetEvent = new ManualResetEvent(false);
|
||||
}
|
||||
|
||||
public override void ActivateOptions()
|
||||
{
|
||||
base.ActivateOptions();
|
||||
pendingAppends = new RingBuffer<LoggingEvent>(QueueSizeLimit);
|
||||
pendingAppends.BufferOverflow += OnBufferOverflow;
|
||||
StartAppendTask();
|
||||
}
|
||||
|
||||
protected override void Append(LoggingEvent[] loggingEvents)
|
||||
{
|
||||
Array.ForEach(loggingEvents, Append);
|
||||
}
|
||||
|
||||
protected override void Append(LoggingEvent loggingEvent)
|
||||
{
|
||||
if (FilterEvent(loggingEvent))
|
||||
{
|
||||
pendingAppends.Enqueue(loggingEvent);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
shuttingDown = true;
|
||||
manualResetEvent.WaitOne(TimeSpan.FromSeconds(5));
|
||||
|
||||
if (!hasFinished)
|
||||
{
|
||||
forceStop = true;
|
||||
base.Append(new LoggingEvent(new LoggingEventData
|
||||
{
|
||||
Level = Level.Error,
|
||||
Message = "Unable to clear out the AsyncRollingFileAppender buffer in the allotted time, forcing a shutdown",
|
||||
TimeStamp = DateTime.UtcNow,
|
||||
Identity = "",
|
||||
ExceptionString = "",
|
||||
UserName = WindowsIdentity.GetCurrent() != null ? WindowsIdentity.GetCurrent().Name : "",
|
||||
Domain = AppDomain.CurrentDomain.FriendlyName,
|
||||
ThreadName = Thread.CurrentThread.ManagedThreadId.ToString(),
|
||||
LocationInfo = new LocationInfo(this.GetType().Name, "OnClose", "AsyncRollingFileAppender.cs", "75"),
|
||||
LoggerName = this.GetType().FullName,
|
||||
Properties = new PropertiesDictionary(),
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
base.OnClose();
|
||||
}
|
||||
|
||||
private void StartAppendTask()
|
||||
{
|
||||
if (!shuttingDown)
|
||||
{
|
||||
Task appendTask = new Task(AppendLoggingEvents, TaskCreationOptions.LongRunning);
|
||||
appendTask.LogErrors(LogAppenderError).ContinueWith(x => StartAppendTask()).LogErrors(LogAppenderError);
|
||||
appendTask.Start();
|
||||
}
|
||||
}
|
||||
|
||||
private void LogAppenderError(string logMessage, Exception exception)
|
||||
{
|
||||
base.Append(new LoggingEvent(new LoggingEventData
|
||||
{
|
||||
Level = Level.Error,
|
||||
Message = "Appender exception: " + logMessage,
|
||||
TimeStamp = DateTime.UtcNow,
|
||||
Identity = "",
|
||||
ExceptionString = exception.ToString(),
|
||||
UserName = WindowsIdentity.GetCurrent() != null ? WindowsIdentity.GetCurrent().Name : "",
|
||||
Domain = AppDomain.CurrentDomain.FriendlyName,
|
||||
ThreadName = Thread.CurrentThread.ManagedThreadId.ToString(),
|
||||
LocationInfo = new LocationInfo(this.GetType().Name, "LogAppenderError", "AsyncRollingFileAppender.cs", "152"),
|
||||
LoggerName = this.GetType().FullName,
|
||||
Properties = new PropertiesDictionary(),
|
||||
}));
|
||||
}
|
||||
|
||||
private void AppendLoggingEvents()
|
||||
{
|
||||
LoggingEvent loggingEventToAppend;
|
||||
while (!shuttingDown)
|
||||
{
|
||||
if (logBufferOverflow)
|
||||
{
|
||||
LogBufferOverflowError();
|
||||
logBufferOverflow = false;
|
||||
bufferOverflowCounter = 0;
|
||||
lastLoggedBufferOverflow = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
while (!pendingAppends.TryDequeue(out loggingEventToAppend))
|
||||
{
|
||||
Thread.Sleep(10);
|
||||
if (shuttingDown)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (loggingEventToAppend == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
base.Append(loggingEventToAppend);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
while (pendingAppends.TryDequeue(out loggingEventToAppend) && !forceStop)
|
||||
{
|
||||
try
|
||||
{
|
||||
base.Append(loggingEventToAppend);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
hasFinished = true;
|
||||
manualResetEvent.Set();
|
||||
}
|
||||
|
||||
private void LogBufferOverflowError()
|
||||
{
|
||||
base.Append(new LoggingEvent(new LoggingEventData
|
||||
{
|
||||
Level = Level.Error,
|
||||
Message = string.Format("Buffer overflow. {0} logging events have been lost in the last 30 seconds. [QueueSizeLimit: {1}]", bufferOverflowCounter, QueueSizeLimit),
|
||||
TimeStamp = DateTime.UtcNow,
|
||||
Identity = "",
|
||||
ExceptionString = "",
|
||||
UserName = WindowsIdentity.GetCurrent() != null ? WindowsIdentity.GetCurrent().Name : "",
|
||||
Domain = AppDomain.CurrentDomain.FriendlyName,
|
||||
ThreadName = Thread.CurrentThread.ManagedThreadId.ToString(),
|
||||
LocationInfo = new LocationInfo(this.GetType().Name, "LogBufferOverflowError", "AsyncRollingFileAppender.cs", "152"),
|
||||
LoggerName = this.GetType().FullName,
|
||||
Properties = new PropertiesDictionary(),
|
||||
}));
|
||||
}
|
||||
|
||||
private void OnBufferOverflow(object sender, EventArgs eventArgs)
|
||||
{
|
||||
bufferOverflowCounter++;
|
||||
if (logBufferOverflow == false)
|
||||
{
|
||||
if (lastLoggedBufferOverflow < DateTime.UtcNow.AddSeconds(-30))
|
||||
{
|
||||
logBufferOverflow = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -288,7 +288,8 @@ namespace Umbraco.Core.Migrations.Install
|
||||
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -42, EditorAlias = Constants.PropertyEditors.Aliases.DropDownList, DbType = "Integer" });
|
||||
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -43, EditorAlias = Constants.PropertyEditors.Aliases.CheckBoxList, DbType = "Nvarchar" });
|
||||
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1041, EditorAlias = Constants.PropertyEditors.Aliases.Tags, DbType = "Ntext",
|
||||
Configuration = "{\"group\":\"default\"}" });
|
||||
Configuration = "{\"group\":\"default\", \"storageType\":\"Json\"}"
|
||||
});
|
||||
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1043, EditorAlias = Constants.PropertyEditors.Aliases.ImageCropper, DbType = "Ntext" });
|
||||
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.DefaultContentListView, EditorAlias = Constants.PropertyEditors.Aliases.ListView, DbType = "Nvarchar",
|
||||
Configuration = "{\"pageSize\":100, \"orderBy\":\"updateDate\", \"orderDirection\":\"desc\", \"layouts\":" + layouts + ", \"includeProperties\":[{\"alias\":\"updateDate\",\"header\":\"Last edited\",\"isSystem\":1},{\"alias\":\"owner\",\"header\":\"Updated by\",\"isSystem\":1}]}" });
|
||||
@@ -314,6 +315,9 @@ namespace Umbraco.Core.Migrations.Install
|
||||
relationType = new RelationTypeDto { Id = 2, Alias = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias, ChildObjectType = Constants.ObjectTypes.Document, ParentObjectType = Constants.ObjectTypes.Document, Dual = false, Name = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteName };
|
||||
relationType.UniqueId = (relationType.Alias + "____" + relationType.Name).ToGuid();
|
||||
_database.Insert(Constants.DatabaseSchema.Tables.RelationType, "id", false, relationType);
|
||||
relationType = new RelationTypeDto { Id = 3, Alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias, ChildObjectType = Constants.ObjectTypes.Media, ParentObjectType = Constants.ObjectTypes.Media, Dual = false, Name = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName };
|
||||
relationType.UniqueId = (relationType.Alias + "____" + relationType.Name).ToGuid();
|
||||
_database.Insert(Constants.DatabaseSchema.Tables.RelationType, "id", false, relationType);
|
||||
}
|
||||
|
||||
private void CreateTaskTypeData()
|
||||
|
||||
@@ -107,13 +107,22 @@ namespace Umbraco.Core.Migrations.Upgrade
|
||||
|
||||
Chain<UserForeignKeys>("{3E44F712-E2E3-473A-AE49-5D7F8E67CE3F}"); // shannon added that one - let's keep it as the default path
|
||||
//Chain<AddTypedLabels>("{65D6B71C-BDD5-4A2E-8D35-8896325E9151}"); // stephan added that one = merge conflict, remove,
|
||||
Chain<AddTypedLabels>("{4CACE351-C6B9-4F0C-A6BA-85A02BBD39E4}"); // but it after shannon's, with a new target state,
|
||||
Chain<AddTypedLabels>("{4CACE351-C6B9-4F0C-A6BA-85A02BBD39E4}"); // but add it after shannon's, with a new target state,
|
||||
Add<UserForeignKeys>("{65D6B71C-BDD5-4A2E-8D35-8896325E9151}", "{4CACE351-C6B9-4F0C-A6BA-85A02BBD39E4}"); // and provide a path out of the conflict state
|
||||
// resume at {4CACE351-C6B9-4F0C-A6BA-85A02BBD39E4} ...
|
||||
|
||||
Chain<ContentVariationMigration>("{1350617A-4930-4D61-852F-E3AA9E692173}");
|
||||
Chain<UpdateUmbracoConsent>("{39E5B1F7-A50B-437E-B768-1723AEC45B65}"); // from 7.12.0
|
||||
Chain<FallbackLanguage>("{CF51B39B-9B9A-4740-BB7C-EAF606A7BFBF}");
|
||||
//Chain<FallbackLanguage>("{CF51B39B-9B9A-4740-BB7C-EAF606A7BFBF}"); // andy added that one = merge conflict, remove
|
||||
Chain<AddRelationTypeForMediaFolderOnDelete>("{0541A62B-EF87-4CA2-8225-F0EB98ECCC9F}"); // from 7.12.0
|
||||
Chain<IncreaseLanguageIsoCodeColumnLength>("{EB34B5DC-BB87-4005-985E-D983EA496C38}"); // from 7.12.0
|
||||
Chain<RenameTrueFalseField>("{517CE9EA-36D7-472A-BF4B-A0D6FB1B8F89}"); // from 7.12.0
|
||||
Chain<SetDefaultTagsStorageType>("{BBD99901-1545-40E4-8A5A-D7A675C7D2F2}"); // from 7.12.0
|
||||
|
||||
Chain<FallbackLanguage>("{8B14CEBD-EE47-4AAD-A841-93551D917F11}"); // add andy's after others, with a new target state
|
||||
From("{CF51B39B-9B9A-4740-BB7C-EAF606A7BFBF}") // and provide a path out of andy's
|
||||
.CopyChain("{39E5B1F7-A50B-437E-B768-1723AEC45B65}", "{BBD99901-1545-40E4-8A5A-D7A675C7D2F2}", "{8B14CEBD-EE47-4AAD-A841-93551D917F11}"); // to final
|
||||
// resume at {8B14CEBD-EE47-4AAD-A841-93551D917F11} ...
|
||||
//FINAL
|
||||
|
||||
|
||||
@@ -128,13 +137,13 @@ namespace Umbraco.Core.Migrations.Upgrade
|
||||
From("{init-7.11.0}").Chain("{init-7.10.0}"); // same as 7.10.0
|
||||
From("{init-7.11.1}").Chain("{init-7.10.0}"); // same as 7.10.0
|
||||
|
||||
// 7.12.0 has a migration, define a custom chain which copies the chain
|
||||
// going from {init-7.10.0} to former final, and then goes straight to
|
||||
// main chain, skipping the migration
|
||||
// 7.12.0 has migrations, define a custom chain which copies the chain
|
||||
// going from {init-7.10.0} to former final (1350617A) , and then goes straight to
|
||||
// main chain, skipping the migrations
|
||||
//
|
||||
From("{init-7.12.0}");
|
||||
// copy from copy to (former final) main chain
|
||||
CopyChain("{init-7.10.0}", "{1350617A-4930-4D61-852F-E3AA9E692173}", "{39E5B1F7-A50B-437E-B768-1723AEC45B65}");
|
||||
CopyChain("{init-7.10.0}", "{1350617A-4930-4D61-852F-E3AA9E692173}", "{BBD99901-1545-40E4-8A5A-D7A675C7D2F2}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_7_12_0
|
||||
{
|
||||
public class AddRelationTypeForMediaFolderOnDelete : MigrationBase
|
||||
{
|
||||
|
||||
public AddRelationTypeForMediaFolderOnDelete(IMigrationContext context) : base(context)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Migrate()
|
||||
{
|
||||
var exists = Context.Database.FirstOrDefault<RelationTypeDto>("WHERE alias=@alias", new { alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias });
|
||||
if (exists == null)
|
||||
{
|
||||
Insert.IntoTable(Constants.DatabaseSchema.Tables.RelationType).Row(new
|
||||
{
|
||||
alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias,
|
||||
name = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName,
|
||||
childObjectType = Constants.ObjectTypes.MediaType,
|
||||
parentObjectType = Constants.ObjectTypes.MediaType,
|
||||
dual = false
|
||||
}).Do();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_7_12_0
|
||||
{
|
||||
public class IncreaseLanguageIsoCodeColumnLength : MigrationBase
|
||||
{
|
||||
public IncreaseLanguageIsoCodeColumnLength(IMigrationContext context)
|
||||
: base(context)
|
||||
{ }
|
||||
|
||||
public override void Migrate()
|
||||
{
|
||||
Delete.Index("IX_umbracoLanguage_languageISOCode").OnTable("umbracoLanguage").Do();
|
||||
|
||||
Alter.Table("umbracoLanguage")
|
||||
.AlterColumn("languageISOCode")
|
||||
.AsString(14)
|
||||
.Nullable()
|
||||
.Do();
|
||||
|
||||
Create.Index("IX_umbracoLanguage_languageISOCode")
|
||||
.OnTable("umbracoLanguage")
|
||||
.OnColumn("languageISOCode")
|
||||
.Unique()
|
||||
.Do();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
using Umbraco.Core.Persistence.SqlSyntax;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_7_12_0
|
||||
{
|
||||
public class RenameTrueFalseField : MigrationBase
|
||||
{
|
||||
public RenameTrueFalseField(IMigrationContext context) : base(context)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Migrate()
|
||||
{
|
||||
//rename the existing true/false field
|
||||
Update.Table(NodeDto.TableName).Set(new { text = "Checkbox" }).Where(new { id = Constants.DataTypes.Boolean }).Do();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
using Umbraco.Core.Persistence.SqlSyntax;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_7_12_0
|
||||
{
|
||||
/// <summary>
|
||||
/// Set the default storageType for the tags datatype to "CSV" to ensure backwards compatibilty since the default is going to be JSON in new versions
|
||||
/// </summary>
|
||||
public class SetDefaultTagsStorageType : MigrationBase
|
||||
{
|
||||
public SetDefaultTagsStorageType(IMigrationContext context) : base(context)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Migrate()
|
||||
{
|
||||
if (Context?.Database == null) return;
|
||||
|
||||
// We need to get all datatypes with an alias of "umbraco.tags" so we can loop over them and set the missing values if needed
|
||||
var datatypes = Context.Database.Fetch<DataTypeDto>("SELECT * FROM cmsDataType");
|
||||
var tagsDataTypes = datatypes.Where(x => string.Equals(x.EditorAlias, Constants.PropertyEditors.Aliases.Tags, StringComparison.InvariantCultureIgnoreCase));
|
||||
|
||||
foreach (var datatype in tagsDataTypes)
|
||||
{
|
||||
var dataTypePreValues = JsonConvert.DeserializeObject<JObject>(datatype.Configuration);
|
||||
|
||||
// We need to check if the node has a "storageType" set
|
||||
if (!dataTypePreValues.ContainsKey("storageType"))
|
||||
{
|
||||
dataTypePreValues["storageType"] = "Csv";
|
||||
}
|
||||
|
||||
Update.Table(Constants.DatabaseSchema.Tables.DataType)
|
||||
.Set(new { config = JsonConvert.SerializeObject(dataTypePreValues) })
|
||||
.Where(new { nodeId = datatype.NodeId })
|
||||
.Do();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,6 @@ namespace Umbraco.Core.Migrations.Upgrade.V_7_12_0
|
||||
: base(context)
|
||||
{ }
|
||||
|
||||
public override void Migrate()
{
Alter.Table("umbracoConsent").AlterColumn("comment").AsString().Nullable();
}
|
||||
public override void Migrate()
{
Alter.Table("umbracoConsent").AlterColumn("comment").AsString().Nullable().Do();
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,15 +136,5 @@ namespace Umbraco.Core.Models
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a deep clone of the current entity with its identity/alias and it's property identities reset
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Obsolete("Use DeepCloneWithResetIdentities instead")]
|
||||
public IContentType Clone(string alias)
|
||||
{
|
||||
return DeepCloneWithResetIdentities(alias);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Umbraco.Core.Models.Packaging
|
||||
set => _runAt = value;
|
||||
}
|
||||
|
||||
public bool Undo //NOTE: Should thid default to "False"? but the documentation says default "True" (http://our.umbraco.org/wiki/reference/packaging/package-actions)
|
||||
public bool Undo
|
||||
{
|
||||
get => _undo ?? true;
|
||||
set => _undo = value;
|
||||
|
||||
@@ -156,8 +156,16 @@ namespace Umbraco.Core.Models
|
||||
return value.Split(new[] { delimiter }, StringSplitOptions.RemoveEmptyEntries).Select(x => x.Trim());
|
||||
|
||||
case TagsStorageType.Json:
|
||||
//fixme doesn't take into account variants
|
||||
return JsonConvert.DeserializeObject<JArray>(property.GetValue().ToString()).Select(x => x.ToString().Trim());
|
||||
try
|
||||
{
|
||||
//fixme doesn't take into account variants
|
||||
return JsonConvert.DeserializeObject<JArray>(value).Select(x => x.ToString().Trim());
|
||||
}
|
||||
catch (JsonException)
|
||||
{
|
||||
//cannot parse, malformed
|
||||
return Enumerable.Empty<string>();
|
||||
}
|
||||
|
||||
default:
|
||||
throw new NotSupportedException($"Value \"{storageType}\" is not a valid TagsStorageType.");
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Umbraco.Core.Persistence.Dtos
|
||||
[Column("languageISOCode")]
|
||||
[Index(IndexTypes.UniqueNonClustered)]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(10)]
|
||||
[Length(14)]
|
||||
public string IsoCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Umbraco.Core.Persistence.Dtos
|
||||
[ExplicitColumns]
|
||||
internal class RelationTypeDto
|
||||
{
|
||||
public const int NodeIdSeed = 3;
|
||||
public const int NodeIdSeed = 4;
|
||||
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = NodeIdSeed)]
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
|
||||
.Where<NodeDto>(dto => dto.NodeObjectType == NodeObjectTypeId)
|
||||
.Where("umbracoNode." + SqlSyntax.GetQuotedColumnName("text") + " in (@names)", new { names = roleNames });
|
||||
var existingRoles = Database.Fetch<NodeDto>(existingSql).Select(x => x.Text);
|
||||
var missingRoles = roleNames.Except(existingRoles);
|
||||
var missingRoles = roleNames.Except(existingRoles, StringComparer.CurrentCultureIgnoreCase);
|
||||
var missingGroups = missingRoles.Select(x => new MemberGroup {Name = x}).ToArray();
|
||||
|
||||
if (AmbientScope.Events.DispatchCancelable(SavingMemberGroup, this, new SaveEventArgs<IMemberGroup>(missingGroups)))
|
||||
@@ -258,8 +258,8 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
|
||||
//exist in the roleNames list, then determine which ones are not currently assigned.
|
||||
var mId = memberId;
|
||||
var found = currentlyAssigned.Where(x => x.MemberId == mId).ToArray();
|
||||
var assignedRoles = found.Where(x => roleNames.Contains(x.RoleName)).Select(x => x.RoleName);
|
||||
var nonAssignedRoles = roleNames.Except(assignedRoles);
|
||||
var assignedRoles = found.Where(x => roleNames.Contains(x.RoleName, StringComparer.CurrentCultureIgnoreCase)).Select(x => x.RoleName);
|
||||
var nonAssignedRoles = roleNames.Except(assignedRoles, StringComparer.CurrentCultureIgnoreCase);
|
||||
foreach (var toAssign in nonAssignedRoles)
|
||||
{
|
||||
var groupId = rolesForNames.First(x => x.Text == toAssign).NodeId;
|
||||
|
||||
@@ -12,8 +12,8 @@ namespace Umbraco.Core.PropertyEditors
|
||||
public string Group { get; set; } = "default";
|
||||
|
||||
[ConfigurationField("storageType", "Storage Type", "views/propertyeditors/tags/tags.prevalues.html",
|
||||
Description = "Select whether to store the tags in cache as CSV (default) or as JSON. The only benefits of storage as JSON is that you are able to have commas in a tag value")]
|
||||
public TagsStorageType StorageType { get; set; } = TagsStorageType.Csv;
|
||||
Description = "Select whether to store the tags in cache as JSON (default) or as CSV. The only benefits of storage as JSON is that you are able to have commas in a tag value")]
|
||||
public TagsStorageType StorageType { get; set; } = TagsStorageType.Json;
|
||||
|
||||
// not a field
|
||||
public char Delimiter { get; set; }
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Umbraco.Core.PropertyEditors
|
||||
Delimiter = ',';
|
||||
ReplaceTags = true;
|
||||
TagGroup = "default";
|
||||
StorageType = TagsStorageType.Csv;
|
||||
StorageType = TagsStorageType.Json;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters
|
||||
// splitting by newline
|
||||
//
|
||||
// RS: SD/Stephan Please consider post before deciding to remove
|
||||
//// https://our.umbraco.org/forum/contributing-to-umbraco-cms/76989-keep-the-xml-values-in-the-multipletextstringvalueconverter
|
||||
//// https://our.umbraco.com/forum/contributing-to-umbraco-cms/76989-keep-the-xml-values-in-the-multipletextstringvalueconverter
|
||||
var values = new List<string>();
|
||||
var pos = sourceString.IndexOf("<value>", StringComparison.Ordinal);
|
||||
while (pos >= 0)
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Umbraco.Core.PropertyEditors
|
||||
/// </summary>
|
||||
public class ValueListConfiguration
|
||||
{
|
||||
[ConfigurationField("items", "Configure", "multivalues", Description = "Add and remove values for the list.")]
|
||||
[ConfigurationField("items", "Configure", "multivalues", Description = "Add, remove or sort values for the list.")]
|
||||
public List<ValueListItem> Items { get; set; } = new List<ValueListItem>();
|
||||
|
||||
public class ValueListItem
|
||||
|
||||
@@ -169,21 +169,6 @@ namespace Umbraco.Core.Services
|
||||
/// <returns></returns>
|
||||
IEnumerable<ITemplate> GetTemplateChildren(int masterTemplateId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a template as a template node which can be traversed (parent, children)
|
||||
/// </summary>
|
||||
/// <param name="alias"></param>
|
||||
/// <returns></returns>
|
||||
TemplateNode GetTemplateNode(string alias);
|
||||
|
||||
/// <summary>
|
||||
/// Given a template node in a tree, this will find the template node with the given alias if it is found in the hierarchy, otherwise null
|
||||
/// </summary>
|
||||
/// <param name="anyNode"></param>
|
||||
/// <param name="alias"></param>
|
||||
/// <returns></returns>
|
||||
TemplateNode FindTemplateInTree(TemplateNode anyNode, string alias);
|
||||
|
||||
/// <summary>
|
||||
/// Saves a <see cref="ITemplate"/>
|
||||
/// </summary>
|
||||
|
||||
@@ -344,7 +344,7 @@ namespace Umbraco.Core.Services.Implement
|
||||
// check that the template hasn't been created on disk before creating the content type
|
||||
// if it exists, set the new template content to the existing file content
|
||||
string content = GetViewContent(contentTypeAlias);
|
||||
if (content.IsNullOrWhiteSpace() == false)
|
||||
if (content != null)
|
||||
{
|
||||
template.Content = content;
|
||||
}
|
||||
@@ -369,26 +369,29 @@ namespace Umbraco.Core.Services.Implement
|
||||
return OperationResult.Attempt.Succeed<OperationResultType, ITemplate>(OperationResultType.Success, evtMsgs, template);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new template, setting the content if a view exists in the filesystem
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="content"></param>
|
||||
/// <param name="masterTemplate"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public ITemplate CreateTemplateWithIdentity(string name, string content, ITemplate masterTemplate = null, int userId = 0)
|
||||
{
|
||||
// file might already be on disk, if so grab the content to avoid overwriting
|
||||
var template = new Template(name, name)
|
||||
{
|
||||
Content = content
|
||||
Content = GetViewContent(name) ?? content
|
||||
};
|
||||
|
||||
// check that the template hasn't been created on disk before creating the content type
|
||||
// if it exists, set the new template content to the existing file content
|
||||
string existingContent = GetViewContent(template.Alias);
|
||||
if (existingContent.IsNullOrWhiteSpace() == false)
|
||||
{
|
||||
template.Content = content;
|
||||
}
|
||||
|
||||
|
||||
if (masterTemplate != null)
|
||||
{
|
||||
template.SetMasterTemplate(masterTemplate);
|
||||
}
|
||||
|
||||
SaveTemplate(template, userId);
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
@@ -503,37 +506,6 @@ namespace Umbraco.Core.Services.Implement
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a template as a template node which can be traversed (parent, children)
|
||||
/// </summary>
|
||||
/// <param name="alias"></param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("Use GetDescendants instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public TemplateNode GetTemplateNode(string alias)
|
||||
{
|
||||
using (var scope = ScopeProvider.CreateScope(autoComplete: true))
|
||||
{
|
||||
return _templateRepository.GetTemplateNode(alias);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a template node in a tree, this will find the template node with the given alias if it is found in the hierarchy, otherwise null
|
||||
/// </summary>
|
||||
/// <param name="anyNode"></param>
|
||||
/// <param name="alias"></param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("Use GetDescendants instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public TemplateNode FindTemplateInTree(TemplateNode anyNode, string alias)
|
||||
{
|
||||
using (var scope = ScopeProvider.CreateScope(autoComplete: true))
|
||||
{
|
||||
return _templateRepository.FindTemplateInTree(anyNode, alias);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Saves a <see cref="Template"/>
|
||||
/// </summary>
|
||||
@@ -681,11 +653,11 @@ namespace Umbraco.Core.Services.Implement
|
||||
if (fileName.IsNullOrWhiteSpace())
|
||||
throw new ArgumentNullException(nameof(fileName));
|
||||
|
||||
if (!fileName.EndsWith(".cshtml"))
|
||||
fileName = string.Concat(fileName, ".cshtml");
|
||||
if (!fileName.EndsWith(".cshtml"))
|
||||
fileName = $"{fileName}.cshtml";
|
||||
|
||||
var fs = _templateRepository.GetFileContentStream(fileName);
|
||||
if (fs == null) return string.Empty;
|
||||
if (fs == null) return null;
|
||||
using (var view = new StreamReader(fs))
|
||||
{
|
||||
return view.ReadToEnd().Trim();
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace Umbraco.Core.Strategies
|
||||
{
|
||||
ContentService.Moved += ContentService_Moved;
|
||||
ContentService.Trashed += ContentService_Trashed;
|
||||
MediaService.Moved += MediaService_Moved;
|
||||
MediaService.Trashed += MediaService_Trashed;
|
||||
}
|
||||
|
||||
private static void ContentService_Moved(IContentService sender, MoveEventArgs<IContent> e)
|
||||
@@ -33,10 +35,25 @@ namespace Umbraco.Core.Strategies
|
||||
}
|
||||
}
|
||||
|
||||
private static void MediaService_Moved(IMediaService sender, MoveEventArgs<IMedia> e)
|
||||
{
|
||||
foreach (var item in e.MoveInfoCollection.Where(x => x.OriginalPath.Contains(Constants.System.RecycleBinMedia.ToInvariantString())))
|
||||
{
|
||||
var relationService = Current.Services.RelationService;
|
||||
const string relationTypeAlias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias;
|
||||
var relations = relationService.GetByChildId(item.Entity.Id);
|
||||
foreach (var relation in relations.Where(x => x.RelationType.Alias.InvariantEquals(relationTypeAlias)))
|
||||
{
|
||||
relationService.Delete(relation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void ContentService_Trashed(IContentService sender, MoveEventArgs<IContent> e)
|
||||
{
|
||||
var relationService = Current.Services.RelationService;
|
||||
var entityService = Current.Services.EntityService;
|
||||
var textService = Current.Services.TextService;
|
||||
const string relationTypeAlias = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias;
|
||||
var relationType = relationService.GetRelationTypeByAlias(relationTypeAlias);
|
||||
|
||||
@@ -67,11 +84,51 @@ namespace Umbraco.Core.Strategies
|
||||
relationService.Save(relation);
|
||||
|
||||
Current.Services.AuditService.Add(AuditType.Delete,
|
||||
$"Trashed content with Id: '{item.Entity.Id}' related to original parent content with Id: '{originalParentId}'",
|
||||
string.Format(textService.Localize(
|
||||
"recycleBin/contentTrashed"),
|
||||
item.Entity.Id, originalParentId),
|
||||
item.Entity.WriterId,
|
||||
item.Entity.Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void MediaService_Trashed(IMediaService sender, MoveEventArgs<IMedia> e)
|
||||
{
|
||||
var relationService = Current.Services.RelationService;
|
||||
var entityService = Current.Services.EntityService;
|
||||
var textService = Current.Services.TextService;
|
||||
const string relationTypeAlias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias;
|
||||
var relationType = relationService.GetRelationTypeByAlias(relationTypeAlias);
|
||||
// check that the relation-type exists, if not, then recreate it
|
||||
if (relationType == null)
|
||||
{
|
||||
var documentObjectType = Constants.ObjectTypes.Document;
|
||||
const string relationTypeName = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName;
|
||||
relationType = new RelationType(documentObjectType, documentObjectType, relationTypeAlias, relationTypeName);
|
||||
relationService.Save(relationType);
|
||||
}
|
||||
foreach (var item in e.MoveInfoCollection)
|
||||
{
|
||||
var originalPath = item.OriginalPath.ToDelimitedList();
|
||||
var originalParentId = originalPath.Count > 2
|
||||
? int.Parse(originalPath[originalPath.Count - 2])
|
||||
: Constants.System.Root;
|
||||
//before we can create this relation, we need to ensure that the original parent still exists which
|
||||
//may not be the case if the encompassing transaction also deleted it when this item was moved to the bin
|
||||
if (entityService.Exists(originalParentId))
|
||||
{
|
||||
// Add a relation for the item being deleted, so that we can know the original parent for if we need to restore later
|
||||
var relation = new Relation(originalParentId, item.Entity.Id, relationType);
|
||||
relationService.Save(relation);
|
||||
Current.Services.AuditService.Add(AuditType.Delete,
|
||||
string.Format(textService.Localize(
|
||||
"recycleBin/mediaTrashed"),
|
||||
item.Entity.Id, originalParentId),
|
||||
item.Entity.CreatorId,
|
||||
item.Entity.Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,57 +61,6 @@ namespace Umbraco.Core.Strings
|
||||
|
||||
#endregion
|
||||
|
||||
#region JavaScript
|
||||
|
||||
private const string SssjsFormat = @"
|
||||
var UMBRACO_FORCE_SAFE_ALIAS = {0};
|
||||
var UMBRACO_FORCE_SAFE_ALIAS_URL = '{1}';
|
||||
var UMBRACO_FORCE_SAFE_ALIAS_TIMEOUT = 666;
|
||||
var UMBRACO_FORCE_SAFE_ALIAS_TMKEY = 'safe-alias-tmout';
|
||||
|
||||
function getSafeAliasFromServer(value, callback) {{
|
||||
$.getJSON(UMBRACO_FORCE_SAFE_ALIAS_URL + 'ToSafeAlias?value=' + encodeURIComponent(value), function(json) {{
|
||||
if (json.alias) {{ callback(json.alias); }}
|
||||
}});
|
||||
}}
|
||||
|
||||
function getSafeAlias(input, value, immediate, callback) {{
|
||||
if (!UMBRACO_FORCE_SAFE_ALIAS) {{
|
||||
callback(value);
|
||||
return;
|
||||
}}
|
||||
var timeout = input.data(UMBRACO_FORCE_SAFE_ALIAS_TMKEY);
|
||||
if (timeout) clearTimeout(timeout);
|
||||
input.data(UMBRACO_FORCE_SAFE_ALIAS_TMKEY, setTimeout(function() {{
|
||||
input.removeData(UMBRACO_FORCE_SAFE_ALIAS_TMKEY);
|
||||
getSafeAliasFromServer(value, function(alias) {{ callback(alias); }});
|
||||
}}, UMBRACO_FORCE_SAFE_ALIAS_TIMEOUT));
|
||||
}}
|
||||
|
||||
function validateSafeAlias(input, value, immediate, callback) {{
|
||||
if (!UMBRACO_FORCE_SAFE_ALIAS) {{
|
||||
callback(true);
|
||||
return;
|
||||
}}
|
||||
var timeout = input.data(UMBRACO_FORCE_SAFE_ALIAS_TMKEY);
|
||||
if (timeout) clearTimeout(timeout);
|
||||
input.data(UMBRACO_FORCE_SAFE_ALIAS_TMKEY, setTimeout(function() {{
|
||||
input.removeData(UMBRACO_FORCE_SAFE_ALIAS_TMKEY);
|
||||
getSafeAliasFromServer(value, function(alias) {{ callback(value.toLowerCase() == alias.toLowerCase()); }});
|
||||
}}, UMBRACO_FORCE_SAFE_ALIAS_TIMEOUT));
|
||||
}}
|
||||
";
|
||||
|
||||
/// <summary>
|
||||
/// Gets the JavaScript code defining client-side short string services.
|
||||
/// </summary>
|
||||
public string GetShortStringServicesJavaScript(string controllerPath)
|
||||
{
|
||||
return string.Format(SssjsFormat, _config.ForceSafeAliases ? "true" : "false", controllerPath);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IShortStringHelper CleanFor...
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -6,11 +6,6 @@
|
||||
/// <remarks>Not necessarily optimized to work on large bodies of text.</remarks>
|
||||
public interface IShortStringHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the JavaScript code defining client-side short string services.
|
||||
/// </summary>
|
||||
string GetShortStringServicesJavaScript(string controllerPath);
|
||||
|
||||
/// <summary>
|
||||
/// Cleans a string to produce a string that can safely be used in an alias.
|
||||
/// </summary>
|
||||
|
||||
@@ -107,7 +107,7 @@ namespace Umbraco.Core.Sync
|
||||
// otherwise,
|
||||
// if non-standard ports used,
|
||||
// user may need to set umbracoApplicationUrl manually per
|
||||
// http://our.umbraco.org/documentation/Using-Umbraco/Config-files/umbracoSettings/#ScheduledTasks
|
||||
// https://our.umbraco.com/documentation/Using-Umbraco/Config-files/umbracoSettings/#ScheduledTasks
|
||||
var port = (request.IsSecureConnection == false && globalSettings.UseHttps == false)
|
||||
|| (request.IsSecureConnection && globalSettings.UseHttps)
|
||||
? ":" + request.ServerVariables["SERVER_PORT"]
|
||||
|
||||
@@ -314,6 +314,10 @@
|
||||
<Compile Include="Logging\RollingFileCleanupAppender.cs" />
|
||||
<Compile Include="Migrations\MigrationBase_Extra.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_7_10_0\RenamePreviewFolder.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_7_12_0\AddRelationTypeForMediaFolderOnDelete.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_7_12_0\IncreaseLanguageIsoCodeColumnLength.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_7_12_0\RenameTrueFalseField.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_7_12_0\SetDefaultTagsStorageType.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_7_12_0\UpdateUmbracoConsent.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_7_8_0\AddIndexToPropertyTypeAliasColumn.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_7_8_0\AddInstructionCountColumn.cs" />
|
||||
@@ -545,7 +549,6 @@
|
||||
<Compile Include="ListExtensions.cs" />
|
||||
<Compile Include="Logging\AppDomainTokenConverter.cs" />
|
||||
<Compile Include="Logging\AsyncForwardingAppenderBase.cs" />
|
||||
<Compile Include="Logging\AsynchronousRollingFileAppender.cs" />
|
||||
<Compile Include="Logging\DebugDiagnosticsLogger.cs" />
|
||||
<Compile Include="Logging\ILogger.cs" />
|
||||
<Compile Include="Logging\ImageProcessorLogger.cs" />
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
<appSettings>
|
||||
<add key="umbracoConfigurationStatus" value="6.0.0"/>
|
||||
<add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd"/>
|
||||
<add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd,~/.well-known" />
|
||||
<add key="umbracoReservedPaths" value="~/install/"/>
|
||||
<add key="umbracoPath" value="~/umbraco"/>
|
||||
<add key="umbracoHideTopLevelNodeFromPath" value="true"/>
|
||||
|
||||
@@ -279,7 +279,7 @@ AnotherContentFinder
|
||||
public void Resolves_Trees()
|
||||
{
|
||||
var trees = _typeLoader.GetTrees();
|
||||
Assert.AreEqual(4, trees.Count());
|
||||
Assert.AreEqual(3, trees.Count());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -288,7 +288,7 @@ AnotherContentFinder
|
||||
var types = _typeLoader.GetDataEditors();
|
||||
Assert.AreEqual(43, types.Count());
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This demonstrates this issue: http://issues.umbraco.org/issue/U4-3505 - the TypeList was returning a list of assignable types
|
||||
/// not explicit types which is sort of ideal but is confusing so we'll do it the less confusing way.
|
||||
|
||||
@@ -3,27 +3,27 @@
|
||||
|
||||
<!--
|
||||
umbracoSettings.config configuration documentation can be found here:
|
||||
http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/
|
||||
https://our.umbraco.com/documentation/using-umbraco/config-files/umbracoSettings/
|
||||
Many of the optional settings are not explicitly listed here
|
||||
but can be found in the online documentation, each section has a
|
||||
corresponding URL link below.
|
||||
-->
|
||||
|
||||
<!-- http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/#Content -->
|
||||
<!-- https://our.umbraco.com/documentation/using-umbraco/config-files/umbracoSettings/#Content -->
|
||||
<content>
|
||||
|
||||
<!-- http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/#Imaging -->
|
||||
<!-- https://our.umbraco.com/documentation/using-umbraco/config-files/umbracoSettings/#Imaging -->
|
||||
<imaging/>
|
||||
|
||||
<!-- http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/#Scripteditor -->
|
||||
<!-- https://our.umbraco.com/documentation/using-umbraco/config-files/umbracoSettings/#Scripteditor -->
|
||||
<scripteditor/>
|
||||
|
||||
<!-- http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/#Errors -->
|
||||
<!-- https://our.umbraco.com/documentation/using-umbraco/config-files/umbracoSettings/#Errors -->
|
||||
<errors>
|
||||
<error404>1</error404>
|
||||
</errors>
|
||||
|
||||
<!-- http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/#Notifications -->
|
||||
<!-- https://our.umbraco.com/documentation/using-umbraco/config-files/umbracoSettings/#Notifications -->
|
||||
<notifications>
|
||||
<!-- the email that should be used as from mail when umbraco sends a notification -->
|
||||
<email>robot@umbraco.dk</email>
|
||||
@@ -31,27 +31,27 @@
|
||||
|
||||
</content>
|
||||
|
||||
<!-- http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/#Security
|
||||
<!-- https://our.umbraco.com/documentation/using-umbraco/config-files/umbracoSettings/#Security
|
||||
<security/> -->
|
||||
|
||||
<!-- http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/#RequestHandler
|
||||
<!-- https://our.umbraco.com/documentation/using-umbraco/config-files/umbracoSettings/#RequestHandler
|
||||
<requestHandler/> -->
|
||||
|
||||
<!-- http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/#Templates -->
|
||||
<!-- https://our.umbraco.com/documentation/using-umbraco/config-files/umbracoSettings/#Templates -->
|
||||
<templates>
|
||||
<defaultRenderingEngine>Mvc</defaultRenderingEngine>
|
||||
</templates>
|
||||
|
||||
<!-- http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/#Logging -->
|
||||
<!-- https://our.umbraco.com/documentation/using-umbraco/config-files/umbracoSettings/#Logging -->
|
||||
<logging/>
|
||||
|
||||
<!-- http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/#ScheduledTasks -->
|
||||
<!-- https://our.umbraco.com/documentation/using-umbraco/config-files/umbracoSettings/#ScheduledTasks -->
|
||||
<scheduledTasks/>
|
||||
|
||||
<!-- http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/#Providers -->
|
||||
<!-- https://our.umbraco.com/documentation/using-umbraco/config-files/umbracoSettings/#Providers -->
|
||||
<providers/>
|
||||
|
||||
<!-- http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/#WebRouting -->
|
||||
<!-- https://our.umbraco.com/documentation/using-umbraco/config-files/umbracoSettings/#WebRouting -->
|
||||
<web.routing/>
|
||||
|
||||
</defaultSettings>
|
||||
|
||||
@@ -550,7 +550,6 @@ INSERT INTO umbracoAppTree (appAlias, treeAlias, treeSilent, treeInitialize, tre
|
||||
('developer', 'macros', 0, 1, 2, 'Macros', 'folder.gif', 'folder_o.gif', 'umbraco', 'loadMacros'),
|
||||
('developer', 'xslt', 0, 1, 5, 'XSLT Files', 'folder.gif', 'folder_o.gif', 'umbraco', 'loadXslt'),
|
||||
|
||||
('developer', 'packager', 0, 1, 3, 'Packages', 'folder.gif', 'folder_o.gif', 'umbraco', 'loadPackager'),
|
||||
('developer', 'packagerPackages', 0, 0, 1, 'Packager Packages', 'folder.gif', 'folder_o.gif', 'umbraco', 'loadPackages'),
|
||||
|
||||
('media', 'media', 0, 1, 0, 'Medier', 'folder.gif', 'folder_o.gif', 'umbraco', 'loadMedia'),
|
||||
|
||||
Binary file not shown.
@@ -879,8 +879,7 @@ values (4,1041,'default', 0, 'group')
|
||||
SET IDENTITY_INSERT [cmsDataTypePreValues] OFF
|
||||
;
|
||||
/* 3.1 SQL changes */
|
||||
INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'developer', N'packager', 0, 1, 3, N'Packages', N'folder.gif', N'folder_o.gif', N'umbraco', N'loadPackager')
|
||||
;
|
||||
|
||||
INSERT INTO [umbracoAppTree] ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'developer', N'packagerPackages', 0, 0, 1, N'Packager Packages', N'folder.gif', N'folder_o.gif', N'umbraco', N'loadPackages');
|
||||
|
||||
|
||||
@@ -1669,4 +1668,4 @@ ALTER TABLE cmsMember2MemberGroup ADD CONSTRAINT
|
||||
|
||||
END OF NEW CONSTRAINTS
|
||||
|
||||
***********************************************************************************************************************/
|
||||
***********************************************************************************************************************/
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Umbraco.Tests.Models
|
||||
//ensure that nothing is marked as dirty
|
||||
contentType.ResetDirtyProperties(false);
|
||||
|
||||
var clone = (ContentType)contentType.Clone("newAlias");
|
||||
var clone = (ContentType)contentType.DeepCloneWithResetIdentities("newAlias");
|
||||
|
||||
Assert.AreEqual("newAlias", clone.Alias);
|
||||
Assert.AreNotEqual("newAlias", contentType.Alias);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Packaging;
|
||||
|
||||
namespace Umbraco.Tests.Packaging
|
||||
@@ -14,7 +15,7 @@ namespace Umbraco.Tests.Packaging
|
||||
private static string GetTestPackagePath(string packageName)
|
||||
{
|
||||
const string testPackagesDirName = "Packaging\\Packages";
|
||||
string path = Path.Combine(Core.Configuration.GlobalSettings.FullPathToRoot, testPackagesDirName, packageName);
|
||||
string path = Path.Combine(IOHelper.GetRootDirectorySafe(), testPackagesDirName, packageName);
|
||||
return path;
|
||||
}
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
Assert.That(relationTypes, Is.Not.Null);
|
||||
Assert.That(relationTypes.Any(), Is.True);
|
||||
Assert.That(relationTypes.Any(x => x == null), Is.False);
|
||||
Assert.That(relationTypes.Count(), Is.EqualTo(4));
|
||||
Assert.That(relationTypes.Count(), Is.EqualTo(5));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
|
||||
// Act
|
||||
var exists = repository.Exists(3);
|
||||
var doesntExist = repository.Exists(5);
|
||||
var doesntExist = repository.Exists(6);
|
||||
|
||||
// Assert
|
||||
Assert.That(exists, Is.True);
|
||||
@@ -192,7 +192,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
int count = repository.Count(query);
|
||||
|
||||
// Assert
|
||||
Assert.That(count, Is.EqualTo(4));
|
||||
Assert.That(count, Is.EqualTo(5));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Umbraco.Tests.PropertyEditors
|
||||
/// multiple values such as the drop down list, check box list, color picker, etc....
|
||||
/// </summary>
|
||||
[TestFixture]
|
||||
public class MultiValuePropertyEditorTests
|
||||
public class MultiValuePropertyEditorTests
|
||||
{
|
||||
//TODO: Test the other formatting methods for the drop down classes
|
||||
|
||||
|
||||
@@ -111,11 +111,12 @@ namespace Umbraco.Tests.PublishedContent
|
||||
<creatorName><![CDATA[Custom data with same property name as the member name]]></creatorName>
|
||||
<testRecursive><![CDATA[]]></testRecursive>
|
||||
</Home>
|
||||
<CustomDocument id=""1177"" parentID=""1173"" level=""3"" writerID=""0"" creatorID=""0"" nodeType=""1234"" template=""" + templateId + @""" sortOrder=""2"" createDate=""2012-07-16T15:26:59"" updateDate=""2012-07-18T14:23:35"" nodeName=""custom sub 1"" urlName=""custom-sub-1"" writerName=""admin"" creatorName=""admin"" path=""-1,1046,1173,1177"" isDoc="""" />
|
||||
<CustomDocument id=""1178"" parentID=""1173"" level=""3"" writerID=""0"" creatorID=""0"" nodeType=""1234"" template=""" + templateId + @""" sortOrder=""3"" createDate=""2012-07-16T15:26:59"" updateDate=""2012-07-16T14:23:35"" nodeName=""custom sub 2"" urlName=""custom-sub-2"" writerName=""admin"" creatorName=""admin"" path=""-1,1046,1173,1178"" isDoc="""">
|
||||
<CustomDocument id=""1179"" parentID=""1178"" level=""4"" writerID=""0"" creatorID=""0"" nodeType=""1234"" template=""" + templateId + @""" sortOrder=""1"" createDate=""2012-07-16T15:26:59"" updateDate=""2012-07-18T14:23:35"" nodeName=""custom sub sub 1"" urlName=""custom-sub-sub-1"" writerName=""admin"" creatorName=""admin"" path=""-1,1046,1173,1178,1179"" isDoc="""" />
|
||||
</CustomDocument>
|
||||
<Home id=""1176"" parentID=""1173"" level=""3"" writerID=""0"" creatorID=""0"" nodeType=""1044"" template=""" + templateId + @""" sortOrder=""4"" createDate=""2012-07-20T18:08:08"" updateDate=""2012-07-20T19:10:52"" nodeName=""Sub 3"" urlName=""sub-3"" writerName=""admin"" creatorName=""admin"" path=""-1,1046,1173,1176"" isDoc="""" key=""CDB83BBC-A83B-4BA6-93B8-AADEF67D3C09"">
|
||||
<CustomDocument id=""117"" parentID=""1173"" level=""3"" writerID=""0"" creatorID=""0"" nodeType=""1234"" template=""" + templateId + @""" sortOrder=""2"" createDate=""2018-07-18T10:06:37"" updateDate=""2018-07-18T10:06:37"" nodeName=""custom sub 1"" urlName=""custom-sub-1"" writerName=""admin"" creatorName=""admin"" path=""-1,1046,1173,117"" isDoc="""" />
|
||||
<CustomDocument id=""1177"" parentID=""1173"" level=""3"" writerID=""0"" creatorID=""0"" nodeType=""1234"" template=""" + templateId + @""" sortOrder=""3"" createDate=""2012-07-16T15:26:59"" updateDate=""2012-07-18T14:23:35"" nodeName=""custom sub 1"" urlName=""custom-sub-1"" writerName=""admin"" creatorName=""admin"" path=""-1,1046,1173,1177"" isDoc="""" />
|
||||
<CustomDocument id=""1178"" parentID=""1173"" level=""3"" writerID=""0"" creatorID=""0"" nodeType=""1234"" template=""" + templateId + @""" sortOrder=""4"" createDate=""2012-07-16T15:26:59"" updateDate=""2012-07-16T14:23:35"" nodeName=""custom sub 2"" urlName=""custom-sub-2"" writerName=""admin"" creatorName=""admin"" path=""-1,1046,1173,1178"" isDoc="""">
|
||||
<CustomDocument id=""1179"" parentID=""1178"" level=""4"" writerID=""0"" creatorID=""0"" nodeType=""1234"" template=""" + templateId + @""" sortOrder=""1"" createDate=""2012-07-16T15:26:59"" updateDate=""2012-07-18T14:23:35"" nodeName=""custom sub sub 1"" urlName=""custom-sub-sub-1"" writerName=""admin"" creatorName=""admin"" path=""-1,1046,1173,1178,1179"" isDoc="""" />
|
||||
</CustomDocument>
|
||||
<Home id=""1176"" parentID=""1173"" level=""3"" writerID=""0"" creatorID=""0"" nodeType=""1044"" template=""" + templateId + @""" sortOrder=""5"" createDate=""2012-07-20T18:08:08"" updateDate=""2012-07-20T19:10:52"" nodeName=""Sub 3"" urlName=""sub-3"" writerName=""admin"" creatorName=""admin"" path=""-1,1046,1173,1176"" isDoc="""" key=""CDB83BBC-A83B-4BA6-93B8-AADEF67D3C09"">
|
||||
<content><![CDATA[]]></content>
|
||||
<umbracoNaviHide>1</umbracoNaviHide>
|
||||
</Home>
|
||||
@@ -185,7 +186,7 @@ namespace Umbraco.Tests.PublishedContent
|
||||
.Where(x => x.IsVisible())
|
||||
.ToIndexedArray();
|
||||
|
||||
Assert.AreEqual(3, items.Length);
|
||||
Assert.AreEqual(4, items.Length);
|
||||
|
||||
foreach (var d in items)
|
||||
{
|
||||
@@ -195,6 +196,10 @@ namespace Umbraco.Tests.PublishedContent
|
||||
Assert.IsTrue(d.IsFirst());
|
||||
Assert.IsFalse(d.IsLast());
|
||||
break;
|
||||
case 117:
|
||||
Assert.IsFalse(d.IsFirst());
|
||||
Assert.IsFalse(d.IsLast());
|
||||
break;
|
||||
case 1177:
|
||||
Assert.IsFalse(d.IsFirst());
|
||||
Assert.IsFalse(d.IsLast());
|
||||
@@ -264,7 +269,7 @@ namespace Umbraco.Tests.PublishedContent
|
||||
{
|
||||
var doc = GetNode(1173);
|
||||
|
||||
var items = doc.Children.Take(3).ToIndexedArray();
|
||||
var items = doc.Children.Take(4).ToIndexedArray();
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
@@ -324,7 +329,7 @@ namespace Umbraco.Tests.PublishedContent
|
||||
{
|
||||
var doc = GetNode(1046);
|
||||
|
||||
var expected = new[] { 1046, 1173, 1174, 1177, 1178, 1179, 1176, 1175, 4444, 1172 };
|
||||
var expected = new[] { 1046, 1173, 1174, 117, 1177, 1178, 1179, 1176, 1175, 4444, 1172 };
|
||||
var exindex = 0;
|
||||
|
||||
// must respect the XPath descendants-or-self axis!
|
||||
@@ -569,6 +574,7 @@ namespace Umbraco.Tests.PublishedContent
|
||||
// -- Home: 1173 (parent 1046)
|
||||
// -- Custom Doc: 1178 (parent 1173)
|
||||
// --- Custom Doc2: 1179 (parent: 1178)
|
||||
// -- Custom Doc4: 117 (parent 1173)
|
||||
// - Custom Doc3: 1172 (no parent)
|
||||
|
||||
var home = GetNode(1173);
|
||||
@@ -576,25 +582,30 @@ namespace Umbraco.Tests.PublishedContent
|
||||
var customDoc = GetNode(1178);
|
||||
var customDoc2 = GetNode(1179);
|
||||
var customDoc3 = GetNode(1172);
|
||||
var customDoc4 = GetNode(117);
|
||||
|
||||
Assert.IsTrue(root.IsAncestor(customDoc4));
|
||||
Assert.IsFalse(root.IsAncestor(customDoc3));
|
||||
Assert.IsTrue(root.IsAncestor(customDoc2));
|
||||
Assert.IsTrue(root.IsAncestor(customDoc));
|
||||
Assert.IsTrue(root.IsAncestor(home));
|
||||
Assert.IsFalse(root.IsAncestor(root));
|
||||
|
||||
Assert.IsTrue(home.IsAncestor(customDoc4));
|
||||
Assert.IsFalse(home.IsAncestor(customDoc3));
|
||||
Assert.IsTrue(home.IsAncestor(customDoc2));
|
||||
Assert.IsTrue(home.IsAncestor(customDoc));
|
||||
Assert.IsFalse(home.IsAncestor(home));
|
||||
Assert.IsFalse(home.IsAncestor(root));
|
||||
|
||||
Assert.IsFalse(customDoc.IsAncestor(customDoc4));
|
||||
Assert.IsFalse(customDoc.IsAncestor(customDoc3));
|
||||
Assert.IsTrue(customDoc.IsAncestor(customDoc2));
|
||||
Assert.IsFalse(customDoc.IsAncestor(customDoc));
|
||||
Assert.IsFalse(customDoc.IsAncestor(home));
|
||||
Assert.IsFalse(customDoc.IsAncestor(root));
|
||||
|
||||
Assert.IsFalse(customDoc2.IsAncestor(customDoc4));
|
||||
Assert.IsFalse(customDoc2.IsAncestor(customDoc3));
|
||||
Assert.IsFalse(customDoc2.IsAncestor(customDoc2));
|
||||
Assert.IsFalse(customDoc2.IsAncestor(customDoc));
|
||||
@@ -612,6 +623,7 @@ namespace Umbraco.Tests.PublishedContent
|
||||
// -- Home: 1173 (parent 1046)
|
||||
// -- Custom Doc: 1178 (parent 1173)
|
||||
// --- Custom Doc2: 1179 (parent: 1178)
|
||||
// -- Custom Doc4: 117 (parent 1173)
|
||||
// - Custom Doc3: 1172 (no parent)
|
||||
|
||||
var home = GetNode(1173);
|
||||
@@ -619,31 +631,37 @@ namespace Umbraco.Tests.PublishedContent
|
||||
var customDoc = GetNode(1178);
|
||||
var customDoc2 = GetNode(1179);
|
||||
var customDoc3 = GetNode(1172);
|
||||
var customDoc4 = GetNode(117);
|
||||
|
||||
Assert.IsTrue(root.IsAncestorOrSelf(customDoc4));
|
||||
Assert.IsFalse(root.IsAncestorOrSelf(customDoc3));
|
||||
Assert.IsTrue(root.IsAncestorOrSelf(customDoc2));
|
||||
Assert.IsTrue(root.IsAncestorOrSelf(customDoc));
|
||||
Assert.IsTrue(root.IsAncestorOrSelf(home));
|
||||
Assert.IsTrue(root.IsAncestorOrSelf(root));
|
||||
|
||||
Assert.IsTrue(home.IsAncestorOrSelf(customDoc4));
|
||||
Assert.IsFalse(home.IsAncestorOrSelf(customDoc3));
|
||||
Assert.IsTrue(home.IsAncestorOrSelf(customDoc2));
|
||||
Assert.IsTrue(home.IsAncestorOrSelf(customDoc));
|
||||
Assert.IsTrue(home.IsAncestorOrSelf(home));
|
||||
Assert.IsFalse(home.IsAncestorOrSelf(root));
|
||||
|
||||
Assert.IsFalse(customDoc.IsAncestorOrSelf(customDoc4));
|
||||
Assert.IsFalse(customDoc.IsAncestorOrSelf(customDoc3));
|
||||
Assert.IsTrue(customDoc.IsAncestorOrSelf(customDoc2));
|
||||
Assert.IsTrue(customDoc.IsAncestorOrSelf(customDoc));
|
||||
Assert.IsFalse(customDoc.IsAncestorOrSelf(home));
|
||||
Assert.IsFalse(customDoc.IsAncestorOrSelf(root));
|
||||
|
||||
Assert.IsFalse(customDoc2.IsAncestorOrSelf(customDoc4));
|
||||
Assert.IsFalse(customDoc2.IsAncestorOrSelf(customDoc3));
|
||||
Assert.IsTrue(customDoc2.IsAncestorOrSelf(customDoc2));
|
||||
Assert.IsFalse(customDoc2.IsAncestorOrSelf(customDoc));
|
||||
Assert.IsFalse(customDoc2.IsAncestorOrSelf(home));
|
||||
Assert.IsFalse(customDoc2.IsAncestorOrSelf(root));
|
||||
|
||||
Assert.IsTrue(customDoc4.IsAncestorOrSelf(customDoc4));
|
||||
Assert.IsTrue(customDoc3.IsAncestorOrSelf(customDoc3));
|
||||
}
|
||||
|
||||
@@ -657,7 +675,7 @@ namespace Umbraco.Tests.PublishedContent
|
||||
|
||||
Assert.IsNotNull(result);
|
||||
|
||||
Assert.AreEqual(9, result.Count());
|
||||
Assert.AreEqual(10, result.Count());
|
||||
Assert.IsTrue(result.Select(x => ((dynamic)x).Id).ContainsAll(new dynamic[] { 1046, 1173, 1174, 1176, 1175 }));
|
||||
}
|
||||
|
||||
@@ -670,7 +688,7 @@ namespace Umbraco.Tests.PublishedContent
|
||||
|
||||
Assert.IsNotNull(result);
|
||||
|
||||
Assert.AreEqual(8, result.Count());
|
||||
Assert.AreEqual(9, result.Count());
|
||||
Assert.IsTrue(result.Select(x => ((dynamic)x).Id).ContainsAll(new dynamic[] { 1173, 1174, 1176, 1175, 4444 }));
|
||||
}
|
||||
|
||||
@@ -682,6 +700,7 @@ namespace Umbraco.Tests.PublishedContent
|
||||
// -- Home: 1173 (parent 1046)
|
||||
// -- Custom Doc: 1178 (parent 1173)
|
||||
// --- Custom Doc2: 1179 (parent: 1178)
|
||||
// -- Custom Doc4: 117 (parent 1173)
|
||||
// - Custom Doc3: 1172 (no parent)
|
||||
|
||||
var home = GetNode(1173);
|
||||
@@ -689,30 +708,35 @@ namespace Umbraco.Tests.PublishedContent
|
||||
var customDoc = GetNode(1178);
|
||||
var customDoc2 = GetNode(1179);
|
||||
var customDoc3 = GetNode(1172);
|
||||
var customDoc4 = GetNode(117);
|
||||
|
||||
Assert.IsFalse(root.IsDescendant(root));
|
||||
Assert.IsFalse(root.IsDescendant(home));
|
||||
Assert.IsFalse(root.IsDescendant(customDoc));
|
||||
Assert.IsFalse(root.IsDescendant(customDoc2));
|
||||
Assert.IsFalse(root.IsDescendant(customDoc3));
|
||||
Assert.IsFalse(root.IsDescendant(customDoc4));
|
||||
|
||||
Assert.IsTrue(home.IsDescendant(root));
|
||||
Assert.IsFalse(home.IsDescendant(home));
|
||||
Assert.IsFalse(home.IsDescendant(customDoc));
|
||||
Assert.IsFalse(home.IsDescendant(customDoc2));
|
||||
Assert.IsFalse(home.IsDescendant(customDoc3));
|
||||
Assert.IsFalse(home.IsDescendant(customDoc4));
|
||||
|
||||
Assert.IsTrue(customDoc.IsDescendant(root));
|
||||
Assert.IsTrue(customDoc.IsDescendant(home));
|
||||
Assert.IsFalse(customDoc.IsDescendant(customDoc));
|
||||
Assert.IsFalse(customDoc.IsDescendant(customDoc2));
|
||||
Assert.IsFalse(customDoc.IsDescendant(customDoc3));
|
||||
Assert.IsFalse(customDoc.IsDescendant(customDoc4));
|
||||
|
||||
Assert.IsTrue(customDoc2.IsDescendant(root));
|
||||
Assert.IsTrue(customDoc2.IsDescendant(home));
|
||||
Assert.IsTrue(customDoc2.IsDescendant(customDoc));
|
||||
Assert.IsFalse(customDoc2.IsDescendant(customDoc2));
|
||||
Assert.IsFalse(customDoc2.IsDescendant(customDoc3));
|
||||
Assert.IsFalse(customDoc2.IsDescendant(customDoc4));
|
||||
|
||||
Assert.IsFalse(customDoc3.IsDescendant(customDoc3));
|
||||
}
|
||||
@@ -725,6 +749,7 @@ namespace Umbraco.Tests.PublishedContent
|
||||
// -- Home: 1173 (parent 1046)
|
||||
// -- Custom Doc: 1178 (parent 1173)
|
||||
// --- Custom Doc2: 1179 (parent: 1178)
|
||||
// -- Custom Doc4: 117 (parent 1173)
|
||||
// - Custom Doc3: 1172 (no parent)
|
||||
|
||||
var home = GetNode(1173);
|
||||
@@ -732,30 +757,35 @@ namespace Umbraco.Tests.PublishedContent
|
||||
var customDoc = GetNode(1178);
|
||||
var customDoc2 = GetNode(1179);
|
||||
var customDoc3 = GetNode(1172);
|
||||
var customDoc4 = GetNode(117);
|
||||
|
||||
Assert.IsTrue(root.IsDescendantOrSelf(root));
|
||||
Assert.IsFalse(root.IsDescendantOrSelf(home));
|
||||
Assert.IsFalse(root.IsDescendantOrSelf(customDoc));
|
||||
Assert.IsFalse(root.IsDescendantOrSelf(customDoc2));
|
||||
Assert.IsFalse(root.IsDescendantOrSelf(customDoc3));
|
||||
Assert.IsFalse(root.IsDescendantOrSelf(customDoc4));
|
||||
|
||||
Assert.IsTrue(home.IsDescendantOrSelf(root));
|
||||
Assert.IsTrue(home.IsDescendantOrSelf(home));
|
||||
Assert.IsFalse(home.IsDescendantOrSelf(customDoc));
|
||||
Assert.IsFalse(home.IsDescendantOrSelf(customDoc2));
|
||||
Assert.IsFalse(home.IsDescendantOrSelf(customDoc3));
|
||||
Assert.IsFalse(home.IsDescendantOrSelf(customDoc4));
|
||||
|
||||
Assert.IsTrue(customDoc.IsDescendantOrSelf(root));
|
||||
Assert.IsTrue(customDoc.IsDescendantOrSelf(home));
|
||||
Assert.IsTrue(customDoc.IsDescendantOrSelf(customDoc));
|
||||
Assert.IsFalse(customDoc.IsDescendantOrSelf(customDoc2));
|
||||
Assert.IsFalse(customDoc.IsDescendantOrSelf(customDoc3));
|
||||
Assert.IsFalse(customDoc.IsDescendantOrSelf(customDoc4));
|
||||
|
||||
Assert.IsTrue(customDoc2.IsDescendantOrSelf(root));
|
||||
Assert.IsTrue(customDoc2.IsDescendantOrSelf(home));
|
||||
Assert.IsTrue(customDoc2.IsDescendantOrSelf(customDoc));
|
||||
Assert.IsTrue(customDoc2.IsDescendantOrSelf(customDoc2));
|
||||
Assert.IsFalse(customDoc2.IsDescendantOrSelf(customDoc3));
|
||||
Assert.IsFalse(customDoc2.IsDescendantOrSelf(customDoc4));
|
||||
|
||||
Assert.IsTrue(customDoc3.IsDescendantOrSelf(customDoc3));
|
||||
}
|
||||
|
||||
@@ -1847,7 +1847,7 @@ namespace Umbraco.Tests.Services
|
||||
object obj =
|
||||
new
|
||||
{
|
||||
tags = "Hello,World"
|
||||
tags = "[\"Hello\",\"World\"]"
|
||||
};
|
||||
var content1 = MockedContent.CreateBasicContent(contentType);
|
||||
content1.PropertyValues(obj);
|
||||
@@ -2006,13 +2006,13 @@ namespace Umbraco.Tests.Services
|
||||
contentService.Save(content);
|
||||
|
||||
// value has been set but no tags have been created (not published)
|
||||
Assert.AreEqual("hello,world", content.GetValue(propAlias));
|
||||
Assert.AreEqual("[\"hello\",\"world\"]", content.GetValue(propAlias));
|
||||
var contentTags = ServiceContext.TagService.GetTagsForEntity(content.Id).ToArray();
|
||||
Assert.AreEqual(0, contentTags.Length);
|
||||
|
||||
// reloading the content yields the same result
|
||||
content = (Content) contentService.GetById(content.Id);
|
||||
Assert.AreEqual("hello,world", content.GetValue(propAlias));
|
||||
Assert.AreEqual("[\"hello\",\"world\"]", content.GetValue(propAlias));
|
||||
contentTags = ServiceContext.TagService.GetTagsForEntity(content.Id).ToArray();
|
||||
Assert.AreEqual(0, contentTags.Length);
|
||||
|
||||
@@ -2020,7 +2020,7 @@ namespace Umbraco.Tests.Services
|
||||
contentService.SaveAndPublish(content);
|
||||
|
||||
// now tags have been set (published)
|
||||
Assert.AreEqual("hello,world", content.GetValue(propAlias));
|
||||
Assert.AreEqual("[\"hello\",\"world\"]", content.GetValue(propAlias));
|
||||
contentTags = ServiceContext.TagService.GetTagsForEntity(content.Id).ToArray();
|
||||
Assert.AreEqual(2, contentTags.Length);
|
||||
|
||||
@@ -2028,7 +2028,7 @@ namespace Umbraco.Tests.Services
|
||||
var copy = contentService.Copy(content, content.ParentId, false);
|
||||
|
||||
// copy is not published, so property has value, but no tags have been created
|
||||
Assert.AreEqual("hello,world", copy.GetValue(propAlias));
|
||||
Assert.AreEqual("[\"hello\",\"world\"]", copy.GetValue(propAlias));
|
||||
var copiedTags = ServiceContext.TagService.GetTagsForEntity(copy.Id).ToArray();
|
||||
Assert.AreEqual(0, copiedTags.Length);
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ namespace Umbraco.Tests.Services.Importing {
|
||||
/// <name>Template-Update</name>
|
||||
/// <version>0.1</version>
|
||||
/// <license url="http://www.opensource.org/licenses/mit-license.php">MIT license</license>
|
||||
/// <url>http://our.umbraco.org/projects</url>
|
||||
/// <url>https://our.umbraco.com/projects</url>
|
||||
/// <requirements>
|
||||
/// <major>3</major>
|
||||
/// <minor>0</minor>
|
||||
@@ -311,7 +311,7 @@ namespace Umbraco.Tests.Services.Importing {
|
||||
/// <name>Template-Update</name>
|
||||
/// <version>0.1</version>
|
||||
/// <license url="http://www.opensource.org/licenses/mit-license.php">MIT license</license>
|
||||
/// <url>http://our.umbraco.org/projects</url>
|
||||
/// <url>https://our.umbraco.com/projects</url>
|
||||
/// <requirements>
|
||||
/// <major>3</major>
|
||||
/// <minor>0</minor>
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
<name>StandardWebsiteMVC</name>
|
||||
<version>2.0</version>
|
||||
<license url="http://www.opensource.org/licenses/mit-license.php">MIT license</license>
|
||||
<url>http://our.umbraco.org/projects/starter-kits/standard-website-mvc</url>
|
||||
<url>https://our.umbraco.com/projects/starter-kits/standard-website-mvc</url>
|
||||
<requirements>
|
||||
<major>3</major>
|
||||
<minor>0</minor>
|
||||
@@ -218,7 +218,7 @@ Google Maps - A map macro that you can use within Rich Text Areas
|
||||
</panelContent2>
|
||||
<panelContent3>
|
||||
<![CDATA[<h2>Contact Us</h2>
|
||||
<p><a href="http://www.twitter.com/chriskoiak" target="_blank"><img src="/images/twitter_square.png" alt="Contact Us on Twitter" class="fr"/></a>We'd love to hear how this package has helped you and how it can be improved. Get in touch on the <a href="http://our.umbraco.org/projects/starter-kits/standard-website-mvc" target="_blank">project website</a> or via <a href="http://www.twitter.com/chriskoiak" target="_blank">twitter</a></p>]]>
|
||||
<p><a href="http://www.twitter.com/chriskoiak" target="_blank"><img src="/images/twitter_square.png" alt="Contact Us on Twitter" class="fr"/></a>We'd love to hear how this package has helped you and how it can be improved. Get in touch on the <a href="https://our.umbraco.com/projects/starter-kits/standard-website-mvc" target="_blank">project website</a> or via <a href="http://www.twitter.com/chriskoiak" target="_blank">twitter</a></p>]]>
|
||||
</panelContent3>
|
||||
<primaryNavigation><![CDATA[1072,1073,1077,1079,1080]]></primaryNavigation>
|
||||
<address>Standard Website MVC, Company Address, Glasgow, Postcode</address>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<name>Template-Update</name>
|
||||
<version>0.1</version>
|
||||
<license url="http://www.opensource.org/licenses/mit-license.php">MIT license</license>
|
||||
<url>http://our.umbraco.org/projects</url>
|
||||
<url>https://our.umbraco.com/projects</url>
|
||||
<requirements>
|
||||
<major>3</major>
|
||||
<minor>0</minor>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<name>Template-Update</name>
|
||||
<version>0.1</version>
|
||||
<license url="http://www.opensource.org/licenses/mit-license.php">MIT license</license>
|
||||
<url>http://our.umbraco.org/projects</url>
|
||||
<url>https://our.umbraco.com/projects</url>
|
||||
<requirements>
|
||||
<major>3</major>
|
||||
<minor>0</minor>
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
<name>uBlogsy</name>
|
||||
<version>3.0</version>
|
||||
<license url="http://www.opensource.org/licenses/mit-license.php">MIT license</license>
|
||||
<url>http://our.umbraco.org/projects/starter-kits/ublogsy</url>
|
||||
<url>https://our.umbraco.com/projects/starter-kits/ublogsy</url>
|
||||
<requirements>
|
||||
<major>3</major>
|
||||
<minor>0</minor>
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Packaging;
|
||||
using Umbraco.Core.Services;
|
||||
@@ -76,7 +77,7 @@ namespace Umbraco.Tests.Services
|
||||
private static string GetTestPackagePath(string packageName)
|
||||
{
|
||||
const string testPackagesDirName = "Packaging\\Packages";
|
||||
string path = Path.Combine(Core.Configuration.GlobalSettings.FullPathToRoot, testPackagesDirName, packageName);
|
||||
string path = Path.Combine(IOHelper.GetRootDirectorySafe(), testPackagesDirName, packageName);
|
||||
return path;
|
||||
}
|
||||
|
||||
|
||||
@@ -334,7 +334,7 @@ namespace Umbraco.Tests.Services
|
||||
<panelContent2><![CDATA[<h2>Umbraco Development</h2>
|
||||
<p><img src='/images/umbraco_square.jpg' alt='Umbraco' class='fr'/>Umbraco the the leading ASP.NET open source CMS, under pinning over 150,000 websites. Our Certified Developers are experts in developing high performance and feature rich websites.</p>]]></panelContent2>
|
||||
<panelContent3><![CDATA[<h2>Contact Us</h2>
|
||||
<p><a href='http://www.twitter.com/chriskoiak' target='_blank'><img src='/images/twitter_square.png' alt='Contact Us on Twitter' class='fr'/></a>We'd love to hear how this package has helped you and how it can be improved. Get in touch on the <a href='http://our.umbraco.org/projects/starter-kits/standard-website-mvc' target='_blank'>project website</a> or via <a href='http://www.twitter.com/chriskoiak' target='_blank'>twitter</a></p>]]></panelContent3>
|
||||
<p><a href='http://www.twitter.com/chriskoiak' target='_blank'><img src='/images/twitter_square.png' alt='Contact Us on Twitter' class='fr'/></a>We'd love to hear how this package has helped you and how it can be improved. Get in touch on the <a href='https://our.umbraco.com/projects/starter-kits/standard-website-mvc' target='_blank'>project website</a> or via <a href='http://www.twitter.com/chriskoiak' target='_blank'>twitter</a></p>]]></panelContent3>
|
||||
<primaryNavigation><![CDATA[1231,1232,1236,1238,1239]]></primaryNavigation>
|
||||
<address>Standard Website MVC, Company Address, Glasgow, Postcode</address>
|
||||
<copyright>Copyright &copy; 2012 Your Company</copyright>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Newtonsoft.Json;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
@@ -52,7 +53,7 @@ namespace Umbraco.Tests.Services
|
||||
// get it back
|
||||
content1 = contentService.GetById(content1.Id);
|
||||
var tagsValue = content1.GetValue("tags").ToString();
|
||||
var tagsValues = tagsValue.Split(',');
|
||||
var tagsValues = JsonConvert.DeserializeObject<string[]>(tagsValue);
|
||||
Assert.AreEqual(3, tagsValues.Length);
|
||||
Assert.Contains("pig", tagsValues);
|
||||
Assert.Contains("goat", tagsValues);
|
||||
|
||||
@@ -12,8 +12,6 @@ namespace Umbraco.Tests.Strings
|
||||
|
||||
public bool IsFrozen { get; private set; }
|
||||
|
||||
public string GetShortStringServicesJavaScript(string controllerPath) { return "SSSJS"; }
|
||||
|
||||
public string CleanStringForSafeAlias(string text)
|
||||
{
|
||||
return "SAFE-ALIAS::" + text;
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
<Project DefaultTargets="RunTests" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<MSBuildCommunityTasksPath>..\..\tools\MSBuildCommunityTasks</MSBuildCommunityTasksPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets" />
|
||||
|
||||
<Target Name="RunTests">
|
||||
|
||||
<ItemGroup>
|
||||
<TestAssemblies Include=".\bin\Debug\Umbraco.Tests.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<NUnit ToolPath="..\..\tools\NUnit\" Assemblies="@(TestAssemblies)" OutputXmlFile=".\NUnitTestResults.xml" />
|
||||
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
@@ -351,7 +351,7 @@ gulp.task('docs', [], function (cb) {
|
||||
title: "Umbraco Backoffice UI API Documentation",
|
||||
dest: 'docs/api',
|
||||
styles: ['docs/umb-docs.css'],
|
||||
image: "https://our.umbraco.org/assets/images/logo.svg"
|
||||
image: "https://our.umbraco.com/assets/images/logo.svg"
|
||||
}
|
||||
|
||||
return gulpDocs.sections({
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
<b>Added in Umbraco 7.8</b>. The tour component is a global component and is already added to the umbraco markup.
|
||||
In the Umbraco UI the tours live in the "Help drawer" which opens when you click the Help-icon in the bottom left corner of Umbraco.
|
||||
You can easily add you own tours to the Help-drawer or show and start tours from
|
||||
anywhere in the Umbraco backoffice. To see a real world example of a custom tour implementation, install <a href="https://our.umbraco.org/projects/starter-kits/the-starter-kit/">The Starter Kit</a> in Umbraco 7.8
|
||||
anywhere in the Umbraco backoffice. To see a real world example of a custom tour implementation, install <a href="https://our.umbraco.com/projects/starter-kits/the-starter-kit/">The Starter Kit</a> in Umbraco 7.8
|
||||
|
||||
<h1><b>Extending the help drawer with custom tours</b></h1>
|
||||
The easiet way to add new tours to Umbraco is through the Help-drawer. All it requires is a my-tour.json file.
|
||||
|
||||
+4
-2
@@ -64,7 +64,7 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
function ToggleDirective(localizationService) {
|
||||
function ToggleDirective(localizationService, eventsService) {
|
||||
|
||||
function link(scope, el, attr, ctrl) {
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
|
||||
function onInit() {
|
||||
setLabelText();
|
||||
eventsService.emit("toggleValue", { value: scope.checked });
|
||||
}
|
||||
|
||||
function setLabelText() {
|
||||
@@ -98,7 +99,8 @@
|
||||
}
|
||||
|
||||
scope.click = function() {
|
||||
if(scope.onClick) {
|
||||
if (scope.onClick) {
|
||||
eventsService.emit("toggleValue", { value: !scope.checked });
|
||||
scope.onClick();
|
||||
}
|
||||
};
|
||||
|
||||
+8
@@ -68,6 +68,9 @@
|
||||
// make sure dates are formatted to the user's locale
|
||||
formatDatesToLocal();
|
||||
|
||||
// Declare a fallback URL for the <umb-node-preview/> directive
|
||||
scope.previewOpenUrl = '#/settings/documenttypes/edit/' + scope.documentType.id;
|
||||
|
||||
}
|
||||
|
||||
scope.auditTrailPageChange = function (pageNumber) {
|
||||
@@ -88,6 +91,11 @@
|
||||
editorService.documentTypeEditor(editor);
|
||||
};
|
||||
|
||||
scope.openTemplate = function () {
|
||||
var url = "/settings/templates/edit/" + scope.node.templateId;
|
||||
$location.url(url);
|
||||
}
|
||||
|
||||
scope.updateTemplate = function (templateAlias) {
|
||||
|
||||
// update template value
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ Use this directive to construct a title. Recommended to use it inside an {@link
|
||||
</umb-box-content>
|
||||
</umb-box>
|
||||
</pre>
|
||||
{@link https://our.umbraco.org/documentation/extending/language-files/ Here you can see more about the language files}
|
||||
{@link https://our.umbraco.com/documentation/extending/language-files/ Here you can see more about the language files}
|
||||
|
||||
<h3>Use in combination with:</h3>
|
||||
<ul>
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
|
||||
/**
|
||||
@ngdoc directive
|
||||
@name umbraco.directives.directive:umbColorSwatches
|
||||
@restrict E
|
||||
@scope
|
||||
@description
|
||||
Use this directive to generate color swatches to pick from.
|
||||
<h3>Markup example</h3>
|
||||
<pre>
|
||||
<umb-color-swatches
|
||||
colors="colors"
|
||||
selected-color="color"
|
||||
size="s">
|
||||
</umb-color-swatches>
|
||||
</pre>
|
||||
@param {array} colors (<code>attribute</code>): The array of colors.
|
||||
@param {string} colors (<code>attribute</code>): The array of colors.
|
||||
@param {string} selectedColor (<code>attribute</code>): The selected color.
|
||||
@param {string} size (<code>attribute</code>): The size (s, m).
|
||||
@param {function} onSelect (<code>expression</code>): Callback function when the item is selected.
|
||||
**/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
function ColorSwatchesDirective() {
|
||||
|
||||
function link(scope, el, attr, ctrl) {
|
||||
|
||||
scope.setColor = function (color) {
|
||||
//scope.selectedColor({color: color });
|
||||
scope.selectedColor = color;
|
||||
|
||||
if (scope.onSelect) {
|
||||
scope.onSelect(color);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
var directive = {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
transclude: true,
|
||||
templateUrl: 'views/components/umb-color-swatches.html',
|
||||
scope: {
|
||||
colors: '=?',
|
||||
size: '@',
|
||||
selectedColor: '=',
|
||||
onSelect: '&'
|
||||
},
|
||||
link: link
|
||||
};
|
||||
|
||||
return directive;
|
||||
|
||||
}
|
||||
|
||||
angular.module('umbraco.directives').directive('umbColorSwatches', ColorSwatchesDirective);
|
||||
|
||||
})();
|
||||
+63
-58
@@ -1,7 +1,7 @@
|
||||
(function() {
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
function GridSelector(overlayService) {
|
||||
function GridSelector($location, overlayService) {
|
||||
|
||||
function link(scope, el, attr, ctrl) {
|
||||
|
||||
@@ -11,18 +11,18 @@
|
||||
scope.itemLabel = "";
|
||||
|
||||
// set default item name
|
||||
if(!scope.itemName){
|
||||
if (!scope.itemName) {
|
||||
scope.itemLabel = "item";
|
||||
} else {
|
||||
scope.itemLabel = scope.itemName;
|
||||
}
|
||||
|
||||
scope.removeItem = function(selectedItem) {
|
||||
scope.removeItem = function (selectedItem) {
|
||||
var selectedItemIndex = scope.selectedItems.indexOf(selectedItem);
|
||||
scope.selectedItems.splice(selectedItemIndex, 1);
|
||||
};
|
||||
|
||||
scope.removeDefaultItem = function() {
|
||||
scope.removeDefaultItem = function () {
|
||||
|
||||
// it will be the last item so we can clear the array
|
||||
scope.selectedItems = [];
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
};
|
||||
|
||||
scope.openItemPicker = function($event){
|
||||
scope.openItemPicker = function ($event) {
|
||||
var dialogModel = {
|
||||
view: "itempicker",
|
||||
title: "Choose " + scope.itemLabel,
|
||||
@@ -40,10 +40,10 @@
|
||||
selectedItems: scope.selectedItems,
|
||||
position: "target",
|
||||
event: $event,
|
||||
submit: function(model) {
|
||||
submit: function (model) {
|
||||
scope.selectedItems.push(model.selectedItem);
|
||||
// if no default item - set item as default
|
||||
if(scope.defaultItem === null) {
|
||||
if (scope.defaultItem === null) {
|
||||
scope.setAsDefaultItem(model.selectedItem);
|
||||
}
|
||||
overlayService.close();
|
||||
@@ -55,7 +55,12 @@
|
||||
overlayService.open(dialogModel);
|
||||
};
|
||||
|
||||
scope.setAsDefaultItem = function(selectedItem) {
|
||||
scope.openTemplate = function (selectedItem) {
|
||||
var url = "/settings/templates/edit/" + selectedItem.id;
|
||||
$location.url(url);
|
||||
}
|
||||
|
||||
scope.setAsDefaultItem = function (selectedItem) {
|
||||
|
||||
// clear default item
|
||||
scope.defaultItem = {};
|
||||
@@ -66,69 +71,69 @@
|
||||
|
||||
function updatePlaceholders() {
|
||||
|
||||
// update default item
|
||||
if(scope.defaultItem !== null && scope.defaultItem.placeholder) {
|
||||
// update default item
|
||||
if (scope.defaultItem !== null && scope.defaultItem.placeholder) {
|
||||
|
||||
scope.defaultItem.name = scope.name;
|
||||
scope.defaultItem.name = scope.name;
|
||||
|
||||
if(scope.alias !== null && scope.alias !== undefined) {
|
||||
scope.defaultItem.alias = scope.alias;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// update selected items
|
||||
angular.forEach(scope.selectedItems, function(selectedItem) {
|
||||
if(selectedItem.placeholder) {
|
||||
|
||||
selectedItem.name = scope.name;
|
||||
|
||||
if(scope.alias !== null && scope.alias !== undefined) {
|
||||
selectedItem.alias = scope.alias;
|
||||
}
|
||||
if (scope.alias !== null && scope.alias !== undefined) {
|
||||
scope.defaultItem.alias = scope.alias;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// update availableItems
|
||||
angular.forEach(scope.availableItems, function(availableItem) {
|
||||
if(availableItem.placeholder) {
|
||||
// update selected items
|
||||
angular.forEach(scope.selectedItems, function (selectedItem) {
|
||||
if (selectedItem.placeholder) {
|
||||
|
||||
availableItem.name = scope.name;
|
||||
selectedItem.name = scope.name;
|
||||
|
||||
if(scope.alias !== null && scope.alias !== undefined) {
|
||||
availableItem.alias = scope.alias;
|
||||
}
|
||||
if (scope.alias !== null && scope.alias !== undefined) {
|
||||
selectedItem.alias = scope.alias;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// update availableItems
|
||||
angular.forEach(scope.availableItems, function (availableItem) {
|
||||
if (availableItem.placeholder) {
|
||||
|
||||
availableItem.name = scope.name;
|
||||
|
||||
if (scope.alias !== null && scope.alias !== undefined) {
|
||||
availableItem.alias = scope.alias;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function activate() {
|
||||
|
||||
// add watchers for updating placeholde name and alias
|
||||
if(scope.updatePlaceholder) {
|
||||
eventBindings.push(scope.$watch('name', function(newValue, oldValue){
|
||||
updatePlaceholders();
|
||||
}));
|
||||
// add watchers for updating placeholde name and alias
|
||||
if (scope.updatePlaceholder) {
|
||||
eventBindings.push(scope.$watch('name', function (newValue, oldValue) {
|
||||
updatePlaceholders();
|
||||
}));
|
||||
|
||||
eventBindings.push(scope.$watch('alias', function(newValue, oldValue){
|
||||
updatePlaceholders();
|
||||
}));
|
||||
}
|
||||
eventBindings.push(scope.$watch('alias', function (newValue, oldValue) {
|
||||
updatePlaceholders();
|
||||
}));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
activate();
|
||||
|
||||
// clean up
|
||||
scope.$on('$destroy', function(){
|
||||
scope.$on('$destroy', function () {
|
||||
|
||||
// clear watchers
|
||||
for(var e in eventBindings) {
|
||||
eventBindings[e]();
|
||||
}
|
||||
// clear watchers
|
||||
for (var e in eventBindings) {
|
||||
eventBindings[e]();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -139,13 +144,13 @@
|
||||
replace: true,
|
||||
templateUrl: 'views/components/umb-grid-selector.html',
|
||||
scope: {
|
||||
name: "=",
|
||||
alias: "=",
|
||||
selectedItems: '=',
|
||||
availableItems: "=",
|
||||
defaultItem: "=",
|
||||
itemName: "@",
|
||||
updatePlaceholder: "="
|
||||
name: "=",
|
||||
alias: "=",
|
||||
selectedItems: '=',
|
||||
availableItems: "=",
|
||||
defaultItem: "=",
|
||||
itemName: "@",
|
||||
updatePlaceholder: "="
|
||||
},
|
||||
link: link
|
||||
};
|
||||
|
||||
+8
-2
@@ -88,6 +88,9 @@
|
||||
@param {function} onRemove (<code>expression</code>): Callback function when the remove button is clicked.
|
||||
@param {function} onOpen (<code>expression</code>): Callback function when the open button is clicked.
|
||||
@param {function} onEdit (<code>expression</code>): Callback function when the edit button is clicked (Added in version 7.7.0).
|
||||
@param {string} openUrl (<code>binding</code>): Fallback URL for <code>onOpen</code> (Added in version 7.12.0).
|
||||
@param {string} editUrl (<code>binding</code>): Fallback URL for <code>onEdit</code> (Added in version 7.12.0).
|
||||
@param {string} removeUrl (<code>binding</code>): Fallback URL for <code>onRemove</code> (Added in version 7.12.0).
|
||||
**/
|
||||
|
||||
(function () {
|
||||
@@ -122,7 +125,10 @@
|
||||
allowEdit: "=?",
|
||||
onOpen: "&?",
|
||||
onRemove: "&?",
|
||||
onEdit: "&?"
|
||||
onEdit: "&?",
|
||||
openUrl: '=?',
|
||||
editUrl: '=?',
|
||||
removeUrl: '=?'
|
||||
},
|
||||
link: link
|
||||
};
|
||||
@@ -133,4 +139,4 @@
|
||||
|
||||
angular.module('umbraco.directives').directive('umbNodePreview', NodePreviewDirective);
|
||||
|
||||
})();
|
||||
})();
|
||||
|
||||
@@ -9,6 +9,13 @@ var ncNodeNameCache = {
|
||||
|
||||
angular.module("umbraco.filters").filter("ncNodeName", function (editorState, entityResource) {
|
||||
|
||||
function formatLabel(firstNodeName, totalNodes) {
|
||||
return totalNodes <= 1
|
||||
? firstNodeName
|
||||
// If there is more than one item selected, append the additional number of items selected to hint that
|
||||
: firstNodeName + " (+" + (totalNodes - 1) + ")";
|
||||
}
|
||||
|
||||
return function (input) {
|
||||
|
||||
// Check we have a value at all
|
||||
@@ -25,23 +32,38 @@ angular.module("umbraco.filters").filter("ncNodeName", function (editorState, en
|
||||
ncNodeNameCache.keys = {};
|
||||
}
|
||||
|
||||
// MNTP values are comma separated IDs. We'll only fetch the first one for the NC header.
|
||||
var ids = input.split(',');
|
||||
var lookupId = ids[0];
|
||||
|
||||
// See if there is a value in the cache and use that
|
||||
if (ncNodeNameCache.keys[input]) {
|
||||
return ncNodeNameCache.keys[input];
|
||||
if (ncNodeNameCache.keys[lookupId]) {
|
||||
return formatLabel(ncNodeNameCache.keys[lookupId], ids.length);
|
||||
}
|
||||
|
||||
// No value, so go fetch one
|
||||
// We'll put a temp value in the cache though so we don't
|
||||
// make a load of requests while we wait for a response
|
||||
ncNodeNameCache.keys[input] = "Loading...";
|
||||
ncNodeNameCache.keys[lookupId] = "Loading...";
|
||||
|
||||
entityResource.getById(input, "Document")
|
||||
.then(function (ent) {
|
||||
ncNodeNameCache.keys[input] = ent.name;
|
||||
});
|
||||
var type = lookupId.indexOf("umb://media/") === 0
|
||||
? "Media"
|
||||
: lookupId.indexOf("umb://member/") === 0
|
||||
? "Member"
|
||||
: "Document";
|
||||
entityResource.getById(lookupId, type)
|
||||
.then(
|
||||
function (ent) {
|
||||
ncNodeNameCache.keys[lookupId] = ent.name;
|
||||
}
|
||||
);
|
||||
|
||||
// Return the current value for now
|
||||
return ncNodeNameCache.keys[input];
|
||||
return formatLabel(ncNodeNameCache.keys[lookupId], ids.length);
|
||||
};
|
||||
|
||||
});
|
||||
}).filter("ncRichText", function () {
|
||||
return function(input) {
|
||||
return $("<div/>").html(input).text();
|
||||
};
|
||||
});
|
||||
|
||||
@@ -46,7 +46,7 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
* .then(function() {
|
||||
* $scope.complete = true;
|
||||
* });
|
||||
* </pre>
|
||||
* </pre>
|
||||
* @param {Object} args arguments object
|
||||
* @param {Int} args.parentId the ID of the parent node
|
||||
* @param {Array} options.sortedIds array of node IDs as they should be sorted
|
||||
@@ -87,9 +87,9 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
* .then(function() {
|
||||
* alert("node was moved");
|
||||
* }, function(err){
|
||||
* alert("node didnt move:" + err.data.Message);
|
||||
* alert("node didnt move:" + err.data.Message);
|
||||
* });
|
||||
* </pre>
|
||||
* </pre>
|
||||
* @param {Object} args arguments object
|
||||
* @param {Int} args.idd the ID of the node to move
|
||||
* @param {Int} args.parentId the ID of the parent node to move to
|
||||
@@ -129,12 +129,12 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
* <pre>
|
||||
* mediaResource.getById(1234)
|
||||
* .then(function(media) {
|
||||
* var myMedia = media;
|
||||
* var myMedia = media;
|
||||
* alert('its here!');
|
||||
* });
|
||||
* </pre>
|
||||
*
|
||||
* @param {Int} id id of media item to return
|
||||
* </pre>
|
||||
*
|
||||
* @param {Int} id id of media item to return
|
||||
* @returns {Promise} resourcePromise object containing the media item.
|
||||
*
|
||||
*/
|
||||
@@ -163,9 +163,9 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
* .then(function() {
|
||||
* alert('its gone!');
|
||||
* });
|
||||
* </pre>
|
||||
*
|
||||
* @param {Int} id id of media item to delete
|
||||
* </pre>
|
||||
*
|
||||
* @param {Int} id id of media item to delete
|
||||
* @returns {Promise} resourcePromise object.
|
||||
*
|
||||
*/
|
||||
@@ -191,12 +191,12 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
* <pre>
|
||||
* mediaResource.getByIds( [1234,2526,28262])
|
||||
* .then(function(mediaArray) {
|
||||
* var myDoc = contentArray;
|
||||
* var myDoc = contentArray;
|
||||
* alert('they are here!');
|
||||
* });
|
||||
* </pre>
|
||||
*
|
||||
* @param {Array} ids ids of media items to return as an array
|
||||
* </pre>
|
||||
*
|
||||
* @param {Array} ids ids of media items to return as an array
|
||||
* @returns {Promise} resourcePromise object containing the media items array.
|
||||
*
|
||||
*/
|
||||
@@ -223,28 +223,28 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
*
|
||||
* @description
|
||||
* Returns a scaffold of an empty media item, given the id of the media item to place it underneath and the media type alias.
|
||||
*
|
||||
*
|
||||
* - Parent Id must be provided so umbraco knows where to store the media
|
||||
* - Media Type alias must be provided so umbraco knows which properties to put on the media scaffold
|
||||
*
|
||||
* - Media Type alias must be provided so umbraco knows which properties to put on the media scaffold
|
||||
*
|
||||
* The scaffold is used to build editors for media that has not yet been populated with data.
|
||||
*
|
||||
*
|
||||
* ##usage
|
||||
* <pre>
|
||||
* mediaResource.getScaffold(1234, 'folder')
|
||||
* .then(function(scaffold) {
|
||||
* var myDoc = scaffold;
|
||||
* myDoc.name = "My new media item";
|
||||
* myDoc.name = "My new media item";
|
||||
*
|
||||
* mediaResource.save(myDoc, true)
|
||||
* .then(function(media){
|
||||
* alert("Retrieved, updated and saved again");
|
||||
* });
|
||||
* });
|
||||
* </pre>
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @param {Int} parentId id of media item to return
|
||||
* @param {String} alias mediatype alias to base the scaffold on
|
||||
* @param {String} alias mediatype alias to base the scaffold on
|
||||
* @returns {Promise} resourcePromise object containing the media scaffold.
|
||||
*
|
||||
*/
|
||||
@@ -283,11 +283,11 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
* <pre>
|
||||
* mediaResource.getChildren(1234, {pageSize: 10, pageNumber: 2})
|
||||
* .then(function(contentArray) {
|
||||
* var children = contentArray;
|
||||
* var children = contentArray;
|
||||
* alert('they are here!');
|
||||
* });
|
||||
* </pre>
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @param {Int} parentid id of content item to return children of
|
||||
* @param {Object} options optional options object
|
||||
* @param {Int} options.pageSize if paging data, number of nodes per page, default = 0
|
||||
@@ -361,9 +361,9 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
*
|
||||
* @description
|
||||
* Saves changes made to a media item, if the media item is new, the isNew paramater must be passed to force creation
|
||||
* if the media item needs to have files attached, they must be provided as the files param and passed separately
|
||||
*
|
||||
*
|
||||
* if the media item needs to have files attached, they must be provided as the files param and passed separately
|
||||
*
|
||||
*
|
||||
* ##usage
|
||||
* <pre>
|
||||
* mediaResource.getById(1234)
|
||||
@@ -374,11 +374,11 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
* alert("Retrieved, updated and saved again");
|
||||
* });
|
||||
* });
|
||||
* </pre>
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @param {Object} media The media item object with changes applied
|
||||
* @param {Bool} isNew set to true to create a new item or to update an existing
|
||||
* @param {Array} files collection of files for the media item
|
||||
* @param {Bool} isNew set to true to create a new item or to update an existing
|
||||
* @param {Array} files collection of files for the media item
|
||||
* @returns {Promise} resourcePromise object containing the saved media item.
|
||||
*
|
||||
*/
|
||||
@@ -400,10 +400,10 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
* .then(function(folder) {
|
||||
* alert('New folder');
|
||||
* });
|
||||
* </pre>
|
||||
* </pre>
|
||||
*
|
||||
* @param {string} name Name of the folder to create
|
||||
* @param {int} parentId Id of the media item to create the folder underneath
|
||||
* @param {int} parentId Id of the media item to create the folder underneath
|
||||
* @returns {Promise} resourcePromise object.
|
||||
*
|
||||
*/
|
||||
@@ -427,18 +427,19 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
* Retrieves all media children with types used as folders.
|
||||
* Uses the convention of looking for media items with mediaTypes ending in
|
||||
* *Folder so will match "Folder", "bannerFolder", "secureFolder" etc,
|
||||
*
|
||||
* NOTE: This will return a max of 500 folders, if more is required it needs to be paged
|
||||
*
|
||||
*
|
||||
* NOTE: This will return a page of max 500 folders, if more is required it needs to be paged
|
||||
* and then folders are in the .items property of the returned promise data
|
||||
*
|
||||
* ##usage
|
||||
* <pre>
|
||||
* mediaResource.getChildFolders(1234)
|
||||
* .then(function(data) {
|
||||
* .then(function(page) {
|
||||
* alert('folders');
|
||||
* });
|
||||
* </pre>
|
||||
* </pre>
|
||||
*
|
||||
* @param {int} parentId Id of the media item to query for child folders
|
||||
* @param {int} parentId Id of the media item to query for child folders
|
||||
* @returns {Promise} resourcePromise object.
|
||||
*
|
||||
*/
|
||||
@@ -454,9 +455,11 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
"mediaApiBaseUrl",
|
||||
"GetChildFolders",
|
||||
{
|
||||
id: parentId
|
||||
id: parentId,
|
||||
pageNumber: 1,
|
||||
pageSize: 500
|
||||
})),
|
||||
'Failed to retrieve child folders for media item ' + parentId);
|
||||
'Failed to retrieve child folders for media item ' + parentId);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -473,8 +476,8 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
* .then(function() {
|
||||
* alert('its empty!');
|
||||
* });
|
||||
* </pre>
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @returns {Promise} resourcePromise object.
|
||||
*
|
||||
*/
|
||||
@@ -501,8 +504,8 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
* .then(function(searchResult) {
|
||||
* alert('it's here!');
|
||||
* });
|
||||
* </pre>
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @param {string} query The search query
|
||||
* @param {int} pageNumber The page number
|
||||
* @param {int} pageSize The number of media items on a page
|
||||
@@ -513,7 +516,7 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
search: function (query, pageNumber, pageSize, searchFrom) {
|
||||
|
||||
var args = [
|
||||
{ "query": query },
|
||||
{ "query": query },
|
||||
{ "pageNumber": pageNumber },
|
||||
{ "pageSize": pageSize },
|
||||
{ "searchFrom": searchFrom }
|
||||
|
||||
@@ -57,7 +57,7 @@ function packageResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
* @methodOf umbraco.resources.packageInstallResource
|
||||
*
|
||||
* @description
|
||||
* Downloads a package file from our.umbraco.org to the website server.
|
||||
* Downloads a package file from our.umbraco.com to the website server.
|
||||
*
|
||||
* ##usage
|
||||
* <pre>
|
||||
|
||||
@@ -2,7 +2,7 @@ angular.module('umbraco.services')
|
||||
.factory('helpService', function ($http, $q, umbRequestHelper) {
|
||||
var helpTopics = {};
|
||||
|
||||
var defaultUrl = "http://our.umbraco.org/rss/help";
|
||||
var defaultUrl = "https://our.umbraco.com/rss/help";
|
||||
var tvUrl = "http://umbraco.tv/feeds/help";
|
||||
|
||||
function getCachedHelp(url){
|
||||
|
||||
@@ -272,12 +272,19 @@
|
||||
for (var i = 0; selection.length > i; i++) {
|
||||
var selectedItem = selection[i];
|
||||
// if item.id is 2147483647 (int.MaxValue) use item.key
|
||||
if ((item.id !== 2147483647 && item.id === selectedItem.id) || item.key === selectedItem.key) {
|
||||
if ((item.id !== 2147483647 && item.id === selectedItem.id) || (item.key && item.key === selectedItem.key)) {
|
||||
isSelected = true;
|
||||
}
|
||||
}
|
||||
if (!isSelected) {
|
||||
selection.push({ id: item.id, key: item.key });
|
||||
var obj = {
|
||||
id: item.id
|
||||
};
|
||||
if (item.key) {
|
||||
obj.key = item.key;
|
||||
}
|
||||
|
||||
selection.push(obj);
|
||||
item.selected = true;
|
||||
}
|
||||
}
|
||||
@@ -298,7 +305,7 @@
|
||||
for (var i = 0; selection.length > i; i++) {
|
||||
var selectedItem = selection[i];
|
||||
// if item.id is 2147483647 (int.MaxValue) use item.key
|
||||
if ((item.id !== 2147483647 && item.id === selectedItem.id) || item.key === selectedItem.key) {
|
||||
if ((item.id !== 2147483647 && item.id === selectedItem.id) || (item.key && item.key === selectedItem.key)) {
|
||||
selection.splice(i, 1);
|
||||
item.selected = false;
|
||||
}
|
||||
@@ -368,9 +375,15 @@
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
|
||||
var item = items[i];
|
||||
var obj = {
|
||||
id: item.id
|
||||
};
|
||||
if (item.key) {
|
||||
obj.key = item.key
|
||||
}
|
||||
|
||||
if (checkbox.checked) {
|
||||
selection.push({ id: item.id, key: item.key });
|
||||
selection.push(obj);
|
||||
} else {
|
||||
clearSelection = true;
|
||||
}
|
||||
@@ -410,7 +423,7 @@
|
||||
var selectedItem = selection[selectedIndex];
|
||||
|
||||
// if item.id is 2147483647 (int.MaxValue) use item.key
|
||||
if ((item.id !== 2147483647 && item.id === selectedItem.id) || item.key === selectedItem.key) {
|
||||
if ((item.id !== 2147483647 && item.id === selectedItem.id) || (item.key && item.key === selectedItem.key)) {
|
||||
numberOfSelectedItem++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
function getQuerySnippet(queryExpression) {
|
||||
var code = "\n@{\n" + "\tvar selection = " + queryExpression + ";\n}\n";
|
||||
code += "<ul>\n" +
|
||||
"\t@foreach(var item in selection){\n" +
|
||||
"\t@foreach (var item in selection)\n" +
|
||||
"\t{\n" +
|
||||
"\t\t<li>\n" +
|
||||
"\t\t\t<a href=\"@item.Url\">@item.Name</a>\n" +
|
||||
"\t\t</li>\n" +
|
||||
|
||||
@@ -156,13 +156,13 @@ function tinyMceService($log, imageHelper, $http, $timeout, macroResource, macro
|
||||
|
||||
var s = "width: " + newSize.width + "px; height:" + newSize.height + "px;";
|
||||
editor.dom.setAttrib(imgElm, 'style', s);
|
||||
editor.dom.setAttrib(imgElm, 'id', null);
|
||||
|
||||
if (img.url) {
|
||||
var src = img.url + "?width=" + newSize.width + "&height=" + newSize.height;
|
||||
editor.dom.setAttrib(imgElm, 'data-mce-src', src);
|
||||
}
|
||||
}
|
||||
}
|
||||
editor.dom.setAttrib(imgElm, 'id', null);
|
||||
}, 500);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -21,7 +21,7 @@ angular.module("umbraco.install").factory('installerService', function($rootScop
|
||||
"At least 2 people have named their cat 'Umbraco'",
|
||||
'On an average day, more than 1000 people download Umbraco',
|
||||
'<a target="_blank" href="https://umbraco.tv">umbraco.tv</a> is the premier source of Umbraco video tutorials to get you started',
|
||||
'You can find the world\'s friendliest CMS community at <a target="_blank" href="https://our.umbraco.org">our.umbraco.org</a>',
|
||||
'You can find the world\'s friendliest CMS community at <a target="_blank" href="https://our.umbraco.com">our.umbraco.com</a>',
|
||||
'You can become a certified Umbraco developer by attending one of the official courses',
|
||||
'Umbraco works really well on tablets',
|
||||
'You have 100% control over your markup and design when crafting a website in Umbraco',
|
||||
@@ -121,7 +121,7 @@ angular.module("umbraco.install").factory('installerService', function($rootScop
|
||||
}
|
||||
},
|
||||
|
||||
//loads available packages from our.umbraco.org
|
||||
//loads available packages from our.umbraco.com
|
||||
getPackages : function(){
|
||||
return $http.get(Umbraco.Sys.ServerVariables.installApiBaseUrl + "GetPackages");
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<p>
|
||||
In order to run umbraco, you'll need to update your permission settings.
|
||||
Detailed information about the correct file & folder permissions for Umbraco can be found
|
||||
<a href="http://our.umbraco.org/documentation/Installation/permissions"><strong>here</strong></a>.
|
||||
<a href="https://our.umbraco.com/documentation/Installation/permissions"><strong>here</strong></a>.
|
||||
</p>
|
||||
<p>
|
||||
The following report list the permissions that are currently failing. Once the permissions are fixed press the 'Go back' button to restart the installation.
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<li class="span3" ng-repeat="pck in packages">
|
||||
<a href ng-click="setPackageAndContinue(pck.id)" class="thumbnail">
|
||||
<small>Loading...</small>
|
||||
<img ng-src="http://our.umbraco.org{{pck.thumbnail}}?width=170" alt="{{pck.name}}">
|
||||
<img ng-src="https://our.umbraco.com{{pck.thumbnail}}?width=170" alt="{{pck.name}}">
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -122,6 +122,8 @@
|
||||
@import "components/umb-grid.less";
|
||||
@import "components/umb-empty-state.less";
|
||||
@import "components/umb-property-editor.less";
|
||||
@import "components/umb-color-swatches.less";
|
||||
@import "components/check-circle.less";
|
||||
@import "components/umb-iconpicker.less";
|
||||
@import "components/umb-insert-code-box.less";
|
||||
@import "components/umb-packages.less";
|
||||
|
||||
@@ -56,12 +56,13 @@
|
||||
/* Our badge - should be moved */
|
||||
|
||||
.umb-help-badge {
|
||||
padding: 10px 20px 10px 35px;
|
||||
padding: 10px 20px 10px 55px;
|
||||
background: @white;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border-radius: 3px;
|
||||
display: block;
|
||||
margin-bottom:5px;
|
||||
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.16);
|
||||
}
|
||||
|
||||
@@ -76,10 +77,10 @@
|
||||
}
|
||||
|
||||
.umb-help-badge__icon {
|
||||
font-size: 40px;
|
||||
font-size: 36px;
|
||||
transform: translate(0,-50%);
|
||||
position: absolute;
|
||||
left: -15px;
|
||||
left: 10px;
|
||||
top: 50%;
|
||||
color: @red-l3;
|
||||
}
|
||||
@@ -130,6 +131,14 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* the outer container for each help type - tours, video etc */
|
||||
.umb-help-section + .umb-help-section {
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
.umb-help-section__title {
|
||||
margin:0 0 10px;
|
||||
}
|
||||
|
||||
/* Help list */
|
||||
|
||||
@@ -137,13 +146,13 @@
|
||||
list-style: none;
|
||||
margin-left: 0;
|
||||
margin-bottom: 0;
|
||||
background: @white;
|
||||
background: @white;
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.16);
|
||||
}
|
||||
|
||||
.umb-help-list:last-child {
|
||||
border-bottom: none;
|
||||
|
||||
[data-element*="help-tours"] & {
|
||||
margin-bottom:5px;
|
||||
}
|
||||
}
|
||||
|
||||
.umb-help-list-item {
|
||||
@@ -156,20 +165,28 @@
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.umb-help-list-item > a,
|
||||
.umb-help-list-item__group-title i {
|
||||
margin-right:2px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.umb-help-list-item__content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10px 20px;
|
||||
padding: 10px 20px 10px 10px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.umb-help-list-item:hover,
|
||||
.umb-help-list-item:focus,
|
||||
.umb-help-list-item:active,
|
||||
.umb-help-list-item > a:hover,
|
||||
.umb-help-list-item > a:focus,
|
||||
.umb-help-list-item > a:active {
|
||||
text-decoration: none;
|
||||
|
||||
.umb-help-list-item__title {
|
||||
text-decoration: underline !important;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,4 +215,8 @@
|
||||
|
||||
.umb-help-list-item:hover .umb-help-list-item__group-title {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
[data-element*="tour-"].umb-help-list-item:hover .umb-help-list-item__title {
|
||||
text-decoration:none;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
.check_circle {
|
||||
display: flex;
|
||||
opacity: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 0 auto;
|
||||
|
||||
.icon {
|
||||
background-color: rgba(0,0,0,.15);
|
||||
border-radius: 50%;
|
||||
color: @white;
|
||||
font-size: 1em;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
.umb-color-swatches {
|
||||
|
||||
.umb-color-box {
|
||||
border: none;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
margin: 5px;
|
||||
border-radius: 3px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
transition: box-shadow .3s;
|
||||
|
||||
&:hover, &:focus {
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||||
}
|
||||
|
||||
&.active {
|
||||
.check_circle {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
&.umb-color-box--m {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
||||
.check_circle {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -537,15 +537,11 @@
|
||||
.umb-grid textarea.textstring {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
border: none;
|
||||
background: @white;
|
||||
outline: none;
|
||||
resize: none;
|
||||
color: @gray-3;
|
||||
}
|
||||
|
||||
.umb-grid .umb-cell-rte textarea.mceNoEditor {
|
||||
display: none !important;
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
.umb-grid .umb-cell-media .caption {
|
||||
@@ -567,11 +563,6 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.umb-grid .umb-cell-rte {
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ICONS
|
||||
// -------------------------
|
||||
|
||||
@@ -40,3 +40,32 @@
|
||||
.umb-iconpicker-item i {
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
|
||||
// Color swatch
|
||||
.button {
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
margin: 5px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
// Hide Circle when not active
|
||||
i.small{
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Circle behind the checkmark
|
||||
i.small.active{
|
||||
font-size: 14px;
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
background-color: rgba(0,0,0,.15);
|
||||
float: right;
|
||||
}
|
||||
|
||||
@@ -67,29 +67,63 @@
|
||||
-o-user-select: none;
|
||||
}
|
||||
|
||||
.nested-content__heading
|
||||
{
|
||||
float: left;
|
||||
.nested-content__heading {
|
||||
line-height: 20px;
|
||||
}
|
||||
position: relative;
|
||||
|
||||
.nested-content__heading i
|
||||
{
|
||||
vertical-align: text-top;
|
||||
color: #999; /* same icon color as the icons in the item type picker */
|
||||
margin-right: 10px;
|
||||
&.-with-icon
|
||||
{
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
i
|
||||
{
|
||||
color: #999; /* same icon color as the icons in the item type picker */
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.nested-content__item-name
|
||||
{
|
||||
max-height: 20px;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.nested-content__icons
|
||||
{
|
||||
margin: -6px 0;
|
||||
opacity: 0;
|
||||
|
||||
transition: opacity .15s ease-in-out;
|
||||
-moz-transition: opacity .15s ease-in-out;
|
||||
-webkit-transition: opacity .15s ease-in-out;
|
||||
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 2px;
|
||||
background-color: white;
|
||||
padding: 5px;
|
||||
|
||||
&:before
|
||||
{
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 30px;
|
||||
left: -30px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background: -webkit-linear-gradient(90deg, rgba(255,255,255,0), white);
|
||||
background: -moz-linear-gradient(90deg, rgba(255,255,255,0), white);
|
||||
background: linear-gradient(90deg, rgba(255,255,255,0), white);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.nested-content__header-bar:hover .nested-content__icons,
|
||||
.nested-content__item--active > .nested-content__header-bar .nested-content__icons
|
||||
{
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
.umb-node-preview {
|
||||
padding: 5px 0;
|
||||
display: flex;
|
||||
max-width: 66.6%;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid @gray-9;
|
||||
}
|
||||
|
||||
.umb-editor-wrapper .umb-node-preview {
|
||||
max-width: 66.6%;
|
||||
}
|
||||
|
||||
.umb-node-preview:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
@@ -89,7 +92,6 @@
|
||||
color: @turquoise-d1;
|
||||
font-weight: bold;
|
||||
padding: 5px 15px;
|
||||
max-width: 66.6%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -97,6 +99,10 @@
|
||||
color: @turquoise-d1;
|
||||
}
|
||||
|
||||
.umb-editor-wrapper .umb-node-preview-add {
|
||||
max-width: 66.6%;
|
||||
}
|
||||
|
||||
.umb-overlay,
|
||||
.umb-modal {
|
||||
.umb-node-preview {
|
||||
|
||||
@@ -94,7 +94,7 @@ input.umb-table__input {
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
position: relative;
|
||||
min-height: 32px;
|
||||
min-height: 52px;
|
||||
&:hover {
|
||||
background-color: @gray-10;
|
||||
}
|
||||
@@ -272,4 +272,4 @@ input.umb-table__input {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,12 +20,17 @@
|
||||
}
|
||||
|
||||
.thumbnail {
|
||||
border-radius: 0px;
|
||||
}
|
||||
border-radius: 0;
|
||||
min-width: 150px;
|
||||
|
||||
.thumbnail img {
|
||||
max-width: 100% !important;
|
||||
width: 100%;
|
||||
> a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100% !important;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
#mapCanvas img {
|
||||
|
||||
@@ -122,6 +122,14 @@
|
||||
// Make the list-items overlay the bottom border
|
||||
.nav-tabs > li {
|
||||
// margin-bottom: -1px;
|
||||
|
||||
&.dropdown {
|
||||
margin-bottom: -3px;
|
||||
|
||||
>.dropdown-toggle {
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Actual tabs (as links)
|
||||
.nav-tabs > li > a {
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
// --------------------------------------------------
|
||||
.umb-property-editor {
|
||||
min-width:66.6%;
|
||||
|
||||
|
||||
&-pull {
|
||||
float:left;
|
||||
width:66.6%;
|
||||
}
|
||||
|
||||
|
||||
&-push {
|
||||
float:right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.umb-property-editor-tiny {
|
||||
width: 60px;
|
||||
|
||||
|
||||
&.umb-editor-push {
|
||||
width:30%;
|
||||
min-width:0;
|
||||
@@ -53,7 +53,7 @@
|
||||
float:right;
|
||||
width:35%;
|
||||
}
|
||||
|
||||
|
||||
&--pull, &--push {
|
||||
.umb-editor {
|
||||
min-width:0;
|
||||
@@ -134,68 +134,93 @@ div.umb-codeeditor .umb-btn-toolbar {
|
||||
// Color picker
|
||||
// --------------------------------------------------
|
||||
ul.color-picker li {
|
||||
padding: 2px;
|
||||
margin: 3px;
|
||||
border: 2px solid transparent;
|
||||
width: 60px;
|
||||
}
|
||||
ul.color-picker li.active {
|
||||
border: 2px dashed @gray-8;
|
||||
}
|
||||
ul.color-picker li a {
|
||||
height: 50px;
|
||||
display:block;
|
||||
cursor:pointer;
|
||||
}
|
||||
padding: 2px;
|
||||
margin: 3px;
|
||||
border: 2px solid transparent;
|
||||
width: 60px;
|
||||
|
||||
.control-group.color-picker-preval .thumbnail {
|
||||
width:30px;
|
||||
border:none;
|
||||
&.active {
|
||||
.check_circle {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.thumbnail{
|
||||
min-width: auto;
|
||||
width: inherit;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
height: 50px;
|
||||
display:flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor:pointer;
|
||||
margin: 0 0 5px;
|
||||
}
|
||||
}
|
||||
|
||||
/* pre-value editor */
|
||||
/*.control-group.color-picker-preval:before {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 100%;
|
||||
}*/
|
||||
.control-group.color-picker-preval {
|
||||
.thumbnail {
|
||||
width: 36px;
|
||||
min-width: auto;
|
||||
border: none;
|
||||
cursor: move;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
/*.control-group.color-picker-preval div.thumbnail {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}*/
|
||||
.control-group.color-picker-preval div.color-picker-prediv {
|
||||
display: inline-block;
|
||||
width: 60%;
|
||||
}
|
||||
.handle {
|
||||
float: left;
|
||||
display: inline-flex;
|
||||
margin: 5px 3px 5px 0;
|
||||
}
|
||||
|
||||
.control-group.color-picker-preval pre {
|
||||
display: inline;
|
||||
margin-right: 20px;
|
||||
margin-left: 10px;
|
||||
width: 50%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
margin-bottom: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
div.color-picker-prediv {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
.control-group.color-picker-preval btn {
|
||||
//vertical-align: middle;
|
||||
}
|
||||
pre {
|
||||
display: inline;
|
||||
font-family: monospace;
|
||||
margin-right: 10px;
|
||||
margin-left: 10px;
|
||||
width: 50%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
margin-bottom: 0;
|
||||
vertical-align: middle;
|
||||
padding-top: 7px;
|
||||
padding-bottom: 7px;
|
||||
background: #f7f7f7;
|
||||
}
|
||||
|
||||
.control-group.color-picker-preval input[type="text"] {
|
||||
min-width: 40%;
|
||||
width: 40%;
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
span {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.control-group.color-picker-preval label {
|
||||
border: solid @white 1px;
|
||||
padding: 6px;
|
||||
input[type="text"] {
|
||||
min-width: 40%;
|
||||
width: 320px;
|
||||
display: inline-block;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.sp-replacer {
|
||||
margin-right: 18px;
|
||||
}
|
||||
|
||||
label {
|
||||
border: 1px solid #fff;
|
||||
padding: 7px 10px;
|
||||
font-family: monospace;
|
||||
border: 1px solid #dfdfe1;
|
||||
background: #f7f7f7;
|
||||
margin: 0 15px 0 0;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -369,7 +394,7 @@ ul.color-picker li a {
|
||||
> li:not(.unsortable) {
|
||||
cursor: move;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.umb-sortable-thumbnails li:hover .umb-sortable-thumbnails__actions {
|
||||
opacity: 1;
|
||||
@@ -899,10 +924,39 @@ ul.color-picker li a {
|
||||
//
|
||||
// Tags
|
||||
// --------------------------------------------------
|
||||
.umb-tags{border: @gray-10 solid 1px; padding: 10px; font-size: 13px; text-shadow: none;}
|
||||
.umb-tags .tag{cursor: pointer; margin: 7px; padding: 7px; background: @turquoise}
|
||||
.umb-tags .tag i{padding: 2px;}
|
||||
.umb-tags input{border: none; background: @white}
|
||||
.umb-tags{
|
||||
border: @gray-10 solid 1px;
|
||||
padding: 10px;
|
||||
font-size: 13px;
|
||||
text-shadow: none;
|
||||
|
||||
.tag{
|
||||
cursor: default;
|
||||
margin: 7px;
|
||||
padding: 10px;
|
||||
background: @turquoise;
|
||||
position: relative;
|
||||
|
||||
.icon-trash{
|
||||
cursor: pointer;
|
||||
padding: 2px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
right: -6px;
|
||||
}
|
||||
|
||||
.umb_confirm-action__overlay.-left{
|
||||
top: 6px;
|
||||
left: auto;
|
||||
right: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
input{
|
||||
border: none;
|
||||
background: @white;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Date/time picker
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
}
|
||||
|
||||
.umb-tree-icon {
|
||||
cursor: pointer;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.umb-tree i.noSpr {
|
||||
@@ -206,7 +206,7 @@
|
||||
|
||||
.umb-tree div.umb-search-group {
|
||||
position: inherit;
|
||||
display: inherit;
|
||||
display: inherit;
|
||||
}
|
||||
|
||||
.umb-tree div.umb-search-group:hover {
|
||||
@@ -550,4 +550,4 @@ body.touch .umb-tree li div.l div {
|
||||
body.touch .umb-actions a {
|
||||
padding: 7px 25px 7px 20px;
|
||||
font-size: 110%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,26 +10,30 @@
|
||||
// Grays
|
||||
// -------------------------
|
||||
@black: #000;
|
||||
@blackLight: #1d1d1d;
|
||||
@blackLight: #1D1D1D;
|
||||
@grayDarker: #222;
|
||||
@grayDark: #343434;
|
||||
@gray: #555;
|
||||
@grayMed: #7f7f7f;
|
||||
@grayLight: #d9d9d9;
|
||||
@grayLighter: #f8f8f8;
|
||||
@white: #fff;
|
||||
|
||||
@grayMed: #7F7F7F;
|
||||
@blueGrey: #607D8B;
|
||||
@grayLight: #D9D9D9;
|
||||
@grayLighter: #F8F8F8;
|
||||
@white: #FFF;
|
||||
@grayIcon: #9E9E9E;
|
||||
|
||||
// Accent colors
|
||||
// -------------------------
|
||||
@blue: #2e8aea;
|
||||
@blueDark: #0064cd;
|
||||
@blueLight: #add8e6;
|
||||
@green: #46a546;
|
||||
@red: #9d261d;
|
||||
@yellow: #ffc40d;
|
||||
|
||||
|
||||
|
||||
@blue: #2E8AEA;
|
||||
@blueDark: #0064CD;
|
||||
@blueLight: #ADD8E6;
|
||||
@green: #46A546;
|
||||
@red: #9D261D;
|
||||
@yellow: #FFC40D;
|
||||
@orange: #DF7F48;
|
||||
@pink: #c3325f;
|
||||
@pink: #C3325F;
|
||||
|
||||
|
||||
// Colors
|
||||
@@ -40,7 +44,7 @@
|
||||
@turquoise-l1: #42CFC5;
|
||||
@turquoise-l2: #81DED8;
|
||||
@turquoise-l3: #C0F0ED;
|
||||
@turquoise-washed: #F3FDFC;
|
||||
@turquoise-washed: #F3FDFC;
|
||||
|
||||
@purple-d2: #1D1333;
|
||||
@purple-d1: #2E2246;
|
||||
@@ -86,6 +90,28 @@
|
||||
@gray-10: #F3F3F5;
|
||||
|
||||
|
||||
// Additional Icon Colours
|
||||
@brownIcon: #795548;
|
||||
@blueIcon: #2196F3;
|
||||
@lightBlueIcon: #03A9F4;
|
||||
@cyanIcon: #00BCD4;
|
||||
@greenIcon: #4CAF50;
|
||||
@lightGreenIcon: #8BC34A;
|
||||
@limeIcon: #CDDC39;
|
||||
@yellowIcon: #FFEB3B;
|
||||
@amberIcon: #FFC107;
|
||||
@orangeIcon: #FF9800;
|
||||
@deepOrangeIcon: #FF5722;
|
||||
@redIcon: #F44336;
|
||||
@pinkIcon: #E91E63;
|
||||
@purpleIcon: #9C27B0;
|
||||
@deepPurpleIcon: #673AB7;
|
||||
@indigoIcon: #3F51B5;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.red{color: @red;}
|
||||
.blue{color: @blue;}
|
||||
.black{color: @black;}
|
||||
@@ -96,30 +122,71 @@
|
||||
//icon colors for tree icons
|
||||
.color-red, .color-red i{color: @red-d1 !important;}
|
||||
.color-blue, .color-blue i{color: @turquoise-d1 !important;}
|
||||
.color-orange, .color-orange i{color: #d9631e !important;}
|
||||
.color-orange, .color-orange i{color: @orange !important;}
|
||||
.color-green, .color-green i{color: @green-d1 !important;}
|
||||
.color-yellow, .color-yellow i{color: @yellow-d1 !important;}
|
||||
.color-yellow, .color-yellow i{color: @yellowIcon !important;}
|
||||
|
||||
/* Colors based on http://zavoloklom.github.io/material-design-color-palette/colors.html */
|
||||
.color-black, .color-black i { color: #000 !important; }
|
||||
.color-blue-grey, .color-blue-grey i { color: #607d8b !important; }
|
||||
.color-grey, .color-grey i { color: #9e9e9e !important; }
|
||||
.color-brown, .color-brown i { color: #795548 !important; }
|
||||
.color-blue, .color-blue i { color: #2196f3 !important; }
|
||||
.color-light-blue, .color-light-blue i {color: #03a9f4 !important; }
|
||||
.color-cyan, .color-cyan i { color: #00bcd4 !important; }
|
||||
.color-green, .color-green i { color: #4caf50 !important; }
|
||||
.color-light-green, .color-light-green i {color: #8bc34a !important; }
|
||||
.color-lime, .color-lime i { color: #cddc39 !important; }
|
||||
.color-yellow, .color-yellow i { color: #ffeb3b !important; }
|
||||
.color-amber, .color-amber i { color: #ffc107 !important; }
|
||||
.color-orange, .color-orange i { color: #ff9800 !important; }
|
||||
.color-deep-orange, .color-deep-orange i { color: #ff5722 !important; }
|
||||
.color-red, .color-red i { color: #f44336 !important; }
|
||||
.color-pink, .color-pink i { color: #e91e63 !important; }
|
||||
.color-purple,.color-purple i { color: #9c27b0 !important; }
|
||||
.color-deep-purple, .color-deep-purple i { color: #673ab7 !important; }
|
||||
.color-indigo, .color-indigo i { color: #3f51b5 !important; }
|
||||
.btn-color-black {background-color: @black;}
|
||||
.color-black i { color: @black;}
|
||||
|
||||
|
||||
.btn-color-blue-grey {background-color: @blueGrey;}
|
||||
.color-blue-grey, .color-blue-grey i { color: @blueGrey !important;}
|
||||
|
||||
|
||||
.btn-color-grey{background-color: @grayIcon;}
|
||||
.color-grey, .color-grey i { color: @grayIcon !important; }
|
||||
|
||||
|
||||
.btn-color-brown{background-color: @brownIcon;}
|
||||
.color-brown, .color-brown i { color: @brownIcon !important; }
|
||||
|
||||
.btn-color-blue{background-color: @blueIcon;}
|
||||
.color-blue, .color-blue i { color: @blueIcon !important; }
|
||||
|
||||
.btn-color-light-blue{background-color: @lightBlueIcon;}
|
||||
.color-light-blue, .color-light-blue i {color: @lightBlueIcon !important;}
|
||||
|
||||
.btn-color-cyan{background-color: @cyanIcon;}
|
||||
.color-cyan, .color-cyan i { color: @cyanIcon !important; }
|
||||
|
||||
.btn-color-green{background-color: @greenIcon;}
|
||||
.color-green, .color-green i { color: @greenIcon !important; }
|
||||
|
||||
.btn-color-light-green{background-color: @lightGreenIcon;}
|
||||
.color-light-green, .color-light-green i {color: @lightGreenIcon !important; }
|
||||
|
||||
.btn-color-lime{background-color: @limeIcon;}
|
||||
.color-lime, .color-lime i { color: @limeIcon !important; }
|
||||
|
||||
.btn-color-yellow{background-color: @yellowIcon;}
|
||||
.color-yellow, .color-yellow i { color: @yellowIcon !important; }
|
||||
|
||||
.btn-color-amber{background-color: @amberIcon;}
|
||||
.color-amber, .color-amber i { color: @amberIcon !important; }
|
||||
|
||||
.btn-color-orange{background-color: @orangeIcon;}
|
||||
.color-orange, .color-orange i { color: @orangeIcon !important; }
|
||||
|
||||
.btn-color-deep-orange{background-color: @deepOrangeIcon;}
|
||||
.color-deep-orange, .color-deep-orange i { color: @deepOrangeIcon !important; }
|
||||
|
||||
.btn-color-red{background-color: @redIcon;}
|
||||
.color-red, .color-red i { color: @redIcon !important; }
|
||||
|
||||
.btn-color-pink{background-color: @pinkIcon;}
|
||||
.color-pink, .color-pink i { color: @pinkIcon !important; }
|
||||
|
||||
.btn-color-purple{background-color: @purpleIcon;}
|
||||
.color-purple, .color-purple i { color: @purpleIcon !important; }
|
||||
|
||||
.btn-color-deep-purple{background-color: @deepPurpleIcon;}
|
||||
.color-deep-purple, .color-deep-purple i { color: @deepPurpleIcon !important; }
|
||||
|
||||
.btn-color-indigo{background-color: @indigoIcon;}
|
||||
.color-indigo, .color-indigo i { color: @indigoIcon !important; }
|
||||
|
||||
|
||||
|
||||
// Scaffolding
|
||||
|
||||
@@ -48,15 +48,17 @@
|
||||
setSectionName();
|
||||
|
||||
userService.getCurrentUser().then(function (user) {
|
||||
|
||||
|
||||
vm.userType = user.userType;
|
||||
vm.userLang = user.locale;
|
||||
|
||||
vm.hasAccessToSettings = _.contains(user.allowedSections, 'settings');
|
||||
|
||||
evts.push(eventsService.on("appState.treeState.changed", function (e, args) {
|
||||
handleSectionChange();
|
||||
}));
|
||||
|
||||
findHelp(vm.section, vm.tree, vm.usertype, vm.userLang);
|
||||
findHelp(vm.section, vm.tree, vm.userType, vm.userLang);
|
||||
|
||||
});
|
||||
|
||||
@@ -81,17 +83,20 @@
|
||||
vm.tree = $routeParams.tree;
|
||||
|
||||
setSectionName();
|
||||
findHelp(vm.section, vm.tree, vm.usertype, vm.userLang);
|
||||
findHelp(vm.section, vm.tree, vm.userType, vm.userLang);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function findHelp(section, tree, usertype, userLang) {
|
||||
|
||||
if (vm.hasAccessToSettings) {
|
||||
helpService.getContextHelpForPage(section, tree).then(function (topics) {
|
||||
vm.topics = topics;
|
||||
});
|
||||
}
|
||||
|
||||
helpService.getContextHelpForPage(section, tree).then(function (topics) {
|
||||
vm.topics = topics;
|
||||
});
|
||||
|
||||
var rq = {};
|
||||
rq.section = vm.section;
|
||||
@@ -113,10 +118,12 @@
|
||||
rq.path = rq.section + "/" + $routeParams.tree + "/" + $routeParams.method;
|
||||
}
|
||||
|
||||
helpService.findVideos(rq).then(function(videos){
|
||||
vm.videos = videos;
|
||||
});
|
||||
|
||||
|
||||
if (vm.hasAccessToSettings) {
|
||||
helpService.findVideos(rq).then(function (videos) {
|
||||
vm.videos = videos;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function setSectionName() {
|
||||
|
||||
@@ -9,16 +9,17 @@
|
||||
<umb-drawer-content>
|
||||
|
||||
<!-- Tours -->
|
||||
<div ng-if="vm.tours" data-element="help-tours" style="margin-bottom: 20px;">
|
||||
<div class="umb-help-section" ng-if="vm.tours" data-element="help-tours">
|
||||
|
||||
<h5 style="margin-bottom: 10px; margin-top: 0;">Tours</h5>
|
||||
<h5 class="umb-help-section__title">Tours</h5>
|
||||
|
||||
<div ng-repeat="tourGroup in vm.tours | orderBy:'groupOrder'" style="margin-bottom: 5px;">
|
||||
<div ng-repeat="tourGroup in vm.tours | orderBy:'groupOrder'">
|
||||
|
||||
<div class="umb-help-list">
|
||||
|
||||
<a href="" class="umb-help-list-item umb-help-list-item__content flex items-center justify-between" style="text-decoration: none;" ng-click="tourGroup.open = !tourGroup.open">
|
||||
<h5 class="umb-help-list-item__group-title"><i style="margin-right: 2px;text-decoration: none;" ng-class="{'icon-navigation-right': !tourGroup.open, 'icon-navigation-down': tourGroup.open}"></i>
|
||||
<a href="" class="umb-help-list-item umb-help-list-item__content flex items-center justify-between" ng-click="tourGroup.open = !tourGroup.open">
|
||||
<h5 class="umb-help-list-item__group-title">
|
||||
<i ng-class="{'icon-navigation-right': !tourGroup.open, 'icon-navigation-down': tourGroup.open}"></i>
|
||||
<span ng-if="tourGroup.group !== 'undefined'">{{tourGroup.group}}</span>
|
||||
<span ng-if="tourGroup.group === 'undefined'">Other</span>
|
||||
</h5>
|
||||
@@ -50,7 +51,7 @@
|
||||
|
||||
|
||||
<!-- Show in custom help dashboard -->
|
||||
<div data-element="help-custom-dashboard" style="margin-bottom: 20px;" ng-if="vm.customDashboard.length > 0">
|
||||
<div class="umb-help-section" data-element="help-custom-dashboard" ng-if="vm.customDashboard.length > 0">
|
||||
<div ng-repeat="tab in vm.customDashboard">
|
||||
<div ng-repeat="property in tab.properties">
|
||||
<div>
|
||||
@@ -62,11 +63,11 @@
|
||||
</div>
|
||||
|
||||
<!-- Help Content -->
|
||||
<div data-element="help-articles" style="margin-bottom: 20px;" ng-if="vm.topics.length > 0">
|
||||
<h5 style="margin-bottom: 10px; margin-top: 0;">Articles</h5>
|
||||
<div class="umb-help-section" data-element="help-articles" ng-if="vm.topics.length > 0">
|
||||
<h5 class="umb-help-section__title">Articles</h5>
|
||||
<ul class="umb-help-list">
|
||||
<li class="umb-help-list-item" ng-repeat="topic in vm.topics track by $index">
|
||||
<a data-element="help-article-{{topic.name}}" target="_blank" ng-href="{{topic.url}}?utm_source=core&utm_medium=help&utm_content=link&utm_campaign=tv">
|
||||
<a class="umb-help-list-item__content" data-element="help-article-{{topic.name}}" target="_blank" ng-href="{{topic.url}}?utm_source=core&utm_medium=help&utm_content=link&utm_campaign=tv">
|
||||
<span>
|
||||
<span class="umb-help-list-item__title">
|
||||
<span class="bold">{{topic.name}}</span>
|
||||
@@ -80,11 +81,11 @@
|
||||
</div>
|
||||
|
||||
<!-- Umbraco tv content -->
|
||||
<div data-element="help-videos" style="margin-bottom: 20px;">
|
||||
<h5 style="margin-bottom: 10px; margin-top: 0;" ng-if="vm.videos.length > 0">Videos</h5>
|
||||
<div class="umb-help-section" data-element="help-videos" ng-if="vm.hasAccessToSettings">
|
||||
<h5 class="umb-help-section__title" ng-if="vm.videos.length > 0">Videos</h5>
|
||||
<ul class="umb-help-list">
|
||||
<li class="umb-help-list-item" ng-repeat="video in vm.videos track by $index">
|
||||
<a data-element="help-article-{{video.title}}" target="_blank" ng-href="{{video.link}}?utm_source=core&utm_medium=help&utm_content=link&utm_campaign=tv">
|
||||
<a class="umb-help-list-item__content" data-element="help-article-{{video.title}}" target="_blank" ng-href="{{video.link}}?utm_source=core&utm_medium=help&utm_content=link&utm_campaign=tv">
|
||||
<i class="umb-help-list-item__icon icon-tv-old"></i>
|
||||
<span class="umb-help-list-item__title">{{video.title}}</span>
|
||||
<i class="umb-help-list-item__open-icon icon-out"></i>
|
||||
@@ -94,8 +95,8 @@
|
||||
</div>
|
||||
|
||||
<!-- Links -->
|
||||
<div data-element="help-links">
|
||||
<a data-element="help-link-umbraco-tv" class="umb-help-badge" style="margin-bottom: 5px;" target="_blank" href="http://umbraco.tv?utm_source=core&utm_medium=help&utm_content=link&utm_campaign=tv">
|
||||
<div class="umb-help-section" data-element="help-links" ng-if="vm.hasAccessToSettings">
|
||||
<a data-element="help-link-umbraco-tv" class="umb-help-badge" target="_blank" href="http://umbraco.tv?utm_source=core&utm_medium=help&utm_content=link&utm_campaign=tv">
|
||||
<i class="umb-help-badge__icon icon-tv-old"></i>
|
||||
<div class="umb-help-badge__title">Visit umbraco.tv</div>
|
||||
<small>
|
||||
@@ -103,9 +104,10 @@
|
||||
</small>
|
||||
</a>
|
||||
|
||||
<a data-element="help-link-our-umbraco" class="umb-help-badge" style="margin-bottom: 5px;" target="_blank" href="http://our.umbraco.org?utm_source=core&utm_medium=help&utm_content=link&utm_campaign=our">
|
||||
<a data-element="help-link-our-umbraco" class="umb-help-badge" target="_blank" href="https://our.umbraco.com?utm_source=core&utm_medium=help&utm_content=link&utm_campaign=our">
|
||||
<i class="umb-help-badge__icon icon-favorite"></i>
|
||||
<div class="umb-help-badge__title">Visit our.umbraco.org</div>
|
||||
|
||||
<div class="umb-help-badge__title">Visit our.umbraco.com</div>
|
||||
<small>
|
||||
<localize key="defaultdialogs_theFriendliestCommunity">The friendliest community</localize>
|
||||
</small>
|
||||
|
||||
+49
-13
@@ -8,8 +8,35 @@
|
||||
*/
|
||||
function IconPickerOverlay($scope, iconHelper, localizationService) {
|
||||
|
||||
$scope.loading = true;
|
||||
$scope.model.hideSubmitButton = false;
|
||||
$scope.loading = true;
|
||||
$scope.model.hideSubmitButton = false;
|
||||
|
||||
$scope.colors = [
|
||||
{ name: "Black", value: "color-black" },
|
||||
{ name: "Blue Grey", value: "color-blue-grey" },
|
||||
{ name: "Grey", value: "color-grey" },
|
||||
{ name: "Brown", value: "color-brown" },
|
||||
{ name: "Blue", value: "color-blue" },
|
||||
{ name: "Light Blue", value: "color-light-blue" },
|
||||
{ name: "Indigo", value: "color-indigo" },
|
||||
{ name: "Purple", value: "color-purple" },
|
||||
{ name: "Deep Purple", value: "color-deep-purple" },
|
||||
{ name: "Cyan", value: "color-cyan" },
|
||||
{ name: "Green", value: "color-green" },
|
||||
{ name: "Light Green", value: "color-light-green" },
|
||||
{ name: "Lime", value: "color-lime" },
|
||||
{ name: "Yellow", value: "color-yellow" },
|
||||
{ name: "Amber", value: "color-amber" },
|
||||
{ name: "Orange", value: "color-orange" },
|
||||
{ name: "Deep Orange", value: "color-deep-orange" },
|
||||
{ name: "Red", value: "color-red" },
|
||||
{ name: "Pink", value: "color-pink" }
|
||||
];
|
||||
|
||||
if (!$scope.color) {
|
||||
// Set default selected color to black
|
||||
$scope.color = $scope.colors[0].value;
|
||||
};
|
||||
|
||||
if (!$scope.model.title) {
|
||||
$scope.model.title = localizationService.localize("defaultdialogs_selectIcon");
|
||||
@@ -23,20 +50,29 @@ function IconPickerOverlay($scope, iconHelper, localizationService) {
|
||||
$scope.icon = $scope.model.icon;
|
||||
};
|
||||
|
||||
iconHelper.getIcons().then(function(icons) {
|
||||
$scope.icons = icons;
|
||||
$scope.loading = false;
|
||||
});
|
||||
iconHelper.getIcons().then(function (icons) {
|
||||
$scope.icons = icons;
|
||||
$scope.loading = false;
|
||||
});
|
||||
|
||||
$scope.selectIcon = function(icon, color) {
|
||||
$scope.model.icon = icon;
|
||||
$scope.model.color = color;
|
||||
$scope.submitForm($scope.model);
|
||||
};
|
||||
|
||||
$scope.changeColor = function (color) {
|
||||
$scope.selectIcon = function (icon, color) {
|
||||
$scope.model.icon = icon;
|
||||
$scope.model.color = color;
|
||||
$scope.submitForm($scope.model);
|
||||
};
|
||||
|
||||
var unsubscribe = $scope.$on("formSubmitting",
|
||||
function () {
|
||||
if ($scope.color) {
|
||||
$scope.model.color = $scope.color;
|
||||
}
|
||||
});
|
||||
|
||||
//when the scope is destroyed we need to unsubscribe
|
||||
$scope.$on("$destroy",
|
||||
function () {
|
||||
unsubscribe();
|
||||
});
|
||||
}
|
||||
|
||||
angular.module("umbraco").controller("Umbraco.Overlays.IconPickerOverlay", IconPickerOverlay);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
|
||||
|
||||
<div ng-controller="Umbraco.Overlays.IconPickerOverlay">
|
||||
|
||||
<div class="umb-control-group">
|
||||
@@ -15,27 +17,7 @@
|
||||
</div>
|
||||
|
||||
<div class="umb-control-group">
|
||||
<select ng-model="color" ng-change="changeColor(color)" class="input-block-level">
|
||||
<option value=""><localize key="colors_black">Black</localize></option>
|
||||
<option value="color-blue-grey"><localize key="colors_bluegrey">Blue Grey</localize></option>
|
||||
<option value="color-grey"><localize key="colors_grey">Grey</localize></option>
|
||||
<option value="color-brown"><localize key="colors_brown">Brown</localize></option>
|
||||
<option value="color-blue"><localize key="colors_blue">Blue</localize></option>
|
||||
<option value="color-light-blue"><localize key="colors_lightblue">Light Blue</localize></option>
|
||||
<option value="color-cyan"><localize key="colors_cyan">Cyan</localize></option>
|
||||
<option value="color-green"><localize key="colors_green">Green</localize></option>
|
||||
<option value="color-light-green"><localize key="colors_lightgreen">Light Green</localize></option>
|
||||
<option value="color-yellow"><localize key="colors_yellow">Yellow</localize></option>
|
||||
<option value="color-lime"><localize key="colors_lime">Lime</localize></option>
|
||||
<option value="color-amber"><localize key="colors_amber">Amber</localize></option>
|
||||
<option value="color-orange"><localize key="colors_orange">Orange</localize></option>
|
||||
<option value="color-deep-orange"><localize key="colors_deeporange">Deep Orange</localize></option>
|
||||
<option value="color-red"><localize key="colors_red">Red</localize></option>
|
||||
<option value="color-pink"><localize key="colors_pink">Pink</localize></option>
|
||||
<option value="color-purple"><localize key="colors_purple">Purple</localize></option>
|
||||
<option value="color-deep-purple"><localize key="colors_deeppurple">Deep Purple</localize></option>
|
||||
<option value="color-indigo"><localize key="colors_indigo">Indigo</localize></option>
|
||||
</select>
|
||||
<umb-color-swatches colors="colors" selected-color="color" size="s"></umb-color-swatches>
|
||||
</div>
|
||||
|
||||
<umb-load-indicator ng-if="loading"></umb-load-indicator>
|
||||
|
||||
+20
-6
@@ -20,14 +20,17 @@ function MacroPickerController($scope, entityResource, macroResource, umbPropEdi
|
||||
$scope.model.selectedMacro = macro;
|
||||
|
||||
if ($scope.wizardStep === "macroSelect") {
|
||||
editParams();
|
||||
editParams(true);
|
||||
} else {
|
||||
$scope.model.submit($scope.model);
|
||||
}
|
||||
};
|
||||
|
||||
/** changes the view to edit the params of the selected macro */
|
||||
function editParams() {
|
||||
/** if there is pnly one macro, and it has parameters - editor can skip selecting the Macro **/
|
||||
function editParams(insertIfNoParameters) {
|
||||
//whether to insert the macro in the rich text editor when editParams is called and there are no parameters see U4-10537
|
||||
insertIfNoParameters = (typeof insertIfNoParameters !== 'undefined') ? insertIfNoParameters : true;
|
||||
//get the macro params if there are any
|
||||
macroResource.getMacroParameters($scope.model.selectedMacro.id)
|
||||
.then(function (data) {
|
||||
@@ -37,7 +40,11 @@ function MacroPickerController($scope, entityResource, macroResource, umbPropEdi
|
||||
//go to next page if there are params otherwise we can just exit
|
||||
if (!angular.isArray(data) || data.length === 0) {
|
||||
|
||||
$scope.model.submit($scope.model);
|
||||
if (insertIfNoParameters) {
|
||||
$scope.model.submit($scope.model);
|
||||
} else {
|
||||
$scope.wizardStep = 'macroSelect';
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@@ -116,12 +123,19 @@ function MacroPickerController($scope, entityResource, macroResource, umbPropEdi
|
||||
if (found) {
|
||||
//select the macro and go to next screen
|
||||
$scope.model.selectedMacro = found;
|
||||
editParams();
|
||||
editParams(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
//we don't have a pre-selected macro so ensure the correct step is set
|
||||
$scope.wizardStep = "macroSelect";
|
||||
//if there is only one macro in the site and it has parameters, let's not make the editor choose it from a selection of one macro (unless there are no parameters - then weirdly it's a better experience to make that selection)
|
||||
if ($scope.macros.length == 1) {
|
||||
$scope.model.selectedMacro = $scope.macros[0];
|
||||
editParams(false);
|
||||
}
|
||||
else {
|
||||
//we don't have a pre-selected macro so ensure the correct step is set
|
||||
$scope.wizardStep = 'macroSelect';
|
||||
}
|
||||
});
|
||||
|
||||
onInit();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user