@innovastudio/contentbox 1.4.26 → 1.4.27
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.
@@ -17178,7 +17178,7 @@ class Util {
|
|
17178
17178
|
let c = cell.nextElementSibling;
|
17179
17179
|
|
17180
17180
|
if (c) {
|
17181
|
-
if (!dom.hasClass(c, 'is-row-tool') && !dom.hasClass(c, 'is-rowadd-tool') && !dom.hasClass(c, 'is-row-overlay')) {
|
17181
|
+
if (!dom.hasClass(c, 'is-row-tool') && !dom.hasClass(c, 'is-col-tool') && !dom.hasClass(c, 'is-rowadd-tool') && !dom.hasClass(c, 'is-row-overlay')) {
|
17182
17182
|
return c;
|
17183
17183
|
} else {
|
17184
17184
|
return null;
|
@@ -17627,18 +17627,18 @@ class Util {
|
|
17627
17627
|
|
17628
17628
|
Array.from(row.children).map(item => {
|
17629
17629
|
if (item.classList.contains('is-row-tool')) return;
|
17630
|
+
if (item.classList.contains('is-col-tool')) return;
|
17630
17631
|
if (item.classList.contains('is-rowadd-tool')) return;
|
17631
17632
|
item.style.width = '';
|
17632
17633
|
item.style.flex = '';
|
17633
17634
|
});
|
17634
|
-
let num =
|
17635
|
+
let num = 3; //is-row-tool, is-col-tool & is-rowadd-tool
|
17635
17636
|
|
17636
17637
|
if (row.querySelector('.is-row-overlay')) {
|
17637
|
-
num =
|
17638
|
+
num = 4; //is-row-tool, is-col-tool, is-rowadd-tool & is-row-overlay
|
17638
17639
|
}
|
17639
17640
|
|
17640
|
-
const cellCount = row.childElementCount - num;
|
17641
|
-
|
17641
|
+
const cellCount = row.childElementCount - num;
|
17642
17642
|
const rowClass = this.builder.opts.row;
|
17643
17643
|
const colClass = this.builder.opts.cols;
|
17644
17644
|
const colEqual = this.builder.opts.colequal;
|
@@ -17646,7 +17646,7 @@ class Util {
|
|
17646
17646
|
if (colEqual.length > 0) {
|
17647
17647
|
const cols = dom.elementChildren(row);
|
17648
17648
|
cols.forEach(col => {
|
17649
|
-
if (dom.hasClass(col, 'is-row-tool') || dom.hasClass(col, 'is-rowadd-tool') || dom.hasClass(col, 'is-row-overlay')) return;
|
17649
|
+
if (dom.hasClass(col, 'is-row-tool') || dom.hasClass(col, 'is-col-tool') || dom.hasClass(col, 'is-rowadd-tool') || dom.hasClass(col, 'is-row-overlay')) return;
|
17650
17650
|
|
17651
17651
|
for (let i = 0; i <= colClass.length - 1; i++) {
|
17652
17652
|
dom.removeClass(col, colClass[i]);
|
@@ -17667,6 +17667,7 @@ class Util {
|
|
17667
17667
|
Array.from(row.children).map(item => {
|
17668
17668
|
if (item.classList.contains('is-row-tool')) return;
|
17669
17669
|
if (item.classList.contains('is-rowadd-tool')) return;
|
17670
|
+
if (item.classList.contains('is-col-tool')) return;
|
17670
17671
|
|
17671
17672
|
if (item.getAttribute('data-module')) {
|
17672
17673
|
this.refreshModuleLayout(item);
|
@@ -17680,7 +17681,7 @@ class Util {
|
|
17680
17681
|
let n = 0;
|
17681
17682
|
const cols = dom.elementChildren(row);
|
17682
17683
|
cols.forEach(col => {
|
17683
|
-
if (dom.hasClass(col, 'is-row-tool') || dom.hasClass(col, 'is-rowadd-tool') || dom.hasClass(col, 'is-row-overlay')) return;
|
17684
|
+
if (dom.hasClass(col, 'is-row-tool') || dom.hasClass(col, 'is-col-tool') || dom.hasClass(col, 'is-rowadd-tool') || dom.hasClass(col, 'is-row-overlay')) return;
|
17684
17685
|
n++;
|
17685
17686
|
|
17686
17687
|
for (var i = 0; i <= colClass.length - 1; i++) {
|
@@ -17732,6 +17733,7 @@ class Util {
|
|
17732
17733
|
Array.from(row.children).map(item => {
|
17733
17734
|
if (item.classList.contains('is-row-tool')) return;
|
17734
17735
|
if (item.classList.contains('is-rowadd-tool')) return;
|
17736
|
+
if (item.classList.contains('is-col-tool')) return;
|
17735
17737
|
|
17736
17738
|
if (item.getAttribute('data-module')) {
|
17737
17739
|
this.refreshModuleLayout(item);
|
@@ -17768,14 +17770,14 @@ class Util {
|
|
17768
17770
|
} //Limit up to 4 cells in a row
|
17769
17771
|
|
17770
17772
|
|
17771
|
-
let num =
|
17773
|
+
let num = 3; //is-row-tool, is-col-tool & is-rowadd-tool
|
17772
17774
|
|
17773
17775
|
if (row.querySelector('.is-row-overlay')) {
|
17774
|
-
num =
|
17776
|
+
num = 4; //is-row-tool, is-col-tool, is-rowadd-tool & is-row-overlay
|
17775
17777
|
}
|
17776
17778
|
|
17777
17779
|
if (row.childElementCount >= maxCols + num) {
|
17778
|
-
//+3 => includes is-row-tool, is-rowadd-tool & is-row-overlay
|
17780
|
+
//+3 => includes is-row-tool, is-col-tool, is-rowadd-tool & is-row-overlay
|
17779
17781
|
alert(this.out('You have reached the maximum number of columns'));
|
17780
17782
|
return false;
|
17781
17783
|
}
|
@@ -17939,7 +17941,6 @@ class Util {
|
|
17939
17941
|
let bAddLast = false;
|
17940
17942
|
let cell;
|
17941
17943
|
let cellElement;
|
17942
|
-
let columnTool;
|
17943
17944
|
const builderStuff = this.builder.builderStuff;
|
17944
17945
|
let quickadd = builderStuff.querySelector('.quickadd');
|
17945
17946
|
const mode = quickadd.getAttribute('data-mode');
|
@@ -18005,9 +18006,9 @@ class Util {
|
|
18005
18006
|
cellElement.click(); //change active block to the newly created
|
18006
18007
|
// Change to row selection
|
18007
18008
|
|
18008
|
-
rowElement.className = rowElement.className.replace('row-outline', '');
|
18009
|
-
|
18010
|
-
|
18009
|
+
rowElement.className = rowElement.className.replace('row-outline', ''); //Hide Column tool (new!)
|
18010
|
+
|
18011
|
+
this.builder.util.hideColumnTool();
|
18011
18012
|
} else if (bSnippet) {
|
18012
18013
|
if (noedit) {
|
18013
18014
|
this.addContent(html, mode, 'data-noedit');
|
@@ -18053,14 +18054,14 @@ class Util {
|
|
18053
18054
|
|
18054
18055
|
|
18055
18056
|
if (row.querySelector('.is-row-overlay')) {
|
18056
|
-
if (row.childElementCount >= maxCols +
|
18057
|
-
//+
|
18057
|
+
if (row.childElementCount >= maxCols + 4) {
|
18058
|
+
//+4 => includes is-row-tool, is-col-tool, is-rowadd-tool & is-row-overlay
|
18058
18059
|
alert(this.out('You have reached the maximum number of columns'));
|
18059
18060
|
return false;
|
18060
18061
|
}
|
18061
18062
|
} else {
|
18062
|
-
if (row.childElementCount >= maxCols +
|
18063
|
-
//+
|
18063
|
+
if (row.childElementCount >= maxCols + 3) {
|
18064
|
+
//+3 => includes is-row-tool, is-col-tool & is-rowadd-tool
|
18064
18065
|
alert(this.out('You have reached the maximum number of columns'));
|
18065
18066
|
return false;
|
18066
18067
|
}
|
@@ -18148,10 +18149,9 @@ class Util {
|
|
18148
18149
|
if (cellElement) cellElement.click(); //change active block to the newly created
|
18149
18150
|
// Change to row selection
|
18150
18151
|
|
18151
|
-
rowElement.className = rowElement.className.replace('row-outline', ''); //
|
18152
|
+
rowElement.className = rowElement.className.replace('row-outline', ''); //Hide Column tool (new!)
|
18152
18153
|
|
18153
|
-
|
18154
|
-
columnTool.className = columnTool.className.replace('active', '');
|
18154
|
+
this.builder.util.hideColumnTool();
|
18155
18155
|
}
|
18156
18156
|
|
18157
18157
|
if (this.builder.useCssClasses) {
|
@@ -18266,7 +18266,9 @@ class Util {
|
|
18266
18266
|
const builderStuff = this.builder.builderStuff;
|
18267
18267
|
let tools = builderStuff.querySelectorAll('.is-tool');
|
18268
18268
|
Array.prototype.forEach.call(tools, tool => {
|
18269
|
-
if
|
18269
|
+
// if(tool.classList.contains('is-row-tool')||
|
18270
|
+
// tool.classList.contains('is-column-tool')||
|
18271
|
+
// tool.classList.contains('is-element-tool')) return;
|
18270
18272
|
tool.style.display = '';
|
18271
18273
|
dom.removeClass(tool, 'active');
|
18272
18274
|
});
|
@@ -18838,27 +18840,59 @@ class Util {
|
|
18838
18840
|
} // Quick reposition column tool
|
18839
18841
|
|
18840
18842
|
|
18841
|
-
repositionColumnTool(
|
18842
|
-
let columnTool = this.builder.colTool.columnTool;
|
18843
|
-
if (!columnTool) return;
|
18843
|
+
repositionColumnTool() {
|
18844
18844
|
let col = this.builder.activeCol;
|
18845
18845
|
if (!col) return;
|
18846
|
+
let row = col.parentNode;
|
18846
18847
|
|
18847
|
-
if (
|
18848
|
-
|
18848
|
+
if (!col.parentNode) {
|
18849
|
+
// when column has just been deleted
|
18850
|
+
row = this.rowSelected();
|
18851
|
+
}
|
18852
|
+
|
18853
|
+
this.colTool = row.querySelector('.is-col-tool');
|
18854
|
+
|
18855
|
+
if (!col.parentNode) {
|
18856
|
+
// when column has just been deleted
|
18857
|
+
this.colTool.style.display = 'none';
|
18858
|
+
}
|
18859
|
+
|
18860
|
+
this.colTool.style.left = col.offsetLeft + 'px'; // if columnMore is opened
|
18861
|
+
|
18862
|
+
const columnMore = this.builder.builderStuff.querySelector('.columnmore.active');
|
18863
|
+
|
18864
|
+
if (columnMore) {
|
18865
|
+
const btnCellMore = this.colTool.querySelector('.cell-more');
|
18866
|
+
columnMore.classList.add('transition1');
|
18849
18867
|
setTimeout(() => {
|
18850
|
-
|
18851
|
-
|
18868
|
+
let top, left;
|
18869
|
+
|
18870
|
+
if (!this.builder.iframe) {
|
18871
|
+
top = btnCellMore.getBoundingClientRect().top + window.pageYOffset;
|
18872
|
+
left = btnCellMore.getBoundingClientRect().left + window.pageXOffset;
|
18873
|
+
} else {
|
18874
|
+
let adjY = this.builder.iframe.getBoundingClientRect().top + window.pageYOffset;
|
18875
|
+
let adjX = this.builder.iframe.getBoundingClientRect().left + window.pageXOffset;
|
18876
|
+
top = btnCellMore.getBoundingClientRect().top + adjY;
|
18877
|
+
left = btnCellMore.getBoundingClientRect().left + adjX;
|
18878
|
+
}
|
18879
|
+
|
18880
|
+
columnMore.style.top = top + 35 + 'px';
|
18881
|
+
columnMore.style.left = left - 7 + 'px';
|
18852
18882
|
setTimeout(() => {
|
18853
|
-
|
18854
|
-
},
|
18855
|
-
},
|
18856
|
-
} else {
|
18857
|
-
columnTool.style.top = col.getBoundingClientRect().top - 29 + this.builder.win.pageYOffset + 'px';
|
18858
|
-
columnTool.style.left = col.getBoundingClientRect().left - 1 + 'px';
|
18883
|
+
columnMore.classList.remove('transition1');
|
18884
|
+
}, 300);
|
18885
|
+
}, 30);
|
18859
18886
|
}
|
18860
18887
|
}
|
18861
18888
|
|
18889
|
+
hideColumnTool() {
|
18890
|
+
let tools = this.builder.doc.querySelectorAll('.is-col-tool');
|
18891
|
+
tools.forEach(tool => {
|
18892
|
+
tool.style.display = 'none';
|
18893
|
+
});
|
18894
|
+
}
|
18895
|
+
|
18862
18896
|
isTouchSupport() {
|
18863
18897
|
/*
|
18864
18898
|
if(('ontouchstart' in window) || (navigator.MaxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)) {
|
@@ -19475,7 +19509,6 @@ class Util {
|
|
19475
19509
|
<li role="option" tabindex="0" data-provider="google" data-font-family="Nunito, sans-serif" data-font-style="200,200i,600,600i,700,700i,800,800i,900,900i"><div></div><img src="${font_nunito}"></div>
|
19476
19510
|
<li role="option" tabindex="0" data-provider="google" data-font-family="Old Standard TT, serif" data-font-style="400,400i,700"><div></div><img src="${font_old_standard_tt}"></div>
|
19477
19511
|
<li role="option" tabindex="0" data-provider="google" data-font-family="Open Sans, sans-serif" data-font-style="300,400,600,800"><div></div><img src="${font_open_sans}"></div>
|
19478
|
-
<li role="option" tabindex="0" data-provider="google" data-font-family="Open Sans Condensed, sans-serif" data-font-style="300,300i,700"><div></div><img src="${font_open_sans_condensed}"></div>
|
19479
19512
|
<li role="option" tabindex="0" data-provider="google" data-font-family="Oranienbaum, serif"><div></div><img src="${font_oranienbaum}"></div>
|
19480
19513
|
<li role="option" tabindex="0" data-provider="google" data-font-family="Oswald, sans-serif" data-font-style="300,400,700"><div></div><img src="${font_oswald}"></div>
|
19481
19514
|
<li role="option" tabindex="0" data-provider="google" data-font-family="Oxygen, sans-serif" data-font-style="300,700"><div></div><img src="${font_oxygen}"></div>
|
@@ -19697,7 +19730,6 @@ class Util {
|
|
19697
19730
|
<li role="option" tabindex="0" data-provider="google" data-font-family="Nunito, sans-serif" data-font-style="200,200i,600,600i,700,700i,800,800i,900,900i"><div></div><img src="${path}nunito.png"></li>
|
19698
19731
|
<li role="option" tabindex="0" data-provider="google" data-font-family="Old Standard TT, serif" data-font-style="400,400i,700"><div></div><img src="${path}old_standard_tt.png"></li>
|
19699
19732
|
<li role="option" tabindex="0" data-provider="google" data-font-family="Open Sans, sans-serif" data-font-style="300,400,600,800"><div></div><img src="${path}open_sans.png"></li>
|
19700
|
-
<li role="option" tabindex="0" data-provider="google" data-font-family="Open Sans Condensed, sans-serif" data-font-style="300,300i,700"><div></div><img src="${path}open_sans_condensed.png"></li>
|
19701
19733
|
<li role="option" tabindex="0" data-provider="google" data-font-family="Oranienbaum, serif"><div></div><img src="${path}oranienbaum.png"></li>
|
19702
19734
|
<li role="option" tabindex="0" data-provider="google" data-font-family="Oswald, sans-serif" data-font-style="300,400,700"><div></div><img src="${path}oswald.png"></li>
|
19703
19735
|
<li role="option" tabindex="0" data-provider="google" data-font-family="Oxygen, sans-serif" data-font-style="300,700"><div></div><img src="${path}oxygen.png"></li>
|
@@ -27934,10 +27966,7 @@ class HtmlUtil {
|
|
27934
27966
|
|
27935
27967
|
this.builder.cleanHtmlFormatting = false; //Change to row selection
|
27936
27968
|
|
27937
|
-
dom$h.removeClass(row, 'row-outline');
|
27938
|
-
|
27939
|
-
let columnTool = builderStuff.querySelector('.is-column-tool');
|
27940
|
-
dom$h.removeClass(columnTool, 'active');
|
27969
|
+
dom$h.removeClass(row, 'row-outline');
|
27941
27970
|
}
|
27942
27971
|
|
27943
27972
|
if (mode === 'full') {
|
@@ -28286,6 +28315,8 @@ class HtmlUtil {
|
|
28286
28315
|
dom$h.removeAttributes(elms, 'gray');
|
28287
28316
|
elms = tmp.querySelectorAll('[rowoutline]');
|
28288
28317
|
dom$h.removeAttributes(elms, 'rowoutline');
|
28318
|
+
elms = tmp.querySelectorAll('[hidecolumntool]');
|
28319
|
+
dom$h.removeAttributes(elms, 'hidecolumntool');
|
28289
28320
|
elms = tmp.querySelectorAll('[grayoutline]');
|
28290
28321
|
dom$h.removeAttributes(elms, 'grayoutline');
|
28291
28322
|
elms = tmp.querySelectorAll('[hideoutline]');
|
@@ -28301,6 +28332,7 @@ class HtmlUtil {
|
|
28301
28332
|
elms = tmp.querySelectorAll('[gridoutline]');
|
28302
28333
|
dom$h.removeAttributes(elms, 'gridoutline');
|
28303
28334
|
dom$h.removeElements(tmp.querySelectorAll('.is-row-tool'));
|
28335
|
+
dom$h.removeElements(tmp.querySelectorAll('.is-col-tool'));
|
28304
28336
|
dom$h.removeElements(tmp.querySelectorAll('.is-rowadd-tool'));
|
28305
28337
|
dom$h.removeElements(tmp.querySelectorAll('.ovl'));
|
28306
28338
|
dom$h.removeElements(tmp.querySelectorAll('.row-add-initial')); //Extra cleaning
|
@@ -28532,6 +28564,7 @@ class UndoRedo {
|
|
28532
28564
|
dom.removeAttributes(elms, 'data-click');
|
28533
28565
|
dom.removeElements(tmp.querySelectorAll('.is-row-tool'));
|
28534
28566
|
dom.removeElements(tmp.querySelectorAll('.is-rowadd-tool'));
|
28567
|
+
dom.removeElements(tmp.querySelectorAll('.is-col-tool'));
|
28535
28568
|
dom.removeElements(tmp.querySelectorAll('.ovl'));
|
28536
28569
|
dom.removeElements(tmp.querySelectorAll('.row-add-initial')); //ContentBox
|
28537
28570
|
|
@@ -30506,12 +30539,10 @@ class Grid {
|
|
30506
30539
|
this.builderStuff = builderStuff;
|
30507
30540
|
const dom = this.builder.dom;
|
30508
30541
|
this.dom = dom;
|
30509
|
-
this.columnTool = new ColumnTool$1(builder);
|
30510
30542
|
this.rowTool = new RowTool$1(builder);
|
30511
30543
|
}
|
30512
30544
|
|
30513
30545
|
moveColumnPrevious() {
|
30514
|
-
let columnTool = this.columnTool;
|
30515
30546
|
let util = this.util;
|
30516
30547
|
const cell = util.cellSelected();
|
30517
30548
|
if (!cell) return;
|
@@ -30519,13 +30550,11 @@ class Grid {
|
|
30519
30550
|
if (cell.previousElementSibling) {
|
30520
30551
|
this.builder.uo.saveForUndo();
|
30521
30552
|
cell.parentElement.insertBefore(cell, cell.previousElementSibling);
|
30522
|
-
columnTool.position(cell);
|
30523
30553
|
this.builder.opts.onChange();
|
30524
30554
|
}
|
30525
30555
|
}
|
30526
30556
|
|
30527
30557
|
moveColumnNext() {
|
30528
|
-
let columnTool = this.columnTool;
|
30529
30558
|
let util = this.util;
|
30530
30559
|
const cell = util.cellSelected();
|
30531
30560
|
if (!cell) return;
|
@@ -30534,26 +30563,24 @@ class Grid {
|
|
30534
30563
|
if (cellnext) {
|
30535
30564
|
this.builder.uo.saveForUndo();
|
30536
30565
|
cell.parentElement.insertBefore(cellnext, cell);
|
30537
|
-
columnTool.position(cell);
|
30538
30566
|
this.builder.opts.onChange();
|
30539
30567
|
}
|
30540
30568
|
}
|
30541
30569
|
|
30542
30570
|
moveColumnUp() {
|
30543
30571
|
let builder = this.builder;
|
30544
|
-
let columnTool = this.columnTool;
|
30545
30572
|
let util = this.util;
|
30546
30573
|
const cell = util.cellSelected();
|
30547
30574
|
if (!cell) return;
|
30548
30575
|
let row = cell.parentNode;
|
30549
|
-
let num =
|
30576
|
+
let num = 3; //is-row-tool, is-col-tool & is-rowadd-tool
|
30550
30577
|
|
30551
30578
|
if (row.querySelector('.is-row-overlay')) {
|
30552
|
-
num =
|
30579
|
+
num = 4; //is-row-tool, is-col-tool, is-rowadd-tool & is-row-overlay
|
30553
30580
|
}
|
30554
30581
|
|
30555
30582
|
if (row.childElementCount - num === 1) {
|
30556
|
-
//-num => minus is-row-tool, is-rowadd-tool & is-row-overlay
|
30583
|
+
//-num => minus is-row-tool, is-col-tool, is-rowadd-tool & is-row-overlay
|
30557
30584
|
if (row.previousElementSibling) {
|
30558
30585
|
let maxCols = 4;
|
30559
30586
|
|
@@ -30566,7 +30593,6 @@ class Grid {
|
|
30566
30593
|
this.builder.uo.saveForUndo(); //Move row up
|
30567
30594
|
|
30568
30595
|
row.parentNode.insertBefore(row, row.previousElementSibling);
|
30569
|
-
columnTool.position(cell);
|
30570
30596
|
this.builder.opts.onChange();
|
30571
30597
|
return;
|
30572
30598
|
} else {
|
@@ -30576,7 +30602,10 @@ class Grid {
|
|
30576
30602
|
row.previousElementSibling.removeChild(tool); //remove next row tool
|
30577
30603
|
|
30578
30604
|
tool = row.previousElementSibling.querySelector('.is-rowadd-tool');
|
30579
|
-
row.previousElementSibling.removeChild(tool); //remove
|
30605
|
+
row.previousElementSibling.removeChild(tool); //remove
|
30606
|
+
|
30607
|
+
tool = row.previousElementSibling.querySelector('.is-col-tool');
|
30608
|
+
row.previousElementSibling.removeChild(tool); //remove
|
30580
30609
|
|
30581
30610
|
row.previousElementSibling.appendChild(cell); //add
|
30582
30611
|
|
@@ -30586,7 +30615,6 @@ class Grid {
|
|
30586
30615
|
let builderActive = this.builder.doc.querySelector('.builder-active');
|
30587
30616
|
builder.applyBehaviorOn(builderActive);
|
30588
30617
|
setTimeout(() => {
|
30589
|
-
columnTool.position(cell);
|
30590
30618
|
cell.click(); //refresh active cell/row
|
30591
30619
|
}, 30);
|
30592
30620
|
this.builder.opts.onChange();
|
@@ -30605,7 +30633,6 @@ class Grid {
|
|
30605
30633
|
let builderActive = this.builder.doc.querySelector('.builder-active');
|
30606
30634
|
builder.applyBehaviorOn(builderActive);
|
30607
30635
|
setTimeout(() => {
|
30608
|
-
columnTool.position(cell);
|
30609
30636
|
cell.click(); //refresh active cell/row
|
30610
30637
|
}, 30);
|
30611
30638
|
this.builder.opts.onChange();
|
@@ -30620,16 +30647,15 @@ class Grid {
|
|
30620
30647
|
|
30621
30648
|
moveColumnDown() {
|
30622
30649
|
let builder = this.builder;
|
30623
|
-
let columnTool = this.columnTool;
|
30624
30650
|
let util = this.util;
|
30625
30651
|
let dom = this.dom;
|
30626
30652
|
const cell = util.cellSelected();
|
30627
30653
|
if (!cell) return;
|
30628
30654
|
let row = cell.parentNode;
|
30629
|
-
let num =
|
30655
|
+
let num = 3; //is-row-tool, is-col-tool & is-rowadd-tool
|
30630
30656
|
|
30631
30657
|
if (row.querySelector('.is-row-overlay')) {
|
30632
|
-
num =
|
30658
|
+
num = 4; //is-row-tool, is-col-tool, is-rowadd-tool & is-row-overlay
|
30633
30659
|
}
|
30634
30660
|
|
30635
30661
|
if (row.childElementCount - num === 1) {
|
@@ -30646,7 +30672,6 @@ class Grid {
|
|
30646
30672
|
this.builder.uo.saveForUndo(); //Move row down
|
30647
30673
|
|
30648
30674
|
row.parentNode.insertBefore(row.nextElementSibling, row);
|
30649
|
-
columnTool.position(cell);
|
30650
30675
|
this.builder.opts.onChange();
|
30651
30676
|
return;
|
30652
30677
|
} else {
|
@@ -30656,7 +30681,10 @@ class Grid {
|
|
30656
30681
|
row.nextElementSibling.removeChild(tool); //remove next row tool
|
30657
30682
|
|
30658
30683
|
tool = row.nextElementSibling.querySelector('.is-rowadd-tool');
|
30659
|
-
row.nextElementSibling.removeChild(tool); //remove
|
30684
|
+
row.nextElementSibling.removeChild(tool); //remove
|
30685
|
+
|
30686
|
+
tool = row.nextElementSibling.querySelector('.is-col-tool');
|
30687
|
+
row.nextElementSibling.removeChild(tool); //remove
|
30660
30688
|
|
30661
30689
|
row.nextElementSibling.appendChild(cell); //add
|
30662
30690
|
|
@@ -30666,7 +30694,6 @@ class Grid {
|
|
30666
30694
|
let builderActive = this.builder.doc.querySelector('.builder-active');
|
30667
30695
|
builder.applyBehaviorOn(builderActive);
|
30668
30696
|
setTimeout(() => {
|
30669
|
-
columnTool.position(cell);
|
30670
30697
|
cell.click(); //refresh active cell/row
|
30671
30698
|
}, 30);
|
30672
30699
|
this.builder.opts.onChange();
|
@@ -30685,7 +30712,6 @@ class Grid {
|
|
30685
30712
|
let builderActive = this.builder.doc.querySelector('.builder-active');
|
30686
30713
|
builder.applyBehaviorOn(builderActive);
|
30687
30714
|
setTimeout(() => {
|
30688
|
-
columnTool.position(cell);
|
30689
30715
|
cell.click(); //refresh active cell/row
|
30690
30716
|
}, 30);
|
30691
30717
|
this.builder.opts.onChange();
|
@@ -30700,7 +30726,6 @@ class Grid {
|
|
30700
30726
|
|
30701
30727
|
duplicateColumn() {
|
30702
30728
|
let builder = this.builder;
|
30703
|
-
let columnTool = this.columnTool;
|
30704
30729
|
let util = this.util;
|
30705
30730
|
let dom = this.dom;
|
30706
30731
|
const cell = util.cellSelected();
|
@@ -30716,10 +30741,10 @@ class Grid {
|
|
30716
30741
|
}
|
30717
30742
|
|
30718
30743
|
let row = cell.parentNode;
|
30719
|
-
let num =
|
30744
|
+
let num = 3;
|
30720
30745
|
|
30721
30746
|
if (row.querySelector('.is-row-overlay')) {
|
30722
|
-
num =
|
30747
|
+
num = 4;
|
30723
30748
|
}
|
30724
30749
|
|
30725
30750
|
let maxCols = 4;
|
@@ -30729,7 +30754,6 @@ class Grid {
|
|
30729
30754
|
}
|
30730
30755
|
|
30731
30756
|
if (row.childElementCount >= maxCols + num) {
|
30732
|
-
//+2 => is-row-tool & is-rowadd-tool
|
30733
30757
|
alert(util.out('You have reached the maximum number of columns'));
|
30734
30758
|
return false;
|
30735
30759
|
}
|
@@ -30740,32 +30764,27 @@ class Grid {
|
|
30740
30764
|
let builderActive = this.builder.doc.querySelector('.builder-active');
|
30741
30765
|
builder.applyBehaviorOn(builderActive);
|
30742
30766
|
setTimeout(() => {
|
30743
|
-
columnTool.position(cell);
|
30744
30767
|
cell.click(); //refresh active cell/row
|
30745
30768
|
}, 30);
|
30746
30769
|
this.builder.opts.onChange();
|
30747
30770
|
}
|
30748
30771
|
|
30749
30772
|
removeColumn() {
|
30750
|
-
let columnTool = this.columnTool;
|
30751
30773
|
let util = this.util;
|
30752
30774
|
const cell = util.cellSelected();
|
30753
30775
|
if (!cell) return;
|
30754
30776
|
let row = cell.parentNode;
|
30755
|
-
let num =
|
30777
|
+
let num = 3;
|
30756
30778
|
|
30757
30779
|
if (row.querySelector('.is-row-overlay')) {
|
30758
|
-
num =
|
30780
|
+
num = 4;
|
30759
30781
|
}
|
30760
30782
|
|
30761
|
-
columnTool.hide(); //Hide Column tool
|
30762
|
-
|
30763
30783
|
util.confirm(util.out('Are you sure you want to delete this block?'), ok => {
|
30764
30784
|
if (ok) {
|
30765
30785
|
this.builder.uo.saveForUndo();
|
30766
30786
|
|
30767
30787
|
if (row.childElementCount - num === 1) {
|
30768
|
-
//-2 => minus is-row-tool & is-rowadd-tool
|
30769
30788
|
row.parentNode.removeChild(row);
|
30770
30789
|
util.checkEmpty();
|
30771
30790
|
} else {
|
@@ -30775,18 +30794,12 @@ class Grid {
|
|
30775
30794
|
|
30776
30795
|
util.clearActiveCell();
|
30777
30796
|
this.builder.opts.onChange();
|
30778
|
-
} else {
|
30779
|
-
setTimeout(() => {
|
30780
|
-
// columnTool.position(cell);
|
30781
|
-
columnTool.show();
|
30782
|
-
}, 30);
|
30783
30797
|
}
|
30784
30798
|
});
|
30785
30799
|
}
|
30786
30800
|
|
30787
30801
|
increaseColumn() {
|
30788
30802
|
let builder = this.builder;
|
30789
|
-
let columnTool = this.columnTool;
|
30790
30803
|
let util = this.util;
|
30791
30804
|
let dom = this.dom;
|
30792
30805
|
const cell = util.cellSelected();
|
@@ -30823,7 +30836,6 @@ class Grid {
|
|
30823
30836
|
dom.addClass(cell, group[j + 1][0]);
|
30824
30837
|
dom.addClass(cellnext, group[j + 1][1]);
|
30825
30838
|
dom.addClass(cellnext2, group[j + 1][2]);
|
30826
|
-
columnTool.position(cell);
|
30827
30839
|
this.builder.opts.onChange();
|
30828
30840
|
return;
|
30829
30841
|
}
|
@@ -30845,7 +30857,6 @@ class Grid {
|
|
30845
30857
|
dom.removeClass(cellnext, group[j][1]);
|
30846
30858
|
dom.addClass(cell, group[j + 1][0]);
|
30847
30859
|
dom.addClass(cellnext, group[j + 1][1]);
|
30848
|
-
columnTool.position(cell);
|
30849
30860
|
this.builder.opts.onChange();
|
30850
30861
|
return;
|
30851
30862
|
}
|
@@ -30854,7 +30865,6 @@ class Grid {
|
|
30854
30865
|
}
|
30855
30866
|
}
|
30856
30867
|
|
30857
|
-
columnTool.position(cell);
|
30858
30868
|
return;
|
30859
30869
|
} //others (12 columns grid)
|
30860
30870
|
|
@@ -30942,7 +30952,6 @@ class Grid {
|
|
30942
30952
|
dom.addClass(cellnext, colClass[10]);
|
30943
30953
|
}
|
30944
30954
|
|
30945
|
-
columnTool.position(cell);
|
30946
30955
|
this.builder.opts.onChange();
|
30947
30956
|
}
|
30948
30957
|
}
|
@@ -30950,7 +30959,6 @@ class Grid {
|
|
30950
30959
|
|
30951
30960
|
decreaseColumn() {
|
30952
30961
|
let builder = this.builder;
|
30953
|
-
let columnTool = this.columnTool;
|
30954
30962
|
let util = this.util;
|
30955
30963
|
let dom = this.dom;
|
30956
30964
|
const cell = util.cellSelected();
|
@@ -30987,7 +30995,6 @@ class Grid {
|
|
30987
30995
|
dom.addClass(cell, group[j - 1][0]);
|
30988
30996
|
dom.addClass(cellnext, group[j - 1][1]);
|
30989
30997
|
dom.addClass(cellnext2, group[j - 1][2]);
|
30990
|
-
columnTool.position(cell);
|
30991
30998
|
this.builder.opts.onChange();
|
30992
30999
|
return;
|
30993
31000
|
}
|
@@ -31009,7 +31016,6 @@ class Grid {
|
|
31009
31016
|
dom.removeClass(cellnext, group[j][1]);
|
31010
31017
|
dom.addClass(cell, group[j - 1][0]);
|
31011
31018
|
dom.addClass(cellnext, group[j - 1][1]);
|
31012
|
-
columnTool.position(cell);
|
31013
31019
|
this.builder.opts.onChange();
|
31014
31020
|
return;
|
31015
31021
|
}
|
@@ -31018,7 +31024,6 @@ class Grid {
|
|
31018
31024
|
}
|
31019
31025
|
}
|
31020
31026
|
|
31021
|
-
columnTool.position(cell);
|
31022
31027
|
return;
|
31023
31028
|
} //others (12 columns grid)
|
31024
31029
|
// const rowClass = builder.opts.row; //row
|
@@ -31108,7 +31113,6 @@ class Grid {
|
|
31108
31113
|
dom.addClass(cellnext, colClass[11]);
|
31109
31114
|
}
|
31110
31115
|
|
31111
|
-
columnTool.position(cell);
|
31112
31116
|
this.builder.opts.onChange();
|
31113
31117
|
}
|
31114
31118
|
}
|
@@ -31117,7 +31121,6 @@ class Grid {
|
|
31117
31121
|
|
31118
31122
|
removeRow() {
|
31119
31123
|
// let builder = this.builder;
|
31120
|
-
// let columnTool = this.columnTool;
|
31121
31124
|
let util = this.util;
|
31122
31125
|
let dom = this.dom; // const cell = util.cellSelected();
|
31123
31126
|
// if(!cell) return;
|
@@ -31135,8 +31138,6 @@ class Grid {
|
|
31135
31138
|
if (!row) return; //Change to row selection
|
31136
31139
|
|
31137
31140
|
dom.removeClass(row, 'row-outline');
|
31138
|
-
this.columnTool.hide(); //Hide Column tool
|
31139
|
-
|
31140
31141
|
util.confirm(util.out('Are you sure you want to delete this block?'), ok => {
|
31141
31142
|
// const cell = util.cellSelected();
|
31142
31143
|
// if(!cell) return;
|
@@ -31163,7 +31164,6 @@ class Grid {
|
|
31163
31164
|
|
31164
31165
|
moveRowUp() {
|
31165
31166
|
// let builder = this.builder;
|
31166
|
-
let columnTool = this.columnTool;
|
31167
31167
|
let util = this.util;
|
31168
31168
|
let dom = this.dom; // const cell = util.cellSelected();
|
31169
31169
|
// if(!cell) return;
|
@@ -31181,7 +31181,6 @@ class Grid {
|
|
31181
31181
|
if (!row) return; //Change to row selection
|
31182
31182
|
|
31183
31183
|
dom.removeClass(row, 'row-outline');
|
31184
|
-
columnTool.hide(); //Hide Column tool
|
31185
31184
|
|
31186
31185
|
if (row.previousElementSibling) {
|
31187
31186
|
this.builder.uo.saveForUndo();
|
@@ -31211,7 +31210,6 @@ class Grid {
|
|
31211
31210
|
|
31212
31211
|
moveRowDown() {
|
31213
31212
|
// let builder = this.builder;
|
31214
|
-
let columnTool = this.columnTool;
|
31215
31213
|
let util = this.util;
|
31216
31214
|
let dom = this.dom; // const cell = util.cellSelected();
|
31217
31215
|
// if(!cell) return;
|
@@ -31229,7 +31227,6 @@ class Grid {
|
|
31229
31227
|
if (!row) return; //Change to row selection
|
31230
31228
|
|
31231
31229
|
dom.removeClass(row, 'row-outline');
|
31232
|
-
columnTool.hide(); //Hide Column tool
|
31233
31230
|
|
31234
31231
|
if (row.nextElementSibling) {
|
31235
31232
|
this.builder.uo.saveForUndo();
|
@@ -31259,7 +31256,6 @@ class Grid {
|
|
31259
31256
|
|
31260
31257
|
duplicateRow() {
|
31261
31258
|
let builder = this.builder;
|
31262
|
-
let columnTool = this.columnTool;
|
31263
31259
|
let util = this.util;
|
31264
31260
|
let dom = this.dom; // const cell = util.cellSelected();
|
31265
31261
|
// if(!cell) return;
|
@@ -31277,12 +31273,11 @@ class Grid {
|
|
31277
31273
|
if (!row) return; //Change to row selection
|
31278
31274
|
|
31279
31275
|
dom.removeClass(row, 'row-outline');
|
31280
|
-
columnTool.hide(); //Hide Column tool
|
31281
|
-
|
31282
31276
|
this.builder.uo.saveForUndo(); //Clone row & cleanup attached tool & event
|
31283
31277
|
|
31284
31278
|
const rowElement = row.cloneNode(true);
|
31285
31279
|
rowElement.removeChild(rowElement.querySelector('.is-row-tool'));
|
31280
|
+
rowElement.removeChild(rowElement.querySelector('.is-col-tool'));
|
31286
31281
|
let cols = dom.elementChildren(rowElement);
|
31287
31282
|
cols.forEach(col => {
|
31288
31283
|
col.removeAttribute('data-click');
|
@@ -31304,22 +31299,6 @@ class Grid {
|
|
31304
31299
|
builder.applyBehaviorOn(builderActive);
|
31305
31300
|
this.rowTool.position(rowElement);
|
31306
31301
|
this.builder.opts.onChange();
|
31307
|
-
} // Utilities
|
31308
|
-
|
31309
|
-
|
31310
|
-
refreshColumnTool(cell) {
|
31311
|
-
let columnTool = this.columnTool;
|
31312
|
-
columnTool.position(cell);
|
31313
|
-
}
|
31314
|
-
|
31315
|
-
showColumnTool() {
|
31316
|
-
let columnTool = this.columnTool;
|
31317
|
-
columnTool.show();
|
31318
|
-
}
|
31319
|
-
|
31320
|
-
hideColumnTool() {
|
31321
|
-
let columnTool = this.columnTool;
|
31322
|
-
columnTool.hide();
|
31323
31302
|
}
|
31324
31303
|
|
31325
31304
|
}
|
@@ -31378,76 +31357,6 @@ class RowTool$1 {
|
|
31378
31357
|
|
31379
31358
|
}
|
31380
31359
|
|
31381
|
-
class ColumnTool$1 {
|
31382
|
-
constructor(builder) {
|
31383
|
-
this.builder = builder;
|
31384
|
-
const dom = this.builder.dom;
|
31385
|
-
this.dom = dom;
|
31386
|
-
}
|
31387
|
-
|
31388
|
-
position(col) {
|
31389
|
-
let dom = this.dom;
|
31390
|
-
const builderStuff = this.builder.builderStuff; // this.columnTool = builderStuff.querySelector('.is-column-tool');
|
31391
|
-
|
31392
|
-
if (!this.builder.iframe) {
|
31393
|
-
this.columnTool = builderStuff.querySelector('.is-column-tool');
|
31394
|
-
} else {
|
31395
|
-
this.columnTool = this.builder.contentStuff.querySelector('.is-column-tool');
|
31396
|
-
}
|
31397
|
-
|
31398
|
-
this.columnMore = builderStuff.querySelector('.columnmore');
|
31399
|
-
dom.addClass(this.columnMore, 'transition1');
|
31400
|
-
setTimeout(() => {
|
31401
|
-
this.columnTool.style.top = col.getBoundingClientRect().top - 29 + this.builder.win.pageYOffset + 'px';
|
31402
|
-
this.columnTool.style.left = col.getBoundingClientRect().left - 1 + 'px';
|
31403
|
-
let top, left;
|
31404
|
-
|
31405
|
-
if (!this.builder.iframe) {
|
31406
|
-
top = parseInt(this.columnTool.style.top);
|
31407
|
-
left = parseInt(this.columnTool.style.left);
|
31408
|
-
} else {
|
31409
|
-
let adjY = this.builder.iframe.getBoundingClientRect().top + window.pageYOffset;
|
31410
|
-
let adjX = this.builder.iframe.getBoundingClientRect().left + window.pageXOffset;
|
31411
|
-
top = parseInt(this.columnTool.style.top) - this.builder.win.pageYOffset + adjY;
|
31412
|
-
left = parseInt(this.columnTool.style.left) - this.builder.win.pageXOffset + adjX;
|
31413
|
-
}
|
31414
|
-
|
31415
|
-
this.columnMore.style.top = top + 35 + 'px';
|
31416
|
-
this.columnMore.style.left = left + 19 + 'px';
|
31417
|
-
setTimeout(() => {
|
31418
|
-
dom.removeClass(this.columnMore, 'transition1');
|
31419
|
-
}, 300);
|
31420
|
-
}, 30);
|
31421
|
-
}
|
31422
|
-
|
31423
|
-
hide() {
|
31424
|
-
let dom = this.dom;
|
31425
|
-
const builderStuff = this.builder.builderStuff;
|
31426
|
-
|
31427
|
-
if (!this.builder.iframe) {
|
31428
|
-
this.columnTool = builderStuff.querySelector('.is-column-tool');
|
31429
|
-
} else {
|
31430
|
-
this.columnTool = this.builder.contentStuff.querySelector('.is-column-tool');
|
31431
|
-
}
|
31432
|
-
|
31433
|
-
dom.removeClass(this.columnTool, 'active');
|
31434
|
-
}
|
31435
|
-
|
31436
|
-
show() {
|
31437
|
-
let dom = this.dom;
|
31438
|
-
const builderStuff = this.builder.builderStuff;
|
31439
|
-
|
31440
|
-
if (!this.builder.iframe) {
|
31441
|
-
this.columnTool = builderStuff.querySelector('.is-column-tool');
|
31442
|
-
} else {
|
31443
|
-
this.columnTool = this.builder.contentStuff.querySelector('.is-column-tool');
|
31444
|
-
}
|
31445
|
-
|
31446
|
-
dom.addClass(this.columnTool, 'active');
|
31447
|
-
}
|
31448
|
-
|
31449
|
-
}
|
31450
|
-
|
31451
31360
|
/*
|
31452
31361
|
Draggable
|
31453
31362
|
Insipred by: https://www.kirupa.com/html5/drag.htm
|
@@ -62683,18 +62592,7 @@ class Image$1 {
|
|
62683
62592
|
document.selection.empty();
|
62684
62593
|
} else {
|
62685
62594
|
window.getSelection().removeAllRanges();
|
62686
|
-
} // Hide column tool
|
62687
|
-
|
62688
|
-
|
62689
|
-
let columnTool;
|
62690
|
-
|
62691
|
-
if (!this.builder.iframe) {
|
62692
|
-
columnTool = builderStuff.querySelector('.is-column-tool');
|
62693
|
-
} else {
|
62694
|
-
columnTool = contentStuff.querySelector('.is-column-tool');
|
62695
62595
|
}
|
62696
|
-
|
62697
|
-
dom.removeClass(columnTool, 'active');
|
62698
62596
|
}).on('resizeEnd', ({
|
62699
62597
|
target
|
62700
62598
|
}) => {
|
@@ -62739,17 +62637,7 @@ class Image$1 {
|
|
62739
62637
|
target.setAttribute('data-resized', 0);
|
62740
62638
|
}, 300); //Trigger Change event
|
62741
62639
|
|
62742
|
-
this.builder.opts.onChange();
|
62743
|
-
|
62744
|
-
let columnTool;
|
62745
|
-
|
62746
|
-
if (!this.builder.iframe) {
|
62747
|
-
columnTool = builderStuff.querySelector('.is-column-tool');
|
62748
|
-
} else {
|
62749
|
-
columnTool = contentStuff.querySelector('.is-column-tool');
|
62750
|
-
}
|
62751
|
-
|
62752
|
-
dom.addClass(columnTool, 'active');
|
62640
|
+
this.builder.opts.onChange();
|
62753
62641
|
});
|
62754
62642
|
document.querySelector('.moveable-control-box').style.display = 'none';
|
62755
62643
|
imageResizer.addEventListener('click', () => {
|
@@ -66601,6 +66489,7 @@ class Code {
|
|
66601
66489
|
elms = tmpbuilder.querySelectorAll('[data-module-active]');
|
66602
66490
|
dom.removeAttributes(elms, 'data-module-active');
|
66603
66491
|
dom.removeElements(tmpbuilder.querySelectorAll('.is-row-tool'));
|
66492
|
+
dom.removeElements(tmpbuilder.querySelectorAll('.is-col-tool'));
|
66604
66493
|
dom.removeElements(tmpbuilder.querySelectorAll('.is-rowadd-tool'));
|
66605
66494
|
dom.removeElements(tmpbuilder.querySelectorAll('.ovl'));
|
66606
66495
|
dom.removeElements(tmpbuilder.querySelectorAll('.row-add-initial'));
|
@@ -68198,7 +68087,9 @@ class RowTool {
|
|
68198
68087
|
if (elm) dom.addEventListener(elm, 'click', () => {
|
68199
68088
|
this.grid.duplicateRow(); // this.rowMore.style.display = '';
|
68200
68089
|
|
68201
|
-
util.hidePop(rowMore);
|
68090
|
+
util.hidePop(rowMore); //Hide Column tool (new!)
|
68091
|
+
|
68092
|
+
util.hideColumnTool();
|
68202
68093
|
util.clearControls();
|
68203
68094
|
});
|
68204
68095
|
elm = rowMore.querySelector('.row-html');
|
@@ -68250,7 +68141,13 @@ class RowTool {
|
|
68250
68141
|
<button type="button" tabindex="-1" title="${util.out('More')}" class="row-more"><svg class="is-icon-flex"><use xlink:href="#ion-more"></use></svg></button>
|
68251
68142
|
<button type="button" tabindex="-1" title="${util.out('Grid Editor')}" class="row-grideditor"><svg class="is-icon-flex"><use xlink:href="#ion-grid"></use></svg></button>
|
68252
68143
|
<button type="button" tabindex="-1" title="${util.out('Delete')}" class="row-remove"><svg class="is-icon-flex"><use xlink:href="#ion-ios-close-empty"></use></svg></button>
|
68253
|
-
</div
|
68144
|
+
</div>
|
68145
|
+
<div class="is-tool is-col-tool">
|
68146
|
+
<button type="button" tabindex="-1" title="${util.out('Add')}" class="cell-add"><svg class="is-icon-flex"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>
|
68147
|
+
<button type="button" tabindex="-1" title="${util.out('More')}" class="cell-more"><svg class="is-icon-flex"><use xlink:href="#ion-more"></use></svg></button>
|
68148
|
+
<button type="button" tabindex="-1" title="${util.out('Delete')}" class="cell-remove"><svg class="is-icon-flex" style="margin-left:-1px"><use xlink:href="#ion-ios-close-empty"></use></svg></button>
|
68149
|
+
</div>
|
68150
|
+
`;
|
68254
68151
|
dom.appendHtml(row, html);
|
68255
68152
|
rowtool = row.querySelector('.is-row-tool'); // Prepare for tooltip
|
68256
68153
|
|
@@ -68264,6 +68161,109 @@ class RowTool {
|
|
68264
68161
|
this.builder.tooltip.set(elm, 5, 3, true);
|
68265
68162
|
}
|
68266
68163
|
});
|
68164
|
+
let coltool = row.querySelector('.is-col-tool'); // Prepare for tooltip
|
68165
|
+
|
68166
|
+
elms = coltool.querySelectorAll('[title]');
|
68167
|
+
Array.prototype.forEach.call(elms, elm => {
|
68168
|
+
elm.setAttribute('data-title', elm.getAttribute('title'));
|
68169
|
+
|
68170
|
+
if (!this.builder.iframe) {
|
68171
|
+
this.builder.tooltip.set(elm, 5, 3);
|
68172
|
+
} else {
|
68173
|
+
this.builder.tooltip.set(elm, 5, 3, true);
|
68174
|
+
}
|
68175
|
+
}); // Check for backward compatibility
|
68176
|
+
|
68177
|
+
let marginLeft = window.getComputedStyle(coltool, null).getPropertyValue('margin-left');
|
68178
|
+
|
68179
|
+
if (parseInt(marginLeft) === 0) {
|
68180
|
+
this.builder.backwardCompatible();
|
68181
|
+
}
|
68182
|
+
|
68183
|
+
const btnCellAdd = coltool.querySelector('.cell-add');
|
68184
|
+
if (btnCellAdd) dom.addEventListener(btnCellAdd, 'click', () => {
|
68185
|
+
let cell = util.cellSelected();
|
68186
|
+
if (!cell) return;
|
68187
|
+
let quickadd = this.builder.builderStuff.querySelector('.is-pop.quickadd');
|
68188
|
+
let tabs = quickadd.querySelector('.is-pop-tabs');
|
68189
|
+
tabs.style.display = 'flex';
|
68190
|
+
let top, left;
|
68191
|
+
|
68192
|
+
if (!this.builder.iframe) {
|
68193
|
+
top = btnCellAdd.getBoundingClientRect().top + window.pageYOffset;
|
68194
|
+
left = btnCellAdd.getBoundingClientRect().left + window.pageXOffset;
|
68195
|
+
} else {
|
68196
|
+
let adjY = this.builder.iframe.getBoundingClientRect().top + window.pageYOffset;
|
68197
|
+
let adjX = this.builder.iframe.getBoundingClientRect().left + window.pageXOffset;
|
68198
|
+
top = btnCellAdd.getBoundingClientRect().top + adjY + 10;
|
68199
|
+
left = btnCellAdd.getBoundingClientRect().left + adjX + 5;
|
68200
|
+
} // quickadd.style.display = 'flex';
|
68201
|
+
|
68202
|
+
|
68203
|
+
util.showPop(quickadd, false, btnCellAdd); //const w = quickadd.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
|
68204
|
+
//const h = quickadd.offsetHeight;
|
68205
|
+
|
68206
|
+
quickadd.style.top = top + 35 + 'px';
|
68207
|
+
quickadd.style.left = left + 'px';
|
68208
|
+
dom.removeClass(quickadd, 'arrow-bottom');
|
68209
|
+
dom.removeClass(quickadd, 'arrow-left');
|
68210
|
+
dom.removeClass(quickadd, 'arrow-right');
|
68211
|
+
dom.removeClass(quickadd, 'center');
|
68212
|
+
dom.removeClass(quickadd, 'right');
|
68213
|
+
dom.addClass(quickadd, 'arrow-top');
|
68214
|
+
dom.addClass(quickadd, 'left');
|
68215
|
+
let val = quickadd.querySelector('.active').getAttribute('data-value');
|
68216
|
+
|
68217
|
+
if (val === 'left') {
|
68218
|
+
quickadd.setAttribute('data-mode', 'cell-left');
|
68219
|
+
} else {
|
68220
|
+
quickadd.setAttribute('data-mode', 'cell-right');
|
68221
|
+
}
|
68222
|
+
});
|
68223
|
+
const btnCellMore = coltool.querySelector('.cell-more');
|
68224
|
+
if (btnCellMore) dom.addEventListener(btnCellMore, 'click', () => {
|
68225
|
+
let cell = util.cellSelected();
|
68226
|
+
if (!cell) return;
|
68227
|
+
let top, left;
|
68228
|
+
|
68229
|
+
if (!this.builder.iframe) {
|
68230
|
+
top = btnCellMore.getBoundingClientRect().top + window.pageYOffset;
|
68231
|
+
left = btnCellMore.getBoundingClientRect().left + window.pageXOffset;
|
68232
|
+
} else {
|
68233
|
+
let adjY = this.builder.iframe.getBoundingClientRect().top + window.pageYOffset;
|
68234
|
+
let adjX = this.builder.iframe.getBoundingClientRect().left + window.pageXOffset;
|
68235
|
+
top = btnCellMore.getBoundingClientRect().top + adjY;
|
68236
|
+
left = btnCellMore.getBoundingClientRect().left + adjX;
|
68237
|
+
}
|
68238
|
+
|
68239
|
+
const columnMore = builderStuff.querySelector('.columnmore'); // columnMore.style.display = 'flex';
|
68240
|
+
|
68241
|
+
util.showPop(columnMore, false, btnCellMore); //const w = columnMore.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
|
68242
|
+
//const h = columnMore.offsetHeight;
|
68243
|
+
|
68244
|
+
columnMore.style.top = top + 35 + 'px';
|
68245
|
+
columnMore.style.left = left - 7 + 'px';
|
68246
|
+
dom.removeClass(columnMore, 'arrow-bottom');
|
68247
|
+
dom.removeClass(columnMore, 'arrow-left');
|
68248
|
+
dom.removeClass(columnMore, 'arrow-right');
|
68249
|
+
dom.removeClass(columnMore, 'center');
|
68250
|
+
dom.removeClass(columnMore, 'right');
|
68251
|
+
dom.addClass(columnMore, 'arrow-top');
|
68252
|
+
dom.addClass(columnMore, 'left');
|
68253
|
+
const btnCellLocking = columnMore.querySelector('.cell-locking');
|
68254
|
+
|
68255
|
+
if (cell.hasAttribute('data-noedit')) {
|
68256
|
+
dom.addClass(btnCellLocking, 'on'); // btnCellLocking.innerHTML = '<svg class="is-icon-flex"><use xlink:href="#icon-lock"></use></svg>';
|
68257
|
+
} else {
|
68258
|
+
dom.removeClass(btnCellLocking, 'on'); // btnCellLocking.innerHTML = '<svg class="is-icon-flex"><use xlink:href="#icon-lock-off"></use></svg>';
|
68259
|
+
}
|
68260
|
+
});
|
68261
|
+
const btnCellRemove = coltool.querySelector('.cell-remove');
|
68262
|
+
if (btnCellRemove) dom.addEventListener(btnCellRemove, 'click', () => {
|
68263
|
+
const grid = new Grid(this.builder);
|
68264
|
+
grid.removeColumn();
|
68265
|
+
util.clearControls();
|
68266
|
+
});
|
68267
68267
|
let btnGridEditor = rowtool.querySelector('.row-grideditor');
|
68268
68268
|
if (btnGridEditor) dom.addEventListener(btnGridEditor, 'click', () => {
|
68269
68269
|
const grideditor = builderStuff.querySelector('.grideditor');
|
@@ -68324,10 +68324,9 @@ class RowTool {
|
|
68324
68324
|
|
68325
68325
|
if (!row) return; //Change to row selection
|
68326
68326
|
|
68327
|
-
dom.removeClass(row, 'row-outline'); //Hide Column tool
|
68327
|
+
dom.removeClass(row, 'row-outline'); //Hide Column tool (new!)
|
68328
68328
|
|
68329
|
-
|
68330
|
-
dom.removeClass(columnTool, 'active'); // const top = btnMore.getBoundingClientRect().top + window.pageYOffset;
|
68329
|
+
util.hideColumnTool(); // const top = btnMore.getBoundingClientRect().top + window.pageYOffset;
|
68331
68330
|
// const left = btnMore.getBoundingClientRect().left + window.pageXOffset;
|
68332
68331
|
|
68333
68332
|
let top, left;
|
@@ -70261,8 +70260,7 @@ class ColumnTool {
|
|
70261
70260
|
this.util = util;
|
70262
70261
|
const dom = this.builder.dom;
|
70263
70262
|
this.dom = dom;
|
70264
|
-
let
|
70265
|
-
let columnMore;
|
70263
|
+
let columnMore = builderStuff.querySelector('.is-pop.columnmore');
|
70266
70264
|
let resizebutton = `
|
70267
70265
|
<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>
|
70268
70266
|
<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>
|
@@ -70273,8 +70271,10 @@ class ColumnTool {
|
|
70273
70271
|
<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')}
|
70274
70272
|
</button>`;
|
70275
70273
|
|
70276
|
-
if (!
|
70277
|
-
|
70274
|
+
if (!columnMore) {
|
70275
|
+
// .is-column-tool here is not used anymore and is replaced with the one in rowtool.js
|
70276
|
+
let html = `
|
70277
|
+
<div class="is-tool is-column-tool">
|
70278
70278
|
<button type="button" tabindex="-1" title="${util.out('Add')}" class="cell-add"><svg class="is-icon-flex"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>
|
70279
70279
|
<button type="button" tabindex="-1" title="${util.out('More')}" class="cell-more"><svg class="is-icon-flex"><use xlink:href="#ion-more"></use></svg></button>
|
70280
70280
|
<button type="button" tabindex="-1" title="${util.out('Delete')}" class="cell-remove"><svg class="is-icon-flex" style="margin-left:-1px"><use xlink:href="#ion-ios-close-empty"></use></svg></button>
|
@@ -70592,10 +70592,8 @@ class ColumnTool {
|
|
70592
70592
|
dom.appendHtml(builderStuff, html);
|
70593
70593
|
|
70594
70594
|
if (!this.builder.iframe) {
|
70595
|
-
columnTool = builderStuff.querySelector('.is-column-tool');
|
70596
70595
|
this.lockIndicator = builderStuff.querySelector('.is-locked-indicator');
|
70597
70596
|
} else {
|
70598
|
-
columnTool = this.builder.contentStuff.querySelector('.is-column-tool');
|
70599
70597
|
this.lockIndicator = this.builder.contentStuff.querySelector('.is-locked-indicator');
|
70600
70598
|
}
|
70601
70599
|
|
@@ -70603,100 +70601,8 @@ class ColumnTool {
|
|
70603
70601
|
this.cellSettings = builderStuff.querySelector('.is-modal.columnsettings');
|
70604
70602
|
this.divCellClick = builderStuff.querySelector('#divCellClick');
|
70605
70603
|
this.divCellGeneral = builderStuff.querySelector('#divCellGeneral');
|
70606
|
-
|
70607
|
-
|
70608
|
-
let elms = columnTool.querySelectorAll('[title]');
|
70609
|
-
Array.prototype.forEach.call(elms, elm => {
|
70610
|
-
elm.setAttribute('data-title', elm.getAttribute('title'));
|
70611
|
-
}); // elms = columnMore.querySelectorAll('[title]');
|
70612
|
-
// Array.prototype.forEach.call(elms, (elm) => {
|
70613
|
-
// elm.setAttribute('data-title',elm.getAttribute('title'));
|
70614
|
-
// });
|
70615
|
-
// Add column
|
70616
|
-
|
70617
|
-
let btnCellAdd = columnTool.querySelector('.cell-add');
|
70618
|
-
dom.addEventListener(btnCellAdd, 'click', () => {
|
70619
|
-
let cell = util.cellSelected();
|
70620
|
-
if (!cell) return;
|
70621
|
-
let tabs = quickadd.querySelector('.is-pop-tabs');
|
70622
|
-
tabs.style.display = 'flex';
|
70623
|
-
let top, left;
|
70624
|
-
|
70625
|
-
if (!this.builder.iframe) {
|
70626
|
-
top = btnCellAdd.getBoundingClientRect().top + window.pageYOffset;
|
70627
|
-
left = btnCellAdd.getBoundingClientRect().left + window.pageXOffset;
|
70628
|
-
} else {
|
70629
|
-
let adjY = this.builder.iframe.getBoundingClientRect().top + window.pageYOffset;
|
70630
|
-
let adjX = this.builder.iframe.getBoundingClientRect().left + window.pageXOffset;
|
70631
|
-
top = btnCellAdd.getBoundingClientRect().top + adjY + 10;
|
70632
|
-
left = btnCellAdd.getBoundingClientRect().left + adjX + 5;
|
70633
|
-
} // quickadd.style.display = 'flex';
|
70634
|
-
|
70635
|
-
|
70636
|
-
util.showPop(quickadd, false, btnCellAdd); //const w = quickadd.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
|
70637
|
-
//const h = quickadd.offsetHeight;
|
70638
|
-
|
70639
|
-
quickadd.style.top = top + 35 + 'px';
|
70640
|
-
quickadd.style.left = left + 'px';
|
70641
|
-
dom.removeClass(quickadd, 'arrow-bottom');
|
70642
|
-
dom.removeClass(quickadd, 'arrow-left');
|
70643
|
-
dom.removeClass(quickadd, 'arrow-right');
|
70644
|
-
dom.removeClass(quickadd, 'center');
|
70645
|
-
dom.removeClass(quickadd, 'right');
|
70646
|
-
dom.addClass(quickadd, 'arrow-top');
|
70647
|
-
dom.addClass(quickadd, 'left');
|
70648
|
-
let val = quickadd.querySelector('.active').getAttribute('data-value');
|
70649
|
-
|
70650
|
-
if (val === 'left') {
|
70651
|
-
quickadd.setAttribute('data-mode', 'cell-left');
|
70652
|
-
} else {
|
70653
|
-
quickadd.setAttribute('data-mode', 'cell-right');
|
70654
|
-
}
|
70655
|
-
}); // More
|
70656
|
-
|
70657
|
-
const btnCellMore = columnTool.querySelector('.cell-more');
|
70658
|
-
dom.addEventListener(btnCellMore, 'click', () => {
|
70659
|
-
let cell = util.cellSelected();
|
70660
|
-
if (!cell) return;
|
70661
|
-
let top, left;
|
70662
|
-
|
70663
|
-
if (!this.builder.iframe) {
|
70664
|
-
top = btnCellMore.getBoundingClientRect().top + window.pageYOffset;
|
70665
|
-
left = btnCellMore.getBoundingClientRect().left + window.pageXOffset;
|
70666
|
-
} else {
|
70667
|
-
let adjY = this.builder.iframe.getBoundingClientRect().top + window.pageYOffset;
|
70668
|
-
let adjX = this.builder.iframe.getBoundingClientRect().left + window.pageXOffset;
|
70669
|
-
top = btnCellMore.getBoundingClientRect().top + adjY;
|
70670
|
-
left = btnCellMore.getBoundingClientRect().left + adjX;
|
70671
|
-
} // columnMore.style.display = 'flex';
|
70672
|
-
|
70673
|
-
|
70674
|
-
util.showPop(columnMore, false, btnCellMore); //const w = columnMore.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
|
70675
|
-
//const h = columnMore.offsetHeight;
|
70676
|
-
|
70677
|
-
columnMore.style.top = top + 35 + 'px';
|
70678
|
-
columnMore.style.left = left - 7 + 'px';
|
70679
|
-
dom.removeClass(columnMore, 'arrow-bottom');
|
70680
|
-
dom.removeClass(columnMore, 'arrow-left');
|
70681
|
-
dom.removeClass(columnMore, 'arrow-right');
|
70682
|
-
dom.removeClass(columnMore, 'center');
|
70683
|
-
dom.removeClass(columnMore, 'right');
|
70684
|
-
dom.addClass(columnMore, 'arrow-top');
|
70685
|
-
dom.addClass(columnMore, 'left');
|
70686
|
-
const btnCellLocking = this.columnMore.querySelector('.cell-locking');
|
70687
|
-
|
70688
|
-
if (cell.hasAttribute('data-noedit')) {
|
70689
|
-
dom.addClass(btnCellLocking, 'on'); // btnCellLocking.innerHTML = '<svg class="is-icon-flex"><use xlink:href="#icon-lock"></use></svg>';
|
70690
|
-
} else {
|
70691
|
-
dom.removeClass(btnCellLocking, 'on'); // btnCellLocking.innerHTML = '<svg class="is-icon-flex"><use xlink:href="#icon-lock-off"></use></svg>';
|
70692
|
-
}
|
70693
|
-
}); // Delete column
|
70694
|
-
|
70695
|
-
let elm = columnTool.querySelector('.cell-remove');
|
70696
|
-
dom.addEventListener(elm, 'click', () => {
|
70697
|
-
this.grid.removeColumn();
|
70698
|
-
util.clearControls();
|
70699
|
-
}); // Move Previous
|
70604
|
+
renderQuickAdd(builder);
|
70605
|
+
let elms, elm; // Move Previous
|
70700
70606
|
|
70701
70607
|
elm = columnMore.querySelector('.cell-prev');
|
70702
70608
|
dom.addEventListener(elm, 'click', () => {
|
@@ -70730,6 +70636,7 @@ class ColumnTool {
|
|
70730
70636
|
Array.from(row.children).map(item => {
|
70731
70637
|
if (item.classList.contains('is-row-tool')) return;
|
70732
70638
|
if (item.classList.contains('is-rowadd-tool')) return;
|
70639
|
+
if (item.classList.contains('is-col-tool')) return;
|
70733
70640
|
if (item.style.width) needed = true;
|
70734
70641
|
});
|
70735
70642
|
|
@@ -70737,6 +70644,7 @@ class ColumnTool {
|
|
70737
70644
|
Array.from(row.children).map(item => {
|
70738
70645
|
if (item.classList.contains('is-row-tool')) return;
|
70739
70646
|
if (item.classList.contains('is-rowadd-tool')) return;
|
70647
|
+
if (item.classList.contains('is-col-tool')) return;
|
70740
70648
|
item.style.width = '';
|
70741
70649
|
item.style.flex = '';
|
70742
70650
|
item.style.height = '';
|
@@ -70750,6 +70658,7 @@ class ColumnTool {
|
|
70750
70658
|
Array.from(cell.parentNode.children).map(item => {
|
70751
70659
|
if (item.classList.contains('is-row-tool')) return;
|
70752
70660
|
if (item.classList.contains('is-rowadd-tool')) return;
|
70661
|
+
if (item.classList.contains('is-col-tool')) return;
|
70753
70662
|
|
70754
70663
|
if (item.getAttribute('data-module')) {
|
70755
70664
|
util.refreshModuleLayout(item);
|
@@ -70767,6 +70676,7 @@ class ColumnTool {
|
|
70767
70676
|
Array.from(row.children).map(item => {
|
70768
70677
|
if (item.classList.contains('is-row-tool')) return;
|
70769
70678
|
if (item.classList.contains('is-rowadd-tool')) return;
|
70679
|
+
if (item.classList.contains('is-col-tool')) return;
|
70770
70680
|
if (item.style.width) needed = true;
|
70771
70681
|
});
|
70772
70682
|
|
@@ -70774,6 +70684,7 @@ class ColumnTool {
|
|
70774
70684
|
Array.from(row.children).map(item => {
|
70775
70685
|
if (item.classList.contains('is-row-tool')) return;
|
70776
70686
|
if (item.classList.contains('is-rowadd-tool')) return;
|
70687
|
+
if (item.classList.contains('is-col-tool')) return;
|
70777
70688
|
item.style.width = '';
|
70778
70689
|
item.style.flex = '';
|
70779
70690
|
item.style.height = '';
|
@@ -70787,6 +70698,7 @@ class ColumnTool {
|
|
70787
70698
|
Array.from(cell.parentNode.children).map(item => {
|
70788
70699
|
if (item.classList.contains('is-row-tool')) return;
|
70789
70700
|
if (item.classList.contains('is-rowadd-tool')) return;
|
70701
|
+
if (item.classList.contains('is-col-tool')) return;
|
70790
70702
|
|
70791
70703
|
if (item.getAttribute('data-module')) {
|
70792
70704
|
util.refreshModuleLayout(item);
|
@@ -71911,7 +71823,6 @@ class ColumnTool {
|
|
71911
71823
|
});
|
71912
71824
|
}
|
71913
71825
|
|
71914
|
-
this.columnTool = columnTool;
|
71915
71826
|
this.columnMore = columnMore;
|
71916
71827
|
}
|
71917
71828
|
|
@@ -72482,10 +72393,11 @@ class ColumnTool {
|
|
72482
72393
|
}
|
72483
72394
|
|
72484
72395
|
click(col) {
|
72485
|
-
const dom = this.dom;
|
72486
|
-
|
72487
|
-
this.columnTool
|
72488
|
-
this.columnTool.style.left = col.
|
72396
|
+
const dom = this.dom; //---- New Col Tool ----
|
72397
|
+
|
72398
|
+
this.columnTool = col.parentNode.querySelector('.is-col-tool');
|
72399
|
+
this.columnTool.style.left = col.offsetLeft + 'px'; //---- /New Col Tool ----
|
72400
|
+
|
72489
72401
|
const btnIncrease = this.columnMore.querySelector('.cell-increase');
|
72490
72402
|
const btnDecrease = this.columnMore.querySelector('.cell-decrease');
|
72491
72403
|
let nogrid = dom.parentsHasAttribute(col, 'nogrid');
|
@@ -72545,14 +72457,14 @@ class ColumnTool {
|
|
72545
72457
|
this.columnTool.querySelector('.cell-add').removeAttribute('disabled');
|
72546
72458
|
this.columnTool.querySelector('.cell-remove').removeAttribute('disabled');
|
72547
72459
|
let row = col.parentNode;
|
72548
|
-
let num =
|
72460
|
+
let num = 3; //is-row-tool, is-col-tool & is-rowadd-tool
|
72549
72461
|
|
72550
72462
|
if (row.querySelector('.is-row-overlay')) {
|
72551
|
-
num =
|
72463
|
+
num = 4; //is-row-tool, is-col-tool, is-rowadd-tool & is-row-overlay
|
72552
72464
|
}
|
72553
72465
|
|
72554
72466
|
if (row.childElementCount - num === 1) {
|
72555
|
-
//-num => minus is-row-tool, is-rowadd-tool & is-row-overlay
|
72467
|
+
//-num => minus is-row-tool, is-col-tool, is-rowadd-tool & is-row-overlay
|
72556
72468
|
this.columnMore.querySelector('.cell-prev').style.display = 'none';
|
72557
72469
|
this.columnMore.querySelector('.cell-next').style.display = 'none';
|
72558
72470
|
if (btnIncrease) btnIncrease.style.display = 'none';
|
@@ -72675,18 +72587,6 @@ class ColumnTool {
|
|
72675
72587
|
}
|
72676
72588
|
}
|
72677
72589
|
|
72678
|
-
refreshColumnTool(cell) {
|
72679
|
-
this.grid.refreshColumnTool(cell);
|
72680
|
-
}
|
72681
|
-
|
72682
|
-
showColumnTool(cell) {
|
72683
|
-
this.grid.showColumnTool(cell);
|
72684
|
-
}
|
72685
|
-
|
72686
|
-
hideColumnTool() {
|
72687
|
-
this.grid.hideColumnTool();
|
72688
|
-
}
|
72689
|
-
|
72690
72590
|
}
|
72691
72591
|
|
72692
72592
|
const dom$f = new Dom();
|
@@ -77603,18 +77503,13 @@ class ElementTool {
|
|
77603
77503
|
if (cell) {
|
77604
77504
|
let row = cell.parentNode;
|
77605
77505
|
|
77606
|
-
if (cell.childElementCount === 0 && row.childElementCount ===
|
77506
|
+
if (cell.childElementCount === 0 && row.childElementCount === 4) {
|
77507
|
+
// 4 => col + tools
|
77607
77508
|
row.parentNode.removeChild(row);
|
77608
|
-
let columnTool = builderStuff.querySelector('.is-column-tool'); // quick access
|
77609
|
-
|
77610
|
-
dom.removeClass(columnTool, 'active');
|
77611
77509
|
util.checkEmpty();
|
77612
77510
|
} else if (cell.childElementCount === 0) {
|
77613
77511
|
row.removeChild(cell);
|
77614
77512
|
util.fixLayout(row);
|
77615
|
-
let columnTool = builderStuff.querySelector('.is-column-tool'); // // quick access
|
77616
|
-
|
77617
|
-
dom.removeClass(columnTool, 'active');
|
77618
77513
|
}
|
77619
77514
|
} // Add spacer to empty subblock
|
77620
77515
|
|
@@ -77824,10 +77719,11 @@ class ElementTool {
|
|
77824
77719
|
left = elmMore.getBoundingClientRect().left;
|
77825
77720
|
top = top + adjY;
|
77826
77721
|
left = left + adjX;
|
77827
|
-
}
|
77722
|
+
} // elementMore.style.display = 'flex';
|
77828
77723
|
|
77829
|
-
elementMore.style.display = 'flex'; // this.util.showPop(elementMore);
|
77830
77724
|
|
77725
|
+
const btnMore = elementTool.querySelector('.elm-more');
|
77726
|
+
this.util.showPop(elementMore, false, btnMore);
|
77831
77727
|
const w = elementMore.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
|
77832
77728
|
|
77833
77729
|
const h = elementMore.offsetHeight;
|
@@ -78723,22 +78619,16 @@ class Preferences {
|
|
78723
78619
|
}
|
78724
78620
|
|
78725
78621
|
setColumnTool(hidecolumntool) {
|
78726
|
-
const
|
78622
|
+
const builders = this.builder.doc.querySelectorAll(this.builder.opts.container);
|
78727
78623
|
|
78728
78624
|
if (hidecolumntool) {
|
78729
|
-
|
78625
|
+
Array.prototype.forEach.call(builders, builder => {
|
78626
|
+
builder.setAttribute('hidecolumntool', '');
|
78627
|
+
});
|
78730
78628
|
} else {
|
78731
|
-
|
78732
|
-
|
78733
|
-
|
78734
|
-
if (this.builder.iframe) {
|
78735
|
-
const contentStuff = this.builder.contentStuff;
|
78736
|
-
|
78737
|
-
if (hidecolumntool) {
|
78738
|
-
contentStuff.setAttribute('hidecolumntool', '');
|
78739
|
-
} else {
|
78740
|
-
contentStuff.removeAttribute('hidecolumntool', '');
|
78741
|
-
}
|
78629
|
+
Array.prototype.forEach.call(builders, builder => {
|
78630
|
+
builder.removeAttribute('hidecolumntool');
|
78631
|
+
});
|
78742
78632
|
}
|
78743
78633
|
}
|
78744
78634
|
|
@@ -80385,12 +80275,14 @@ class Rte {
|
|
80385
80275
|
Array.prototype.forEach.call(tools, tool => {
|
80386
80276
|
tool.style.display = '';
|
80387
80277
|
});
|
80388
|
-
let tool = this.builder.doc.querySelector('.is-column-tool');
|
80389
|
-
tool.style.display = 'none';
|
80390
80278
|
tools = this.builder.doc.querySelectorAll('.is-row-tool');
|
80391
80279
|
tools.forEach(tool => {
|
80392
80280
|
tool.style.display = 'none';
|
80393
80281
|
});
|
80282
|
+
tools = this.builder.doc.querySelectorAll('.is-col-tool');
|
80283
|
+
tools.forEach(tool => {
|
80284
|
+
tool.style.display = 'none';
|
80285
|
+
});
|
80394
80286
|
tools = this.builder.doc.querySelectorAll('.is-rowadd-tool');
|
80395
80287
|
tools.forEach(tool => {
|
80396
80288
|
tool.style.opacity = 0;
|
@@ -80418,15 +80310,6 @@ class Rte {
|
|
80418
80310
|
|
80419
80311
|
|
80420
80312
|
this.builder.elmTool.repositionElementTool();
|
80421
|
-
let col = this.builder.activeCol;
|
80422
|
-
let tool = this.builder.doc.querySelector('.is-column-tool');
|
80423
|
-
tool.style.display = '';
|
80424
|
-
|
80425
|
-
if (col) {
|
80426
|
-
tool.style.top = col.getBoundingClientRect().top - 29 + window.pageYOffset + 'px';
|
80427
|
-
tool.style.left = col.getBoundingClientRect().left - 1 + 'px';
|
80428
|
-
}
|
80429
|
-
|
80430
80313
|
let tools = this.builder.doc.querySelectorAll('.is-row-tool');
|
80431
80314
|
tools.forEach(tool => {
|
80432
80315
|
tool.style.display = '';
|
@@ -80435,6 +80318,10 @@ class Rte {
|
|
80435
80318
|
tools.forEach(tool => {
|
80436
80319
|
tool.style.opacity = '';
|
80437
80320
|
});
|
80321
|
+
tools = this.builder.doc.querySelectorAll('.is-col-tool');
|
80322
|
+
tools.forEach(tool => {
|
80323
|
+
tool.style.display = '';
|
80324
|
+
});
|
80438
80325
|
|
80439
80326
|
if (this.builder.onZoomEnd) {
|
80440
80327
|
let val = this.rteZoomSlider.value;
|
@@ -80467,12 +80354,14 @@ class Rte {
|
|
80467
80354
|
Array.prototype.forEach.call(tools, tool => {
|
80468
80355
|
tool.style.display = '';
|
80469
80356
|
});
|
80470
|
-
let tool = this.builder.doc.querySelector('.is-column-tool');
|
80471
|
-
tool.style.display = 'none';
|
80472
80357
|
tools = this.builder.doc.querySelectorAll('.is-row-tool');
|
80473
80358
|
tools.forEach(tool => {
|
80474
80359
|
tool.style.display = 'none';
|
80475
80360
|
});
|
80361
|
+
tools = this.builder.doc.querySelectorAll('.is-col-tool');
|
80362
|
+
tools.forEach(tool => {
|
80363
|
+
tool.style.display = 'none';
|
80364
|
+
});
|
80476
80365
|
tools = this.builder.doc.querySelectorAll('.is-rowadd-tool');
|
80477
80366
|
tools.forEach(tool => {
|
80478
80367
|
tool.style.opacity = 0;
|
@@ -80500,15 +80389,6 @@ class Rte {
|
|
80500
80389
|
|
80501
80390
|
|
80502
80391
|
this.builder.elmTool.repositionElementTool();
|
80503
|
-
let col = this.builder.activeCol;
|
80504
|
-
let tool = this.builder.doc.querySelector('.is-column-tool');
|
80505
|
-
tool.style.display = '';
|
80506
|
-
|
80507
|
-
if (col) {
|
80508
|
-
tool.style.top = col.getBoundingClientRect().top - 29 + window.pageYOffset + 'px';
|
80509
|
-
tool.style.left = col.getBoundingClientRect().left - 1 + 'px';
|
80510
|
-
}
|
80511
|
-
|
80512
80392
|
let tools = this.builder.doc.querySelectorAll('.is-row-tool');
|
80513
80393
|
tools.forEach(tool => {
|
80514
80394
|
tool.style.display = '';
|
@@ -80517,6 +80397,10 @@ class Rte {
|
|
80517
80397
|
tools.forEach(tool => {
|
80518
80398
|
tool.style.opacity = '';
|
80519
80399
|
});
|
80400
|
+
tools = this.builder.doc.querySelectorAll('.is-col-tool');
|
80401
|
+
tools.forEach(tool => {
|
80402
|
+
tool.style.display = '';
|
80403
|
+
});
|
80520
80404
|
|
80521
80405
|
if (this.builder.onZoomEnd) {
|
80522
80406
|
let val = this.rteZoomSlider.value;
|
@@ -85835,6 +85719,7 @@ class Resize {
|
|
85835
85719
|
Array.from(col.parentNode.children).map(item => {
|
85836
85720
|
if (item.classList.contains('is-row-tool')) return;
|
85837
85721
|
if (item.classList.contains('is-rowadd-tool')) return;
|
85722
|
+
if (item.classList.contains('is-col-tool')) return;
|
85838
85723
|
if (item === col) return;
|
85839
85724
|
numOfCols++;
|
85840
85725
|
});
|
@@ -85847,7 +85732,8 @@ class Resize {
|
|
85847
85732
|
let otherWidth = 0;
|
85848
85733
|
Array.from(col.parentNode.children).map(item => {
|
85849
85734
|
if (item.classList.contains('is-row-tool')) return;
|
85850
|
-
if (item.classList.contains('is-rowadd-tool')) return;
|
85735
|
+
if (item.classList.contains('is-rowadd-tool')) return;
|
85736
|
+
if (item.classList.contains('is-col-tool')) return; // if(this.opts.filterSibling) if(item.classList.contains(this.opts.filterSibling)) return;
|
85851
85737
|
|
85852
85738
|
if (item === col) return;
|
85853
85739
|
otherWidth += item.offsetWidth;
|
@@ -85863,7 +85749,8 @@ class Resize {
|
|
85863
85749
|
// Or make others auto
|
85864
85750
|
Array.from(col.parentNode.children).map(item => {
|
85865
85751
|
if (item.classList.contains('is-row-tool')) return;
|
85866
|
-
if (item.classList.contains('is-rowadd-tool')) return;
|
85752
|
+
if (item.classList.contains('is-rowadd-tool')) return;
|
85753
|
+
if (item.classList.contains('is-col-tool')) return; // if(this.opts.filterSibling) if(item.classList.contains(this.opts.filterSibling)) return;
|
85867
85754
|
|
85868
85755
|
if (item === col) return; // // item.style.width = '100%';
|
85869
85756
|
// if(!item.getAttribute('data-module')) item.style.width = '100%';
|
@@ -85893,7 +85780,8 @@ class Resize {
|
|
85893
85780
|
// New: if other cols has no width, set to 100%
|
85894
85781
|
Array.from(col.parentNode.children).map(item => {
|
85895
85782
|
if (item.classList.contains('is-row-tool')) return;
|
85896
|
-
if (item.classList.contains('is-rowadd-tool')) return;
|
85783
|
+
if (item.classList.contains('is-rowadd-tool')) return;
|
85784
|
+
if (item.classList.contains('is-col-tool')) return; // if(this.opts.filterSibling) if(item.classList.contains(this.opts.filterSibling)) return;
|
85897
85785
|
|
85898
85786
|
if (item === col) return;
|
85899
85787
|
|
@@ -85917,6 +85805,7 @@ class Resize {
|
|
85917
85805
|
Array.from(col.parentNode.children).map(item => {
|
85918
85806
|
if (item.classList.contains('is-row-tool')) return;
|
85919
85807
|
if (item.classList.contains('is-rowadd-tool')) return;
|
85808
|
+
if (item.classList.contains('is-col-tool')) return;
|
85920
85809
|
if (item === col) return;
|
85921
85810
|
numOfCols++;
|
85922
85811
|
});
|
@@ -85930,7 +85819,8 @@ class Resize {
|
|
85930
85819
|
let otherWidth = 0;
|
85931
85820
|
Array.from(col.parentNode.children).map(item => {
|
85932
85821
|
if (item.classList.contains('is-row-tool')) return;
|
85933
|
-
if (item.classList.contains('is-rowadd-tool')) return;
|
85822
|
+
if (item.classList.contains('is-rowadd-tool')) return;
|
85823
|
+
if (item.classList.contains('is-col-tool')) return; // if(this.opts.filterSibling) if(item.classList.contains(this.opts.filterSibling)) return;
|
85934
85824
|
|
85935
85825
|
if (item.classList.contains('row-tool')) return;
|
85936
85826
|
if (item === col) return;
|
@@ -85947,7 +85837,8 @@ class Resize {
|
|
85947
85837
|
// Or make others auto
|
85948
85838
|
Array.from(col.parentNode.children).map(item => {
|
85949
85839
|
if (item.classList.contains('is-row-tool')) return;
|
85950
|
-
if (item.classList.contains('is-rowadd-tool')) return;
|
85840
|
+
if (item.classList.contains('is-rowadd-tool')) return;
|
85841
|
+
if (item.classList.contains('is-col-tool')) return; // if(this.opts.filterSibling) if(item.classList.contains(this.opts.filterSibling)) return;
|
85951
85842
|
|
85952
85843
|
if (item === col) return; // // item.style.width = '100%';
|
85953
85844
|
// if(!item.getAttribute('data-module')) item.style.width = '100%';
|
@@ -85977,7 +85868,8 @@ class Resize {
|
|
85977
85868
|
let activeColumnWidth = 0;
|
85978
85869
|
Array.from(col.parentNode.children).map(item => {
|
85979
85870
|
if (item.classList.contains('is-row-tool')) return;
|
85980
|
-
if (item.classList.contains('is-rowadd-tool')) return;
|
85871
|
+
if (item.classList.contains('is-rowadd-tool')) return;
|
85872
|
+
if (item.classList.contains('is-col-tool')) return; // if(this.opts.filterSibling) if(item.classList.contains(this.opts.filterSibling)) return;
|
85981
85873
|
// // Refresh Module
|
85982
85874
|
// if(item.getAttribute('data-module')) {
|
85983
85875
|
// this.builder.util.refreshModuleLayout(item);
|
@@ -86000,6 +85892,7 @@ class Resize {
|
|
86000
85892
|
Array.from(col.parentNode.children).map(item => {
|
86001
85893
|
if (item.classList.contains('is-row-tool')) return;
|
86002
85894
|
if (item.classList.contains('is-rowadd-tool')) return;
|
85895
|
+
if (item.classList.contains('is-col-tool')) return;
|
86003
85896
|
|
86004
85897
|
if (item.getAttribute('data-module')) {
|
86005
85898
|
let moduleWidth = item.offsetWidth / row.offsetWidth * 100;
|
@@ -86015,7 +85908,8 @@ class Resize {
|
|
86015
85908
|
col.style.height = '';
|
86016
85909
|
Array.from(col.parentNode.children).map(item => {
|
86017
85910
|
if (item.classList.contains('is-row-tool')) return;
|
86018
|
-
if (item.classList.contains('is-rowadd-tool')) return;
|
85911
|
+
if (item.classList.contains('is-rowadd-tool')) return;
|
85912
|
+
if (item.classList.contains('is-col-tool')) return; // if(this.opts.filterSibling) if(item.classList.contains(this.opts.filterSibling)) return;
|
86019
85913
|
|
86020
85914
|
if (item === col) return;
|
86021
85915
|
item.style.height = '';
|
@@ -86626,6 +86520,8 @@ class ContentStuff$1 {
|
|
86626
86520
|
.row-active .is-row-tool {
|
86627
86521
|
display:flex;
|
86628
86522
|
}
|
86523
|
+
|
86524
|
+
|
86629
86525
|
.row-outline .is-rowadd-tool,
|
86630
86526
|
.row-active .is-rowadd-tool {
|
86631
86527
|
display:block;
|
@@ -86696,7 +86592,78 @@ class ContentStuff$1 {
|
|
86696
86592
|
outline:none;
|
86697
86593
|
}
|
86698
86594
|
|
86595
|
+
/* is-col-tool */
|
86699
86596
|
|
86597
|
+
.row-active .is-col-tool {
|
86598
|
+
display: flex;
|
86599
|
+
}
|
86600
|
+
.is-builder[rowoutline] .row-active .is-col-tool {
|
86601
|
+
display: none;
|
86602
|
+
}
|
86603
|
+
.is-builder[hidecolumntool] .row-active .is-col-tool {
|
86604
|
+
display: none;
|
86605
|
+
}
|
86606
|
+
|
86607
|
+
|
86608
|
+
.is-tool.is-col-tool {
|
86609
|
+
flex-direction: row;
|
86610
|
+
margin-top: 0px;
|
86611
|
+
margin-left: -1px;
|
86612
|
+
}
|
86613
|
+
.is-tool.is-col-tool button {
|
86614
|
+
width: 25px;
|
86615
|
+
height: 25px;
|
86616
|
+
display: flex;
|
86617
|
+
justify-content: center;
|
86618
|
+
align-items: center;
|
86619
|
+
}
|
86620
|
+
.is-tool.is-col-tool .cell-add {
|
86621
|
+
background: #0fcc52;
|
86622
|
+
}
|
86623
|
+
.is-tool.is-col-tool .cell-more {
|
86624
|
+
background: rgba(216, 200, 6, 0.9);
|
86625
|
+
}
|
86626
|
+
.is-tool.is-col-tool .cell-remove {
|
86627
|
+
background: rgba(255, 85, 4, 0.9);
|
86628
|
+
}
|
86629
|
+
.is-tool.is-col-tool svg {
|
86630
|
+
width: 23px;
|
86631
|
+
height: 23px;
|
86632
|
+
fill: #fff;
|
86633
|
+
}
|
86634
|
+
.is-tool.is-col-tool .cell-more svg {
|
86635
|
+
width: 14px;
|
86636
|
+
height: 14px;
|
86637
|
+
}
|
86638
|
+
|
86639
|
+
|
86640
|
+
.is-builder[gray] .is-tool.is-col-tool {
|
86641
|
+
background: rgba(243, 243, 243, 0.9);
|
86642
|
+
flex-direction: row;
|
86643
|
+
margin-top: -2px;
|
86644
|
+
}
|
86645
|
+
.is-builder[gray] .is-tool.is-col-tool button {
|
86646
|
+
width: 27px;
|
86647
|
+
height: 27px;
|
86648
|
+
}
|
86649
|
+
.is-builder[gray] .is-tool.is-col-tool .cell-add {
|
86650
|
+
background: transparent;
|
86651
|
+
}
|
86652
|
+
.is-builder[gray] .is-tool.is-col-tool .cell-more {
|
86653
|
+
background: transparent;
|
86654
|
+
}
|
86655
|
+
.is-builder[gray] .is-tool.is-col-tool .cell-remove {
|
86656
|
+
background: transparent;
|
86657
|
+
}
|
86658
|
+
.is-builder[gray] .is-tool.is-col-tool svg {
|
86659
|
+
width: 18px;
|
86660
|
+
height: 18px;
|
86661
|
+
fill: #000;
|
86662
|
+
}
|
86663
|
+
.is-builder[gray] .is-tool.is-col-tool .cell-more svg {
|
86664
|
+
width: 12px;
|
86665
|
+
height: 12px;
|
86666
|
+
}
|
86700
86667
|
|
86701
86668
|
|
86702
86669
|
.is-builder[gridoutline] > div > div {
|
@@ -86973,7 +86940,8 @@ class ContentStuff$1 {
|
|
86973
86940
|
display: initial !important;
|
86974
86941
|
}
|
86975
86942
|
.is-section-tool svg,
|
86976
|
-
.is-row-tool svg
|
86943
|
+
.is-row-tool svg,
|
86944
|
+
.is-col-tool svg {
|
86977
86945
|
display: initial !important;
|
86978
86946
|
}
|
86979
86947
|
|
@@ -87921,7 +87889,6 @@ class ContentBuilder {
|
|
87921
87889
|
var ret = oldget.apply(this, arguments);
|
87922
87890
|
|
87923
87891
|
if (this.activeCol) {
|
87924
|
-
// this.colTool.refreshColumnTool(this.activeCol);
|
87925
87892
|
// Quick reposition column tool
|
87926
87893
|
this.util.repositionColumnTool();
|
87927
87894
|
}
|
@@ -88225,6 +88192,101 @@ class ContentBuilder {
|
|
88225
88192
|
*/
|
88226
88193
|
|
88227
88194
|
}
|
88195
|
+
/*
|
88196
|
+
If latest npm is used, while local contentbuilder.css is still using the old version,
|
88197
|
+
then add the newest css here, so the newest script from npm will work fine.
|
88198
|
+
backwardCompatible() is called by rowtool.js
|
88199
|
+
*/
|
88200
|
+
|
88201
|
+
|
88202
|
+
backwardCompatible() {
|
88203
|
+
let css = `
|
88204
|
+
.row-active .is-col-tool {
|
88205
|
+
display: flex;
|
88206
|
+
}
|
88207
|
+
.is-builder[rowoutline] .row-active .is-col-tool {
|
88208
|
+
display: none;
|
88209
|
+
}
|
88210
|
+
.is-builder[hidecolumntool] .row-active .is-col-tool {
|
88211
|
+
display: none;
|
88212
|
+
}
|
88213
|
+
|
88214
|
+
.is-tool.is-col-tool {
|
88215
|
+
flex-direction: row;
|
88216
|
+
margin-top: 0px;
|
88217
|
+
margin-left: -1px;
|
88218
|
+
}
|
88219
|
+
.is-tool.is-col-tool button {
|
88220
|
+
width: 25px;
|
88221
|
+
height: 25px;
|
88222
|
+
display: flex;
|
88223
|
+
justify-content: center;
|
88224
|
+
align-items: center;
|
88225
|
+
}
|
88226
|
+
.is-tool.is-col-tool .cell-add {
|
88227
|
+
background: #0fcc52;
|
88228
|
+
}
|
88229
|
+
.is-tool.is-col-tool .cell-more {
|
88230
|
+
background: rgba(216, 200, 6, 0.9);
|
88231
|
+
}
|
88232
|
+
.is-tool.is-col-tool .cell-remove {
|
88233
|
+
background: rgba(255, 85, 4, 0.9);
|
88234
|
+
}
|
88235
|
+
.is-tool.is-col-tool svg {
|
88236
|
+
width: 23px;
|
88237
|
+
height: 23px;
|
88238
|
+
fill: #fff;
|
88239
|
+
}
|
88240
|
+
.is-tool.is-col-tool .cell-more svg {
|
88241
|
+
width: 14px;
|
88242
|
+
height: 14px;
|
88243
|
+
}
|
88244
|
+
|
88245
|
+
|
88246
|
+
.is-builder[gray] .is-tool.is-col-tool {
|
88247
|
+
background: rgba(243, 243, 243, 0.9);
|
88248
|
+
flex-direction: row;
|
88249
|
+
top:-3px;
|
88250
|
+
margin-top: 0px;
|
88251
|
+
margin-left: -1px;
|
88252
|
+
}
|
88253
|
+
.is-builder[gray] .is-tool.is-col-tool button {
|
88254
|
+
width: 27px;
|
88255
|
+
height: 27px;
|
88256
|
+
}
|
88257
|
+
.is-builder[gray] .is-tool.is-col-tool .cell-add {
|
88258
|
+
background: transparent;
|
88259
|
+
}
|
88260
|
+
.is-builder[gray] .is-tool.is-col-tool .cell-more {
|
88261
|
+
background: transparent;
|
88262
|
+
}
|
88263
|
+
.is-builder[gray] .is-tool.is-col-tool .cell-remove {
|
88264
|
+
background: transparent;
|
88265
|
+
}
|
88266
|
+
.is-builder[gray] .is-tool.is-col-tool svg {
|
88267
|
+
width: 18px;
|
88268
|
+
height: 18px;
|
88269
|
+
fill: #000;
|
88270
|
+
}
|
88271
|
+
.is-builder[gray] .is-tool.is-col-tool .cell-more svg {
|
88272
|
+
width: 12px;
|
88273
|
+
height: 12px;
|
88274
|
+
}
|
88275
|
+
|
88276
|
+
|
88277
|
+
.is-col-tool svg {
|
88278
|
+
display: initial !important;
|
88279
|
+
}
|
88280
|
+
`;
|
88281
|
+
|
88282
|
+
if (!this.builderStuff.querySelector('style[data-rel="css-new"]')) {
|
88283
|
+
this.builderStuff.insertAdjacentHTML('afterbegin', `
|
88284
|
+
<style data-rel="css-new">
|
88285
|
+
${css}
|
88286
|
+
</style>
|
88287
|
+
`);
|
88288
|
+
}
|
88289
|
+
}
|
88228
88290
|
|
88229
88291
|
setZoomOnControl(area) {
|
88230
88292
|
const rowtools = area.querySelectorAll('.is-row-tool');
|
@@ -88232,6 +88294,12 @@ class ContentBuilder {
|
|
88232
88294
|
rowtool.style.transform = `scale(${1 / this.opts.zoom})`;
|
88233
88295
|
rowtool.style.transformOrigin = 'top';
|
88234
88296
|
});
|
88297
|
+
const coltools = area.querySelectorAll('.is-col-tool');
|
88298
|
+
coltools.forEach(coltool => {
|
88299
|
+
coltool.style.transform = `scale(${1 / this.opts.zoom})`;
|
88300
|
+
coltool.style.transformOrigin = 'top left';
|
88301
|
+
coltool.style.marginTop = `${-(27 / this.opts.zoom)}px`;
|
88302
|
+
});
|
88235
88303
|
const rowaddtools = area.querySelectorAll('.is-rowadd-tool button');
|
88236
88304
|
rowaddtools.forEach(rowaddtool => {
|
88237
88305
|
rowaddtool.style.transform = `scale(${1 / this.opts.zoom})`; // rowtool.style.transformOrigin = 'top';
|
@@ -88336,7 +88404,7 @@ class ContentBuilder {
|
|
88336
88404
|
|
88337
88405
|
const cols = this.dom.elementChildren(row);
|
88338
88406
|
cols.forEach(col => {
|
88339
|
-
if (this.dom.hasClass(col, 'is-row-tool') || this.dom.hasClass(col, 'is-rowadd-tool')) return; // Return if not a column
|
88407
|
+
if (this.dom.hasClass(col, 'is-row-tool') || this.dom.hasClass(col, 'is-col-tool') || this.dom.hasClass(col, 'is-rowadd-tool')) return; // Return if not a column
|
88340
88408
|
// For backward compatibility, replace:
|
88341
88409
|
// - data-mode="readonly" with data-noedit
|
88342
88410
|
// - data-mode="readonly-protected" with data-protected
|
@@ -88470,19 +88538,9 @@ class ContentBuilder {
|
|
88470
88538
|
onStart: () => {
|
88471
88539
|
this.uo.saveForUndo(); // Even if cancelled, saveForUndo will make sure not to save if there is no change
|
88472
88540
|
|
88473
|
-
this.colTool.hideColumnTool();
|
88474
88541
|
this.elmTool.hide();
|
88475
88542
|
},
|
88476
88543
|
onEnd: () => {
|
88477
|
-
if (!this.opts.emailMode) {
|
88478
|
-
if (this.dom.hasClass(this.activeCol.parentNode, 'row-outline')) {
|
88479
|
-
//if not row selection, but col selection
|
88480
|
-
//if(this.activeCol.parentNode.classList.contains('row-outline')) { //if not row selection, but col selection
|
88481
|
-
this.colTool.refreshColumnTool(this.activeCol);
|
88482
|
-
this.colTool.showColumnTool(this.activeCol);
|
88483
|
-
}
|
88484
|
-
}
|
88485
|
-
|
88486
88544
|
this.util.checkEmpty(); // for multiple instances check
|
88487
88545
|
},
|
88488
88546
|
onAdd: evt => {
|
@@ -89043,10 +89101,6 @@ class ContentBuilder {
|
|
89043
89101
|
|
89044
89102
|
imageLoaded(obj) {
|
89045
89103
|
obj.removeAttribute('onload');
|
89046
|
-
|
89047
|
-
if (this.activeCol) {
|
89048
|
-
this.colTool.refreshColumnTool(this.activeCol);
|
89049
|
-
}
|
89050
89104
|
} // Module related
|
89051
89105
|
|
89052
89106
|
|
@@ -89715,6 +89769,7 @@ class ContentBuilder {
|
|
89715
89769
|
}
|
89716
89770
|
|
89717
89771
|
setUIColorRefresh() {
|
89772
|
+
// All related with iframe style
|
89718
89773
|
const util = this.util;
|
89719
89774
|
|
89720
89775
|
if (!this.rte || !this.element) {
|
@@ -89845,7 +89900,11 @@ class ContentBuilder {
|
|
89845
89900
|
}
|
89846
89901
|
|
89847
89902
|
handleCellClick(col, e) {
|
89848
|
-
if (this.cleanEditing)
|
89903
|
+
if (this.cleanEditing) {
|
89904
|
+
col.parentNode.querySelector('.is-row-tool').style.display = '';
|
89905
|
+
col.parentNode.querySelector('.is-col-tool').style.display = '';
|
89906
|
+
}
|
89907
|
+
|
89849
89908
|
this.lightboxOpen(col);
|
89850
89909
|
const util = this.util;
|
89851
89910
|
util.clearActiveCell();
|
@@ -90368,6 +90427,7 @@ class ContentBuilder {
|
|
90368
90427
|
if (this.cleanEditing) {
|
90369
90428
|
this.colTool.columnTool.classList.remove('active');
|
90370
90429
|
col.parentNode.querySelector('.is-row-tool').style.display = 'none';
|
90430
|
+
col.parentNode.querySelector('.is-col-tool').style.display = 'none';
|
90371
90431
|
}
|
90372
90432
|
}
|
90373
90433
|
|
@@ -95995,6 +96055,7 @@ class ContentBox {
|
|
95995
96055
|
btns.forEach(btn => {
|
95996
96056
|
btn.style.color = this.editor.styleModalColor;
|
95997
96057
|
}); // -------
|
96058
|
+
// This is not run on initial page load, because the iframe is still empty
|
95998
96059
|
|
95999
96060
|
const sectionIframe = document.querySelector('#ifrIdeasPanel');
|
96000
96061
|
|
@@ -96042,8 +96103,6 @@ class ContentBox {
|
|
96042
96103
|
Array.prototype.forEach.call(tools, tool => {
|
96043
96104
|
tool.style.display = '';
|
96044
96105
|
});
|
96045
|
-
let tool = this.doc.querySelector('.is-column-tool');
|
96046
|
-
tool.style.display = 'none';
|
96047
96106
|
tools = this.doc.querySelectorAll('.is-row-tool');
|
96048
96107
|
tools.forEach(tool => {
|
96049
96108
|
tool.style.display = 'none';
|
@@ -96052,12 +96111,14 @@ class ContentBox {
|
|
96052
96111
|
tools.forEach(tool => {
|
96053
96112
|
tool.style.opacity = 0;
|
96054
96113
|
});
|
96114
|
+
tools = this.doc.querySelectorAll('.is-col-tool');
|
96115
|
+
tools.forEach(tool => {
|
96116
|
+
tool.style.display = 'none';
|
96117
|
+
});
|
96055
96118
|
}
|
96056
96119
|
|
96057
96120
|
showTools() {
|
96058
96121
|
this.editor.util.repositionColumnTool();
|
96059
|
-
let tool = this.doc.querySelector('.is-column-tool');
|
96060
|
-
tool.style.display = '';
|
96061
96122
|
let tools = this.doc.querySelectorAll('.is-row-tool');
|
96062
96123
|
tools.forEach(tool => {
|
96063
96124
|
tool.style.display = '';
|
@@ -96066,6 +96127,10 @@ class ContentBox {
|
|
96066
96127
|
tools.forEach(tool => {
|
96067
96128
|
tool.style.opacity = '';
|
96068
96129
|
});
|
96130
|
+
tools = this.doc.querySelectorAll('.is-col-tool');
|
96131
|
+
tools.forEach(tool => {
|
96132
|
+
tool.style.display = '';
|
96133
|
+
});
|
96069
96134
|
}
|
96070
96135
|
|
96071
96136
|
positionTool(box) {
|