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

[TASK] Downgrade to support typo3 neos

parent d76c0b74
Neos: TYPO3:
Neos: Neos:
fusion: typoScript:
autoInclude: autoInclude:
Medienreaktor.CookieConsent: true Medienreaktor.CookieConsent: true
Medienreaktor: Medienreaktor:
......
prototype(Neos.Neos:Page) { prototype(TYPO3.Neos:Page) {
head { head {
cookieConsent = Medienreaktor.CookieConsent { cookieConsent = Medienreaktor.CookieConsent {
@position = 'end' @position = 'end'
...@@ -6,47 +6,47 @@ prototype(Neos.Neos:Page) { ...@@ -6,47 +6,47 @@ prototype(Neos.Neos:Page) {
} }
} }
prototype(Medienreaktor.CookieConsent) < prototype(Neos.Fusion:Array) { prototype(Medienreaktor.CookieConsent) < prototype(TYPO3.TypoScript:Array) {
styles = Neos.Fusion:Tag { styles = TYPO3.TypoScript:Tag {
tagName = 'link' tagName = 'link'
attributes { attributes {
rel = 'stylesheet' rel = 'stylesheet'
type = 'text/css' type = 'text/css'
href = Neos.Fusion:ResourceUri { href = TYPO3.TypoScript:ResourceUri {
path = 'resource://Medienreaktor.CookieConsent/Public/Styles/cookieconsent.min.css' path = 'resource://Medienreaktor.CookieConsent/Public/Styles/cookieconsent.min.css'
} }
} }
@if.includeStyles = ${Configuration.setting('Medienreaktor.CookieConsent.includeStyles')} @if.includeStyles = ${Configuration.setting('Medienreaktor.CookieConsent.includeStyles')}
} }
javaScript = Neos.Fusion:Tag { javaScript = TYPO3.TypoScript:Tag {
tagName = 'script' tagName = 'script'
attributes { attributes {
type = 'text/javascript' type = 'text/javascript'
async = 'true' async = 'true'
src = Neos.Fusion:ResourceUri { src = TYPO3.TypoScript:ResourceUri {
path = 'resource://Medienreaktor.CookieConsent/Public/JavaScript/cookieconsent.min.js' path = 'resource://Medienreaktor.CookieConsent/Public/JavaScript/cookieconsent.min.js'
} }
} }
@if.includeJavaScript = ${Configuration.setting('Medienreaktor.CookieConsent.includeJavaScript')} @if.includeJavaScript = ${Configuration.setting('Medienreaktor.CookieConsent.includeJavaScript')}
} }
loadingScript = Neos.Fusion:Value { loadingScript = TYPO3.TypoScript:Value {
@context { @context {
settings = Neos.Fusion:RawArray { settings = TYPO3.TypoScript:RawArray {
type = ${Configuration.setting('Medienreaktor.CookieConsent.settings.type')} type = ${Configuration.setting('Medienreaktor.CookieConsent.settings.type')}
position = ${Configuration.setting('Medienreaktor.CookieConsent.settings.position')} position = ${Configuration.setting('Medienreaktor.CookieConsent.settings.position')}
theme = ${Configuration.setting('Medienreaktor.CookieConsent.settings.theme')} theme = ${Configuration.setting('Medienreaktor.CookieConsent.settings.theme')}
palette = ${Configuration.setting('Medienreaktor.CookieConsent.settings.palette')} 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'))} message = ${Translation.translate('message', null, [], 'CookieConsent', Configuration.setting('Medienreaktor.CookieConsent.translationsPackage'))}
link = ${Translation.translate('link', 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'))} allow = ${Translation.translate('allow', null, [], 'CookieConsent', Configuration.setting('Medienreaktor.CookieConsent.translationsPackage'))}
deny = ${Translation.translate('deny', 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'))} 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)} node = ${q(site).find(Configuration.setting('Medienreaktor.CookieConsent.informationNode')).get(0)}
@if.hasInformationNode = ${Configuration.setting('Medienreaktor.CookieConsent.informationNode') ? true : false } @if.hasInformationNode = ${Configuration.setting('Medienreaktor.CookieConsent.informationNode') ? true : false }
} }
...@@ -59,5 +59,5 @@ prototype(Medienreaktor.CookieConsent) < prototype(Neos.Fusion:Array) { ...@@ -59,5 +59,5 @@ prototype(Medienreaktor.CookieConsent) < prototype(Neos.Fusion:Array) {
@process.wrap = ${'<script>window.addEventListener("load", function() { window.cookieconsent.initialise(' + settings + ') });</script>'} @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", "name": "medienreaktor/cookieconsent",
"type": "typo3-flow-plugin",
"description": "Cookie Consent for Neos",
"license": "MIT", "license": "MIT",
"homepage": "https://www.medienreaktor.de", "homepage": "https://www.medienreaktor.de",
"authors": [ "authors": [
...@@ -10,10 +10,16 @@ ...@@ -10,10 +10,16 @@
"email": "daniel.kestler@medienreaktor.de", "email": "daniel.kestler@medienreaktor.de",
"homepage": "https://www.medienreaktor.de", "homepage": "https://www.medienreaktor.de",
"role": "Developer" "role": "Developer"
},
{
"name": "Nguonchhay Touch",
"email": "nguonchhay@web-essentials.co",
"homepage": "",
"role": "Developer"
} }
], ],
"require": { "require": {
"neos/neos": "*" "typo3/neos": "*"
}, },
"extra": { "extra": {
"neos": { "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