Actions
Bug #68891
closedLoading JavaScript libraries in Backend
Start date:
2015-08-09
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
I have the following - trying to use jQuery UI Sortable:
<f:be.container includeRequireJsModules="{0: 'TYPO3/CMS/Backend/Modal', 1: 'TYPO3/CMS/Core/Contrib/jquery-ui/core', 2: 'TYPO3/CMS/Core/Contrib/jquery-ui/sortable'}" loadJQuery="true" includeCssFiles="{0: '{f:uri.resource(path:\'Stylesheet/backend.css\')}'}" includeJsFiles="{0: '{f:uri.resource(path:\'Javascript/javascript.js\')}'}" > <div class="typo3-fullDoc"> ... </div> </f:be.container>
My problem is that my local javascript.js is loaded before the jQuery UI core and Sortable and then I get javascript errors when trying to access jQuery('#element').sortable();
The haed of source code is:
<head> <link rel="stylesheet" type="text/css" href="../typo3temp/sprites/zextensions.css?1439144400" media="all"> <link rel="stylesheet" type="text/css" href="sysext/core/Resources/Public/Css/flags.css?1438694064" media="all"> <link rel="stylesheet" type="text/css" href="sysext/t3skin/stylesheets/sprites/t3skin.css?1438694065" media="all"> <link rel="stylesheet" type="text/css" href="sysext/t3skin/Resources/Public/Css/backend.css?1438694065" media="all"> <link rel="stylesheet" type="text/css" href="../typo3conf/ext/tc_sys/Resources/Private/Backend/Stylesheet/stylesheet.css?1438371387" media="all"> <link rel="stylesheet" type="text/css" href="../typo3conf/ext/tc_sys/Resources/Public/Stylesheet/backend.css?1439143482" media="all"> .... <script src="sysext/core/Resources/Public/JavaScript/Contrib/require.js" type="text/javascript"></script> .... <script src="../typo3conf/ext/tc_sys/Resources/Public/Javascript/javascript.js?1439149239" type="text/javascript"></script> <script src="sysext/core/Resources/Public/JavaScript/Contrib/bootstrap/bootstrap.js?1438694064" type="text/javascript"></script> <script type="text/javascript"> /*RequireJS-Module-TYPO3/CMS/Backend/LegacyCssClasses*/ require(["TYPO3/CMS/Backend/LegacyCssClasses"]); /*RequireJS-Module-TYPO3/CMS/Backend/ClickMenu*/ require(["TYPO3/CMS/Backend/ClickMenu"]); /*RequireJS-Module-TYPO3/CMS/Backend/Modal*/ require(["TYPO3/CMS/Backend/Modal"]); /*RequireJS-Module-TYPO3/CMS/Core/Contrib/jquery-ui/core*/ require(["TYPO3/CMS/Core/Contrib/jquery-ui/core"]); /*RequireJS-Module-TYPO3/CMS/Core/Contrib/jquery-ui/sortable*/ require(["TYPO3/CMS/Core/Contrib/jquery-ui/sortable"]); .... </script> </head>
In my eyes this configuration makes it impossible to access the Contrib libraries - maybe I have done something wrong?
Actions