From 13055ad1f2e4771d3744d051e48dbc7b802c12d6 Mon Sep 17 00:00:00 2001 From: Claus Date: Thu, 12 Oct 2017 11:35:08 +0200 Subject: [PATCH 1/2] U4-10524 Show warning in UI for any picker that is referencing a trashed or deleted item fixing the trash flag not getting mapped via automapper. fixing up the ui for mediapicker. fixing a small ui issue with the contentpicker and trashed content. --- .../src/less/property-editors.less | 153 ++++++------ .../contentpicker/contentpicker.controller.js | 13 +- .../mediapicker/mediapicker.controller.js | 58 +++-- .../mediapicker/mediapicker.html | 70 +++--- src/Umbraco.Web.UI/umbraco/config/lang/da.xml | 65 +++--- src/Umbraco.Web.UI/umbraco/config/lang/en.xml | 217 +++++++++--------- .../umbraco/config/lang/en_us.xml | 5 + .../Models/ContentEditing/EntityBasic.cs | 3 - .../Models/Mapping/EntityModelMapper.cs | 7 +- 9 files changed, 315 insertions(+), 276 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/property-editors.less b/src/Umbraco.Web.UI.Client/src/less/property-editors.less index 8b10b2f91b..1a999b9c1c 100644 --- a/src/Umbraco.Web.UI.Client/src/less/property-editors.less +++ b/src/Umbraco.Web.UI.Client/src/less/property-editors.less @@ -126,21 +126,21 @@ ul.color-picker li a { // Media picker // -------------------------------------------------- .umb-mediapicker .add-link { - display: inline-block; - height: 120px; - width: 120px; - text-align: center; - color: @gray-8; - border: 2px @gray-8 dashed; - line-height: 120px; - text-decoration: none; + display: flex; + justify-content:center; + align-items:center; + width: 120px; + text-align: center; + color: @gray-8; + border: 2px @gray-8 dashed; + text-decoration: none; - transition: all 150ms ease-in-out; + transition: all 150ms ease-in-out; - &:hover { - color: @turquoise-d1; - border-color: @turquoise; - } + &:hover { + color: @turquoise-d1; + border-color: @turquoise; + } } .umb-mediapicker .picked-image { @@ -207,11 +207,10 @@ ul.color-picker li a { .umb-mediapicker .umb-sortable-thumbnails li { flex-direction: column; - margin: 0; + margin: 0 5px 0 0; padding: 5px; -} - - +} + .umb-sortable-thumbnails li:hover a { display: flex; justify-content: center; @@ -219,16 +218,20 @@ ul.color-picker li a { } .umb-sortable-thumbnails li img { - max-width:100%; - max-height:100%; - margin:auto; - display:block; - background-image: url(../img/checkered-background.png); + max-width:100%; + max-height:100%; + margin:auto; + display:block; + background-image: url(../img/checkered-background.png); +} + +.umb-sortable-thumbnails li img.trashed { + opacity:0.3; } -.umb-sortable-thumbnails li img.noScale{ - max-width: none !important; - max-height: none !important; +.umb-sortable-thumbnails li img.noScale { + max-width: none !important; + max-height: none !important; } .umb-sortable-thumbnails .umb-icon-holder { @@ -254,8 +257,8 @@ ul.color-picker li a { } .umb-sortable-thumbnails li:hover .umb-sortable-thumbnails__actions { - opacity: 1; - visibility: visible; + opacity: 1; + visibility: visible; } .umb-sortable-thumbnails .umb-sortable-thumbnails__action { @@ -285,27 +288,27 @@ ul.color-picker li a { // ------------------------------------------------- .umb-cropper{ - position: relative; + position: relative; } .umb-cropper img, .umb-cropper-gravity img{ - position: relative; - max-width: 100%; - height: auto; - top: 0; - left: 0; + position: relative; + max-width: 100%; + height: auto; + top: 0; + left: 0; } .umb-cropper img { - max-width: none; + max-width: none; } .umb-cropper .overlay, .umb-cropper-gravity .overlay { - top: 0; - left: 0; - cursor: move; - z-index: @zindexCropperOverlay; - position: absolute; + top: 0; + left: 0; + cursor: move; + z-index: @zindexCropperOverlay; + position: absolute; } .umb-cropper .viewport{ @@ -317,43 +320,43 @@ ul.color-picker li a { } .umb-cropper-gravity .viewport{ - overflow: hidden; - position: relative; - width: 100%; - height: 100%; + overflow: hidden; + position: relative; + width: 100%; + height: 100%; } .umb-cropper .viewport:after { - content: ""; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: @zindexCropperOverlay - 1; - -moz-opacity: .75; - opacity: .75; - filter: alpha(opacity=7); - -webkit-box-shadow: inset 0 0 0 20px white,inset 0 0 0 21px rgba(0,0,0,.1),inset 0 0 20px 21px rgba(0,0,0,.2); - -moz-box-shadow: inset 0 0 0 20px white,inset 0 0 0 21px rgba(0,0,0,.1),inset 0 0 20px 21px rgba(0,0,0,.2); - box-shadow: inset 0 0 0 20px white,inset 0 0 0 21px rgba(0,0,0,.1),inset 0 0 20px 21px rgba(0,0,0,.2); + content: ""; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: @zindexCropperOverlay - 1; + -moz-opacity: .75; + opacity: .75; + filter: alpha(opacity=7); + -webkit-box-shadow: inset 0 0 0 20px white,inset 0 0 0 21px rgba(0,0,0,.1),inset 0 0 20px 21px rgba(0,0,0,.2); + -moz-box-shadow: inset 0 0 0 20px white,inset 0 0 0 21px rgba(0,0,0,.1),inset 0 0 20px 21px rgba(0,0,0,.2); + box-shadow: inset 0 0 0 20px white,inset 0 0 0 21px rgba(0,0,0,.1),inset 0 0 20px 21px rgba(0,0,0,.2); } .umb-cropper-gravity .overlay{ - width: 14px; - height: 14px; - text-align: center; - border-radius: 20px; - background: @turquoise; - border: 3px solid @white; - opacity: 0.8; + width: 14px; + height: 14px; + text-align: center; + border-radius: 20px; + background: @turquoise; + border: 3px solid @white; + opacity: 0.8; } .umb-cropper-gravity .overlay i { - font-size: 26px; - line-height: 26px; - opacity: 0.8 !important; + font-size: 26px; + line-height: 26px; + opacity: 0.8 !important; } .umb-cropper .crop-container { @@ -361,16 +364,16 @@ ul.color-picker li a { } .umb-cropper .crop-slider { - padding: 10px; - border-top: 1px solid @gray-10; - margin-top: 10px; - display: flex; - align-items: center; - justify-content: center; - flex-wrap: wrap; - @media (min-width: 769px) { + padding: 10px; + border-top: 1px solid @gray-10; + margin-top: 10px; + display: flex; + align-items: center; + justify-content: center; + flex-wrap: wrap; + @media (min-width: 769px) { padding: 10px 50px 10px 50px; - } + } } .umb-cropper .crop-slider i { diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js index 9b3316ec1a..ec83988719 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js @@ -1,7 +1,7 @@ //this controller simply tells the dialogs service to open a mediaPicker window //with a specified callback, this callback will receive an object with a selection on it -function contentPickerController($scope, entityResource, editorState, iconHelper, $routeParams, angularHelper, navigationService, $location, miniEditorHelper) { +function contentPickerController($scope, entityResource, editorState, iconHelper, $routeParams, angularHelper, navigationService, $location, miniEditorHelper, localizationService) { var unsubscribe; @@ -54,7 +54,7 @@ function contentPickerController($scope, entityResource, editorState, iconHelper setSortingState($scope.renderModel); }); - } + } $scope.renderModel = []; @@ -154,7 +154,6 @@ function contentPickerController($scope, entityResource, editorState, iconHelper } } - if ($routeParams.section === "settings" && $routeParams.tree === "documentTypes") { //if the content-picker is being rendered inside the document-type editor, we don't need to process the startnode query dialogOptions.startNodeId = -1; @@ -287,8 +286,12 @@ function contentPickerController($scope, entityResource, editorState, iconHelper entityResource.getUrl(entity.id, entityType).then(function(data){ // update url angular.forEach($scope.renderModel, function(item){ - if(item.id === entity.id) { - item.url = data; + if (item.id === entity.id) { + if (entity.trashed) { + item.url = localizationService.dictionary.general_recycleBin; + } else { + item.url = data; + } } }); }); diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js index 8a7b20498d..28e034bdaf 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js @@ -1,7 +1,7 @@ //this controller simply tells the dialogs service to open a mediaPicker window //with a specified callback, this callback will receive an object with a selection on it angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerController", - function ($rootScope, $scope, dialogService, entityResource, mediaResource, mediaHelper, $timeout, userService, $location) { + function ($rootScope, $scope, dialogService, entityResource, mediaResource, mediaHelper, $timeout, userService, $location, localizationService) { //check the pre-values for multi-picker var multiPicker = $scope.model.config.multiPicker && $scope.model.config.multiPicker !== '0' ? true : false; @@ -26,17 +26,44 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl // the mediaResource has server side auth configured for which the user must have // access to the media section, if they don't they'll get auth errors. The entityResource // acts differently in that it allows access if the user has access to any of the apps that - // might require it's use. Therefore we need to use the metatData property to get at the thumbnail + // might require it's use. Therefore we need to use the metaData property to get at the thumbnail // value. - entityResource.getByIds(ids, "Media").then(function (medias) { + entityResource.getByIds(ids, "Media").then(function(medias) { - _.each(medias, function (media, i) { + // 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, + function(id) { + var found = _.find(medias, + function(m) { + return m.udi === id || m.id === id; + }); + if (found) { + return found; + } else { + return { + name: localizationService.dictionary.mediaPicker_deletedItem, + id: $scope.model.config.idType !== "udi" ? id : null, + udi: $scope.model.config.idType === "udi" ? id : null, + icon: "icon-picture", + thumbnail: null, + trashed: true + }; + } + }); - //only show non-trashed items - if (media.parentId >= -1) { - - if (!media.thumbnail) { + _.each(medias, + 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.thumbnail = mediaHelper.resolveFileFromEntity(media, true); } @@ -44,12 +71,10 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl if ($scope.model.config.idType === "udi") { $scope.ids.push(media.udi); - } - else { + } else { $scope.ids.push(media.id); } - } - }); + }); $scope.sync(); }); @@ -81,9 +106,9 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl show: true, submit: function(model) { - _.each(model.selectedImages, function(media, i) { - - if (!media.thumbnail) { + _.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.thumbnail = mediaHelper.resolveFileFromEntity(media, true); } @@ -101,10 +126,8 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl $scope.mediaPickerOverlay.show = false; $scope.mediaPickerOverlay = null; - } }; - }; $scope.sortableOptions = { @@ -142,5 +165,4 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl //update the display val again if it has changed from the server setupViewModel(); }; - }); diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html index f3aab992dd..70dd9ed2e5 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html @@ -1,47 +1,47 @@
- + + + +
- - + + diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml index 23895db95b..297b760f19 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml @@ -90,7 +90,7 @@ Nedarv Sprog - eller nedarv sprog fra forældre noder. Gælder også
+ eller nedarv sprog fra forældre noder. Gælder også
for den aktuelle node, medmindre et domæne nedenfor også indstiller et sprog.]]>
Domæner @@ -383,15 +383,15 @@ - Du tilføjer flere sprog under 'sprog' i menuen til venstre + Du tilføjer flere sprog under 'sprog' i menuen til venstre ]]> Kulturnavn Rediger navnet på ordbogselementet. - @@ -669,14 +669,14 @@ Din database er blevet fundet og identificeret som Database konfiguration - installér knappen for at installere Umbraco %0% databasen + installér knappen for at installere Umbraco %0% databasen ]]> installér knappen for at installere Umbraco %0% databasen]]> Næste for at fortsætte.]]> - Databasen er ikke fundet. Kontrollér venligst at informationen i database forbindelsesstrengen i "web.config" filen er korrekt.

