Commit 875b7195 authored by Dmitrii Metelkin's avatar Dmitrii Metelkin Committed by Aaron Wells

Bug 1591760: fix incorrect "Move to undefined" link

behatnotneeded

Change-Id: I97461c495555550e51790176296fd6b18dbf0aa9
(cherry picked from commit f802140f)
parent a5f46a4d
......@@ -536,16 +536,18 @@ function FileBrowser(idprefix, folderid, config, globalconfig) {
var elemid = title.attr('id').replace(/^changefolder:/, '');
if (elemid != moveid) {
var displaytitle = title.find('.display-title').html();
var link = $j('<a>').attr('href', '#').html(get_string('moveto', displaytitle));
link.on('click keydown', function(e) {
if ((e.type === 'click' || e.keyCode === 32) && !e.isDefaultPrevented()) {
self.setfocus = 'changefolder:' + elemid;
self.move_to_folder(moveid, elemid);
self.move_list = null;
e.preventDefault();
}
});
ul.append($j('<li><span class="icon icon-long-arrow-right left"></span>').append(link));
if (typeof displaytitle !== 'undefined') {
var link = $j('<a>').attr('href', '#').html(get_string('moveto', displaytitle));
link.on('click keydown', function(e) {
if ((e.type === 'click' || e.keyCode === 32) && !e.isDefaultPrevented()) {
self.setfocus = 'changefolder:' + elemid;
self.move_to_folder(moveid, elemid);
self.move_list = null;
e.preventDefault();
}
});
ul.append($j('<li><span class="icon icon-long-arrow-right left"></span>').append(link));
}
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment