moodle/lib/editor/popups/link.html
moodler a87491c1d0 Many updates from Janne.
I've done a basic review and fixed a few things, but there will need
to be a lot more testing and cleanup over this weekend.
2004-02-21 05:49:31 +00:00

222 lines
6.0 KiB
HTML
Raw Blame History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>testaus</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" src="popup.js"></script>
<script language="JavaScript" type="text/javascript">
window.resizeTo(700, 460);
//I18N = window.opener.HTMLArea.I18N.dialogs;
// function i18n(str) {
// return (I18N[str] || str);
// };
function onTargetChanged() {
var f = document.getElementById("f_other_target");
if (this.value == "_other") {
f.style.visibility = "visible";
f.select();
f.focus();
} else f.style.visibility = "hidden";
};
function Init() {
//__dlg_translate(I18N);
__dlg_init();
var param = window.dialogArguments;
var target_select = document.getElementById("f_target");
if (param) {
document.getElementById("f_href").value = param["f_href"];
document.getElementById("f_title").value = param["f_title"];
comboSelectValue(target_select, param["f_target"]);
if (target_select.value != param.f_target) {
var opt = document.createElement("option");
opt.value = param.f_target;
opt.innerHTML = opt.value;
target_select.appendChild(opt);
opt.selected = true;
}
}
var opt = document.createElement("option");
opt.value = "_other";
opt.innerHTML = "muu";
target_select.appendChild(opt);
target_select.onchange = onTargetChanged;
document.getElementById("f_href").focus();
window.focus();
document.getElementById("f_href").select();
};
function onOK() {
var required = {
"f_href": alert("You must enter the URL where this link points to")
};
for (var i in required) {
var el = document.getElementById(i);
if (!el.value) {
alert(required[i]);
el.focus();
return false;
}
}
// pass data back to the calling window
var fields = ["f_href", "f_title", "f_target" ];
var param = new Object();
for (var i in fields) {
var id = fields[i];
var el = document.getElementById(id);
param[id] = el.value;
}
if (param.f_target == "_other")
param.f_target = document.getElementById("f_other_target").value;
__dlg_close(param);
return false;
};
function onCancel() {
__dlg_close(null);
return false;
};
function indexFrom() {
var set_url = document.getElementById('findex');
var url = set_url.value;
window.fbrowser.location.replace(url);
var resetme = document.forms['mainform'];
resetme.fcreated.value = "";
resetme.ftype.value = "";
resetme.fsize.value = "";
return false;
};
</script>
<style type="text/css">
html, body {
width: 700;
height: 460;
background-color: rgb(212,208,200);
}
.title {
background-color: #ddddff;
padding: 5px;
border-bottom: 1px solid black;
font-family: Tahoma, sans-serif;
font-weight: bold;
font-size: 14px;
color: black;
}
input,select {
font-family: Tahoma, sans-serif;
font-size: 11px;
}
legend {
font-family: Tahoma, sans-serif;
font-size: 11px;
}
p {
margin-left: 10px;
background-color: transparent;
font-family: Tahoma, sans-serif;
font-size: 11px;
color: black;
}
td {
font-family: Tahoma, sans-serif;
font-size: 11px;
}
button {
width: 70px;
font-family: Tahoma, sans-serif;
font-size: 11px;
}
#fcreated,#ftype,#fsize {
background-color: rgb(212,208,200);
border: none;
font-family: Tahoma, sans-serif;
font-size: 11px;
color: black;
}
.space { padding: 2px; }
</style>
</head>
<body onload="Init()">
<div class="title">Lis<EFBFBD><EFBFBD> linkki</div>
<table width="660" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="380" valign="top"><fieldset>
<legend>Tiedosto selain</legend>
<div class="space"></div>
<iframe id="fbrowser" name="fbrowser" src="../coursefiles.php" width="360" height="260"></iframe>
<p>
<form id="uploader" name="uploader" enctype="multipart/form-data" method="post" action="browser.php" target="fbrowser">
<input type="hidden" name="MAX_FILE_SIZE" value="2097152">
<input type="hidden" name="a" value="s">
<input id="dir" type="hidden" name="dir" value="none">
<input id="fiilu" type="file" name="fiilu" size="35">&nbsp;
<input type="submit" name="subval" value="Lataa tiedosto">
</form></p>
<div class="space"></div>
</fieldset>&nbsp;</td>
<td width="300" valign="top">
<form name="mainform">
<fieldset>
<legend>Tiedoston ominaisuudet</legend>
<div class="space"></div>
<table width="298" border="0">
<tr>
<td width="35" align="right">Luotu:</td>
<td align="left"><input id="fcreated" type="text" name="fcreated" size="40"></td>
</tr>
<tr>
<td width="35" align="right">Tyyppi:</td>
<td align="left"><input id="ftype" type="text" name="ftype" size="40"></td>
</tr>
<tr>
<td width="35" align="right">Koko:</td>
<td align="left"><input id="fsize" type="text" name="fsize" size="40"></td>
</tr>
</table>
<br>
</fieldset>
<fieldset><legend>Linkin ominaisuudet</legend>
<br>
<table width="82%">
<tr>
<td width="35" align="right">Osoite:</td>
<td><input id="f_href" type="text" name="url" size="40"></td>
</tr>
<tr>
<td width="35" align="right">Otsikko:</td>
<td><input id="f_title" type="text" name="f_title" size="40"></td>
</tr>
<tr>
<td width="35" align="right">Kohde:</td>
<td><select id="f_target" name="f_target">
<option value="">None (use implicit)</option>
<option value="_blank">Uuteen ikkunaan (_blank)</option>
<option value="_self">Samaan kehykseen (_self)</option>
<option value="_top">Yl<EFBFBD> kehykseen (_top)</option>
</select></td>
</tr>
</table>
<div class="space"></div>
<table width="78%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="right" valign="middle"><button name="btnOk" onclick="return onOK();">OK</button>&nbsp;
<button name="btnCancel" onclick="return onCancel();">Peruuta</button></td>
</tr>
</table>
<div class="space"></div>
</fieldset>
</form>
</td>
</tr>
</table>
<p>&nbsp;</p>
</body>
</html>