[+FEATURE] Implemented CSS based tooltip. New term type "Definition (tooltip)".
authorjocrau <jocrau@735d13b6-9817-0410-8766-e36946ffe9aa>
Sat, 6 Feb 2010 09:45:53 +0000 (09:45 +0000)
committerBastian Bringenberg <spam@bastian-bringenberg.de>
Thu, 4 Dec 2014 23:56:07 +0000 (00:56 +0100)
[-CONFIGURATION] The default CSS has moved to the static template. The default CSS for abbr, dfn, and acronym was dropped.
[~CONFIGURATION] Improved setup for tooltip. desc_short is now default. desc_long overrides it if empty.

git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/contagged/trunk@29751 735d13b6-9817-0410-8766-e36946ffe9aa

ChangeLog
README.txt
class.tx_contagged.php
ext_conf_template.txt
ext_tables.php
javascript/contagged.js
static/css/setup.txt [deleted file]
static/examples/setup.txt
static/setup.txt

index 7ce4c75..0d5db31 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
 v1.5.1 2010-01-26 Jochen Rau <jochen.rau@typoplanet.de>
 
        [+TASK] Performance optimization and refactorings after an extensive profiling session.
-       [-CONFIGURATION] Removed option 'secureFields'.
+       [!!!][-CONFIGURATION] Removed option 'secureFields'. You can apply this in the mapping: "desc_short.htmlSpecialChars = 1".
        [!!!][+CONFIGURATION] Added option 'fieldsToParse' (comma separated list of fields to be parsed by contagged again in list view).
        [!!!][~CONFIGURATION] The long description is parsed via lib.parseFunc_RTE by default only in list view. You have to uncomment the appropriate line in the TS setup if you need this also for "normal" pages.
        [!!!][~CONFIGURATION] The TS name of the datasource is taken as GET parameter value for 'source' (was the table name). Instead of 'tx_contagged[source]=tx-contagged_terms' there is now 'tx_contagged[source]=default'. The registered key and internal referrer (register:contagged_key) is now 'default_123' instead of 'tx_contagged_term_123'.
index c698bb8..2622739 100644 (file)
@@ -7,3 +7,5 @@ This extension parses your content to tag, replace and link specific terms. It i
 - The TS name of the datasource is taken as GET parameter value for 'source' (was the table name). Instead of 'tx_contagged[source]=tx-contagged_terms' there is now 'tx_contagged[source]=default'.
 - The registered key and internal referrer (register:contagged_key) is now 'default_123' instead of 'tx_contagged_term_123'.
 - You have to explicitly invoke the parser if contagged should parse also its list content. There is a new TS option 'fieldsToParse' for that.