+ Databasen er ikke fundet. Kontrollér venligst at informationen i database forbindelsesstrengen i "web.config" filen er korrekt.

For at fortsætte bedes du venligst rette "web.config" filen (ved at bruge Visual Studio eller dit favoritprogram), scroll til bunden, tilføj forbindelsesstrengen til din database i feltet som hedder "umbracoDbDSN" og gem filen.

Klik på Forsøg igen knappen når du er færdig.
Mere information om at redigere web.config her.

]]>
Kontakt venligst din ISP hvis det er nødvendigt. Hvis du installerer på en lokal maskine eller server kan du muligvis få informationerne fra din systemadministrator.]]> @@ -724,7 +724,7 @@ Umbraco %0% er installeret og klar til brug /web.config filen og opdatére 'AppSetting' feltet UmbracoConfigurationStatus i bunden til '%0%'.]]> - komme igang med det samme ved at klikke på "Start Umbraco" knappen nedenfor.
Hvis du er ny med Umbraco, kan du finde masser af ressourcer på vores 'getting started' sider. + komme igang med det samme ved at klikke på "Start Umbraco" knappen nedenfor.
Hvis du er ny med Umbraco, kan du finde masser af ressourcer på vores 'getting started' sider. ]]>
Start UmbracoFor at administrere dit website skal du blot åbne Umbraco administrationen og begynde at tilføje indhold, opdatere skabelonerne og stylesheets'ene eller tilføje ny funktionalitet.]]> @@ -789,25 +789,25 @@ Rediger dine notificeringer for %0% - - Hej %0%

