From a679d4f7f5a9f85d16472f27332142c7093497a0 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Thu, 30 Jul 2015 23:19:12 +0100 Subject: [PATCH] Remove all menu-{section_name} classnames on the element and menu item
  • s. These were introduced in https://github.com/torchbox/verdant-rca/commit/9d7d016b7c27ca4602eefee2fa920a1e83242319 to support menu item highlighting, but this mechanism was superseded by #1186. There's no sign of any code still using these classnames, and any code that relies on them would be liable to fail on non-English-language sites anyhow (since the menu item name is derived from the label by default, and the label is a translatable string). --- docs/reference/hooks.rst | 2 +- .../templates/wagtailsearchpromotions/index.html | 1 - .../wagtailadmin/templates/wagtailadmin/pages/add_subpage.html | 1 - .../templates/wagtailadmin/pages/confirm_delete.html | 1 - .../wagtailadmin/templates/wagtailadmin/pages/confirm_move.html | 1 - .../templates/wagtailadmin/pages/confirm_unpublish.html | 1 - .../templates/wagtailadmin/pages/content_type_use.html | 1 - wagtail/wagtailadmin/templates/wagtailadmin/pages/copy.html | 1 - wagtail/wagtailadmin/templates/wagtailadmin/pages/create.html | 2 +- wagtail/wagtailadmin/templates/wagtailadmin/pages/edit.html | 2 +- wagtail/wagtailadmin/templates/wagtailadmin/pages/index.html | 2 +- .../templates/wagtailadmin/pages/move_choose_destination.html | 1 - wagtail/wagtailadmin/templates/wagtailadmin/pages/search.html | 1 - .../wagtailadmin/templates/wagtailadmin/shared/menu_item.html | 2 +- .../templates/wagtailadmin/shared/menu_submenu_item.html | 2 +- wagtail/wagtaildocs/templates/wagtaildocs/documents/add.html | 1 - .../templates/wagtaildocs/documents/confirm_delete.html | 1 - wagtail/wagtaildocs/templates/wagtaildocs/documents/edit.html | 1 - wagtail/wagtaildocs/templates/wagtaildocs/documents/index.html | 1 - wagtail/wagtailforms/templates/wagtailforms/index.html | 1 - .../wagtailforms/templates/wagtailforms/index_submissions.html | 1 - wagtail/wagtailimages/templates/wagtailimages/images/add.html | 1 - .../templates/wagtailimages/images/confirm_delete.html | 1 - wagtail/wagtailimages/templates/wagtailimages/images/edit.html | 1 - wagtail/wagtailimages/templates/wagtailimages/images/index.html | 1 - .../templates/wagtailimages/images/url_generator.html | 2 -- wagtail/wagtailimages/templates/wagtailimages/multiple/add.html | 1 - wagtail/wagtailredirects/templates/wagtailredirects/add.html | 1 - .../templates/wagtailredirects/confirm_delete.html | 1 - wagtail/wagtailredirects/templates/wagtailredirects/edit.html | 1 - wagtail/wagtailredirects/templates/wagtailredirects/index.html | 1 - wagtail/wagtailsites/templates/wagtailsites/confirm_delete.html | 1 - wagtail/wagtailsites/templates/wagtailsites/create.html | 1 - wagtail/wagtailsites/templates/wagtailsites/edit.html | 1 - .../templates/wagtailsnippets/snippets/confirm_delete.html | 1 - .../templates/wagtailsnippets/snippets/create.html | 1 - .../templates/wagtailsnippets/snippets/edit.html | 1 - .../templates/wagtailsnippets/snippets/index.html | 1 - .../templates/wagtailsnippets/snippets/type_index.html | 1 - .../templates/wagtailusers/groups/confirm_delete.html | 1 - wagtail/wagtailusers/templates/wagtailusers/groups/create.html | 1 - wagtail/wagtailusers/templates/wagtailusers/groups/edit.html | 1 - wagtail/wagtailusers/templates/wagtailusers/groups/index.html | 1 - wagtail/wagtailusers/templates/wagtailusers/users/create.html | 1 - wagtail/wagtailusers/templates/wagtailusers/users/edit.html | 1 - wagtail/wagtailusers/templates/wagtailusers/users/index.html | 1 - 46 files changed, 6 insertions(+), 47 deletions(-) diff --git a/docs/reference/hooks.rst b/docs/reference/hooks.rst index 338a74e98..cf7915902 100644 --- a/docs/reference/hooks.rst +++ b/docs/reference/hooks.rst @@ -156,7 +156,7 @@ The available hooks are: Add an item to the Wagtail admin menu. The callable passed to this hook must return an instance of ``wagtail.wagtailadmin.menu.MenuItem``. New items can be constructed from the ``MenuItem`` class by passing in a ``label`` which will be the text in the menu item, and the URL of the admin page you want the menu item to link to (usually by calling ``reverse()`` on the admin view you've set up). Additionally, the following keyword arguments are accepted: - :name: an internal name used to identify the menu item; defaults to the slugified form of the label. Also applied as a CSS class to the wrapping ``
  • ``, as ``"menu-{name}"``. + :name: an internal name used to identify the menu item; defaults to the slugified form of the label. :classnames: additional classnames applied to the link, used to give it an icon :attrs: additional HTML attributes to apply to the link :order: an integer which determines the item's position in the menu diff --git a/wagtail/contrib/wagtailsearchpromotions/templates/wagtailsearchpromotions/index.html b/wagtail/contrib/wagtailsearchpromotions/templates/wagtailsearchpromotions/index.html index 757a681f0..3efd752b8 100644 --- a/wagtail/contrib/wagtailsearchpromotions/templates/wagtailsearchpromotions/index.html +++ b/wagtail/contrib/wagtailsearchpromotions/templates/wagtailsearchpromotions/index.html @@ -1,7 +1,6 @@ {% extends "wagtailadmin/base.html" %} {% load i18n %} {% block titletag %}{% trans "Search Terms" %}{% endblock %} -{% block bodyclass %}menu-editorspicks{% endblock %} {% block extra_js %}