Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMS-8592 : jQuery UI Widget: jQuery UI CSS and Jquery UI JS references are Included on publish site pages when "include on published site" is set to no #354

Merged
merged 1 commit into from
Oct 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -491,11 +491,13 @@ percCanonicalRedirect('${defaultDocument}');
#set($widgetitemUI = $instanceUI.getItem())##
#set($includeUIOnPublishedPage = $widgetitemUI.getProperties().get("includeUIOnPublishedPage"))##
#set($jQueryUICSSTheme = $widgetitemUI.getProperties().get("jQueryUICSSTheme"))##
#if("$!{jQueryUICSSTheme}" != "" )## load the jquery-ui.css provided by the user on jquery ui widget
#if("$!{jQueryUICSSTheme}" != "" && $widgetitemUI.getProperties().get("includeUIOnPublishedPage") != "no")## load the jquery-ui.css provided by the user on jquery ui widget
<link rel="stylesheet" href="$jQueryUICSSTheme">
#else## if user has not provided jquery-ui.css then load default css
#if( (($perc.linkContext.mode.toString() == "PUBLISH") && ($widgetitemUI.getProperties().get("includeUIOnPublishedPage") != "no")) || (($perc.linkContext.mode.toString() == "PREVIEW") && ($widgetitemUI.getProperties().get("includeUIOnPublishedPage") != "no")) || $perc.isEditMode())##
<link rel="stylesheet" href="$css_link">
#end##
#end##
#else## in this case load default jquery-ui.css file
#if($perc.linkContext.site.overrideSystemJQueryUI==false || $perc.isEditMode())##
<link rel="stylesheet" href="$css_link">
Expand Down Expand Up @@ -1067,13 +1069,13 @@ crossorigin="$!{jQueryMigrateCrossOrigin}"
#if(!$rx.pageutils.isLinkGood("$!{jQueryLocation}",$mode,$dontcache))##
## The jQueryLink link provided is no good
<!-- Unable to verify CDN link - defaulting to system jquery version -->
#if($perc.linkContext.mode.toString() == "PUBLISH")##
#if($perc.linkContext.mode.toString() == "PUBLISH" && $widgetitem.getProperties().get("includeUIOnPublishedPage") != "no")##
#set($jQueryLocation = "/web_resources/cm/jslib/jquery-ui.js")##
#else##
#set($jQueryLocation = "/cm/jslib/profiles/3x/jquery/libraries/jquery-ui/jquery-ui.js")##
#end##
#end##
#if( (($perc.linkContext.mode.toString() == "PUBLISH") && ($includeOnPublishedPage != "no")) || (($perc.linkContext.mode.toString() == "PREVIEW") && ($includeOnPublishedPage != "no")))##
#if( (($perc.linkContext.mode.toString() == "PUBLISH") && ($widgetitem.getProperties().get("includeUIOnPublishedPage") != "no")) || (($perc.linkContext.mode.toString() == "PREVIEW") && ($widgetitem.getProperties().get("includeUIOnPublishedPage") != "no")))##
<script src="$!{jQueryLocation}"
#if($isDeferred == "yes")
defer
Expand Down