fixes #5978 by moving the select button to the top of the media picker window and hides the save button untill some image is selected

This commit is contained in:
mkinawy 2015-11-20 21:08:10 +02:00
parent a02e6e8ab7
commit 4db088fb9c
2 changed files with 6 additions and 1 deletions

View File

@ -14,6 +14,7 @@
var promptOnNavigate = element.data("prompt-on-navigate");
var showSaveWarning = element.data("show-save-warning");
var addButton = element.find(".button.add");
var saveButton = $('.button.save');
var removeAllButton = element.find(".button.remove");
var template =
'<li><div data-id="{contentItemId}" class="media-library-picker-item"><div class="thumbnail">{thumbnail}<div class="overlay"><h3>{title}</h3></div></div></div><a href="#" data-id="{contentItemId}" class="media-library-picker-remove">' + removeText + '</a>' + pipe + '<a href="{editLink}?ReturnUrl=' + returnUrl + '">' + editText + '</a></li>';
@ -28,10 +29,12 @@
var itemsCount = element.find(".media-library-picker-item").length;
if(!multiple && itemsCount > 0) {
addButton.hide();
addButton.hide();
saveButton.show();
}
else {
addButton.show();
saveButton.hide();
}
if(itemsCount > 1) {

View File

@ -6,6 +6,8 @@
.media-library-modal-window #media-library-main-selection-select {
display: inherit;
position: absolute;
top: 25px;
}
.media-library-modal-window #main {