-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkp/pkp-lib# Refine SideModal API, POC for legacy modals
- Loading branch information
1 parent
4d06dc1
commit ed8ce9d
Showing
11 changed files
with
243 additions
and
154 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<template> | ||
<SideModal close-label="Close" :open="isOpened" @close="close"> | ||
<SideModalBodyAjax :options="options" /> | ||
<SideModal close-label="Close" :open="isOpened2" @close="close2"> | ||
<SideModalBodyAjax :options="options2" /> | ||
</SideModal> | ||
</SideModal> | ||
</template> | ||
|
||
<script setup> | ||
import {ref} from 'vue'; | ||
import SideModal from '@/components/Modal/SideModal.vue'; | ||
import SideModalBodyAjax from '@/components/Modal/SideModalBodyAjax.vue'; | ||
const isOpened = ref(false); | ||
const isOpened2 = ref(false); | ||
const options = ref(null); | ||
const options2 = ref(null); | ||
function close() { | ||
isOpened.value = false; | ||
options.value = null; | ||
} | ||
function close2() { | ||
isOpened2.value = false; | ||
options2.value = null; | ||
} | ||
// pkp.eventBus.$emit('open-tab', tab); | ||
pkp.eventBus.$on('open-modal-vue', (_options) => { | ||
console.log('open modal vue:', _options); | ||
if (options.value) { | ||
options2.value = _options; | ||
isOpened2.value = true; | ||
return; | ||
} | ||
options.value = _options; | ||
isOpened.value = true; | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<template> | ||
<SideModalBody :secondary="true"> | ||
<template #header><h1 class="text-4xl-bold">Assign editors</h1></template> | ||
<div class="p-4"> | ||
<div class="bg-lightest p-4"> | ||
<AjaxModalWrapper :options="options" /> | ||
</div> | ||
</div> | ||
</SideModalBody> | ||
</template> | ||
|
||
<script setup> | ||
import {defineProps} from 'vue'; | ||
import SideModalBody from '@/components/Modal/SideModalBody.vue'; | ||
import AjaxModalWrapper from '@/components/Modal/AjaxModalWrapper.vue'; | ||
const {options} = defineProps({options: {type: Object, default: null}}); | ||
console.log('side modal body ajax:', options); | ||
</script> |
Oops, something went wrong.