-

Dette er en automatisk mail for at informere dig om at opgaven '%1%' - er blevet udførtpå siden '%2%' af brugeren '%3%'

-

+ Hej %0%

+

Dette er en automatisk mail for at informere dig om at opgaven '%1%' + er blevet udførtpå siden '%2%' af brugeren '%3%'

+

     RET       

Opdateringssammendrag:

%6%


  PUBLISÉR          RET            SLET    

Hav en fortsat god dag!

De bedste hilsner fra umbraco robotten

]]> [%0%] Notificering om %1% udført på %2% @@ -864,7 +864,7 @@ Mange hilsner fra Umbraco robotten Pakken er på succesfuld vis blevet fjernet Afinstallér pakke - + Bemærk: at dokumenter og medier som afhænger af denne pakke vil muligvis holde op med at virke, så vær forsigtig. Hvis i tvivl, kontakt personen som har udviklet pakken.]]> Download opdatering fra opbevaringsbasen @@ -912,13 +912,13 @@ Mange hilsner fra Umbraco robotten Udgivelsen kunne ikke udgives da publiceringsdato er sat - - Udgivelsen fejlede fordi en overordnet side ikke er publiceret @@ -935,6 +935,11 @@ Mange hilsner fra Umbraco robotten Du har ikke konfigureret nogen godkendte farver + + Du har valgt et medie som er slettet eller lagt i papirkurven + Du har valgt medier som er slettede eller lagt i papirkurven + Slettet medie + indtast eksternt link vælg en intern side diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml index 30ebc137b9..48fd5a99c7 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml @@ -693,35 +693,35 @@ Your database has been found and is identified as Database configuration - install button to install the Umbraco %0% database + install button to install the Umbraco %0% database ]]> Next to proceed.]]> - Database not found! Please check that the information in the "connection string" of the "web.config" file is correct.

