diff --git a/flask_appbuilder/templates/appbuilder/general/lib.html b/flask_appbuilder/templates/appbuilder/general/lib.html index 6d4638966b..c8d5541a96 100644 --- a/flask_appbuilder/templates/appbuilder/general/lib.html +++ b/flask_appbuilder/templates/appbuilder/general/lib.html @@ -1,10 +1,10 @@ {% macro render_additional_links(additional_links, pk) %} - {% if additional_links %} - {% for item in additional_links %} - - {{_(item.label)}} - {% endfor %} - {% endif %} + {% if additional_links %} + {% for item in additional_links %} + + {{_(item.label)}} + {% endfor %} + {% endif %} {% endmacro %} {% macro render_action_links(actions, pk, modelview_name) %} @@ -59,7 +59,7 @@ {{_('Actions')}}
- + $('.{{action.name}}_menu_item').on('click', function(){ + {% if action.confirmation %} + return modelActions.execute_multiple('{{action.name}}','{{action.confirmation}}'); + {% else %} + return modelActions.execute_multiple('{{action.name}}', false); + {% endif %} + }) + {% endfor %} + }); + {% endif %} {% endmacro %} @@ -94,7 +98,7 @@ {{_('Page size')}}