stable

Clone or download

Read-only

Load angular only once

This is part of story #10495 have base cross tracker search widget If you have many widgets that needs angular in your dashboard, you should not have any errors in the console complaining that angular is loaded twice (you can safely have 2 kanban widgets and 2 cross-tracker widgets in the same page). If you don't have any widgets that need angular, then in the network tab of the console, no angular js file is loaded. Regular Kanban page works, user|project dashboard with kanban widget works, user|project dashboard with cross-tracker widget works, user|project dashboard without kanban and cross-tracker widgets works. This forces cross-tracker and kanban to share the same version of angular. Change-Id: Iac0a707613466bcedb2831862a83a901cfcb9c32

Modified Files

Name
M plugins/agiledashboard/include/agiledashboardPlugin.class.php +40 −12 Go to diff View file
A plugins/agiledashboard/tests/SameVersionOfAngularTest.php +36 −0 Go to diff View file
A plugins/agiledashboard/www/js/kanban/externalize-angular-webpack.config.js +21 −0 Go to diff View file
M plugins/agiledashboard/www/js/kanban/karma.conf.js +1 −0 Go to diff View file
M plugins/agiledashboard/www/js/kanban/package.json +1 −1 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/app-kanban-controller.js +2 −0 Go to diff View file
M plugins/agiledashboard/www/js/kanban/webpack.config.js +2 −1 Go to diff View file
M plugins/tracker/include/trackerPlugin.class.php +15 −9 Go to diff View file
A plugins/tracker/www/scripts/cross-tracker/externalize-angular-webpack.config.js +21 −0 Go to diff View file
M plugins/tracker/www/scripts/cross-tracker/karma.conf.js +1 −0 Go to diff View file
M plugins/tracker/www/scripts/cross-tracker/package.json +1 −1 Go to diff View file
M plugins/tracker/www/scripts/cross-tracker/webpack.config.js +2 −1 Go to diff View file
A src/common/Dashboard/CollectionOfWidgetsThatNeedJavascriptDependencies.php +53 −0 Go to diff View file
M src/common/Dashboard/DashboardPresenter.php +5 −0 Go to diff View file
A src/common/Dashboard/JavascriptFilesIncluder.php +129 −0 Go to diff View file
M src/common/Dashboard/Project/ProjectDashboardController.php +14 −14 Go to diff View file
M src/common/Dashboard/User/UserDashboardController.php +15 −15 Go to diff View file
M src/common/Dashboard/Widget/DashboardWidgetColumnPresenter.php +4 −0 Go to diff View file
M src/common/Dashboard/Widget/DashboardWidgetPresenterBuilder.php +3 −3 Go to diff View file
M src/common/autoload.php +4 −2 Go to diff View file
M src/www/my/index.php +5 −1 Go to diff View file
M src/www/projects.php +5 −1 Go to diff View file
M src/www/themes/BurningParrot/FooterPresenter.php +11 −0 Go to diff View file
A tests/simpletest/common/Dashboard/EventManagerForTestingPurpose.php +46 −0 Go to diff View file
A tests/simpletest/common/Dashboard/IncludeAssetsForTestingPurpose.php +31 −0 Go to diff View file
A tests/simpletest/common/Dashboard/JavascriptFilesIncluderTest.php +148 −0 Go to diff View file