diff --git a/Build/Sources/TypeScript/backend/Resources/Public/TypeScript/ContextHelp.ts b/Build/Sources/TypeScript/backend/Resources/Public/TypeScript/ContextHelp.ts index 3328d6668885b397334c6f5f4d32803028466ab7..b09b18a91a1080fb465c7bf57e30cf0b15ca0f70 100644 --- a/Build/Sources/TypeScript/backend/Resources/Public/TypeScript/ContextHelp.ts +++ b/Build/Sources/TypeScript/backend/Resources/Public/TypeScript/ContextHelp.ts @@ -127,7 +127,8 @@ class ContextHelp { const cshWindow = window.open( this.helpModuleUrl + '&table=' + $trigger.data('table') + - '&field=' + $trigger.data('field'), + '&field=' + $trigger.data('field') + + '&action=detail', 'ContextHelpWindow', 'height=400,width=600,status=0,menubar=0,scrollbars=1', ); diff --git a/typo3/sysext/backend/Classes/Domain/Repository/TableManualRepository.php b/typo3/sysext/backend/Classes/Domain/Repository/TableManualRepository.php index e1b709af65cb4e8b30ec041790ddaffb1000be8c..be427688a1db2cadf33511c2b898718ea71c9cea 100644 --- a/typo3/sysext/backend/Classes/Domain/Repository/TableManualRepository.php +++ b/typo3/sysext/backend/Classes/Domain/Repository/TableManualRepository.php @@ -306,7 +306,8 @@ class TableManualRepository 'internal' => true, 'arguments' => [ 'table' => $table, - 'field' => $field + 'field' => $field, + 'action' => 'detail', ], 'title' => $label ]; diff --git a/typo3/sysext/backend/Resources/Private/Partials/ContextSensitiveHelp/Manual.html b/typo3/sysext/backend/Resources/Private/Partials/ContextSensitiveHelp/Manual.html index e08b0830bf1257ee2c724319d393dfcf3f16bbaf..5d60234b3f76a603c38172b78b775f69a0a0c78f 100644 --- a/typo3/sysext/backend/Resources/Private/Partials/ContextSensitiveHelp/Manual.html +++ b/typo3/sysext/backend/Resources/Private/Partials/ContextSensitiveHelp/Manual.html @@ -1,45 +1,48 @@ -<a id="{manual.table}{f:if(condition:manual.field,then:'.{manual.field}')}"></a> +<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" + xmlns:be="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers" + data-namespace-typo3-fluid="true"> + <a id="{manual.table}{f:if(condition:manual.field,then:'.{manual.field}')}"></a> -<h2>{manual.headerLine}</h2> -<p>{manual.content -> f:format.htmlentities() -> f:format.raw()}</p> + <h2>{manual.headerLine}</h2> + <p>{manual.content -> f:format.htmlentities() -> f:format.raw()}</p> -<f:if condition="{manual.configuration.details}"> - <h3><f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_view_help.xlf:details" /></h3> - <p>{manual.configuration.details -> f:format.stripTags(allowedTags:'<strong><em><b><i>') -> f:format.nl2br()}</p> -</f:if> + <f:if condition="{manual.configuration.details}"> + <h3><f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_view_help.xlf:details" /></h3> + <p>{manual.configuration.details -> f:format.stripTags(allowedTags:'<strong><em><b><i>') -> f:format.nl2br()}</p> + </f:if> -<f:if condition="{manual.configuration.syntax}"> - <h3><f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_view_help.xlf:syntax" /></h3> - {manual.configuration.syntax -> f:format.raw()} -</f:if> + <f:if condition="{manual.configuration.syntax}"> + <h3><f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_view_help.xlf:syntax" /></h3> + {manual.configuration.syntax -> f:format.raw()} + </f:if> -<f:if condition="{manual.images}"> - <f:for each="{manual.images}" as="image"> - <div> - <img src="../{image.image}" class="img-responsive" /> - <f:if condition="{image.description}"> - <p>{image.description}</p> - </f:if> - </div> - </f:for> - {manual.configuration.syntax -> f:format.raw()} -</f:if> - -<f:if condition="{manual.seeAlso}"> - <h3><f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_view_help.xlf:seeAlso" /></h3> - <ul> - <f:for each="{manual.seeAlso}" as="link"> - <li> - <f:if condition="{link.internal}"> - <f:then> - <f:link.action action="detail" arguments="{link.arguments}">{link.title}</f:link.action> - </f:then> - <f:else> - <a href="{link.url}" target="{link.target}">{link.title}</a> - </f:else> + <f:if condition="{manual.images}"> + <f:for each="{manual.images}" as="image"> + <div> + <img src="../{image.image}" class="img-responsive" /> + <f:if condition="{image.description}"> + <p>{image.description}</p> </f:if> - - </li> + </div> </f:for> - </ul> -</f:if> + {manual.configuration.syntax -> f:format.raw()} + </f:if> + + <f:if condition="{manual.seeAlso}"> + <h3><f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_view_help.xlf:seeAlso" /></h3> + <ul> + <f:for each="{manual.seeAlso}" as="link"> + <li> + <f:if condition="{link.internal}"> + <f:then> + <a href="{be:moduleLink(route: 'help_cshmanual', arguments: link.arguments)}">{link.title}</a> + </f:then> + <f:else> + <a href="{link.url}" target="{link.target}">{link.title}</a> + </f:else> + </f:if> + </li> + </f:for> + </ul> + </f:if> +</html> diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/ContextHelp.js b/typo3/sysext/backend/Resources/Public/JavaScript/ContextHelp.js index ec457db4be45c70df97a42a524722951a73a2c6f..07d3166f736a0b6453245dac7ff8d9428f50752e 100644 --- a/typo3/sysext/backend/Resources/Public/JavaScript/ContextHelp.js +++ b/typo3/sysext/backend/Resources/Public/JavaScript/ContextHelp.js @@ -10,4 +10,4 @@ * * The TYPO3 project - inspiring people to share! */ -define(["require","exports","jquery","TYPO3/CMS/Core/Ajax/AjaxRequest","./Popover","bootstrap"],(function(t,e,o,a,s){"use strict";class i{constructor(){this.ajaxUrl=TYPO3.settings.ajaxUrls.context_help,this.trigger="click",this.placement="auto",this.selector=".help-link",this.initialize()}static resolveBackend(){return void 0!==window.opener&&null!==window.opener?window.opener.top:top}initialize(){const t=i.resolveBackend();void 0!==t.TYPO3.settings.ContextHelp&&(this.helpModuleUrl=t.TYPO3.settings.ContextHelp.moduleUrl),void 0===TYPO3.ShortcutMenu&&void 0===t.TYPO3.ShortcutMenu&&o(".icon-actions-system-shortcut-new").closest(".btn").hide();let e=" ";void 0!==t.TYPO3.lang&&(e=t.TYPO3.lang.csh_tooltip_loading);const a=o(this.selector);a.attr("data-loaded","false").attr("data-html","true").attr("data-original-title",e).attr("data-placement",this.placement).attr("data-trigger",this.trigger),s.popover(a),o(document).on("show.bs.popover",this.selector,t=>{const e=o(t.currentTarget),a=e.data("description");void 0!==a&&""!==a?s.setOptions(e,{title:e.data("title"),content:a}):"false"===e.attr("data-loaded")&&e.data("table")&&this.loadHelp(e),e.closest(".t3js-module-docheader").length&&s.setOption(e,"placement","bottom")}).on("shown.bs.popover",this.selector,t=>{const e=o(t.target).data("bs.popover").$tip;e.find(".popover-title").is(":visible")||e.addClass("no-title")}).on("click",".help-has-link",t=>{o(".popover").each((e,a)=>{const s=o(a);s.has(t.target).length&&this.showHelpPopup(s.data("bs.popover").$element)})}).on("click","body",t=>{o(this.selector).each((e,a)=>{const i=o(a);i.is(t.target)||0!==i.has(t.target).length||0!==o(".popover").has(t.target).length||s.hide(i)})})}showHelpPopup(t){try{const e=window.open(this.helpModuleUrl+"&table="+t.data("table")+"&field="+t.data("field"),"ContextHelpWindow","height=400,width=600,status=0,menubar=0,scrollbars=1");return e.focus(),s.hide(t),e}catch(t){}}loadHelp(t){const e=t.data("table"),o=t.data("field");e&&new a(this.ajaxUrl).withQueryArguments({params:{action:"getContextHelp",table:e,field:o}}).get().then(async e=>{const o=await e.resolve(),a=o.title||"",i=o.content||"<p></p>";s.setOptions(t,{title:a,content:i}),t.attr("data-loaded","true").one("hidden.bs.popover",()=>{s.show(t)}),s.hide(t)})}}return new i})); \ No newline at end of file +define(["require","exports","jquery","TYPO3/CMS/Core/Ajax/AjaxRequest","./Popover","bootstrap"],(function(t,e,o,a,s){"use strict";class i{constructor(){this.ajaxUrl=TYPO3.settings.ajaxUrls.context_help,this.trigger="click",this.placement="auto",this.selector=".help-link",this.initialize()}static resolveBackend(){return void 0!==window.opener&&null!==window.opener?window.opener.top:top}initialize(){const t=i.resolveBackend();void 0!==t.TYPO3.settings.ContextHelp&&(this.helpModuleUrl=t.TYPO3.settings.ContextHelp.moduleUrl),void 0===TYPO3.ShortcutMenu&&void 0===t.TYPO3.ShortcutMenu&&o(".icon-actions-system-shortcut-new").closest(".btn").hide();let e=" ";void 0!==t.TYPO3.lang&&(e=t.TYPO3.lang.csh_tooltip_loading);const a=o(this.selector);a.attr("data-loaded","false").attr("data-html","true").attr("data-original-title",e).attr("data-placement",this.placement).attr("data-trigger",this.trigger),s.popover(a),o(document).on("show.bs.popover",this.selector,t=>{const e=o(t.currentTarget),a=e.data("description");void 0!==a&&""!==a?s.setOptions(e,{title:e.data("title"),content:a}):"false"===e.attr("data-loaded")&&e.data("table")&&this.loadHelp(e),e.closest(".t3js-module-docheader").length&&s.setOption(e,"placement","bottom")}).on("shown.bs.popover",this.selector,t=>{const e=o(t.target).data("bs.popover").$tip;e.find(".popover-title").is(":visible")||e.addClass("no-title")}).on("click",".help-has-link",t=>{o(".popover").each((e,a)=>{const s=o(a);s.has(t.target).length&&this.showHelpPopup(s.data("bs.popover").$element)})}).on("click","body",t=>{o(this.selector).each((e,a)=>{const i=o(a);i.is(t.target)||0!==i.has(t.target).length||0!==o(".popover").has(t.target).length||s.hide(i)})})}showHelpPopup(t){try{const e=window.open(this.helpModuleUrl+"&table="+t.data("table")+"&field="+t.data("field")+"&action=detail","ContextHelpWindow","height=400,width=600,status=0,menubar=0,scrollbars=1");return e.focus(),s.hide(t),e}catch(t){}}loadHelp(t){const e=t.data("table"),o=t.data("field");e&&new a(this.ajaxUrl).withQueryArguments({params:{action:"getContextHelp",table:e,field:o}}).get().then(async e=>{const o=await e.resolve(),a=o.title||"",i=o.content||"<p></p>";s.setOptions(t,{title:a,content:i}),t.attr("data-loaded","true").one("hidden.bs.popover",()=>{s.show(t)}),s.hide(t)})}}return new i})); \ No newline at end of file