1 {include file="admin/_head.tpl" title="Choisir la page parent" current="wiki" body_id="popup" is_popup=true}
5 <input type="button" onclick="chooseParent();" value="Choisir la page sélectionnée" />
8 {display_tree tree=$list}
13 <script type="text/javascript">
15 window.chooseParent = function()
17 var elm = document.getElementsByClassName("current")[0].getElementsByTagName("a")[0];
19 if (match = elm.href.match(/=(\d+)$/))
21 var id = parseInt(match[1], 10);
22 var titre = (id == 0 ? 'la racine du site' : elm.innerHTML);
24 if (window.opener.changeParent(id, titre))
30 alert("Impossible de choisir la page comme parent d'elle-même !");
40 {include file="admin/_foot.tpl"}