diff --git a/build/V8-Docs-Pipeline.yml b/build/V8-Docs-Pipeline.yml
new file mode 100644
index 0000000000..56e8fde60c
--- /dev/null
+++ b/build/V8-Docs-Pipeline.yml
@@ -0,0 +1,52 @@
+##############################################################
+## V8 CMS - .NET & AngularJS Doc sites ##
+## Built on demand only, NO automatic PR/branch triggers ##
+## ##
+## This build pipeline has a webhook for sucessful ##
+## builds, that sends the ZIP artifacts to our.umb to host ##
+##############################################################
+
+# Name != name of pipeline but the build number format
+# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/run-number?view=azure-devops&tabs=yaml
+
+# Build Pipeline triggers
+# https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops&tabs=yaml#ci-triggers
+trigger: none
+pr: none
+
+# Variables & their default values
+variables:
+ buildPlatform: 'Any CPU'
+ buildConfiguration: 'Release'
+
+# VM to run the build on & it's installed software
+# https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops
+# https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md
+pool:
+ vmImage: 'windows-2019'
+
+jobs:
+ - job: buildDocs
+ displayName: 'Build static docs site as ZIPs'
+ steps:
+
+ - task: PowerShell@2
+ displayName: 'Prep build tool, build C# & JS Docs'
+ inputs:
+ targetType: 'inline'
+ script: |
+ $uenv=./build.ps1 -get -doc
+ $uenv.SandboxNode()
+ $uenv.CompileBelle()
+ $uenv.PrepareAngularDocs()
+ $nugetsourceUmbraco = "https://api.nuget.org/v3/index.json"
+ $uenv.PrepareCSharpDocs()
+ $uenv.RestoreNode()
+ errorActionPreference: 'continue'
+ workingDirectory: 'build'
+
+ - task: PublishPipelineArtifact@1
+ inputs:
+ targetPath: '$(Build.Repository.LocalPath)\build.out\'
+ artifact: 'docs'
+ publishLocation: 'pipeline'
\ No newline at end of file
diff --git a/build/build.ps1 b/build/build.ps1
index 185d1b8ff6..c2c5bdd232 100644
--- a/build/build.ps1
+++ b/build/build.ps1
@@ -475,7 +475,7 @@
# change baseUrl
$BaseUrl = "https://our.umbraco.com/apidocs/v8/ui/"
$IndexPath = "./api/index.html"
- (Get-Content $IndexPath).replace('location.href.replace(rUrl, indexFile)', "`'" + $BaseUrl + "`'") | Set-Content $IndexPath
+ (Get-Content $IndexPath).replace('origin + location.href.substr(origin.length).replace(rUrl, indexFile)', "`'" + $BaseUrl + "`'") | Set-Content $IndexPath
# zip it
& $this.BuildEnv.Zip a -tzip -r "$out\ui-docs.zip" "$src\Umbraco.Web.UI.Docs\api\*.*"
diff --git a/src/Umbraco.Core/Models/IContent.cs b/src/Umbraco.Core/Models/IContent.cs
index 6990a7f7da..7a4fc83253 100644
--- a/src/Umbraco.Core/Models/IContent.cs
+++ b/src/Umbraco.Core/Models/IContent.cs
@@ -25,6 +25,7 @@ namespace Umbraco.Core.Models
///
/// Gets a value indicating whether the content is published.
///
+ /// The property tells you which version of the content is currently published.
bool Published { get; set; }
PublishedState PublishedState { get; set; }
@@ -32,10 +33,11 @@ namespace Umbraco.Core.Models
///
/// Gets a value indicating whether the content has been edited.
///
+ /// Will return `true` once unpublished edits have been made after the version with has been published.
bool Edited { get; set; }
///
- /// Gets the published version identifier.
+ /// Gets the version identifier for the currently published version of the content.
///
int PublishedVersionId { get; set; }
@@ -129,6 +131,6 @@ namespace Umbraco.Core.Models
///
///
IContent DeepCloneWithResetIdentities();
-
+
}
}
diff --git a/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs
index 7e39894aa3..9cd911e8d4 100644
--- a/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs
+++ b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs
@@ -508,6 +508,16 @@ namespace Umbraco.Core.Services.Implement
// delete content
DeleteItemsOfTypes(descendantsAndSelf.Select(x => x.Id));
+
+ // Next find all other document types that have a reference to this content type
+ var referenceToAllowedContentTypes = GetAll().Where(q => q.AllowedContentTypes.Any(p=>p.Id.Value==item.Id));
+ foreach (var reference in referenceToAllowedContentTypes)
+ {
+ reference.AllowedContentTypes = reference.AllowedContentTypes.Where(p => p.Id.Value != item.Id);
+ var changedRef = new List>() { new ContentTypeChange(reference, ContentTypeChangeTypes.RefreshMain) };
+ // Fire change event
+ OnChanged(scope, changedRef.ToEventArgs());
+ }
// finally delete the content type
// - recursively deletes all descendants
@@ -515,7 +525,7 @@ namespace Umbraco.Core.Services.Implement
// (contents of any descendant type have been deleted but
// contents of any composed (impacted) type remain but
// need to have their property data cleared)
- Repository.Delete(item);
+ Repository.Delete(item);
//...
var changes = descendantsAndSelf.Select(x => new ContentTypeChange(x, ContentTypeChangeTypes.Remove))
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js
index 01d73568ec..1a9c3c771a 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js
@@ -264,19 +264,20 @@ In the following example you see how to run some custom logic before a step goes
// If the currentStep JSON object has 'skipStepIfVisible'
// It's a DOM selector - if we find it then we ship over this step
- if(upcomingStep.skipStepIfVisible) {
- let tryFindDomEl = document.querySelector(upcomingStep.element);
- if(tryFindDomEl) {
+ if (upcomingStep.skipStepIfVisible) {
+ let tryFindDomEl = document.querySelector(upcomingStep.skipStepIfVisible);
+ if (tryFindDomEl) {
// check if element is visible:
if( tryFindDomEl.offsetWidth || tryFindDomEl.offsetHeight || tryFindDomEl.getClientRects().length ) {
// if it was visible then we skip the step.
nextStep();
+ return;
}
}
}
startStep();
-
+ // tour completed - final step
} else {
// tour completed - final step
scope.loadingStep = true;
diff --git a/src/Umbraco.Web.UI.Docs/gulpfile.js b/src/Umbraco.Web.UI.Docs/gulpfile.js
index a3e596ecad..a7269ec8b7 100644
--- a/src/Umbraco.Web.UI.Docs/gulpfile.js
+++ b/src/Umbraco.Web.UI.Docs/gulpfile.js
@@ -8,6 +8,8 @@ var connect = require('gulp-connect');
var open = require('gulp-open');
var gulpDocs = require('gulp-ngdocs');
+var documentationFiles = ['../Umbraco.Web.UI.Client/src/common/**/*.js', './src/api/**/*.ngdoc'];
+
/**************************
* Build Backoffice UI API documentation
**************************/
@@ -24,14 +26,15 @@ gulp.task('docs', [], function (cb) {
return gulpDocs.sections({
api: {
- glob: ['../Umbraco.Web.UI.Client/src/common/**/*.js', './src/api/**/*.ngdoc'],
+ glob: documentationFiles,
api: true,
title: 'UI API Documentation'
}
})
.pipe(gulpDocs.process(options))
- .pipe(gulp.dest('./api'));
- cb();
+ .pipe(gulp.dest('./api'))
+ .pipe(connect.reload());
+
});
gulp.task('connect:docs', function (cb) {
@@ -44,6 +47,10 @@ gulp.task('connect:docs', function (cb) {
cb();
});
+gulp.task('watch:docs', function (cb) {
+ return gulp.watch(documentationFiles, ['docs']);
+});
+
gulp.task('open:docs', function (cb) {
var options = {
@@ -54,3 +61,6 @@ gulp.task('open:docs', function (cb) {
.pipe(open(options));
cb();
});
+
+gulp.task('watch', ['docs', 'connect:docs', 'open:docs', 'watch:docs']);
+
diff --git a/src/Umbraco.Web.UI.Docs/package.json b/src/Umbraco.Web.UI.Docs/package.json
index 843740482e..f216b4b129 100644
--- a/src/Umbraco.Web.UI.Docs/package.json
+++ b/src/Umbraco.Web.UI.Docs/package.json
@@ -3,7 +3,10 @@
"scripts": {
"docs": "gulp docs",
"start": "gulp docs",
- "default": "gulp docs"
+ "default": "gulp docs",
+ "dev": "gulp watch",
+ "serve": "gulp watch",
+ "watch": "gulp watch"
},
"devDependencies": {
"gulp": "^3.9.1",