Commit 008f8979 authored by Matthias Vogel's avatar Matthias Vogel Committed by Andreas Fernandez
Browse files

[BUGFIX] add document ready for initalize CardLayout

Resolves: #82385
Releases: master
Change-Id: I7bbb7066e7097b56509bbaaeee3468723420af74
Reviewed-on: https://review.typo3.org/54023

Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
parent 85837c22
......@@ -42,17 +42,20 @@ require(['jquery', 'TYPO3/CMS/Install/CardLayout'], function($, CardLayout) {
$('#' + driver).show();
}).trigger('change');
CardLayout.initialize();
// Each card head can have a t3js-require class and a data-require attribute
// with the name of a requireJS module. Those are loaded here and initialize()
// is executed if exists.
$('.t3js-require').each(function() {
var module = $(this).data('require');
require([module], function(aModule) {
if (typeof aModule.initialize !== 'undefined') {
aModule.initialize();
}
$(function(){
CardLayout.initialize();
// Each card head can have a t3js-require class and a data-require attribute
// with the name of a requireJS module. Those are loaded here and initialize()
// is executed if exists.
$('.t3js-require').each(function() {
var module = $(this).data('require');
require([module], function(aModule) {
if (typeof aModule.initialize !== 'undefined') {
aModule.initialize();
}
});
});
});
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment