[Neos] Event when Neos reloads content

Jan-Erik Revsbech janerik at moc.net
Mon Aug 26 20:40:48 CEST 2013


I just made a small test and there is no problem with triggering events 
with something like

$(document).trigger('T3.Neos.Event.PageLoaded');

and then listeting for this events from the Site JS.

What is the preferred naming of the event names? Then I'll create a 
patch for this.

Regards
Jan-Erik Revsbech
MOC

> ------------------------------------------------------------------------
>
> 	Christopher Hlubek <mailto:hlubek at networkteam.com>
> August 26, 2013 9:24 AM
>
>
> Hi,
>
> yes that's very important for websites with JS. I would prefer to fire 
> custom events on the window / document on:
>
> - content reload
> - switch to preview mode
> - switch back from preview mode
> - selecting / editing a node
> - unselecting a node
>
> The events should be namespaced and documented for integrators to 
> adapt the JS to work with the Neos UI.
> We just need to make sure that we check if the site JS can communicate 
> with the encapsulated jQuery we use through RequireJS.
>
> Greetings,
>
> Christopher
>
>
> _______________________________________________
> Neos mailing list
> Neos at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/neos
> ------------------------------------------------------------------------
>
> 	Christian Müller <mailto:christian.mueller at typo3.org>
> August 26, 2013 8:41 AM
>
>
> Hi Jan-Erik,
>
> Jan-Erik Revsbech wrote:
>> Hi all. I have a question I hope one of you awesome guys can helt me
>> with. On a new Neos site I'm working on, I have a need to trigger some
>> DOM manipulation via jQuery whenever the content is being reloaded by
>> Neos (ie. saving a property in the inspector panel). Don't ask why:(
>
> Why? ;) Well probably some JS init...
>
>>  From what I kan see with my very limited knowledge of the Neos backend,
>> an event is triggered via that.trigger('pageLoaded') in Application.js,
>> but I have no idea about how to catch that event anywhere. And I might
>> not even be on the right track here.
>
> That is correct. The problem is that this event "pageLoaded" is 
> triggered on an object that is purely internal and not accessible from 
> the outside. I think that has to change to allow exactly what you want 
> because that will be a common usecase with JS enriched websites.
>
>>
>> So the question is: Is it possible to register a callback function or
>> otherwise "hook in" whenever the pagecontent is relaoded by Neos?
>
> So from what I see it is currently not possible but we should change 
> that.
>
>>
>> Regards
>> Jan-Erik Revsbech
>> MOC
>
> Cheers,
> Christian
> _______________________________________________
> Neos mailing list
> Neos at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/neos
> ------------------------------------------------------------------------
>
> 	Jan-Erik Revsbech <mailto:janerik at moc.net>
> August 25, 2013 5:50 PM
>
>
> Hi all. I have a question I hope one of you awesome guys can helt me 
> with. On a new Neos site I'm working on, I have a need to trigger some 
> DOM manipulation via jQuery whenever the content is being reloaded by 
> Neos (ie. saving a property in the inspector panel). Don't ask why:(
>
> From what I kan see with my very limited knowledge of the Neos 
> backend, an event is triggered via that.trigger('pageLoaded') in 
> Application.js, but I have no idea about how to catch that event 
> anywhere. And I might not even be on the right track here.
>
> So the question is: Is it possible to register a callback function or 
> otherwise "hook in" whenever the pagecontent is relaoded by Neos?
>
> Regards
> Jan-Erik Revsbech
> MOC
> _______________________________________________
> Neos mailing list
> Neos at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/neos


More information about the Neos mailing list