X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2f06f0e4d5b9ef371463c65dd5cae19f5b385a17..74fec3cd8284eae4829dad2c287588d52c621c4b:/apps/workbench/app/assets/javascripts/edit_collection.js diff --git a/apps/workbench/app/assets/javascripts/edit_collection.js b/apps/workbench/app/assets/javascripts/edit_collection.js index ba0e82c154..9220ac3c54 100644 --- a/apps/workbench/app/assets/javascripts/edit_collection.js +++ b/apps/workbench/app/assets/javascripts/edit_collection.js @@ -1,11 +1,14 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // On loading of a collection, enable the "lock" button and // disable all file modification controls (upload, rename, delete) $(document). ready(function(event) { - $(".btn-collection-file-rename").addClass("disabled"); - $(".btn-collection-file-rename").attr("title", "Unlock collection to rename file"); - $(".btn-collection-file-remove").addClass("disabled"); - $(".btn-collection-file-remove").attr("title", "Unlock collection to remove file"); + $(".btn-collection-file-control").addClass("disabled"); + $(".btn-collection-rename-file-span").attr("title", "Unlock collection to rename file"); + $(".btn-collection-remove-file-span").attr("title", "Unlock collection to remove file"); $(".btn-remove-selected-files").attr("title", "Unlock collection to remove selected files"); $(".tab-pane-Upload").addClass("disabled"); $(".tab-pane-Upload").attr("title", "Unlock collection to upload files"); @@ -20,10 +23,9 @@ $(document). $(".lock-collection-btn").removeClass("fa-lock"); $(".lock-collection-btn").addClass("fa-unlock"); $(".lock-collection-btn").attr("title", "Lock collection to prevent editing files"); - $(".btn-collection-file-rename").removeClass("disabled"); - $(".btn-collection-file-rename").attr("data-original-title", "Edit name or path or both for this file"); - $(".btn-collection-file-remove").removeClass("disabled"); - $(".btn-collection-file-remove").attr("data-original-title", "Remove this file"); + $(".btn-collection-rename-file-span").attr("title", ""); + $(".btn-collection-remove-file-span").attr("title", ""); + $(".btn-collection-file-control").removeClass("disabled"); $(".btn-remove-selected-files").attr("title", ""); $(".tab-pane-Upload").removeClass("disabled"); $(".tab-pane-Upload").attr("data-original-title", ""); @@ -36,10 +38,9 @@ $(document). $(".lock-collection-btn").removeClass("fa-unlock"); $(".lock-collection-btn").addClass("fa-lock"); $(".lock-collection-btn").attr("title", "Unlock collection to edit files"); - $(".btn-collection-file-rename").addClass("disabled"); - $(".btn-collection-file-rename").attr("data-original-title", "Unlock collection to rename file"); - $(".btn-collection-file-remove").addClass("disabled"); - $(".btn-collection-file-remove").attr("data-original-title", "Unlock collection to remove file"); + $(".btn-collection-rename-file-span").attr("title", "Unlock collection to rename file"); + $(".btn-collection-remove-file-span").attr("title", "Unlock collection to remove file"); + $(".btn-collection-file-control").addClass("disabled"); $(".btn-remove-selected-files").attr("title", "Unlock collection to remove selected files"); $(".tab-pane-Upload").addClass("disabled"); $(".tab-pane-Upload").attr("data-original-title", "Unlock collection to upload files");