[FEATURE] Add identifier to callback of Wizard.addSlide() 01/47501/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Sun, 3 Apr 2016 01:31:55 +0000 (03:31 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 7 Apr 2016 11:16:09 +0000 (13:16 +0200)
The callback of ``Wizard.addSlide()`` has now a third parameter
``identifier`` holding the identifier of the current slide.

Resolves: #75386
Releases: master
Change-Id: I34dd9f176782fe88a8aaf8d6af09d019261803a9
Reviewed-on: https://review.typo3.org/47501
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Resources/Public/JavaScript/Wizard.js
typo3/sysext/core/Documentation/Changelog/master/Feature-75386-GetIdentifierInSlideCallback.rst [new file with mode: 0644]

index 9a61f48..bfd20db 100644 (file)
@@ -303,7 +303,7 @@ define(['jquery',
         */
        Wizard.runSlideCallback = function(slide, $slide) {
                if (typeof slide.callback === 'function') {
-                       slide.callback($slide, Wizard.setup.settings);
+                       slide.callback($slide, Wizard.setup.settings, slide.identifier);
                }
        };
 
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-75386-GetIdentifierInSlideCallback.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-75386-GetIdentifierInSlideCallback.rst
new file mode 100644 (file)
index 0000000..bd74384
--- /dev/null
@@ -0,0 +1,22 @@
+==================================================
+Feature: #75386 - Get identifier in slide callback
+==================================================
+
+Description
+===========
+
+The callback of :js:`Wizard.addSlide()` has now a new parameter ``identifier``.
+
+
+Impact
+======
+
+The identifier is passed to the callback function of :js:`Wizard.addSlide()`.
+
+Example code:
+
+.. code-block:: javascript
+
+       Wizard.addSlide('my-identifier', 'Foobar', '', Severity.info, function($slide, settings, identifier) {
+               console.log(identifier); // my-identifier
+       });