@innovastudio/contentbox 1.4.22 → 1.4.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3670,8 +3670,8 @@ class EditSection {
|
|
3670
3670
|
this.builderStuff = builderStuff;
|
3671
3671
|
let html = '<div class="is-modal delsectionconfirm" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">' + '<div style="max-width: 450px;">' + '<div style="margin: 20px 0 30px;text-align:center;font-size: 14px;">' + out('Are you sure you want to delete this section?') + '</div>' + '<button title="' + out('Delete') + '" class="input-ok classic">' + out('Delete') + '</button>' + '</div>' + '</div>' + '' + '<div class="is-modal editsection" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">' + '<div class="is-modal-content" style="max-width:313px;padding:0;">' + '<div class="is-modal-bar is-draggable">' + out('Section Settings') + '</div>' + '<div class="is-tabs clearfix" style="padding-top:37px;" data-group="sectionsettings">' + '<a id="tabSectionGeneral" title="' + out('General') + '" href="" data-content="divSectionGeneral" class="active">' + out('General') + '</a>' + '<a id="tabSectionAnimation" title="' + out('Animation') + '" href="" data-content="divSectionAnimation">' + out('Animation') + '</a>' + '<a id="tabSectionScrollButton" title="' + out('Scroll') + '" href="" data-content="divSectionScrollButton">' + out('Scroll') + '</a>' + '</div>';
|
3672
3672
|
html += '<div id="divSectionGeneral" class="is-tab-content active" data-group="sectionsettings" style="display:flex;padding-top:0">' + '<div style="display:flex;flex-direction:column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Move Section') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Move Up') + '" class="cmd-section-up" style="">↑</button>' + '<button title="' + out('Move Down') + '" class="cmd-section-down">↓</button>' + '<button title="' + out('Move to Top') + '" class="cmd-section-top"><span style="transform:rotate(90deg);position:absolute;top:13px;left:15px;">⇤</span></button>' + '<button title="' + out('Move to Bottom') + '" class="cmd-section-bottom"><span style="transform:rotate(90deg);position:absolute;top:13px;left:15px;">⇥</span></button>' + '<button title="' + out('Duplicate') + '" class="cmd-section-duplicate" style="margin-left:20px;"><svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#ion-ios-copy-outline"></use></svg></button>' + '</div>' + '</div>';
|
3673
|
-
html += '<div style="display:flex;flex-direction:column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Height') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Auto') + '" class="cmd-section-height" data-value="0">' + out('Auto') + '</button>' + '<button title="20%" class="cmd-section-height" data-value="20">20%</button>' + '<button title="25%" class="cmd-section-height" data-value="25">25%</button>' + '<button title="30%" class="cmd-section-height" data-value="30">30%</button>' + '<button title="40%" class="cmd-section-height" data-value="40">40%</button>' + '<button title="50%" class="cmd-section-height" data-value="50">50%</button>' + '</div>' + '<div style="display:flex">' + '<button title="60%" class="cmd-section-height" data-value="60" style="border-left:none;border-top:none;">60%</button>' + '<button title="70%" class="cmd-section-height" data-value="70" style="border-left:none;border-top:none;">70%</button>' + '<button title="75%" class="cmd-section-height" data-value="75" style="border-left:none;border-top:none;">75%</button>' + '<button title="80%" class="cmd-section-height" data-value="80" style="border-left:none;border-top:none;">80%</button>' + '<button title="90%" class="cmd-section-height" data-value="90" style="border-left:none;border-top:none;">90%</button>' + '<button title="100%" class="cmd-section-height" data-value="100" style="border-left:none;border-top:none;">100%</button>' + '</div>' + '</div>' + '<div style="display:flex;flex-direction:column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Spacing') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('xs') + '" class="cmd-box-spacing" data-value="default">' + out('xs') + '</button>' + '<button title="' + out('sm') + '" class="cmd-box-spacing" data-value="sm">' + out('sm') + '</button>' + '<button title="' + out('m') + '" class="cmd-box-spacing" data-value="m">' + out('m') + '</button>' + '<button title="' + out('lg') + '" class="cmd-box-spacing" data-value="lg">' + out('lg') + '</button>' + '<button title="' + out('Clear') + '" class="cmd-box-spacing" data-value=""><svg class="is-icon-flex"><use xlink:href="#icon-clean"></use></svg></button>' + '</div>' + '</div>';
|
3674
|
-
html += '<div class="div-section-
|
3673
|
+
html += '<div style="display:flex;flex-direction:column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Height') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Auto') + '" class="cmd-section-height" data-value="0">' + out('Auto') + '</button>' + '<button title="20%" class="cmd-section-height" data-value="20">20%</button>' + '<button title="25%" class="cmd-section-height" data-value="25">25%</button>' + '<button title="30%" class="cmd-section-height" data-value="30">30%</button>' + '<button title="40%" class="cmd-section-height" data-value="40">40%</button>' + '<button title="50%" class="cmd-section-height" data-value="50">50%</button>' + '</div>' + '<div style="display:flex">' + '<button title="60%" class="cmd-section-height" data-value="60" style="border-left:none;border-top:none;">60%</button>' + '<button title="70%" class="cmd-section-height" data-value="70" style="border-left:none;border-top:none;">70%</button>' + '<button title="75%" class="cmd-section-height" data-value="75" style="border-left:none;border-top:none;">75%</button>' + '<button title="80%" class="cmd-section-height" data-value="80" style="border-left:none;border-top:none;">80%</button>' + '<button title="90%" class="cmd-section-height" data-value="90" style="border-left:none;border-top:none;">90%</button>' + '<button title="100%" class="cmd-section-height" data-value="100" style="border-left:none;border-top:none;">100%</button>' + '</div>' + '</div>' + '<div style="display:flex;flex-direction:column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Spacing') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('xxs') + '" class="cmd-box-spacing" data-value="xxs">' + out('xxs') + '</button>' + '<button title="' + out('xs') + '" class="cmd-box-spacing" data-value="default">' + out('xs') + '</button>' + '<button title="' + out('sm') + '" class="cmd-box-spacing" data-value="sm">' + out('sm') + '</button>' + '<button title="' + out('m') + '" class="cmd-box-spacing" data-value="m">' + out('m') + '</button>' + '<button title="' + out('lg') + '" class="cmd-box-spacing" data-value="lg">' + out('lg') + '</button>' + '<button title="' + out('Clear') + '" class="cmd-box-spacing" data-value=""><svg class="is-icon-flex"><use xlink:href="#icon-clean"></use></svg></button>' + '</div>' + '</div>';
|
3674
|
+
html += '<div class="div-section-spacesettings" style="display:flex;flex-direction:column;">' + '<div class="div-multi-boxes">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Between Boxes') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('space') + '" class="cmd-betweenbox-spacing" data-value="space">' + out('space') + '</button>' + '<button title="' + out('no space') + '" class="cmd-betweenbox-spacing" data-value="no-space">' + out('no space') + '</button>' + '</div>' + '</div>' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Stack') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('top') + '" class="cmd-section-stack" data-value="top">' + out('top') + '</button>' + '<button title="' + out('middle') + '" class="cmd-section-stack" data-value="middle">' + out('middle') + '</button>' + '<button title="' + out('bottom') + '" class="cmd-section-stack" data-value="bottom">' + out('bottom') + '</button>' + '<button title="' + out('Clear') + '" class="cmd-section-stack" data-value=""><svg class="is-icon-flex"><use xlink:href="#icon-clean"></use></svg></button>' + '</div>' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Background Color') + ':</div>' + '<div style="display:flex;">' + '<button title="' + out('Background Color') + '" class="input-section-bgcolor is-btn-color" style="margin-right:15px"></button>' + '<button title="' + out('Gradient') + '" class="input-section-gradient classic" data-value="+">' + out('Gradient') + '</button>' + '</div>' + '</div>' + '</div>' + '<div id="divSectionAnimation" class="is-tab-content" data-group="sectionsettings" style="display:none;padding-top:0">' + '<div style="display:flex;flex-direction:column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Start') + ':</div>' + '<div style="display:flex;flex-flow:wrap;">' + '<button title="' + out('Slide Left') + '" class="cmd-section-anim-start" data-value="slide-left">' + out('Slide Left') + '</button>' + '<button title="' + out('Slide Right') + '" class="cmd-section-anim-start" data-value="slide-right">' + out('Slide Right') + '</button>' + '<button title="' + out('Zoom In') + '" class="cmd-section-anim-start" data-value="zoom-in">' + out('Zoom In') + '</button>' + // '<button title="' + out('Zoom Out') + '" class="cmd-section-anim-start" data-value="zoom-out">' + out('Zoom Out') + '</button>' +
|
3675
3675
|
'<button title="' + out('Clear') + '" class="cmd-section-anim-start" data-value=""><svg class="is-icon-flex"><use xlink:href="#icon-clean"></use></svg></button>' + '</div>' + '</div>';
|
3676
3676
|
html += '<div style="display:flex;flex-direction:column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('End') + ':</div>' + '<div style="display:flex;flex-flow:wrap;">' + '<button title="' + out('Slide Left') + '" class="cmd-section-anim-end" data-value="slide-left">' + out('Slide Left') + '</button>' + '<button title="' + out('Slide Right') + '" class="cmd-section-anim-end" data-value="slide-right">' + out('Slide Right') + '</button>' + '<button title="' + out('Slide Back') + '" class="cmd-section-anim-end" data-value="slide-back">' + out('Slide Back') + '</button>' + '<button title="' + out('Overlap') + '" class="cmd-section-anim-end" data-value="overlap">' + out('Overlap') + '</button>' + '<button title="' + out('Zoom In') + '" class="cmd-section-anim-end" data-value="zoom-in">' + out('Zoom In') + '</button>' + '<button title="' + out('Zoom Out') + '" class="cmd-section-anim-end" data-value="zoom-out">' + out('Zoom Out') + '</button>' + '<button title="' + out('Clear') + '" class="cmd-section-anim-end" data-value=""><svg class="is-icon-flex"><use xlink:href="#icon-clean"></use></svg></button>' + '</div>' + '</div>' + '</div>' + '<div id="divSectionScrollButton" class="is-tab-content" data-group="sectionsettings" style="display:none;padding-top:0">' + '<div style="display:none;flex-direction:column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + '<label for="chkScrollIcon" style="margin:0;"><input id="chkScrollIcon" type="checkbox" /> ' + out('Scroll Icon') + '</label>' + '</div>' + '<div style="display:flex;padding-top:10px;">' + '<button title="' + out('Light') + '" class="cmd-section-scroll" data-value="light" style="min-width:80px;">' + out('Light') + '</button>' + '<button title="' + out('Dark') + '" class="cmd-section-scroll" data-value="dark" style="border-left:none;min-width:80px;">' + out('Dark') + '</button>' + '</div>' + '</div>' + '<div style="display:flex;flex-direction:column;padding-bottom:3px;">' + '<div style="padding-top:20px;padding-bottom:3px;">' + out('Scroll Button') + ':</div>' + '<div style="display:flex;flex-flow:wrap;">' + '<button class="cmd-scroll-preset" data-value="1" title="' + out('Apply') + '" type="button">1</button>' + '<button class="cmd-scroll-preset" data-value="2" title="' + out('Apply') + '" type="button">2</button>' + '<button class="cmd-scroll-preset" data-value="3" title="' + out('Apply') + '" type="button">3</button>' + '<button class="cmd-scroll-preset" data-value="4" title="' + out('Apply') + '" type="button">4</button>' + '<button class="cmd-scroll-preset" data-value="5" title="' + out('Apply') + '" type="button">5</button>' + '<button class="cmd-scroll-preset" data-value="6" title="' + out('Apply') + '" type="button">6</button>' + '<button class="cmd-scroll-preset" data-value="7" title="' + out('Apply') + '" type="button">7</button>' + '<button class="cmd-scroll-preset" data-value="8" title="' + out('Apply') + '" type="button">8</button>' + '<button class="cmd-scroll-preset" data-value="9" title="' + out('Apply') + '" type="button">9</button>' + '<button class="cmd-scroll-preset" data-value="10" title="' + out('Apply') + '" type="button">10</button>' + '<button class="cmd-scroll-preset" data-value="11" title="' + out('Apply') + '" type="button">11</button>' + '<button class="cmd-scroll-preset" data-value="12" title="' + out('Apply') + '" type="button">12</button>' + '<button class="cmd-scroll-preset" data-value="13" title="' + out('Apply') + '" type="button">13</button>' + '<button class="cmd-scroll-preset" data-value="14" title="' + out('Apply') + '" type="button">14</button>' + '<button class="cmd-scroll-preset" data-value="" title="' + out('Remove') + '" type="button"><svg class="is-icon-flex" style="flex:none;width:10px;height:10px;"><use xlink:href="#icon-clean"></use></svg></button>' + '</div>' + '</div>' + '</div>' + '</div>' + '</div>';
|
3677
3677
|
html += '<div class="is-modal editmodule" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">' + '<div style="max-width:900px;height:570px;padding:0;box-sizing:border-box;position:relative;">' + '<div class="is-modal-bar is-draggable" style="position: absolute;top: 0;left: 0;width: 100%;z-index:1;">' + out('Module Settings') + '</div>' + '<iframe style="position: absolute;top: 0;left: 0;width:100%;height:100%;border:none;border-bottom:60px solid transparent;border-top:40px solid transparent;margin:0;box-sizing:border-box;" src="about:blank"></iframe>' + '<input id="hidModuleCode" type="hidden" />' + '<input id="hidModuleSettings" type="hidden" />' + '<button class="input-ok classic" style="height:60px;position:absolute;left:0;bottom:0;">' + out('Ok') + '</button>' + '</div>' + '</div>' + '' + '';
|
@@ -3829,6 +3829,55 @@ class EditSection {
|
|
3829
3829
|
} //Trigger Change event
|
3830
3830
|
|
3831
3831
|
|
3832
|
+
this.builder.settings.onChange();
|
3833
|
+
});
|
3834
|
+
});
|
3835
|
+
const btnBetweenBoxSpacing = modalEditSection.querySelectorAll('.cmd-betweenbox-spacing');
|
3836
|
+
btnBetweenBoxSpacing.forEach(btn => {
|
3837
|
+
btn.addEventListener('click', () => {
|
3838
|
+
this.builder.editor.saveForUndo();
|
3839
|
+
let val = btn.getAttribute('data-value');
|
3840
|
+
const activeSection = this.builder.activeSection;
|
3841
|
+
|
3842
|
+
if (val == 'space') {
|
3843
|
+
dom$k.removeClass(activeSection, 'space-around');
|
3844
|
+
} else {
|
3845
|
+
dom$k.addClass(activeSection, 'space-around');
|
3846
|
+
}
|
3847
|
+
|
3848
|
+
let btns = modalEditSection.querySelectorAll('.cmd-betweenbox-spacing');
|
3849
|
+
btns.forEach(btn => {
|
3850
|
+
dom$k.removeClass(btn, 'on');
|
3851
|
+
});
|
3852
|
+
dom$k.addClass(btn, 'on'); //Trigger Change event
|
3853
|
+
|
3854
|
+
this.builder.settings.onChange();
|
3855
|
+
});
|
3856
|
+
});
|
3857
|
+
const btnSectionStack = modalEditSection.querySelectorAll('.cmd-section-stack');
|
3858
|
+
btnSectionStack.forEach(btn => {
|
3859
|
+
btn.addEventListener('click', () => {
|
3860
|
+
this.builder.editor.saveForUndo();
|
3861
|
+
let val = btn.getAttribute('data-value');
|
3862
|
+
const activeSection = this.builder.activeSection;
|
3863
|
+
dom$k.removeClass(activeSection, 'stack-top');
|
3864
|
+
dom$k.removeClass(activeSection, 'stack-middle');
|
3865
|
+
dom$k.removeClass(activeSection, 'stack-bottom');
|
3866
|
+
|
3867
|
+
if (val == 'top') {
|
3868
|
+
dom$k.addClass(activeSection, 'stack-top');
|
3869
|
+
} else if (val == 'middle') {
|
3870
|
+
dom$k.addClass(activeSection, 'stack-middle');
|
3871
|
+
} else if (val == 'bottom') {
|
3872
|
+
dom$k.addClass(activeSection, 'stack-bottom');
|
3873
|
+
}
|
3874
|
+
|
3875
|
+
let btns = modalEditSection.querySelectorAll('.cmd-section-stack');
|
3876
|
+
btns.forEach(btn => {
|
3877
|
+
dom$k.removeClass(btn, 'on');
|
3878
|
+
});
|
3879
|
+
dom$k.addClass(btn, 'on'); //Trigger Change event
|
3880
|
+
|
3832
3881
|
this.builder.settings.onChange();
|
3833
3882
|
});
|
3834
3883
|
});
|
@@ -3905,6 +3954,7 @@ class EditSection {
|
|
3905
3954
|
}
|
3906
3955
|
|
3907
3956
|
edit() {
|
3957
|
+
this.builder.hideTools();
|
3908
3958
|
this.builder.sidebar.closeSidebar();
|
3909
3959
|
const activeSection = this.builder.activeSection;
|
3910
3960
|
const modalEditSection = this.modalEditSection; // const elms = this.builder.doc.querySelectorAll('.section-active');
|
@@ -3915,6 +3965,7 @@ class EditSection {
|
|
3915
3965
|
dom$k.addClass(activeSection, 'section-active');
|
3916
3966
|
this.builder.showModal(modalEditSection, false, () => {
|
3917
3967
|
dom$k.removeClass(activeSection, 'section-active');
|
3968
|
+
this.builder.showTools();
|
3918
3969
|
});
|
3919
3970
|
modalEditSection.focus(); // Clean old unused is-bg-light/dark
|
3920
3971
|
|
@@ -4027,16 +4078,48 @@ class EditSection {
|
|
4027
4078
|
}
|
4028
4079
|
|
4029
4080
|
btns = modalEditSection.querySelectorAll('.cmd-box-spacing');
|
4030
|
-
const
|
4081
|
+
const divSectionSpaceSettings = this.modalEditSection.querySelector('.div-section-spacesettings');
|
4031
4082
|
btns.forEach(btn => {
|
4032
4083
|
dom$k.removeClass(btn, 'on');
|
4033
4084
|
});
|
4034
4085
|
|
4035
4086
|
if (dom$k.hasClass(activeSection, 'box-space')) {
|
4036
|
-
if (dom$k.hasClass(activeSection, 'box-space-sm')) dom$k.addClass(modalEditSection.querySelector('.cmd-box-spacing[data-value="sm"]'), 'on');else if (dom$k.hasClass(activeSection, 'box-space-m')) dom$k.addClass(modalEditSection.querySelector('.cmd-box-spacing[data-value="m"]'), 'on');else if (dom$k.hasClass(activeSection, 'box-space-lg')) dom$k.addClass(modalEditSection.querySelector('.cmd-box-spacing[data-value="lg"]'), 'on');else dom$k.addClass(modalEditSection.querySelector('.cmd-box-spacing[data-value="default"]'), 'on');
|
4037
|
-
|
4087
|
+
if (dom$k.hasClass(activeSection, 'box-space-sm')) dom$k.addClass(modalEditSection.querySelector('.cmd-box-spacing[data-value="sm"]'), 'on');else if (dom$k.hasClass(activeSection, 'box-space-xxs')) dom$k.addClass(modalEditSection.querySelector('.cmd-box-spacing[data-value="xxs"]'), 'on');else if (dom$k.hasClass(activeSection, 'box-space-m')) dom$k.addClass(modalEditSection.querySelector('.cmd-box-spacing[data-value="m"]'), 'on');else if (dom$k.hasClass(activeSection, 'box-space-lg')) dom$k.addClass(modalEditSection.querySelector('.cmd-box-spacing[data-value="lg"]'), 'on');else dom$k.addClass(modalEditSection.querySelector('.cmd-box-spacing[data-value="default"]'), 'on');
|
4088
|
+
divSectionSpaceSettings.style.display = 'flex';
|
4089
|
+
} else {
|
4090
|
+
divSectionSpaceSettings.style.display = 'none';
|
4091
|
+
}
|
4092
|
+
|
4093
|
+
const divMultiBoxes = this.modalEditSection.querySelector('.div-multi-boxes');
|
4094
|
+
|
4095
|
+
if (dom$k.hasClass(activeSection, 'is-box')) {
|
4096
|
+
divMultiBoxes.style.display = 'none';
|
4097
|
+
} else {
|
4098
|
+
divMultiBoxes.style.display = 'block';
|
4099
|
+
}
|
4100
|
+
|
4101
|
+
btns = modalEditSection.querySelectorAll('.cmd-betweenbox-spacing');
|
4102
|
+
btns.forEach(btn => {
|
4103
|
+
dom$k.removeClass(btn, 'on');
|
4104
|
+
});
|
4105
|
+
|
4106
|
+
if (dom$k.hasClass(activeSection, 'space-around')) {
|
4107
|
+
dom$k.addClass(modalEditSection.querySelector('.cmd-betweenbox-spacing[data-value="no-space"]'), 'on');
|
4038
4108
|
} else {
|
4039
|
-
|
4109
|
+
dom$k.addClass(modalEditSection.querySelector('.cmd-betweenbox-spacing[data-value="space"]'), 'on');
|
4110
|
+
}
|
4111
|
+
|
4112
|
+
btns = modalEditSection.querySelectorAll('.cmd-section-stack');
|
4113
|
+
btns.forEach(btn => {
|
4114
|
+
dom$k.removeClass(btn, 'on');
|
4115
|
+
});
|
4116
|
+
|
4117
|
+
if (dom$k.hasClass(activeSection, 'stack-top')) {
|
4118
|
+
dom$k.addClass(modalEditSection.querySelector('.cmd-section-stack[data-value="top"]'), 'on');
|
4119
|
+
} else if (dom$k.hasClass(activeSection, 'stack-middle')) {
|
4120
|
+
dom$k.addClass(modalEditSection.querySelector('.cmd-section-stack[data-value="middle"]'), 'on');
|
4121
|
+
} else if (dom$k.hasClass(activeSection, 'stack-bottom')) {
|
4122
|
+
dom$k.addClass(modalEditSection.querySelector('.cmd-section-stack[data-value="bottom"]'), 'on');
|
4040
4123
|
}
|
4041
4124
|
|
4042
4125
|
btns = modalEditSection.querySelectorAll('.cmd-scroll-preset');
|
@@ -4290,32 +4373,42 @@ class EditSection {
|
|
4290
4373
|
|
4291
4374
|
boxSpacing(s) {
|
4292
4375
|
const activeSection = this.builder.activeSection;
|
4293
|
-
const
|
4376
|
+
const divSectionSpaceSettings = this.modalEditSection.querySelector('.div-section-spacesettings');
|
4294
4377
|
|
4295
4378
|
if (s == '') {
|
4296
4379
|
dom$k.removeClass(activeSection, 'box-space');
|
4380
|
+
dom$k.removeClass(activeSection, 'box-space-xxs');
|
4297
4381
|
dom$k.removeClass(activeSection, 'box-space-sm');
|
4298
4382
|
dom$k.removeClass(activeSection, 'box-space-m');
|
4299
4383
|
dom$k.removeClass(activeSection, 'box-space-lg');
|
4300
|
-
|
4384
|
+
divSectionSpaceSettings.style.display = 'none';
|
4301
4385
|
} else {
|
4302
4386
|
dom$k.addClass(activeSection, 'box-space');
|
4303
|
-
|
4387
|
+
divSectionSpaceSettings.style.display = 'flex';
|
4304
4388
|
}
|
4305
4389
|
|
4306
4390
|
if (s === 'sm') {
|
4391
|
+
dom$k.removeClass(activeSection, 'box-space-xxs');
|
4307
4392
|
dom$k.removeClass(activeSection, 'box-space-m');
|
4308
4393
|
dom$k.removeClass(activeSection, 'box-space-lg');
|
4309
4394
|
dom$k.addClass(activeSection, 'box-space-sm');
|
4395
|
+
} else if (s == 'xxs') {
|
4396
|
+
dom$k.removeClass(activeSection, 'box-space-m');
|
4397
|
+
dom$k.removeClass(activeSection, 'box-space-sm');
|
4398
|
+
dom$k.removeClass(activeSection, 'box-space-lg');
|
4399
|
+
dom$k.addClass(activeSection, 'box-space-xxs');
|
4310
4400
|
} else if (s == 'm') {
|
4401
|
+
dom$k.removeClass(activeSection, 'box-space-xxs');
|
4311
4402
|
dom$k.removeClass(activeSection, 'box-space-sm');
|
4312
4403
|
dom$k.removeClass(activeSection, 'box-space-lg');
|
4313
4404
|
dom$k.addClass(activeSection, 'box-space-m');
|
4314
4405
|
} else if (s == 'lg') {
|
4406
|
+
dom$k.removeClass(activeSection, 'box-space-xxs');
|
4315
4407
|
dom$k.removeClass(activeSection, 'box-space-sm');
|
4316
4408
|
dom$k.removeClass(activeSection, 'box-space-m');
|
4317
4409
|
dom$k.addClass(activeSection, 'box-space-lg');
|
4318
4410
|
} else if (s == 'default') {
|
4411
|
+
dom$k.removeClass(activeSection, 'box-space-xxs');
|
4319
4412
|
dom$k.removeClass(activeSection, 'box-space-sm');
|
4320
4413
|
dom$k.removeClass(activeSection, 'box-space-m');
|
4321
4414
|
dom$k.removeClass(activeSection, 'box-space-lg');
|
@@ -9942,7 +10035,7 @@ class EditBox {
|
|
9942
10035
|
'<div style="display:flex">' + '<button title="' + out('Typography Style') + '" class="cmd-box-typography" data-value="+"> ' + out('Typography Style') + ' </button>' + '<br style="clear:both">' + '</div>' + '</div>' : '') + '</div>' + '<div id="divBoxContentContainer" class="is-tab-content" data-group="boxsettings" style="padding-top:0">' + '<div style="padding-top:10px;">' + '<label for="chkParallaxContent" style="margin:0;"><input id="chkParallaxContent" type="checkbox" /> ' + out('Parallax') + '</label>' + '</div>' + '<div style="padding-top:10px;">' + '<label for="chkFadeContent" style="margin:0;"><input id="chkFadeContent" type="checkbox" /> ' + out('Fade') + '</label>' + '</div>';
|
9943
10036
|
html += '<div style="display:flex;flex-direction: row;">' + '<div style="display:flex;flex-direction: column;margin-right:20px;">' + '<div style="padding-top:13px;padding-bottom: 3px;">' + out('Position') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Top Left') + '" class="cmd-box-content-pos" data-value="topleft" style="width:40px;">↖</button>' + '<button title="' + out('Top Center') + '" class="cmd-box-content-pos" data-value="topcenter" style="width:40px;border-left:none;">↑</button>' + '<button title="' + out('Top Right') + '" class="cmd-box-content-pos" data-value="topright" style="width:40px;border-left:none;">↗</button>' + '</div>' + '<div style="display:flex">' + '<button title="' + out('Middle Left') + '" class="cmd-box-content-pos" data-value="middleleft" style="width:40px;border-top:none;">←</button>' + '<button title="' + out('Middle Center') + '" class="cmd-box-content-pos" data-value="middlecenter" style="width:40px;border-left:none;border-top:none;">☉</button>' + '<button title="' + out('Middle Right') + '" class="cmd-box-content-pos" data-value="middleright" style="width:40px;border-left:none;border-top:none;">→</button>' + '</div>' + '<div style="display:flex">' + '<button title="' + out('Bottom Left') + '" class="cmd-box-content-pos" data-value="bottomleft" style="width:40px;border-top:none;">↙</button>' + '<button title="' + out('Bottom Center') + '" class="cmd-box-content-pos" data-value="bottomcenter" style="width:40px;border-left:none;border-top:none;">↓</button>' + '<button title="' + out('Bottom Right') + '" class="cmd-box-content-pos" data-value="bottomright" style="width:40px;border-left:none;border-top:none;">↘</button>' + '</div>' + '</div>' + '<div style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 1px;">' + out('Height') + ':</div>' + '<div style="display: flex;flex-direction: row;flex-wrap: wrap;">' + '<button title="' + out('Auto') + '" class="cmd-content-height" data-value="" style="width:60px">Auto</button>' + '<button title="' + out('Full') + '" class="cmd-content-height" data-value="100" style="width:40px">Full</button>' + '</div>' + '<div class="div-content-justify">' + '<div style="padding-top:10px;padding-bottom: 1px;">' + out('Justify') + ':</div>' + '<div style="display: flex;flex-direction: row;flex-wrap: wrap;">' + '<button title="' + out('Top') + '" class="cmd-content-justify" data-value="flex-start" style="width:40px"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-arrow-bar-to-up"></use></svg></button>' + '<button title="' + out('Bottom') + '" class="cmd-content-justify" data-value="flex-end" style="width:40px"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-arrow-bar-to-down"></use></svg></button>' + '<button title="' + out('Space Between') + '" class="cmd-content-justify" data-value="space-between" style="width:40px"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-space-between"></use></svg></button>' + '</div>' + '</div>' + '</div>' + '</div>';
|
9944
10037
|
html += '<div style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Vertical Adjustment') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Decrease') + '" class="cmd-box-content-edge-y" data-value="-" style="width:40px;">-</button>' + '<button title="' + out('Increase') + '" class="cmd-box-content-edge-y" data-value="+" style="width:40px;border-left:none;">+</button>' + '<button title="' + out('Not Set') + '" class="cmd-box-content-edge-y" data-value="" style="display:none;width:40px;border-left:none;min-width:100px;">' + out('Not Set') + '</button>' + '</div>' + '</div>' + '<div style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Horizontal Adjustment') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Decrease') + '" class="cmd-box-content-edge-x" data-value="-" style="width:40px;">-</button>' + '<button title="' + out('Increase') + '" class="cmd-box-content-edge-x" data-value="+" style="width:40px;border-left:none;">+</button>' + '<button title="' + out('Not Set') + '" class="cmd-box-content-edge-x" data-value="" style="display:none;width:40px;border-left:none;min-width:100px;">' + out('Not Set') + '</button>' + '</div>' + '</div>' + '<div style="padding-top:13px;">' + '<label for="chkAutofitContent" style="margin:0;"><input id="chkAutofitContent" type="checkbox" /> ' + out('Autofit Content on Mobile') + '</label>' + '</div>' + '</div>';
|
9945
|
-
html += '<div id="divBoxImage" class="is-tab-content" data-group="boxsettings" style="padding-top:0">' + (this.builder.settings.onCoverImageSelectClick != null ? '<div style="padding-top:20px;">' + '<button class="cmd-box-selectasset" style="width:120px;">' + out('Select Image') + '</button>' + '</div>' + '<div style="padding-top:20px;">' + '<label for="chkAnimateBg" style="margin:0;"><input id="chkAnimateBg" type="checkbox" /> ' + out('Ken Burns Effect') + '</label>' + '</div>' : '<div style="padding-top:20px;">' + '<label for="chkAnimateBg" style="margin:0;"><input id="chkAnimateBg" type="checkbox" /> ' + out('Ken Burns Effect') + '</label>' + '</div>') + '<div style="padding-top:10px;">' + '<label for="chkParallaxBg" style="margin:0;"><input id="chkParallaxBg" type="checkbox" /> ' + out('Parallax') + ' & ' + out('Scale') + '</label>' + '</div>' + '<div style="padding-top:10px;">' + '<label for="chkParallaxBg2" style="margin:0;"><input id="chkParallaxBg2" type="checkbox" /> ' + out('Parallax') + ' ' + out('(visible on preview)') + '</label>' + '</div>';
|
10038
|
+
html += '<div id="divBoxImage" class="is-tab-content" data-group="boxsettings" style="padding-top:0">' + (this.builder.settings.onCoverImageSelectClick != null ? '<div style="padding-top:20px;">' + '<button class="cmd-box-selectasset" style="width:120px;">' + out('Select Image') + '</button>' + '</div>' + '<div style="padding-top:20px;">' + '<label for="chkAnimateBg" style="margin:0;"><input id="chkAnimateBg" type="checkbox" /> ' + out('Ken Burns Effect') + '</label>' + '</div>' : '<div style="padding-top:20px;">' + '<label for="chkAnimateBg" style="margin:0;"><input id="chkAnimateBg" type="checkbox" /> ' + out('Ken Burns Effect') + '</label>' + '</div>') + '<div style="padding-top:10px;">' + '<label for="chkParallaxBg" style="margin:0;"><input id="chkParallaxBg" type="checkbox" /> ' + out('Parallax') + ' & ' + out('Scale') + '</label>' + '</div>' + '<div style="padding-top:10px;">' + '<label for="chkParallaxBg2" style="margin:0;"><input id="chkParallaxBg2" type="checkbox" /> ' + out('Parallax') + ' ' + out('(visible on preview)') + '</label>' + '</div>' + '<div style="padding-top:10px;">' + '<label for="chkZoomOnHover" style="margin:0;"><input id="chkZoomOnHover" type="checkbox" /> ' + out('Zoom on Hover') + '</label>' + '</div>';
|
9946
10039
|
html += '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Overlay Color') + ':</div>' + '<div style="display:flex;">' + '<button title="' + out('Overlay Color') + '" class="input-box-overlaycolor is-btn-color" style="margin-right:15px"></button>' + '</div>' + '<div style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Overlay Transparency') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Decrease') + '" class="cmd-box-overlayopacity" data-value="-" style="width:40px;border-left:none;">-</button>' + '<button title="' + out('Increase') + '" class="cmd-box-overlayopacity" data-value="+" style="width:40px;">+</button>' + '<button title="' + out('None') + '" class="cmd-box-overlayopacity" data-value="0" style="border-left:none;min-width:100px;">' + out('None') + '</button>' + '</div>' + '</div>' + '</div>' + '<div id="divBoxAnimate" class="is-tab-content" data-group="boxsettings" style="padding-top:0">' + '<div style="display:flex;flex-direction: column;">' + '<select class="cmd-box-animate">' + '<option value="">' + out('None') + '</option>' + '<option value="is-pulse">pulse</option>' + '<option value="is-bounceIn">bounceIn</option>' + '<option value="is-fadeIn">fadeIn</option>' + '<option value="is-fadeInDown">fadeInDown</option>' + '<option value="is-fadeInLeft">fadeInLeft</option>' + '<option value="is-fadeInRight">fadeInRight</option>' + '<option value="is-fadeInUp">fadeInUp</option>' + '<option value="is-flipInX">flipInX</option>' + '<option value="is-flipInY">flipInY</option>' + '<option value="is-slideInUp">slideInUp</option>' + '<option value="is-slideInDown">slideInDown</option>' + '<option value="is-slideInLeft">slideInLeft</option>' + '<option value="is-slideInRight">slideInRight</option>' + '<option value="is-zoomIn">zoomIn</option>' + '</select>' + '<label for="chkAnimOnce" style="margin:10px 0 0;"><input id="chkAnimOnce" type="checkbox" /> ' + out('Once') + '</label>' + '</div>';
|
9947
10040
|
html += '<div>' + '<label style="padding-top:20px;">' + out('Delay') + ': ' + '<select class="cmd-box-animatedelay" style="margin-top:3px;">' + '<option value="">' + out('None') + '</option>' + '<option value="delay-0ms">0s</option>' + '<option value="delay-100ms">100ms</option>' + '<option value="delay-200ms">200ms</option>' + '<option value="delay-300ms">300ms</option>' + '<option value="delay-400ms">400ms</option>' + '<option value="delay-500ms">500ms</option>' + '<option value="delay-600ms">600ms</option>' + '<option value="delay-700ms">700ms</option>' + '<option value="delay-800ms">800ms</option>' + '<option value="delay-900ms">900ms</option>' + '<option value="delay-1000ms">1000ms</option>' + '<option value="delay-1100ms">1100ms</option>' + '<option value="delay-1200ms">1200ms</option>' + '<option value="delay-1300ms">1300ms</option>' + '<option value="delay-1400ms">1400ms</option>' + '<option value="delay-1500ms">1500ms</option>' + '<option value="delay-1600ms">1600ms</option>' + '<option value="delay-1700ms">1700ms</option>' + '<option value="delay-1800ms">1800ms</option>' + '<option value="delay-1900ms">1900ms</option>' + '<option value="delay-2000ms">2000ms</option>' + '<option value="delay-2100ms">2100ms</option>' + '<option value="delay-2200ms">2200ms</option>' + '<option value="delay-2300ms">2300ms</option>' + '<option value="delay-2400ms">2400ms</option>' + '<option value="delay-2500ms">2500ms</option>' + '<option value="delay-2600ms">2600ms</option>' + '<option value="delay-2700ms">2700ms</option>' + '<option value="delay-2800ms">2800ms</option>' + '<option value="delay-2900ms">2900ms</option>' + '<option value="delay-3000ms">3000ms</option>' + '</select></label>' + '</div>' + '<div style="padding-top:20px">' + '<button class="cmd-box-animate-test" style="width:100%">' + out('Test') + '</button>' + '</div>' + '</div>' + '</div>' + '</div>' + '' + '<div class="is-modal pickphoto" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">' + '<div style="max-width:1000px;height:570px;padding:0;box-sizing:border-box;position:relative;">' + '<div class="is-modal-bar is-draggable" style="position: absolute;top: 0;left: 0;width: 100%;z-index:1;">' + out('Photos') + '</div>' + '<iframe style="position: absolute;top: 0;left: 0;width:100%;height:100%;border:none;border-top:40px solid transparent;margin:0;box-sizing:border-box;" src="about:blank"></iframe>' + '</div>' + '</div>' + '';
|
9948
10041
|
dom$j.appendHtml(builderStuff, html); // Box Tool
|
@@ -10907,6 +11000,20 @@ class EditBox {
|
|
10907
11000
|
this.builder.editor.saveForUndo();
|
10908
11001
|
this.boxParallaxBg2(); //Trigger Change event
|
10909
11002
|
|
11003
|
+
this.builder.settings.onChange();
|
11004
|
+
});
|
11005
|
+
const chkZoomOnHover = modalEditBox.querySelector('#chkZoomOnHover');
|
11006
|
+
chkZoomOnHover.addEventListener('click', () => {
|
11007
|
+
this.builder.editor.saveForUndo();
|
11008
|
+
let activeBox = this.builder.activeBox;
|
11009
|
+
|
11010
|
+
if (chkZoomOnHover.checked) {
|
11011
|
+
activeBox.classList.add('hover-zoom');
|
11012
|
+
} else {
|
11013
|
+
activeBox.classList.remove('hover-zoom');
|
11014
|
+
} //Trigger Change event
|
11015
|
+
|
11016
|
+
|
10910
11017
|
this.builder.settings.onChange();
|
10911
11018
|
});
|
10912
11019
|
const btnBoxOverlayOpacity = modalEditBox.querySelectorAll('.cmd-box-overlayopacity');
|
@@ -11442,6 +11549,7 @@ class EditBox {
|
|
11442
11549
|
}
|
11443
11550
|
|
11444
11551
|
edit() {
|
11552
|
+
this.builder.hideTools();
|
11445
11553
|
this.targetBox = null;
|
11446
11554
|
this.builder.sidebar.closeSidebar();
|
11447
11555
|
const builderStuff = this.builderStuff;
|
@@ -11589,6 +11697,12 @@ class EditBox {
|
|
11589
11697
|
} else {
|
11590
11698
|
modalEditBox.querySelector('#chkParallaxBg2').checked = false;
|
11591
11699
|
}
|
11700
|
+
|
11701
|
+
if (activeBox.classList.contains('hover-zoom')) {
|
11702
|
+
modalEditBox.querySelector('#chkZoomOnHover').checked = true;
|
11703
|
+
} else {
|
11704
|
+
modalEditBox.querySelector('#chkZoomOnHover').checked = false;
|
11705
|
+
}
|
11592
11706
|
}
|
11593
11707
|
|
11594
11708
|
if (dom$j.hasClass(activeBox, 'is-section')) {
|
@@ -11735,6 +11849,7 @@ class EditBox {
|
|
11735
11849
|
dom$j.addClass(activeBox, 'box-active');
|
11736
11850
|
this.builder.showModal(modalEditBox, false, () => {
|
11737
11851
|
dom$j.removeClass(activeBox, 'box-active');
|
11852
|
+
this.builder.showTools();
|
11738
11853
|
});
|
11739
11854
|
modalEditBox.focus();
|
11740
11855
|
|
@@ -11966,8 +12081,6 @@ class EditBox {
|
|
11966
12081
|
|
11967
12082
|
if (dom$j.hasClass(activeSection, 'noedit')) {
|
11968
12083
|
chkBoxAddText.style.display = 'none';
|
11969
|
-
} else {
|
11970
|
-
chkBoxAddText.style.display = 'flex';
|
11971
12084
|
} // Content Height & Justify
|
11972
12085
|
|
11973
12086
|
|
@@ -12495,6 +12608,7 @@ class EditBox {
|
|
12495
12608
|
overlayBg.removeAttribute('data-top-bottom');
|
12496
12609
|
overlayBg.style.transform = 'translateY(0) scale(1)';
|
12497
12610
|
overlayBg.style.transform = '';
|
12611
|
+
overlayBg.style.transition = '';
|
12498
12612
|
let s = overlayBg.outerHTML;
|
12499
12613
|
overlayBg.parentNode.removeChild(overlayBg);
|
12500
12614
|
dom$j.appendHtml(overlay, s);
|
@@ -18543,7 +18657,9 @@ class Util {
|
|
18543
18657
|
|
18544
18658
|
repositionColumnTool(transition) {
|
18545
18659
|
let columnTool = this.builder.colTool.columnTool;
|
18660
|
+
if (!columnTool) return;
|
18546
18661
|
let col = this.builder.activeCol;
|
18662
|
+
if (!col) return;
|
18547
18663
|
|
18548
18664
|
if (transition) {
|
18549
18665
|
columnTool.style.transition = 'all 100ms ease';
|
@@ -62102,6 +62218,7 @@ class Image$1 {
|
|
62102
62218
|
<button title="3x4" data-crop-size="0.75" style="width: 45px;height: 60px;">3x4</button>
|
62103
62219
|
<button title="6x4" data-crop-size="1.5" style="width: 60px;height: 40px;">6x4</button>
|
62104
62220
|
<button title="4x6" data-crop-size="0.6666" style="width: 40px;height: 60px;">4x6</button>
|
62221
|
+
<button title="16x9" data-crop-size="1.77" style="width: 60px;height: 35px;">16x9</button>
|
62105
62222
|
<button title="${util.out('Free')}" data-crop-size="" style="width: 60px;height: 45px;">${util.out('Free')}</button>
|
62106
62223
|
</div>
|
62107
62224
|
<div class="imageedit-preview" style="max-width:1000px;width:100%;max-height:550px;">
|
@@ -63417,7 +63534,7 @@ class ButtonEditor {
|
|
63417
63534
|
${util.out('Button')}
|
63418
63535
|
<button class="is-modal-close" tabindex="-1" title="${util.out('Close')}">✕</button>
|
63419
63536
|
</div>
|
63420
|
-
<div style="padding:0">
|
63537
|
+
<div style="padding:0;height:100%;">
|
63421
63538
|
<div class="is-tabs" data-group="button" style="position:relative;z-index:1">
|
63422
63539
|
<a title="${util.out('General')}" href="" data-content="divButtonGeneral" class="active">${util.out('General')}</a>
|
63423
63540
|
<a title="${util.out('Hover')}" href="" data-content="divButtonHover">${util.out('Hover')}</a>
|
@@ -63724,8 +63841,8 @@ class ButtonEditor {
|
|
63724
63841
|
let elm = e.target;
|
63725
63842
|
this.builder.colorPicker.open(color => {
|
63726
63843
|
const activeButton = this.builder.activeButton || this.builder.activeLinkButton;
|
63727
|
-
activeButton.style.backgroundColor = color;
|
63728
|
-
|
63844
|
+
activeButton.style.backgroundColor = color; // activeButton.setAttribute('data-bg', color);
|
63845
|
+
|
63729
63846
|
dom.removeClassesByPrefix(activeButton, 'bg-');
|
63730
63847
|
elm.style.backgroundColor = color; // preview
|
63731
63848
|
//Trigger Change event
|
@@ -63789,10 +63906,20 @@ class ButtonEditor {
|
|
63789
63906
|
let elm = e.target;
|
63790
63907
|
this.builder.colorPicker.open(color => {
|
63791
63908
|
const activeButton = this.builder.activeButton || this.builder.activeLinkButton;
|
63792
|
-
|
63909
|
+
|
63910
|
+
if (color === '') {
|
63911
|
+
activeButton.removeAttribute('data-bg');
|
63912
|
+
activeButton.removeAttribute('data-hover-bg');
|
63913
|
+
activeButton.removeAttribute('onmouseover');
|
63914
|
+
activeButton.removeAttribute('onmouseout');
|
63915
|
+
} else {
|
63916
|
+
activeButton.setAttribute('data-bg', activeButton.style.backgroundColor);
|
63917
|
+
activeButton.setAttribute('data-hover-bg', color);
|
63918
|
+
activeButton.setAttribute('onmouseover', 'if(this.getAttribute(\'data-hover-bg\'))this.style.backgroundColor=this.getAttribute(\'data-hover-bg\');');
|
63919
|
+
activeButton.setAttribute('onmouseout', 'if(this.getAttribute(\'data-bg\'))this.style.backgroundColor=this.getAttribute(\'data-bg\');else this.style.backgroundColor=\'\'');
|
63920
|
+
}
|
63921
|
+
|
63793
63922
|
dom.removeClassesByPrefix(activeButton, 'hover:bg-');
|
63794
|
-
activeButton.setAttribute('onmouseover', 'if(this.getAttribute(\'data-hover-bg\'))this.style.backgroundColor=this.getAttribute(\'data-hover-bg\');');
|
63795
|
-
activeButton.setAttribute('onmouseout', 'if(this.getAttribute(\'data-bg\'))this.style.backgroundColor=this.getAttribute(\'data-bg\');else this.style.backgroundColor=\'\'');
|
63796
63923
|
elm.style.backgroundColor = color; // preview
|
63797
63924
|
//Trigger Change event
|
63798
63925
|
|
@@ -64249,15 +64376,20 @@ class ButtonEditor {
|
|
64249
64376
|
|
64250
64377
|
dom.removeClass(activeButton, 'active');
|
64251
64378
|
dom.removeClass(activeButton, 'elm-active');
|
64252
|
-
|
64253
|
-
|
64254
|
-
|
64379
|
+
let dataBg = activeButton.getAttribute('data-bg'); // if(!dataBg) {
|
64380
|
+
// if(activeButton.style.backgroundColor) dataBg=activeButton.style.backgroundColor;
|
64381
|
+
// }
|
64382
|
+
|
64383
|
+
const dataHoverBg = activeButton.getAttribute('data-hover-bg'); // const color = activeButton.style.color;
|
64384
|
+
|
64385
|
+
const cssText = activeButton.style.cssText;
|
64255
64386
|
mybuttons.push({
|
64256
64387
|
id: mybuttons.length,
|
64257
64388
|
className: activeButton.className,
|
64258
64389
|
bg: dataBg ? dataBg : '',
|
64259
64390
|
hoverBg: dataHoverBg ? dataHoverBg : '',
|
64260
|
-
color: color
|
64391
|
+
// color: color?color:'',
|
64392
|
+
cssText: cssText
|
64261
64393
|
});
|
64262
64394
|
localStorage.setItem('_savedbuttons', JSON.stringify(mybuttons));
|
64263
64395
|
this.renderMyButtons();
|
@@ -64292,6 +64424,14 @@ class ButtonEditor {
|
|
64292
64424
|
this.getVisibleBgColor(item.replace('hover:', ''), color => {
|
64293
64425
|
btnHoverBgColor.style.backgroundColor = color;
|
64294
64426
|
activeButton.setAttribute('data-hover-bg', color); //new inline
|
64427
|
+
|
64428
|
+
if (!activeButton.hasAttribute('data-bg')) {
|
64429
|
+
// fix needed data-bg
|
64430
|
+
activeButton.setAttribute('data-bg', btnBgColor.style.backgroundColor); // needed by hover
|
64431
|
+
}
|
64432
|
+
|
64433
|
+
activeButton.setAttribute('onmouseover', 'if(this.getAttribute(\'data-hover-bg\'))this.style.backgroundColor=this.getAttribute(\'data-hover-bg\');');
|
64434
|
+
activeButton.setAttribute('onmouseout', 'if(this.getAttribute(\'data-bg\'))this.style.backgroundColor=this.getAttribute(\'data-bg\');else this.style.backgroundColor=\'\'');
|
64295
64435
|
});
|
64296
64436
|
}
|
64297
64437
|
|
@@ -64318,7 +64458,13 @@ class ButtonEditor {
|
|
64318
64458
|
} // NEW: inline color
|
64319
64459
|
|
64320
64460
|
|
64321
|
-
if (activeButton.
|
64461
|
+
if (activeButton.hasAttribute('data-bg')) {
|
64462
|
+
btnBgColor.style.backgroundColor = activeButton.getAttribute('data-bg');
|
64463
|
+
} else {
|
64464
|
+
if (activeButton.style.backgroundColor) {
|
64465
|
+
btnBgColor.style.backgroundColor = activeButton.style.backgroundColor;
|
64466
|
+
}
|
64467
|
+
}
|
64322
64468
|
|
64323
64469
|
if (activeButton.getAttribute('data-hover-bg')) btnHoverBgColor.style.backgroundColor = activeButton.getAttribute('data-hover-bg');
|
64324
64470
|
if (activeButton.style.color) btnTextColor.style.backgroundColor = activeButton.style.color;
|
@@ -64516,7 +64662,95 @@ class ButtonEditor {
|
|
64516
64662
|
}
|
64517
64663
|
|
64518
64664
|
renderTemplates() {
|
64519
|
-
const templates = [
|
64665
|
+
const templates = [
|
64666
|
+
/* rounded */
|
64667
|
+
{
|
64668
|
+
html: `
|
64669
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 mt-1 uppercase py-2 size-14 px-8 border-current hover:border-current font-normal leading-relaxed rounded-full tracking-125">Read More</a>
|
64670
|
+
`
|
64671
|
+
}, {
|
64672
|
+
html: `
|
64673
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 mt-1 uppercase py-2 size-14 px-8 text-black leading-relaxed rounded-full border-transparent hover:border-transparent font-normal tracking-125" style="background-color: rgb(240, 240, 240);">Get Started</a>
|
64674
|
+
`
|
64675
|
+
}, {
|
64676
|
+
html: `
|
64677
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 py-2 px-8 font-normal leading-relaxed border-transparent rounded-full ml-0 mt-1 size-14 tracking-125 hover:border-transparent uppercase" style="color: rgb(255, 255, 255); background-color: rgb(255, 127, 0);">Get Started</a>
|
64678
|
+
`
|
64679
|
+
}, {
|
64680
|
+
html: `
|
64681
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 py-2 px-8 font-normal leading-relaxed border-transparent rounded-full ml-0 mt-1 size-14 tracking-125 hover:border-transparent uppercase" style="color: rgb(255, 255, 255); background-color: rgb(83,98,208);">Get Started</a>
|
64682
|
+
`
|
64683
|
+
}, {
|
64684
|
+
html: `
|
64685
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 py-2 px-8 font-normal leading-relaxed border-transparent rounded-full ml-0 mt-1 size-14 tracking-125 hover:border-transparent uppercase" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Get Started</a>
|
64686
|
+
`
|
64687
|
+
}, {
|
64688
|
+
html: `
|
64689
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 mt-1 uppercase py-2 size-14 px-8 border-current hover:border-current font-normal leading-relaxed tracking-125 rounded-full" style="color: rgb(255, 255, 255);">Get Started</a>
|
64690
|
+
`
|
64691
|
+
},
|
64692
|
+
/* colors */
|
64693
|
+
{
|
64694
|
+
html: `
|
64695
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 py-2 px-8 font-normal leading-relaxed border-transparent rounded-full ml-0 mt-1 size-14 tracking-125 hover:border-transparent uppercase" style="color: rgb(255, 255, 255); background-color: rgb(0, 200, 218);">Get Started</a>
|
64696
|
+
`
|
64697
|
+
}, {
|
64698
|
+
html: `
|
64699
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 py-2 px-8 font-normal leading-relaxed border-transparent rounded-full ml-0 mt-1 size-14 tracking-125 hover:border-transparent uppercase" style="color: rgb(255, 255, 255); background-color: rgb(55, 148, 59);">Get Started</a>
|
64700
|
+
`
|
64701
|
+
}, {
|
64702
|
+
html: `
|
64703
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 py-2 px-8 font-normal leading-relaxed border-transparent rounded-full ml-0 mt-1 size-14 tracking-125 hover:border-transparent uppercase" style="color: rgb(255, 255, 255); background-color: rgb(233,2,0);">Get Started</a>
|
64704
|
+
`
|
64705
|
+
}, {
|
64706
|
+
html: `
|
64707
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 py-2 px-8 font-normal leading-relaxed border-transparent rounded-full ml-0 mt-1 size-14 tracking-125 hover:border-transparent uppercase" style="color: rgb(0, 0, 0); background-color: rgb(254, 222, 76);">Get Started</a>
|
64708
|
+
`
|
64709
|
+
},
|
64710
|
+
/* square */
|
64711
|
+
{
|
64712
|
+
html: `
|
64713
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 mt-1 uppercase py-2 size-14 px-8 border-current hover:border-current font-normal leading-relaxed rounded tracking-125">Read More</a>
|
64714
|
+
`
|
64715
|
+
}, {
|
64716
|
+
html: `
|
64717
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 mt-1 uppercase py-2 size-14 px-8 text-black leading-relaxed rounded border-transparent hover:border-transparent font-normal tracking-125" style="background-color: rgb(240, 240, 240);">Get Started</a>
|
64718
|
+
`
|
64719
|
+
}, {
|
64720
|
+
html: `
|
64721
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 py-2 px-8 font-normal leading-relaxed border-transparent rounded ml-0 mt-1 size-14 tracking-125 hover:border-transparent uppercase" style="color: rgb(255, 255, 255); background-color: rgb(255, 127, 0);">Get Started</a>
|
64722
|
+
`
|
64723
|
+
}, {
|
64724
|
+
html: `
|
64725
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 py-2 px-8 font-normal leading-relaxed border-transparent rounded ml-0 mt-1 size-14 tracking-125 hover:border-transparent uppercase" style="color: rgb(255, 255, 255); background-color: rgb(83,98,208);">Get Started</a>
|
64726
|
+
`
|
64727
|
+
}, {
|
64728
|
+
html: `
|
64729
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 py-2 px-8 font-normal leading-relaxed border-transparent rounded ml-0 mt-1 size-14 tracking-125 hover:border-transparent uppercase" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Get Started</a>
|
64730
|
+
`
|
64731
|
+
}, {
|
64732
|
+
html: `
|
64733
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 mt-1 uppercase py-2 size-14 px-8 border-current hover:border-current font-normal leading-relaxed tracking-125 rounded" style="color: rgb(255, 255, 255);">Get Started</a>
|
64734
|
+
`
|
64735
|
+
},
|
64736
|
+
/* colors */
|
64737
|
+
{
|
64738
|
+
html: `
|
64739
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 py-2 px-8 font-normal leading-relaxed border-transparent rounded ml-0 mt-1 size-14 tracking-125 hover:border-transparent uppercase" style="color: rgb(255, 255, 255); background-color: rgb(0, 200, 218);">Get Started</a>
|
64740
|
+
`
|
64741
|
+
}, {
|
64742
|
+
html: `
|
64743
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 py-2 px-8 font-normal leading-relaxed border-transparent rounded ml-0 mt-1 size-14 tracking-125 hover:border-transparent uppercase" style="color: rgb(255, 255, 255); background-color: rgb(55, 148, 59);">Get Started</a>
|
64744
|
+
`
|
64745
|
+
}, {
|
64746
|
+
html: `
|
64747
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 py-2 px-8 font-normal leading-relaxed border-transparent rounded ml-0 mt-1 size-14 tracking-125 hover:border-transparent uppercase" style="color: rgb(255, 255, 255); background-color: rgb(233,2,0);">Get Started</a>
|
64748
|
+
`
|
64749
|
+
}, {
|
64750
|
+
html: `
|
64751
|
+
<a href="#" role="button" class="transition-all inline-block cursor-pointer no-underline border-2 border-solid mr-1 py-2 px-8 font-normal leading-relaxed border-transparent rounded ml-0 mt-1 size-14 tracking-125 hover:border-transparent uppercase" style="color: rgb(0, 0, 0); background-color: rgb(254, 222, 76);">Get Started</a>
|
64752
|
+
`
|
64753
|
+
}, {
|
64520
64754
|
text: 'Order Now',
|
64521
64755
|
className: 'transition-all inline-block cursor-pointer no-underline border-2 border-solid rounded-full border-current ml-1 mr-1 px-8 py-2 text-pink-600 hover:text-white bg-white hover:bg-pink-500 hover:border-transparent size-18 font-semibold tracking-75 leading-relaxed'
|
64522
64756
|
}, {
|
@@ -64568,7 +64802,11 @@ class ButtonEditor {
|
|
64568
64802
|
let html = '';
|
64569
64803
|
|
64570
64804
|
for (let i = 0; i < templates.length; i++) {
|
64571
|
-
|
64805
|
+
if (templates[i].html) {
|
64806
|
+
html += templates[i].html;
|
64807
|
+
} else {
|
64808
|
+
html += `<a class="${templates[i].className}" href="#" role="button" tabindex="0">${templates[i].text}</a>`;
|
64809
|
+
}
|
64572
64810
|
}
|
64573
64811
|
|
64574
64812
|
document.querySelector('#divButtonTemplateList').innerHTML = html;
|
@@ -64576,10 +64814,30 @@ class ButtonEditor {
|
|
64576
64814
|
Array.prototype.forEach.call(btns, btn => {
|
64577
64815
|
btn.addEventListener('click', e => {
|
64578
64816
|
this.builder.uo.saveForUndo();
|
64579
|
-
const activeButton = this.builder.activeButton || this.builder.activeLinkButton;
|
64580
|
-
this.
|
64581
|
-
|
64582
|
-
|
64817
|
+
const activeButton = this.builder.activeButton || this.builder.activeLinkButton; // this.applyStyles(activeButton, btn);
|
64818
|
+
// this.cleanupOldClasses(activeButton);
|
64819
|
+
|
64820
|
+
activeButton.removeAttribute('style');
|
64821
|
+
activeButton.removeAttribute('onmouseover');
|
64822
|
+
activeButton.removeAttribute('onmouseout');
|
64823
|
+
activeButton.removeAttribute('data-bg');
|
64824
|
+
activeButton.removeAttribute('data-hover-bg');
|
64825
|
+
activeButton.setAttribute('class', btn.getAttribute('class'));
|
64826
|
+
if (btn.hasAttribute('style')) activeButton.setAttribute('style', btn.getAttribute('style'));
|
64827
|
+
if (btn.hasAttribute('onmouseover')) activeButton.setAttribute('onmouseover', btn.getAttribute('onmouseover'));
|
64828
|
+
if (btn.hasAttribute('onmouseout')) activeButton.setAttribute('onmouseout', btn.getAttribute('onmouseout'));
|
64829
|
+
|
64830
|
+
if (btn.hasAttribute('data-bg')) {
|
64831
|
+
activeButton.setAttribute('data-bg', btn.getAttribute('data-bg'));
|
64832
|
+
activeButton.style.backgroundColor = btn.getAttribute('data-bg');
|
64833
|
+
}
|
64834
|
+
|
64835
|
+
if (btn.hasAttribute('data-hover-bg')) {
|
64836
|
+
activeButton.setAttribute('data-hover-bg', btn.getAttribute('data-hover-bg'));
|
64837
|
+
}
|
64838
|
+
|
64839
|
+
activeButton.classList.remove('active');
|
64840
|
+
this.realtime();
|
64583
64841
|
e.preventDefault();
|
64584
64842
|
return false;
|
64585
64843
|
});
|
@@ -64593,14 +64851,26 @@ class ButtonEditor {
|
|
64593
64851
|
let html_mybuttons = '';
|
64594
64852
|
|
64595
64853
|
for (let i = 0; i < mybuttons.length; i++) {
|
64596
|
-
|
64854
|
+
let sDataBg = '';
|
64855
|
+
if (mybuttons[i].bg !== '') sDataBg = ` data-bg="${mybuttons[i].bg}"`;
|
64856
|
+
let sDataHoverBg = '';
|
64857
|
+
if (mybuttons[i].hoverBg !== '') sDataHoverBg = ` data-hover-bg="${mybuttons[i].hoverBg}"`;
|
64858
|
+
|
64859
|
+
if (sDataHoverBg !== '' && sDataBg === '') {
|
64860
|
+
sDataBg = ' data-bg=""';
|
64861
|
+
}
|
64862
|
+
|
64863
|
+
html_mybuttons += `<a data-id="${mybuttons[i].id}"${sDataBg}${sDataHoverBg} class="${mybuttons[i].className}" href="#" style="${mybuttons[i].cssText}">Button<span class="is-button-remove"><svg class="is-icon-flex" style="fill:rgba(255, 255, 266, 1);width:20px;height:20px;"><use xlink:href="#ion-ios-close-empty"></use></svg></span></a>`;
|
64597
64864
|
}
|
64598
64865
|
|
64599
64866
|
document.querySelector('#divMyButtonList').innerHTML = html_mybuttons;
|
64600
64867
|
let btns = this.buttonModal.querySelectorAll('#divMyButtonList a');
|
64601
64868
|
Array.prototype.forEach.call(btns, btn => {
|
64602
|
-
|
64603
|
-
|
64869
|
+
if (btn.getAttribute('data-hover-bg')) {
|
64870
|
+
btn.setAttribute('onmouseover', 'if(this.getAttribute(\'data-hover-bg\'))this.style.backgroundColor=this.getAttribute(\'data-hover-bg\');');
|
64871
|
+
btn.setAttribute('onmouseout', 'if(this.getAttribute(\'data-bg\'))this.style.backgroundColor=this.getAttribute(\'data-bg\');else this.style.backgroundColor=\'\'');
|
64872
|
+
}
|
64873
|
+
|
64604
64874
|
btn.addEventListener('click', e => {
|
64605
64875
|
this.builder.uo.saveForUndo();
|
64606
64876
|
const activeButton = this.builder.activeButton || this.builder.activeLinkButton;
|
@@ -64608,10 +64878,31 @@ class ButtonEditor {
|
|
64608
64878
|
Array.prototype.forEach.call(links, link => {
|
64609
64879
|
dom.removeClass(link, 'active');
|
64610
64880
|
});
|
64611
|
-
dom.addClass(btn, 'active');
|
64612
|
-
this.
|
64613
|
-
|
64881
|
+
dom.addClass(btn, 'active'); // this.applyStyles(activeButton, btn);
|
64882
|
+
// this.cleanupOldClasses(activeButton);
|
64883
|
+
|
64884
|
+
activeButton.removeAttribute('style');
|
64885
|
+
activeButton.removeAttribute('onmouseover');
|
64886
|
+
activeButton.removeAttribute('onmouseout');
|
64887
|
+
activeButton.removeAttribute('data-bg');
|
64888
|
+
activeButton.removeAttribute('data-hover-bg');
|
64889
|
+
activeButton.setAttribute('class', btn.getAttribute('class'));
|
64890
|
+
if (btn.hasAttribute('style')) activeButton.setAttribute('style', btn.getAttribute('style'));
|
64891
|
+
if (btn.hasAttribute('onmouseover')) activeButton.setAttribute('onmouseover', btn.getAttribute('onmouseover'));
|
64892
|
+
if (btn.hasAttribute('onmouseout')) activeButton.setAttribute('onmouseout', btn.getAttribute('onmouseout'));
|
64893
|
+
|
64894
|
+
if (btn.hasAttribute('data-bg')) {
|
64895
|
+
activeButton.setAttribute('data-bg', btn.getAttribute('data-bg'));
|
64896
|
+
activeButton.style.backgroundColor = btn.getAttribute('data-bg');
|
64897
|
+
}
|
64898
|
+
|
64899
|
+
if (btn.hasAttribute('data-hover-bg')) {
|
64900
|
+
activeButton.setAttribute('data-hover-bg', btn.getAttribute('data-hover-bg'));
|
64901
|
+
}
|
64902
|
+
|
64903
|
+
activeButton.classList.remove('active');
|
64614
64904
|
this.builder.opts.onChange();
|
64905
|
+
this.realtime();
|
64615
64906
|
e.preventDefault();
|
64616
64907
|
return false;
|
64617
64908
|
});
|
@@ -64672,23 +64963,15 @@ class ButtonEditor {
|
|
64672
64963
|
}
|
64673
64964
|
|
64674
64965
|
applyDefault(link) {
|
64675
|
-
const dom = this.dom;
|
64676
|
-
dom.addClass(link, 'transition-all');
|
64677
|
-
if
|
64678
|
-
dom.addClass(link, 'cursor-pointer');
|
64679
|
-
|
64680
|
-
dom.addClass(link, '
|
64681
|
-
dom.addClass(link, 'leading-relaxed'); // dom.addClass(link, 'mt-2');
|
64682
|
-
// dom.addClass(link, 'mb-2');
|
64683
|
-
// link.removeAttribute('style');
|
64684
|
-
// link.removeAttribute('onmouseover');
|
64685
|
-
// link.removeAttribute('onmouseout');
|
64686
|
-
|
64966
|
+
// const dom = this.dom;
|
64967
|
+
// dom.addClass(link, 'transition-all');
|
64968
|
+
// if(!dom.hasClass(link,'flex')) dom.addClass(link, 'inline-block');
|
64969
|
+
// dom.addClass(link, 'cursor-pointer');
|
64970
|
+
// dom.addClass(link, 'border-solid');
|
64971
|
+
// dom.addClass(link, 'leading-relaxed');
|
64687
64972
|
link.removeAttribute('data-hover-bgcolor');
|
64688
64973
|
link.removeAttribute('data-hover-color');
|
64689
64974
|
link.removeAttribute('data-hover-bordercolor');
|
64690
|
-
link.setAttribute('onmouseover', 'if(this.getAttribute(\'data-hover-bg\'))this.style.backgroundColor=this.getAttribute(\'data-hover-bg\');');
|
64691
|
-
link.setAttribute('onmouseout', 'if(this.getAttribute(\'data-bg\'))this.style.backgroundColor=this.getAttribute(\'data-bg\');else this.style.backgroundColor=\'\'');
|
64692
64975
|
}
|
64693
64976
|
|
64694
64977
|
cleanupOldClasses(link) {
|
@@ -93765,7 +94048,7 @@ class ContentBox {
|
|
93765
94048
|
useCssClasses: true,
|
93766
94049
|
useButtonPlugin: false,
|
93767
94050
|
enableDragResize: true,
|
93768
|
-
simpleTextSettings:
|
94051
|
+
simpleTextSettings: false,
|
93769
94052
|
|
93770
94053
|
/* Old Version (backward compatible) */
|
93771
94054
|
onAddSectionOpen: function () {},
|
@@ -94986,6 +95269,38 @@ class ContentBox {
|
|
94986
95269
|
*/
|
94987
95270
|
|
94988
95271
|
|
95272
|
+
hideTools() {
|
95273
|
+
// hide tools
|
95274
|
+
let tools = this.doc.querySelectorAll('.is-tool');
|
95275
|
+
Array.prototype.forEach.call(tools, tool => {
|
95276
|
+
tool.style.display = '';
|
95277
|
+
});
|
95278
|
+
let tool = this.doc.querySelector('.is-column-tool');
|
95279
|
+
tool.style.display = 'none';
|
95280
|
+
tools = this.doc.querySelectorAll('.is-row-tool');
|
95281
|
+
tools.forEach(tool => {
|
95282
|
+
tool.style.display = 'none';
|
95283
|
+
});
|
95284
|
+
tools = this.doc.querySelectorAll('.is-rowadd-tool');
|
95285
|
+
tools.forEach(tool => {
|
95286
|
+
tool.style.opacity = 0;
|
95287
|
+
});
|
95288
|
+
}
|
95289
|
+
|
95290
|
+
showTools() {
|
95291
|
+
this.editor.util.repositionColumnTool();
|
95292
|
+
let tool = this.doc.querySelector('.is-column-tool');
|
95293
|
+
tool.style.display = '';
|
95294
|
+
let tools = this.doc.querySelectorAll('.is-row-tool');
|
95295
|
+
tools.forEach(tool => {
|
95296
|
+
tool.style.display = '';
|
95297
|
+
});
|
95298
|
+
tools = this.doc.querySelectorAll('.is-rowadd-tool');
|
95299
|
+
tools.forEach(tool => {
|
95300
|
+
tool.style.opacity = '';
|
95301
|
+
});
|
95302
|
+
}
|
95303
|
+
|
94989
95304
|
positionTool(box) {
|
94990
95305
|
if (!box) return; // Zoom
|
94991
95306
|
|