-

To proceed, please edit the "web.config" file (using Visual Studio or your favourite text editor), scroll to the bottom, add the connection string for your database in the key named "UmbracoDbDSN" and save the file.

-

- Click the retry button when - done.
+ Database not found! Please check that the information in the "connection string" of the "web.config" file is correct.

+

To proceed, please edit the "web.config" file (using Visual Studio or your favourite text editor), scroll to the bottom, add the connection string for your database in the key named "UmbracoDbDSN" and save the file.

+

+ Click the retry button when + done.
More information on editing web.config here.

]]>
- - Please contact your ISP if necessary. + + Please contact your ISP if necessary. If you're installing on a local machine or server you might need information from your system administrator.]]> - - Press the upgrade button to upgrade your database to Umbraco %0%

-

- Don't worry - no content will be deleted and everything will continue working afterwards! -

+ + Press the upgrade button to upgrade your database to Umbraco %0%

+

+ Don't worry - no content will be deleted and everything will continue working afterwards! +

]]>
- Press Next to + Press Next to proceed. ]]> next to continue the configuration wizard]]> @@ -736,65 +736,65 @@ More information on setting up permissions for Umbraco here You need to grant ASP.NET modify permissions to the following files/folders - Your permission settings are almost perfect!

+ Your permission settings are almost perfect!

You can run Umbraco without problems, but you will not be able to install packages which are recommended to take full advantage of Umbraco.]]>
How to Resolve Click here to read the text version video tutorial on setting up folder permissions for Umbraco or read the text version.]]> - Your permission settings might be an issue! -

+ Your permission settings might be an issue! +

You can run Umbraco without problems, but you will not be able to create folders or install packages which are recommended to take full advantage of Umbraco.]]>
- Your permission settings are not ready for Umbraco! -

+ Your permission settings are not ready for Umbraco! +

In order to run Umbraco, you'll need to update your permission settings.]]>
- Your permission settings are perfect!

+ Your permission settings are perfect!

