**03.12.2012 - Plan** * Findings from an Discussion with Kay Strobach * * **Perequesites:** * native components are JS Script Components which pass Actions to ExtDirect/Rest/JSON Controller * JavaScript Files of BaseComponents need to be loaded with backend.php already * Different configurations of the same ExtJS-component must be possible, to use it on different cards (in different modules) * customisation and extension must be possible * a general API is needed * * * **Possible Solution** * LoaderComponent * always used as a Base for all Native Modules * the component added to the viewport, self a Container, Layout FIT * retrieves a component-ID on creation / as constructor * a Backend-Module-Configuration ExtDirect Provider is able to provide a list of required JavaScript-Files * BaseComponents requires JS, merges configuration array and creates the Component announced by the configuration * * Requirements on Core Site * static API allowing to register such modules * js files * configuration * name of base component * possibility to modify the registration of such modules knowing the ModuleID * generation of JS files according to the configurations * possibilty to overwrite remote configuration locally on constructor call * possibility to define destruction/store-reload on BE events (or Tree Events) * (ExtDirect Frontend to TYPO3 Registry) * (ExtDirect Frontend to ClipBoard) * ExtDirect Configuration Manager * PHP Class building the configuration files to be included (maybe instead of configuration call) * * Issues to tackle: * How to have as less requests as possible * Possible to preload as much as possible in Backend.php * registration to general Backend-Events * Versatile integration in Module-Menu * Tree click-events has to be rewritten * no click event by default * main component registers to tree on focus, deregisters to on hide * default "clickhandler library" available **08.12.2012 - Implementation** * **Current State and Ideas** * Related issue: \url{http://forge.typo3.org/issues/32309} * Related Patch: \url{https://review.typo3.org/#change,7395} * * **New Extensionmanager API** * * t3lib\_extMgm::addExtJSModule( * $\_EXTKEY, * 'web', * 'module1', * '', * array( //additional config * 'access' => 'user,group', * //'icon' => 'EXT:sitemgr/Resources/Public/Images/Backend/mod1/moduleicon.gif', * 'labels' => 'LLL:EXT:cards/Ressources/Private/Language/module1.xml:modTitle', * 'jsFiles' => array( * 'EXT:cards/Ressources/Public/JavaScripts/module1.js' * ) * ) * ); * * **JavaScript API to add a module** * * TYPO3.Viewport.ContentCards.addContentCard('web\_module1', * { * xtype: 'modulePanel', * tbar: [], * html: 'i´m the report card', * listeners: { * uriChanged: function(id, url) { * var dt = new Date(); * var buffer = 'You clicked the uid ' + id + '! <br>' + url + '<br> pushed at the following millisecond ' + dt.getMilliseconds(); * this.update(buffer); * } * } * } * ); * * **Additional Hints** * It's possible to use ExtDirect to communicate with ExtDirect * * **ToDo** * Add Autoloader Component, which automatically loads JavaScript Files
{}