+- The default CSS style for abbr,def,acronym was removed. The essential CSS is now loaded by default. Please check your styles in the frontend.
+- The option option 'secureFields' was removed. You have to apply this in the mapping configuration: e.g. "desc_short.htmlSpecialChars = 1".
index 6375ccf..700125e 100644 (file)
@@ -341,6 +341,7 @@ class tx_contagged extends tslib_pibase {
         */
        function registerFields($typeConfigArray,$termKey) {
                if ($typeConfigArray['stripBlockTags']>0) {
+                       $this->termsArray[$termKey]['desc_short_inline'] = $this->stripBlockTags($this->termsArray[$termKey]['desc_short']);
                        $text = $this->cObj->parseFunc($this->termsArray[$termKey]['desc_long'], array(), '< lib.parseFunc_RTE');
                        $this->termsArray[$termKey]['desc_long_inline'] = $this->stripBlockTags($text);
                }
index 02951a2..90d15f2 100644 (file)
@@ -2,4 +2,4 @@
        getImagesFromDAM = 0
        
        # cat=basic//30; type=string; label= JavaScript: The Path and filename of the JavaScript to be included on parsed pages (e.g.to display tooltips).
-       javaScriptPathAndFilename = typo3conf/ext/contagged/javascript/contagged.js
\ No newline at end of file
+       javaScriptPathAndFilename = 
\ No newline at end of file
index 2100318..463cedc 100644 (file)
@@ -10,7 +10,6 @@ t3lib_extMgm::addPlugin(array('LLL:EXT:contagged/locallang_db.php:tx_contagged_t
 // initialize static extension templates
 t3lib_extMgm::addStaticFile($_EXTKEY,'static/', 'Content parser');
 t3lib_extMgm::addStaticFile($_EXTKEY,'static/examples/', 'Experimental Setup');
-t3lib_extMgm::addStaticFile($_EXTKEY,'static/css/','Default CSS-styles');
 
 $TCA["tx_contagged_terms"] = array (
        "ctrl" => array (
index e69de29..e8f669a 100644 (file)
@@ -0,0 +1 @@
+// nothing in here, yet
\ No newline at end of file
diff --git a/static/css/setup.txt b/static/css/setup.txt
deleted file mode 100644 (file)
index a2de29d..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-###
-# These are the default CSS Styles for the contagged extension
-##
-
-plugin.tx_contagged {
-       _CSS_DEFAULT_STYLE (
-
-               acronym, abbr, dfn {
-                       font-style: normal;
-                       border-bottom: 1px dotted #333333;
-                       cursor: help;
-                       position: relative;
-               }
-               
-               div.tx-contagged-pi1 dt {
-                       font-size: 1.2em;
-               }
-               div.tx-contagged-index span {
-                       margin: 0;
-               }
-               
-               /* position:relative is necessary for correct positioning of inline descriptions */
-               span.tx-contagged-tooltip {
-                       position: relative;
-               }
-
-               /* z-index makes sure the block is the top most element */
-               span.tx-contagged-tooltip span.tx-contagged-tooltip-content {
-                       background: #EEEEEE;
-                       display: none;
-                       position: absolute;
-                       z-index: 9999;
-               }
-
-               span.tx-contagged-tooltip:hover span.tx-contagged-tooltip-content {
-                       display: inline;
-                       position: absolute;
-                       top: -1px;
-                       left: -11px;
-                       width: 300px;
-                       margin-top: -1px;
-                       border: 1px #CCCCCC solid;
-                       padding: 0px 10px 10px 10px;
-               }
-               
-       )
-}
\ No newline at end of file
index 19eae77..53ffe78 100755 (executable)
@@ -1,5 +1,3 @@
-# encoding: iso-8859-1
-
 # include class tx_contagged as library 
 includeLibs.tx_contagged = EXT:contagged/class.tx_contagged.php
 
@@ -26,6 +24,7 @@ plugin.tx_contagged {
        excludeTags = {$contagged.excludeTags}
        autoExcludeTags = {$contagged.autoExcludeTags}
        checkPreAndPostMatches = {$contagged.checkPreAndPostMatches}
+       respectCase = {$contagged.respectCase}
        addTitleAttribute = {$contagged.addTitleAttribute}
        addLangAttribute = {$contagged.addLangAttribute}
        addCssClassAttribute = {$contagged.addCssClassAttribute}
@@ -37,10 +36,10 @@ plugin.tx_contagged {
        modifier = {$contagged.modifier}
        sortField = {$contagged.sortField}
        fieldsToMap = {$contagged.fieldsToMap}
-       secureFields = {$contagged.secureFields}
+       fieldsToParse = {$contagged.fieldsToParse}
        addBackLink = {$contagged.addBackLink}
        addBackLinkDescription = {$contagged.addBackLinkDescription}
-       
+                       
        images {
                stdWrap.wrap = <div class="tx-contagged-images">|</div>
                caption.stdWrap.wrap = <div class="tx-contagged-imagecaption"> | </div>
@@ -79,8 +78,23 @@ plugin.tx_contagged {
                results_at_a_time = {$contagged.results_at_a_time}
                maxPages = {$contagged.maxPages}
                dontLinkActivePage = {$contagged.dontLinkActivePage}
+               pagefloat = {$contagged.pagefloat}
                showFirstLast = {$contagged.showFirstLast}
+               alwaysPrev = {$contagged.alwaysPrev}
                showResultCount = {$contagged.showResultCount}
+               showRange = {$contagged.showRange}
+               tableParams = {$contagged.tableParams}
+               pointerName = {$contagged.pointerName}
+               enableHtmlspecialchars = {$contagged.enableHtmlspecialchars}
+               wraps {
+                       browseBoxWrap = <div class="browseBoxWrap">|</div>
+                       showResultsWrap = <div class="showResultsWrap">|</div>
+                       browseLinksWrap = <div class="browseLinksWrap">|</div>
+                       showResultsNumbersWrap = <span class="showResultsNumbersWrap">|</span>
+                       disabledLinkWrap = <span class="disabledLinkWrap">|</span>
+                       inactiveLinkWrap = <span class="inactiveLinkWrap">|</span>
+                       activeLinkWrap = <span class="activeLinkWrap">|</span>
+               }
        }
        
        searchbox {
@@ -104,44 +118,13 @@ plugin.tx_contagged {
 
                abbrevation {
                        label = Abbrevation
-                       label.de = Abkürzung (Beispiel: u.s.w.)                 
+                       label.de = Abkürzung (Beispiel: u.s.w.)                        
                        tag = abbr
                }
                
-               dfn_block {
-                       label = Definition (tool-tip)
-                       label.de = Definition (Tool-Tip)
-                       tag = span
-                       addCssClassAttribute = 1
-                       cssClass = dfn_block
-                       stripBlockTags = 1
-                       stdWrap.innerWrap.cObject = COA
-                       stdWrap.innerWrap.cObject {
-                               10 = TEXT
-                               10.value = | <span class="tx-contagged-dfn_block-content">
-                               20 = TEXT
-                               20.data = register:contagged_matchedTerm
-                               20.typolink {
-                                       parameter.data = register:contagged_list_page
-                                       parameter.override.field = link
-                                       useCacheHash = 1
-                                       additionalParams.data = register:contagged_key
-                                       additionalParams.wrap = &tx_contagged[key]=|
-                                       additionalParams.dataWrap = |&tx_contagged[backPid]={TSFE:id}
-                               }
-                               30 = TEXT
-                               30.value = <br />
-                               40 = TEXT
-                               40.required = 1
-                               40.data = register:contagged_desc_long
-                               50 = TEXT
-                               50.value = </span>
-                       }
-               }
-
                dfn_inline {
                        label = Definition (inline)
-                       label.de = Definition (im Fließtext)
+                       label.de = Definition (im Fließtext)
                        tag = span
                        linkToListPage = 0
                        addCssClassAttribute = 1
@@ -175,7 +158,7 @@ plugin.tx_contagged {
        # 
        #       regex {
        #               label = Regular Expression
-       #               label.de = Regulärer Ausdruck
+       #               label.de = Regulärer Ausdruck
        #               linkToListPage = 1
        #               termIsRegEx = 1
        #               secureFields =
@@ -298,29 +281,30 @@ plugin.tx_contagged {
 
        _CSS_DEFAULT_STYLE (
 
-               acronym, abbr, dfn, span.tx-contagged-dfn_block, span.tx-contagged-dfn_inline {
-                       font-style: normal;
-                       border-bottom: 1px dotted #333333;
-                       cursor: help;
-                       position: relative;
+               div.tx-contagged-pi1 dt {
+                       font-size: 1.2em;
+               }
+               div.tx-contagged-index span {
+                       margin: 0;
                }
-               
                
                /* position:relative is necessary for correct positioning of inline descriptions */
-               span.tx-contagged-dfn_block {
+               span.tx-contagged-tooltip {
                        position: relative;
                }
+
                /* z-index makes sure the block is the top most element */
-               span.tx-contagged-dfn_block span.tx-contagged-dfn_block-content {
+               span.tx-contagged-tooltip span.tx-contagged-tooltip-content {
                        background: #EEEEEE;
                        display: none;
                        position: absolute;
                        z-index: 9999;
                }
-               span.tx-contagged-dfn_block:hover span.tx-contagged-dfn_block-content {
+
+               span.tx-contagged-tooltip:hover span.tx-contagged-tooltip-content {
                        display: inline;
                        position: absolute;
-                       top: -2px;
+                       top: -1px;
                        left: -11px;
                        width: 300px;
                        margin-top: -1px;
@@ -328,7 +312,6 @@ plugin.tx_contagged {
                        padding: 0px 10px 10px 10px;
                }
 
-
                span.tx-contagged-dfn_inline span.tx-contagged-dfn_block-content {
                        color: #009900;
                        display: none;
index a451e6f..3b04de9 100644 (file)
@@ -120,15 +120,13 @@ plugin.tx_contagged {
                        stdWrap.innerWrap.cObject = COA
                        stdWrap.innerWrap.cObject {
                                10 = TEXT
-                               10.value = | <span id="{register:contagged_key}" class="tx-contagged-tooltip-content"><a href="{register:contagged_link_url}">{register:contagged_matchedTerm}</a>
+                               10.value = | <span class="tx-contagged-tooltip-content"><a href="{register:contagged_link_url}">{register:contagged_matchedTerm}</a><br />
                                10.insertData = 1
-                               50 = TEXT
-                               50.value = <br />
-                               60 = TEXT
-                               60.required = 1
-                               60.data = register:contagged_desc_long_inline
-                               70 = TEXT
-                               70.value = </span>
+                               20 = TEXT
+                               20.data = register:contagged_desc_short_inline
+                               20.ifEmpty.data = register:contagged_desc_long_inline
+                               30 = TEXT
+                               30.value = </span>
                        }
                }
 
@@ -173,4 +171,41 @@ plugin.tx_contagged {
                        }
                }
        }
+}
+
+plugin.tx_contagged {
+       _CSS_DEFAULT_STYLE (
+               
+               div.tx-contagged-pi1 dt {
+                       font-size: 1.2em;
+               }
+               div.tx-contagged-index span {
+                       margin: 0;
+               }
+               
+               /* position:relative is necessary for correct positioning of inline descriptions */
+               span.tx-contagged-tooltip {
+                       position: relative;
+               }
+
+               /* z-index makes sure the block is the top most element */
+               span.tx-contagged-tooltip span.tx-contagged-tooltip-content {
+                       background: #EEEEEE;
+                       display: none;
+                       position: absolute;
+                       z-index: 9999;
+               }
+
+               span.tx-contagged-tooltip:hover span.tx-contagged-tooltip-content {
+                       display: inline;
+                       position: absolute;
+                       top: -1px;
+                       left: -11px;
+                       width: 300px;
+                       margin-top: -1px;
+                       border: 1px #CCCCCC solid;
+                       padding: 0px 10px 10px 10px;
+               }
+               
+       )
 }
\ No newline at end of file