@innovastudio/contentbuilder 1.5.82 → 1.5.83
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.
package/package.json
CHANGED
|
@@ -1108,6 +1108,30 @@ button:focus-visible {
|
|
|
1108
1108
|
.is-ui .is-rte-pop.rte-paragraph-options > ul > li > *:not(p) {
|
|
1109
1109
|
transform: scale(0.8);
|
|
1110
1110
|
}
|
|
1111
|
+
#_cbhtml .is-rte-pop.rte-paragraph-options > ul > li h1,
|
|
1112
|
+
.is-ui .is-rte-pop.rte-paragraph-options > ul > li h1 {
|
|
1113
|
+
font-size: 2.5rem !important;
|
|
1114
|
+
}
|
|
1115
|
+
#_cbhtml .is-rte-pop.rte-paragraph-options > ul > li h2,
|
|
1116
|
+
.is-ui .is-rte-pop.rte-paragraph-options > ul > li h2 {
|
|
1117
|
+
font-size: 2rem !important;
|
|
1118
|
+
}
|
|
1119
|
+
#_cbhtml .is-rte-pop.rte-paragraph-options > ul > li h3,
|
|
1120
|
+
.is-ui .is-rte-pop.rte-paragraph-options > ul > li h3 {
|
|
1121
|
+
font-size: 1.73rem !important;
|
|
1122
|
+
}
|
|
1123
|
+
#_cbhtml .is-rte-pop.rte-paragraph-options > ul > li h4,
|
|
1124
|
+
.is-ui .is-rte-pop.rte-paragraph-options > ul > li h4 {
|
|
1125
|
+
font-size: 1.5rem !important;
|
|
1126
|
+
}
|
|
1127
|
+
#_cbhtml .is-rte-pop.rte-paragraph-options > ul > li h5,
|
|
1128
|
+
.is-ui .is-rte-pop.rte-paragraph-options > ul > li h5 {
|
|
1129
|
+
font-size: 1.25rem !important;
|
|
1130
|
+
}
|
|
1131
|
+
#_cbhtml .is-rte-pop.rte-paragraph-options > ul > li h6,
|
|
1132
|
+
.is-ui .is-rte-pop.rte-paragraph-options > ul > li h6 {
|
|
1133
|
+
font-size: 1rem !important;
|
|
1134
|
+
}
|
|
1111
1135
|
#_cbhtml .is-rte-pop.rte-textsetting-options > div,
|
|
1112
1136
|
.is-ui .is-rte-pop.rte-textsetting-options > div {
|
|
1113
1137
|
width: 233px;
|
|
@@ -5762,7 +5786,7 @@ button:focus-visible {
|
|
|
5762
5786
|
background: transparent;
|
|
5763
5787
|
}
|
|
5764
5788
|
.is-builder[clean] .is-tool.is-row-tool .row-grideditor svg {
|
|
5765
|
-
fill: #000;
|
|
5789
|
+
fill: #000 !important;
|
|
5766
5790
|
width: 13px;
|
|
5767
5791
|
height: 13px;
|
|
5768
5792
|
margin-left: -1px;
|
|
@@ -1208,6 +1208,44 @@ const renderQuickAdd = builder => {
|
|
|
1208
1208
|
const util = builder.util;
|
|
1209
1209
|
const builderStuff = builder.builderStuff;
|
|
1210
1210
|
const dom = builder.dom;
|
|
1211
|
+
let quickAddButtons = ['paragraph', 'headline', 'image', 'list', 'heading1', 'heading2', 'heading3', 'heading4', 'quote', 'preformatted', 'button', 'twobutton', 'map', 'youtube', 'video', 'icon', 'svg', 'table', 'social', 'code', 'spacer']; // default
|
|
1212
|
+
|
|
1213
|
+
if (builder.quickAddButtons) {
|
|
1214
|
+
quickAddButtons = builder.quickAddButtons;
|
|
1215
|
+
}
|
|
1216
|
+
const buttonTemplates = {
|
|
1217
|
+
paragraph: `<button title="${util.out('Paragraph')}" class="add-paragraph"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#icon-align-full"></use></svg></span>${util.out('Paragraph')}</button>`,
|
|
1218
|
+
headline: `<button title="${util.out('Headline')}" class="add-headline"><span style="font-family:serif;display:block;margin:0 0 8px;font-size:11px;">H</span>${util.out('Headline')}</button>`,
|
|
1219
|
+
image: `<button title="${util.out('Image')}" class="add-image"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex ion-image" style="width:14px;height:14px;"><use xlink:href="#ion-image"></use></svg></span>${util.out('Image')}</button>`,
|
|
1220
|
+
list: `<button title="${util.out('List')}" class="add-list"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-list-bullet"></use></svg></span>${util.out('List')}</button>`,
|
|
1221
|
+
heading1: `<button title="${util.out('Heading 1')}" class="add-heading1"><span style="font-family:serif;display:block;margin:0 0 8px;">H1</span>${util.out('Heading 1')}</button>`,
|
|
1222
|
+
heading2: `<button title="${util.out('Heading 2')}" class="add-heading2"><span style="font-family:serif;display:block;margin:0 0 8px;">H2</span>${util.out('Heading 2')}</button>`,
|
|
1223
|
+
heading3: `<button title="${util.out('Heading 3')}" class="add-heading3"><span style="font-family:serif;display:block;margin:0 0 8px;">H3</span>${util.out('Heading 3')}</button>`,
|
|
1224
|
+
heading4: `<button title="${util.out('Heading 4')}" class="add-heading4"><span style="font-family:serif;display:block;margin:0 0 8px;">H4</span>${util.out('Heading 4')}</button>`,
|
|
1225
|
+
quote: `<button title="${util.out('Quote')}" class="add-quote"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-quote"></use></svg></span>${util.out('Quote')}</button>`,
|
|
1226
|
+
preformatted: `<button style="display:none" title="${util.out('Preformatted')}" class="add-preformatted"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-code"></use></svg></span>${util.out('Preformatted')}</button>`,
|
|
1227
|
+
button: `<button title="${util.out('Button')}" class="add-button"><span style="display:block;margin:0 0 8px;"><span style="display:inline-block;border:#a1a1a1 1px solid;background:#f3f3f3;width:10px;height:4px;"></span></span>${util.out('Button')}</button>`,
|
|
1228
|
+
twobutton: `<button title="${util.out('Two Button')}" class="add-twobutton"><span style="display:block;margin:0 0 8px;"><span style="display:inline-block;border:#a1a1a1 1px solid;background:#f3f3f3;width:10px;height:4px;"></span></span>${util.out('Two Button')}</button>`,
|
|
1229
|
+
map: `<button title="${util.out('Map')}" class="add-map"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-location"></use></svg></use></svg></svg></span>${util.out('Map')}</button>`,
|
|
1230
|
+
youtube: `<button title="${util.out('Youtube')}" class="add-youtube"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-social-youtube-outline"></use></svg></use></svg></svg></span>${util.out('Youtube')}</button>`,
|
|
1231
|
+
video: `<button title="${util.out('Video')}" class="add-video"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-ios-play"></use></svg></use></svg></svg></span>${util.out('Video')}</button>`,
|
|
1232
|
+
audio: `<button title="${util.out('Audio')}" class="add-audio"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-volume-medium"></use></svg></use></svg></svg></span>${util.out('Audio')}</button>`,
|
|
1233
|
+
icon: `<button title="${util.out('Icon')}" class="add-icon"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-android-happy"></use></svg></use></svg></svg></span>${util.out('Icon')}</button>`,
|
|
1234
|
+
svg: `<button title="${util.out('SVG')}" class="add-svg"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-5px"><use xlink:href="#icon-svg"></use></svg></use></svg></svg></span>${util.out('SVG')}</button>`,
|
|
1235
|
+
table: `<button title="${util.out('Table')}" class="add-table"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-table"></use></svg></use></svg></svg></span>${util.out('Table')}</button>`,
|
|
1236
|
+
social: `<button title="${util.out('Social Links')}" class="add-social"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-social-twitter"></use></svg></use></svg></svg></span>${util.out('Social Links')}</button>`,
|
|
1237
|
+
code: `<button title="${util.out('HTML/JS')}" class="add-code"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-code"></use></svg></use></svg></svg></span>${util.out('HTML/JS')}</button>`,
|
|
1238
|
+
spacer: `<button title="${util.out('Spacer')}" class="add-spacer"><span style="display:block;margin:0 0 8px;"><span style="display:inline-block;background:#eee;width:30px;height:5px;"></span></span>${util.out('Spacer')}</button>`,
|
|
1239
|
+
line: `<button title="${util.out('Line')}" class="add-line"><span style="display:block;margin:0 0 8px;"><span style="display:inline-block;background:#ddd;width:30px;height:2px;"></span></span>${util.out('Line')}</button>`
|
|
1240
|
+
};
|
|
1241
|
+
|
|
1242
|
+
// Filter buttons (backward compatibility)
|
|
1243
|
+
const filteredButtons = quickAddButtons.filter(item => {
|
|
1244
|
+
if (builder.opts.emailMode && item === 'button') return false;
|
|
1245
|
+
if (builder.opts.emailMode && item === 'twobutton') return false;
|
|
1246
|
+
return true;
|
|
1247
|
+
});
|
|
1248
|
+
let buttonsHtml = filteredButtons.map(item => buttonTemplates[item] || '').join('');
|
|
1211
1249
|
let quickadd = builderStuff.querySelector('.quickadd');
|
|
1212
1250
|
if (!quickadd) {
|
|
1213
1251
|
const html = `<div class="is-pop quickadd arrow-right" style="z-index:10003;" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
|
|
@@ -1217,34 +1255,11 @@ const renderQuickAdd = builder => {
|
|
|
1217
1255
|
<div class="is-pop-tab-item active" data-value="right">${util.out('Add to Right')}</div>
|
|
1218
1256
|
</div>
|
|
1219
1257
|
<div style="padding:12px;display:flex;flex-direction:row;flex-flow: wrap;justify-content: center;align-items: center;">
|
|
1220
|
-
|
|
1221
|
-
<
|
|
1222
|
-
<button title="${util.out('
|
|
1223
|
-
<button title="${util.out('List')}" class="add-list"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-list-bullet"></use></svg></span>${util.out('List')}</button>
|
|
1224
|
-
<button title="${util.out('Heading 1')}" class="add-heading1"><span style="font-family:serif;display:block;margin:0 0 8px;">H1</span>${util.out('Heading 1')}</button>
|
|
1225
|
-
<button title="${util.out('Heading 2')}" class="add-heading2"><span style="font-family:serif;display:block;margin:0 0 8px;">H2</span>${util.out('Heading 2')}</button>
|
|
1226
|
-
<button title="${util.out('Heading 3')}" class="add-heading3"><span style="font-family:serif;display:block;margin:0 0 8px;">H3</span>${util.out('Heading 3')}</button>
|
|
1227
|
-
<button title="${util.out('Heading 4')}" class="add-heading4"><span style="font-family:serif;display:block;margin:0 0 8px;">H4</span>${util.out('Heading 4')}</button>
|
|
1228
|
-
<button title="${util.out('Quote')}" class="add-quote"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-quote"></use></svg></span>${util.out('Quote')}</button>
|
|
1229
|
-
<button style="display:none" title="${util.out('Preformatted')}" class="add-preformatted"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-code"></use></svg></span>${util.out('Preformatted')}</button>
|
|
1230
|
-
${builder.opts.emailMode ? '' : `<button title="${util.out('Button')}" class="add-button"><span style="display:block;margin:0 0 8px;"><span style="display:inline-block;border:#a1a1a1 1px solid;background:#f3f3f3;width:10px;height:4px;"></span></span>${util.out('Button')}</button>`}
|
|
1231
|
-
${builder.opts.emailMode ? '' : `<button title="${util.out('Two Button')}" class="add-twobutton"><span style="display:block;margin:0 0 8px;"><span style="display:inline-block;border:#a1a1a1 1px solid;background:#f3f3f3;width:10px;height:4px;"></span></span>${util.out('Two Button')}</button>`}
|
|
1232
|
-
<button title="${util.out('Map')}" class="add-map"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-location"></use></svg></use></svg></svg></span>${util.out('Map')}</button>
|
|
1233
|
-
<button title="${util.out('Youtube')}" class="add-youtube"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-social-youtube-outline"></use></svg></use></svg></svg></span>${util.out('Youtube')}</button>
|
|
1234
|
-
<button title="${util.out('Video')}" class="add-video"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-ios-play"></use></svg></use></svg></svg></span>${util.out('Video')}</button>
|
|
1235
|
-
<button style="display:none" title="${util.out('Audio')}" class="add-audio"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-volume-medium"></use></svg></use></svg></svg></span>${util.out('Audio')}</button>
|
|
1236
|
-
<button title="${util.out('Icon')}" class="add-icon"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-android-happy"></use></svg></use></svg></svg></span>${util.out('Icon')}</button>
|
|
1237
|
-
<button title="${util.out('SVG')}" class="add-svg"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-5px"><use xlink:href="#icon-svg"></use></svg></use></svg></svg></span>${util.out('SVG')}</button>
|
|
1238
|
-
<button title="${util.out('Table')}" class="add-table"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-table"></use></svg></use></svg></svg></span>${util.out('Table')}</button>
|
|
1239
|
-
<button title="${util.out('Social Links')}" class="add-social"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-social-twitter"></use></svg></use></svg></svg></span>${util.out('Social Links')}</button>
|
|
1240
|
-
<button title="${util.out('HTML/JS')}" class="add-code"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-code"></use></svg></use></svg></svg></span>${util.out('HTML/JS')}</button>
|
|
1241
|
-
<button title="${util.out('Spacer')}" class="add-spacer"><span style="display:block;margin:0 0 8px;"><span style="display:inline-block;background:#eee;width:30px;height:5px;"></span></span>${util.out('Spacer')}</button>
|
|
1242
|
-
<button style="display:none" title="${util.out('Line')}" class="add-line"><span style="display:block;margin:0 0 8px;"><span style="display:inline-block;background:#ddd;width:30px;height:2px;"></span></span>${util.out('Line')}</button>
|
|
1243
|
-
<div class="pop-separator"></div>
|
|
1244
|
-
<button title="${util.out('More...')}" class="add-more" style="flex-direction:initial;">${util.out('More...')}</button>
|
|
1258
|
+
${buttonsHtml}
|
|
1259
|
+
<div class="pop-separator" ${builder.noSnippets ? ' style="display:none"' : ''}></div>
|
|
1260
|
+
<button title="${util.out('More...')}" class="add-more" style="flex-direction:initial;${builder.noSnippets ? 'display:none' : ''}">${util.out('More...')}</button>
|
|
1245
1261
|
</div>
|
|
1246
|
-
</div
|
|
1247
|
-
`;
|
|
1262
|
+
</div>`;
|
|
1248
1263
|
dom.appendHtml(builderStuff, html);
|
|
1249
1264
|
quickadd = builderStuff.querySelector('.quickadd');
|
|
1250
1265
|
let tabs = quickadd.querySelectorAll('.is-pop-tab-item');
|
|
@@ -1344,7 +1359,7 @@ const renderQuickAdd = builder => {
|
|
|
1344
1359
|
util.addContent(html, mode);
|
|
1345
1360
|
});
|
|
1346
1361
|
elm = quickadd.querySelector('.add-button');
|
|
1347
|
-
|
|
1362
|
+
dom.addEventListener(elm, 'click', () => {
|
|
1348
1363
|
const mode = quickadd.getAttribute('data-mode');
|
|
1349
1364
|
let html = `<div>
|
|
1350
1365
|
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-17 px-6 text-black leading-14 rounded border-transparent hover:border-transparent font-normal tracking-wide" style="background-color: rgb(240, 240, 240);">Read More</a>
|
|
@@ -1355,7 +1370,7 @@ const renderQuickAdd = builder => {
|
|
|
1355
1370
|
util.addContent(html, mode);
|
|
1356
1371
|
});
|
|
1357
1372
|
elm = quickadd.querySelector('.add-twobutton');
|
|
1358
|
-
|
|
1373
|
+
dom.addEventListener(elm, 'click', () => {
|
|
1359
1374
|
const mode = quickadd.getAttribute('data-mode');
|
|
1360
1375
|
let html = `<div>
|
|
1361
1376
|
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-17 px-6 text-black leading-14 rounded border-transparent hover:border-transparent font-normal tracking-wide" style="background-color: rgb(240, 240, 240);">Read More</a>
|
|
@@ -51619,20 +51634,20 @@ class RowTool {
|
|
|
51619
51634
|
const separator = columnMore.querySelector('.is-separator');
|
|
51620
51635
|
let nogrid = cell.closest('[nogrid]'); //dom.parentsHasAttribute(col, 'nogrid');
|
|
51621
51636
|
if (nogrid) {
|
|
51622
|
-
btnPrev.style.display = 'none';
|
|
51623
|
-
btnNext.style.display = 'none';
|
|
51624
|
-
btnUp.style.display = 'none';
|
|
51625
|
-
btnDown.style.display = 'none';
|
|
51637
|
+
if (btnPrev) btnPrev.style.display = 'none';
|
|
51638
|
+
if (btnNext) btnNext.style.display = 'none';
|
|
51639
|
+
if (btnUp) btnUp.style.display = 'none';
|
|
51640
|
+
if (btnDown) btnDown.style.display = 'none';
|
|
51626
51641
|
if (btnIncrease) btnIncrease.style.display = 'none';
|
|
51627
51642
|
if (btnDecrease) btnDecrease.style.display = 'none';
|
|
51628
|
-
btnDuplicate.style.display = 'none';
|
|
51629
|
-
btnPrev.setAttribute('disabled', 'disabled');
|
|
51630
|
-
btnNext.setAttribute('disabled', 'disabled');
|
|
51631
|
-
btnUp.setAttribute('disabled', 'disabled');
|
|
51632
|
-
btnDown.setAttribute('disabled', 'disabled');
|
|
51633
|
-
btnIncrease.setAttribute('disabled', 'disabled');
|
|
51634
|
-
btnDecrease.setAttribute('disabled', 'disabled');
|
|
51635
|
-
btnDuplicate.setAttribute('disabled', 'disabled');
|
|
51643
|
+
if (btnDuplicate) btnDuplicate.style.display = 'none';
|
|
51644
|
+
if (btnPrev) btnPrev.setAttribute('disabled', 'disabled');
|
|
51645
|
+
if (btnNext) btnNext.setAttribute('disabled', 'disabled');
|
|
51646
|
+
if (btnUp) btnUp.setAttribute('disabled', 'disabled');
|
|
51647
|
+
if (btnDown) btnDown.setAttribute('disabled', 'disabled');
|
|
51648
|
+
if (btnIncrease) btnIncrease.setAttribute('disabled', 'disabled');
|
|
51649
|
+
if (btnDecrease) btnDecrease.setAttribute('disabled', 'disabled');
|
|
51650
|
+
if (btnDuplicate) btnDuplicate.setAttribute('disabled', 'disabled');
|
|
51636
51651
|
let btnColHtml = columnMore.querySelector('.cell-html');
|
|
51637
51652
|
if (btnColHtml) btnColHtml.style.display = '';
|
|
51638
51653
|
if (cell.getAttribute('data-html')) {
|
|
@@ -51642,20 +51657,20 @@ class RowTool {
|
|
|
51642
51657
|
this.columnTool.querySelector('.cell-more').setAttribute('disabled', 'disabled');
|
|
51643
51658
|
}
|
|
51644
51659
|
} else {
|
|
51645
|
-
btnPrev.style.display = '';
|
|
51646
|
-
btnNext.style.display = '';
|
|
51647
|
-
btnUp.style.display = '';
|
|
51648
|
-
btnDown.style.display = '';
|
|
51660
|
+
if (btnPrev) btnPrev.style.display = '';
|
|
51661
|
+
if (btnNext) btnNext.style.display = '';
|
|
51662
|
+
if (btnUp) btnUp.style.display = '';
|
|
51663
|
+
if (btnDown) btnDown.style.display = '';
|
|
51649
51664
|
if (btnIncrease) btnIncrease.style.display = '';
|
|
51650
51665
|
if (btnDecrease) btnDecrease.style.display = '';
|
|
51651
|
-
btnDuplicate.style.display = '';
|
|
51652
|
-
btnPrev.removeAttribute('disabled');
|
|
51653
|
-
btnNext.removeAttribute('disabled');
|
|
51654
|
-
btnUp.removeAttribute('disabled');
|
|
51655
|
-
btnDown.removeAttribute('disabled');
|
|
51666
|
+
if (btnDuplicate) btnDuplicate.style.display = '';
|
|
51667
|
+
if (btnPrev) btnPrev.removeAttribute('disabled');
|
|
51668
|
+
if (btnNext) btnNext.removeAttribute('disabled');
|
|
51669
|
+
if (btnUp) btnUp.removeAttribute('disabled');
|
|
51670
|
+
if (btnDown) btnDown.removeAttribute('disabled');
|
|
51656
51671
|
if (btnIncrease) btnIncrease.removeAttribute('disabled');
|
|
51657
51672
|
if (btnDecrease) btnDecrease.removeAttribute('disabled');
|
|
51658
|
-
btnDuplicate.removeAttribute('disabled');
|
|
51673
|
+
if (btnDuplicate) btnDuplicate.removeAttribute('disabled');
|
|
51659
51674
|
let btnColHtml = columnMore.querySelector('.cell-html');
|
|
51660
51675
|
if (btnColHtml) {
|
|
51661
51676
|
btnColHtml.style.display = '';
|
|
@@ -51669,21 +51684,21 @@ class RowTool {
|
|
|
51669
51684
|
|
|
51670
51685
|
if (row.childElementCount - num === 1) {
|
|
51671
51686
|
//-num => minus is-row-tool, is-col-tool, is-rowadd-tool & is-row-overlay
|
|
51672
|
-
btnPrev.style.display = 'none';
|
|
51673
|
-
btnNext.style.display = 'none';
|
|
51687
|
+
if (btnPrev) btnPrev.style.display = 'none';
|
|
51688
|
+
if (btnNext) btnNext.style.display = 'none';
|
|
51674
51689
|
if (btnIncrease) btnIncrease.style.display = 'none';
|
|
51675
51690
|
if (btnDecrease) btnDecrease.style.display = 'none';
|
|
51676
|
-
btnPrev.setAttribute('disabled', 'disabled');
|
|
51677
|
-
btnNext.setAttribute('disabled', 'disabled');
|
|
51691
|
+
if (btnPrev) btnPrev.setAttribute('disabled', 'disabled');
|
|
51692
|
+
if (btnNext) btnNext.setAttribute('disabled', 'disabled');
|
|
51678
51693
|
if (btnIncrease) btnIncrease.setAttribute('disabled', 'disabled');
|
|
51679
51694
|
if (btnDecrease) btnDecrease.setAttribute('disabled', 'disabled');
|
|
51680
51695
|
} else {
|
|
51681
|
-
btnPrev.style.display = '';
|
|
51682
|
-
btnNext.style.display = '';
|
|
51696
|
+
if (btnPrev) btnPrev.style.display = '';
|
|
51697
|
+
if (btnNext) btnNext.style.display = '';
|
|
51683
51698
|
if (btnIncrease) btnIncrease.style.display = '';
|
|
51684
51699
|
if (btnDecrease) btnDecrease.style.display = '';
|
|
51685
|
-
btnPrev.removeAttribute('disabled');
|
|
51686
|
-
btnNext.removeAttribute('disabled');
|
|
51700
|
+
if (btnPrev) btnPrev.removeAttribute('disabled');
|
|
51701
|
+
if (btnNext) btnNext.removeAttribute('disabled');
|
|
51687
51702
|
if (btnIncrease) btnIncrease.removeAttribute('disabled');
|
|
51688
51703
|
if (btnDecrease) btnDecrease.removeAttribute('disabled');
|
|
51689
51704
|
}
|
|
@@ -51711,18 +51726,18 @@ class RowTool {
|
|
|
51711
51726
|
}
|
|
51712
51727
|
}
|
|
51713
51728
|
if (cell.classList.contains('column-lock')) {
|
|
51714
|
-
btnPrev.style.display = 'none';
|
|
51715
|
-
btnNext.style.display = 'none';
|
|
51716
|
-
btnUp.style.display = 'none';
|
|
51717
|
-
btnDown.style.display = 'none';
|
|
51718
|
-
btnIncrease.style.display = 'none';
|
|
51719
|
-
btnDecrease.style.display = 'none';
|
|
51720
|
-
btnDuplicate.style.display = 'none';
|
|
51721
|
-
separator.style.display = 'none';
|
|
51722
|
-
btnLock.style.display = 'none';
|
|
51729
|
+
if (btnPrev) btnPrev.style.display = 'none';
|
|
51730
|
+
if (btnNext) btnNext.style.display = 'none';
|
|
51731
|
+
if (btnUp) btnUp.style.display = 'none';
|
|
51732
|
+
if (btnDown) btnDown.style.display = 'none';
|
|
51733
|
+
if (btnIncrease) btnIncrease.style.display = 'none';
|
|
51734
|
+
if (btnDecrease) btnDecrease.style.display = 'none';
|
|
51735
|
+
if (btnDuplicate) btnDuplicate.style.display = 'none';
|
|
51736
|
+
if (separator) separator.style.display = 'none';
|
|
51737
|
+
if (btnLock) btnLock.style.display = 'none';
|
|
51723
51738
|
} else {
|
|
51724
|
-
separator.style.display = '';
|
|
51725
|
-
btnLock.style.display = '';
|
|
51739
|
+
if (separator) separator.style.display = '';
|
|
51740
|
+
if (btnLock) btnLock.style.display = '';
|
|
51726
51741
|
}
|
|
51727
51742
|
});
|
|
51728
51743
|
const btnCellRemove = coltool.querySelector('.cell-remove');
|
|
@@ -51850,20 +51865,33 @@ class RowTool {
|
|
|
51850
51865
|
const util = this.builder.util;
|
|
51851
51866
|
const dom = this.builder.dom;
|
|
51852
51867
|
let rowMore = builderStuff.querySelector('.rowmore');
|
|
51853
|
-
let htmlbutton = '';
|
|
51854
|
-
if (builder.opts.rowHtmlEditor) htmlbutton = `<button type="button" title="${util.out('HTML')}" class="row-html">
|
|
51855
|
-
<span><svg class="is-icon-flex" style="margin-right:-3px;width:12px;height:12px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:12px;height:12px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></span>${util.out('HTML')}
|
|
51856
|
-
</button>`;
|
|
51857
51868
|
if (!rowMore) {
|
|
51869
|
+
let rowMoreButtons = ['moveup', 'movedown', 'duplicate', 'html', 'separator', 'lock', 'settings']; // default
|
|
51870
|
+
|
|
51871
|
+
if (builder.rowMoreButtons) {
|
|
51872
|
+
rowMoreButtons = builder.rowMoreButtons;
|
|
51873
|
+
}
|
|
51874
|
+
const buttonTemplates = {
|
|
51875
|
+
moveup: `<button style="flex: 1 1 calc(50% - 10px);" type="button" title="${util.out('Move Up')}" class="row-up"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-up"></use></svg></span>${util.out('Move Up')}</button>`,
|
|
51876
|
+
movedown: `<button style="flex: 1 1 calc(50% - 10px);" type="button" title="${util.out('Move Down')}" class="row-down"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-down"></use></svg></span>${util.out('Move Down')}</button>`,
|
|
51877
|
+
duplicate: `<button style="flex: 1 1 calc(50% - 10px);" type="button" title="${util.out('Duplicate')}" class="row-duplicate"><span><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-ios-photos-outline"></use></svg></span>${util.out('Duplicate')}</button>`,
|
|
51878
|
+
html: `<button style="flex: 1 1 calc(50% - 10px);" type="button" title="${util.out('HTML')}" class="row-html">
|
|
51879
|
+
<span><svg class="is-icon-flex" style="margin-right:-3px;width:12px;height:12px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:12px;height:12px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></span>${util.out('HTML')}
|
|
51880
|
+
</button>`,
|
|
51881
|
+
separator: '<div class="is-separator"></div>',
|
|
51882
|
+
lock: `<button style="flex: 1 1 calc(50% - 10px);" type="button" title="${util.out('Lock')}" class="row-locking"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-lock"></use></svg></span>${util.out('Lock')}</button>`,
|
|
51883
|
+
settings: `<button style="flex: 1 1 calc(50% - 10px);" type="button" title="${util.out('Settings')}" class="row-settings"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-cog"></use></svg></span>${util.out('Settings')}</button>`
|
|
51884
|
+
};
|
|
51885
|
+
|
|
51886
|
+
// Filter buttons
|
|
51887
|
+
const filteredButtons = rowMoreButtons.filter(item => {
|
|
51888
|
+
if (!builder.opts.rowHtmlEditor && item === 'html') return false;
|
|
51889
|
+
return true;
|
|
51890
|
+
});
|
|
51891
|
+
let buttonsHtml = filteredButtons.map(item => buttonTemplates[item] || '').join('');
|
|
51858
51892
|
let html = `<div class="is-pop rowmore" style="z-index:10002;" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
|
|
51859
51893
|
<div style="display:flex;flex-flow:wrap;">
|
|
51860
|
-
|
|
51861
|
-
<button type="button" title="${util.out('Move Down')}" class="row-down"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-down"></use></svg></span>${util.out('Move Down')}</button>
|
|
51862
|
-
<button type="button" title="${util.out('Duplicate')}" class="row-duplicate"><span><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-ios-photos-outline"></use></svg></span>${util.out('Duplicate')}</button>
|
|
51863
|
-
${htmlbutton}
|
|
51864
|
-
<div class="is-separator"></div>
|
|
51865
|
-
<button type="button" title="${util.out('Lock')}" class="row-locking"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-lock"></use></svg></span>${util.out('Lock')}</button>
|
|
51866
|
-
<button type="button" title="${util.out('Settings')}" class="row-settings"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-cog"></use></svg></span>${util.out('Settings')}</button>
|
|
51894
|
+
${buttonsHtml}
|
|
51867
51895
|
</div>
|
|
51868
51896
|
</div>
|
|
51869
51897
|
`;
|
|
@@ -53326,29 +53354,40 @@ class ColumnTool {
|
|
|
53326
53354
|
const dom = this.builder.dom;
|
|
53327
53355
|
this.grid = new Grid(builder);
|
|
53328
53356
|
let columnMore = builderStuff.querySelector('.is-pop.columnmore');
|
|
53329
|
-
let resizebutton = `
|
|
53330
|
-
<button type="button" title="${util.out('Increase')}" class="cell-increase"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-increase"></use></svg></span>${util.out('Increase')}</button>
|
|
53331
|
-
<button type="button" title="${util.out('Decrease')}" class="cell-decrease"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-decrease"></use></svg></span>${util.out('Decrease')}</button>
|
|
53332
|
-
`;
|
|
53333
|
-
let htmlbutton = '';
|
|
53334
|
-
if (builder.opts.columnHtmlEditor) htmlbutton = `<button type="button" title="${util.out('HTML')}" class="cell-html">
|
|
53335
|
-
<span><svg class="is-icon-flex" style="margin-right:-3px;width:12px;height:12px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:12px;height:12px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></span>${util.out('HTML')}
|
|
53336
|
-
</button>`;
|
|
53337
53357
|
if (!columnMore) {
|
|
53358
|
+
let columnMoreButtons = ['moveleft', 'moveright', 'moveup', 'movedown', 'increase', 'decrease', 'duplicate', 'html', 'separator', 'lock', 'settings']; // default
|
|
53359
|
+
|
|
53360
|
+
if (builder.columnMoreButtons) {
|
|
53361
|
+
columnMoreButtons = builder.columnMoreButtons;
|
|
53362
|
+
}
|
|
53363
|
+
const buttonTemplates = {
|
|
53364
|
+
moveleft: `<button type="button" title="${util.out('Move Left')}" class="cell-prev" style="flex: 1 1 calc(50% - 10px);"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-left"></use></svg></span>${util.out('Move Left')}</button>`,
|
|
53365
|
+
moveright: `<button type="button" title="${util.out('Move Right')}" class="cell-next" style="flex: 1 1 calc(50% - 10px);"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-right"></use></svg></span>${util.out('Move Right')}</button>`,
|
|
53366
|
+
moveup: `<button type="button" title="${util.out('Move Up')}" class="cell-up" style="flex: 1 1 calc(50% - 10px);"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-up"></use></svg></span>${util.out('Move Up')}</button>`,
|
|
53367
|
+
movedown: `<button type="button" title="${util.out('Move Down')}" class="cell-down" style="flex: 1 1 calc(50% - 10px);"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-down"></use></svg></span>${util.out('Move Down')}</button>`,
|
|
53368
|
+
increase: `<button type="button" title="${util.out('Increase')}" class="cell-increase" style="flex: 1 1 calc(50% - 10px);"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-increase"></use></svg></span>${util.out('Increase')}</button>`,
|
|
53369
|
+
decrease: `<button type="button" title="${util.out('Decrease')}" class="cell-decrease" style="flex: 1 1 calc(50% - 10px);"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-decrease"></use></svg></span>${util.out('Decrease')}</button>`,
|
|
53370
|
+
duplicate: `<button type="button" title="${util.out('Duplicate')}" class="cell-duplicate" style="flex: 1 1 calc(50% - 10px);"><span><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-ios-photos-outline"></use></svg></span>${util.out('Duplicate')}</button>`,
|
|
53371
|
+
html: `<button type="button" title="${util.out('HTML')}" class="cell-html" style="flex: 1 1 calc(50% - 10px);">
|
|
53372
|
+
<span><svg class="is-icon-flex" style="margin-right:-3px;width:12px;height:12px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:12px;height:12px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></span>${util.out('HTML')}
|
|
53373
|
+
</button>`,
|
|
53374
|
+
separator: '<div class="is-separator"></div>',
|
|
53375
|
+
lock: `<button type="button" title="${util.out('Lock')}" class="cell-locking" style="flex: 1 1 calc(50% - 10px);"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-lock"></use></svg></span>${util.out('Lock')}</button>`,
|
|
53376
|
+
settings: `<button type="button" title="${util.out('Settings')}" class="cell-settings" style="flex: 1 1 calc(50% - 10px);"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-cog"></use></svg></span>${util.out('Settings')}</button>`
|
|
53377
|
+
};
|
|
53378
|
+
|
|
53379
|
+
// Filter buttons
|
|
53380
|
+
const filteredButtons = columnMoreButtons.filter(item => {
|
|
53381
|
+
if (!builder.opts.columnHtmlEditor && item === 'html') return false;
|
|
53382
|
+
return true;
|
|
53383
|
+
});
|
|
53384
|
+
let buttonsHtml = filteredButtons.map(item => buttonTemplates[item] || '').join('');
|
|
53385
|
+
|
|
53338
53386
|
// Refer to .is-col-tool in in rowtool.js
|
|
53339
53387
|
let html = `
|
|
53340
53388
|
<div class="is-pop columnmore" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
|
|
53341
53389
|
<div style="display:flex;flex-flow:wrap;">
|
|
53342
|
-
|
|
53343
|
-
<button type="button" title="${util.out('Move Right')}" class="cell-next"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-right"></use></svg></span>${util.out('Move Right')}</button>
|
|
53344
|
-
<button type="button" title="${util.out('Move Up')}" class="cell-up"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-up"></use></svg></span>${util.out('Move Up')}</button>
|
|
53345
|
-
<button type="button" title="${util.out('Move Down')}" class="cell-down"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-down"></use></svg></span>${util.out('Move Down')}</button>
|
|
53346
|
-
${resizebutton}
|
|
53347
|
-
<button type="button" title="${util.out('Duplicate')}" class="cell-duplicate"><span><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-ios-photos-outline"></use></svg></span>${util.out('Duplicate')}</button>
|
|
53348
|
-
${htmlbutton}
|
|
53349
|
-
<div class="is-separator"></div>
|
|
53350
|
-
<button type="button" title="${util.out('Lock')}" class="cell-locking"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-lock"></use></svg></span>${util.out('Lock')}</button>
|
|
53351
|
-
<button type="button" title="${util.out('Settings')}" class="cell-settings"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-cog"></use></svg></span>${util.out('Settings')}</button>
|
|
53390
|
+
${buttonsHtml}
|
|
53352
53391
|
</div>
|
|
53353
53392
|
</div>
|
|
53354
53393
|
`;
|
|
@@ -60328,6 +60367,24 @@ class ElementTool {
|
|
|
60328
60367
|
let elementTool = builderStuff.querySelector('.is-element-tool');
|
|
60329
60368
|
let elementMore = builderStuff.querySelector('.elmmore');
|
|
60330
60369
|
if (!elementTool) {
|
|
60370
|
+
let elementMoreButtons = ['moveup', 'movedown', 'duplicate', 'settings']; // default
|
|
60371
|
+
|
|
60372
|
+
if (builder.elementMoreButtons) {
|
|
60373
|
+
elementMoreButtons = builder.elementMoreButtons;
|
|
60374
|
+
}
|
|
60375
|
+
const buttonTemplates = {
|
|
60376
|
+
moveup: `<button type="button" title="${util.out('Move Up')}" class="elm-up" style="flex: 1 1 calc(50% - 10px);"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-up"></use></svg></span>${util.out('Move Up')}</button>`,
|
|
60377
|
+
movedown: `<button type="button" title="${util.out('Move Down')}" class="elm-down" style="flex: 1 1 calc(50% - 10px);"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-down"></use></svg></span>${util.out('Move Down')}</button>`,
|
|
60378
|
+
duplicate: `<button type="button" title="${util.out('Duplicate')}" class="elm-duplicate" style="flex: 1 1 calc(50% - 10px);"><span><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-ios-photos-outline"></use></svg></span>${util.out('Duplicate')}</button>`,
|
|
60379
|
+
settings: `<button type="button" title="${util.out('Settings')}" class="elm-settings" style="flex: 1 1 calc(50% - 10px);"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-cog"></use></svg></span>${util.out('Settings')}</button>`
|
|
60380
|
+
};
|
|
60381
|
+
|
|
60382
|
+
// Filter buttons
|
|
60383
|
+
const filteredButtons = elementMoreButtons.filter(item => {
|
|
60384
|
+
if (!builder.opts.elementEditor && item === 'settings') return false;
|
|
60385
|
+
return true;
|
|
60386
|
+
});
|
|
60387
|
+
let buttonsHtml = filteredButtons.map(item => buttonTemplates[item] || '').join('');
|
|
60331
60388
|
let html = `<div class="is-tool is-element-tool">
|
|
60332
60389
|
<button type="button" tabindex="-1" title="${util.out('Add')}" class="elm-add">
|
|
60333
60390
|
<svg class="is-icon-flex" style="width:14px;height:14px;color:#111"><use xlink:href="#icon-plus"></use></svg>
|
|
@@ -60345,12 +60402,7 @@ class ElementTool {
|
|
|
60345
60402
|
|
|
60346
60403
|
<div class="is-pop elmmore" style="z-index:10002;" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
|
|
60347
60404
|
<div style="display:flex;flex-flow:wrap;">
|
|
60348
|
-
|
|
60349
|
-
<button type="button" title="${util.out('Move Down')}" class="elm-down"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-down"></use></svg></span>${util.out('Move Down')}</button>
|
|
60350
|
-
<button type="button" title="${util.out('Duplicate')}" class="elm-duplicate"><span><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-ios-photos-outline"></use></svg></span>${util.out('Duplicate')}</button>
|
|
60351
|
-
${this.builder.opts.elementEditor ? `
|
|
60352
|
-
<button type="button" title="${util.out('Settings')}" class="elm-settings"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-cog"></use></svg></span>${util.out('Settings')}</button>
|
|
60353
|
-
` : ''}
|
|
60405
|
+
${buttonsHtml}
|
|
60354
60406
|
</div>
|
|
60355
60407
|
</div>
|
|
60356
60408
|
`;
|
|
@@ -60863,6 +60915,10 @@ class ElementTool {
|
|
|
60863
60915
|
}
|
|
60864
60916
|
if (activeElement && activeElement.classList.contains('ovl') && this.builder.activeIframe) {
|
|
60865
60917
|
activeElement = this.builder.activeIframe.closest('.embed-responsive');
|
|
60918
|
+
} else if (activeElement && activeElement.classList.contains('ovl')) {
|
|
60919
|
+
if (activeElement.parentNode.querySelector('audio')) {
|
|
60920
|
+
activeElement = activeElement.parentNode;
|
|
60921
|
+
}
|
|
60866
60922
|
}
|
|
60867
60923
|
this.builder.activeElement = activeElement;
|
|
60868
60924
|
if (activeElement) {
|