mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
notification toggle read: correct js syntax
This commit is contained in:
parent
c7762dd6d2
commit
f2744fba43
@ -8,30 +8,31 @@ window.addEventListener('DOMContentLoaded', function (e) {
|
|||||||
document.querySelectorAll('.notification_toggle_read_status')
|
document.querySelectorAll('.notification_toggle_read_status')
|
||||||
.forEach(function (el, i) {
|
.forEach(function (el, i) {
|
||||||
createApp({
|
createApp({
|
||||||
template: '<notification-read-toggle ' +
|
template: `<notification-read-toggle
|
||||||
':notificationId="notificationId" ' +
|
:notificationId="notificationId"
|
||||||
':buttonClass="buttonClass" ' +
|
:buttonClass="buttonClass"
|
||||||
':buttonNoText="buttonNoText" ' +
|
:buttonNoText="buttonNoText"
|
||||||
':showUrl="showUrl" ' +
|
:showUrl="showUrl"
|
||||||
':isRead="isRead"' +
|
:isRead="isRead"
|
||||||
'@markRead="onMarkRead" @markUnread="onMarkUnread"' +
|
@markRead="onMarkRead"
|
||||||
'></notification-read-toggle>',
|
@markUnread="onMarkUnread">
|
||||||
|
</notification-read-toggle>`,
|
||||||
components: {
|
components: {
|
||||||
NotificationReadToggle,
|
NotificationReadToggle,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
notificationId: +el.dataset.notificationId,
|
notificationId: el.dataset.notificationId,
|
||||||
buttonClass: el.dataset.buttonClass,
|
buttonClass: el.dataset.buttonClass,
|
||||||
buttonNoText: 'false' === el.dataset.buttonText,
|
buttonNoText: 'false' === el.dataset.buttonText,
|
||||||
showUrl: el.dataset.showButtonUrl,
|
showUrl: el.dataset.showButtonUrl,
|
||||||
isRead: 1 === +el.dataset.notificationCurrentIsRead,
|
isRead: 1 === el.dataset.notificationCurrentIsRead,
|
||||||
container: el.dataset.container
|
container: el.dataset.container
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
getContainer() {
|
getContainer() {
|
||||||
return document.querySelectorAll('div.' + this.container);
|
return document.querySelectorAll(`div.${this.container}`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -81,7 +81,7 @@ export default {
|
|||||||
/// [Option] showUrl is href for show page second button.
|
/// [Option] showUrl is href for show page second button.
|
||||||
// When passed, the component return a button-group with 2 buttons.
|
// When passed, the component return a button-group with 2 buttons.
|
||||||
isButtonGroup() {
|
isButtonGroup() {
|
||||||
return !!this.showUrl
|
return !this.showUrl;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user