diff --git a/djangocms_versioning/cms_toolbars.py b/djangocms_versioning/cms_toolbars.py index 153f43ba..62a5231a 100644 --- a/djangocms_versioning/cms_toolbars.py +++ b/djangocms_versioning/cms_toolbars.py @@ -35,9 +35,6 @@ class VersioningToolbar(PlaceholderToolbar): - class Media: - js = ("cms/js/admin/actions.js",) - def _get_versionable(self): """Helper method to get the versionable for the content type of the version @@ -79,7 +76,7 @@ def _add_publish_button(self): _("Publish"), url=publish_url, disabled=False, - extra_classes=["cms-btn-action", "js-action", "cms-form-post-method", "cms-versioning-js-publish-btn"], + extra_classes=["cms-btn-action", "cms-form-post-method", "cms-versioning-js-publish-btn"], ) self.toolbar.add_item(item) @@ -115,7 +112,7 @@ def _add_edit_button(self, disabled=False): _("Edit") if draft_exists else _("New Draft"), url=edit_url, disabled=disabled, - extra_classes=["cms-btn-action", "js-action", "cms-form-post-method", "cms-versioning-js-edit-btn"], + extra_classes=["cms-btn-action", "cms-form-post-method", "cms-versioning-js-edit-btn"], ) self.toolbar.add_item(item) @@ -135,7 +132,6 @@ def _add_unlock_button(self): if can_unlock: extra_classes = [ "cms-btn-action", - "js-action", "cms-form-post-method", "cms-versioning-js-unlock-btn", ] @@ -316,7 +312,7 @@ def override_language_menu(self): # Only override the menu if it exists and a page can be found language_menu = self.toolbar.get_menu(LANGUAGE_MENU_IDENTIFIER, _("Language")) if settings.USE_I18N and language_menu and self.page: - # remove_item uses `items` attribute so we have to copy object + # remove_item uses `items` attribute, so we have to copy object for _item in copy(language_menu.items): language_menu.remove_item(item=_item) diff --git a/setup.py b/setup.py index 9ddc378b..a1f934f3 100644 --- a/setup.py +++ b/setup.py @@ -3,8 +3,8 @@ import djangocms_versioning INSTALL_REQUIREMENTS = [ - "Django>=1.11", - "django-cms", + "Django>=3.2", + "django-cms>=4.1.1", "django-fsm" ] diff --git a/tests/test_locking.py b/tests/test_locking.py index 7b016778..f8199f57 100644 --- a/tests/test_locking.py +++ b/tests/test_locking.py @@ -839,7 +839,7 @@ def test_enable_edit_button_when_content_is_locked(self): self.assertFalse(edit_button.disabled) self.assertListEqual( edit_button.extra_classes, - ["cms-btn-action", "js-action", "cms-form-post-method", "cms-versioning-js-edit-btn"] + ["cms-btn-action", "cms-form-post-method", "cms-versioning-js-edit-btn"] ) def test_lock_message_when_content_is_locked(self): diff --git a/tests/test_toolbars.py b/tests/test_toolbars.py index 66339249..1c51d838 100644 --- a/tests/test_toolbars.py +++ b/tests/test_toolbars.py @@ -65,7 +65,7 @@ def test_publish_in_toolbar_in_edit_mode(self): self.assertFalse(publish_button.disabled) self.assertListEqual( publish_button.extra_classes, - ["cms-btn-action", "js-action", "cms-form-post-method", "cms-versioning-js-publish-btn"], + ["cms-btn-action", "cms-form-post-method", "cms-versioning-js-publish-btn"], ) def test_revert_in_toolbar_in_preview_mode(self): @@ -150,7 +150,7 @@ def test_edit_in_toolbar_in_preview_mode(self): self.assertFalse(edit_button.disabled) self.assertListEqual( edit_button.extra_classes, - ["cms-btn-action", "js-action", "cms-form-post-method", "cms-versioning-js-edit-btn"] + ["cms-btn-action", "cms-form-post-method", "cms-versioning-js-edit-btn"] ) def test_edit_not_in_toolbar_in_edit_mode(self):