Added optional target on menu items
authorThierry Florac <thierry.florac@onf.fr>
Thu, 06 Oct 2016 17:07:35 +0200
changeset 181 edc461e6a13b
parent 180 172ddcb92995
child 182 681edeb5c6ef
Added optional target on menu items
src/ztfy/myams/viewlet/menu/__init__.py
src/ztfy/myams/viewlet/menu/interfaces.py
--- a/src/ztfy/myams/viewlet/menu/__init__.py	Thu Oct 06 15:44:22 2016 +0200
+++ b/src/ztfy/myams/viewlet/menu/__init__.py	Thu Oct 06 17:07:35 2016 +0200
@@ -57,6 +57,7 @@
     notice_class = FieldProperty(IMenuItem['notice_class'])
     click_handler = FieldProperty(IMenuItem['click_handler'])
     url = FieldProperty(IMenuItem['url'])
+    target = FieldProperty(IMenuItem['target'])
     modal_target = FieldProperty(IMenuItem['modal_target'])
     data = FieldProperty(IMenuItem['data'])
 
@@ -95,6 +96,7 @@
     notice_class = None
     click_handler = None
     url = None
+    target = None
     modal_target = False
     data = None
 
--- a/src/ztfy/myams/viewlet/menu/interfaces.py	Thu Oct 06 15:44:22 2016 +0200
+++ b/src/ztfy/myams/viewlet/menu/interfaces.py	Thu Oct 06 17:07:35 2016 +0200
@@ -65,6 +65,9 @@
                    required=False,
                    default=u'#')
 
+    target = TextLine(title=_("Menu link target window"),
+                      required=False)
+
     modal_target = Bool(title=_("Modal target"),
                         required=False,
                         default=False)