Allow pop up window named to be specified by view

This commit is contained in:
Roberto Rosario
2011-05-06 02:58:33 -04:00
parent d6aa44c8bd
commit c40b3eec66
2 changed files with 2 additions and 1 deletions

View File

@@ -1195,6 +1195,7 @@ def document_print(request, document_id):
new_url.append(urlquote(hard_copy_arguments))
new_window_url = u'?'.join(new_url)
new_window_url_name = u'document_hard_copy'
#html_redirect = next
#messages.success(request, _(u'Preparing document hardcopy.'))
else:

View File

@@ -8,7 +8,7 @@
{% block web_theme_head %}
{% if new_window_url %}
<script type="text/javascript">
window.open('{{ new_window_url|safe }}','name','toolbar=1,scrollbars=1,location=1,status=1,menubar=1,resizable=1');
window.open('{{ new_window_url|safe }}','{{ new_window_url_name|default:"_blank" }}','toolbar=1,scrollbars=1,location=1,status=1,menubar=1,resizable=1');
</script>
<noscript>
<META HTTP-EQUIV="refresh" CONTENT="{{ new_window_url_timeout|default:'2' }};{{ new_window_url|safe }}">