Sasha Milovanov avatar Sasha Milovanov committed 9470c94

django-sekizai instead of PluginMedia quick fix

Comments (0)

Files changed (2)

 
 *.pyc
 *.swp
+
+ cmsplugin_markup.egg-info/*
+

cmsplugin_markup/templates/cmsplugin_markup/markup_plugin_change_form.html

 {% extends "admin/cms/page/plugin_change_form.html" %}
 
-{% load i18n %}
+{% load i18n sekizai_tags %}
 
 {% block top %}
 {% if preview %}
 </div>
 {% endblock %}
 
-{% block extrahead %}{{ block.super }}
-<script type="text/javascript" src="{{ CMS_MEDIA_URL }}js/csrf.js"></script>
-<script type="text/javascript">
+
+
+{% addtoblock "js" %}<script type="text/javascript" src="{{ CMS_MEDIA_URL }}js/csrf.js"></script>{% endaddtoblock %}
+{% addtoblock "js" %}<script type="text/javascript">
 /* <![CDATA[ */
 var plugin_id = '{{ plugin.id|escapejs }}';
 var page_id = '{{ request.current_page.id|escapejs }}';
 var auto_preview_timeout = 2.0;{% url cmsplugin_markup_preview as auto_preview_url %}
 var auto_preview_url = '{{ auto_preview_url|escapejs }}';
 /* ]]> */
-</script>
-<script type="text/javascript" src="{{ STATIC_URL|default:MEDIA_URL }}cmsplugin_markup/markup_admin.js"></script>
-<script type="text/javascript" src="{{ STATIC_URL|default:MEDIA_URL }}cmsplugin_markup/markup.js"></script>
-<script type="text/javascript" src="{{ CMS_MEDIA_URL }}js/lib/ui.core.js"></script>
-<script type="text/javascript" src="{{ CMS_MEDIA_URL }}js/placeholder_editor_registry.js"></script>
-<script type="text/javascript">
+</script>{% endaddtoblock %}
+
+
+{% addtoblock "js" %}<script type="text/javascript" src="{{ STATIC_URL|default:MEDIA_URL }}cmsplugin_markup/markup_admin.js"></script>{% endaddtoblock %}
+{% addtoblock "js" %}<script type="text/javascript" src="{{ STATIC_URL|default:MEDIA_URL }}cmsplugin_markup/markup.js"></script>{% endaddtoblock %}
+{% addtoblock "js" %}<script type="text/javascript" src="{{ CMS_MEDIA_URL }}js/lib/ui.core.js"></script>{% endaddtoblock %}
+{% addtoblock "js" %}<script type="text/javascript" src="{{ CMS_MEDIA_URL }}js/placeholder_editor_registry.js"></script>{% endaddtoblock %}
+{% addtoblock "js" %}<script type="text/javascript">
 /* <![CDATA[ */
 
 var editPluginPopupCallbacks = {};
     var splits = window.location.href.split("?")[0].split("/");
     var parent_id = Number(splits[splits.length - 2]);
     var language = $('#id_language').attr('value');
-    
+
     if (pluginvalue == "") {
       alert("{% filter escapejs %}{% trans "Please select a plugin type." %}{% endfilter %}");
       return;
     }
-    
+
     var texteditor = get_editor('{{ name|escapejs }}');
     if (texteditor == null || texteditor.insertText == null) {
       alert("{% filter escapejs %}{% trans "Markup does not support inserting objects." %}{% endfilter %}");
       return;
     }
-    
+
     add_plugin_for_markup(pluginvalue, parent_id, language, '{{ name|escapejs }}')
   }).css("cursor", "pointer").css("margin", "5px");
 
 };
 {% endfor %}
 /* ]]> */
-</script>
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL|default:MEDIA_URL }}cmsplugin_markup/markup.css" />
-<link rel="stylesheet" type="text/css" href="{{ CMS_MEDIA_URL }}css/jquery/cupertino/jquery-ui.css" />
-{% for p in text_plugins %}
-{{ p.pluginmedia }}
-{% endfor %}
-{% endblock %}
+</script>{% endaddtoblock %}
+
+
+{% addtoblock "css" %}<link rel="stylesheet" type="text/css" href="{{ STATIC_URL|default:MEDIA_URL }}cmsplugin_markup/markup.css" />{% endaddtoblock %}
+{% addtoblock "css" %}<link rel="stylesheet" type="text/css" href="{{ CMS_MEDIA_URL }}css/jquery/cupertino/jquery-ui.css" />{% endaddtoblock %}
+<!--{% for p in text_plugins %}-->
+<!--{{ p.pluginmedia }}-->
+<!--{% endfor %}-->
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.