Permalink
Browse files

keep naming rules

  • Loading branch information...
FinalAngel committed Jan 3, 2013
1 parent 35941e1 commit bbcfb2b3db972a7baf1bcdfd04659f2f30fd574d
View
@@ -1285,7 +1285,7 @@ def edit_plugin(self, request, plugin_id):
context.update({
"deleted":True,
})
- return render_to_response('admin/cms/page/plugin/form-confirm.html', context, RequestContext(request))
+ return render_to_response('admin/cms/page/plugin/confirm-form.html', context, RequestContext(request))
if not instance:
# instance doesn't exist, call add view
@@ -1322,7 +1322,7 @@ def edit_plugin(self, request, plugin_id):
'icon': force_escape(saved_object.get_instance_icon_src()),
'alt': force_escape(saved_object.get_instance_icon_alt()),
}
- return render_to_response('admin/cms/page/plugin/form-confirm.html', context, RequestContext(request))
+ return render_to_response('admin/cms/page/plugin/confirm-form.html', context, RequestContext(request))
return response
@@ -1547,9 +1547,9 @@ def edit_title(self, request, page_id):
context.update({
'cancel': True,
})
- return render_to_response('admin/cms/page/plugin/form-confirm.html', context, RequestContext(request))
+ return render_to_response('admin/cms/page/plugin/confirm-form.html', context, RequestContext(request))
if not cancel_clicked and request.method == 'POST' and saved_successfully:
- return render_to_response('admin/cms/page/plugin/form-confirm.html', context, RequestContext(request))
+ return render_to_response('admin/cms/page/plugin/confirm-form.html', context, RequestContext(request))
return render_to_response('admin/cms/page/page_attribute_change_form.html', context, RequestContext(request))
@@ -15,6 +15,7 @@
<script type="text/javascript">
//<![CDATA[
+console.log('trigger plugin change form');
(function($) {
function runOnLoad(f) {
if (runOnLoad.loaded){
@@ -5,6 +5,7 @@
{% endcomment %}
{% block extrahead %}
+{{ block.super }}
<script type="text/javascript" src="{% admin_static_url %}js/jquery.min.js"></script>
{{ media }}
{% endblock %}
@@ -22,18 +23,19 @@
// TODO: context should be passed through the backend
var context = {
'window': window,
+ 'timeout': {{ window_close_timeout|default:0 }},
'plugin_id': '{{ plugin_id }}', // used for everything
'plugin_type': {{ type }}, // used for hide_iframe
'plugin_name': {{ name }}, // used for hide_iframe
'plugin_icon': '{{ icon }}', // used for wysiwyg
'plugin_desc': '{{ alt }}', // used for wysiwyg
- 'timeout': {{ window_close_timeout|default:0 }},
'message': '{% if cancel %}{% trans "Your changes to this plugin have not been saved." %}{% else %}{% trans "Plugin saved successfully." %}{% endif %}'
};
// determing if we are inside the current window or in a popup
- if(window.CMS) CMS.API.Helpers.Save(type, context);
- if(window.parent.CMS) window.parent.CMS.API.Helpers.Save(type, context);
+ if(window.CMS) CMS.API.Helpers.savePlugin(type, context);
+ if(window.parent.CMS) window.parent.CMS.API.Helpers.savePlugin(type, context);
+ // todo we might need to check how it works on a popup
});
</script>
{% endblock %}

0 comments on commit bbcfb2b

Please sign in to comment.