Closed exponentcms closed 4 years ago
(from [ccd88c6b208570ec06fd92e0ed6e16a2ca6760bf]) Moves yui module css loading into yui loader instead of exp css block [#957 state:resolved responsible:dleffler milestone:2.2.1] https://github.com/exponentcms/exponent-cms/commit/ccd88c6b208570ec06fd92e0ed6e16a2ca6760bf
Lighthouse URL: https://exponentcms.lighthouseapp.com/projects/61783/tickets/957
It might save some transfer time if we used to the YUI loader to dynamically load the css for yui custom modules (external scripts) such as slideshow, lightbox, etc... We currently use the {css} function in a template, but could add the css to the EXPONENT.YUI3_CONFIG.modules structure and make it a 'requires' for the module script.
@@@ javascript EXPONENT.YUI3_CONFIG.modules = { 'yui2-lightbox' : { fullpath: EXPONENT.PATH_RELATIVE+'framework/modules/events/assets/js/lightbox.js', requires : ['yui2-dom','yui2-event','yui2-connectioncore','yui2-json','yui2-selector','yui2-animation','yui2-lightbox-css'] } 'yui2-lightbox-css' : { path: EXPONENT.PATH_RELATIVE+'framework/modules/events/assets/css/lightbox.css', type: 'css' } } @@@