wisemapping-open-source/wise-webapp/src/main/webapp/jsp/iframeWrapper.jsp

29 lines
973 B
Plaintext
Raw Normal View History

<!DOCTYPE HTML>
<%@ include file="/jsp/init.jsp" %>
<div>
<iframe src='${url}' style="border: 0;width: 100%;height:100%" id="dialogContentIframe"></iframe>
<div style="float: right;margin-right: 25px">
<input type="button" class="btn-primary" value="Accept" id="submitBtn"/>
<input type="button" class="btn-secondary" value="Cancel" id="cancelBtn"/>
</div>
</div>
<script type="text/javascript">
$('submitBtn').addEvent('click', function() {
var iframeWindow = $('dialogContentIframe').contentWindow;
2012-06-20 22:48:29 +02:00
var delay = iframeWindow.submitDialogForm();
2012-06-20 22:48:29 +02:00
if (MooDialog.Request.active && !delay) {
MooDialog.Request.active.close();
2012-06-20 22:48:29 +02:00
} else {
MooDialog.Request.active.close.delay(3000,MooDialog.Request.active);
}
});
$('cancelBtn').addEvent('click', function() {
if (MooDialog.Request.active) {
MooDialog.Request.active.close();
}
});
2012-05-27 23:15:46 +02:00
</script>