Skip to content

Commit

Permalink
Fixing BC-101 and BC-90 on cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
dcolvin committed Mar 8, 2024
1 parent 3bc62da commit 5226e48
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.jcr.Node;
Expand Down Expand Up @@ -166,6 +169,13 @@ protected void init(){
LOGGER.info("current AEM Version : " + version);

experienceID = properties.get("experience", "").trim();
Pattern p = Pattern.compile("\\[(.*?)\\]");
Matcher m = p.matcher(experienceID);

if (m.find()) {
experienceID = m.group(1);
}

account = properties.get("account", "").trim();
embedType = properties.get("embedType", "").trim();
inlineCSS = properties.get("inlineCSS","");
Expand Down
2 changes: 2 additions & 0 deletions current/ui.apps.structure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
<!-- Common overlay roots -->
<filter><root>/apps/sling</root></filter>
<filter><root>/apps/cq</root></filter>
<filter><root>/apps/cq/core</root></filter>
<filter><root>/apps/cq/core/content</root></filter>
<filter><root>/apps/dam</root></filter>
<filter><root>/apps/wcm</root></filter>
<filter><root>/apps/msm</root></filter>
Expand Down
2 changes: 1 addition & 1 deletion current/ui.apps/src/main/content/META-INF/vault/filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<filter root="/apps/brightcove/components"/>
<filter root="/apps/brightcove/extensions"/>
<filter root="/apps/brightcove/templates"/>
<filter root="/apps/cq/core/content/nav/brightcove"/>
<filter root="/apps/cq/core/content/nav"/>
<filter root="/apps/dam/gui" mode="update"/>
</workspaceFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

var ACCOUNTID = "./account", EXPERIENCES = "./experience";
var existingValues = {};
var account_id = "";

const DIALOG_ACCOUNT_FIELD_SELECTOR = '.brightcove-dialog-experiences-account-dropdown';

Expand Down Expand Up @@ -74,6 +75,20 @@
});
}
});

accountSelector.addEventListener("change", function(event) {
var accountSelector = $(DIALOG_ACCOUNT_FIELD_SELECTOR).get(0);
account_id = (accountSelector.selectedItem != null)
? accountSelector.selectedItem.value : "";

contentSelector.attr('data-granite-autocomplete-src',
updateQueryStringParameter(
contentSelector.attr('data-granite-autocomplete-src'),
'account_id',
account_id
)
);
});

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Brightcove Experience Selector"
extraClientlibs="[brightcove.player.dialogs]"
sling:resourceType="cq/gui/components/authoring/dialog">
<content
jcr:primaryType="nt:unstructured"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<div class="player-embed-wrap">
<div id="container-${player.componentID}">
<iframe
src="https://players.brightcove.net/${player.account}/experience_${properties.experience}/index.html?&usage=cms:cms:aem:${player.version}:${player.bundleVersion}:experienceiframe"
src="https://players.brightcove.net/${player.account}/experience_${player.experienceID}/index.html?&usage=cms:cms:aem:${player.version}:${player.bundleVersion}:experienceiframe"
allowfullscreen=""
webkitallowfullscreen=""
mozallowfullscreen="">
Expand Down

0 comments on commit 5226e48

Please sign in to comment.