<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    {% load static %}
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>File added</title>
        {% include "admin/cms/scripts.html" %}
        <script>
            django.jQuery(function() {

                // Get redactor from parent
                var redactor = parent.active_redactor;

                // Make sure we have redactor
                if (redactor) {
                    redactor.imagemanager.insert("{{ permalink }}", "{{ title }}")
                }

                // Get ckeditor from parent
                var ckeditor = parent.active_ckeditor;
                var ckeditor_dialog = parent.active_ckeditor_dialog;

                // Make sure we have ckeditor
                if (ckeditor && ckeditor_dialog) {
                    ckeditor.insertHtml('<img src="{{ permalink }}" title="{{ title }}"/>')
                    ckeditor_dialog.hide()
                }

            });
        </script>

        <style>
            body {
                background-color: #FFF;
            }
            .popup #suit-center {
                width: 100%;
                padding: 0;
            }
        </style>
    </head>
    <body>
    </body>
</html>
