kopia lustrzana https://github.com/wagtail/wagtail
Always open up a new preview window.
rodzic
4fadecebd6
commit
9eef436d41
|
|
@ -367,11 +367,7 @@ $(function() {
|
|||
e.preventDefault();
|
||||
var $this = $(this);
|
||||
|
||||
if (previewWindow) {
|
||||
previewWindow.close();
|
||||
}
|
||||
|
||||
previewWindow = window.open($this.data('placeholder'), $this.data('windowname'));
|
||||
previewWindow = window.open($this.data('placeholder'));
|
||||
|
||||
if (previewWindow.addEventListener) {
|
||||
previewWindow.addEventListener('load', function() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
<button class="button action-preview {% if icon %}icon icon-view{% endif %}"
|
||||
data-action="{% url 'wagtailadmin_pages:preview_on_add' content_type.app_label content_type.model parent_page.id %}{% if mode %}?mode={{ mode|urlencode }}{% endif %}"
|
||||
data-placeholder="{% url 'wagtailadmin_pages:preview' %}"
|
||||
data-windowname="wagtail_preview_{{ parent_page.id }}_child">{{ label }}</button>
|
||||
data-placeholder="{% url 'wagtailadmin_pages:preview' %}">{{ label }}</button>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
<button class="button action-preview {% if icon %}icon icon-view{% endif %}"
|
||||
data-action="{% url 'wagtailadmin_pages:preview_on_edit' page.id %}{% if mode %}?mode={{ mode|urlencode }}{% endif %}"
|
||||
data-placeholder="{% url 'wagtailadmin_pages:preview' %}"
|
||||
data-windowname="wagtail_preview_{{ page.id }}">{{ label }}</button>
|
||||
data-placeholder="{% url 'wagtailadmin_pages:preview' %}">{{ label }}</button>
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue