.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ================================ Browser Tutorial JavaScript (en) ================================ :Created: 2010-10-13T21:40:33 :Changed by: Dirk Wildt :Changed: 2012-12-15T00:05:14 :Classification: browser_tut_jss_en :Description: The Browser - TYPO3 without PHP - supports the using of ready JSS scripts and the integration of JavaScript frameworks like jquery. This tutorials has some examples for AJAX, own Designs with jQuery and t3jquery in principle. :Keywords: forAdmins, forDevelopers, forBeginners, forAdvanced, browser, tutorial, typo3 without php, ajax, jss, javascript, jquery, t3jquery :Author: Dirk Wildt - Die Netzmacher :Email: http://wildt.at.die-netzmacher.de :Website: http://die-netzmacher.de :Language: en |img-1| |img-2| Browser Tutorial JavaScript (en)|img-3| .. _Browser-Tutorial-JavaScript-en: Browser Tutorial JavaScript (en) ================================ The Browser - TYPO3 without PHP - supports the using of ready JSS scripts and the integration of JavaScript frameworks like jquery. This tutorials has some examples for AJAX, own Designs with jQuery and t3jquery in principle. |img-4| Version: 4.2.0, 2012-12-14 Extension Key: browser\_tut\_jss\_en - Tutorial for the extension Browser (extkey: browser) Language: en Keywords: forAdmins, forDevelopers, forBeginners, forAdvanced, browser, tutorial, typo3 without php, ajax, jss, javascript, jquery, t3jquery Copyright 2010-2012, Dirk Wildt - Die Netzmacher, This document is published under the Open Content License available from `http://www.opencontent.org/opl.shtml `_ The content of this document is related to TYPO3 a GNU/GPL CMS/Framework available from `www.typo3.org `_ .. _Table-of-Contents: Table of Contents ----------------- `Browser Tutorial JavaScript (en) 1 <#__RefHeading__1165_1172745218>`_ `Screen shots 3 <#__RefHeading__1167_1172745218>`_ `AJAX configuration with the Browser plugin 3 <#__RefHeading__5017_1666017150>`_ `Introduction 4 <#__RefHeading__1513_1172745218>`_ `What does it do? 4 <#__RefHeading__1169_1172745218>`_ `Online examples 4 <#__RefHeading__2249_2006342602>`_ `Further information 4 <#__RefHeading__1171_1172745218>`_ `Using T3 jQuery 5 <#__RefHeading__2454_572739266>`_ `Installation 5 <#__RefHeading__2532_572739266>`_ `Configuration 5 <#__RefHeading__2534_572739266>`_ `Use another JavaScript Framework 7 <#__RefHeading__2458_572739266>`_ `Using AJAX by the TYPO3-Browser 8 <#__RefHeading__1177_1172745218>`_ `Views 8 <#__RefHeading__2682_572739266>`_ `Search Engine Optimisation (SEO) 8 <#__RefHeading__1263_2006342602>`_ `Configuration 9 <#__RefHeading__11013_1112387226>`_ `With your own HTML and CSS 10 <#__RefHeading__799_1112387226>`_ `Limitations 13 <#__RefHeading__3723_2139160512>`_ `Using jQuery UI and themes 15 <#__RefHeading__11025_1112387226>`_ `Nothing by default 15 <#__RefHeading__5801_1788721463>`_ `Configure jQuery UI 15 <#__RefHeading__5803_1788721463>`_ `Configure Your Theme 15 <#__RefHeading__5805_1788721463>`_ `Plugins 17 <#__RefHeading__5807_1788721463>`_ `jsTree 17 <#__RefHeading__7436_730459193>`_ `Debugging 18 <#__RefHeading__7438_730459193>`_ `In the frontend 18 <#__RefHeading__1273_2006342602>`_ `DRS – Development Reporting System 19 <#__RefHeading__1277_2006342602>`_ `Reference 21 <#__RefHeading__55058_1116738509>`_ `Completely Browser Reference 21 <#__RefHeading__44233_603351207>`_ `JavaScript 21 <#__RefHeading__55060_1116738509>`_ `Master Template 22 <#__RefHeading__55062_1116738509>`_ `What's new in Version 4.x? 23 <#__RefHeading__12976_63241639>`_ `OpenStreetMap 23 <#__RefHeading__12978_63241639>`_ `Helpful Suggestions 24 <#__RefHeading__1283_2006342602>`_ `FAQ 25 <#__RefHeading__11027_1112387226>`_ `In Principle 25 <#__RefHeading__2205_660334555>`_ `Debugging 25 <#__RefHeading__2207_660334555>`_ `About the Authors 26 <#__RefHeading__2259_2006342602>`_ `Frank Sander 26 <#__RefHeading__11029_1112387226>`_ `Dirk Wildt 26 <#__RefHeading__11031_1112387226>`_ `Change log 27 <#__RefHeading__3727_2139160512>`_ `Illustration Index 28 <#__RefHeading__3729_2139160512>`_ .. _Screen-shots: Screen shots ------------ .. _AJAX-configuration-with-the-Browser-plugin: AJAX configuration with the Browser plugin ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |img-5| |img-5| .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ |img-6| Illustration 3: Tutorial in PDF format This is a tutorial for the extension Browser (extkey: browser). It is an manual how to use jQuery and AJAX functionality for your database only. .. _Online-examples: Online examples ^^^^^^^^^^^^^^^ Test AJAX on - `http://gruene-autos.org/ `_ - `http://typo3-quick-shop.de/ `_ .. _Further-information: Further information ^^^^^^^^^^^^^^^^^^^ .. _This-tutorial-in-PDF-format: This tutorial in PDF format """"""""""""""""""""""""""" You find this tutorial as a PDF file at PDF: `http://typo3-browser.de/en/browser-tutorials/ `_ Look for "JavaScript" or "jss". .. _Browser-manual-and-Browser-tutorial-basics: Browser manual and Browser tutorial basics """""""""""""""""""""""""""""""""""""""""" The Browser has more than 600 pages manual and tutorials. You get an overview at: `http://typo3-browser.de/en/browser-tutorials/ `_ .. _Forum: Forum """"" |img-7| Illustration 4: The TYPO3-Browser Forum The Browser has its own forum (leading language is German). You are welcome to post any question, bug or snippet code at Browser – TYPO3 without PHP: Forum `http://typo3-browser-forum.de/ `_ .. _Using-T3-jQuery: Using T3 jQuery --------------- If you like to use frontend features supported by JavaScript like AJAX or effects like an accordion, you should use a JavaScript framework. It is recommended to use T3 jQuery, but you can use any other framework too. .. _Installation: Installation ^^^^^^^^^^^^ |img-5| - Please import T3 jQuery by the extension manager. - Install T3 jQuery. .. _Configuration: Configuration ^^^^^^^^^^^^^ .. _Extension-Manager: Extension Manager """"""""""""""""" |img-5| .. _Enable-Features: Enable Features ~~~~~~~~~~~~~~~ - [X] Always integrate jQuery (recommended) - [ ] Integrate jQuery to footer **// Don't integrate jQuery to footer!** .. _Typography: Typography ~~~~~~~~~~ Take the latest versions Reload the TYPO3 backend. The t3jqeury icon will appear in the section of the admin tools. .. _Setup: Setup """"" Setup by the T3 jQuery setup (admin tool) |img-5| .. _Select-extensions: Select extensions ~~~~~~~~~~~~~~~~~ Please select [Process and Analyse T3 jQuery.txt in extensions]and select the extensions, which are supported by T3 jQuery. It is recommended to select all. - [X] Browser – TYPO3 without PHP - [X] ... - Press [Select all] - Presse [Check] - Press [Merge & Use] .. _Compile-T3-jQuery: Compile T3 jQuery ~~~~~~~~~~~~~~~~~ |img-5| - Make use of the proposal or adapt the suggested configuration to your needs. - Press [Create jQuery Library] .. _TYPO3-Browser: TYPO3-Browser ~~~~~~~~~~~~~ The TYPO3-Browser inspects while runtime, if T3 jQuery is enabled. If it is, the Browser will use the jQuery library of T3 jQuery, if not, the Browser will use its own jQuery library. .. _Use-another-JavaScript-Framework: Use another JavaScript Framework ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If you like to use your own JavaScript framework, please configure the TYPO3 Browser not to include any JavaScript file by default. .. _TypoScript: TypoScript """""""""" Please remove the jQuery library. // Remove the default jQuery library plugin.tx\_browser\_pi1.javascript.jquery.library > // Remove jQuery plugins plugin.tx\_browser\_pi1.javascript.jquery.plugins > Or set the path to your JavaScript framework: // Using the TYPO3 Browser property (it is limited for one file only) plugin.tx\_browser\_pi1.javascript.jquery.library = fileadmin/myJssFramework/jquery-1.6.2.min.js // Using the TYPO3 API property (amount of files is unlimited) page.includeJSS { ... } .. _Using-AJAX-by-the-TYPO3-Browser: Using AJAX by the TYPO3-Browser ------------------------------- The Browser enables to publish data in list views and single views. With the AJAX feature, it is possible to present both views on the same page at the same time or alternatively. Views can collapsed. See the online examples at - `http://gruene-autos.org/ `_ - `http://typo3-quick-shop.de/ `_ AJAX is configured by the plugin (flexform) of the Browser. It should be comfortable. Furthermore you can configure AJAX by TypoScript. .. _Views: Views ^^^^^ .. _AJAX-list-view: AJAX list view """""""""""""" Browser's basic use of AJAX enhances the list view in a way, that the surrounding page won't need to be reloaded at any action. Every link will reload the list view at it's place only. .. _AJAX-single-view: AJAX single view """""""""""""""" In addition you can use AJAX for single views too. Advantage You could create some fancy layout for galleries etc. with list view and single view on the same page. Disadvantage Your single views won't have an unique URL in the address field of your browser. .. _Search-Engine-Optimisation-SEO: Search Engine Optimisation (SEO) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Search Engine Optimisation (SEO) should be perfect! Every record of your data get a link to a single view - with AJAX and without AJAX. Every single view link is available - even you have enabled AJAX. You can promote every item with its single view link! Search Engine Optimisation (SEO) should be perfect! .. _Configuration: Configuration ^^^^^^^^^^^^^ You have to configure AJAX properties with - the tab [JavaScript/AJAX] in the Browser flexform and - four lines TypoScript in your page template .. _Flexform: Flexform """""""" |img-5| Content Element Plugin Plugin Browser Tab [JavaScript/AJAX] Embed jQuery library Embed Browser JavaScript libraries Enable list view or list and single view for AJAX Link to this turorial Checklist: You need a special page object (see below) Configure collapsing for the list view Configure collapsing for the single view Display list view and single view at the same time or alternatively .. _Page: Page """" .. _TypoScript-snippet: TypoScript snippet ~~~~~~~~~~~~~~~~~~ You find the snippet in the extension folder of the Browser at: res/ts/ajaxPage.txt ////////////////////////////////////////// // // AJAX page object [globalString = GP:tx\_browser\_pi1\|segment=single]\|\| [globalString = GP:tx\_browser\_pi1\|segment=list]\|\| [globalString = GP:tx\_browser\_pi1\|segment=searchform] // Don't handle header of content element lib.stdheader > // Don't wrap content element with a default div tt\_content.stdWrap > // Don't prefix the content element with a comment tt\_content.list.20.stdWrap.prefixComment > // Remove the current page obeject page > // Create a page object for AJAX page < plugin.tx\_browser\_pi1.javascript.ajax.page [global] // AJAX page object .. _Order-of-JavaScript-files: Order of JavaScript files """"""""""""""""""""""""" First the JavaScript files of jQuery have to be loaded. Then – after this – the JavaScript files of the Browser have to be loaded. .. _With-your-own-HTML-and-CSS: With your own HTML and CSS ^^^^^^^^^^^^^^^^^^^^^^^^^^ You don't have to do nothing from below, if you are using the HTML default templates and the inline CSS of the Browser. If you are using your own HTML and CSS take care about the following. .. _HTML: HTML """" .. _Obligated-marker: Obligated marker ~~~~~~~~~~~~~~~~ If you like to create a new template, please take the HTML files as the draft: - res/default\_ul.tmpl - res/sample\_ttnews.tmpl **###LIST\_TITLE###** Wrap all items above the search form with the subpart ###LIST\_TITLE### like shown in the HTML snippet below. This subpart marker ###LIST\_TITLE###avoids, that items of the list view will be displayed in the AJAX single view again. HTML Snippet ###MY\_TITLE### ... **List area** The list views of the default Browser templates are wrapped by the tag
\|
. If you use your own HTML template, you have to add this div-tag. You have to insert the start div-tag behind the subpart marker .You have to insert the end div-tag before the subpart marker . See the snippet below. HTML Snippet ... **
** ...
** ** .. _Obligated-classes: Obligated classes ~~~~~~~~~~~~~~~~~ **Reset Button** The reset button needs the class "reset". See the HTML Snippet below: