HUE-8280 [fb] Move action button does not prevent move to itself

Review Request #12932 - Created May 3, 2018 and submitted

Roohi Syeda
hue
HUE-8253_query_dwld_non_ascii
HUE-8280
hue
enricoberti, jgauthier, johan, ranade, romain, weixia, yingc
commit ca2450609b5e658653de5d74bd012ddffe6fb8f8
Author: Roohi <roohisyeda@cloudera.com>
Date:   Thu May 3 12:43:48 2018 -0700

    HUE-8280 [fb] Move action button does not prevent move to itself

:100644 100644 df0331d994... e8922dc67b... M	apps/filebrowser/src/filebrowser/templates/listdir_components.mako
:100644 100644 0faaaa9bee... 79f19b52bf... M	apps/filebrowser/src/filebrowser/views.py
:100644 100644 97bfb783d0... e940807b9e... M	apps/filebrowser/src/filebrowser/views_test.py

Manually on chrome on HDFS & S3 Fb

  • 0
  • 0
  • 2
  • 0
  • 2
Description From Last Updated
  1. 
      
  2. apps/filebrowser/src/filebrowser/templates/listdir_components.mako (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     

    decalre isMoveOnSelf before?

    e.g.

    var isMoveOnSelf = false;
    $(viewModel.selectedFiles()).each(function (index, file) {
    if (file.path == $('#moveDestination').val()) {
    isMoveOnSelf = true;
    return;
    }

    });
    if (isMoveOnSelf) {
    $.jHueNotify.warn("${ _('You cannot copy a folder into itself.') }");
    $('#moveDestination').val('');
    return false;
    }

    or something like this:

    or doing a $.grep(viewModel.selectedFiles(), function(file) {
    return file.path == $('#moveDestination').val()
    }).length > 0

  3. 
      
  1. Nice!

  2. assert_equal(500

    ?

  3. 
      
Review request changed

Status: Closed (submitted)

Loading...