You are ready to run Umbraco and install packages!]]>
Resolving folder issue Follow this link for more information on problems with ASP.NET and creating folders Setting up folder permissions - I want to start from scratch - learn how) - You can still choose to install Runway later on. Please go to the Developer section and choose Packages. + learn how) + You can still choose to install Runway later on. Please go to the Developer section and choose Packages. ]]> You've just set up a clean Umbraco platform. What do you want to do next? Runway is installed - - This is our list of recommended modules, check off the ones you would like to install, or view the full list of modules + + This is our list of recommended modules, check off the ones you would like to install, or view the full list of modules ]]> Only recommended for experienced users I want to start with a simple website - - "Runway" is a simple website providing some basic document types and templates. The installer can set up Runway for you automatically, - but you can easily edit, extend or remove it. It's not necessary and you can perfectly use Umbraco without it. However, - Runway offers an easy foundation based on best practices to get you started faster than ever. - If you choose to install Runway, you can optionally select basic building blocks called Runway Modules to enhance your Runway pages. -

- - Included with Runway: Home page, Getting Started page, Installing Modules page.
- Optional Modules: Top Navigation, Sitemap, Contact, Gallery. -
+ + "Runway" is a simple website providing some basic document types and templates. The installer can set up Runway for you automatically, + but you can easily edit, extend or remove it. It's not necessary and you can perfectly use Umbraco without it. However, + Runway offers an easy foundation based on best practices to get you started faster than ever. + If you choose to install Runway, you can optionally select basic building blocks called Runway Modules to enhance your Runway pages. +

+ + Included with Runway: Home page, Getting Started page, Installing Modules page.
+ Optional Modules: Top Navigation, Sitemap, Contact, Gallery. +
]]>
What is Runway @@ -805,24 +805,24 @@ Step 5/5: Umbraco is ready to get you started Thank you for choosing Umbraco - Browse your new site + Browse your new site You installed Runway, so why not see how your new website looks.]]> - Further help and information + Further help and information Get help from our award winning community, browse the documentation or watch some free videos on how to build a simple site, how to use packages and a quick guide to the Umbraco terminology]]> Umbraco %0% is installed and ready for use - /web.config file and update the AppSetting key UmbracoConfigurationStatus in the bottom to the value of '%0%'.]]> - started instantly by clicking the "Launch Umbraco" button below.
If you are new to Umbraco, + started instantly by clicking the "Launch Umbraco" button below.
If you are new to Umbraco, you can find plenty of resources on our getting started pages.]]>
- Launch Umbraco + Launch Umbraco To manage your website, simply open the Umbraco back office and start adding content, updating the templates and stylesheets or add new functionality]]> Connection to database failed. @@ -830,8 +830,8 @@ To manage your website, simply open the Umbraco back office and start adding con Umbraco Version 4 Watch - Umbraco %0% for a fresh install or upgrading from version 3.0. -

+ Umbraco %0% for a fresh install or upgrading from version 3.0. +

Press "next" to start the wizard.]]>
@@ -889,47 +889,47 @@ To manage your website, simply open the Umbraco back office and start adding con Edit your notification for %0% - - Hi %0%

- -

This is an automated mail to inform you that the task '%1%' - has been performed on the page '%2%' - by the user '%3%' -

-
-
-      EDIT        -
-
-

-

Update summary:

- - %6% -
-

- -
-
-      EDIT        -
-
- -

Have a nice day!

- Cheers from the Umbraco robot + Hi %0%

+ +

This is an automated mail to inform you that the task '%1%' + has been performed on the page '%2%' + by the user '%3%' +

+
+
+      EDIT        +
+
+

+

Update summary:

+ + %6% +
+

+ +
+
+      EDIT        +
+
+ +

Have a nice day!

+ Cheers from the Umbraco robot

]]>
[%0%] Notification about %1% performed on %2% @@ -937,9 +937,9 @@ To manage your website, simply open the Umbraco back office and start adding con - - button and locating the package. Umbraco packages usually have a ".umb" or ".zip" extension. + + button and locating the package. Umbraco packages usually have a ".umb" or ".zip" extension. ]]> Drop to upload @@ -982,7 +982,7 @@ To manage your website, simply open the Umbraco back office and start adding con Package name Package doesn't contain any items -
+
You can safely remove this from the system by clicking "uninstall package" below.]]>
No upgrades available @@ -994,8 +994,8 @@ To manage your website, simply open the Umbraco back office and start adding con The package was successfully uninstalled Uninstall package - - Notice: any documents, media etc depending on the items you remove, will stop working, and could lead to system instability, + + Notice: any documents, media etc depending on the items you remove, will stop working, and could lead to system instability, so uninstall with caution. If in doubt, contact the package author.]]> Download update from the repository @@ -1042,28 +1042,28 @@ To manage your website, simply open the Umbraco back office and start adding con - - - - - Include unpublished subpages @@ -1073,13 +1073,18 @@ To manage your website, simply open the Umbraco back office and start adding con %0% and subpages have been published Publish %0% and all its subpages - Publish to publish %0% and thereby making its content publicly available.

