Updated pictograms manager
authorThierry Florac <thierry.florac@onf.fr>
Wed, 14 Mar 2018 09:43:08 +0100
changeset 478 c82b7fe3129b
parent 477 507662d4506a
child 479 8ccd10df84e3
Updated pictograms manager
src/pyams_content/reference/pictograms/zmi/manager.py
src/pyams_content/reference/pictograms/zmi/templates/manager-selection.pt
--- a/src/pyams_content/reference/pictograms/zmi/manager.py	Wed Mar 14 09:42:51 2018 +0100
+++ b/src/pyams_content/reference/pictograms/zmi/manager.py	Wed Mar 14 09:43:08 2018 +0100
@@ -64,7 +64,7 @@
     fields = field.Fields(Interface)
     buttons = button.Buttons(IUncheckedEditFormButtons)
 
-    object_data = {'ams-form-data-init-callback': 'PyAMS_content.pictogram.initManagerSelection'}
+    object_data = {'ams-form-data-init-callback': 'PyAMS_content.pictograms.initManagerSelection'}
 
     ajax_handler = 'pictograms-selection.json'
     edit_permission = MANAGE_TOOL_PERMISSION
--- a/src/pyams_content/reference/pictograms/zmi/templates/manager-selection.pt	Wed Mar 14 09:42:51 2018 +0100
+++ b/src/pyams_content/reference/pictograms/zmi/templates/manager-selection.pt	Wed Mar 14 09:43:08 2018 +0100
@@ -1,12 +1,15 @@
-<div i18n:domain="pyams_content"
+<div class="pictograms-manager" i18n:domain="pyams_content"
 	 data-ams-plugins="pyams_content"
-	 tal:attributes="data-ams-plugin-pyams_content-src extension:resource_path('pyams_content.skin:pyams_content')">
+	 data-ams-plugin-pyams_content-async="false"
+	 tal:attributes="data-ams-plugin-pyams_content-src extension:resource_path('pyams_content.skin:pyams_content');
+					 data-ams-plugin-pyams_content-css extension:resource_path('pyams_content.skin:pyams_content_css');">
 	<fieldset class="bordered margin-x-20 col-md-5">
 		<legend class="inner" i18n:translate="">Available pictograms</legend>
 		<div class="droppable sortable height-min-100 pictograms available-pictograms viewport-y viewport-500"
 			 data-ams-droppable-accept=".pictogram">
 			<div class="draggable pictogram padding-y-5 clearfix"
 				 data-ams-draggable-connect-sortable=".pictograms"
+				 data-ams-events-handlers='{"dblclick": "PyAMS_content.pictograms.switchPictogram"}'
 				 tal:repeat="pictogram view.available_pictograms">
 				<input type="hidden" name="form.widgets.selected_pictograms:list"
 					   tal:attributes="value pictogram.__name__" />
@@ -25,6 +28,7 @@
 			 data-ams-droppable-accept=".pictogram">
 			<div class="draggable pictogram padding-y-5 clearfix"
 				 data-ams-draggable-connect-sortable=".pictograms"
+				 data-ams-events-handlers='{"dblclick": "PyAMS_content.pictograms.switchPictogram"}'
 				 tal:repeat="pictogram view.selected_pictograms">
 				<input type="hidden" name="form.widgets.selected_pictograms:list"
 					   tal:attributes="value pictogram.__name__" />