<configure
  xmlns="http://namespaces.zope.org/zope"
  xmlns:browser="http://namespaces.zope.org/browser"
  xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
  xmlns:zcml="http://namespaces.zope.org/zcml"
  i18n_domain="collective.js.jqueryui">

  <include package="Products.CMFCore" file="permissions.zcml"
    zcml:condition="have plone-41" />
  <include file="profiles.zcml" />
  <include file="common.zcml" />

  <browser:viewlet
    name="l10n.datepicker"
    for="*"
    manager="plone.app.layout.viewlets.interfaces.IHtmlHeadLinks"
    class=".viewlet.L10nDatepicker"
    layer=".interfaces.IJqueryUILayer"
    permission="zope2.View"
    />

  <browser:page
    name="jqueryui-controlpanel"
    for="Products.CMFPlone.interfaces.IPloneSiteRoot"
    class=".controlpanel.MainControlPanelView"
    permission="cmf.ManagePortal"
    template="controlpanel.pt"
    />

  <browser:page
    name="jqueryui-plugins-controlpanel"
    for="Products.CMFPlone.interfaces.IPloneSiteRoot"
    class=".controlpanel.PluginsControlPanelView"
    permission="cmf.ManagePortal"
    />

  <browser:page
    name="jqueryui-sunburst-controlpanel"
    for="Products.CMFPlone.interfaces.IPloneSiteRoot"
    class=".controlpanel.SunburstControlPanelView"
    permission="cmf.ManagePortal"
    />

  <!-- Backport works done on plone.app.jqueryui -->
  <browser:page
    for="*"
    name="collective.js.jqueryui.custom.min.js"
    class=".resources.JQueryUICustomJS"
    permission="zope2.View"
    />

  <browser:page
    for="*"
    name="collective.js.jqueryui.custom.min.css"
    class=".resources.JQueryUICustomCSS"
    permission="zope2.View"
    />

  <subscriber handler=".controlpanel.cook_js_resources" />
  <subscriber handler=".controlpanel.cook_css_resources" />

</configure>
