[TASK] Remove console.log call in ContextHelp.js 83/57383/2
authorFrank Naegler <frank.naegler@typo3.org>
Tue, 26 Jun 2018 20:19:50 +0000 (22:19 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 26 Jun 2018 20:34:08 +0000 (22:34 +0200)
Resolves: #85397
Releases: master
Change-Id: If0551d96a751474b7281c71c84262da2fa0e7816
Reviewed-on: https://review.typo3.org/57383
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Resources/Private/TypeScript/ContextHelp.ts
typo3/sysext/backend/Resources/Private/TypeScript/ContextMenu.ts
typo3/sysext/backend/Resources/Public/JavaScript/ContextHelp.js

index 8da2f89..7ccd866 100644 (file)
@@ -97,7 +97,6 @@ class ContextHelp {
       $('.popover').each((index: number, popover: Element): void => {
         const $popover = $(popover);
         if ($popover.has(e.target).length) {
-          console.log($popover.data('bs.popover'));
           this.showHelpPopup($popover.data('bs.popover').$element);
         }
       });
index 7a5a0a9..b837aa1 100644 (file)
@@ -194,7 +194,6 @@ class ContextMenu {
 
         const callbackName = $me.data('callback-action');
         const callbackModule = $me.data('callback-module');
-        // var clickItem = $(this);
         if ($me.data('callback-module')) {
           require([callbackModule], (callbackModuleCallback: any): void => {
             callbackModuleCallback[callbackName].bind($me)(this.record.table, this.record.uid);
index 127baaf..4db8bc6 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","./Popover","bootstrap"],function(t,e,o,a){"use strict";return new(function(){function t(){this.ajaxUrl=TYPO3.settings.ajaxUrls.context_help,this.trigger="click",this.placement="auto",this.selector=".t3-help-link",this.initialize()}return t.resolveBackend=function(){return void 0!==window.opener&&null!==window.opener?window.opener.top:top},t.prototype.initialize=function(){var e=this,n=t.resolveBackend();void 0!==n.TYPO3.settings.ContextHelp&&(this.helpModuleUrl=n.TYPO3.settings.ContextHelp.moduleUrl),void 0===TYPO3.ShortcutMenu&&void 0===n.TYPO3.ShortcutMenu&&o(".icon-actions-system-shortcut-new").closest(".btn").hide();var i="&nbsp;";void 0!==n.TYPO3.lang&&(i=n.TYPO3.lang.csh_tooltip_loading);var r=o(this.selector);r.attr("data-loaded","false").attr("data-html","true").attr("data-original-title",i).attr("data-placement",this.placement).attr("data-trigger",this.trigger),a.popover(r),o(document).on("show.bs.popover",this.selector,function(t){var n=o(t.currentTarget),i=n.data("description");void 0!==i&&""!==i?a.setOptions(n,{title:n.data("title"),content:i}):"false"===n.attr("data-loaded")&&n.data("table")&&e.loadHelp(n),n.closest(".t3js-module-docheader").length&&a.setOption(n,"placement","bottom")}).on("shown.bs.popover",this.selector,function(t){var e=o(t.target).data("bs.popover").$tip;e.find(".popover-title").is(":visible")||e.addClass("no-title")}).on("click",".tipIsLinked",function(t){o(".popover").each(function(a,n){var i=o(n);i.has(t.target).length&&(console.log(i.data("bs.popover")),e.showHelpPopup(i.data("bs.popover").$element))})}).on("click","body",function(t){o(e.selector).each(function(e,n){var i=o(n);i.is(t.target)||0!==i.has(t.target).length||0!==o(".popover").has(t.target).length||a.hide(i)})})},t.prototype.showHelpPopup=function(t){try{var 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(),a.hide(t),e}catch(t){}},t.prototype.loadHelp=function(t){var e=t.data("table"),n=t.data("field");e&&o.getJSON(this.ajaxUrl,{params:{action:"getContextHelp",table:e,field:n}}).done(function(e){var o=e.title||"",n=e.content||"<p></p>";a.setOptions(t,{title:o,content:n}),t.attr("data-loaded","true").one("hidden.bs.popover",function(){a.show(t)}),a.hide(t)})},t}())});
\ No newline at end of file
+define(["require","exports","jquery","./Popover","bootstrap"],function(t,e,o,n){"use strict";return new(function(){function t(){this.ajaxUrl=TYPO3.settings.ajaxUrls.context_help,this.trigger="click",this.placement="auto",this.selector=".t3-help-link",this.initialize()}return t.resolveBackend=function(){return void 0!==window.opener&&null!==window.opener?window.opener.top:top},t.prototype.initialize=function(){var e=this,a=t.resolveBackend();void 0!==a.TYPO3.settings.ContextHelp&&(this.helpModuleUrl=a.TYPO3.settings.ContextHelp.moduleUrl),void 0===TYPO3.ShortcutMenu&&void 0===a.TYPO3.ShortcutMenu&&o(".icon-actions-system-shortcut-new").closest(".btn").hide();var i="&nbsp;";void 0!==a.TYPO3.lang&&(i=a.TYPO3.lang.csh_tooltip_loading);var r=o(this.selector);r.attr("data-loaded","false").attr("data-html","true").attr("data-original-title",i).attr("data-placement",this.placement).attr("data-trigger",this.trigger),n.popover(r),o(document).on("show.bs.popover",this.selector,function(t){var a=o(t.currentTarget),i=a.data("description");void 0!==i&&""!==i?n.setOptions(a,{title:a.data("title"),content:i}):"false"===a.attr("data-loaded")&&a.data("table")&&e.loadHelp(a),a.closest(".t3js-module-docheader").length&&n.setOption(a,"placement","bottom")}).on("shown.bs.popover",this.selector,function(t){var e=o(t.target).data("bs.popover").$tip;e.find(".popover-title").is(":visible")||e.addClass("no-title")}).on("click",".tipIsLinked",function(t){o(".popover").each(function(n,a){var i=o(a);i.has(t.target).length&&e.showHelpPopup(i.data("bs.popover").$element)})}).on("click","body",function(t){o(e.selector).each(function(e,a){var i=o(a);i.is(t.target)||0!==i.has(t.target).length||0!==o(".popover").has(t.target).length||n.hide(i)})})},t.prototype.showHelpPopup=function(t){try{var 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(),n.hide(t),e}catch(t){}},t.prototype.loadHelp=function(t){var e=t.data("table"),a=t.data("field");e&&o.getJSON(this.ajaxUrl,{params:{action:"getContextHelp",table:e,field:a}}).done(function(e){var o=e.title||"",a=e.content||"<p></p>";n.setOptions(t,{title:o,content:a}),t.attr("data-loaded","true").one("hidden.bs.popover",function(){n.show(t)}),n.hide(t)})},t}())});
\ No newline at end of file