This repository has been archived on 2025-05-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
qemudb/xinha/examples/Extended.html

220 lines
8.0 KiB
HTML
Raw Normal View History

<html>
<head>
<title>Settings</title>
<link rel="stylesheet" type="text/css" href="../popups/popup.css" />
<script type="text/javascript">
function getAbsolutePos(el) {
var r = { x: el.offsetLeft, y: el.offsetTop };
if (el.offsetParent) {
var tmp = getAbsolutePos(el.offsetParent);
r.x += tmp.x;
r.y += tmp.y;
}
return r;
};
function comboSelectValue(c, val) {
var ops = c.getElementsByTagName("option");
for (var i = ops.length; --i >= 0;) {
var op = ops[i];
op.selected = (op.value == val);
}
c.value = val;
};
function __dlg_onclose() {
opener.Dialog._return(null);
};
// closes the dialog and passes the return info upper.
function __dlg_close(val) {
opener.Dialog._return(val);
window.close();
};
function __dlg_close_on_esc(ev) {
ev || (ev = window.event);
if (ev.keyCode == 27) {
window.close();
return false;
}
return true;
};
function __dlg_init(bottom) {
var body = document.body;
var body_height = 0;
if (typeof bottom == "undefined") {
var div = document.createElement("div");
body.appendChild(div);
var pos = getAbsolutePos(div);
body_height = pos.y;
} else {
var pos = getAbsolutePos(bottom);
body_height = pos.y + bottom.offsetHeight;
}
window.dialogArguments = opener.Dialog._arguments;
if (!document.all) {
window.sizeToContent();
window.sizeToContent(); // for reasons beyond understanding,
// only if we call it twice we get the
// correct size.
window.addEventListener("unload", __dlg_onclose, true);
window.innerWidth = body.offsetWidth + 5;
window.innerHeight = body_height + 2;
// center on parent
var x = opener.screenX + (opener.outerWidth - window.outerWidth) / 2;
var y = opener.screenY + (opener.outerHeight - window.outerHeight) / 2;
window.moveTo(x, y);
} else {
// window.dialogHeight = body.offsetHeight + 50 + "px";
// window.dialogWidth = body.offsetWidth + "px";
window.resizeTo(body.offsetWidth, body_height);
var ch = body.clientHeight;
var cw = body.clientWidth;
window.resizeBy(body.offsetWidth - cw, body_height - ch);
var W = body.offsetWidth;
var H = 2 * body_height - ch;
var x = (screen.availWidth - W) / 2;
var y = (screen.availHeight - H) / 2;
window.moveTo(x, y);
}
document.body.onkeypress = __dlg_close_on_esc;
};
function Init() {
__dlg_init();
var param = window.dialogArguments;
if (param) {
document.getElementById("width").value = param["width"];
document.getElementById("height").value = param["height"];
document.getElementById("sizeIncludesBars").checked = (param["sizeIncludesBars"] == 'true');
document.getElementById("statusBar").checked = (param["statusBar"] == 'true');
document.getElementById("mozParaHandler").value = param["mozParaHandler"];
document.getElementById("undoSteps").value = param["undoSteps"];
document.getElementById("baseHref").value = param["baseHref"];
document.getElementById("stripBaseHref").checked = (param["stripBaseHref"] == 'true');
document.getElementById("stripSelfNamedAnchors").checked = (param["stripSelfNamedAnchors"] == 'true');
document.getElementById("only7BitPrintablesInURLs").checked = (param["only7BitPrintablesInURLs"] == 'true');
document.getElementById("sevenBitClean").checked = (param["sevenBitClean"] == 'true');
document.getElementById("killWordOnPaste").checked = (param["killWordOnPaste"] == 'true');
document.getElementById("flowToolbars").checked = (param["flowToolbars"] == 'true');
document.getElementById("CharacterMapMode").value = param["CharacterMapMode"];
document.getElementById("ListTypeMode").value = param["ListTypeMode"];
}
document.getElementById("width").focus();
window.resizeTo(420, 500);
};
function onOK() {
// pass data back to the calling window
var param = { width: document.getElementById("width").value,
height: document.getElementById("height").value,
sizeIncludesBars: (document.getElementById("sizeIncludesBars").checked?true:""),
statusBar: (document.getElementById("statusBar").checked?true:""),
mozParaHandler: document.getElementById("mozParaHandler").value,
undoSteps: document.getElementById("undoSteps").value,
baseHref: document.getElementById("baseHref").value,
stripBaseHref: (document.getElementById("stripBaseHref").checked?true:""),
stripSelfNamedAnchors: (document.getElementById("stripSelfNamedAnchors").checked?true:""),
only7BitPrintablesInURLs: (document.getElementById("only7BitPrintablesInURLs").checked?true:""),
sevenBitClean: (document.getElementById("sevenBitClean").checked?true:""),
killWordOnPaste: (document.getElementById("killWordOnPaste").checked?true:""),
flowToolbars: (document.getElementById("flowToolbars").checked?true:""),
CharacterMapMode: document.getElementById("CharacterMapMode").value,
ListTypeOptions: document.getElementById("ListTypeMode").value
};
__dlg_close(param);
return false;
};
function onCancel() {
__dlg_close(null);
return false;
};
</script>
<style type="text/css">
.fr { width: 16em; float: left; padding: 2px 5px; text-align: right; }
</style>
</head>
<body class="dialog" onload="Init()">
<div class="title">Settings</div>
<form action="" method="get">
<div class="fr">Editor width:</div>
<input type="text" name="width" id="width" title="" />
<p />
<div class="fr">Editor height:</div>
<input type="text" name="height" id="height" title="" />
<p />
<div class="fr">Size includes bars</div>
<input type="checkbox" name="sizeIncludesBars" id="sizeIncludesBars" />
<p />
<div class="fr">Status Bar</div>
<input type="checkbox" name="statusBar" id="statusBar" />
<p />
<div class="fr">Mozilla Parameter Handler:</div>
<select name="mozParaHandler" id="mozParaHandler">
<option value="built-in">built-in</option>
<option value="dirty">dirty</option>
<option value="best">best</option>
</select>
<div class="space"></div>
<div class="fr">Undo steps:</div>
<input type="text" name="undoSteps" id="undoSteps" title="" />
<p />
<div class="fr">Base href:</div>
<input type="text" name="baseHref" id="baseHref" title="" />
<p />
<div class="fr">Strip base href</div>
<input type="checkbox" name="stripBaseHref" id="stripBaseHref" />
<p />
<div class="fr">Strip self named anchors</div>
<input type="checkbox" name="stripSelfNamedAnchors" id="stripSelfNamedAnchors" />
<p />
<div class="fr">only 7bit printables in URLs</div>
<input type="checkbox" name="only7BitPrintablesInURLs" id="only7BitPrintablesInURLs" />
<p />
<div class="fr">7bit Clean</div>
<input type="checkbox" name="sevenBitClean" id="sevenBitClean" />
<p />
<div class="fr">kill Word on paste</div>
<input type="checkbox" name="killWordOnPaste" id="killWordOnPaste" />
<p />
<div class="fr">flow toolbars</div>
<input type="checkbox" name="flowToolbars" id="flowToolbars" />
<p />
<div id="CharacterMapOptions" class="options">
<hr size="0.5">
<div class="fr">CharacterMap mode :</div>
<select id="CharacterMapMode" name="CharacterMapMode">
<option value="popup">popup</option>
<option value="panel">panel</option>
</select>
</div>
<p />
<div id="ListTypeOptions" class="options">
<hr size="0.5">
<div class="fr">ListType mode :</div>
<select id="ListTypeMode" name="ListTypeMode">
<option value="toolbar">toolbar</option>
<option value="panel">panel</option>
</select>
</div>
<p />
<div id="buttons">
<button type="submit" name="ok" onclick="return onOK();">OK</button>
<button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
</div>
</form>
</body>
</html>