Changed dropdown menu tag from 'button' to 'div' to avoid activation by Enter key
authorThierry Florac <thierry.florac@onf.fr>
Fri, 13 Oct 2017 09:58:56 +0200
changeset 44 c2f864474cbc
parent 43 b85795a019d1
child 45 2de905710ee2
Changed dropdown menu tag from 'button' to 'div' to avoid activation by Enter key
src/pyams_workflow/zmi/viewlet/templates/versions.pt
src/pyams_workflow/zmi/viewlet/versions.py
--- a/src/pyams_workflow/zmi/viewlet/templates/versions.pt	Tue Sep 19 11:36:38 2017 +0200
+++ b/src/pyams_workflow/zmi/viewlet/templates/versions.pt	Fri Oct 13 09:58:56 2017 +0200
@@ -1,13 +1,13 @@
 <div class="btn-group margin-right-10"
 	 tal:define="current_state view.get_workflow_state()"
 	 i18n:domain="pyams_workflow">
-	<button data-toggle="dropdown" class="btn btn-xs btn-primary dropdown-toggle">
+	<div data-toggle="dropdown" class="btn btn-xs btn-primary dropdown-toggle">
 		<tal:var i18n:translate="">
 			Version <i18n:var name="version" tal:content="current_state['version']" /> -
 			<i18n:var name="state" tal:content="current_state['state_label']" />
 		</tal:var>
 		&nbsp;<i class="fa fa-fw fa-caret-down"></i>
-	</button>
+	</div>
 	<ul class="dropdown-menu">
 		<li class="small"
 			tal:repeat="version view.workflow_versions">
--- a/src/pyams_workflow/zmi/viewlet/versions.py	Tue Sep 19 11:36:38 2017 +0200
+++ b/src/pyams_workflow/zmi/viewlet/versions.py	Fri Oct 13 09:58:56 2017 +0200
@@ -31,7 +31,7 @@
 
 
 @viewlet_config(name='pyams_workflow.versions', context=IWorkflowVersion, layer=IPyAMSLayer,
-                view=Interface, manager=IToolbarViewletManager, weight=1)
+                view=Interface, manager=IToolbarViewletManager, weight=100)
 @template_config(template='templates/versions.pt', layer=IPyAMSLayer)
 class WorkflowVersionMenuProvider(Viewlet):
     """Workflow versions menu content provider"""