diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/StorageListView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/StorageListView.js index 31e87a7fb99880d577d9f79be08f7ef72311e154..523739c7d6546d52a7cf8aa3d7ff000185983d8f 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/StorageListView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/StorageListView.js @@ -142,11 +142,24 @@ function StorageListView(storageListController, storageListModel) { _this.showStorageWidget(data.data['$object']) } } - - this._dataGrid = new DataGridController(null, columns, [], null, getDataList, rowClick, false, "STORAGE_WIDGET"); - + + // multi-select delete option + let isMultiselectable = false; + var extraOptions = []; + if(!this._storageListModel.isDisabled) { + isMultiselectable = true; + extraOptions.push({ name : "Delete selected", action : function(selected) { + for (let i=0; i<selected.length; i++) { + _this.removeChildFromSampleOrMarkToDelete(selected[i]); + } + _this._dataGrid.refresh(); + }}); + } + + this._dataGrid = new DataGridController(null, columns, [], null, getDataList, rowClick, false, "STORAGE_WIDGET", isMultiselectable); + var $dataGridContainer = $("<div>"); - this._dataGrid.init($dataGridContainer); + this._dataGrid.init($dataGridContainer, extraOptions); $container.append($dataGridContainer); var $storageAddButton = $("<a>", { class : 'btn btn-default', style : "float: right; background-color:#f9f9f9;" }).append($("<i>", { class : "glyphicon glyphicon-plus" } )); @@ -280,4 +293,4 @@ function StorageListView(storageListController, storageListModel) { } } -} \ No newline at end of file +}