DmitrMakeev commited on
Commit
ee070ce
·
verified ·
1 Parent(s): 5db79a6

Update pages.html

Browse files
Files changed (1) hide show
  1. pages.html +5 -4
pages.html CHANGED
@@ -842,14 +842,16 @@ editor.BlockManager.add('custom-countdown', {
842
  }
843
  });
844
 
 
845
  editor.Components.addType('custom-countdown', {
846
  model: {
847
  defaults: {
848
  traits: [
849
  {
850
- type: 'date',
851
  name: 'startfrom',
852
- label: 'End Date',
 
853
  changeProp: true
854
  },
855
  {
@@ -871,7 +873,6 @@ editor.Components.addType('custom-countdown', {
871
  const i = o.querySelector('[data-js=countdown-minute]');
872
  const r = o.querySelector('[data-js=countdown-second]');
873
  const u = o.__gjsCountdownInterval;
874
-
875
  u && clearInterval(u);
876
  const p = window.__gjsCountdownIntervals || [], v = [];
877
  p.forEach(n => n.isConnected || (clearInterval(n.__gjsCountdownInterval), v.push(n))), p.indexOf(o) < 0 && p.push(o), window.__gjsCountdownIntervals = p.filter(n => v.indexOf(n) < 0);
@@ -888,7 +889,7 @@ editor.Components.addType('custom-countdown', {
888
  }
889
  });
890
 
891
-
892
  editor.BlockManager.add('custom-countdown', {
893
  label: 'Custom Countdown',
894
  content: {
 
842
  }
843
  });
844
 
845
+ // Добавляем компонент custom-countdown
846
  editor.Components.addType('custom-countdown', {
847
  model: {
848
  defaults: {
849
  traits: [
850
  {
851
+ type: 'text', // Заменен тип 'date' на 'text'
852
  name: 'startfrom',
853
+ label: 'End Date (YYYY-MM-DD)',
854
+ placeholder: 'YYYY-MM-DD', // Добавлено пояснение
855
  changeProp: true
856
  },
857
  {
 
873
  const i = o.querySelector('[data-js=countdown-minute]');
874
  const r = o.querySelector('[data-js=countdown-second]');
875
  const u = o.__gjsCountdownInterval;
 
876
  u && clearInterval(u);
877
  const p = window.__gjsCountdownIntervals || [], v = [];
878
  p.forEach(n => n.isConnected || (clearInterval(n.__gjsCountdownInterval), v.push(n))), p.indexOf(o) < 0 && p.push(o), window.__gjsCountdownIntervals = p.filter(n => v.indexOf(n) < 0);
 
889
  }
890
  });
891
 
892
+ // Добавляем блок custom-countdown в редактор
893
  editor.BlockManager.add('custom-countdown', {
894
  label: 'Custom Countdown',
895
  content: {