Skip to content

Commit 53e20e0

Browse files
authored
Merge pull request #91 from magento-lynx/MC-42230
[Lynx] jQuery deprecated functions replacement
2 parents 74759f8 + c49f438 commit 53e20e0

File tree

49 files changed

+395
-269
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+395
-269
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/system/config/google-maps-api-key-validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ define(['jquery'], function ($) {
2121
$(el).attr('disabled', false);
2222
}
2323

24-
$(el).click(function () {
24+
$(el).on('click', function () {
2525
var resultText = config.invalidLabel,
2626
resultIcon = 'icon-admin-pagebuilder-error',
2727
resultHtml;

app/code/Magento/PageBuilder/view/adminhtml/web/template/content-type/banner/collage-centered/master.html

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,27 @@
1414
<div if="data.video_overlay.attributes()['data-video-overlay-color']"
1515
class="video-overlay"
1616
attr="data.video_overlay.attributes"
17-
ko-style="data.video_overlay.style" />
17+
ko-style="data.video_overlay.style"></div>
1818
<div class="pagebuilder-overlay" attr="data.overlay.attributes" ko-style="data.overlay.style" css="data.overlay.css">
1919
<div class="pagebuilder-collage-content">
20-
<div attr="data.content.attributes" ko-style="data.content.style" css="data.content.css" html="data.content.html"></div>
21-
<button if="data.main.attributes()['data-show-button'] !== 'never'"
22-
type="button"
20+
<!-- ko with: data.content -->
21+
<!-- ko with: {attributes: attributes, style: style, css: css, dataContentUnsanitizedHtml: html} -->
22+
<div attr="attributes" ko-style="style" css="css" html="dataContentUnsanitizedHtml"></div>
23+
<!-- /ko -->
24+
<!-- /ko -->
25+
<!-- ko if: data.main.attributes()['data-show-button'] !== 'never' -->
26+
<!-- ko with: data.button -->
27+
<!-- ko with: {attributes: attributes, style: style, css: css, dataButtonUnsanitizedHtml: html} -->
28+
<button type="button"
2329
class="pagebuilder-banner-button"
24-
attr="data.button.attributes"
25-
ko-style="data.button.style"
26-
css="data.button.css"
27-
html="data.button.html">
30+
attr="attributes"
31+
ko-style="style"
32+
css="css"
33+
html="dataButtonUnsanitizedHtml">
2834
</button>
35+
<!-- /ko -->
36+
<!-- /ko -->
37+
<!-- /ko -->
2938
</div>
3039
</div>
3140
</div>
@@ -38,18 +47,27 @@
3847
<div if="data.video_overlay.attributes()['data-video-overlay-color']"
3948
class="video-overlay"
4049
attr="data.video_overlay.attributes"
41-
ko-style="data.video_overlay.style" />
50+
ko-style="data.video_overlay.style"></div>
4251
<div class="pagebuilder-overlay" attr="data.overlay.attributes" ko-style="data.overlay.style" css="data.overlay.css">
4352
<div class="pagebuilder-collage-content">
44-
<div attr="data.content.attributes" ko-style="data.content.style" css="data.content.css" html="data.content.html"></div>
45-
<button if="data.main.attributes()['data-show-button'] !== 'never'"
46-
type="button"
53+
<!-- ko with: data.content -->
54+
<!-- ko with: {attributes: attributes, style: style, css: css, dataContentUnsanitizedHtml: html} -->
55+
<div attr="attributes" ko-style="style" css="css" html="dataContentUnsanitizedHtml"></div>
56+
<!-- /ko -->
57+
<!-- /ko -->
58+
<!-- ko if: data.main.attributes()['data-show-button'] !== 'never' -->
59+
<!-- ko with: data.button -->
60+
<!-- ko with: {attributes: attributes, style: style, css: css, dataButtonUnsanitizedHtml: html} -->
61+
<button type="button"
4762
class="pagebuilder-banner-button"
48-
attr="data.button.attributes"
49-
ko-style="data.button.style"
50-
css="data.button.css"
51-
html="data.button.html">
63+
attr="attributes"
64+
ko-style="style"
65+
css="css"
66+
html="dataButtonUnsanitizedHtml">
5267
</button>
68+
<!-- /ko -->
69+
<!-- /ko -->
70+
<!-- /ko -->
5371
</div>
5472
</div>
5573
</div>

app/code/Magento/PageBuilder/view/adminhtml/web/template/content-type/banner/collage-centered/preview.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
-->
77

88
<div class="pagebuilder-content-type pagebuilder-banner type-nested" attr="data.main.attributes" ko-style="data.main.style" css="data.main.css" event="{ mouseover: onMouseOver, mouseout: onMouseOut }, mouseoverBubble: false">
9-
<render args="getOptions().template" />
9+
<render args="getOptions().template"/>
1010
<div class="pagebuilder-banner-wrapper"
1111
attr="data.wrapper.attributes"
1212
ko-style="Object.assign({}, data.wrapper.style(), {backgroundImage: getBackgroundImage()})"
@@ -18,9 +18,9 @@
1818
<div if="data.video_overlay.attributes()['data-video-overlay-color']"
1919
class="video-overlay"
2020
attr="data.video_overlay.attributes"
21-
ko-style="data.video_overlay.style" />
21+
ko-style="data.video_overlay.style"></div>
2222
<scope args="getUploader().getUiComponent()">
23-
<render />
23+
<render/>
2424
</scope>
2525
<div class="pagebuilder-overlay" css="data.overlay.css" attr="data.overlay.attributes" ko-style="data.overlay.style">
2626
<div class="pagebuilder-collage-content" event="mousedown: activateEditor">
@@ -35,7 +35,7 @@
3535
event="mousedown: stopEvent, click: activateEditor, dblclick: handleDoubleClick">
3636
</div>
3737
<div if="isWysiwygSupported()" class="placeholder-text" ifnot="data.content.html" translate="'Edit Banner Text'"></div>
38-
<textarea ifnot="isWysiwygSupported()" class="inline-wysiwyg-textarea" afterRender="initTextarea" event="{keyup: onTextareaKeyUp, focus: onTextareaFocus, blur: onTextareaBlur, mousedown: stopEvent}" attr="placeholder: $t('Edit Banner Text')"/>
38+
<textarea ifnot="isWysiwygSupported()" class="inline-wysiwyg-textarea" afterRender="initTextarea" event="{keyup: onTextareaKeyUp, focus: onTextareaFocus, blur: onTextareaBlur, mousedown: stopEvent}" attr="placeholder: $t('Edit Banner Text')"></textarea>
3939
</div>
4040
<a if="data.main.attributes()['data-show-button'] !== 'never'"
4141
type="button"

app/code/Magento/PageBuilder/view/adminhtml/web/template/content-type/banner/collage-left/master.html

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,27 @@
1414
<div if="data.video_overlay.attributes()['data-video-overlay-color']"
1515
class="video-overlay"
1616
attr="data.video_overlay.attributes"
17-
ko-style="data.video_overlay.style" />
17+
ko-style="data.video_overlay.style"></div>
1818
<div class="pagebuilder-overlay" attr="data.overlay.attributes" ko-style="data.overlay.style" css="data.overlay.css">
1919
<div class="pagebuilder-collage-content">
20-
<div attr="data.content.attributes" ko-style="data.content.style" css="data.content.css" html="data.content.html"></div>
21-
<button if="data.main.attributes()['data-show-button'] !== 'never'"
22-
type="button"
20+
<!-- ko with: data.content -->
21+
<!-- ko with: {attributes: attributes, style: style, css: css, dataContentUnsanitizedHtml: html} -->
22+
<div attr="attributes" ko-style="style" css="css" html="dataContentUnsanitizedHtml"></div>
23+
<!-- /ko -->
24+
<!-- /ko -->
25+
<!-- ko if: data.main.attributes()['data-show-button'] !== 'never' -->
26+
<!-- ko with: data.button -->
27+
<!-- ko with: {attributes: attributes, style: style, css: css, dataButtonUnsanitizedHtml: html} -->
28+
<button type="button"
2329
class="pagebuilder-banner-button"
24-
attr="data.button.attributes"
25-
ko-style="data.button.style"
26-
css="data.button.css"
27-
html="data.button.html">
30+
attr="attributes"
31+
ko-style="style"
32+
css="css"
33+
html="dataButtonUnsanitizedHtml">
2834
</button>
35+
<!-- /ko -->
36+
<!-- /ko -->
37+
<!-- /ko -->
2938
</div>
3039
</div>
3140
</div>
@@ -38,18 +47,27 @@
3847
<div if="data.video_overlay.attributes()['data-video-overlay-color']"
3948
class="video-overlay"
4049
attr="data.video_overlay.attributes"
41-
ko-style="data.video_overlay.style" />
50+
ko-style="data.video_overlay.style"></div>
4251
<div class="pagebuilder-overlay" attr="data.overlay.attributes" ko-style="data.overlay.style" css="data.overlay.css">
4352
<div class="pagebuilder-collage-content">
44-
<div attr="data.content.attributes" ko-style="data.content.style" css="data.content.css" html="data.content.html"></div>
45-
<button if="data.main.attributes()['data-show-button'] !== 'never'"
46-
type="button"
53+
<!-- ko with: data.content -->
54+
<!-- ko with: {attributes: attributes, style: style, css: css, dataContentUnsanitizedHtml: html} -->
55+
<div attr="attributes" ko-style="style" css="css" html="dataContentUnsanitizedHtml"></div>
56+
<!-- /ko -->
57+
<!-- /ko -->
58+
<!-- ko if: data.main.attributes()['data-show-button'] !== 'never' -->
59+
<!-- ko with: data.button -->
60+
<!-- ko with: {attributes: attributes, style: style, css: css, dataButtonUnsanitizedHtml: html} -->
61+
<button type="button"
4762
class="pagebuilder-banner-button"
48-
attr="data.button.attributes"
49-
ko-style="data.button.style"
50-
css="data.button.css"
51-
html="data.button.html">
63+
attr="attributes"
64+
ko-style="style"
65+
css="css"
66+
html="dataButtonUnsanitizedHtml">
5267
</button>
68+
<!-- /ko -->
69+
<!-- /ko -->
70+
<!-- /ko -->
5371
</div>
5472
</div>
5573
</div>

app/code/Magento/PageBuilder/view/adminhtml/web/template/content-type/banner/collage-left/preview.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
-->
77

88
<div class="pagebuilder-content-type pagebuilder-banner type-nested" attr="data.main.attributes" ko-style="data.main.style" css="data.main.css" event="{ mouseover: onMouseOver, mouseout: onMouseOut }, mouseoverBubble: false">
9-
<render args="getOptions().template" />
9+
<render args="getOptions().template"/>
1010
<div class="pagebuilder-banner-wrapper"
1111
attr="data.wrapper.attributes"
1212
ko-style="Object.assign({}, data.wrapper.style(), {backgroundImage: getBackgroundImage()})"
@@ -18,9 +18,9 @@
1818
<div if="data.video_overlay.attributes()['data-video-overlay-color']"
1919
class="video-overlay"
2020
attr="data.video_overlay.attributes"
21-
ko-style="data.video_overlay.style" />
21+
ko-style="data.video_overlay.style"></div>
2222
<scope args="getUploader().getUiComponent()">
23-
<render />
23+
<render/>
2424
</scope>
2525
<div class="pagebuilder-overlay" css="data.overlay.css" attr="data.overlay.attributes" ko-style="data.overlay.style">
2626
<div class="pagebuilder-collage-content" event="mousedown: activateEditor">
@@ -35,7 +35,7 @@
3535
event="mousedown: stopEvent, click: activateEditor, dblclick: handleDoubleClick">
3636
</div>
3737
<div if="isWysiwygSupported()" class="placeholder-text" ifnot="data.content.html" translate="'Edit Banner Text'"></div>
38-
<textarea ifnot="isWysiwygSupported()" class="inline-wysiwyg-textarea" afterRender="initTextarea" event="{keyup: onTextareaKeyUp, focus: onTextareaFocus, blur: onTextareaBlur, mousedown: stopEvent}" attr="placeholder: $t('Edit Banner Text')"/>
38+
<textarea ifnot="isWysiwygSupported()" class="inline-wysiwyg-textarea" afterRender="initTextarea" event="{keyup: onTextareaKeyUp, focus: onTextareaFocus, blur: onTextareaBlur, mousedown: stopEvent}" attr="placeholder: $t('Edit Banner Text')"></textarea>
3939
</div>
4040
<a if="data.main.attributes()['data-show-button'] !== 'never'"
4141
type="button"

app/code/Magento/PageBuilder/view/adminhtml/web/template/content-type/banner/collage-right/master.html

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,27 @@
1414
<div if="data.video_overlay.attributes()['data-video-overlay-color']"
1515
class="video-overlay"
1616
attr="data.video_overlay.attributes"
17-
ko-style="data.video_overlay.style" />
17+
ko-style="data.video_overlay.style"></div>
1818
<div class="pagebuilder-overlay" attr="data.overlay.attributes" ko-style="data.overlay.style" css="data.overlay.css">
1919
<div class="pagebuilder-collage-content">
20-
<div attr="data.content.attributes" ko-style="data.content.style" css="data.content.css" html="data.content.html"></div>
21-
<button if="data.main.attributes()['data-show-button'] !== 'never'"
22-
type="button"
20+
<!-- ko with: data.content -->
21+
<!-- ko with: {attributes: attributes, style: style, css: css, dataContentUnsanitizedHtml: html} -->
22+
<div attr="attributes" ko-style="style" css="css" html="dataContentUnsanitizedHtml"></div>
23+
<!-- /ko -->
24+
<!-- /ko -->
25+
<!-- ko if: data.main.attributes()['data-show-button'] !== 'never' -->
26+
<!-- ko with: data.button -->
27+
<!-- ko with: {attributes: attributes, style: style, css: css, dataButtonUnsanitizedHtml: html} -->
28+
<button type="button"
2329
class="pagebuilder-banner-button"
24-
attr="data.button.attributes"
25-
ko-style="data.button.style"
26-
css="data.button.css"
27-
html="data.button.html">
30+
attr="attributes"
31+
ko-style="style"
32+
css="css"
33+
html="dataButtonUnsanitizedHtml">
2834
</button>
35+
<!-- /ko -->
36+
<!-- /ko -->
37+
<!-- /ko -->
2938
</div>
3039
</div>
3140
</div>
@@ -38,18 +47,27 @@
3847
<div if="data.video_overlay.attributes()['data-video-overlay-color']"
3948
class="video-overlay"
4049
attr="data.video_overlay.attributes"
41-
ko-style="data.video_overlay.style" />
50+
ko-style="data.video_overlay.style"></div>
4251
<div class="pagebuilder-overlay" attr="data.overlay.attributes" ko-style="data.overlay.style" css="data.overlay.css">
4352
<div class="pagebuilder-collage-content">
44-
<div attr="data.content.attributes" ko-style="data.content.style" css="data.content.css" html="data.content.html"></div>
45-
<button if="data.main.attributes()['data-show-button'] !== 'never'"
46-
type="button"
53+
<!-- ko with: data.content -->
54+
<!-- ko with: {attributes: attributes, style: style, css: css, dataContentUnsanitizedHtml: html} -->
55+
<div attr="attributes" ko-style="style" css="css" html="dataContentUnsanitizedHtml"></div>
56+
<!-- /ko -->
57+
<!-- /ko -->
58+
<!-- ko if: data.main.attributes()['data-show-button'] !== 'never' -->
59+
<!-- ko with: data.button -->
60+
<!-- ko with: {attributes: attributes, style: style, css: css, dataButtonUnsanitizedHtml: html} -->
61+
<button type="button"
4762
class="pagebuilder-banner-button"
48-
attr="data.button.attributes"
49-
ko-style="data.button.style"
50-
css="data.button.css"
51-
html="data.button.html">
63+
attr="attributes"
64+
ko-style="style"
65+
css="css"
66+
html="dataButtonUnsanitizedHtml">
5267
</button>
68+
<!-- /ko -->
69+
<!-- /ko -->
70+
<!-- /ko -->
5371
</div>
5472
</div>
5573
</div>

app/code/Magento/PageBuilder/view/adminhtml/web/template/content-type/banner/collage-right/preview.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
-->
77

88
<div class="pagebuilder-content-type pagebuilder-banner type-nested" attr="data.main.attributes" ko-style="data.main.style" css="data.main.css" event="{ mouseover: onMouseOver, mouseout: onMouseOut }, mouseoverBubble: false">
9-
<render args="getOptions().template" />
9+
<render args="getOptions().template"/>
1010
<div class="pagebuilder-banner-wrapper"
1111
attr="data.wrapper.attributes"
1212
ko-style="Object.assign({}, data.wrapper.style(), {backgroundImage: getBackgroundImage()})"
@@ -18,9 +18,9 @@
1818
<div if="data.video_overlay.attributes()['data-video-overlay-color']"
1919
class="video-overlay"
2020
attr="data.video_overlay.attributes"
21-
ko-style="data.video_overlay.style" />
21+
ko-style="data.video_overlay.style"></div>
2222
<scope args="getUploader().getUiComponent()">
23-
<render />
23+
<render/>
2424
</scope>
2525
<div class="pagebuilder-overlay" attr="data.overlay.attributes" ko-style="data.overlay.style" css="data.overlay.css">
2626
<div class="pagebuilder-collage-content" event="mousedown: activateEditor">
@@ -35,7 +35,7 @@
3535
event="mousedown: stopEvent, click: activateEditor, dblclick: handleDoubleClick">
3636
</div>
3737
<div if="isWysiwygSupported()" class="placeholder-text" ifnot="data.content.html" translate="'Edit Banner Text'"></div>
38-
<textarea ifnot="isWysiwygSupported()" class="inline-wysiwyg-textarea" afterRender="initTextarea" event="{keyup: onTextareaKeyUp, focus: onTextareaFocus, blur: onTextareaBlur, mousedown: stopEvent}" attr="placeholder: $t('Edit Banner Text')"/>
38+
<textarea ifnot="isWysiwygSupported()" class="inline-wysiwyg-textarea" afterRender="initTextarea" event="{keyup: onTextareaKeyUp, focus: onTextareaFocus, blur: onTextareaBlur, mousedown: stopEvent}" attr="placeholder: $t('Edit Banner Text')"></textarea>
3939
</div>
4040
<a if="data.main.attributes()['data-show-button'] !== 'never'"
4141
type="button"

0 commit comments

Comments
 (0)