Add legacy support for modals [SCI-11155]

This commit is contained in:
Andrej 2024-10-08 13:50:12 +02:00
parent fc506839e1
commit 7ee3f10247

View file

@ -11,6 +11,8 @@
<a :class="`rounded flex gap-2 items-center py-1.5 px-1.5 xl:px-2.5 hover:text-sn-white hover:bg-sn-blue <a :class="`rounded flex gap-2 items-center py-1.5 px-1.5 xl:px-2.5 hover:text-sn-white hover:bg-sn-blue
bg-sn-white color-sn-blue hover:no-underline focus:no-underline ${action.button_class}`" bg-sn-white color-sn-blue hover:no-underline focus:no-underline ${action.button_class}`"
:href="(['link', 'remote-modal']).includes(action.type) ? action.path : '#'" :href="(['link', 'remote-modal']).includes(action.type) ? action.path : '#'"
:data-target="action.target"
:data-toggle="action.type === 'modal' && 'modal'"
:id="action.button_id" :id="action.button_id"
:title="action.label" :title="action.label"
:data-e2e="`e2e-BT-actionToolbar-${action.name}`" :data-e2e="`e2e-BT-actionToolbar-${action.name}`"
@ -64,6 +66,9 @@ export default {
this.$emit('toolbar:action', action); this.$emit('toolbar:action', action);
// do nothing, this is handled by legacy code based on the button class // do nothing, this is handled by legacy code based on the button class
break; break;
case 'modal':
// do nothihg, boostrap modal handled by data-toggle="modal" and data-target
break;
case 'link': case 'link':
// do nothing, already handled by href // do nothing, already handled by href
break; break;