Skip to content

Commit 2f1c175

Browse files
author
Lukasz Borowiec
committed
Merge branch '514_content-snapshot-category-admin-page' into 511_content-snapshot-product-admin-page
2 parents bf625cc + 79c5241 commit 2f1c175

File tree

18 files changed

+302
-74
lines changed

18 files changed

+302
-74
lines changed

app/code/Magento/PageBuilder/i18n/en_US.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Page,Page
1616
"Page with ID: %s doesn't exist","Page with ID: %s doesn't exist"
1717
"ID: %s","ID: %s"
1818
Condition,Condition
19+
Photo upload is available in full screen mode,Photo upload is available in full screen mode
1920
"This will change your Admin and storefront by:","This will change your Admin and storefront by:"
2021
"Removing PageBuilder's advanced content tools","Removing PageBuilder's advanced content tools"
2122
"from their assigned text fields and adding a basic text editor as replacement.","from their assigned text fields and adding a basic text editor as replacement."

app/code/Magento/PageBuilder/view/adminhtml/ui_component/category_form.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<item name="config" xsi:type="array">
1313
<item name="wysiwygConfigData" xsi:type="array">
1414
<item name="is_pagebuilder_enabled" xsi:type="boolean">true</item>
15+
<item name="pagebuilder_content_snapshot" xsi:type="boolean">true</item>
1516
<item name="pagebuilder_button" xsi:type="boolean">true</item>
1617
</item>
1718
</item>

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/_common.less

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,35 @@
4848
display: none !important;
4949
}
5050
}
51+
52+
//
53+
// Category Description
54+
// ---------------------------------------------
55+
56+
.catalog-category-edit {
57+
.admin__fieldset {
58+
> .admin__field {
59+
&[data-index="description"] {
60+
> .admin__field-label {
61+
text-align: left;
62+
63+
label {
64+
span {
65+
&:before {
66+
left: 0;
67+
}
68+
}
69+
}
70+
}
71+
72+
> .admin__field-control {
73+
float: right;
74+
75+
button.action-default {
76+
float: right;
77+
}
78+
}
79+
}
80+
}
81+
}
82+
}

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/_page-builder.less

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,29 @@
139139
}
140140
}
141141

142+
.page-builder-wysiwyg-wrapper {
143+
position: relative;
144+
145+
.pagebuilder-wysiwyg-overlay {
146+
display: none;
147+
height: 0;
148+
left: 0;
149+
position: absolute;
150+
top: 0;
151+
visibility: hidden;
152+
width: 0;
153+
154+
&.active {
155+
cursor: pointer;
156+
display: block;
157+
height: 100%;
158+
visibility: visible;
159+
width: 100%;
160+
z-index: @z-index-2;
161+
}
162+
}
163+
}
164+
142165
.pagebuilder-wysiwyg-wrapper.pagebuilder-transition-out .pagebuilder-stage-wrapper {
143166
.pagebuilder-stage-wrapper.stage-full-screen;
144167

app/code/Magento/PageBuilder/view/adminhtml/web/js/config.js

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/preview.js

Lines changed: 20 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/js/form/element/wysiwyg.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ define([
3939
initialize: function () {
4040
this._super();
4141

42-
if (!this.wysiwygConfigData()['pagebuilder_button']) {
42+
if (!this.wysiwygConfigData()['pagebuilder_button'] ||
43+
this.wysiwygConfigData()['pagebuilder_content_snapshot']) {
4344
this.initPageBuilder();
4445
}
4546

@@ -78,7 +79,11 @@ define([
7879
initPageBuilder: function () {
7980
if (!this.isComponentInitialized()) {
8081
this.loading(true);
81-
this.pageBuilder = new PageBuilder(this.wysiwygConfigData(), this.initialValue);
82+
this.pageBuilder = new PageBuilder(
83+
this.wysiwygConfigData(),
84+
this.initialValue,
85+
Boolean(this.wysiwygConfigData()['pagebuilder_content_snapshot'])
86+
);
8287
events.trigger('pagebuilder:register', {
8388
ns: this.ns,
8489
instance: this.pageBuilder
@@ -91,10 +96,15 @@ define([
9196
component: this,
9297
selector: this.stageSelector
9398
}, this.disableDomObserver.bind(this));
94-
}
9599

96-
if (!this.wysiwygConfigData()['pagebuilder_button']) {
97-
this.visiblePageBuilder(true);
100+
if (!this.wysiwygConfigData()['pagebuilder_button']) {
101+
this.visiblePageBuilder(true);
102+
}
103+
104+
if (!this.wysiwygConfigData()['pagebuilder_button'] ||
105+
this.wysiwygConfigData()['pagebuilder_content_snapshot']) {
106+
this.visiblePageBuilder(true);
107+
}
98108
}
99109
},
100110

@@ -166,7 +176,8 @@ define([
166176
}.bind(this), 350);
167177
}
168178

169-
if (this.wysiwygConfigData()['pagebuilder_button']) {
179+
if (this.wysiwygConfigData()['pagebuilder_button'] &&
180+
!this.wysiwygConfigData()['pagebuilder_content_snapshot']) {
170181
// Force full screen mode whilst the animation occurs
171182
this.transitionOut(true);
172183
// Trigger animation out
@@ -186,7 +197,8 @@ define([
186197
});
187198
}
188199

189-
if (this.wysiwygConfigData()['pagebuilder_button']) {
200+
if (this.wysiwygConfigData()['pagebuilder_button'] &&
201+
!this.wysiwygConfigData()['pagebuilder_content_snapshot']) {
190202
this.visiblePageBuilder(true);
191203

192204
fullScreenDeferred.resolve();

app/code/Magento/PageBuilder/view/adminhtml/web/js/page-builder.js

Lines changed: 26 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/js/panel.js

Lines changed: 22 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/js/utils/editor.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)