119 lines
2.7 KiB
HTML
Executable File
119 lines
2.7 KiB
HTML
Executable File
<html style="width: 398; height: 218">
|
|
|
|
<head>
|
|
<title>Insert Link</title>
|
|
|
|
<script type="text/javascript" src="popup.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
function Init() {
|
|
__dlg_init();
|
|
document.getElementById("f_url").focus();
|
|
};
|
|
|
|
|
|
function onOK() {
|
|
var required = {
|
|
"f_url": "You must enter the URL"
|
|
};
|
|
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_url"];
|
|
var param = new Object();
|
|
for (var i in fields) {
|
|
var id = fields[i];
|
|
var el = document.getElementById(id);
|
|
param[id] = encodeURI(el.value);
|
|
}
|
|
__dlg_close(param);
|
|
return false;
|
|
}
|
|
|
|
function onCancel() {
|
|
__dlg_close(null);
|
|
return false;
|
|
};
|
|
|
|
function onBrowse(){
|
|
baseURL = opener.location.pathname;
|
|
offset = baseURL.lastIndexOf("/");
|
|
destURL = baseURL.slice(0, offset+1) + "search.jsp?useURL=true&widget=getElementById('f_url')";
|
|
aWindow = window.open(destURL,
|
|
"search",
|
|
"toolbar=no,width=800,height=600,status=no,scrollbars=yes,resize=yes,menubar=no");
|
|
return false;
|
|
}
|
|
|
|
</script>
|
|
|
|
<style type="text/css">
|
|
html, body {
|
|
background: ButtonFace;
|
|
color: ButtonText;
|
|
font: 11px Tahoma,Verdana,sans-serif;
|
|
margin: 0px;
|
|
padding: 0px;
|
|
}
|
|
body { padding: 5px; }
|
|
table {
|
|
font: 11px Tahoma,Verdana,sans-serif;
|
|
}
|
|
form p {
|
|
margin-top: 5px;
|
|
margin-bottom: 5px;
|
|
}
|
|
.fl { width: 9em; float: left; padding: 2px 5px; text-align: right; }
|
|
.fr { width: 6em; float: left; padding: 2px 5px; text-align: right; }
|
|
fieldset { padding: 0px 10px 5px 5px; }
|
|
select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
|
|
button { width: 70px; }
|
|
.space { padding: 2px; }
|
|
|
|
.title { background: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px;
|
|
border-bottom: 1px solid black; letter-spacing: 2px;
|
|
}
|
|
form { padding: 0px; margin: 0px; }
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body onload="Init()">
|
|
|
|
<div class="title">Insert Link</div>
|
|
|
|
<form action="" method="get" name="linksForm">
|
|
<table border="0" width="100%" style="padding: 0px; margin: 0px">
|
|
<tbody>
|
|
|
|
<tr>
|
|
<td style="width: 7em; text-align: right">Link URL:</td>
|
|
<td><input type="text" name="urlField" id="f_url" style="width:75%"
|
|
title="Enter the link URL here" />
|
|
<button name="browse" onclick="return onBrowse();"
|
|
title="Browse for a content item">Browse</button>
|
|
</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
<p />
|
|
|
|
<div style="margin-top: 20px; text-align: right;">
|
|
<hr />
|
|
<button type="button" name="ok" onclick="return onOK();">OK</button>
|
|
<button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</body>
|
|
</html>
|