Skip to content

Commit c9502de

Browse files
committed
Merge pull request django-cms#1729 from digi604/3.0-merge
New frontend editing
2 parents f04c676 + 1c1223e commit c9502de

File tree

145 files changed

+4934
-7086
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+4934
-7086
lines changed

CHANGELOG.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,13 @@ Please see Install/2.4 release notes *before* attempting to upgrade to version 2
147147
- check_copy_relations fixed for abstract classes
148148
- non public frontend languages fixed
149149

150+
==== 3.0.0 (XXXXX) ===
151+
152+
- Plugins are only editable in frontend
153+
- PluginEditor has been removed in backend
154+
- New frontend editing
155+
- New Toolbar
156+
- Plugin API for creating new plugins and moving has changed
157+
158+
159+

cms/admin/dialog/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ def get_copy_dialog(request, page_id):
2424
'form': PermissionForm(), # class needs to be instantiated
2525
'callback': request.REQUEST['callback'],
2626
}
27-
return render_to_response("admin/cms/page/dialog/copy.html", context)
27+
return render_to_response("admin/cms/page/tree/copy_premissions.html", context)

cms/admin/forms.py

Lines changed: 94 additions & 85 deletions
Large diffs are not rendered by default.

cms/admin/pageadmin.py

Lines changed: 138 additions & 175 deletions
Large diffs are not rendered by default.

cms/admin/placeholderadmin.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# -*- coding: utf-8 -*-
2-
from django.views.decorators.clickjacking import xframe_options_sameorigin
2+
from copy import deepcopy
3+
from django.utils import simplejson
34

5+
from django.views.decorators.clickjacking import xframe_options_sameorigin
46
from cms.exceptions import PluginLimitReached
57
from cms.forms.fields import PlaceholderFormField
68
from cms.models.fields import PlaceholderField
@@ -17,7 +19,6 @@
1719
from django.template.defaultfilters import force_escape, escapejs
1820
from django.utils.translation import ugettext as _, get_language
1921
from django.conf import settings
20-
from copy import deepcopy
2122

2223

2324
class PlaceholderAdmin(ModelAdmin):
@@ -27,22 +28,20 @@ class PlaceholderAdmin(ModelAdmin):
2728
class Media:
2829
css = {
2930
'all': [cms_static_url(path) for path in (
30-
'css/rte.css',
3131
'css/pages.css',
3232
'css/change_form.css',
33-
'css/jquery.dialog.css',
33+
'css/cms.base.css',
3434
'css/plugin_editor.css',
3535
)]
3636
}
3737
js = [cms_static_url(path) for path in [
38-
'js/plugins/admincompat.js',
38+
'js/jquery.min.js',
3939
'js/csrf.js',
40-
'js/libs/jquery.query.js',
41-
'js/libs/jquery.ui.core.js',
42-
'js/libs/jquery.ui.dialog.js',
43-
]
40+
'js/plugins/jquery.query.js',
41+
'js/plugins/jquery.ui.custom.js',
42+
]
4443
]
45-
44+
4645

4746
def get_fieldsets(self, request, obj=None):
4847
"""
@@ -249,7 +248,7 @@ def edit_plugin(self, request, plugin_id):
249248
"deleted": True,
250249
'name': unicode(cms_plugin),
251250
})
252-
return render_to_response('admin/cms/page/plugin_forms_ok.html', context, RequestContext(request))
251+
return render_to_response('admin/cms/page/plugin/confirm_form.html', context, RequestContext(request))
253252

254253
if not instance:
255254
# instance doesn't exist, call add view
@@ -276,7 +275,7 @@ def edit_plugin(self, request, plugin_id):
276275
'icon': force_escape(saved_object.get_instance_icon_src()),
277276
'alt': force_escape(escapejs(saved_object.get_instance_icon_alt())),
278277
}
279-
return render_to_response('admin/cms/page/plugin_forms_ok.html', context, RequestContext(request))
278+
return render_to_response('admin/cms/page/plugin/confirm_form.html', context, RequestContext(request))
280279

281280
return response
282281

@@ -371,7 +370,6 @@ def copy_plugins(self, request):
371370
model=placeholder._get_attached_model(),
372371
)
373372
if plugins:
374-
return render_to_response('admin/cms/page/widgets/plugin_item.html',
375-
{'plugin_list': list(plugins)}, RequestContext(request))
373+
return HttpResponse(simplejson.dumps({'plugin_list': list(plugins)}), content_type='application/json')
376374
else:
377375
return HttpResponseBadRequest("Error during copy")

0 commit comments

Comments
 (0)