Merge remote-tracking branch 'origin/v8/dev' into netcore/dev
This commit is contained in:
52
build/V8-Docs-Pipeline.yml
Normal file
52
build/V8-Docs-Pipeline.yml
Normal file
@@ -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'
|
||||
@@ -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\*.*"
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace Umbraco.Core.Models
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the content is published.
|
||||
/// </summary>
|
||||
/// <remarks>The <see cref="PublishedVersionId"/> property tells you which version of the content is currently published.</remarks>
|
||||
bool Published { get; set; }
|
||||
|
||||
PublishedState PublishedState { get; set; }
|
||||
@@ -32,10 +33,11 @@ namespace Umbraco.Core.Models
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the content has been edited.
|
||||
/// </summary>
|
||||
/// <remarks>Will return `true` once unpublished edits have been made after the version with <see cref="PublishedVersionId"/> has been published.</remarks>
|
||||
bool Edited { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the published version identifier.
|
||||
/// Gets the version identifier for the currently published version of the content.
|
||||
/// </summary>
|
||||
int PublishedVersionId { get; set; }
|
||||
|
||||
@@ -129,6 +131,6 @@ namespace Umbraco.Core.Models
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IContent DeepCloneWithResetIdentities();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<ContentTypeChange<TItem>>() { new ContentTypeChange<TItem>(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<TItem>(x, ContentTypeChangeTypes.Remove))
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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']);
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user