mirror of
https://github.com/silverstripe/doc.silverstripe.org
synced 2024-10-22 17:05:50 +02:00
7ecbf49ac9
git-svn-id: http://svn.silverstripe.com/projects/ss2doc/branches/v2@117896 467b73ca-7a2a-4603-9d3b-597d59a354a9
36 lines
678 B
Scheme
Executable File
36 lines
678 B
Scheme
Executable File
<html>
|
|
<head>
|
|
<script>
|
|
function buttonClick(el) {
|
|
<% if Modal %>
|
|
window.returnValue = el.name;
|
|
window.close();
|
|
<% else %>
|
|
if(window.linkedObject) {
|
|
if(el.name) {
|
|
window.linkedObject.result = el.name;
|
|
|
|
} else {
|
|
throw("<% _t('BUTTONNOTFOUND', 'Couldn\'t find the button name') %>");
|
|
}
|
|
} else {
|
|
throw("<% _t('NOLINKED', 'Can\'t find window.linkedObject to send the button click back to the main window') %>");
|
|
}
|
|
window.close();
|
|
<% end_if %>
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<p>$Message</p>
|
|
|
|
<p style="align: center">
|
|
<% control Buttons %>
|
|
<input type="button" value="$Title" name="$Name" onclick="buttonClick(this);" />
|
|
<% end_control %>
|
|
</p>
|
|
|
|
</body>
|
|
</html> |