Merge pull request #7943 from rekonder/aj_SCI_11155

Add legacy support for modals [SCI-11155]
This commit is contained in:
ajugo 2024-10-08 14:01:57 +02:00 committed by GitHub
commit 920505d59c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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}`"
@ -73,6 +75,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;