FYI. I wrote up https://issues.jasig.org/browse/UP-4077 proposing adding a new portlet preference ' usePortalBootstrap' that similar to the 'usePortalJSLibs' portlet preference is used by Bootstrap-enabled portlets to determine whether to include Bootstrap Javascript and a name-spaced Bootstrap CSS in the portlet, or rely on the portal to have already imported both Bootstrap and Bootstrap CSS. I'm also adding into 4.1.0 Universality including the Bootstrap Javascript and name-spaced Bootstrap CSS.
The motivation for this is that you cannot have 2 imports of Bootstrap Javascript on a page since it is not name-spaced and does not play well with itself, whether included on the portal and in the portlet, or by two portlets on the page. At minimum it causes the Options drop-down to not work for any portlet on the page. I propose best practice is the default of this portlet preference be set to true so including the portlet into a uPortal 4.1 system (Universality or Respondr) will just work. As a bonus it is slightly more efficient. If a bootstrap-enabled portlet is included into an earlier uPortal the portlet itself may have issues until you set the portlet preference 'usePortalBootstrap' to true in the portlet publishing process, or modify the portal to include Bootstrap and name-spaced Bootstrap CSS. Best practice is for portlets to be designed to display well in both Universality and Respondr, or at least well in Respondr and adequately in Universality, though this may not always be the case and the portlet may require Bootstrap Javascript to function properly. As a related note (and I'm told documentation will be forthcoming), the name-spaced Bootstrap CSS that will be included in 4.1.0 Universality (and Bootstrap-enabled portlets) requires the portlet have a container element with a class 'bootstrap-styles' to pick up the bootstrap styling in Universality within the portlet. The class insures the name-spaced Bootstrap CSS will not impact other portlets on the page that are not designed for Bootstrap. Of course sites may need to add CSS overrides to match their color theme for these particular Bootstrap-enabled portlets in pre-4.1 Universality. If there are concerns with this approach, a need for more discussion, or better solutions, please let me know! -- James Wennmacher - Unicon 480.558.2420 -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev
