Skip to content

Commit

Permalink
remove all unused code because interface is moved to volto
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Jul 23, 2024
1 parent db23b4e commit 4351c66
Show file tree
Hide file tree
Showing 66 changed files with 26 additions and 14,866 deletions.
8 changes: 0 additions & 8 deletions .babelrc

This file was deleted.

21 changes: 0 additions & 21 deletions .eslintrc.json

This file was deleted.

1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

20 changes: 0 additions & 20 deletions .prettierrc.json

This file was deleted.

7 changes: 0 additions & 7 deletions .stylelintrc.json

This file was deleted.

3 changes: 0 additions & 3 deletions constraints_plone51.txt

This file was deleted.

3 changes: 0 additions & 3 deletions constraints_plone52.txt

This file was deleted.

93 changes: 0 additions & 93 deletions package.json

This file was deleted.

12 changes: 0 additions & 12 deletions postcss.config.js

This file was deleted.

8 changes: 1 addition & 7 deletions src/rer/sitesearch/adapters/permission_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
from zope.interface import implementer
from plone.app.dexterity.permissions import GenericFormFieldPermissionChecker
from rer.sitesearch.interfaces import IRerSiteSearchSettingsForm


try:
from plone.app.z3cform.interfaces import IFieldPermissionChecker
except ImportError:
# bbb for < plone 5.2rc2
from plone.app.widgets.interfaces import IFieldPermissionChecker
from plone.app.z3cform.interfaces import IFieldPermissionChecker


@adapter(IRerSiteSearchSettingsForm)
Expand Down
55 changes: 0 additions & 55 deletions src/rer/sitesearch/browser/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -6,61 +6,6 @@
i18n_domain="rer.sitesearch"
>

<plone:static
directory="static"
name="rer.sitesearch"
type="plone"
/>

<browser:page
name="search"
for="plone.app.layout.navigation.interfaces.INavigationRoot"
class=".search.View"
template="templates/search.pt"
permission="zope2.View"
layer="rer.sitesearch.interfaces.IRERSiteSearchLayer"
/>

<browser:page
name="search"
for="*"
class=".search.View"
template="templates/search.pt"
permission="zope2.View"
layer="rer.sitesearch.interfaces.IRERSiteSearchLayer"
/>


<!-- FORCE LOCAL SEARCH ALWAYS -->
<browser:page
name="search-local"
for="plone.app.layout.navigation.interfaces.INavigationRoot"
class=".search.View"
template="templates/search_local.pt"
permission="zope2.View"
layer="rer.sitesearch.interfaces.IRERSiteSearchLayer"
/>

<browser:page
name="search-local"
for="*"
class=".search.View"
template="templates/search_local.pt"
permission="zope2.View"
layer="rer.sitesearch.interfaces.IRERSiteSearchLayer"
/>

<!-- keep default search view for debug -->
<configure package="Products.CMFPlone.browser">
<browser:page
name="search-debug"
for="plone.app.layout.navigation.interfaces.INavigationRoot"
class=".search.Search"
template="templates/search.pt"
permission="zope2.View"
/>
</configure>

<browser:page
name="sitesearch-settings"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
Expand Down
24 changes: 3 additions & 21 deletions src/rer/sitesearch/browser/controlpanel.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# -*- coding: utf-8 -*-
from collective.z3cform.jsonwidget.browser.widget import JSONFieldWidget
from plone.app.registry.browser import controlpanel
from Products.CMFPlone.resources import add_bundle_on_request
from rer.sitesearch import _
from rer.sitesearch.interfaces import IRERSiteSearchSettings
from rer.sitesearch.interfaces import IRerSiteSearchSettingsForm
from rer.sitesearch.interfaces.settings import IIndexesRowSchema
from rer.sitesearch.interfaces.settings import ITypesMappingRowSchema
from z3c.form import field
from zope.interface import implementer

Expand All @@ -16,31 +12,17 @@ class RERSiteSearchSettingsEditForm(controlpanel.RegistryEditForm):

schema = IRERSiteSearchSettings
id = "RERSiteSearchSettingsEditForm"
label = _(u"Site Search settings")
label = _("Site Search settings")
description = _(
u"help_sitesearch_settings_editform",
default=u"Set site search configurations",
"help_sitesearch_settings_editform",
default="Set site search configurations",
)

fields = field.Fields(IRERSiteSearchSettings)
fields["types_grouping"].widgetFactory = JSONFieldWidget
fields["available_indexes"].widgetFactory = JSONFieldWidget

def updateWidgets(self):
"""
Hide some fields
"""
super(RERSiteSearchSettingsEditForm, self).updateWidgets()
self.widgets["types_grouping"].schema = ITypesMappingRowSchema
self.widgets["available_indexes"].schema = IIndexesRowSchema


@implementer(IRerSiteSearchSettingsForm)
class RERSiteSearchSettingsControlPanel(controlpanel.ControlPanelFormWrapper):
""" """

def __call__(self):
add_bundle_on_request(self.request, "z3cform-jsonwidget-bundle")
return super(RERSiteSearchSettingsControlPanel, self).__call__()

form = RERSiteSearchSettingsEditForm
51 changes: 0 additions & 51 deletions src/rer/sitesearch/browser/search.py

This file was deleted.

Loading

0 comments on commit 4351c66

Please sign in to comment.