Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit a9b6d31

Browse files
author
Charles Marion
committed
ENH: 0009633: Upload: "Current selected location" should be the full path: community/foo/bar
1 parent 89807aa commit a9b6d31

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

core/public/js/browse/browse.movecopy.js

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,31 @@
1616
var ajaxSelectRequest='';
1717
function callbackSelect(node)
1818
{
19+
var selectedElement = node.find('span:last').html();
20+
21+
var parent = true;
22+
var current = node;
23+
24+
while(parent != null)
25+
{
26+
parent = null;
27+
var classNames = current[0].className.split(' ');
28+
for(key in classNames)
29+
{
30+
if(classNames[key].match("child-of-"))
31+
{
32+
parent = $("#" + classNames[key].substring(9));
33+
}
34+
}
35+
if(parent != null)
36+
{
37+
selectedElement = parent.find('span:last').html()+'/'+selectedElement;
38+
current = parent;
39+
}
40+
}
41+
1942
$('#selectedDestinationHidden').val(node.attr('element'));
20-
$('#selectedDestination').html(node.find('span:last').html());
43+
$('#selectedDestination').html(sliceFileName(selectedElement, 40));
2144
$('#selectElements').removeAttr('disabled');
2245
$('#copyElement').removeAttr('disabled');
2346
$('#moveElements').removeAttr('disabled');

0 commit comments

Comments
 (0)