396
396
return default_svn_nice;
399
/** Presents the text editor.
401
function handle_text(path, text, handler_type)
403
/* Create a textarea with the text in it
404
* (The makings of a primitive editor).
408
var files = document.getElementById("filesbody");
409
var div = document.createElement("div");
410
files.appendChild(div);
411
div.setAttribute("class", "padding");
412
/* First, print a warning message if this is not actually a text file.
414
if (handler_type != "text")
416
var warn = dom_make_text_elem("p",
417
"Warning: You are editing a binary " +
418
"file, which explains any strange characters you may see. If " +
419
"you save this file, you could corrupt it.");
420
div.appendChild(warn);
422
var txt_elem = dom_make_text_elem("textarea",
424
div.appendChild(txt_elem);
425
txt_elem.setAttribute("id", "editbox");
426
/* TODO: Make CSS height: 100% work */
427
txt_elem.setAttribute("rows", "20");
430
399
/** Displays a download link to the binary file.
432
401
function handle_binary(path)