Commit 549c98ba authored by Nguonchhay Touch's avatar Nguonchhay Touch

[TASK] Downgrade to support typo3 neos

parent d76c0b74
Neos:
TYPO3:
Neos:
fusion:
typoScript:
autoInclude:
Medienreaktor.CookieConsent: true
Medienreaktor:
......
prototype(Neos.Neos:Page) {
prototype(TYPO3.Neos:Page) {
head {
cookieConsent = Medienreaktor.CookieConsent {
@position = 'end'
......@@ -6,47 +6,47 @@ prototype(Neos.Neos:Page) {
}
}
prototype(Medienreaktor.CookieConsent) < prototype(Neos.Fusion:Array) {
styles = Neos.Fusion:Tag {
prototype(Medienreaktor.CookieConsent) < prototype(TYPO3.TypoScript:Array) {
styles = TYPO3.TypoScript:Tag {
tagName = 'link'
attributes {
rel = 'stylesheet'
type = 'text/css'
href = Neos.Fusion:ResourceUri {
href = TYPO3.TypoScript:ResourceUri {
path = 'resource://Medienreaktor.CookieConsent/Public/Styles/cookieconsent.min.css'
}
}
@if.includeStyles = ${Configuration.setting('Medienreaktor.CookieConsent.includeStyles')}
}
javaScript = Neos.Fusion:Tag {
javaScript = TYPO3.TypoScript:Tag {
tagName = 'script'
attributes {
type = 'text/javascript'
async = 'true'
src = Neos.Fusion:ResourceUri {
src = TYPO3.TypoScript:ResourceUri {
path = 'resource://Medienreaktor.CookieConsent/Public/JavaScript/cookieconsent.min.js'
}
}
@if.includeJavaScript = ${Configuration.setting('Medienreaktor.CookieConsent.includeJavaScript')}
}
loadingScript = Neos.Fusion:Value {
loadingScript = TYPO3.TypoScript:Value {
@context {
settings = Neos.Fusion:RawArray {
settings = TYPO3.TypoScript:RawArray {
type = ${Configuration.setting('Medienreaktor.CookieConsent.settings.type')}
position = ${Configuration.setting('Medienreaktor.CookieConsent.settings.position')}
theme = ${Configuration.setting('Medienreaktor.CookieConsent.settings.theme')}
palette = ${Configuration.setting('Medienreaktor.CookieConsent.settings.palette')}
content = Neos.Fusion:RawArray {
content = TYPO3.TypoScript:RawArray {
message = ${Translation.translate('message', null, [], 'CookieConsent', Configuration.setting('Medienreaktor.CookieConsent.translationsPackage'))}
link = ${Translation.translate('link', null, [], 'CookieConsent', Configuration.setting('Medienreaktor.CookieConsent.translationsPackage'))}
allow = ${Translation.translate('allow', null, [], 'CookieConsent', Configuration.setting('Medienreaktor.CookieConsent.translationsPackage'))}
deny = ${Translation.translate('deny', null, [], 'CookieConsent', Configuration.setting('Medienreaktor.CookieConsent.translationsPackage'))}
dismiss = ${Translation.translate('dismiss', null, [], 'CookieConsent', Configuration.setting('Medienreaktor.CookieConsent.translationsPackage'))}
href = Neos.Neos:NodeUri {
href = TYPO3.Neos:NodeUri {
node = ${q(site).find(Configuration.setting('Medienreaktor.CookieConsent.informationNode')).get(0)}
@if.hasInformationNode = ${Configuration.setting('Medienreaktor.CookieConsent.informationNode') ? true : false }
}
......@@ -59,5 +59,5 @@ prototype(Medienreaktor.CookieConsent) < prototype(Neos.Fusion:Array) {
@process.wrap = ${'<script>window.addEventListener("load", function() { window.cookieconsent.initialise(' + settings + ') });</script>'}
}
@if.inFrontend = ${site.context.inBackend == false}
@if.inFrontend = ${node.context.workspace.name == 'live'}
}
{
"description": "Cookie Consent for Neos",
"type": "neos-package",
"name": "medienreaktor/cookieconsent",
"type": "typo3-flow-plugin",
"description": "Cookie Consent for Neos",
"license": "MIT",
"homepage": "https://www.medienreaktor.de",
"authors": [
......@@ -10,10 +10,16 @@
"email": "daniel.kestler@medienreaktor.de",
"homepage": "https://www.medienreaktor.de",
"role": "Developer"
},
{
"name": "Nguonchhay Touch",
"email": "nguonchhay@web-essentials.co",
"homepage": "",
"role": "Developer"
}
],
"require": {
"neos/neos": "*"
"typo3/neos": "*"
},
"extra": {
"neos": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment