mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-26 22:04:23 +00:00
work on popups
This commit is contained in:
@@ -1,30 +1,34 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="popup-backdrop" :class="status">
|
<div id="popup-backdrop">
|
||||||
<div class="popup-container">
|
<div class="popup-container">
|
||||||
<div class="popup" :class="size">
|
<div class="popup" :class="size">
|
||||||
<span class="material-symbols-outlined" @click="closePopup();">close</span>
|
<div class="close-wrapper"><span class="material-symbols-outlined close-button" @click="closePopup();">close</span></div>
|
||||||
<div class="message-container">
|
<div class="message-container">
|
||||||
{{ message }}
|
{{ data }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- Options to be passed in: HTML, Settings (for settings component), strings, numbers, confirm, radio, dropdowns, selection -->
|
<!-- Options to be passed in: html, settings (for settings component), strings, numbers, confirm, radio, dropdowns, selection -->
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'popups',
|
name: 'popups',
|
||||||
prop: {
|
props: {
|
||||||
size: {
|
size: {
|
||||||
type: String,
|
type: String,
|
||||||
'default': 'normal',
|
'default': 'normal',
|
||||||
},
|
},
|
||||||
message: {
|
contentType: {
|
||||||
type: Object,
|
type: String,
|
||||||
'default': '{}',
|
'default': 'string'
|
||||||
},
|
},
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
'default': {}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -33,10 +37,10 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closePopup() {
|
closePopup() {
|
||||||
this.shown = 'hidden'
|
$( '#popup-backdrop' ).fadeOut( 300 );
|
||||||
},
|
},
|
||||||
openPopup () {
|
openPopup () {
|
||||||
|
$( '#popup-backdrop' ).fadeIn( 300 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -54,10 +58,6 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shown {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-container {
|
.popup-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -67,6 +67,22 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.close-wrapper {
|
||||||
|
width: 100%;
|
||||||
|
height: 5%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-end;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-button {
|
||||||
|
margin-right: 1vw;
|
||||||
|
margin-top: 2vw;
|
||||||
|
font-size: 200%;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.popup {
|
.popup {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<button @click="openPopup()">Open Popup</button>
|
||||||
<popups ref="popup"></popups>
|
<popups ref="popup"></popups>
|
||||||
<notifications ref="notification" location="topright"></notifications>
|
<notifications ref="notification" location="topright"></notifications>
|
||||||
</div>
|
</div>
|
||||||
@@ -78,6 +79,12 @@
|
|||||||
return {
|
return {
|
||||||
event: { 'name': 'TestEvent', 'description': 'This is a description for the TestEvent to test multiline support and proper positioning of the Fields', 'freeSeats': 2, 'maxSeats': 2, 'date':'TestDate', 'startingPrice':15, 'location': 'TestLocation', 'eventID': 'test', 'currency': 'CHF', 'logo': 'logo.png', 'categories': { '1': { 'price': { '1': { 'price':25, 'name':'Child (0-15.99 years)'}, '2': { 'price':35, 'name':'Adult'} }, 'bg': 'black', 'fg': 'white', 'name': 'Category 1' }, '2': { 'price': { '1': { 'price':25, 'name':'Child (0-15.99 years)' }, '2': { 'price':35, 'name':'Adult'} }, 'bg': 'green', 'fg': 'white', 'name': 'Category 2' } } },
|
event: { 'name': 'TestEvent', 'description': 'This is a description for the TestEvent to test multiline support and proper positioning of the Fields', 'freeSeats': 2, 'maxSeats': 2, 'date':'TestDate', 'startingPrice':15, 'location': 'TestLocation', 'eventID': 'test', 'currency': 'CHF', 'logo': 'logo.png', 'categories': { '1': { 'price': { '1': { 'price':25, 'name':'Child (0-15.99 years)'}, '2': { 'price':35, 'name':'Adult'} }, 'bg': 'black', 'fg': 'white', 'name': 'Category 1' }, '2': { 'price': { '1': { 'price':25, 'name':'Child (0-15.99 years)' }, '2': { 'price':35, 'name':'Adult'} }, 'bg': 'green', 'fg': 'white', 'name': 'Category 2' } } },
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
openPopup() {
|
||||||
|
console.log( 'opening' );
|
||||||
|
this.$refs.popup.openPopup();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user