@innovastudio/contentbuilder 1.1.3 → 1.1.6

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.
@@ -5,7 +5,7 @@
5
5
  (function () {
6
6
  if(typeof _cb === 'undefined') return;
7
7
 
8
- var html = '<div class="is-modal buttoneditor">' +
8
+ var html = '<div class="is-modal buttoneditorclassic">' +
9
9
  '<div class="is-modal-content" style="width:505px;height:620px;position: relative;display: flex;flex-direction: column;align-items: center;padding: 0px;">' +
10
10
  '<div class="is-modal-bar is-draggable" style="background:'+_cb.styleTabsBackground+';position: absolute;top: 0;left: 0;width: 100%;z-index:1;line-height:32px;height:32px;">' + _cb.out('Button Editor') +
11
11
  '<div class="is-modal-close" style="z-index:1;width:32px;height:32px;position:absolute;top:0px;right:0px;box-sizing:border-box;padding:0;line-height:32px;font-size: 12px;text-align:center;cursor:pointer;">&#10005;</div>' +
@@ -28,11 +28,15 @@
28
28
  //Extend onContentClick
29
29
  var oldget = _cb.opts.onContentClick;
30
30
  _cb.opts.onContentClick = function (e) {
31
-
31
+
32
32
  let elm = e.target;
33
33
 
34
34
  var elmDisplay = elm.style.display; //getStyle(elm, 'display');
35
35
 
36
+ if(elm.className) {
37
+ if(elm.className.indexOf('inline-block')!==-1) elmDisplay='inline-block';
38
+ }
39
+
36
40
  if((elm.tagName.toLowerCase() === 'a' && (elmDisplay === 'inline-block' || elmDisplay === 'block'))) {
37
41
 
38
42
 
@@ -53,7 +57,7 @@
53
57
 
54
58
  buttonEdit.addEventListener('click', function(){
55
59
 
56
- var modal = document.querySelector('.is-modal.buttoneditor');
60
+ var modal = document.querySelector('.is-modal.buttoneditorclassic');
57
61
  _cb.showModal(modal);
58
62
 
59
63
  _cb.saveForUndo(true); // checkLater = true
@@ -1522,15 +1526,17 @@
1522
1526
  }
1523
1527
 
1524
1528
  function cleanupClasses(link) {
1525
- removeClass(link, 'is-btn-ghost1');
1526
- removeClass(link, 'is-btn-ghost2');
1527
- removeClass(link, 'is-upper');
1528
- removeClass(link, 'is-btn-small');
1529
- removeClass(link, 'is-btn');
1530
- removeClass(link, 'is-rounded-30');
1531
- removeClass(link, 'btn-primary');
1532
- removeClass(link, 'btn-default');
1533
- removeClass(link, 'btn');
1529
+ // removeClass(link, 'is-btn-ghost1');
1530
+ // removeClass(link, 'is-btn-ghost2');
1531
+ // removeClass(link, 'is-upper');
1532
+ // removeClass(link, 'is-btn-small');
1533
+ // removeClass(link, 'is-btn');
1534
+ // removeClass(link, 'is-rounded-30');
1535
+ // removeClass(link, 'btn-primary');
1536
+ // removeClass(link, 'btn-default');
1537
+ // removeClass(link, 'btn');
1538
+
1539
+ link.removeAttribute('class');
1534
1540
  }
1535
1541
 
1536
1542
  function addButtonScript(link) {