mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
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:
@@ -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>';
|
||||
|
Reference in New Issue
Block a user