21
21
savebutton.removeAttribute("disabled");
24
/** Presents the "editor heading" (the part with the save box)
25
* inserting it into a given element at the front.
24
/** Presents the "editor heading" inserting it into a given element at
25
* the front. Note that the save widget is handled by the Python.
27
27
function present_editorhead(elem, path, handler_type)
29
29
var div = document.getElementById("actions2");
31
/* Set up minimal interface */
32
var p = dom_make_text_elem("p", "Save as: ");
33
var pathname = document.createElement("input");
34
pathname.setAttribute("type", "text");
35
pathname.setAttribute("size", "30");
36
pathname.setAttribute("id", "save_filename");
37
pathname.setAttribute("value", path);
38
p.appendChild(pathname);
39
var savebutton = document.createElement("input");
40
savebutton.setAttribute("id", "save_button");
41
savebutton.setAttribute("type", "button");
42
savebutton.setAttribute("value", "Saved");
43
// XXX Do not disable for now; there is a problem getting the callback
45
//savebutton.setAttribute("disabled", "disabled");
46
savebutton.setAttribute("onclick", "save_file()");
47
p.appendChild(savebutton);
48
var t = document.createTextNode(" ");
52
31
/* Print a warning message if this is not actually a text file.
54
33
if (handler_type != "text")