X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/29487f418ff010e6ed536bc0a4d52997c1d0cd4f..83561af02e156758b09ea771510ad4f9ee506b06:/apps/workbench/app/assets/javascripts/selection.js diff --git a/apps/workbench/app/assets/javascripts/selection.js b/apps/workbench/app/assets/javascripts/selection.js index 59f0fd184f..a313c8b78e 100644 --- a/apps/workbench/app/assets/javascripts/selection.js +++ b/apps/workbench/app/assets/javascripts/selection.js @@ -57,8 +57,10 @@ jQuery(function($){ $("#persistent-selection-count").text(lst.length); if (lst.length > 0) { html = '
  • Clear selections
  • '; - if (this_object_uuid.match('-j7d0g-')) - html += '
  • '; + if (this_object_uuid.match('-j7d0g-')) { + html += '
  • '; + html += '
  • '; + } html += '
  • ' @@ -184,6 +186,9 @@ function dispatch_selection_action() { var data = []; var param_name = $(this).attr('data-selection-param-name'); var href = $(this).attr('data-href'); + if ($(this).closest('.disabled').length > 0) { + return false; + } $('.persistent-selection:checkbox:checked').each(function() { data.push({name: param_name, value: $(this).val()}); }); @@ -200,8 +205,8 @@ function enable_disable_selection_actions() { var $checked = $('.persistent-selection:checkbox:checked'); $('[data-selection-action]'). closest('div.btn-group-sm'). - find('*'). - prop('disabled', ($checked.length == 0)); + find('ul li'). + toggleClass('disabled', ($checked.length == 0)); $('[data-selection-action=compare]'). closest('li'). toggleClass('disabled',