--- a/src/pyams_skin/viewlet/toolbar/__init__.py Mon Oct 02 14:45:50 2017 +0200
+++ b/src/pyams_skin/viewlet/toolbar/__init__.py Mon Oct 02 14:46:17 2017 +0200
@@ -62,6 +62,13 @@
return absolute_url(self.context, self.request, self.url)
+class JsToolbarAction(ToolbarAction):
+ """Javascript toolbar action"""
+
+ def get_url(self):
+ return self.url
+
+
@template_config(template='menu.pt', layer=IPyAMSLayer)
@implementer(IToolbarMenu)
class ToolbarMenu(TemplateBasedViewletManager, WeightOrderedViewletManager, Viewlet):
--- a/src/pyams_skin/viewlet/toolbar/action.pt Mon Oct 02 14:45:50 2017 +0200
+++ b/src/pyams_skin/viewlet/toolbar/action.pt Mon Oct 02 14:46:17 2017 +0200
@@ -1,6 +1,6 @@
<div class="btn-group">
<button tal:attributes="class view.css_class;
- data-toggle 'modal' if view.modal_target else '';
+ data-toggle 'modal' if view.modal_target else None;
data-ams-url view.get_url()">
<i tal:attributes="class view.label_css_class"></i>
<tal:var content="view.label" />