--- a/src/pyams_content/component/theme/zmi/manager.py Wed Apr 11 16:44:46 2018 +0200
+++ b/src/pyams_content/component/theme/zmi/manager.py Wed Apr 11 16:46:31 2018 +0200
@@ -19,15 +19,16 @@
from pyams_content.component.theme.interfaces import IThemesManagerTarget, IThemesManager
from pyams_content.interfaces import MANAGE_TOOL_PERMISSION
from pyams_skin.layer import IPyAMSLayer
-from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION
from pyams_utils.interfaces.data import IObjectData
from pyams_zmi.interfaces.menu import IPropertiesMenu
from pyams_zmi.layer import IAdminLayer
# import packages
+from pyams_content.skin import pyams_content
from pyams_form.form import AJAXEditForm
from pyams_pagelet.pagelet import pagelet_config
from pyams_skin.viewlet.menu import MenuItem
+from pyams_utils.fanstatic import get_resource_path
from pyams_viewlet.viewlet import viewlet_config
from pyams_zmi.form import AdminDialogEditForm
from pyramid.view import view_config
@@ -53,6 +54,8 @@
class ThemesManagerEditForm(AdminDialogEditForm):
"""Themes manager edit form"""
+ prefix = 'manager_themes.'
+
legend = _("Selected themes")
fields = field.Fields(IThemesManager)
@@ -63,11 +66,12 @@
super(ThemesManagerEditForm, self).updateWidgets(prefix)
if 'extract_name' in self.widgets:
widget = self.widgets['extract_name']
- widget.object_data = {'ams-plugins': 'pyams_content',
- 'ams-plugin-pyams_content-src':
- '/--static--/pyams_content/js/pyams_content{MyAMS.devext}.js',
- 'ams-plugin-pyams_content-callback': 'PyAMS_content.themes.initExtracts',
- 'ams-plugin-pyams_content-async': 'false'}
+ widget.object_data = {
+ 'ams-plugins': 'pyams_content',
+ 'ams-plugin-pyams_content-src': get_resource_path(pyams_content),
+ 'ams-plugin-pyams_content-callback': 'PyAMS_content.themes.initExtracts',
+ 'ams-plugin-pyams_content-async': 'false'
+ }
alsoProvides(widget, IObjectData)