Merge branch 'dev-v7.6' into dev-v7

# Conflicts:
#	src/Umbraco.Web.UI.Client/src/less/property-editors.less
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js
This commit is contained in:
Sebastiaan Janssen
2017-10-16 14:24:18 +02:00
3 changed files with 24 additions and 15 deletions

View File

@@ -126,8 +126,8 @@ ul.color-picker li a {
// Media picker
// --------------------------------------------------
.umb-mediapicker .add-link {
display: flex;
justify-content:center;
display: flex;
justify-content:center;
align-items:center;
width: 120px;
text-align: center;
@@ -209,8 +209,8 @@ ul.color-picker li a {
flex-direction: column;
margin: 0 5px 0 0;
padding: 5px;
}
}
.umb-sortable-thumbnails li:hover a {
display: flex;
justify-content: center;
@@ -223,9 +223,9 @@ ul.color-picker li a {
margin:auto;
display:block;
background-image: url(../img/checkered-background.png);
}
.umb-sortable-thumbnails li img.trashed {
}
.umb-sortable-thumbnails li img.trashed {
opacity:0.3;
}

View File

@@ -31,13 +31,13 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl
entityResource.getByIds(ids, "Media").then(function(medias) {
// The service only returns item results for ids that exist (deleted items are silently ignored).
// This results in the picked items value to be set to contain only ids of picked items that could actually be found.
// Since a referenced item could potentially be restored later on, instead of changing the selected values here based
// on whether the items exist during a save event - we should keep "placeholder" items for picked items that currently
// could not be fetched. This will preserve references and ensure that the state of an item does not differ depending
// on whether it is simply resaved or not.
// This is done by remapping the int/guid ids into a new array of items, where we create "Deleted item" placeholders
// The service only returns item results for ids that exist (deleted items are silently ignored).
// This results in the picked items value to be set to contain only ids of picked items that could actually be found.
// Since a referenced item could potentially be restored later on, instead of changing the selected values here based
// on whether the items exist during a save event - we should keep "placeholder" items for picked items that currently
// could not be fetched. This will preserve references and ensure that the state of an item does not differ depending
// on whether it is simply resaved or not.
// This is done by remapping the int/guid ids into a new array of items, where we create "Deleted item" placeholders
// when there is no match for a selected id. This will ensure that the values being set on save, are the same as before.
medias = _.map(ids,
@@ -106,7 +106,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl
show: true,
submit: function(model) {
_.each(model.selectedImages, function(media, i) {
_.each(model.selectedImages, function(media, i) {
// if there is no thumbnail, try getting one if the media is not a placeholder item
if (!media.thumbnail && media.id && media.metaData) {
media.thumbnail = mediaHelper.resolveFileFromEntity(media, true);

View File

@@ -1090,6 +1090,15 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="pickedTrashedItems">You have picked media items currently deleted or in the recycle bin</key>
<key alias="deletedItem">Deleted item</key>
</area>
<area alias="contentPicker">
<key alias="pickedTrashedItem">You have picked a content item currently deleted or in the recycle bin</key>
<key alias="pickedTrashedItems">You have picked content items currently deleted or in the recycle bin</key>
</area>
<area alias="mediaPicker">
<key alias="pickedTrashedItem">You have picked a media item currently deleted or in the recycle bin</key>
<key alias="pickedTrashedItems">You have picked media items currently deleted or in the recycle bin</key>
<key alias="deletedItem">Deleted item</key>
</area>
<area alias="relatedlinks">
<key alias="enterExternal">enter external link</key>
<key alias="chooseInternal">choose internal page</key>