Custom Tags
Reload
Save
Content from template
function init_readme( id ) {
var url, window_offset;
switch (id) {
case "win_readme": url = "README"; window_offset = 1; break;
case "win_readme1": url = "ui/README"; window_offset = 2; break;
case "win_readme2": url = "fm/README"; window_offset = 3; break;
}
$("#"+id).style.left = (window_offset * 40)+"px";
$("#"+id).style.top = (window_offset * 30)+"px";
//T//set_translate_xy( $("#"+id), window_offset*30 );
if (url != undefined) readme_load(id, url);
}
function readme_load( id, url ) {
AjaxGET(url, "text").then( function(text) {
const window = $('#' + id);
const content = window.$(".ui_content")[0];
window.$(".ui_window_title")[0].innerText = url;
pre = document.createElement("pre");
pre.innerText = text;
pre.setAttribute("contenteditable", "true");
pre.addEventListener("mouseover", function() {
if (! window.isBorderDragging) {
window.draggable = false;
}
}, BUBBLE_UP);
pre.addEventListener("mouseout", function() {
window.draggable = true;
}, BUBBLE_UP);
content.innerHTML = "";
content.appendChild(pre);
});
}