Skip to content

Commit 0e2f5f2

Browse files
committed
fix: Chrome focus issue, django CMS 5 support
1 parent cf3fac6 commit 0e2f5f2

File tree

10 files changed

+572
-1394
lines changed

10 files changed

+572
-1394
lines changed

djangocms_text/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
10. Github actions will publish the new package to pypi
1717
"""
1818

19-
__version__ = "0.6.0"
19+
__version__ = "0.7.0"

djangocms_text/cms_plugins.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ def get_messages(self, request):
579579

580580
@classmethod
581581
@lru_cache
582-
def get_child_plugin_candidates(cls, slot, page):
582+
def get_child_plugin_candidates(cls, *args, **kwargs):
583583
"""
584584
585585
This method is a class method that returns a list of child plugin candidates for a given slot and page.
@@ -591,10 +591,7 @@ def get_child_plugin_candidates(cls, slot, page):
591591
Returns:
592592
- A list of text-enabled plugins that can be used as child plugins for the given slot and page.
593593
"""
594-
text_enabled_plugins = plugin_pool.get_text_enabled_plugins(
595-
placeholder=slot,
596-
page=page,
597-
)
594+
text_enabled_plugins = plugin_pool.get_text_enabled_plugins(*args, **kwargs) # Just pass on arguments
598595
# Filter out plugins that are not in the whitelist if given
599596
if settings.TEXT_CHILDREN_WHITELIST is not None:
600597
text_enabled_plugins = [
@@ -608,7 +605,7 @@ def get_child_plugin_candidates(cls, slot, page):
608605
return text_enabled_plugins
609606

610607
@staticmethod
611-
def render_plugin_icon(plugin):
608+
def render_plugin_icon(plugin: CMSPluginBase):
612609
icon = getattr(plugin, "text_icon", None)
613610
if icon is None:
614611
return

djangocms_text/contrib/text_ckeditor4/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
from djangocms_text.editors import RTEConfig
22

3+
from cms.utils.urlutils import static_with_version
4+
35

46
ckeditor4 = RTEConfig(
57
name="ckeditor4",
68
config="CKEDITOR",
79
js=(
10+
static_with_version("cms/js/dist/bundle.admin.base.min.js"),
811
"djangocms_text/vendor/ckeditor4/ckeditor.js",
912
"djangocms_text/bundles/bundle.ckeditor4.min.js",
1013
),

djangocms_text/widgets.py

-9
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@
1818
from .editors import DEFAULT_TOOLBAR_CMS, DEFAULT_TOOLBAR_HTMLField, get_editor_base_config, get_editor_config
1919
from .utils import admin_reverse, cms_placeholder_add_plugin
2020

21-
try:
22-
from cms.utils.urlutils import static_with_version
23-
except ModuleNotFoundError: # pragma: no cover
24-
25-
def static_with_version(path):
26-
return path
27-
28-
2921
rte_config = get_editor_config()
3022
#: The configuration for the text editor widget
3123

@@ -106,7 +98,6 @@ def media(self):
10698
),
10799
},
108100
js=(
109-
static_with_version("cms/js/dist/bundle.admin.base.min.js"),
110101
"djangocms_text/bundles/bundle.editor.min.js",
111102
*rte_config.js,
112103
),

0 commit comments

Comments
 (0)