[!!!][TASK] Remove deprecated `TYPO3.Popover` object 47/59347/7
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Sun, 6 Jan 2019 14:05:33 +0000 (15:05 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Mon, 7 Jan 2019 08:05:52 +0000 (09:05 +0100)
The global JavaScript object `TYPO3.Popover` has been removed.

Resolves: #87338
Related: #87193
Releases: master
Change-Id: I810711a01edd4d43820d714200a871271d4136b0
Reviewed-on: https://review.typo3.org/59347
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/backend/Resources/Private/TypeScript/Popover.ts
typo3/sysext/backend/Resources/Public/JavaScript/Popover.js
typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst

index e8ff938..b0992c0 100644 (file)
@@ -28,7 +28,10 @@ class Popover {
    */
   private readonly DEFAULT_SELECTOR: string = '[data-toggle="popover"]';
 
-  // noinspection JSMethodCanBeStatic
+  constructor() {
+    this.initialize();
+  }
+
   /**
    * Initialize
    */
@@ -118,10 +121,4 @@ class Popover {
   }
 }
 
-// create an instance, initialize and return it
-const popover: Popover = new Popover();
-popover.initialize();
-
-// @deprecated since TYPO3 v9, will be removed in TYPO3 v10 prevent global object usage
-TYPO3.Popover = popover;
-export = popover;
+export = new Popover();
index baf3e74..647c4fe 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","bootstrap"],function(t,o,e){"use strict";var p=new(function(){function t(){this.DEFAULT_SELECTOR='[data-toggle="popover"]'}return t.prototype.initialize=function(t){t=t||this.DEFAULT_SELECTOR,e(t).popover()},t.prototype.popover=function(t){t.popover()},t.prototype.setOptions=function(t,o){var e=(o=o||{}).title||t.data("title")||"",p=o.content||t.data("content")||"";t.attr("data-original-title",e).attr("data-content",p).attr("data-placement","auto").popover(o)},t.prototype.setOption=function(t,o,e){t.data("bs.popover").options[o]=e},t.prototype.show=function(t){t.popover("show")},t.prototype.hide=function(t){t.popover("hide")},t.prototype.destroy=function(t){t.popover("destroy")},t.prototype.toggle=function(t){t.popover("toggle")},t}());return p.initialize(),TYPO3.Popover=p,p});
\ No newline at end of file
+define(["require","exports","jquery","bootstrap"],function(t,o,e){"use strict";return new(function(){function t(){this.DEFAULT_SELECTOR='[data-toggle="popover"]',this.initialize()}return t.prototype.initialize=function(t){t=t||this.DEFAULT_SELECTOR,e(t).popover()},t.prototype.popover=function(t){t.popover()},t.prototype.setOptions=function(t,o){var e=(o=o||{}).title||t.data("title")||"",p=o.content||t.data("content")||"";t.attr("data-original-title",e).attr("data-content",p).attr("data-placement","auto").popover(o)},t.prototype.setOption=function(t,o,e){t.data("bs.popover").options[o]=e},t.prototype.show=function(t){t.popover("show")},t.prototype.hide=function(t){t.popover("hide")},t.prototype.destroy=function(t){t.popover("destroy")},t.prototype.toggle=function(t){t.popover("toggle")},t}())});
\ No newline at end of file
index bc3a011..a223457 100644 (file)
@@ -1072,6 +1072,7 @@ The following JavaScript modules have been removed:
 
 The following global instances have been removed:
 
+* `TYPO3.Popover` - require `TYPO3/CMS/Backend/Popover` in your AMD module
 * `TYPO3.Utility` - require `TYPO3/CMS/Backend/Utility` in your AMD module