- You can publish this page and all its subpages by checking Include unpublished subpages below. + Publish to publish %0% and thereby making its content publicly available.

+ You can publish this page and all its subpages by checking Include unpublished subpages below. ]]>
You have not configured any approved colours + + + You have picked a media item currently deleted or in the recycle bin + You have picked media items currently deleted or in the recycle bin + Deleted item enter external link diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml index 93a0582c92..2ba7bf44f6 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml @@ -1079,6 +1079,11 @@ To manage your website, simply open the Umbraco back office and start adding con You have not configured any approved colors + + You have picked a media item currently deleted or in the recycle bin + You have picked media items currently deleted or in the recycle bin + Deleted item + enter external link choose internal page diff --git a/src/Umbraco.Web/Models/ContentEditing/EntityBasic.cs b/src/Umbraco.Web/Models/ContentEditing/EntityBasic.cs index 9f6e5b28da..12afceea05 100644 --- a/src/Umbraco.Web/Models/ContentEditing/EntityBasic.cs +++ b/src/Umbraco.Web/Models/ContentEditing/EntityBasic.cs @@ -2,10 +2,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; -using System.Linq; using System.Runtime.Serialization; -using System.Text; -using System.Threading.Tasks; using Newtonsoft.Json; using Umbraco.Core; using Umbraco.Core.Models.Validation; diff --git a/src/Umbraco.Web/Models/Mapping/EntityModelMapper.cs b/src/Umbraco.Web/Models/Mapping/EntityModelMapper.cs index 273dbd34f3..ec72c9839d 100644 --- a/src/Umbraco.Web/Models/Mapping/EntityModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/EntityModelMapper.cs @@ -6,7 +6,6 @@ using Examine; using Examine.LuceneEngine.Providers; using Umbraco.Core; using Umbraco.Core.Models; -using Umbraco.Core.Models.EntityBase; using Umbraco.Core.Models.Mapping; using Umbraco.Core.Models.Membership; using Umbraco.Web.Models.ContentEditing; @@ -21,7 +20,7 @@ namespace Umbraco.Web.Models.Mapping config.CreateMap() .ForMember(x => x.Udi, expression => expression.MapFrom(x => Udi.Create(UmbracoObjectTypesExtensions.GetUdiType(x.NodeObjectTypeId), x.Key))) .ForMember(basic => basic.Icon, expression => expression.MapFrom(entity => entity.ContentTypeIcon)) - .ForMember(dto => dto.Trashed, expression => expression.Ignore()) + .ForMember(dto => dto.Trashed, expression => expression.MapFrom(x => x.Trashed)) .ForMember(x => x.Alias, expression => expression.Ignore()) .AfterMap((entity, basic) => { @@ -98,8 +97,8 @@ namespace Umbraco.Web.Models.Mapping else if (entity.NodeObjectTypeId == Constants.ObjectTypes.TemplateTypeGuid) basic.Icon = "icon-newspaper-alt"; } - }); - + }); + config.CreateMap() //default to document icon .ForMember(x => x.Score, expression => expression.MapFrom(result => result.Score)) From ca57b9c5e69e24cc61929bfe572a51d14a893ce9 Mon Sep 17 00:00:00 2001 From: Shannon Date: Fri, 13 Oct 2017 16:50:39 +1100 Subject: [PATCH 2/2] fixes issue with js exceptions --- .../propertyeditors/mediapicker/mediapicker.controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js index 28e034bdaf..70ac49fb7a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js @@ -63,7 +63,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl _.each(medias, function(media, i) { // if there is no thumbnail, try getting one if the media is not a placeholder item - if (!media.thumbnail && media.id) { + if (!media.thumbnail && media.id && media.metaData) { media.thumbnail = mediaHelper.resolveFileFromEntity(media, true); } @@ -108,7 +108,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl _.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) { + if (!media.thumbnail && media.id && media.metaData) { media.thumbnail = mediaHelper.resolveFileFromEntity(media, true); }