mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
@@ -221,6 +221,12 @@ $(function () {
|
||||
});
|
||||
};
|
||||
|
||||
self.selectAll = function () {
|
||||
self.results().forEach(function (item) {
|
||||
viewModel.toggleSelect(item, true);
|
||||
});
|
||||
}
|
||||
|
||||
self.clearSelection = function() {
|
||||
this.focus(null);
|
||||
// unselect previous elements
|
||||
@@ -520,6 +526,10 @@ $(function () {
|
||||
pickAndClose();
|
||||
});
|
||||
|
||||
$("#media-library-toolbar > .button-select-all").on('click', function () {
|
||||
viewModel.selectAll();
|
||||
});
|
||||
|
||||
$("#media-library-main-list").on('dblclick', function () {
|
||||
pickAndClose();
|
||||
});
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
<a href="#" data-bind="attr: { href: '@HttpUtility.JavaScriptStringEncode(Url.Action("Create", "Folder", new { area = "Orchard.MediaLibrary"}))?folderPath=' + encodeURIComponent(displayed() ? displayed() : '') }" class="button" id="button-create-folder">@T("Create Folder")</a>
|
||||
|
||||
@Display(Model.CustomActionsShapes)
|
||||
<button class="button-select-all">@T("Select All")</button>
|
||||
</div>
|
||||
<div id="media-library-main">
|
||||
<div id="media-library-main-navigation">
|
||||
|
||||
Reference in New Issue
Block a user