Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge v8 into v9 22/10/2021 #11452

Merged
merged 68 commits into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
c49c536
Adjust icon in umb-checkbox and ensure icon is centered
bjarnef Sep 19, 2021
674edd3
Missing nl translation for blockEditor_addBlock
cstrijkert Sep 20, 2021
9a246a1
Implement icon parameter for doctype editor (#11008)
soreng Sep 21, 2021
46e6f05
Align sortable handle vertically in multivalues prevalue editor
bjarnef Sep 19, 2021
1e1276f
10341: Use different picker for content types (#10896)
patrickdemooij9 Sep 21, 2021
405ed44
Falling back to contentTypeName when Block List label is empty (#10963)
callumbwhyte Sep 21, 2021
6c51210
Fix incorrect attribute
bjarnef Sep 16, 2021
31ecc14
Grid: Add button styling fix (#10978)
BatJan Sep 21, 2021
48a3a05
Create content template localization (#10945)
bjarnef Sep 22, 2021
ffa704c
Cleanup examine search results, and adds ability to toggle fields (#9…
skttl Sep 22, 2021
26382ab
Add EntityController GetUrlsByUdis
Sep 27, 2021
4eb7579
Update content picker to use GetUrlsByUdis
Sep 27, 2021
9f48a9f
Allows replacing MainDom with alternate DB
Shazwazza Sep 10, 2021
7c77ba2
Merge branch 'v8/8.17' into v8/dev
nul800sebastiaan Sep 30, 2021
c3ab0ae
Merge branch 'v8/dev' into v8/contrib
nul800sebastiaan Sep 30, 2021
20b9db8
Remove inherited property group id/key when local properties are adde…
ronaldbarendse Oct 4, 2021
106f6dc
Rename parameter for clarity
Oct 5, 2021
ef725ba
Removes annoying wait text, which causes layout jank
skttl Oct 5, 2021
3fcfb1b
v8: Backoffice Welsh language translation updates (#11240)
OwainJ Oct 5, 2021
7043d1c
Use medium sized overlay
BatJan Sep 27, 2021
c7f342a
Use umb-icon component for icons in content type groups and tabs
bjarnef Sep 1, 2021
828558a
fixes wrong reference to enterSubmitFolder method in ng-keydown
skttl Oct 2, 2021
e36dd86
Merge pull request #11207 from umbraco/v8/bugfix/mntp-performance
nikolajlauridsen Oct 6, 2021
8619cfe
11251: Don't add default dashboard to url
patrickdemooij9 Oct 4, 2021
494bef8
Fix preview of SVG when height and width not are set
bjarnef Oct 5, 2021
f7ea400
If caching a published document, make sure you use the published Name…
lordscarlet Oct 11, 2021
359181c
Added missing Italian translations (#11197)
ZioTino Oct 11, 2021
f6f5723
Resolve incorrect ContentSavedState for failed publish
Oct 12, 2021
4c6e014
Merge pull request #11356 from umbraco/v8/bugfix/fix-incorrect-edited…
Zeegaan Oct 12, 2021
3d53c72
add modelValue validation for server to correctly update validation e…
madsrasmussen Oct 12, 2021
d02440d
11048: Bugfix for groups and properties that get replaced (#11257)
patrickdemooij9 Oct 12, 2021
93720c9
Icon fallback to `icon-document` for existing document types (#11283)
bjarnef Oct 12, 2021
03b2aed
Align create buttons styling (#11352)
patrickdemooij9 Oct 12, 2021
08075e5
V8: Duplicate MemberGroup names cause MemberGroup mixup (#11291)
Oct 13, 2021
3f3262e
Adding property group aliases to ex.message
elit0451 Oct 14, 2021
ccd9013
Adding invalid prop group aliases as ModelState errors, so we don't i…
elit0451 Oct 14, 2021
b8ecc17
Pointing the actual reason for invalidating composition
elit0451 Oct 14, 2021
1b06db8
Validate all content type dependencies and throw a single InvalidComp…
ronaldbarendse Oct 14, 2021
6666f6a
Rename based on review comments
elit0451 Oct 14, 2021
844cd95
Merge branch 'v8/bugfix/AB14159-add-more-warnings-when-invalid-compos…
elit0451 Oct 14, 2021
705a3ed
Update composition validation error messages
ronaldbarendse Oct 14, 2021
db50281
Merge branch 'v8/bugfix/AB14159-add-more-warnings-when-invalid-compos…
ronaldbarendse Oct 14, 2021
b73ab25
Update InvalidCompositionException message
ronaldbarendse Oct 14, 2021
a284d52
Merge pull request #11373 from umbraco/v8/bugfix/AB14159-add-more-war…
ronaldbarendse Oct 14, 2021
6a5e34b
Allow switching property editor from numeric to slider (#11287)
bjarnef Oct 15, 2021
7ec1147
Enables friendly pasting in multipletextbox
skttl Oct 5, 2021
8e86f3e
UI API docs: Added reset rules for .close class
abjerner Oct 18, 2021
eb2f152
UI API docs: Fixed incorrect method name
abjerner Oct 18, 2021
57445e8
11331: Check property on instance if id is not set yet
patrickdemooij9 Oct 8, 2021
5cc70d2
Merge pull request #11360 from umbraco/v8/bugfix/11057-mandatory-imag…
Zeegaan Oct 19, 2021
4dc1ee6
Merge branch 'v8/dev' into v8/contrib
nul800sebastiaan Oct 19, 2021
5f97fca
Update styling and code style of imagepicker prevalue editor
BatJan Oct 18, 2021
6e04cc7
contentpicker: Don't validate minNumber if empty and not mandatory (#…
daniel-shuy Oct 19, 2021
37511f5
Change remove icon to remove text
BatJan Oct 19, 2021
fef162b
Remove z-index
BatJan Oct 18, 2021
9a16907
Add warning overlay when deleting grid layout
BatJan Oct 18, 2021
e668755
Listview: Fix translations and use "Remove" text for button instead o…
BatJan Oct 20, 2021
2b6e4ce
Turn nodelist into an array and filter out elements whose parent, gra…
BatJan Oct 19, 2021
4dd663d
Add remove warning
BatJan Oct 20, 2021
122caf8
Adjust styling to make grid config look better
BatJan Oct 18, 2021
3fb150d
11315: Don't unbind unbinding keys
patrickdemooij9 Oct 7, 2021
7261091
Merge remote-tracking branch 'origin/v8/dev' into v9/feature/v8_merge…
bergmania Oct 22, 2021
a851fc5
Delete create.html
bergmania Oct 22, 2021
4bb1dbf
Delete create.html
bergmania Oct 22, 2021
3d85d9b
Delete create.html
bergmania Oct 22, 2021
071fb4b
Delete create.html
bergmania Oct 22, 2021
51ec026
Delete create.html
bergmania Oct 22, 2021
222a40a
Delete importdocumenttype.html
bergmania Oct 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -673,19 +673,6 @@ protected override void PersistUpdatedItem(IContent entity)
edited = true;
}

// To establish the new value of "edited" we compare all properties publishedValue to editedValue and look
// for differences.
//
// If we SaveAndPublish but the publish fails (e.g. already scheduled for release)
// we have lost the publishedValue on IContent (in memory vs database) so we cannot correctly make that comparison.
//
// This is a slight change to behaviour, historically a publish, followed by change & save, followed by undo change & save
// would change edited back to false.
if (!publishing && editedSnapshot)
{
edited = true;
}

if (entity.ContentType.VariesByCulture())
{
// names also impact 'edited'
Expand Down
235 changes: 159 additions & 76 deletions src/Umbraco.Web.BackOffice/Controllers/ContentTypeControllerBase.cs

Large diffs are not rendered by default.

753 changes: 429 additions & 324 deletions src/Umbraco.Web.BackOffice/Controllers/EntityController.cs

Large diffs are not rendered by default.

27 changes: 15 additions & 12 deletions src/Umbraco.Web.BackOffice/Controllers/MemberGroupController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,20 @@
using Umbraco.Cms.Web.Common.Attributes;
using Umbraco.Cms.Web.Common.Authorization;
using Umbraco.Extensions;
using Constants = Umbraco.Cms.Core.Constants;

namespace Umbraco.Cms.Web.BackOffice.Controllers
{
/// <summary>
/// An API controller used for dealing with member groups
/// An API controller used for dealing with member groups
/// </summary>
[PluginController(Constants.Web.Mvc.BackOfficeApiArea)]
[Authorize(Policy = AuthorizationPolicies.TreeAccessMemberGroups)]
[ParameterSwapControllerActionSelector(nameof(GetById), "id", typeof(int), typeof(Guid), typeof(Udi))]
public class MemberGroupController : UmbracoAuthorizedJsonController
{
private readonly ILocalizedTextService _localizedTextService;
private readonly IMemberGroupService _memberGroupService;
private readonly IUmbracoMapper _umbracoMapper;
private readonly ILocalizedTextService _localizedTextService;

public MemberGroupController(
IMemberGroupService memberGroupService,
Expand All @@ -35,11 +34,12 @@ public MemberGroupController(
{
_memberGroupService = memberGroupService ?? throw new ArgumentNullException(nameof(memberGroupService));
_umbracoMapper = umbracoMapper ?? throw new ArgumentNullException(nameof(umbracoMapper));
_localizedTextService = localizedTextService ?? throw new ArgumentNullException(nameof(localizedTextService));
_localizedTextService =
localizedTextService ?? throw new ArgumentNullException(nameof(localizedTextService));
}

/// <summary>
/// Gets the member group json for the member group id
/// Gets the member group json for the member group id
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Expand All @@ -56,7 +56,7 @@ public ActionResult<MemberGroupDisplay> GetById(int id)
}

/// <summary>
/// Gets the member group json for the member group guid
/// Gets the member group json for the member group guid
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Expand All @@ -72,7 +72,7 @@ public ActionResult<MemberGroupDisplay> GetById(Guid id)
}

/// <summary>
/// Gets the member group json for the member group udi
/// Gets the member group json for the member group udi
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Expand Down Expand Up @@ -100,7 +100,7 @@ public IEnumerable<MemberGroupDisplay> GetByIds([FromQuery] int[] ids)
[HttpPost]
public IActionResult DeleteById(int id)
{
var memberGroup = _memberGroupService.GetById(id);
IMemberGroup memberGroup = _memberGroupService.GetById(id);
if (memberGroup == null)
{
return NotFound();
Expand All @@ -112,7 +112,7 @@ public IActionResult DeleteById(int id)

public IEnumerable<MemberGroupDisplay> GetAllGroups()
=> _memberGroupService.GetAll()
.Select(_umbracoMapper.Map<IMemberGroup, MemberGroupDisplay>);
.Select(_umbracoMapper.Map<IMemberGroup, MemberGroupDisplay>);

public MemberGroupDisplay GetEmpty()
{
Expand All @@ -123,18 +123,21 @@ public MemberGroupDisplay GetEmpty()
public bool IsMemberGroupNameUnique(int id, string oldName, string newName)
{
if (newName == oldName)
{
return true; // name hasn't changed
}

var memberGroup = _memberGroupService.GetByName(newName);
IMemberGroup memberGroup = _memberGroupService.GetByName(newName);
if (memberGroup == null)
{
return true; // no member group found
}

return memberGroup.Id == id;
}

public ActionResult<MemberGroupDisplay> PostSave(MemberGroupSave saveModel)
{

var id = int.Parse(saveModel.Id.ToString(), CultureInfo.InvariantCulture);
IMemberGroup memberGroup = id > 0 ? _memberGroupService.GetById(id) : new MemberGroup();
if (memberGroup == null)
Expand All @@ -157,7 +160,7 @@ public ActionResult<MemberGroupDisplay> PostSave(MemberGroupSave saveModel)
}
else
{
var display = _umbracoMapper.Map<IMemberGroup, MemberGroupDisplay>(memberGroup);
MemberGroupDisplay display = _umbracoMapper.Map<IMemberGroup, MemberGroupDisplay>(memberGroup);
display.AddErrorNotification(
_localizedTextService.Localize("speechBubbles", "memberGroupNameDuplicate"),
string.Empty);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
// List of elements that can be focusable within the focus lock
var focusableElementsSelector = '[role="button"], a[href]:not([disabled]):not(.ng-hide), button:not([disabled]):not(.ng-hide), textarea:not([disabled]):not(.ng-hide), input:not([disabled]):not(.ng-hide), select:not([disabled]):not(.ng-hide)';

// Grab the body element so we can add the tabbing class on it when needed
var bodyElement = document.querySelector('body');

function getDomNodes(){
infiniteEditorsWrapper = document.querySelector('.umb-editors');
if(infiniteEditorsWrapper) {
Expand All @@ -47,7 +44,10 @@

function getFocusableElements(targetElm) {
var elm = targetElm ? targetElm : target;
focusableElements = elm.querySelectorAll(focusableElementsSelector);

// Filter out elements that are children of parents with the .ng-hide class
focusableElements = [...elm.querySelectorAll(focusableElementsSelector)].filter(elm => !elm.closest('.ng-hide'));

// Set first and last focusable elements
firstFocusableElement = focusableElements[0];
lastFocusableElement = focusableElements[focusableElements.length - 1];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,38 @@ Use this directive to render a ui component for selecting child items to a paren
(function() {
'use strict';

function ChildSelectorDirective() {
function ChildSelectorDirective(overlayService, localizationService) {

function link(scope, el, attr, ctrl) {

var eventBindings = [];
scope.dialogModel = {};
scope.showDialog = false;

scope.removeChild = (selectedChild, $index) => {
if (scope.onRemove) {
scope.onRemove(selectedChild, $index);
}
scope.removeChild = (selectedChild, $index, event) => {
const dialog = {
view: "views/components/overlays/umb-template-remove-confirm.html",
layout: selectedChild,
submitButtonLabelKey: "defaultdialogs_yesRemove",
submitButtonStyle: "danger",
submit: function () {
if(scope.onRemove) {
scope.onRemove(selectedChild, $index);
overlayService.close();
}
},
close: function () {
overlayService.close();
}
};

localizationService.localize("general_delete").then(value => {
dialog.title = value;
overlayService.open(dialog);
});

event.preventDefault();
event.stopPropagation();
};

scope.addChild = $event => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,14 @@ When building a custom infinite editor view you can use the same components as a
* Method to tell editors that they are begin blurred.
*/
function blur() {

/* keyboard shortcuts will be overwritten by the new infinite editor
if (isEnabled === true) {
/* keyboard shortcuts will be overwritten by the new infinite editor
so we need to store the shortcuts for the current editor so they can be rebound
when the infinite editor closes
*/
unbindKeyboardShortcuts();
isEnabled = false;
unbindKeyboardShortcuts();
isEnabled = false;
}
}
/**
* @ngdoc method
Expand Down
5 changes: 2 additions & 3 deletions src/Umbraco.Web.UI.Client/src/less/gridview.less
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,6 @@
}

.preview-rows {

display: inline-block;
position: relative;
box-sizing: border-box;
Expand Down Expand Up @@ -675,9 +674,9 @@
}

.preview-rows.columns {
min-height: 18px;
min-height: 16px;
line-height: 11px;
padding: 1px;
padding: 0 1px 1px 1px;

&.prevalues-rows {
min-height: 30px;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div>

<div ng-if="model.layout" class="umb-alert umb-alert--warning mb2">
<localize key="contentTypeEditor_removeChildNode">You are removing the child node</localize> <strong>{{model.layout.name}}</strong>.
</div>

<p>
<localize key="contentTypeEditor_removeChildNodeWarning">
Removing a child node will limit the editors options to create different content types beneath a node.
</localize>
</p>

<localize key="defaultdialogs_confirmdelete">Are you sure you want to remove</localize>?

</div>
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<span class="umb-child-selector__child-name">{{selectedChild.name}}</span>
</div>
<div class="umb-child-selector__child-actions">
<button type="button" class="umb-child-selector__child-remove" ng-click="removeChild(selectedChild, $index)">
<umb-icon icon="icon-trash"></umb-icon>
<button type="button" class="umb-node-preview__action umb-node-preview__action--red umb-child-selector__child-remove" ng-click="removeChild(selectedChild, $index, $event)">
<localize key="general_remove">Remove</localize>
</button>
</div>
</div>
Expand Down
112 changes: 58 additions & 54 deletions src/Umbraco.Web.UI.Client/src/views/dataTypes/create.html
Original file line number Diff line number Diff line change
@@ -1,66 +1,70 @@
<div ng-controller="Umbraco.Editors.DataType.CreateController">

<div ng-show="!model.creatingFolder">
<div class="umbracoDialog umb-dialog-body with-footer" ng-cloak>
<div class="umb-pane">
<h5><localize key="create_createUnder">Create an item under</localize> {{currentNode.name}}</h5>
<div ng-show="!model.creatingFolder">
<div class="umbracoDialog umb-dialog-body with-footer" ng-cloak>
<div class="umb-pane">
<h5>
<localize key="create_createUnder">Create an item under</localize>
{{currentNode.name}}
</h5>

<ul class="umb-actions umb-actions-child">
<li data-element="action-data-type" class="umb-action">
<button type="button" class="umb-action-link umb-outline btn-reset" ng-click="createDataType()" umb-auto-focus>
<umb-icon icon="icon-autofill" class="icon large"></umb-icon>
<span class="menu-label">
<ul class="umb-actions umb-actions-child">
<li class="umb-action" data-element="action-data-type">
<button class="umb-action-link umb-outline btn-reset" ng-click="createDataType()" type="button"
umb-auto-focus>
<umb-icon class="icon large" icon="icon-autofill"></umb-icon>
<span class="menu-label">
<localize key="create_newDataType">New data type</localize>
</span>
</button>
</li>
<li data-element="action-folder" class="umb-action">
<button type="button" class="umb-action-link umb-outline btn-reset" ng-click="showCreateFolder()">
<umb-icon icon="icon-folder" class="icon large"></umb-icon>
<span class="menu-label">
</button>
</li>
<li class="umb-action" data-element="action-folder">
<button class="umb-action-link umb-outline btn-reset" ng-click="showCreateFolder()" type="button">
<umb-icon class="icon large" icon="icon-folder"></umb-icon>
<span class="menu-label">
<localize key="create_newFolder">New folder</localize>...
</span>
</button>
</li>
</ul>
</div>

</div>

<div class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
<button type="button" class="btn btn-info" ng-click="close()">
<localize key="buttons_somethingElse">Do something else</localize>
</button>
</div>
</li>
</ul>
</div>

</div>

<div ng-show="model.creatingFolder">
<form novalidate name="createFolderForm"
ng-submit="createContainer()"
val-form-manager>
<div class="umbracoDialog umb-dialog-body with-footer" ng-cloak>
<div class="umb-pane" ng-show="model.creatingFolder">
<umb-control-group label="Enter a folder name" hide-label="false">
<input type="text"
name="folderName"
ng-model="model.folderName"
class="umb-textstring textstring input-block-level"
focus-when="{{model.creatingFolder}}"
required />
</umb-control-group>
</div>
</div>
<div class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
<umb-button type="button"
button-style="link"
action="close()"
label-key="general_close">
</umb-button>
<umb-button type="submit"
button-style="primary"
label-key="general_create">
</umb-button>
</div>
</form>
<div class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
<button class="btn btn-info" ng-click="close()" type="button">
<localize key="buttons_somethingElse">Do something else</localize>
</button>
</div>
</div>

<div ng-show="model.creatingFolder">
<form name="createFolderForm" ng-submit="createContainer()"
novalidate
val-form-manager>
<div class="umbracoDialog umb-dialog-body with-footer" ng-cloak>
<div class="umb-pane" ng-show="model.creatingFolder">
<umb-control-group hide-label="false" label="Enter a folder name">
<input class="umb-textstring textstring input-block-level"
focus-when="{{model.creatingFolder}}"
name="folderName"
ng-model="model.folderName"
required
type="text"/>
</umb-control-group>
</div>
</div>
<div class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
<umb-button action="close()"
button-style="link"
label-key="general_close"
type="button">
</umb-button>
<umb-button button-style="primary"
label-key="general_create"
type="submit">
</umb-button>
</div>
</form>
</div>
</div>
Loading