3 <title>WikiCommander</title>
5 - you need a frames-capable browser (then-ex-lynx-fans should try w3m!)
6 - eventually becomes a real alternative to ewikictl
8 <link rel="stylesheet" type="text/css" href="80x25.css">
9 <script type="text/javascript" language="JavaScript"><!--
13 var id = ""; // selected page id
14 var ls = new Array(); // list of selected pages (if ctrl key pressed)
15 var left_off = 0; // state/disable flag for left/editor pane
18 function delete_page() {
20 ok = confirm("Really delete all versions of '"+id+"' page ?");
22 window.page.location.href = 'action.php?id='+escape(id)+'&delete=1';
26 ok = confirm("Hey, what have those poor pages done to you?\n\n..."
28 + "\n\nClick OK if you really want to delete them, but keep in "
29 + "mind, that there is no way to restore them later."
32 window.page.location.href = 'action.php?delete=1'
33 + get_ls_param("&ls[]=");
38 function rename_page() {
40 into = prompt("Rename page '"+id+"' into what?", id);
42 window.page.location.href='action.php?id='+escape(id)
43 + '&new_id='+escape(into)+"&rename=1";
47 alert("Sorry, we cannot rename multiple pages at once. Use ewikictl for such tasks.");
52 function copy_page() {
54 into = prompt("Duplicate page '"+id+"' (all versions, overwrites target) as", id);
56 window.page.location.href='action.php?id='+escape(id)
57 + '&new_id='+escape(into)+"©=1";
61 alert("Can only copy one page at a time.");
70 id = prompt("Load new database entry page template in editor", id);
72 window.page.location.href='edit.php?create=1&id='+escape(id);
77 function show_filtered_list() {
78 fn = prompt("Filter page names in list (case-insensitive) after", "*");
79 window.list.location.href='list.php?filter='+escape(fn);
85 // - - - ui behaviour - - -
87 function select_id(e, tr, newid) {
94 ls[newid] = undefined;
95 tr.removeAttribute("class");
99 tr.setAttribute("class", "selected");
101 return false; // do never reload left window
106 if (document.getElementById) {
107 remove_class_settings("tr", tr);
108 tr.setAttribute("class", "selected");
114 function click_magic(e) {
115 // how to disable selection borders?
116 return (!left_off && !e.ctrlKey);
120 // select multiple rows in right pane by glob
121 function list_selection() {
122 var i, name, glob, a_list;
127 glob = prompt("Filter regex (not case-insensitive, not anchored!) to select files in right pane by", ".*");
128 if (glob = new RegExp(glob)) {
129 a_list = list.document.getElementsByTagName("a");
130 for (i=0; i<a_list.length; i++) {
131 name = a_list[i].firstChild.data;
132 if (glob.test(name)) {
134 a_list[i].parentNode.parentNode.setAttribute("class", "selected");
141 function remove_class_settings(tagname, butnot) {
144 ch = list.document.getElementsByTagName(tagname);
145 for (i=0; i<ch.length; i++) {
146 if (ch[i].getAttribute("class") && (ch[i] != butnot)) {
147 ch[i].removeAttribute("class");
154 function get_ls_param(sep) {
161 str = str + sep + escape(id);
171 <frameset rows="22,*,24,22" frameborder="0" style="border:0px">
172 <frame name="menu" title="FileMenu" src="filemenu.php" height="22" noresize scrolling="no" frameborder="0" marginwidth="0" marginheight="0">
173 <frameset name="panel" cols="50%,50%" border="10" frameborder="1">
174 <frame name="page" title="PageDetails" src="info.php" width="50%" frameborder="1" scrolling="auto" marginwidth="0" marginheight="0">
175 <frame name="list" title="PageList" src="list.php" width="50%" frameborder="1" scrolling="yes" marginwidth="0" marginheight="0">
177 <frame style="border:0px;margin:0px;" name="line" title="CommandLine" src="commandline.php" height="24" noresize frameborder="0" scrolling="no" marginwidth="0" marginheight="0">
178 <frame style="border:0px;margin:0px;" name="keys" title="KeyMenu" src="keymenu.php" height="22" noresize frameborder="0" scrolling="no" marginwidth="0" marginheight="0">
181 Go to our <a href="list.php">PageList</a> to use this tool.
182 But you were better off using a frames-capable browser (try the text-only
183 <a href="http://google.com/search?q=w3m">w3m</a> today)!