Skip to content

Commit 0bedf09

Browse files
author
perploug
committed
Fixes: U4-4609 v7.1 Media Picker datatype only allows selection of images not PDFs
1 parent 41ad18d commit 0bedf09

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

src/Umbraco.Web.UI.Client/src/common/directives/html/umbphotofolder.directive.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ angular.module("umbraco.directives.html")
2626

2727

2828
var imagesOnly = element.attr('images-only') === "true";
29+
30+
2931
var margin = element.attr('border') ? parseInt(element.attr('border'), 10) : 5;
3032
var startingIndex = element.attr('baseline') ? parseInt(element.attr('baseline'), 10) : 0;
3133
var minWidth = element.attr('min-width') ? parseInt(element.attr('min-width'), 10) : 420;

src/Umbraco.Web.UI.Client/src/common/services/util.service.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,10 @@ function umbPhotoFolderHelper($compile, $log, $timeout, $filter, imageHelper, me
259259

260260
//first fill in all of the original image sizes and URLs
261261
for (var i = startingIndex; i < images.length; i++) {
262-
var item = images[0];
262+
var item = images[i];
263263

264-
this.setImageData(images[i]);
265-
this.setOriginalSize(images[i], maxRowHeight);
264+
this.setImageData(item);
265+
this.setOriginalSize(item, maxRowHeight);
266266

267267
if(imagesOnly && !item.isFolder && !item.thumbnail){
268268
images.splice(i, 1);

src/Umbraco.Web.UI.Client/src/less/property-editors.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,8 @@ ul.color-picker li a {
398398

399399
.umb-photo-folder .umb-non-thumbnail i{
400400
color: @grayLight;
401-
font-size: 70px;
402-
line-height: 80px;
401+
font-size: 50px;
402+
line-height: 60px;
403403
display: block;
404404
margin: auto;
405405
padding-top: 20px;

src/Umbraco.Web.UI.Client/src/views/common/dialogs/mediapicker.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,14 @@
100100
<div class="umb-panel-body with-footer">
101101
<div style="height: 10px; margin: 10px 0px 10px 0px" class="umb-loader"
102102
ng-hide="active() == 0"></div>
103-
104103
<umb-photo-folder
105-
min-height="75"
104+
min-height="105"
106105
min-width="150"
107106
max-height="250"
108107
ideal-items-per-row="3"
109108
on-click="clickHandler"
110109
ng-model="images"
111-
images-only="true"
110+
images-only="{{onlyImages}}"
112111
filter-by="searchTerm"/>
113112
</div>
114113

src/Umbraco.Web.UI.Client/src/views/propertyeditors/folderbrowser/folderbrowser.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</umb-upload-dropzone>
2121

2222
<umb-photo-folder
23-
min-height="100"
23+
min-height="105"
2424
min-width="220"
2525
on-click="clickHandler"
2626
ng-model="images" />

0 commit comments

Comments
 (0)