mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 09:23:52 -05:00
Handle items that don't exist in embedded mode; fix iframe generation (#7605)
Checked locally. Have no idea how the heck the quotes got changed....
This commit is contained in:
@@ -20,6 +20,8 @@ major UI changes, framework updates, or when implementing significant new featur
|
||||
- Test the copy button
|
||||
- Check that social sharing buttons display correctly
|
||||
- Verify proper styling in both light and dark themes
|
||||
- Check the `<iframe>` of embed is correct HTML
|
||||
- Check the inner link of the iframe for embed works still (that is, embed mode)
|
||||
- Test "Copied to clipboard" tooltip functionality
|
||||
|
||||
### Load/Save Modal
|
||||
|
||||
@@ -779,7 +779,7 @@ function start() {
|
||||
|
||||
History.trackHistory(layout);
|
||||
setupSiteTemplateWidgetButton(siteTemplateScreenshots, layout);
|
||||
new Sharing(layout);
|
||||
if (!options.embedded) new Sharing(layout);
|
||||
new Printerinator(hub, themer);
|
||||
}
|
||||
|
||||
|
||||
@@ -429,7 +429,7 @@ export class Sharing {
|
||||
): string {
|
||||
const embedUrl = Sharing.getEmbeddedUrl(config, root, isReadOnly, extraOptions);
|
||||
// The attributes must be double quoted, the full url's rison contains single quotes
|
||||
return `<iframe width='800px' height='200px' src='${embedUrl}'></iframe>`;
|
||||
return `<iframe width="800px" height="200px" src="${embedUrl}"></iframe>`;
|
||||
}
|
||||
|
||||
private static getEmbeddedUrl(config: any, root: string, readOnly: boolean, extraOptions: object): string {
|
||||
|
||||
@@ -90,8 +90,8 @@ function reallySetCompilerVersionPopover(
|
||||
const existingPopover = BootstrapUtils.getPopoverInstance(pane.fullCompilerName);
|
||||
if (existingPopover) existingPopover.dispose();
|
||||
|
||||
// Initialize new popover
|
||||
BootstrapUtils.initPopover(pane.fullCompilerName, {
|
||||
// Initialize a new popover; may not exist in embedded links.
|
||||
BootstrapUtils.initPopoverIfExists(pane.fullCompilerName, {
|
||||
html: true,
|
||||
title: notification
|
||||
? ($.parseHTML('<span>Compiler Version: ' + notification + '</span>')[0] as Element)
|
||||
|
||||
Reference in New Issue
Block a user