rebase plugin over django-cms-text-ckeditor
This commit is contained in:
parent
6ff9c8dcde
commit
735ca6320b
|
@ -1 +1 @@
|
|||
__version__ = '1.2'
|
||||
__version__ = '2.0'
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.template import loader
|
||||
|
||||
from cmsplugin_text_wrapper.cms_plugins import TextPlugin
|
||||
from djangocms_text_ckeditor.cms_plugins import TextPlugin
|
||||
from cms.plugin_pool import plugin_pool
|
||||
|
||||
class AjaxTextPlugin(TextPlugin):
|
||||
name = _(u'Text (asynchronous loading)')
|
||||
ajax_render_template = 'cms_ajax_text_plugin/plugin.html'
|
||||
text_enabled = True
|
||||
|
||||
def get_ajax_body(self, instance, context):
|
||||
t = loader.get_template(self.ajax_render_template)
|
||||
|
@ -17,7 +16,6 @@ class AjaxTextPlugin(TextPlugin):
|
|||
request = context.get('request')
|
||||
if 'updatecache' in request.GET:
|
||||
instance.args = '?updatecache'
|
||||
context['object'] = instance
|
||||
edit_mode = request and 'edit' in request.GET
|
||||
is_ajax = request and request.is_ajax()
|
||||
if edit_mode or is_ajax:
|
||||
|
|
Reference in New Issue