-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,32 @@ | ||
{% extends "admin/change_form.html" %} | ||
{% load i18n l10n static cms_static %} | ||
|
||
{% block title %}{% trans "Change a page" %}{% endblock %} | ||
|
||
{% block content %} | ||
{# trick for cms to understand that the plugin was actually correctly saved #} | ||
<div class="messagelist"> | ||
<div class="success"></div> | ||
</div> | ||
<script> | ||
window.CMS || window.parent.CMS || document.write( | ||
'<script src="{% static_with_version "cms/js/dist/bundle.admin.base.min.js" %}" type="text/javascript"><\/script>' | ||
); | ||
</script> | ||
<script> | ||
// we have a special case here cause the CMS namespace | ||
// can be either inside the current window or the parent | ||
(function(Window) { | ||
// the dataBridge is used to access plugin information from different resources | ||
// Do NOT move this!!! | ||
Window.CMS.API.Helpers.dataBridge = {{ plugin_data|safe }}; | ||
|
||
{% if plugin_structure %} | ||
Window.CMS.API.Helpers.dataBridge.structure = {{ plugin_structure|safe }}; | ||
{% endif %} | ||
|
||
Window.CMS.$(document).ready(function () { | ||
// make sure we're doing after the "modal" mechanism kicked in | ||
setTimeout(function () { | ||
// save current plugin | ||
Window.CMS.API.Helpers.onPluginSave(); | ||
}, 100); | ||
}); | ||
})(window.parent || window); | ||
</script> | ||
{% endblock %} | ||
{% load i18n l10n static cms_static %}{% spaceless %} | ||
<html> | ||
<body> | ||
{# trick for cms to understand that the plugin was actually correctly saved #} | ||
<div class="messagelist"> | ||
<div class="success"></div> | ||
</div> | ||
{{ data_bridge|json_script:"data-bridge" }} | ||
<script> | ||
window.CMS || window.parent.CMS || document.write( | ||
'<script src="{% static_with_version "cms/js/dist/bundle.admin.base.min.js" %}" type="text/javascript"><\/script>' | ||
); | ||
</script> | ||
<script> | ||
// we have a special case here cause the CMS namespace | ||
// can be either inside the current window or the parent | ||
(function(Window) { | ||
// the dataBridge is used to access plugin information from different resources | ||
// Do NOT move this!!! | ||
Window.CMS.API.Helpers.dataBridge = JSON.parse(document.getElementById('data-bridge').textContent); | ||
Window.CMS.$(document).ready(function () { | ||
// make sure we're doing after the "modal" mechanism kicked in | ||
setTimeout(function () { | ||
// save current plugin | ||
Window.CMS.API.Helpers.onPluginSave(); | ||
}, 100); | ||
}); | ||
})(window.parent || window); | ||
</script> | ||
</body> | ||
</html> | ||
{% endspaceless %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters