Fixed media library picker field script.

This fixes an issue where the code selecting the 'Save' button would match any button with the 'button.save' class.
The issue became apparent when working with Image element on a layout. The Element Editor Dialog also has a 'Save' button with the 'button save' class, en became hidden when no image was selected.
This commit is contained in:
Sipke Schoorstra
2015-12-20 16:37:57 +01:00
parent 68c94f4534
commit 8eef43f20d

View File

@@ -14,7 +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 saveButton = element.find('.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>';