aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/static/js/wiki/move.js
blob: 948917f64adbad1108d83b0518646c618994a9cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
$('#id_destination').after($('#dest_selector').remove());
$('#id_destination').attr('type', 'hidden');
$('#id_slug').val('{{ urlpath.slug }}');
select_path('{{urlpath.parent.pk}}', '{{urlpath.parent}}');

function select_path(path, title) {
  $('#id_destination').val(path);
  if (title == "(root)") title = "";
  $('#dest_selector .dest_selector_title').html(title ? title : "  /  ");
}