@innovastudio/contentbuilder 1.0.55 → 1.0.59
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.
|
@@ -1237,6 +1237,11 @@ class Util {
|
|
|
1237
1237
|
|
|
1238
1238
|
emptyinfo.addEventListener('click', () => {
|
|
1239
1239
|
this.clearActiveCell();
|
|
1240
|
+
const builders = document.querySelectorAll(this.builder.opts.container);
|
|
1241
|
+
Array.prototype.forEach.call(builders, item => {
|
|
1242
|
+
dom.removeClass(item, 'builder-active');
|
|
1243
|
+
});
|
|
1244
|
+
dom.addClass(builder, 'builder-active');
|
|
1240
1245
|
dom.addClass(emptyinfo, 'row-active'); // Needed for addContent(). Directly apply class in Util is fine.
|
|
1241
1246
|
|
|
1242
1247
|
const builderStuff = this.builder.builderStuff;
|
|
@@ -8213,9 +8218,9 @@ let hash$1 = {};
|
|
|
8213
8218
|
class HtmlUtil {
|
|
8214
8219
|
constructor(builder) {
|
|
8215
8220
|
this.builder = builder;
|
|
8216
|
-
const util =
|
|
8217
|
-
const
|
|
8218
|
-
let viewhtml =
|
|
8221
|
+
const util = this.builder.util;
|
|
8222
|
+
const builderStuff = this.builder.builderStuff;
|
|
8223
|
+
let viewhtml = builderStuff.querySelector('.viewhtml');
|
|
8219
8224
|
|
|
8220
8225
|
if (!viewhtml) {
|
|
8221
8226
|
/*
|
|
@@ -8261,10 +8266,10 @@ class HtmlUtil {
|
|
|
8261
8266
|
</div>
|
|
8262
8267
|
|
|
8263
8268
|
`;
|
|
8264
|
-
dom$E.appendHtml(
|
|
8265
|
-
viewhtml =
|
|
8266
|
-
let viewhtmlformatted =
|
|
8267
|
-
let viewhtmlnormal =
|
|
8269
|
+
dom$E.appendHtml(builderStuff, html);
|
|
8270
|
+
viewhtml = builderStuff.querySelector('.viewhtml');
|
|
8271
|
+
let viewhtmlformatted = builderStuff.querySelector('.viewhtmlformatted');
|
|
8272
|
+
let viewhtmlnormal = builderStuff.querySelector('.viewhtmlnormal');
|
|
8268
8273
|
let elm = viewhtml.querySelector('.input-html-larger');
|
|
8269
8274
|
dom$E.addEventListener(elm, 'click', () => {
|
|
8270
8275
|
let textarea = viewhtml.querySelector('textarea'); // Used by html dialog (syntaxhighlighting)
|
|
@@ -8300,9 +8305,9 @@ class HtmlUtil {
|
|
|
8300
8305
|
}
|
|
8301
8306
|
|
|
8302
8307
|
viewHtmlNormal() {
|
|
8303
|
-
const util =
|
|
8304
|
-
const
|
|
8305
|
-
const viewhtmlnormal =
|
|
8308
|
+
const util = this.builder.util;
|
|
8309
|
+
const builderStuff = this.builder.builderStuff;
|
|
8310
|
+
const viewhtmlnormal = builderStuff.querySelector('.viewhtmlnormal');
|
|
8306
8311
|
let iframe = viewhtmlnormal.querySelector('iframe');
|
|
8307
8312
|
iframe.outerHTML = '<iframe id="ifrHtml" style="width:100%;height:100%;border: none;" src="about:blank"></iframe>'; //clear
|
|
8308
8313
|
|
|
@@ -8315,9 +8320,9 @@ class HtmlUtil {
|
|
|
8315
8320
|
}
|
|
8316
8321
|
|
|
8317
8322
|
viewHtmlLarger() {
|
|
8318
|
-
const util =
|
|
8319
|
-
const
|
|
8320
|
-
const viewhtmllarger =
|
|
8323
|
+
const util = this.builder.util;
|
|
8324
|
+
const builderStuff = this.builder.builderStuff;
|
|
8325
|
+
const viewhtmllarger = builderStuff.querySelector('.viewhtmllarger');
|
|
8321
8326
|
let iframe = viewhtmllarger.querySelector('iframe');
|
|
8322
8327
|
iframe.outerHTML = '<iframe id="ifrHtml" style="width:100%;height:100%;border: none;" src="about:blank"></iframe>'; //clear
|
|
8323
8328
|
|
|
@@ -8329,14 +8334,14 @@ class HtmlUtil {
|
|
|
8329
8334
|
}
|
|
8330
8335
|
|
|
8331
8336
|
view(mode, area) {
|
|
8332
|
-
const util =
|
|
8333
|
-
const
|
|
8337
|
+
const util = this.builder.util;
|
|
8338
|
+
const builderStuff = this.builder.builderStuff;
|
|
8334
8339
|
let viewhtml;
|
|
8335
8340
|
|
|
8336
8341
|
if (this.builder.opts.htmlSyntaxHighlighting) {
|
|
8337
|
-
viewhtml =
|
|
8342
|
+
viewhtml = builderStuff.querySelector('.viewhtmlformatted');
|
|
8338
8343
|
} else {
|
|
8339
|
-
viewhtml =
|
|
8344
|
+
viewhtml = builderStuff.querySelector('.viewhtml');
|
|
8340
8345
|
}
|
|
8341
8346
|
|
|
8342
8347
|
viewhtml.querySelector('.is-modal-footer').innerHTML = `<button title="${util.out('Cancel')}" class="input-cancel classic-secondary">${util.out('Cancel')}</button>
|
|
@@ -8362,7 +8367,7 @@ class HtmlUtil {
|
|
|
8362
8367
|
|
|
8363
8368
|
dom$E.removeClass(row, 'row-outline'); //Hide Column tool
|
|
8364
8369
|
|
|
8365
|
-
let columnTool =
|
|
8370
|
+
let columnTool = builderStuff.querySelector('.is-column-tool');
|
|
8366
8371
|
dom$E.removeClass(columnTool, 'active');
|
|
8367
8372
|
}
|
|
8368
8373
|
|
|
@@ -8478,9 +8483,9 @@ class HtmlUtil {
|
|
|
8478
8483
|
} //Hide popup
|
|
8479
8484
|
|
|
8480
8485
|
|
|
8481
|
-
let columnMore =
|
|
8486
|
+
let columnMore = builderStuff.querySelector('.is-pop.columnmore');
|
|
8482
8487
|
columnMore.style.display = '';
|
|
8483
|
-
let rowMore =
|
|
8488
|
+
let rowMore = builderStuff.querySelector('.is-pop.rowmore');
|
|
8484
8489
|
rowMore.style.display = '';
|
|
8485
8490
|
}
|
|
8486
8491
|
|
|
@@ -8508,17 +8513,17 @@ class HtmlUtil {
|
|
|
8508
8513
|
});
|
|
8509
8514
|
}
|
|
8510
8515
|
|
|
8511
|
-
const util =
|
|
8516
|
+
const util = this.builder.util;
|
|
8517
|
+
const builderStuff = this.builder.builderStuff; //Prepare temporary helpers: #tmp_content & #tmp_buildercontent
|
|
8512
8518
|
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
elm
|
|
8517
|
-
if (elm) builderstuff.removeChild(elm);
|
|
8519
|
+
let elm = builderStuff.querySelector('#tmp_content');
|
|
8520
|
+
if (elm) builderStuff.removeChild(elm);
|
|
8521
|
+
elm = builderStuff.querySelector('#tmp_buildercontent');
|
|
8522
|
+
if (elm) builderStuff.removeChild(elm);
|
|
8518
8523
|
let html = `<div id="tmp_content" style="position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden;visibility:hidden;"></div>
|
|
8519
8524
|
<div id="tmp_buildercontent" style="position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden;visibility:hidden;"></div>`;
|
|
8520
|
-
dom$E.appendHtml(
|
|
8521
|
-
let tmp =
|
|
8525
|
+
dom$E.appendHtml(builderStuff, html);
|
|
8526
|
+
let tmp = builderStuff.querySelector('#tmp_content');
|
|
8522
8527
|
tmp.innerHTML = content.innerHTML; //Find subblocks (previously is-builder) in custom code blocks and save them to data-html-1, data-html-2, and so on.
|
|
8523
8528
|
|
|
8524
8529
|
let blocks = tmp.querySelectorAll('[data-html]');
|
|
@@ -8559,7 +8564,7 @@ class HtmlUtil {
|
|
|
8559
8564
|
_builder.removeAttribute('between-blocks-center'); // old
|
|
8560
8565
|
_builder.removeAttribute('hideelementhighlight');
|
|
8561
8566
|
let builderhtml = _builder.innerHTML;
|
|
8562
|
-
let tmpbuilder =
|
|
8567
|
+
let tmpbuilder = builderStuff.querySelector('#tmp_buildercontent');
|
|
8563
8568
|
tmpbuilder.innerHTML = builderhtml;
|
|
8564
8569
|
let elms = tmp.querySelectorAll('.sortable-chosen');
|
|
8565
8570
|
dom.removeClasses(elms, 'sortable-chosen');
|
|
@@ -8843,10 +8848,10 @@ class HtmlUtil {
|
|
|
8843
8848
|
html = html.replace(/<font/g, '<span').replace(/<\/font/g, '</span');
|
|
8844
8849
|
}
|
|
8845
8850
|
|
|
8846
|
-
elm =
|
|
8847
|
-
if (elm)
|
|
8848
|
-
elm =
|
|
8849
|
-
if (elm)
|
|
8851
|
+
elm = builderStuff.querySelector('#tmp_content');
|
|
8852
|
+
if (elm) builderStuff.removeChild(elm);
|
|
8853
|
+
elm = builderStuff.querySelector('#tmp_buildercontent');
|
|
8854
|
+
if (elm) builderStuff.removeChild(elm); // return html;
|
|
8850
8855
|
|
|
8851
8856
|
let beautify = JsBeautify.html;
|
|
8852
8857
|
return beautify(html);
|
|
@@ -9622,7 +9627,8 @@ const prepareSvgIcons = () => {
|
|
|
9622
9627
|
class Snippets {
|
|
9623
9628
|
constructor(builder) {
|
|
9624
9629
|
this.builder = builder;
|
|
9625
|
-
|
|
9630
|
+
const util = this.builder.util;
|
|
9631
|
+
this.util = util;
|
|
9626
9632
|
}
|
|
9627
9633
|
|
|
9628
9634
|
getSnippetsHtml() {
|
|
@@ -10519,8 +10525,8 @@ class Snippets {
|
|
|
10519
10525
|
const dom$B = new Dom();
|
|
10520
10526
|
|
|
10521
10527
|
const renderQuickAdd = builder => {
|
|
10522
|
-
const util =
|
|
10523
|
-
const builderStuff =
|
|
10528
|
+
const util = builder.util;
|
|
10529
|
+
const builderStuff = builder.builderStuff;
|
|
10524
10530
|
let quickadd = builderStuff.querySelector('.quickadd');
|
|
10525
10531
|
|
|
10526
10532
|
if (!quickadd) {
|
|
@@ -11586,10 +11592,9 @@ class RowTool$1 {
|
|
|
11586
11592
|
}
|
|
11587
11593
|
|
|
11588
11594
|
position(row) {
|
|
11589
|
-
const
|
|
11590
|
-
const builderstuff = util.builderStuff();
|
|
11595
|
+
const builderStuff = this.builder.builderStuff;
|
|
11591
11596
|
let rowTool = row.querySelector('.is-row-tool');
|
|
11592
|
-
let rowMore =
|
|
11597
|
+
let rowMore = builderStuff.querySelector('.rowmore');
|
|
11593
11598
|
dom$A.addClass(rowMore, 'transition1');
|
|
11594
11599
|
const elm = rowTool.querySelector('.row-more');
|
|
11595
11600
|
const top = elm.getBoundingClientRect().top + window.pageYOffset;
|
|
@@ -11626,10 +11631,9 @@ class ColumnTool$1 {
|
|
|
11626
11631
|
}
|
|
11627
11632
|
|
|
11628
11633
|
position(col) {
|
|
11629
|
-
const
|
|
11630
|
-
|
|
11631
|
-
this.
|
|
11632
|
-
this.columnMore = builderstuff.querySelector('.columnmore');
|
|
11634
|
+
const builderStuff = this.builder.builderStuff;
|
|
11635
|
+
this.columnTool = builderStuff.querySelector('.is-column-tool');
|
|
11636
|
+
this.columnMore = builderStuff.querySelector('.columnmore');
|
|
11633
11637
|
dom$A.addClass(this.columnMore, 'transition1');
|
|
11634
11638
|
setTimeout(() => {
|
|
11635
11639
|
this.columnTool.style.top = col.getBoundingClientRect().top - 29 + window.pageYOffset + 'px';
|
|
@@ -11645,17 +11649,15 @@ class ColumnTool$1 {
|
|
|
11645
11649
|
}
|
|
11646
11650
|
|
|
11647
11651
|
hide() {
|
|
11648
|
-
const
|
|
11649
|
-
|
|
11650
|
-
this.columnTool = builderstuff.querySelector('.is-column-tool'); // this.columnMore = builderstuff.querySelector('.columnmore');
|
|
11652
|
+
const builderStuff = this.builder.builderStuff;
|
|
11653
|
+
this.columnTool = builderStuff.querySelector('.is-column-tool'); // this.columnMore = builderStuff.querySelector('.columnmore');
|
|
11651
11654
|
|
|
11652
11655
|
dom$A.removeClass(this.columnTool, 'active');
|
|
11653
11656
|
}
|
|
11654
11657
|
|
|
11655
11658
|
show() {
|
|
11656
|
-
const
|
|
11657
|
-
|
|
11658
|
-
this.columnTool = builderstuff.querySelector('.is-column-tool'); // this.columnMore = builderstuff.querySelector('.columnmore');
|
|
11659
|
+
const builderStuff = this.builder.builderStuff;
|
|
11660
|
+
this.columnTool = builderStuff.querySelector('.is-column-tool'); // this.columnMore = builderStuff.querySelector('.columnmore');
|
|
11659
11661
|
|
|
11660
11662
|
dom$A.addClass(this.columnTool, 'active');
|
|
11661
11663
|
}
|
|
@@ -11778,7 +11780,8 @@ class Draggable$1 {
|
|
|
11778
11780
|
const dom$z = new Dom();
|
|
11779
11781
|
|
|
11780
11782
|
const renderGridEditor = builder => {
|
|
11781
|
-
const util =
|
|
11783
|
+
const util = builder.util;
|
|
11784
|
+
const builderStuff = builder.builderStuff;
|
|
11782
11785
|
const grid = new Grid(builder);
|
|
11783
11786
|
const htmlutil = new HtmlUtil(builder);
|
|
11784
11787
|
let rowhtmlbutton = '';
|
|
@@ -11825,8 +11828,7 @@ const renderGridEditor = builder => {
|
|
|
11825
11828
|
</div>`; //LATER:
|
|
11826
11829
|
//<button title="${util.out('Element Tool')}" class="cell-elmtool"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-ios-gear"></use></svg></button>
|
|
11827
11830
|
|
|
11828
|
-
|
|
11829
|
-
dom$z.appendHtml(builderstuff, html);
|
|
11831
|
+
dom$z.appendHtml(builderStuff, html);
|
|
11830
11832
|
new Draggable$1({
|
|
11831
11833
|
selector: '.is-draggable'
|
|
11832
11834
|
});
|
|
@@ -15101,8 +15103,8 @@ Sortable.mount(Remove, Revert);
|
|
|
15101
15103
|
const dom$x = new Dom();
|
|
15102
15104
|
|
|
15103
15105
|
const renderSnippetPanel = builder => {
|
|
15104
|
-
const util =
|
|
15105
|
-
const builderStuff =
|
|
15106
|
+
const util = builder.util;
|
|
15107
|
+
const builderStuff = builder.builderStuff;
|
|
15106
15108
|
let hideHandle = '';
|
|
15107
15109
|
let sidePanel = builder.opts.sidePanel;
|
|
15108
15110
|
|
|
@@ -38430,9 +38432,9 @@ const dom$w = new Dom();
|
|
|
38430
38432
|
class Image {
|
|
38431
38433
|
constructor(builder) {
|
|
38432
38434
|
this.builder = builder;
|
|
38433
|
-
const util =
|
|
38435
|
+
const util = this.builder.util;
|
|
38436
|
+
const builderStuff = this.builder.builderStuff;
|
|
38434
38437
|
this.util = util;
|
|
38435
|
-
const builderStuff = util.builderStuff();
|
|
38436
38438
|
let imageTool = builderStuff.querySelector('#divImageTool');
|
|
38437
38439
|
let imageResizer;
|
|
38438
38440
|
|
|
@@ -40625,8 +40627,8 @@ const dom$v = new Dom();
|
|
|
40625
40627
|
class Hyperlink {
|
|
40626
40628
|
constructor(builder) {
|
|
40627
40629
|
this.builder = builder;
|
|
40628
|
-
const util =
|
|
40629
|
-
const builderStuff =
|
|
40630
|
+
const util = this.builder.util;
|
|
40631
|
+
const builderStuff = this.builder.builderStuff;
|
|
40630
40632
|
this.builderStuff = builderStuff;
|
|
40631
40633
|
let linkTool = builderStuff.querySelector('#divLinkTool');
|
|
40632
40634
|
|
|
@@ -41179,9 +41181,9 @@ const dom$u = new Dom();
|
|
|
41179
41181
|
class Spacer {
|
|
41180
41182
|
constructor(builder) {
|
|
41181
41183
|
this.builder = builder;
|
|
41182
|
-
const util =
|
|
41184
|
+
const util = this.builder.util;
|
|
41185
|
+
const builderStuff = this.builder.builderStuff;
|
|
41183
41186
|
this.util = util;
|
|
41184
|
-
const builderStuff = util.builderStuff();
|
|
41185
41187
|
this.builderStuff = builderStuff;
|
|
41186
41188
|
let spacerTool = builderStuff.querySelector('.is-spacer-tool');
|
|
41187
41189
|
|
|
@@ -41345,9 +41347,9 @@ const dom$t = new Dom();
|
|
|
41345
41347
|
class Module {
|
|
41346
41348
|
constructor(builder) {
|
|
41347
41349
|
this.builder = builder;
|
|
41348
|
-
const util =
|
|
41350
|
+
const util = this.builder.util;
|
|
41351
|
+
const builderStuff = this.builder.builderStuff;
|
|
41349
41352
|
this.util = util;
|
|
41350
|
-
const builderStuff = util.builderStuff();
|
|
41351
41353
|
this.builderStuff = builderStuff;
|
|
41352
41354
|
let moduleTool = builderStuff.querySelector('.is-module-tool');
|
|
41353
41355
|
let moduleModal;
|
|
@@ -41424,6 +41426,8 @@ class Module {
|
|
|
41424
41426
|
var index = 1;
|
|
41425
41427
|
const builders = module.querySelectorAll('[data-subblock]');
|
|
41426
41428
|
Array.prototype.forEach.call(builders, builder => {
|
|
41429
|
+
// Glide Slider Support
|
|
41430
|
+
if (dom$t.hasClass(builder.parentNode, 'glide__slide--clone')) return;
|
|
41427
41431
|
let builderhtml = builder.innerHTML;
|
|
41428
41432
|
module.setAttribute('data-html-' + index, encodeURIComponent(builderhtml));
|
|
41429
41433
|
index++;
|
|
@@ -41591,12 +41595,12 @@ const dom$s = new Dom();
|
|
|
41591
41595
|
class Code {
|
|
41592
41596
|
constructor(builder) {
|
|
41593
41597
|
this.builder = builder;
|
|
41594
|
-
const util =
|
|
41598
|
+
const util = this.builder.util;
|
|
41599
|
+
const builderStuff = this.builder.builderStuff;
|
|
41595
41600
|
this.util = util;
|
|
41601
|
+
this.builderStuff = builderStuff;
|
|
41596
41602
|
const htmlUtil = new HtmlUtil(builder);
|
|
41597
41603
|
this.htmlUtil = htmlUtil;
|
|
41598
|
-
const builderStuff = util.builderStuff();
|
|
41599
|
-
this.builderStuff = builderStuff;
|
|
41600
41604
|
let codeTool = builderStuff.querySelector('.is-code-tool');
|
|
41601
41605
|
|
|
41602
41606
|
if (!codeTool) {
|
|
@@ -41793,9 +41797,9 @@ const dom$r = new Dom();
|
|
|
41793
41797
|
class Iframe {
|
|
41794
41798
|
constructor(builder) {
|
|
41795
41799
|
this.builder = builder;
|
|
41796
|
-
const util =
|
|
41800
|
+
const util = this.builder.util;
|
|
41801
|
+
const builderStuff = this.builder.builderStuff;
|
|
41797
41802
|
this.util = util;
|
|
41798
|
-
const builderStuff = util.builderStuff();
|
|
41799
41803
|
this.builderStuff = builderStuff;
|
|
41800
41804
|
let iframeTool = builderStuff.querySelector('.is-iframe-tool');
|
|
41801
41805
|
let iframeModal;
|
|
@@ -41936,9 +41940,9 @@ const dom$q = new Dom();
|
|
|
41936
41940
|
class Table {
|
|
41937
41941
|
constructor(builder) {
|
|
41938
41942
|
this.builder = builder;
|
|
41939
|
-
const util =
|
|
41943
|
+
const util = this.builder.util;
|
|
41944
|
+
const builderStuff = this.builder.builderStuff;
|
|
41940
41945
|
this.util = util;
|
|
41941
|
-
const builderStuff = util.builderStuff();
|
|
41942
41946
|
this.builderStuff = builderStuff;
|
|
41943
41947
|
let tableTool = builderStuff.querySelector('.is-table-tool');
|
|
41944
41948
|
let tableModal;
|
|
@@ -42451,9 +42455,9 @@ const dom$p = new Dom();
|
|
|
42451
42455
|
class Video {
|
|
42452
42456
|
constructor(builder) {
|
|
42453
42457
|
this.builder = builder;
|
|
42454
|
-
const util =
|
|
42455
|
-
this.util = util;
|
|
42458
|
+
const util = this.builder.util;
|
|
42456
42459
|
const builderStuff = this.builder.builderStuff;
|
|
42460
|
+
this.util = util;
|
|
42457
42461
|
this.builderStuff = builderStuff;
|
|
42458
42462
|
let videoTool = builderStuff.querySelector('.is-video-tool');
|
|
42459
42463
|
|
|
@@ -42670,8 +42674,10 @@ const dom$o = new Dom();
|
|
|
42670
42674
|
class Element$1 {
|
|
42671
42675
|
constructor(builder) {
|
|
42672
42676
|
this.builder = builder;
|
|
42673
|
-
const util =
|
|
42677
|
+
const util = this.builder.util;
|
|
42678
|
+
const builderStuff = this.builder.builderStuff;
|
|
42674
42679
|
this.util = util;
|
|
42680
|
+
this.builderStuff = builderStuff;
|
|
42675
42681
|
this.hyperlink = new Hyperlink(builder);
|
|
42676
42682
|
this.image = new Image(builder);
|
|
42677
42683
|
this.spacer = new Spacer(builder);
|
|
@@ -42680,8 +42686,6 @@ class Element$1 {
|
|
|
42680
42686
|
this.iframe = new Iframe(builder);
|
|
42681
42687
|
this.table = new Table(builder);
|
|
42682
42688
|
this.video = new Video(builder);
|
|
42683
|
-
const builderStuff = util.builderStuff();
|
|
42684
|
-
this.builderStuff = builderStuff;
|
|
42685
42689
|
window.addEventListener('keydown', e => {
|
|
42686
42690
|
if (e.keyCode === 46) {
|
|
42687
42691
|
//delete
|
|
@@ -42944,11 +42948,11 @@ const dom$n = new Dom();
|
|
|
42944
42948
|
class RowTool {
|
|
42945
42949
|
constructor(builder) {
|
|
42946
42950
|
this.builder = builder;
|
|
42951
|
+
const util = this.builder.util;
|
|
42952
|
+
const builderStuff = this.builder.builderStuff;
|
|
42947
42953
|
this.grid = new Grid(builder);
|
|
42948
|
-
const util = new Util(this.builder);
|
|
42949
42954
|
const htmlutil = new HtmlUtil(builder);
|
|
42950
|
-
|
|
42951
|
-
let rowMore = builderstuff.querySelector('.rowmore');
|
|
42955
|
+
let rowMore = builderStuff.querySelector('.rowmore');
|
|
42952
42956
|
let htmlbutton = '';
|
|
42953
42957
|
if (builder.opts.rowHtmlEditor) htmlbutton = `<button type="button" title="${util.out('HTML')}" class="row-html">
|
|
42954
42958
|
<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')}
|
|
@@ -42963,8 +42967,8 @@ class RowTool {
|
|
|
42963
42967
|
${htmlbutton}
|
|
42964
42968
|
</div>
|
|
42965
42969
|
</div>`;
|
|
42966
|
-
dom$n.appendHtml(
|
|
42967
|
-
rowMore =
|
|
42970
|
+
dom$n.appendHtml(builderStuff, html);
|
|
42971
|
+
rowMore = builderStuff.querySelector('.rowmore');
|
|
42968
42972
|
let elm = rowMore.querySelector('.row-up');
|
|
42969
42973
|
if (elm) dom$n.addEventListener(elm, 'click', () => {
|
|
42970
42974
|
this.grid.moveRowUp();
|
|
@@ -43009,8 +43013,8 @@ class RowTool {
|
|
|
43009
43013
|
}
|
|
43010
43014
|
|
|
43011
43015
|
render(row) {
|
|
43012
|
-
const util =
|
|
43013
|
-
const
|
|
43016
|
+
const util = this.builder.util;
|
|
43017
|
+
const builderStuff = this.builder.builderStuff;
|
|
43014
43018
|
let rowMore = this.rowMore;
|
|
43015
43019
|
let rowtool = row.querySelector('.is-row-tool');
|
|
43016
43020
|
|
|
@@ -43031,7 +43035,7 @@ class RowTool {
|
|
|
43031
43035
|
});
|
|
43032
43036
|
let elm = rowtool.querySelector('.row-grideditor');
|
|
43033
43037
|
if (elm) dom$n.addEventListener(elm, 'click', () => {
|
|
43034
|
-
const grideditor =
|
|
43038
|
+
const grideditor = builderStuff.querySelector('.grideditor');
|
|
43035
43039
|
|
|
43036
43040
|
if (dom$n.hasClass(grideditor, 'active')) {
|
|
43037
43041
|
dom$n.removeClass(grideditor, 'active');
|
|
@@ -43079,7 +43083,7 @@ class RowTool {
|
|
|
43079
43083
|
|
|
43080
43084
|
dom$n.removeClass(row, 'row-outline'); //Hide Column tool
|
|
43081
43085
|
|
|
43082
|
-
let columnTool =
|
|
43086
|
+
let columnTool = builderStuff.querySelector('.is-column-tool');
|
|
43083
43087
|
dom$n.removeClass(columnTool, 'active');
|
|
43084
43088
|
const elm = rowtool.querySelector('.row-more');
|
|
43085
43089
|
const top = elm.getBoundingClientRect().top + window.pageYOffset;
|
|
@@ -43133,7 +43137,7 @@ class RowAddTool {
|
|
|
43133
43137
|
}
|
|
43134
43138
|
|
|
43135
43139
|
render(row) {
|
|
43136
|
-
const util =
|
|
43140
|
+
const util = this.builder.util;
|
|
43137
43141
|
const quickadd = renderQuickAdd(this.builder);
|
|
43138
43142
|
let rowaddtool = row.querySelector('.is-rowadd-tool');
|
|
43139
43143
|
|
|
@@ -44848,9 +44852,9 @@ class ColumnTool {
|
|
|
44848
44852
|
constructor(builder) {
|
|
44849
44853
|
this.builder = builder;
|
|
44850
44854
|
this.grid = new Grid(builder);
|
|
44851
|
-
const util =
|
|
44855
|
+
const util = this.builder.util;
|
|
44856
|
+
const builderStuff = this.builder.builderStuff;
|
|
44852
44857
|
this.util = util;
|
|
44853
|
-
const builderStuff = util.builderStuff();
|
|
44854
44858
|
let columnTool = builderStuff.querySelector('.is-column-tool');
|
|
44855
44859
|
let columnMore;
|
|
44856
44860
|
let htmlbutton = '';
|
|
@@ -46279,9 +46283,9 @@ const dom$k = new Dom();
|
|
|
46279
46283
|
class ELementStyleEditor {
|
|
46280
46284
|
constructor(builder) {
|
|
46281
46285
|
this.builder = builder;
|
|
46282
|
-
const util =
|
|
46286
|
+
const util = this.builder.util;
|
|
46287
|
+
const builderStuff = this.builder.builderStuff;
|
|
46283
46288
|
this.util = util;
|
|
46284
|
-
const builderStuff = util.builderStuff();
|
|
46285
46289
|
this.builderStuff = builderStuff;
|
|
46286
46290
|
let modalStyles = builderStuff.querySelector('.editstyles');
|
|
46287
46291
|
|
|
@@ -46399,9 +46403,9 @@ const dom$j = new Dom();
|
|
|
46399
46403
|
class ElementBoxStyles {
|
|
46400
46404
|
constructor(builder) {
|
|
46401
46405
|
this.builder = builder;
|
|
46402
|
-
const util =
|
|
46406
|
+
const util = this.builder.util;
|
|
46407
|
+
const builderStuff = this.builder.builderStuff;
|
|
46403
46408
|
this.util = util;
|
|
46404
|
-
const builderStuff = util.builderStuff();
|
|
46405
46409
|
this.builderStuff = builderStuff;
|
|
46406
46410
|
const elementStyleEditor = new ELementStyleEditor(builder);
|
|
46407
46411
|
let panelStuff = builderStuff.querySelector('#divElementBox');
|
|
@@ -46917,9 +46921,9 @@ const dom$i = new Dom();
|
|
|
46917
46921
|
class ElementSpacingStyles {
|
|
46918
46922
|
constructor(builder) {
|
|
46919
46923
|
this.builder = builder;
|
|
46920
|
-
const util =
|
|
46924
|
+
const util = this.builder.util;
|
|
46925
|
+
const builderStuff = this.builder.builderStuff;
|
|
46921
46926
|
this.util = util;
|
|
46922
|
-
const builderStuff = util.builderStuff();
|
|
46923
46927
|
this.builderStuff = builderStuff;
|
|
46924
46928
|
const elementStyleEditor = new ELementStyleEditor(builder);
|
|
46925
46929
|
let panelStuff = builderStuff.querySelector('#divElementSpacing');
|
|
@@ -47570,9 +47574,9 @@ const dom$h = new Dom();
|
|
|
47570
47574
|
class ElementBorderStyles {
|
|
47571
47575
|
constructor(builder) {
|
|
47572
47576
|
this.builder = builder;
|
|
47573
|
-
const util =
|
|
47577
|
+
const util = this.builder.util;
|
|
47578
|
+
const builderStuff = this.builder.builderStuff;
|
|
47574
47579
|
this.util = util;
|
|
47575
|
-
const builderStuff = util.builderStuff();
|
|
47576
47580
|
this.builderStuff = builderStuff;
|
|
47577
47581
|
const elementStyleEditor = new ELementStyleEditor(builder);
|
|
47578
47582
|
let panelStuff = builderStuff.querySelector('#divElementBorder');
|
|
@@ -48292,9 +48296,9 @@ const dom$g = new Dom();
|
|
|
48292
48296
|
class ElementTextStyles {
|
|
48293
48297
|
constructor(builder) {
|
|
48294
48298
|
this.builder = builder;
|
|
48295
|
-
const util =
|
|
48299
|
+
const util = this.builder.util;
|
|
48300
|
+
const builderStuff = this.builder.builderStuff;
|
|
48296
48301
|
this.util = util;
|
|
48297
|
-
const builderStuff = util.builderStuff();
|
|
48298
48302
|
this.builderStuff = builderStuff;
|
|
48299
48303
|
const elementStyleEditor = new ELementStyleEditor(builder);
|
|
48300
48304
|
let panelStuff = builderStuff.querySelector('#divElementText');
|
|
@@ -48813,9 +48817,9 @@ const dom$f = new Dom();
|
|
|
48813
48817
|
class ElementCornerStyles {
|
|
48814
48818
|
constructor(builder) {
|
|
48815
48819
|
this.builder = builder;
|
|
48816
|
-
const util =
|
|
48820
|
+
const util = this.builder.util;
|
|
48821
|
+
const builderStuff = this.builder.builderStuff;
|
|
48817
48822
|
this.util = util;
|
|
48818
|
-
const builderStuff = util.builderStuff();
|
|
48819
48823
|
this.builderStuff = builderStuff;
|
|
48820
48824
|
const elementStyleEditor = new ELementStyleEditor(builder);
|
|
48821
48825
|
let panelStuff = builderStuff.querySelector('#divElementCorner');
|
|
@@ -49008,9 +49012,9 @@ const dom$e = new Dom();
|
|
|
49008
49012
|
class ElementShadowStyles {
|
|
49009
49013
|
constructor(builder) {
|
|
49010
49014
|
this.builder = builder;
|
|
49011
|
-
const util =
|
|
49015
|
+
const util = this.builder.util;
|
|
49016
|
+
const builderStuff = this.builder.builderStuff;
|
|
49012
49017
|
this.util = util;
|
|
49013
|
-
const builderStuff = util.builderStuff();
|
|
49014
49018
|
this.builderStuff = builderStuff;
|
|
49015
49019
|
const elementStyleEditor = new ELementStyleEditor(builder);
|
|
49016
49020
|
let panelStuff = builderStuff.querySelector('#divElementShadow');
|
|
@@ -49271,9 +49275,9 @@ const dom$d = new Dom();
|
|
|
49271
49275
|
class ElementDisplayStyles {
|
|
49272
49276
|
constructor(builder) {
|
|
49273
49277
|
this.builder = builder;
|
|
49274
|
-
const util =
|
|
49278
|
+
const util = this.builder.util;
|
|
49279
|
+
const builderStuff = this.builder.builderStuff;
|
|
49275
49280
|
this.util = util;
|
|
49276
|
-
const builderStuff = util.builderStuff();
|
|
49277
49281
|
this.builderStuff = builderStuff;
|
|
49278
49282
|
const elementStyleEditor = new ELementStyleEditor(builder);
|
|
49279
49283
|
let panelStuff = builderStuff.querySelector('#divElementDisplay');
|
|
@@ -49462,9 +49466,9 @@ const dom$c = new Dom();
|
|
|
49462
49466
|
class ElementPositionStyles {
|
|
49463
49467
|
constructor(builder) {
|
|
49464
49468
|
this.builder = builder;
|
|
49465
|
-
const util =
|
|
49469
|
+
const util = this.builder.util;
|
|
49470
|
+
const builderStuff = this.builder.builderStuff;
|
|
49466
49471
|
this.util = util;
|
|
49467
|
-
const builderStuff = util.builderStuff();
|
|
49468
49472
|
this.builderStuff = builderStuff;
|
|
49469
49473
|
const elementStyleEditor = new ELementStyleEditor(builder);
|
|
49470
49474
|
let panelStuff = builderStuff.querySelector('#divElementPosition');
|
|
@@ -49801,9 +49805,9 @@ const dom$b = new Dom();
|
|
|
49801
49805
|
class ElementEffectStyles {
|
|
49802
49806
|
constructor(builder) {
|
|
49803
49807
|
this.builder = builder;
|
|
49804
|
-
const util =
|
|
49808
|
+
const util = this.builder.util;
|
|
49809
|
+
const builderStuff = this.builder.builderStuff;
|
|
49805
49810
|
this.util = util;
|
|
49806
|
-
const builderStuff = util.builderStuff();
|
|
49807
49811
|
this.builderStuff = builderStuff;
|
|
49808
49812
|
const elementStyleEditor = new ELementStyleEditor(builder);
|
|
49809
49813
|
let panelStuff = builderStuff.querySelector('#divElementEffect');
|
|
@@ -50356,9 +50360,9 @@ const dom$a = new Dom();
|
|
|
50356
50360
|
class ElementAttributeStyles {
|
|
50357
50361
|
constructor(builder) {
|
|
50358
50362
|
this.builder = builder;
|
|
50359
|
-
const util =
|
|
50363
|
+
const util = this.builder.util;
|
|
50364
|
+
const builderStuff = this.builder.builderStuff;
|
|
50360
50365
|
this.util = util;
|
|
50361
|
-
const builderStuff = util.builderStuff();
|
|
50362
50366
|
this.builderStuff = builderStuff;
|
|
50363
50367
|
let panelStuff = builderStuff.querySelector('#divElementAttribute');
|
|
50364
50368
|
this.panelStuff = panelStuff;
|
|
@@ -50500,9 +50504,9 @@ const dom$9 = new Dom();
|
|
|
50500
50504
|
class ElementAnimationStyles {
|
|
50501
50505
|
constructor(builder) {
|
|
50502
50506
|
this.builder = builder;
|
|
50503
|
-
const util =
|
|
50507
|
+
const util = this.builder.util;
|
|
50508
|
+
const builderStuff = this.builder.builderStuff;
|
|
50504
50509
|
this.util = util;
|
|
50505
|
-
const builderStuff = util.builderStuff();
|
|
50506
50510
|
this.builderStuff = builderStuff;
|
|
50507
50511
|
let panelStuff = builderStuff.querySelector('#divElementAnimation');
|
|
50508
50512
|
this.panelStuff = panelStuff;
|
|
@@ -50751,9 +50755,9 @@ let arrElms = [];
|
|
|
50751
50755
|
class ElementPanel {
|
|
50752
50756
|
constructor(builder) {
|
|
50753
50757
|
this.builder = builder;
|
|
50754
|
-
const util =
|
|
50758
|
+
const util = this.builder.util;
|
|
50759
|
+
const builderStuff = this.builder.builderStuff;
|
|
50755
50760
|
this.util = util;
|
|
50756
|
-
const builderStuff = util.builderStuff();
|
|
50757
50761
|
this.builderStuff = builderStuff;
|
|
50758
50762
|
let panel = builderStuff.querySelector('.elementstyles');
|
|
50759
50763
|
|
|
@@ -50980,13 +50984,14 @@ const dom$7 = new Dom();
|
|
|
50980
50984
|
class ElementTool {
|
|
50981
50985
|
constructor(builder) {
|
|
50982
50986
|
this.builder = builder;
|
|
50983
|
-
const util =
|
|
50987
|
+
const util = this.builder.util;
|
|
50988
|
+
const builderStuff = this.builder.builderStuff;
|
|
50984
50989
|
this.util = util;
|
|
50990
|
+
this.builderStuff = builderStuff;
|
|
50985
50991
|
const elementPanel = new ElementPanel(builder);
|
|
50986
50992
|
this.elementPanel = elementPanel;
|
|
50987
|
-
|
|
50988
|
-
let
|
|
50989
|
-
let elementMore = builderstuff.querySelector('.elmmore');
|
|
50993
|
+
let elementTool = builderStuff.querySelector('.is-element-tool');
|
|
50994
|
+
let elementMore = builderStuff.querySelector('.elmmore');
|
|
50990
50995
|
|
|
50991
50996
|
if (!elementTool) {
|
|
50992
50997
|
let html = `<div class="is-tool is-element-tool">
|
|
@@ -51006,9 +51011,9 @@ class ElementTool {
|
|
|
51006
51011
|
</div>
|
|
51007
51012
|
</div>
|
|
51008
51013
|
`;
|
|
51009
|
-
dom$7.appendHtml(
|
|
51010
|
-
elementTool =
|
|
51011
|
-
elementMore =
|
|
51014
|
+
dom$7.appendHtml(builderStuff, html);
|
|
51015
|
+
elementTool = builderStuff.querySelector('.is-element-tool');
|
|
51016
|
+
elementMore = builderStuff.querySelector('.elmmore'); // Prepare for tooltip
|
|
51012
51017
|
|
|
51013
51018
|
let elms = elementTool.querySelectorAll('[title]');
|
|
51014
51019
|
Array.prototype.forEach.call(elms, elm => {
|
|
@@ -51094,14 +51099,14 @@ class ElementTool {
|
|
|
51094
51099
|
|
|
51095
51100
|
if (cell.childElementCount === 0 && row.childElementCount === 3) {
|
|
51096
51101
|
row.parentNode.removeChild(row);
|
|
51097
|
-
let columnTool =
|
|
51102
|
+
let columnTool = builderStuff.querySelector('.is-column-tool'); // quick access
|
|
51098
51103
|
|
|
51099
51104
|
dom$7.removeClass(columnTool, 'active');
|
|
51100
51105
|
util.checkEmpty();
|
|
51101
51106
|
} else if (cell.childElementCount === 0) {
|
|
51102
51107
|
row.removeChild(cell);
|
|
51103
51108
|
util.fixLayout(row, builder);
|
|
51104
|
-
let columnTool =
|
|
51109
|
+
let columnTool = builderStuff.querySelector('.is-column-tool'); // // quick access
|
|
51105
51110
|
|
|
51106
51111
|
dom$7.removeClass(columnTool, 'active');
|
|
51107
51112
|
}
|
|
@@ -51507,8 +51512,8 @@ const dom$6 = new Dom();
|
|
|
51507
51512
|
class Preferences {
|
|
51508
51513
|
constructor(builder) {
|
|
51509
51514
|
this.builder = builder;
|
|
51510
|
-
const util =
|
|
51511
|
-
const
|
|
51515
|
+
const util = this.builder.util;
|
|
51516
|
+
const builderStuff = this.builder.builderStuff;
|
|
51512
51517
|
let htmlThemes = '';
|
|
51513
51518
|
|
|
51514
51519
|
if (this.builder.themes) {
|
|
@@ -51528,7 +51533,7 @@ class Preferences {
|
|
|
51528
51533
|
htmlThemes += '</div>';
|
|
51529
51534
|
}
|
|
51530
51535
|
|
|
51531
|
-
let config =
|
|
51536
|
+
let config = builderStuff.querySelector('.viewconfig');
|
|
51532
51537
|
|
|
51533
51538
|
if (!config) {
|
|
51534
51539
|
let html = `<div class="is-modal viewconfig">
|
|
@@ -51654,8 +51659,8 @@ class Preferences {
|
|
|
51654
51659
|
</div>
|
|
51655
51660
|
</div>
|
|
51656
51661
|
</div>`;
|
|
51657
|
-
dom$6.appendHtml(
|
|
51658
|
-
config =
|
|
51662
|
+
dom$6.appendHtml(builderStuff, html);
|
|
51663
|
+
config = builderStuff.querySelector('.viewconfig');
|
|
51659
51664
|
|
|
51660
51665
|
if (!(builder.opts.snippetList === '#divSnippetList' && builder.opts.snippetJSON.snippets.length > 0)) {
|
|
51661
51666
|
config.querySelector('.option-opensnippets').style.display = 'none';
|
|
@@ -51820,9 +51825,9 @@ class Preferences {
|
|
|
51820
51825
|
this.setColumnTool(true);
|
|
51821
51826
|
this.setBuilderMode('');
|
|
51822
51827
|
this.setEmailMode();
|
|
51823
|
-
|
|
51824
|
-
|
|
51825
|
-
|
|
51828
|
+
builderStuff.querySelector('#divHideCellTool').style.display = 'none';
|
|
51829
|
+
builderStuff.querySelector('#divOutlineMode').style.display = 'none';
|
|
51830
|
+
builderStuff.querySelector('#divBuilderMode').style.display = 'none';
|
|
51826
51831
|
}
|
|
51827
51832
|
}
|
|
51828
51833
|
|
|
@@ -52005,23 +52010,23 @@ class Preferences {
|
|
|
52005
52010
|
}
|
|
52006
52011
|
|
|
52007
52012
|
setToolbar(toolbar) {
|
|
52008
|
-
|
|
52013
|
+
const builderStuff = this.builder.builderStuff;
|
|
52009
52014
|
|
|
52010
52015
|
if (toolbar === 'top') {
|
|
52011
|
-
|
|
52012
|
-
|
|
52016
|
+
builderStuff.removeAttribute('toolbarleft', '');
|
|
52017
|
+
builderStuff.removeAttribute('toolbarright', '');
|
|
52013
52018
|
} else if (toolbar === 'left') {
|
|
52014
|
-
|
|
52015
|
-
|
|
52019
|
+
builderStuff.setAttribute('toolbarleft', '');
|
|
52020
|
+
builderStuff.removeAttribute('toolbarright', '');
|
|
52016
52021
|
} else if (toolbar === 'right') {
|
|
52017
|
-
|
|
52018
|
-
|
|
52022
|
+
builderStuff.setAttribute('toolbarright', '');
|
|
52023
|
+
builderStuff.removeAttribute('toolbarleft', '');
|
|
52019
52024
|
} // this.positionToolbar();
|
|
52020
52025
|
|
|
52021
52026
|
|
|
52022
|
-
const rteTool =
|
|
52023
|
-
const rteMoreOptions =
|
|
52024
|
-
const elementRteMoreOptions =
|
|
52027
|
+
const rteTool = builderStuff.querySelector('.is-rte-tool');
|
|
52028
|
+
const rteMoreOptions = builderStuff.querySelector('.rte-more-options');
|
|
52029
|
+
const elementRteMoreOptions = builderStuff.querySelector('.elementrte-more-options');
|
|
52025
52030
|
if (rteTool) this.builder.rte.positionToolbar();
|
|
52026
52031
|
|
|
52027
52032
|
if (rteMoreOptions) {
|
|
@@ -52033,14 +52038,14 @@ class Preferences {
|
|
|
52033
52038
|
}
|
|
52034
52039
|
|
|
52035
52040
|
setEmailMode() {
|
|
52036
|
-
|
|
52037
|
-
|
|
52041
|
+
const builderStuff = this.builder.builderStuff;
|
|
52042
|
+
builderStuff.setAttribute('emailmode', '');
|
|
52038
52043
|
}
|
|
52039
52044
|
/*
|
|
52040
52045
|
positionToolbar() { // direct
|
|
52041
|
-
let
|
|
52042
|
-
const rteTool =
|
|
52043
|
-
const rteMoreOptions =
|
|
52046
|
+
let builderStuff = document.querySelector('#_cbhtml');
|
|
52047
|
+
const rteTool = builderStuff.querySelector('.is-rte-tool');
|
|
52048
|
+
const rteMoreOptions = builderStuff.querySelector('.rte-more-options');
|
|
52044
52049
|
if(rteTool){ // check in case rte stuff hasn't rendered yet
|
|
52045
52050
|
const viewportWidth = window.innerWidth;
|
|
52046
52051
|
const viewportHeight = window.innerHeight;
|
|
@@ -52071,19 +52076,19 @@ class Preferences {
|
|
|
52071
52076
|
}
|
|
52072
52077
|
}
|
|
52073
52078
|
setToolbarDisplay(toolbardisplay) {
|
|
52074
|
-
let
|
|
52079
|
+
let builderStuff = document.querySelector('#_cbhtml');
|
|
52075
52080
|
if(toolbardisplay==='auto'){
|
|
52076
|
-
|
|
52081
|
+
builderStuff.removeAttribute('toolbarstay','');
|
|
52077
52082
|
// direct
|
|
52078
|
-
const rteTool =
|
|
52083
|
+
const rteTool = builderStuff.querySelector('.is-rte-tool');
|
|
52079
52084
|
if(rteTool) { // check in case rte stuff hasn't rendered yet
|
|
52080
52085
|
rteTool.style.display = '';
|
|
52081
52086
|
}
|
|
52082
52087
|
} else {
|
|
52083
|
-
|
|
52088
|
+
builderStuff.setAttribute('toolbarstay','');
|
|
52084
52089
|
// direct
|
|
52085
52090
|
const viewportWidth = window.innerWidth;
|
|
52086
|
-
const rteTool =
|
|
52091
|
+
const rteTool = builderStuff.querySelector('.is-rte-tool');
|
|
52087
52092
|
if(rteTool) { // check in case rte stuff hasn't rendered yet
|
|
52088
52093
|
let w = rteTool.offsetWidth;
|
|
52089
52094
|
let left = (viewportWidth/2) - (w/2);
|
|
@@ -52095,12 +52100,12 @@ class Preferences {
|
|
|
52095
52100
|
|
|
52096
52101
|
|
|
52097
52102
|
setElementTool(hideelementtool) {
|
|
52098
|
-
|
|
52103
|
+
const builderStuff = this.builder.builderStuff;
|
|
52099
52104
|
|
|
52100
52105
|
if (hideelementtool) {
|
|
52101
|
-
|
|
52106
|
+
builderStuff.setAttribute('hideelementtool', '');
|
|
52102
52107
|
} else {
|
|
52103
|
-
|
|
52108
|
+
builderStuff.removeAttribute('hideelementtool', '');
|
|
52104
52109
|
}
|
|
52105
52110
|
}
|
|
52106
52111
|
|
|
@@ -52127,12 +52132,12 @@ class Preferences {
|
|
|
52127
52132
|
}
|
|
52128
52133
|
|
|
52129
52134
|
setColumnTool(hidecolumntool) {
|
|
52130
|
-
|
|
52135
|
+
const builderStuff = this.builder.builderStuff;
|
|
52131
52136
|
|
|
52132
52137
|
if (hidecolumntool) {
|
|
52133
|
-
|
|
52138
|
+
builderStuff.setAttribute('hidecolumntool', '');
|
|
52134
52139
|
} else {
|
|
52135
|
-
|
|
52140
|
+
builderStuff.removeAttribute('hidecolumntool', '');
|
|
52136
52141
|
}
|
|
52137
52142
|
}
|
|
52138
52143
|
|
|
@@ -52148,15 +52153,15 @@ class Preferences {
|
|
|
52148
52153
|
}
|
|
52149
52154
|
|
|
52150
52155
|
setToolStyle(toolStyle) {
|
|
52151
|
-
|
|
52156
|
+
const builderStuff = this.builder.builderStuff;
|
|
52152
52157
|
const builders = document.querySelectorAll(this.builder.opts.container);
|
|
52153
52158
|
Array.prototype.forEach.call(builders, builder => {
|
|
52154
52159
|
if (toolStyle === 'gray') {
|
|
52155
52160
|
builder.setAttribute('gray', '');
|
|
52156
|
-
|
|
52161
|
+
builderStuff.setAttribute('gray', '');
|
|
52157
52162
|
} else {
|
|
52158
52163
|
builder.removeAttribute('gray');
|
|
52159
|
-
|
|
52164
|
+
builderStuff.removeAttribute('gray', '');
|
|
52160
52165
|
}
|
|
52161
52166
|
});
|
|
52162
52167
|
}
|
|
@@ -52195,24 +52200,24 @@ class Preferences {
|
|
|
52195
52200
|
}
|
|
52196
52201
|
|
|
52197
52202
|
setBuilderMode(builderMode) {
|
|
52198
|
-
|
|
52203
|
+
const builderStuff = this.builder.builderStuff;
|
|
52199
52204
|
const builders = document.querySelectorAll(this.builder.opts.container);
|
|
52200
52205
|
Array.prototype.forEach.call(builders, builder => {
|
|
52201
52206
|
if (builderMode === '') {
|
|
52202
52207
|
builder.removeAttribute('minimal');
|
|
52203
52208
|
builder.removeAttribute('clean');
|
|
52204
|
-
|
|
52205
|
-
|
|
52209
|
+
builderStuff.removeAttribute('minimal');
|
|
52210
|
+
builderStuff.removeAttribute('clean');
|
|
52206
52211
|
} else if (builderMode === 'minimal') {
|
|
52207
52212
|
builder.setAttribute('minimal', '');
|
|
52208
52213
|
builder.removeAttribute('clean');
|
|
52209
|
-
|
|
52210
|
-
|
|
52214
|
+
builderStuff.setAttribute('minimal', '');
|
|
52215
|
+
builderStuff.removeAttribute('clean');
|
|
52211
52216
|
} else if (builderMode === 'clean') {
|
|
52212
52217
|
builder.setAttribute('clean', '');
|
|
52213
52218
|
builder.removeAttribute('minimal');
|
|
52214
|
-
|
|
52215
|
-
|
|
52219
|
+
builderStuff.setAttribute('clean', '');
|
|
52220
|
+
builderStuff.removeAttribute('minimal');
|
|
52216
52221
|
}
|
|
52217
52222
|
});
|
|
52218
52223
|
}
|
|
@@ -52290,20 +52295,14 @@ class Preferences {
|
|
|
52290
52295
|
|
|
52291
52296
|
}
|
|
52292
52297
|
|
|
52293
|
-
/*
|
|
52294
|
-
LATER:
|
|
52295
|
-
- Get/show current font size, line height & letter spacing
|
|
52296
|
-
- Click toggle button shows gray highlight
|
|
52297
|
-
- Image di luar domain gak bisa di-edit (kasih warning)
|
|
52298
|
-
*/
|
|
52299
52298
|
const dom$5 = new Dom();
|
|
52300
52299
|
|
|
52301
52300
|
class Rte {
|
|
52302
52301
|
constructor(builder) {
|
|
52303
52302
|
this.builder = builder;
|
|
52304
|
-
const util =
|
|
52303
|
+
const util = this.builder.util;
|
|
52304
|
+
const builderStuff = this.builder.builderStuff;
|
|
52305
52305
|
this.util = util;
|
|
52306
|
-
const builderStuff = util.builderStuff();
|
|
52307
52306
|
this.builderStuff = builderStuff;
|
|
52308
52307
|
this.elementStyleEditor = new ELementStyleEditor(builder);
|
|
52309
52308
|
this.hyperlink = new Hyperlink(builder);
|
|
@@ -52508,18 +52507,18 @@ class Rte {
|
|
|
52508
52507
|
<button title="18px" data-value="18">18</button>
|
|
52509
52508
|
<button title="21px" data-value="21">21</button>
|
|
52510
52509
|
<button title="24px" data-value="24">24</button>
|
|
52511
|
-
|
|
52510
|
+
<!--<button title="28px" data-value="28">28</button>-->
|
|
52512
52511
|
<button title="32px" data-value="32">32</button>
|
|
52513
|
-
<!--<button title="
|
|
52514
|
-
<button title="38px" data-value="38">38</button>
|
|
52515
|
-
<!--<button title="42px" data-value="42">42</button>-->
|
|
52512
|
+
<!--<button title="38px" data-value="38">38</button>-->
|
|
52516
52513
|
<button title="48px" data-value="48">48</button>
|
|
52517
|
-
<!--<button title="
|
|
52518
|
-
<button title="60px" data-value="60">60</button>
|
|
52519
|
-
<!--<button title="68px" data-value="68">68</button>-->
|
|
52514
|
+
<!--<button title="60px" data-value="60">60</button>-->
|
|
52520
52515
|
<button title="76px" data-value="76">76</button>
|
|
52521
|
-
<!--<button title="84px" data-value="84">84</button>-->
|
|
52522
52516
|
<button title="96px" data-value="96">96</button>
|
|
52517
|
+
|
|
52518
|
+
<button title="120px" data-value="120">120</button>
|
|
52519
|
+
<button title="160px" data-value="160">160</button>
|
|
52520
|
+
<button title="200px" data-value="200">200</button>
|
|
52521
|
+
|
|
52523
52522
|
<button title="${util.out('Decrease')}" data-value="-" style="font-size:13px">-</button>
|
|
52524
52523
|
<button title="${util.out('Increase')}" data-value="+" style="font-size:13px">+</button>
|
|
52525
52524
|
<button title="${util.out('Clear')}" data-value=""><svg class="is-icon-flex" style="width:18px;height:18px;margin-top: 2px;"><use xlink:href="#ion-ios-close-empty"></use></svg></button>
|
|
@@ -54160,14 +54159,41 @@ class Rte {
|
|
|
54160
54159
|
} // var text = dom.getSelected();
|
|
54161
54160
|
|
|
54162
54161
|
|
|
54163
|
-
this.builder.uo.saveForUndo();
|
|
54164
|
-
|
|
54162
|
+
this.builder.uo.saveForUndo(); // let currentLineHeight = Number(window.getComputedStyle(elm).getPropertyValue('line-height').match(/\d+/)[0]);
|
|
54163
|
+
|
|
54164
|
+
let isInPx = false;
|
|
54165
|
+
let currentLineHeight = elm.style.lineHeight;
|
|
54166
|
+
|
|
54167
|
+
if (currentLineHeight) {
|
|
54168
|
+
if (currentLineHeight.indexOf('px') === -1) {
|
|
54169
|
+
currentLineHeight = parseFloat(currentLineHeight);
|
|
54170
|
+
} else {
|
|
54171
|
+
isInPx = true;
|
|
54172
|
+
}
|
|
54173
|
+
} else {
|
|
54174
|
+
isInPx = true;
|
|
54175
|
+
}
|
|
54176
|
+
|
|
54177
|
+
if (isInPx) {
|
|
54178
|
+
let fontSize = Number(window.getComputedStyle(elm).getPropertyValue('font-size').match(/\d+/)[0]);
|
|
54179
|
+
currentLineHeight = Number(window.getComputedStyle(elm).getPropertyValue('line-height').match(/\d+/)[0]);
|
|
54180
|
+
|
|
54181
|
+
if (fontSize > currentLineHeight) {
|
|
54182
|
+
currentLineHeight = fontSize / currentLineHeight;
|
|
54183
|
+
} else if (fontSize < currentLineHeight) {
|
|
54184
|
+
currentLineHeight = currentLineHeight / fontSize;
|
|
54185
|
+
} else {
|
|
54186
|
+
currentLineHeight = 1;
|
|
54187
|
+
}
|
|
54188
|
+
}
|
|
54189
|
+
|
|
54165
54190
|
let lineheight;
|
|
54166
54191
|
|
|
54167
54192
|
if (num === '+') {
|
|
54168
|
-
lineheight = currentLineHeight + 1
|
|
54193
|
+
lineheight = currentLineHeight + 0.1;
|
|
54169
54194
|
} else if (num === '-') {
|
|
54170
|
-
lineheight = currentLineHeight - 1
|
|
54195
|
+
lineheight = currentLineHeight - 0.1;
|
|
54196
|
+
if (lineheight < 0.2) lineheight = 0.2; // prevent very small number
|
|
54171
54197
|
} else if (num === '') {
|
|
54172
54198
|
lineheight = '';
|
|
54173
54199
|
} else {
|
|
@@ -56566,8 +56592,10 @@ const dom$3 = new Dom();
|
|
|
56566
56592
|
|
|
56567
56593
|
class Tooltip {
|
|
56568
56594
|
constructor(builder) {
|
|
56569
|
-
|
|
56570
|
-
const
|
|
56595
|
+
this.builder = builder;
|
|
56596
|
+
const util = this.builder.util;
|
|
56597
|
+
const builderStuff = this.builder.builderStuff;
|
|
56598
|
+
this.util = util;
|
|
56571
56599
|
this.builderStuff = builderStuff;
|
|
56572
56600
|
let tooltip = builderStuff.querySelector('.is-tooltip');
|
|
56573
56601
|
|
|
@@ -56692,17 +56720,18 @@ const dom$2 = new Dom();
|
|
|
56692
56720
|
class Lightbox {
|
|
56693
56721
|
constructor(builder) {
|
|
56694
56722
|
this.builder = builder;
|
|
56695
|
-
const util =
|
|
56696
|
-
|
|
56697
|
-
|
|
56698
|
-
|
|
56699
|
-
|
|
56700
|
-
|
|
56701
|
-
|
|
56702
|
-
|
|
56703
|
-
|
|
56723
|
+
const util = this.builder.util;
|
|
56724
|
+
const builderStuff = this.builder.builderStuff;
|
|
56725
|
+
this.util = util;
|
|
56726
|
+
this.builderStuff = builderStuff; // let builderStuff = document.querySelector('#_cbhtml'); // All editing controls will be placed within <div id="_cbhtml">...</div>
|
|
56727
|
+
// if(!builderStuff) {
|
|
56728
|
+
// builderStuff = dom.createElement('div');
|
|
56729
|
+
// builderStuff.id = '_cbhtml';
|
|
56730
|
+
// builderStuff.className = 'is-ui';
|
|
56731
|
+
// dom.appendChild(document.body, builderStuff);
|
|
56732
|
+
// }
|
|
56733
|
+
// this.builderStuff = builderStuff;
|
|
56704
56734
|
|
|
56705
|
-
this.builderStuff = builderStuff;
|
|
56706
56735
|
let html = `
|
|
56707
56736
|
<div class="is-lightbox lightbox-externalvideo">
|
|
56708
56737
|
<button class="cmd-lightbox-close" title="${util.out('Close')}" type="button" style="flex:none;position:absolute;top:0;right:0;background:none;z-index:1;">
|