Page designer i frame implementation#129
Page designer i frame implementation#129asad-rafter wants to merge 2 commits intocloudinary:new_iframefrom
Conversation
| @@ -3,24 +3,16 @@ | |||
| var PageMgr = require('dw/experience/PageMgr'); | |||
There was a problem hiding this comment.
@asad-rafter please move all require statements to local scope
| "https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.2.10/iframeResizer.min.js", | ||
| "/experience/editors/cloudinary/utils.js", | ||
| "/experience/editors/cloudinary/imageForm.js" | ||
| "https://media-library.cloudinary.com/global/all.js", |
There was a problem hiding this comment.
can this be fetched dynamically from the BM?
| @@ -0,0 +1,8 @@ | |||
| 'use strict'; | |||
|
|
|||
| var cloudinaryApi = require('*/cartridge/scripts/cloudinary/cloudinaryApi'); | |||
There was a problem hiding this comment.
@asad-rafter please move all require statements to local scope
| @@ -5,13 +5,32 @@ var HashMap = require('dw/util/HashMap'); | |||
| var cloudinaryApi = require('*/cartridge/scripts/cloudinary/cloudinaryApi'); | |||
There was a problem hiding this comment.
@asad-rafter please move all require statements to local scope
| "resources": { | ||
| "scripts": [ | ||
| "https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.2.10/iframeResizer.contentWindow.min.js", | ||
| "https://studio-widget.cloudinary.com/latest/all.js", |
There was a problem hiding this comment.
can this be fetched dynamically from the BM?
|
|
||
| // Size the container to fill the modal viewport | ||
| parentIFrame.getPageInfo(function (info) { | ||
| var rem = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16; |
There was a problem hiding this comment.
@asad-rafter please use Numbaer.parseFloat instead of parseFloat
| setTimeout(function () { | ||
| try { | ||
| var buttons = window.parent.document.querySelectorAll('button'); | ||
| for (var b = 0; b < buttons.length; b++) { |
| @@ -0,0 +1,173 @@ | |||
| /** | |||
There was a problem hiding this comment.
@asad-rafter please use optional chain expression, and avoid unicode chars and long separation lines
| try { | ||
| var ffOptions = JSON.parse(player.formFactorOptions); | ||
| var w = window.innerWidth; | ||
| var ff = w <= 767 ? 'mobile' : (w <= 1023 ? 'tablet' : 'desktop'); |
There was a problem hiding this comment.
@asad-rafter are these numbers hardcodded in PD? is there any chance the customer would need different breakpoints
| background: #fff; | ||
| } | ||
|
|
||
| .cld-adv-applied { |
No description provided.