Elementor Essential Addons - Version 2.8.6

Version Description

  • Progress Bar revamped with faster and better script and styles
  • Few minor bugfix and improvements
Download this release

Release Info

Developer re_enter_rupok
Plugin Icon 128x128 Elementor Essential Addons
Version 2.8.6
Comparing to
See all releases

Code changes from version 2.8.5 to 2.8.6

admin/settings.php CHANGED
File without changes
assets/css/essential-addons-elementor.css CHANGED
@@ -6225,60 +6225,270 @@ a.eael-gallery-load-more, a.eael-gallery-load-more:hover {
6225
  /*------------------------------*/
6226
  /* 33. Progress Bar
6227
  /*------------------------------*/
6228
- .ldBar {
6229
- position: relative;
 
 
 
 
 
 
 
 
 
 
6230
  }
6231
 
6232
- .ldBar.label-center>.ldBar-label {
6233
- position: absolute;
6234
- top: 50%;
6235
- left: 50%;
6236
- -webkit-transform: translate(-50%, -50%);
6237
- transform: translate(-50%, -50%);
6238
- text-shadow: 0 0 3px #fff
 
 
 
 
6239
  }
6240
 
6241
- .ldBar-label:after {
6242
- content: "%";
6243
- display: inline
 
 
 
 
 
 
 
 
6244
  }
6245
 
6246
- .ldBar.no-percent .ldBar-label:after {
6247
- content: ""
 
 
 
 
 
 
 
 
 
6248
  }
6249
 
6250
- .eael-progress-bar-container {
6251
- overflow: hidden;
6252
  }
6253
 
6254
- .eael-progress-bar-container .progress-title,
6255
- .eael-progress-bar-container .ldBar-label {
6256
- font-family: "Roboto", Sans-serif;
6257
- font-weight: 600;
6258
  }
6259
 
6260
- .progress-title h1,
6261
- .progress-title h2,
6262
- .progress-title h3,
6263
- .progress-title h4,
6264
- .progress-title h5,
6265
- .progress-title h6,
6266
- .progress-title p {
6267
- margin: 0;
6268
  }
6269
 
6270
- .eael-progress-bar-container.center .ldBar {
6271
- margin: 0 auto;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6272
  }
6273
 
6274
- div[data-preset="line"] .ldBar-label,
6275
- div[data-preset="rainbow"] .ldBar-label {
6276
- text-align: right;
6277
- position: absolute;
6278
- top: -20px;
6279
- right: 0;
 
 
6280
  }
6281
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6282
 
6283
  /*------------------------------*/
6284
  /* 34. Image accordion
6225
  /*------------------------------*/
6226
  /* 33. Progress Bar
6227
  /*------------------------------*/
6228
+ /*Animation*/
6229
+ @-webkit-keyframes animateStripe {
6230
+ 0% {
6231
+ -webkit-transform: translate(0, 0);
6232
+ transform: translate(0, 0);
6233
+ }
6234
+
6235
+ 100% {
6236
+ -webkit-transform: translate(35px, 0);
6237
+ transform: translate(35px, 0);
6238
+ }
6239
+
6240
  }
6241
 
6242
+ @keyframes animateStripe {
6243
+ 0% {
6244
+ -webkit-transform: translate(0, 0);
6245
+ transform: translate(0, 0);
6246
+ }
6247
+
6248
+ 100% {
6249
+ -webkit-transform: translate(35px, 0);
6250
+ transform: translate(35px, 0);
6251
+ }
6252
+
6253
  }
6254
 
6255
+ @-webkit-keyframes animateStripeRTL {
6256
+ 0% {
6257
+ -webkit-transform: translate(0, 0);
6258
+ transform: translate(0, 0);
6259
+ }
6260
+
6261
+ 100% {
6262
+ -webkit-transform: translate(-35px, 0);
6263
+ transform: translate(-35px, 0);
6264
+ }
6265
+
6266
  }
6267
 
6268
+ @keyframes animateStripeRTL {
6269
+ 0% {
6270
+ -webkit-transform: translate(0, 0);
6271
+ transform: translate(0, 0);
6272
+ }
6273
+
6274
+ 100% {
6275
+ -webkit-transform: translate(-35px, 0);
6276
+ transform: translate(-35px, 0);
6277
+ }
6278
+
6279
  }
6280
 
6281
+ .eael-progressbar {
6282
+ position: relative;
6283
  }
6284
 
6285
+ .eael-progressbar-title {
6286
+ font-size: 20px;
6287
+ font-weight: 400;
 
6288
  }
6289
 
6290
+ /*Line*/
6291
+ .eael-progressbar-line {
6292
+ position: relative;
6293
+ display: block;
6294
+ width: 100%;
6295
+ height: 12px;
6296
+ background-color: #eee;
 
6297
  }
6298
 
6299
+ .eael-progressbar-line-fill {
6300
+ display: inline-block;
6301
+ position: absolute;
6302
+ top: 50%;
6303
+ left: 0;
6304
+ width: 0%;
6305
+ height: 12px;
6306
+ background-color: #000;
6307
+ -webkit-transform: translateY(-50%);
6308
+ -ms-transform: translateY(-50%);
6309
+ transform: translateY(-50%);
6310
+ -webkit-transition: width 1500ms linear;
6311
+ -o-transition: width 1500ms linear;
6312
+ transition: width 1500ms linear;
6313
+ overflow: hidden;
6314
+ }
6315
+
6316
+ .eael-progressbar-line-stripe .eael-progressbar-line-fill:after {
6317
+ content: '';
6318
+ position: absolute;
6319
+ top: 0;
6320
+ left: -35px;
6321
+ width: calc(100% + 70px);
6322
+ height: 100%;
6323
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
6324
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
6325
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
6326
+ background-size: 35px 35px;
6327
  }
6328
 
6329
+ .eael-progressbar-line-animate .eael-progressbar-line-fill:after {
6330
+ -webkit-animation: animateStripe 2s linear infinite;
6331
+ animation: animateStripe 2s linear infinite
6332
+ }
6333
+
6334
+ .eael-progressbar-line-animate-rtl .eael-progressbar-line-fill:after {
6335
+ -webkit-animation: animateStripeRTL 2s linear infinite;
6336
+ animation: animateStripeRTL 2s linear infinite
6337
  }
6338
 
6339
+ .eael-progressbar-line .eael-progressbar-count-wrap {
6340
+ position: absolute;
6341
+ right: 0;
6342
+ bottom: calc(100% + 5px);
6343
+ font-size: 16px;
6344
+ font-weight: 400;
6345
+ line-height: 1;
6346
+ }
6347
+
6348
+ /*Circle*/
6349
+ .eael-progressbar-circle {
6350
+ position: relative;
6351
+ width: 200px;
6352
+ height: 200px;
6353
+ }
6354
+
6355
+ .eael-progressbar-circle-shadow {
6356
+ width: 220px;
6357
+ height: 220px;
6358
+ padding: 10px;
6359
+ border-radius: 50%;
6360
+ }
6361
+
6362
+ .eael-progressbar-circle-pie {
6363
+ position: absolute;
6364
+ top: 0;
6365
+ left: 0;
6366
+ width: 100%;
6367
+ height: 100%;
6368
+ -webkit-clip-path: inset(0 0 0 50%);
6369
+ clip-path: inset(0 0 0 50%);
6370
+ }
6371
+
6372
+ .eael-progressbar-circle-inner {
6373
+ height: 100%;
6374
+ width: 100%;
6375
+ border-width: 12px;
6376
+ border-style: solid;
6377
+ border-color: #eee;
6378
+ border-radius: 50%;
6379
+ }
6380
+
6381
+ .eael-progressbar-circle-half {
6382
+ position: absolute;
6383
+ left: 0;
6384
+ top: 0;
6385
+ height: 100%;
6386
+ width: 100%;
6387
+ border-width: 12px;
6388
+ border-style: solid;
6389
+ border-color: #000;
6390
+ border-radius: 50%;
6391
+ -webkit-clip-path: inset(0 50% 0 0);
6392
+ clip-path: inset(0 50% 0 0);
6393
+ }
6394
+
6395
+ .eael-progressbar-circle-half-left {
6396
+ -webkit-transform: rotate(0deg);
6397
+ -ms-transform: rotate(0deg);
6398
+ transform: rotate(0deg);
6399
+ }
6400
+
6401
+ .eael-progressbar-circle-half-right {
6402
+ -webkit-transform: rotate(180deg);
6403
+ -ms-transform: rotate(180deg);
6404
+ transform: rotate(180deg);
6405
+ visibility: hidden;
6406
+ }
6407
+
6408
+ .eael-progressbar-circle-inner-content {
6409
+ position: absolute;
6410
+ top: 50%;
6411
+ width: 100%;
6412
+ -webkit-transform: translateY(-50%);
6413
+ -ms-transform: translateY(-50%);
6414
+ transform: translateY(-50%);
6415
+ text-align: center;
6416
+ }
6417
+
6418
+ /*Half Circle*/
6419
+ .eael-progressbar-half-circle {
6420
+ position: relative;
6421
+ width: 200px;
6422
+ height: 100px;
6423
+ overflow: hidden;
6424
+ }
6425
+
6426
+ .eael-progressbar-half-circle .eael-progressbar-circle-pie {
6427
+ -webkit-clip-path: inset(0 0 50% 0);
6428
+ clip-path: inset(0 0 50% 0);
6429
+ }
6430
+
6431
+ .eael-progressbar-half-circle .eael-progressbar-circle-half {
6432
+ -webkit-clip-path: inset(50% 0 0 0);
6433
+ clip-path: inset(50% 0 0 0);
6434
+ -webkit-transform: rotate(0deg);
6435
+ -ms-transform: rotate(0deg);
6436
+ transform: rotate(0deg);
6437
+ -webkit-transition: -webkit-transform 1500ms linear;
6438
+ transition: -webkit-transform 1500ms linear;
6439
+ -o-transition: transform 1500ms linear;
6440
+ transition: transform 1500ms linear;
6441
+ transition: transform 1500ms linear, -webkit-transform 1500ms linear;
6442
+ }
6443
+
6444
+ .eael-progressbar-half-circle .eael-progressbar-circle-inner-content {
6445
+ top: initial;
6446
+ bottom: 0;
6447
+ -webkit-transform: translateY(0);
6448
+ -ms-transform: translateY(0);
6449
+ transform: translateY(0);
6450
+ }
6451
+
6452
+ /*Label*/
6453
+ .eael-progressbar-half-circle-after {
6454
+ position: relative;
6455
+ font-size: 12px;
6456
+ font-weight: 400;
6457
+ clear: both;
6458
+ }
6459
+
6460
+ .eael-progressbar-postfix-label {
6461
+ float: right;
6462
+ }
6463
+
6464
+ /*Title*/
6465
+ .eael-progressbar-circle .eael-progressbar-title,
6466
+ .eael-progressbar-half-circle .eael-progressbar-title {
6467
+ font-size: 16px;
6468
+ font-weight: 400;
6469
+ }
6470
+
6471
+ .eael-progressbar-circle .eael-progressbar-count-wrap,
6472
+ .eael-progressbar-half-circle .eael-progressbar-count-wrap {
6473
+ font-size: 28px;
6474
+ font-weight: 700;
6475
+ }
6476
+
6477
+ /*alignment*/
6478
+ .eael-progressbar-line-container.left,
6479
+ .eael-progressbar-circle-container.left > div {
6480
+ margin: 0 auto 0 0;
6481
+ }
6482
+
6483
+ .eael-progressbar-line-container.center,
6484
+ .eael-progressbar-circle-container.center > div {
6485
+ margin: 0 auto;
6486
+ }
6487
+
6488
+ .eael-progressbar-line-container.right,
6489
+ .eael-progressbar-circle-container.right > div {
6490
+ margin: 0 0 0 auto;
6491
+ }
6492
 
6493
  /*------------------------------*/
6494
  /* 34. Image accordion
assets/js/eael-scripts.js CHANGED
@@ -625,114 +625,7 @@
625
  }
626
 
627
  var ProgressBar = function ($scope, $) {
628
-
629
- var $progressBar = $scope.find('.eael-progress-bar-container').eq(0),
630
- $layout = mybe_note_undefined($progressBar, "layout"),
631
- $id = mybe_note_undefined($progressBar, "id"),
632
- $number = mybe_note_undefined($progressBar, "number"),
633
- $class = '.elementor-element-' + $scope.data('id'),
634
- $line_stroke_color = mybe_note_undefined($progressBar, "line-stroke-color"),
635
- $line_stroke_width = mybe_note_undefined($progressBar, "line-stroke-width"),
636
- $line_stroke_trail_color = mybe_note_undefined($progressBar, "line-stroke-trail-color"),
637
- $line_stroke_trail_width = mybe_note_undefined($progressBar, "line-stroke-trail-width"),
638
- $line_direction = mybe_note_undefined($progressBar, "line-direction"),
639
-
640
- $fan_stroke_color = mybe_note_undefined($progressBar, "fan-stroke-color"),
641
- $fan_stroke_width = mybe_note_undefined($progressBar, "fan-stroke-width"),
642
- $fan_stroke_trail_color = mybe_note_undefined($progressBar, "fan-stroke-trail-color"),
643
- $fan_stroke_trail_width = mybe_note_undefined($progressBar, "fan-stroke-trail-width"),
644
- $fan_direction = mybe_note_undefined($progressBar, "fan-direction"),
645
-
646
- $circle_stroke_color = mybe_note_undefined($progressBar, "circle-stroke-color"),
647
- $circle_stroke_width = mybe_note_undefined($progressBar, "circle-stroke-width"),
648
- $circle_stroke_trail_color = mybe_note_undefined($progressBar, "circle-stroke-trail-color"),
649
- $circle_stroke_trail_width = mybe_note_undefined($progressBar, "circle-stroke-trail-width"),
650
- $circle_direction = mybe_note_undefined($progressBar, "circle-direction"),
651
-
652
- $bubble_circle_color = mybe_note_undefined($progressBar, "bubble-circle-color"),
653
- $bubble_bg_color = mybe_note_undefined($progressBar, "bubble-bg-color"),
654
- $bubble_circle_width = mybe_note_undefined($progressBar, "bubble-circle-width"),
655
- $bubble_direction = mybe_note_undefined($progressBar, "bubble-direction"),
656
-
657
- $rainbow_stroke_width = mybe_note_undefined($progressBar, "rainbow-stroke-width"),
658
- $rainbow_stroke_trail_width = mybe_note_undefined($progressBar, "rainbow-stroke-trail-width"),
659
- $rainbow_color_one = mybe_note_undefined($progressBar, "rainbow-color-one"),
660
- $rainbow_color_two = mybe_note_undefined($progressBar, "rainbow-color-two"),
661
- $rainbow_color_three = mybe_note_undefined($progressBar, "rainbow-color-three"),
662
- $rainbow_color_four = mybe_note_undefined($progressBar, "rainbow-color-four"),
663
- $rainbow_color_five = mybe_note_undefined($progressBar, "rainbow-color-five"),
664
- $rainbow_direction = mybe_note_undefined($progressBar, "rainbow-direction");
665
-
666
-
667
- if('rainbow' == $layout){
668
- var bar = new ldBar($class + ' .inside-progressbar', {
669
- "type": 'stroke',
670
- "path": 'M0 10L100 10',
671
- "stroke": 'data:ldbar/res,gradient(0,1,'+ $rainbow_color_one +','+ $rainbow_color_two +','+ $rainbow_color_three +','+ $rainbow_color_four +','+ $rainbow_color_five +')',
672
- "aspect-ratio": 'none',
673
- "stroke-width": $rainbow_stroke_width,
674
- "stroke-trail-width": $rainbow_stroke_trail_width,
675
- "stroke-dir": $rainbow_direction
676
- }).set($number);
677
- }
678
- else if('line' == $layout){
679
- var bar = new ldBar($class + ' .inside-progressbar', {
680
- "type": 'stroke',
681
- "path": 'M0 10L100 10',
682
- "stroke": $line_stroke_color,
683
- "stroke-width": $line_stroke_width,
684
- "stroke-trail": $line_stroke_trail_color,
685
- "stroke-trail-width": $line_stroke_trail_width,
686
- "aspect-ratio": 'none',
687
- "stroke-dir": $line_direction
688
- }).set($number);
689
- }
690
- else if('fan' == $layout){
691
- var bar = new ldBar($class + ' .inside-progressbar', {
692
- "type": 'stroke',
693
- "path": 'M10 90A40 40 0 0 1 90 90',
694
- "fill-dir": $fan_direction,
695
- "fill": $fan_stroke_color,
696
- "fill-background": $fan_stroke_trail_color,
697
- "fill-background-extrude": $fan_stroke_width,
698
- "stroke-dir": 'normal',
699
- "stroke": $fan_stroke_color,
700
- "stroke-width": $fan_stroke_width,
701
- "stroke-trail": $fan_stroke_trail_color,
702
- "stroke-trail-width": $fan_stroke_trail_width
703
- }).set($number);
704
- }
705
- else if('circle' == $layout){
706
- var bar = new ldBar($class + ' .inside-progressbar', {
707
- "type": 'stroke',
708
- "path": 'M50 10A40 40 0 0 1 50 90A40 40 0 0 1 50 10',
709
- "fill-dir": $circle_direction,
710
- "fill": $circle_stroke_color,
711
- "fill-background": $circle_stroke_trail_color,
712
- "fill-background-extrude": $circle_stroke_width,
713
- "stroke-dir": 'normal',
714
- "stroke": $circle_stroke_color,
715
- "stroke-width": $circle_stroke_width,
716
- "stroke-trail": $circle_stroke_trail_color,
717
- "stroke-trail-width": $circle_stroke_trail_width
718
- }).set($number);
719
- }
720
- else if('bubble' == $layout){
721
- var bar = new ldBar($class + ' .inside-progressbar', {
722
- "type": 'fill',
723
- "path": 'M50 10A40 40 0 0 1 50 90A40 40 0 0 1 50 10',
724
- "fill-dir": $bubble_direction,
725
- "fill": 'data:ldbar/res,bubble('+ $bubble_bg_color +','+ $bubble_circle_color +')',
726
- "pattern-size": $bubble_circle_width,
727
- "fill-background": '#ddd',
728
- "fill-background-extrude": 2,
729
- "stroke-dir": 'normal',
730
- "stroke": '#25b',
731
- "stroke-width": '3',
732
- "stroke-trail": '#ddd',
733
- "stroke-trail-width": 0.5
734
- }).set($number);
735
- }
736
  }
737
 
738
  $(window).on('elementor/frontend/init', function () {
625
  }
626
 
627
  var ProgressBar = function ($scope, $) {
628
+ jQuery('.eael-progressbar', $scope).eaelProgressBar()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
629
  }
630
 
631
  $(window).on('elementor/frontend/init', function () {
assets/js/progress-bar.js ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($) {
2
+ // inView
3
+ var inviewObjects = [],
4
+ viewportSize, viewportOffset,
5
+ d = document,
6
+ w = window,
7
+ documentElement = d.documentElement,
8
+ timer
9
+
10
+ $.event.special.inview = {
11
+ add: function(data) {
12
+ inviewObjects.push({
13
+ data: data,
14
+ $element: $(this),
15
+ element: this
16
+ })
17
+
18
+ if (!timer && inviewObjects.length) {
19
+ timer = setInterval(checkInView, 250)
20
+ }
21
+ },
22
+
23
+ remove: function(data) {
24
+ for (var i = 0; i < inviewObjects.length; i++) {
25
+ var inviewObject = inviewObjects[i]
26
+ if (inviewObject.element === this && inviewObject.data.guid === data.guid) {
27
+ inviewObjects.splice(i, 1)
28
+ break
29
+ }
30
+ }
31
+
32
+ if (!inviewObjects.length) {
33
+ clearInterval(timer)
34
+ timer = null
35
+ }
36
+ }
37
+ }
38
+
39
+ function getViewportSize() {
40
+ var mode, domObject, size = {
41
+ height: w.innerHeight,
42
+ width: w.innerWidth
43
+ }
44
+
45
+ if (!size.height) {
46
+ mode = d.compatMode
47
+ if (mode || !$.support.boxModel) { // IE, Gecko
48
+ domObject = mode === 'CSS1Compat' ?
49
+ documentElement : // Standards
50
+ d.body // Quirks
51
+ size = {
52
+ height: domObject.clientHeight,
53
+ width: domObject.clientWidth
54
+ }
55
+ }
56
+ }
57
+
58
+ return size
59
+ }
60
+
61
+ function getViewportOffset() {
62
+ return {
63
+ top: w.pageYOffset || documentElement.scrollTop || d.body.scrollTop,
64
+ left: w.pageXOffset || documentElement.scrollLeft || d.body.scrollLeft
65
+ }
66
+ }
67
+
68
+ function checkInView() {
69
+ if (!inviewObjects.length) {
70
+ return
71
+ }
72
+
73
+ var i = 0,
74
+ $elements = $.map(inviewObjects, function(inviewObject) {
75
+ var selector = inviewObject.data.selector,
76
+ $element = inviewObject.$element
77
+ return selector ? $element.find(selector) : $element
78
+ })
79
+
80
+ viewportSize = viewportSize || getViewportSize()
81
+ viewportOffset = viewportOffset || getViewportOffset()
82
+
83
+ for (; i < inviewObjects.length; i++) {
84
+ if (!$.contains(documentElement, $elements[i][0])) {
85
+ continue
86
+ }
87
+
88
+ var $element = $($elements[i]),
89
+ elementSize = {
90
+ height: $element[0].offsetHeight,
91
+ width: $element[0].offsetWidth
92
+ },
93
+ elementOffset = $element.offset(),
94
+ inView = $element.data('inview')
95
+
96
+ if (!viewportOffset || !viewportSize) {
97
+ return
98
+ }
99
+
100
+ if (elementOffset.top + elementSize.height > viewportOffset.top &&
101
+ elementOffset.top < viewportOffset.top + viewportSize.height &&
102
+ elementOffset.left + elementSize.width > viewportOffset.left &&
103
+ elementOffset.left < viewportOffset.left + viewportSize.width) {
104
+ if (!inView) {
105
+ $element.data('inview', true).trigger('inview', [true])
106
+ }
107
+ } else if (inView) {
108
+ $element.data('inview', false).trigger('inview', [false])
109
+ }
110
+ }
111
+ }
112
+
113
+ $(w).on("scroll resize scrollstop", function() {
114
+ viewportSize = viewportOffset = null
115
+ })
116
+
117
+ if (!documentElement.addEventListener && documentElement.attachEvent) {
118
+ documentElement.attachEvent("onfocusin", function() {
119
+ viewportOffset = null
120
+ })
121
+ }
122
+
123
+ // eaelProgressBar
124
+ $.fn.eaelProgressBar = function() {
125
+ var $this = $(this)
126
+ var $layout = $this.data('layout')
127
+ var $num = $this.data('count')
128
+ var $duration = $this.data('duration')
129
+
130
+ $this.one('inview', function() {
131
+ if ($layout == 'line') {
132
+ $('.eael-progressbar-line-fill', $this).css({
133
+ 'width': $num + '%',
134
+ })
135
+ } else if ($layout == 'half_circle') {
136
+ $('.eael-progressbar-circle-half', $this).css({
137
+ 'transform': 'rotate(' + ($num * 1.8) + 'deg)',
138
+ })
139
+ }
140
+
141
+ $('.eael-progressbar-count', $this).prop({
142
+ 'counter': 0
143
+ }).animate({
144
+ counter: $num
145
+ }, {
146
+ duration: $duration,
147
+ easing: 'linear',
148
+ step: function(counter) {
149
+ if ($layout == 'circle') {
150
+ var rotate = (counter * 3.6)
151
+ $('.eael-progressbar-circle-half-left', $this).css({
152
+ 'transform': "rotate(" + rotate + "deg)",
153
+ })
154
+ if (rotate > 180) {
155
+ $('.eael-progressbar-circle-pie', $this).css({
156
+ 'clip-path': 'inset(0)'
157
+ })
158
+ $('.eael-progressbar-circle-half-right', $this).css({
159
+ 'visibility': 'visible'
160
+ })
161
+ }
162
+ }
163
+
164
+ $(this).text(Math.ceil(counter))
165
+ }
166
+ })
167
+ })
168
+ }
169
+ }(jQuery))
elements/progress-bar/progress-bar.php CHANGED
@@ -1,813 +1,281 @@
1
  <?php
2
  namespace Elementor;
3
 
4
- if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
5
-
 
 
6
 
7
  class Widget_Eael_Progress_Bar extends Widget_Base {
8
-
9
- public function get_name() {
10
  return 'eael-progress-bar';
11
  }
12
 
13
  public function get_title() {
14
- return esc_html__( 'EA Progress Bar', 'essential-addons-elementor' );
15
  }
16
 
17
  public function get_icon() {
18
  return 'fa fa-tasks';
19
  }
20
 
21
- public function get_categories() {
22
- return [ 'essential-addons-elementor' ];
23
- }
24
 
25
- protected function _register_controls() {
26
 
 
 
27
  /*-----------------------------------------------------------------------------------*/
28
- /* CONTENT TAB
29
- /*-----------------------------------------------------------------------------------*/
30
-
31
- /**
32
- * Content Tab: Progress
33
- */
34
- $this->start_controls_section(
35
- 'eael_section_progress_bar',
36
- [
37
- 'label' => __( 'Progress', 'essential-addons-elementor' ),
38
- ]
39
- );
40
-
41
- $this->add_control(
42
- 'progress_bar_show_title',
43
- [
44
- 'label' => esc_html__( 'Display Title', 'essential-addons-elementor' ),
45
- 'type' => Controls_Manager::SWITCHER,
46
- 'return_value' => 'yes',
47
- 'default' => 'yes',
48
- ]
49
- );
50
-
51
- $this->add_control(
52
- 'progress_bar_title',
53
- [
54
- 'label' => __( 'Title', 'essential-addons-elementor' ),
55
- 'type' => Controls_Manager::TEXT,
56
- 'dynamic' => [
57
- 'active' => true,
58
- ],
59
- 'default' => __( 'Progress Bar Title', 'essential-addons-elementor' ),
60
- 'separator' => 'before',
61
- ]
62
- );
63
-
64
- $this->add_control(
65
- 'title_html_tag',
66
- [
67
- 'label' => __( 'Title HTML Tag', 'essential-addons-elementor' ),
68
- 'type' => Controls_Manager::SELECT,
69
- 'default' => 'div',
70
- 'options' => [
71
- 'h1' => __( 'H1', 'essential-addons-elementor' ),
72
- 'h2' => __( 'H2', 'essential-addons-elementor' ),
73
- 'h3' => __( 'H3', 'essential-addons-elementor' ),
74
- 'h4' => __( 'H4', 'essential-addons-elementor' ),
75
- 'h5' => __( 'H5', 'essential-addons-elementor' ),
76
- 'h6' => __( 'H6', 'essential-addons-elementor' ),
77
- 'div' => __( 'div', 'essential-addons-elementor' ),
78
- 'span' => __( 'span', 'essential-addons-elementor' ),
79
- 'p' => __( 'p', 'essential-addons-elementor' ),
80
- ],
81
- ]
82
- );
83
-
84
- $this->add_control(
85
- 'progress_bar_layout',
86
- [
87
- 'label' => __( 'Layout', 'essential-addons-elementor' ),
88
- 'type' => Controls_Manager::SELECT,
89
- 'default' => 'line',
90
- 'options' => [
91
- 'line' => __( 'Line', 'essential-addons-elementor' ),
92
- 'fan' => __( 'Fan', 'essential-addons-elementor' ),
93
- 'circle' => __( 'Circle', 'essential-addons-elementor' ),
94
- 'bubble' => __( 'Bubble', 'essential-addons-elementor' ),
95
- 'rainbow' => __( 'Rainbow', 'essential-addons-elementor' )
96
- ],
97
- 'separator' => 'before',
98
- ]
99
- );
100
-
101
- $this->add_control(
102
- 'progress_bar_show_number',
103
- [
104
- 'label' => esc_html__( 'Display Number', 'essential-addons-elementor' ),
105
- 'type' => Controls_Manager::SWITCHER,
106
- 'return_value' => 'yes',
107
- 'default' => 'yes',
108
- ]
109
- );
110
-
111
- $this->add_control(
112
- 'progress_number',
113
- [
114
- 'label' => __( 'Number', 'essential-addons-elementor' ),
115
- 'type' => Controls_Manager::NUMBER,
116
- 'dynamic' => [
117
- 'active' => true,
118
- ],
119
- 'default' => __( '60', 'essential-addons-elementor' ),
120
- 'separator' => 'before',
121
- ]
122
- );
123
-
124
- $this->end_controls_section();
125
-
126
- /**
127
- * Content Tab: Settings for line progress bar
128
- */
129
-
130
- $this->start_controls_section(
131
- 'section_progress_bar_line_settings',
132
- [
133
- 'label' => __( 'Line Progress Bar Settings ', 'essential-addons-elementor' ),
134
- 'condition' => [
135
- 'progress_bar_layout' => 'line',
136
- ],
137
- ]
138
- );
139
-
140
- $this->add_control(
141
- 'progress_bar_line_direction',
142
- [
143
- 'label' => __( 'Direction', 'essential-addons-elementor' ),
144
- 'type' => Controls_Manager::CHOOSE,
145
- 'options' => [
146
- 'normal' => [
147
- 'title' => __( 'Left To Right', 'essential-addons-elementor' ),
148
- 'icon' => 'fa fa-align-left',
149
- ],
150
- 'reverse' => [
151
- 'title' => __( 'Right To Left', 'essential-addons-elementor' ),
152
- 'icon' => 'fa fa-align-right',
153
- ],
154
- ],
155
- 'default' => 'normal',
156
- ]
157
- );
158
-
159
- $this->add_control(
160
- 'progress_bar_line_stroke_color',
161
- [
162
- 'label' => __( 'Stroke Color', 'essential-addons-elementor' ),
163
- 'type' => Controls_Manager::COLOR,
164
- 'default' => '#25b',
165
- ]
166
- );
167
 
168
- $this->add_control(
169
- 'progress_bar_line_stroke_width',
 
 
 
170
  [
171
- 'label' => __( 'Stroke Width', 'essential-addons-elementor' ),
172
- 'type' => Controls_Manager::NUMBER,
173
- 'min' => 1,
174
- 'max' => 100,
175
- 'step' => 1,
176
- 'default' => 3,
177
  ]
178
  );
179
 
180
- $this->add_control(
181
- 'progress_bar_line_stroke_trail_color',
182
- [
183
- 'label' => __( 'Stroke Trail Color', 'essential-addons-elementor' ),
184
- 'type' => Controls_Manager::COLOR,
185
- 'default' => '#ddd',
186
- ]
187
- );
188
-
189
- $this->add_control(
190
- 'progress_bar_line_stroke_trail_width',
191
- [
192
- 'label' => __( 'Stroke Trail Width', 'essential-addons-elementor' ),
193
- 'type' => Controls_Manager::NUMBER,
194
- 'min' => 1,
195
- 'max' => 100,
196
- 'step' => .5,
197
- 'default' => .5,
198
- ]
199
- );
200
-
201
- $this->end_controls_section();
202
-
203
- /**
204
- * Content Tab: Settings for fan progress bar
205
- */
206
-
207
- $this->start_controls_section(
208
- 'section_progress_bar_fan_settings',
209
- [
210
- 'label' => __( 'Fan Progress Bar Settings ', 'essential-addons-elementor' ),
211
- 'condition' => [
212
- 'progress_bar_layout' => 'fan',
213
- ],
214
- ]
215
- );
216
-
217
- $this->add_control(
218
- 'progress_bar_fan_direction',
219
- [
220
- 'label' => __( 'Direction', 'essential-addons-elementor' ),
221
- 'type' => Controls_Manager::CHOOSE,
222
- 'options' => [
223
- 'ltr' => [
224
- 'title' => __( 'Left To Right', 'essential-addons-elementor' ),
225
- 'icon' => 'fa fa-align-left',
226
- ],
227
- 'rtl' => [
228
- 'title' => __( 'Right To Left', 'essential-addons-elementor' ),
229
- 'icon' => 'fa fa-align-right',
230
- ],
231
- 'btt' => [
232
- 'title' => __( 'Bottom To Top', 'essential-addons-elementor' ),
233
- 'icon' => 'fa fa-arrow-up',
234
- ],
235
- 'ttb' => [
236
- 'title' => __( 'Top To Bottom', 'essential-addons-elementor' ),
237
- 'icon' => 'fa fa-arrow-down',
238
- ],
239
- ],
240
- 'default' => 'btt',
241
- ]
242
- );
243
-
244
- $this->add_control(
245
- 'progress_bar_fan_stroke_color',
246
- [
247
- 'label' => __( 'Stroke Color', 'essential-addons-elementor' ),
248
- 'type' => Controls_Manager::COLOR,
249
- 'default' => '#25b',
250
- ]
251
- );
252
-
253
- $this->add_control(
254
- 'progress_bar_fan_stroke_width',
255
- [
256
- 'label' => __( 'Stroke Width', 'essential-addons-elementor' ),
257
- 'type' => Controls_Manager::NUMBER,
258
- 'min' => 1,
259
- 'max' => 100,
260
- 'step' => 1,
261
- 'default' => 3,
262
- ]
263
- );
264
-
265
- $this->add_control(
266
- 'progress_bar_fan_stroke_trail_color',
267
- [
268
- 'label' => __( 'Stroke Trail Color', 'essential-addons-elementor' ),
269
- 'type' => Controls_Manager::COLOR,
270
- 'default' => '#ddd',
271
- ]
272
- );
273
-
274
- $this->add_control(
275
- 'progress_bar_fan_stroke_trail_width',
276
- [
277
- 'label' => __( 'Stroke Trail Width', 'essential-addons-elementor' ),
278
- 'type' => Controls_Manager::NUMBER,
279
- 'min' => 1,
280
- 'max' => 100,
281
- 'step' => 1,
282
- 'default' => 1,
283
- ]
284
- );
285
-
286
- $this->end_controls_section();
287
-
288
- /**
289
- * Content Tab: Settings for circle progress bar
290
- */
291
-
292
- $this->start_controls_section(
293
- 'section_progress_bar_circle_settings',
294
- [
295
- 'label' => __( 'Circle Progress Bar Settings ', 'essential-addons-elementor' ),
296
- 'condition' => [
297
- 'progress_bar_layout' => 'circle',
298
- ],
299
- ]
300
- );
301
-
302
- $this->add_control(
303
- 'progress_bar_circle_direction',
304
  [
305
- 'label' => __( 'Direction', 'essential-addons-elementor' ),
306
- 'type' => Controls_Manager::CHOOSE,
307
  'options' => [
308
- 'ltr' => [
309
- 'title' => __( 'Left To Right', 'essential-addons-elementor' ),
310
- 'icon' => 'fa fa-align-left',
311
- ],
312
- 'rtl' => [
313
- 'title' => __( 'Right To Left', 'essential-addons-elementor' ),
314
- 'icon' => 'fa fa-align-right',
315
- ],
316
- 'btt' => [
317
- 'title' => __( 'Bottom To Top', 'essential-addons-elementor' ),
318
- 'icon' => 'fa fa-arrow-up',
319
- ],
320
- 'ttb' => [
321
- 'title' => __( 'Top To Bottom', 'essential-addons-elementor' ),
322
- 'icon' => 'fa fa-arrow-down',
323
- ],
324
- ],
325
- 'default' => 'btt',
326
- ]
327
- );
328
-
329
- $this->add_control(
330
- 'progress_bar_circle_stroke_color',
331
- [
332
- 'label' => __( 'Stroke Color', 'essential-addons-elementor' ),
333
- 'type' => Controls_Manager::COLOR,
334
- 'default' => '#25b',
335
- ]
336
- );
337
-
338
- $this->add_control(
339
- 'progress_bar_circle_stroke_width',
340
- [
341
- 'label' => __( 'Stroke Width', 'essential-addons-elementor' ),
342
- 'type' => Controls_Manager::NUMBER,
343
- 'min' => 1,
344
- 'max' => 100,
345
- 'step' => 1,
346
- 'default' => 3,
347
  ]
348
  );
349
 
350
  $this->add_control(
351
- 'progress_bar_circle_stroke_trail_color',
352
- [
353
- 'label' => __( 'Stroke Trail Color', 'essential-addons-elementor' ),
354
- 'type' => Controls_Manager::COLOR,
355
- 'default' => '#ddd',
356
- ]
357
- );
358
-
359
- $this->add_control(
360
- 'progress_bar_circle_stroke_trail_width',
361
- [
362
- 'label' => __( 'Stroke Trail Width', 'essential-addons-elementor' ),
363
- 'type' => Controls_Manager::NUMBER,
364
- 'min' => 1,
365
- 'max' => 100,
366
- 'step' => 1,
367
- 'default' => 1,
368
- ]
369
- );
370
-
371
- $this->end_controls_section();
372
-
373
- /**
374
- * Content Tab: Settings for bubble progress bar
375
- */
376
-
377
- $this->start_controls_section(
378
- 'section_progress_bar_bubble_settings',
379
  [
380
- 'label' => __( 'Bubble Progress Bar Settings ', 'essential-addons-elementor' ),
381
- 'condition' => [
382
- 'progress_bar_layout' => 'bubble',
383
- ],
 
384
  ]
385
  );
386
 
387
- $this->add_control(
388
- 'progress_bar_bubble_direction',
389
  [
390
- 'label' => __( 'Direction', 'essential-addons-elementor' ),
391
- 'type' => Controls_Manager::CHOOSE,
392
- 'options' => [
393
- 'ltr' => [
394
- 'title' => __( 'Left To Right', 'essential-addons-elementor' ),
395
- 'icon' => 'fa fa-align-left',
396
- ],
397
- 'rtl' => [
398
- 'title' => __( 'Right To Left', 'essential-addons-elementor' ),
399
- 'icon' => 'fa fa-align-right',
400
- ],
401
- 'btt' => [
402
- 'title' => __( 'Bottom To Top', 'essential-addons-elementor' ),
403
- 'icon' => 'fa fa-arrow-up',
404
- ],
405
- 'ttb' => [
406
- 'title' => __( 'Top To Bottom', 'essential-addons-elementor' ),
407
- 'icon' => 'fa fa-arrow-down',
408
- ],
409
- ],
410
- 'default' => 'btt',
411
  ]
412
  );
413
-
414
- $this->add_control(
415
- 'progress_bar_bubble_circle_color',
416
- [
417
- 'label' => __( 'Bubble Color', 'essential-addons-elementor' ),
418
- 'type' => Controls_Manager::COLOR,
419
- 'default' => '#cef',
420
- ]
421
- );
422
-
423
- $this->add_control(
424
- 'progress_bar_bubble_bg_color',
425
- [
426
- 'label' => __( 'Background Color', 'essential-addons-elementor' ),
427
- 'type' => Controls_Manager::COLOR,
428
- 'default' => '#39d',
429
- ]
430
- );
431
-
432
- $this->add_control(
433
- 'progress_bar_bubble_circle_width',
434
- [
435
- 'label' => __( 'Bubble Width', 'essential-addons-elementor' ),
436
- 'type' => Controls_Manager::NUMBER,
437
- 'min' => 5,
438
- 'max' => 150,
439
- 'step' => 1,
440
- 'default' => 50,
441
- ]
442
- );
443
-
444
- $this->end_controls_section();
445
-
446
- /**
447
- * Content Tab: Settings for rainbow progress bar
448
- */
449
-
450
- $this->start_controls_section(
451
- 'section_progress_bar_rainbow_settings',
452
- [
453
- 'label' => __( 'Rainbow Progress Bar Settings ', 'essential-addons-elementor' ),
454
- 'condition' => [
455
- 'progress_bar_layout' => 'rainbow',
456
- ],
457
- ]
458
- );
459
 
460
- $this->add_control(
461
- 'progress_bar_rainbow_direction',
462
  [
463
- 'label' => __( 'Direction', 'essential-addons-elementor' ),
464
- 'type' => Controls_Manager::CHOOSE,
465
  'options' => [
466
- 'normal' => [
467
- 'title' => __( 'Left To Right', 'essential-addons-elementor' ),
468
- 'icon' => 'fa fa-align-left',
469
- ],
470
- 'reverse' => [
471
- 'title' => __( 'Right To Left', 'essential-addons-elementor' ),
472
- 'icon' => 'fa fa-align-right',
473
- ],
474
- ],
475
- 'default' => 'normal',
476
- ]
477
- );
478
-
479
- $this->add_control(
480
- 'progress_bar_rainbow_stroke_width',
481
- [
482
- 'label' => __( 'Stroke Width', 'essential-addons-elementor' ),
483
- 'type' => Controls_Manager::NUMBER,
484
- 'min' => 1,
485
- 'max' => 100,
486
- 'step' => 1,
487
- 'default' => 3,
488
  ]
489
  );
490
 
491
- $this->add_control(
492
- 'progress_bar_rainbow_stroke_trail_width',
493
- [
494
- 'label' => __( 'Stroke Trail Width', 'essential-addons-elementor' ),
495
- 'type' => Controls_Manager::NUMBER,
496
- 'min' => 1,
497
- 'max' => 100,
498
- 'step' => .5,
499
- 'default' => .5,
500
- ]
501
- );
502
-
503
- $this->add_control(
504
- 'progress_bar_rainbow_color_one',
505
- [
506
- 'label' => __( 'Gradient Color One', 'essential-addons-elementor' ),
507
- 'type' => Controls_Manager::COLOR,
508
- 'default' => '#a551df',
509
- ]
510
- );
511
-
512
- $this->add_control(
513
- 'progress_bar_rainbow_color_two',
514
- [
515
- 'label' => __( 'Gradient Color Two', 'essential-addons-elementor' ),
516
- 'type' => Controls_Manager::COLOR,
517
- 'default' => '#fd51ad',
518
- ]
519
- );
520
-
521
- $this->add_control(
522
- 'progress_bar_rainbow_color_three',
523
- [
524
- 'label' => __( 'Gradient Color Three', 'essential-addons-elementor' ),
525
- 'type' => Controls_Manager::COLOR,
526
- 'default' => '#ff7f82',
527
- ]
528
- );
529
-
530
- $this->add_control(
531
- 'progress_bar_rainbow_color_four',
532
- [
533
- 'label' => __( 'Gradient Color Four', 'essential-addons-elementor' ),
534
- 'type' => Controls_Manager::COLOR,
535
- 'default' => '#ffb874',
536
- ]
537
- );
538
-
539
- $this->add_control(
540
- 'progress_bar_rainbow_color_five',
541
- [
542
- 'label' => __( 'Gradient Color Five', 'essential-addons-elementor' ),
543
- 'type' => Controls_Manager::COLOR,
544
- 'default' => '#ffeb90',
545
- ]
546
- );
547
-
548
-
549
-
550
- $this->end_controls_section();
551
-
552
- /**
553
- * Content Tab: Settings for energy progress bar
554
- */
555
-
556
- $this->start_controls_section(
557
- 'section_progress_bar_energy_settings',
558
- [
559
- 'label' => __( 'Energy Progress Bar Settings ', 'essential-addons-elementor' ),
560
- 'condition' => [
561
- 'progress_bar_layout' => 'energy',
562
- ],
563
- ]
564
- );
565
-
566
- $this->add_control(
567
- 'progress_bar_energy_direction',
568
  [
569
- 'label' => __( 'Direction', 'essential-addons-elementor' ),
570
- 'type' => Controls_Manager::CHOOSE,
571
- 'options' => [
572
- 'ltr' => [
573
- 'title' => __( 'Left To Right', 'essential-addons-elementor' ),
574
- 'icon' => 'fa fa-align-left',
 
 
575
  ],
576
- 'rtl' => [
577
- 'title' => __( 'Right To Left', 'essential-addons-elementor' ),
578
- 'icon' => 'fa fa-align-right',
579
- ],
580
- 'btt' => [
581
- 'title' => __( 'Bottom To Top', 'essential-addons-elementor' ),
582
- 'icon' => 'fa fa-arrow-up',
583
- ],
584
- 'ttb' => [
585
- 'title' => __( 'Top To Bottom', 'essential-addons-elementor' ),
586
- 'icon' => 'fa fa-arrow-down',
587
- ],
588
- ],
589
- 'default' => 'ltr',
590
  ]
591
  );
592
-
593
- $this->add_control(
594
- 'progress_bar_energy_start_color',
595
- [
596
- 'label' => __( 'Start Color', 'essential-addons-elementor' ),
597
- 'type' => Controls_Manager::COLOR,
598
- 'default' => '#f00',
599
- ]
600
- );
601
-
602
- $this->add_control(
603
- 'progress_bar_energy_end_color',
604
- [
605
- 'label' => __( 'End Color', 'essential-addons-elementor' ),
606
- 'type' => Controls_Manager::COLOR,
607
- 'default' => '#ff0',
608
- ]
609
- );
610
 
611
- $this->add_control(
612
- 'progress_bar_energy_bg_color',
613
- [
614
- 'label' => __( 'Background Color', 'essential-addons-elementor' ),
615
- 'type' => Controls_Manager::COLOR,
616
- 'default' => '#444',
617
- ]
618
- );
619
-
620
- $this->end_controls_section();
621
-
622
- /**
623
- * Content Tab: Settings for stripe progress bar
624
- */
625
-
626
- $this->start_controls_section(
627
- 'section_progress_bar_stripe_settings',
628
- [
629
- 'label' => __( 'Stripe Bar Settings ', 'essential-addons-elementor' ),
630
- 'condition' => [
631
- 'progress_bar_layout' => 'stripe',
632
- ],
633
- ]
634
- );
635
-
636
- $this->add_control(
637
- 'progress_bar_stripe_direction',
638
  [
639
- 'label' => __( 'Direction', 'essential-addons-elementor' ),
640
- 'type' => Controls_Manager::CHOOSE,
641
- 'options' => [
642
- 'ltr' => [
643
- 'title' => __( 'Left To Right', 'essential-addons-elementor' ),
644
- 'icon' => 'fa fa-align-left',
645
- ],
646
- 'rtl' => [
647
- 'title' => __( 'Right To Left', 'essential-addons-elementor' ),
648
- 'icon' => 'fa fa-align-right',
649
- ],
650
- 'btt' => [
651
- 'title' => __( 'Bottom To Top', 'essential-addons-elementor' ),
652
- 'icon' => 'fa fa-arrow-up',
653
- ],
654
- 'ttb' => [
655
- 'title' => __( 'Top To Bottom', 'essential-addons-elementor' ),
656
- 'icon' => 'fa fa-arrow-down',
657
- ],
658
- ],
659
- 'default' => 'rtl',
660
  ]
661
- );
662
-
663
- $this->add_control(
664
- 'progress_bar_stripe_start_color',
665
- [
666
- 'label' => __( 'Start Color', 'essential-addons-elementor' ),
667
- 'type' => Controls_Manager::COLOR,
668
- 'default' => '#f00',
669
- ]
670
- );
671
-
672
- $this->add_control(
673
- 'progress_bar_stripe_end_color',
674
- [
675
- 'label' => __( 'End Color', 'essential-addons-elementor' ),
676
- 'type' => Controls_Manager::COLOR,
677
- 'default' => '#ff0',
678
- ]
679
- );
680
-
681
- $this->add_control(
682
- 'progress_bar_stripe_bg_color',
683
- [
684
- 'label' => __( 'Background Color', 'essential-addons-elementor' ),
685
- 'type' => Controls_Manager::COLOR,
686
- 'default' => '#ddd',
687
- ]
688
- );
689
-
690
- $this->end_controls_section();
691
-
692
- /**
693
- * Content Tab: Settings for text progress bar
694
- */
695
-
696
- $this->start_controls_section(
697
- 'section_progress_bar_text_settings',
698
- [
699
- 'label' => __( 'Text Progress Bar Settings ', 'essential-addons-elementor' ),
700
- 'condition' => [
701
- 'progress_bar_layout' => 'text',
702
- ],
703
- ]
704
- );
705
-
706
- $this->add_control(
707
- 'progress_bar_text_title',
708
- [
709
- 'label' => __( 'Title for Text Progress Bar', 'essential-addons-elementor' ),
710
- 'type' => Controls_Manager::TEXT,
711
- 'default' => __( 'LOADING', 'essential-addons-elementor' ),
712
- 'dynamic' => [
713
- 'active' => true,
714
- ],
715
- ]
716
- );
717
 
718
- $this->add_control(
719
- 'progress_bar_text_direction',
720
  [
721
- 'label' => __( 'Direction', 'essential-addons-elementor' ),
722
- 'type' => Controls_Manager::CHOOSE,
723
- 'options' => [
724
- 'ltr' => [
725
- 'title' => __( 'Left To Right', 'essential-addons-elementor' ),
726
- 'icon' => 'fa fa-align-left',
 
 
727
  ],
728
- 'rtl' => [
729
- 'title' => __( 'Right To Left', 'essential-addons-elementor' ),
730
- 'icon' => 'fa fa-align-right',
731
- ],
732
- 'btt' => [
733
- 'title' => __( 'Bottom To Top', 'essential-addons-elementor' ),
734
- 'icon' => 'fa fa-arrow-up',
735
- ],
736
- 'ttb' => [
737
- 'title' => __( 'Top To Bottom', 'essential-addons-elementor' ),
738
- 'icon' => 'fa fa-arrow-down',
739
- ],
740
- ],
741
- 'default' => 'ltr',
742
  ]
743
  );
744
 
745
- $this->add_control(
746
- 'progress_bar_text_bg_color',
747
- [
748
- 'label' => __( 'Background Color', 'essential-addons-elementor' ),
749
- 'type' => Controls_Manager::COLOR,
750
- 'default' => '#ddd',
751
- ]
752
- );
 
 
 
 
753
 
754
- $this->end_controls_section();
 
 
 
 
 
 
 
 
 
 
 
755
 
756
- $this->start_controls_section(
 
 
757
  'eael_section_pro',
758
  [
759
- 'label' => __( 'Go Premium for More Features', 'essential-addons-elementor' )
760
  ]
761
  );
762
 
763
  $this->add_control(
764
  'eael_control_get_pro',
765
  [
766
- 'label' => __( 'Unlock more possibilities', 'essential-addons-elementor' ),
767
  'type' => Controls_Manager::CHOOSE,
768
  'options' => [
769
  '1' => [
770
- 'title' => __( '', 'essential-addons-elementor' ),
771
  'icon' => 'fa fa-unlock-alt',
772
  ],
773
  ],
774
  'default' => '1',
775
- 'description' => '<span class="pro-feature"> Get the <a href="https://essential-addons.com/elementor/buy.php" target="_blank">Pro version</a> for more stunning elements and customization options.</span>'
776
  ]
777
  );
778
 
779
  $this->end_controls_section();
780
 
 
 
781
  /*-----------------------------------------------------------------------------------*/
782
- /* STYLE TAB
783
- /*-----------------------------------------------------------------------------------*/
784
-
785
- /**
786
- * Style Tab: Progress Bar
787
- */
788
- $this->start_controls_section(
789
- 'progress_bar_section_style',
790
- [
791
- 'label' => __( 'Style', 'essential-addons-elementor' ),
792
- 'tab' => Controls_Manager::TAB_STYLE,
793
- ]
794
- );
795
 
796
- $this->add_control(
797
- 'progress_bar_width',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
798
  [
799
- 'label' => __( 'Width', 'essential-addons-elementor' ),
800
  'type' => Controls_Manager::SLIDER,
801
- 'size_units' => [ 'px', '%' ],
802
- 'range' => [
803
  'px' => [
804
- 'min' => 0,
805
  'max' => 1000,
806
  'step' => 1,
807
  ],
808
  '%' => [
809
- 'min' => 0,
810
  'max' => 100,
 
811
  ],
812
  ],
813
  'default' => [
@@ -815,91 +283,277 @@ class Widget_Eael_Progress_Bar extends Widget_Base {
815
  'size' => 100,
816
  ],
817
  'selectors' => [
818
- '{{WRAPPER}} .ldBar' => 'width: {{SIZE}}{{UNIT}} !important;',
819
  ],
820
  ]
821
- );
822
-
823
- $this->add_control(
824
- 'progress_bar_height',
825
  [
826
- 'label' => __( 'Height', 'plugin-domain' ),
827
  'type' => Controls_Manager::SLIDER,
828
- 'size_units' => [ 'px', '%' ],
829
  'range' => [
830
  'px' => [
831
- 'min' => 0,
832
- 'max' => 1000,
833
- 'step' => 5,
834
- ],
835
- '%' => [
836
  'min' => 0,
837
  'max' => 100,
 
838
  ],
839
  ],
 
 
 
 
840
  'selectors' => [
841
- '{{WRAPPER}} .ldBar' => 'height: {{SIZE}}{{UNIT}} !important;',
842
  ],
843
  ]
844
- );
845
-
846
- $this->add_control(
847
- 'progress_bar_title_style',
848
- [
849
- 'label' => __( 'Title Style', 'essential-addons-elementor' ),
850
- 'type' => Controls_Manager::HEADING,
851
- 'separator' => 'before',
852
- ]
853
  );
854
 
855
- $this->add_control(
856
- 'progress_bar_title_color',
857
  [
858
- 'label' => __( 'Title Color', 'essential-addons-elementor' ),
859
  'type' => Controls_Manager::COLOR,
860
- 'default'=> '#303133',
861
  'selectors' => [
862
- '{{WRAPPER}} .progress-title' => 'color: {{VALUE}};',
863
- ]
 
 
 
864
 
 
 
 
 
 
 
 
 
 
 
 
 
 
865
  ]
866
  );
867
 
868
- $this->add_control(
869
- 'progress_bar_title_hover_color',
870
  [
871
- 'label' => __( 'Title Hover Color', 'essential-addons-elementor' ),
872
- 'type' => Controls_Manager::COLOR,
873
- 'default'=> '#23527c',
 
 
 
 
 
 
 
 
 
 
 
874
  'selectors' => [
875
- '{{WRAPPER}} .progress-title:hover' => 'color: {{VALUE}};',
876
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
877
 
 
 
 
 
 
 
 
 
878
  ]
879
  );
880
 
881
- $this->add_responsive_control(
882
- 'progress_bar_title_alignment',
883
  [
884
- 'label' => __( 'Title Alignment', 'essential-addons-elementor' ),
885
- 'type' => Controls_Manager::CHOOSE,
886
  'options' => [
887
- 'left' => [
888
- 'title' => __( 'Left', 'essential-addons-elementor' ),
889
- 'icon' => 'fa fa-align-left',
890
- ],
891
- 'center' => [
892
- 'title' => __( 'Center', 'essential-addons-elementor' ),
893
- 'icon' => 'fa fa-align-center',
894
- ],
895
- 'right' => [
896
- 'title' => __( 'Right', 'essential-addons-elementor' ),
897
- 'icon' => 'fa fa-align-right',
898
- ]
899
  ],
900
- 'selectors' => [
901
- '{{WRAPPER}} .progress-title' => 'text-align: {{VALUE}};',
902
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
903
  ]
904
  );
905
 
@@ -907,192 +561,180 @@ class Widget_Eael_Progress_Bar extends Widget_Base {
907
  Group_Control_Typography::get_type(),
908
  [
909
  'name' => 'progress_bar_title_typography',
910
- 'label' => __( 'Typography', 'essential-addons-elementor' ),
911
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
912
- 'selector' => '{{WRAPPER}} .progress-title',
913
- ]
914
- );
915
-
916
- $this->add_control(
917
- 'progress_bar_number_style',
918
- [
919
- 'label' => __( 'Number Style', 'essential-addons-elementor' ),
920
- 'type' => Controls_Manager::HEADING,
921
- 'separator' => 'before',
922
  ]
923
  );
924
 
925
- $this->add_control(
926
- 'progress_bar_number_color',
927
  [
928
- 'label' => __( 'Number Color', 'essential-addons-elementor' ),
929
  'type' => Controls_Manager::COLOR,
930
- 'default'=> '#303133',
931
  'selectors' => [
932
- '{{WRAPPER}} .ldBar-label' => 'color: {{VALUE}};',
933
- ]
 
 
 
934
 
 
 
 
 
 
 
 
935
  ]
936
  );
937
 
938
- $this->add_control(
939
- 'progress_bar_number_hover_color',
940
  [
941
- 'label' => __( 'Number Hover Color', 'essential-addons-elementor' ),
942
  'type' => Controls_Manager::COLOR,
943
- 'default'=> '#23527c',
944
  'selectors' => [
945
- '{{WRAPPER}} .ldBar-label:hover' => 'color: {{VALUE}};',
946
- ]
947
-
948
  ]
949
  );
950
 
951
  $this->add_group_control(
952
  Group_Control_Typography::get_type(),
953
  [
954
- 'name' => 'progress_bar_number_typography',
955
- 'label' => __( 'Typography', 'essential-addons-elementor' ),
956
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
957
- 'selector' => '{{WRAPPER}} .ldBar-label',
 
 
 
958
  ]
959
- );
960
-
961
- $this->end_controls_section();
962
 
963
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
964
 
965
- protected function render() {
966
- $settings = $this->get_settings_for_display();
967
-
968
- $this->add_render_attribute('eael-progress-bar-container', [
969
- 'class' => [ 'eael-progress-bar-container' ],
970
- 'data-layout' => $settings['progress_bar_layout'],
971
- 'data-id' => esc_attr($this->get_id()),
972
- 'data-number' => $settings['progress_number']
973
- ]);
974
-
975
- if('line' == $settings['progress_bar_layout']){
976
- $this->add_render_attribute('eael-progress-bar-container', [
977
- 'data-line-stroke-color' => $settings['progress_bar_line_stroke_color'],
978
- 'data-line-stroke-width' => $settings['progress_bar_line_stroke_width'],
979
- 'data-line-stroke-trail-color' => $settings['progress_bar_line_stroke_trail_color'],
980
- 'data-line-stroke-trail-width' => $settings['progress_bar_line_stroke_trail_width'],
981
- 'data-line-direction' => $settings['progress_bar_line_direction']
982
- ]);
983
- }
984
-
985
- if('fan' == $settings['progress_bar_layout']){
986
- $this->add_render_attribute('eael-progress-bar-container', [
987
- 'data-fan-stroke-color' => $settings['progress_bar_fan_stroke_color'],
988
- 'data-fan-stroke-width' => $settings['progress_bar_fan_stroke_width'],
989
- 'data-fan-stroke-trail-color' => $settings['progress_bar_fan_stroke_trail_color'],
990
- 'data-fan-stroke-trail-width' => $settings['progress_bar_fan_stroke_trail_width'],
991
- 'data-fan-direction' => $settings['progress_bar_fan_direction']
992
- ]);
993
- }
994
-
995
- if('circle' == $settings['progress_bar_layout']){
996
- $this->add_render_attribute('eael-progress-bar-container', [
997
- 'data-circle-stroke-color' => $settings['progress_bar_circle_stroke_color'],
998
- 'data-circle-stroke-width' => $settings['progress_bar_circle_stroke_width'],
999
- 'data-circle-stroke-trail-color' => $settings['progress_bar_circle_stroke_trail_color'],
1000
- 'data-circle-stroke-trail-width' => $settings['progress_bar_circle_stroke_trail_width'],
1001
- 'data-circle-direction' => $settings['progress_bar_circle_direction']
1002
- ]);
1003
- }
1004
-
1005
- if('bubble' == $settings['progress_bar_layout']){
1006
- $this->add_render_attribute('eael-progress-bar-container', [
1007
- 'data-bubble-circle-color' => $settings['progress_bar_bubble_circle_color'],
1008
- 'data-bubble-bg-color' => $settings['progress_bar_bubble_bg_color'],
1009
- 'data-bubble-circle-width' => $settings['progress_bar_bubble_circle_width'],
1010
- 'data-bubble-direction' => $settings['progress_bar_bubble_direction']
1011
- ]);
1012
- }
1013
-
1014
- if('rainbow' == $settings['progress_bar_layout']){
1015
- $this->add_render_attribute('eael-progress-bar-container', [
1016
- 'data-rainbow-stroke-width' => $settings['progress_bar_rainbow_stroke_width'],
1017
- 'data-rainbow-stroke-trail-width' => $settings['progress_bar_rainbow_stroke_trail_width'],
1018
- 'data-rainbow-color-one' => $settings['progress_bar_rainbow_color_one'],
1019
- 'data-rainbow-color-two' => $settings['progress_bar_rainbow_color_two'],
1020
- 'data-rainbow-color-three' => $settings['progress_bar_rainbow_color_three'],
1021
- 'data-rainbow-color-four' => $settings['progress_bar_rainbow_color_four'],
1022
- 'data-rainbow-color-five' => $settings['progress_bar_rainbow_color_five'],
1023
- 'data-rainbow-direction' => $settings['progress_bar_rainbow_direction']
1024
- ]);
1025
- }
1026
-
1027
- if('energy' == $settings['progress_bar_layout']){
1028
- $this->add_render_attribute('eael-progress-bar-container', [
1029
- 'data-energy-start-color' => $settings['progress_bar_energy_start_color'],
1030
- 'data-energy-end-color' => $settings['progress_bar_energy_end_color'],
1031
- 'data-energy-bg-color' => $settings['progress_bar_energy_bg_color'],
1032
- 'data-energy-direction' => $settings['progress_bar_energy_direction']
1033
- ]);
1034
- }
1035
-
1036
- if('stripe' == $settings['progress_bar_layout']){
1037
- $this->add_render_attribute('eael-progress-bar-container', [
1038
- 'data-stripe-start-color' => $settings['progress_bar_stripe_start_color'],
1039
- 'data-stripe-end-color' => $settings['progress_bar_stripe_end_color'],
1040
- 'data-stripe-bg-color' => $settings['progress_bar_stripe_bg_color'],
1041
- 'data-stripe-direction' => $settings['progress_bar_stripe_direction']
1042
- ]);
1043
- }
1044
-
1045
- if('text' == $settings['progress_bar_layout']){
1046
- $this->add_render_attribute('eael-progress-bar-container', [
1047
- 'data-text-title' => $settings['progress_bar_text_title'],
1048
- 'data-text-direction' => $settings['progress_bar_text_direction'],
1049
- 'data-text-bg-color' => $settings['progress_bar_text_bg_color'],
1050
- ]);
1051
- }
1052
-
1053
-
1054
- if(
1055
- 'fan' == $settings['progress_bar_layout'] ||
1056
- 'circle' == $settings['progress_bar_layout'] ||
1057
- 'bubble' == $settings['progress_bar_layout']
1058
- ){
1059
- $class = 'label-center';
1060
- $height = '150px';
1061
- }else {
1062
- $class = '';
1063
- $height = '30px';
1064
- }
1065
-
1066
-
1067
- $this->add_render_attribute('inside-progressbar',[
1068
- 'style' => 'height:'.$height,
1069
- 'class' => [ 'inside-progressbar', 'ldBar', 'auto', $class ],
1070
- 'id' => 'myItem'.esc_attr($this->get_id()),
1071
- 'data-preset' => $settings['progress_bar_layout'],
1072
- ]);
1073
-
1074
-
1075
- $this->add_render_attribute('progressbar-title', 'class', 'progress-title');
1076
- if( 'line' == $settings['progress_bar_layout'] ) {
1077
- $this->add_render_attribute('progressbar-title', 'class', 'line');
1078
- }
1079
-
1080
-
1081
- ?>
1082
-
1083
- <div <?php echo $this->get_render_attribute_string( 'eael-progress-bar-container' ); ?>>
1084
- <?php if ( 'yes' == $settings['progress_bar_show_title'] ) : ?>
1085
- <div <?php echo $this->get_render_attribute_string('progressbar-title'); ?>>
1086
- <?php printf( '<%1$s>', $settings['title_html_tag'] ); echo $settings['progress_bar_title']; printf( '</%1$s>', $settings['title_html_tag'] ); ?>
1087
- </div>
1088
- <?php endif; ?>
1089
- <div <?php echo $this->get_render_attribute_string('inside-progressbar'); ?>></div>
1090
- <?php if ( 'yes' != $settings['progress_bar_show_number'] ) : ?><style>.ldBar-label{display:none;}</style><?php endif; ?>
1091
- </div>
1092
-
1093
- <?php
1094
- }
1095
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1096
  }
1097
 
1098
- Plugin::instance()->widgets_manager->register_widget_type( new Widget_Eael_Progress_Bar() );
1
  <?php
2
  namespace Elementor;
3
 
4
+ // If this file is called directly, abort.
5
+ if (!defined('ABSPATH')) {
6
+ exit;
7
+ }
8
 
9
  class Widget_Eael_Progress_Bar extends Widget_Base {
10
+ public function get_name() {
 
11
  return 'eael-progress-bar';
12
  }
13
 
14
  public function get_title() {
15
+ return esc_html__('EA Progress Bar', 'essential-addons-elementor');
16
  }
17
 
18
  public function get_icon() {
19
  return 'fa fa-tasks';
20
  }
21
 
22
+ public function get_categories() {
23
+ return ['essential-addons-elementor'];
24
+ }
25
 
26
+ protected function _register_controls() {
27
 
28
+ /*-----------------------------------------------------------------------------------*/
29
+ /* CONTENT TAB
30
  /*-----------------------------------------------------------------------------------*/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
+ /**
33
+ * Content Tab: Layout
34
+ */
35
+ $this->start_controls_section(
36
+ 'progress_bar_section_layout',
37
  [
38
+ 'label' => __('Layout', 'essential-addons-elementor'),
 
 
 
 
 
39
  ]
40
  );
41
 
42
+ $this->add_control(
43
+ 'progress_bar_layout',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  [
45
+ 'label' => __('Layout', 'essential-addons-elementor'),
46
+ 'type' => Controls_Manager::SELECT,
47
  'options' => [
48
+ 'line' => __('Line', 'essential-addons-elementor'),
49
+ 'line_rainbow' => __('Line Rainbow (Pro)', 'essential-addons-elementor'),
50
+ 'circle' => __('Circle', 'essential-addons-elementor'),
51
+ 'circle_fill' => __('Circle Fill (Pro)', 'essential-addons-elementor'),
52
+ 'half_circle' => __('Half Circle', 'essential-addons-elementor'),
53
+ 'half_circle_fill' => __('Half Circle Fill (Pro)', 'essential-addons-elementor'),
54
+ 'box' => __('Box (Pro)', 'essential-addons-elementor'),
55
+ ],
56
+ 'default' => 'line',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  ]
58
  );
59
 
60
  $this->add_control(
61
+ 'eael_pricing_table_style_pro_alert',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  [
63
+ 'label' => esc_html__( 'Only available in pro version!', 'essential-addons-elementor' ),
64
+ 'type' => Controls_Manager::HEADING,
65
+ 'condition' => [
66
+ 'progress_bar_layout' => ['line_rainbow', 'circle_fill', 'half_circle_fill', 'box'],
67
+ ]
68
  ]
69
  );
70
 
71
+ $this->add_control(
72
+ 'progress_bar_title',
73
  [
74
+ 'label' => __('Title', 'essential-addons-elementor'),
75
+ 'type' => Controls_Manager::TEXT,
76
+ 'default' => __('Progress Bar', 'essential-addons-elementor'),
77
+ 'separator' => 'before',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  ]
79
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
 
81
+ $this->add_control(
82
+ 'progress_bar_title_html_tag',
83
  [
84
+ 'label' => __('Title HTML Tag', 'essential-addons-elementor'),
85
+ 'type' => Controls_Manager::SELECT,
86
  'options' => [
87
+ 'h1' => __('H1', 'essential-addons-elementor'),
88
+ 'h2' => __('H2', 'essential-addons-elementor'),
89
+ 'h3' => __('H3', 'essential-addons-elementor'),
90
+ 'h4' => __('H4', 'essential-addons-elementor'),
91
+ 'h5' => __('H5', 'essential-addons-elementor'),
92
+ 'h6' => __('H6', 'essential-addons-elementor'),
93
+ 'div' => __('div', 'essential-addons-elementor'),
94
+ 'span' => __('span', 'essential-addons-elementor'),
95
+ 'p' => __('p', 'essential-addons-elementor'),
96
+ ],
97
+ 'default' => 'div',
 
 
 
 
 
 
 
 
 
 
 
98
  ]
99
  );
100
 
101
+ $this->add_control(
102
+ 'progress_bar_value',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  [
104
+ 'label' => __('Counter Value', 'essential-addons-elementor'),
105
+ 'type' => Controls_Manager::SLIDER,
106
+ 'size_units' => ['%'],
107
+ 'range' => [
108
+ '%' => [
109
+ 'min' => 0,
110
+ 'max' => 100,
111
+ 'step' => 1,
112
  ],
113
+ ],
114
+ 'default' => [
115
+ 'unit' => '%',
116
+ 'size' => 50,
117
+ ],
118
+ 'separator' => 'before',
 
 
 
 
 
 
 
 
119
  ]
120
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
 
122
+ $this->add_control(
123
+ 'progress_bar_show_count',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  [
125
+ 'label' => esc_html__('Display Count', 'essential-addons-elementor'),
126
+ 'type' => Controls_Manager::SWITCHER,
127
+ 'return_value' => 'yes',
128
+ 'default' => 'yes',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  ]
130
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
 
132
+ $this->add_control(
133
+ 'progress_bar_animation_duration',
134
  [
135
+ 'label' => __('Animation Duration', 'essential-addons-elementor'),
136
+ 'type' => Controls_Manager::SLIDER,
137
+ 'size_units' => ['px'],
138
+ 'range' => [
139
+ 'px' => [
140
+ 'min' => 1000,
141
+ 'max' => 10000,
142
+ 'step' => 100,
143
  ],
144
+ ],
145
+ 'default' => [
146
+ 'unit' => 'px',
147
+ 'size' => 1500,
148
+ ],
149
+ 'separator' => 'before',
 
 
 
 
 
 
 
 
150
  ]
151
  );
152
 
153
+ $this->add_control(
154
+ 'progress_bar_prefix_label',
155
+ [
156
+ 'label' => __('Prefix Label', 'essential-addons-elementor'),
157
+ 'type' => Controls_Manager::TEXT,
158
+ 'default' => __('Prefix', 'essential-addons-elementor'),
159
+ 'condition' => [
160
+ 'progress_bar_layout' => 'half_circle',
161
+ ],
162
+ 'separator' => 'before',
163
+ ]
164
+ );
165
 
166
+ $this->add_control(
167
+ 'progress_bar_postfix_label',
168
+ [
169
+ 'label' => __('Postfix Label', 'essential-addons-elementor'),
170
+ 'type' => Controls_Manager::TEXT,
171
+ 'default' => __('Postfix', 'essential-addons-elementor'),
172
+ 'condition' => [
173
+ 'progress_bar_layout' => 'half_circle',
174
+ ],
175
+ 'separator' => 'before',
176
+ ]
177
+ );
178
 
179
+ $this->end_controls_section();
180
+
181
+ $this->start_controls_section(
182
  'eael_section_pro',
183
  [
184
+ 'label' => __('Go Premium for More Features', 'essential-addons-elementor'),
185
  ]
186
  );
187
 
188
  $this->add_control(
189
  'eael_control_get_pro',
190
  [
191
+ 'label' => __('Unlock more possibilities', 'essential-addons-elementor'),
192
  'type' => Controls_Manager::CHOOSE,
193
  'options' => [
194
  '1' => [
195
+ 'title' => __('', 'essential-addons-elementor'),
196
  'icon' => 'fa fa-unlock-alt',
197
  ],
198
  ],
199
  'default' => '1',
200
+ 'description' => '<span class="pro-feature"> Get the <a href="https://essential-addons.com/elementor/buy.php" target="_blank">Pro version</a> for more stunning elements and customization options.</span>',
201
  ]
202
  );
203
 
204
  $this->end_controls_section();
205
 
206
+ /*-----------------------------------------------------------------------------------*/
207
+ /* STYLE TAB
208
  /*-----------------------------------------------------------------------------------*/
 
 
 
 
 
 
 
 
 
 
 
 
 
209
 
210
+ /**
211
+ * Style Tab: General(Line)
212
+ */
213
+ $this->start_controls_section(
214
+ 'progress_bar_section_style_general_line',
215
+ [
216
+ 'label' => __('General', 'essential-addons-elementor'),
217
+ 'tab' => Controls_Manager::TAB_STYLE,
218
+ 'condition' => [
219
+ 'progress_bar_layout' => ['line', 'line_rainbow', 'circle_fill', 'half_circle_fill', 'box'],
220
+ ],
221
+ ]
222
+ );
223
+
224
+ $this->add_control(
225
+ 'progress_bar_line_alignment',
226
+ [
227
+ 'label' => __('Alignment', 'essential-addons-elementor'),
228
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
229
+ 'options' => [
230
+ 'left' => [
231
+ 'title' => __('Left', 'essential-addons-elementor'),
232
+ 'icon' => 'fa fa-align-left',
233
+ ],
234
+ 'center' => [
235
+ 'title' => __('Center', 'essential-addons-elementor'),
236
+ 'icon' => 'fa fa-align-center',
237
+ ],
238
+ 'right' => [
239
+ 'title' => __('Right', 'essential-addons-elementor'),
240
+ 'icon' => 'fa fa-align-right',
241
+ ],
242
+ ],
243
+ 'default' => 'center',
244
+ ]
245
+ );
246
+
247
+ $this->end_controls_section();
248
+
249
+ /**
250
+ * Style Tab: Background
251
+ */
252
+ $this->start_controls_section(
253
+ 'progress_bar_section_style_bg',
254
+ [
255
+ 'label' => __('Background', 'essential-addons-elementor'),
256
+ 'tab' => Controls_Manager::TAB_STYLE,
257
+ 'condition' => [
258
+ 'progress_bar_layout' => ['line', 'line_rainbow', 'circle_fill', 'half_circle_fill', 'box']
259
+ ],
260
+ ]
261
+ );
262
+
263
+ $this->add_control(
264
+ 'progress_bar_line_width',
265
  [
266
+ 'label' => __('Width', 'essential-addons-elementor'),
267
  'type' => Controls_Manager::SLIDER,
268
+ 'size_units' => ['px', '%'],
269
+ 'range' => [
270
  'px' => [
271
+ 'min' => 100,
272
  'max' => 1000,
273
  'step' => 1,
274
  ],
275
  '%' => [
276
+ 'min' => 1,
277
  'max' => 100,
278
+ 'step' => 1,
279
  ],
280
  ],
281
  'default' => [
283
  'size' => 100,
284
  ],
285
  'selectors' => [
286
+ '{{WRAPPER}} .eael-progressbar-line-container' => 'width: {{SIZE}}{{UNIT}}',
287
  ],
288
  ]
289
+ );
290
+
291
+ $this->add_control(
292
+ 'progress_bar_line_height',
293
  [
294
+ 'label' => __('Height', 'essential-addons-elementor'),
295
  'type' => Controls_Manager::SLIDER,
296
+ 'size_units' => ['px'],
297
  'range' => [
298
  'px' => [
 
 
 
 
 
299
  'min' => 0,
300
  'max' => 100,
301
+ 'step' => 1,
302
  ],
303
  ],
304
+ 'default' => [
305
+ 'unit' => 'px',
306
+ 'size' => 12,
307
+ ],
308
  'selectors' => [
309
+ '{{WRAPPER}} .eael-progressbar-line' => 'height: {{SIZE}}{{UNIT}}',
310
  ],
311
  ]
 
 
 
 
 
 
 
 
 
312
  );
313
 
314
+ $this->add_control(
315
+ 'progress_bar_line_bg_color',
316
  [
317
+ 'label' => __('Color', 'essential-addons-elementor'),
318
  'type' => Controls_Manager::COLOR,
319
+ 'default' => '#eee',
320
  'selectors' => [
321
+ '{{WRAPPER}} .eael-progressbar-line' => 'background-color: {{VALUE}}',
322
+ ],
323
+ 'separator' => 'before',
324
+ ]
325
+ );
326
 
327
+ $this->end_controls_section();
328
+
329
+ /**
330
+ * Style Tab: Fill
331
+ */
332
+ $this->start_controls_section(
333
+ 'progress_bar_section_style_fill',
334
+ [
335
+ 'label' => __('Fill', 'essential-addons-elementor'),
336
+ 'tab' => Controls_Manager::TAB_STYLE,
337
+ 'condition' => [
338
+ 'progress_bar_layout' => ['line', 'line_rainbow', 'circle_fill', 'half_circle_fill', 'box']
339
+ ],
340
  ]
341
  );
342
 
343
+ $this->add_control(
344
+ 'progress_bar_line_fill_height',
345
  [
346
+ 'label' => __('Height', 'essential-addons-elementor'),
347
+ 'type' => Controls_Manager::SLIDER,
348
+ 'size_units' => ['px'],
349
+ 'range' => [
350
+ 'px' => [
351
+ 'min' => 0,
352
+ 'max' => 100,
353
+ 'step' => 1,
354
+ ],
355
+ ],
356
+ 'default' => [
357
+ 'unit' => 'px',
358
+ 'size' => 12,
359
+ ],
360
  'selectors' => [
361
+ '{{WRAPPER}} .eael-progressbar-line-fill' => 'height: {{SIZE}}{{UNIT}}',
362
+ ],
363
+ ]
364
+ );
365
+
366
+ $this->add_group_control(
367
+ Group_Control_Background::get_type(),
368
+ [
369
+ 'name' => 'progress_bar_line_fill_color',
370
+ 'label' => __('Color', 'essential-addons-elementor'),
371
+ 'types' => ['classic', 'gradient'],
372
+ 'selector' => '{{WRAPPER}} .eael-progressbar-line-fill',
373
+ 'separator' => 'before',
374
+ ]
375
+ );
376
 
377
+ $this->add_control(
378
+ 'progress_bar_line_fill_stripe',
379
+ [
380
+ 'label' => __('Show Stripe', 'essential-addons-elementor'),
381
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
382
+ 'return_value' => 'yes',
383
+ 'default' => 'no',
384
+ 'separator' => 'before',
385
  ]
386
  );
387
 
388
+ $this->add_control(
389
+ 'progress_bar_line_fill_stripe_animate',
390
  [
391
+ 'label' => __('Stripe Animation', 'essential-addons-elementor'),
392
+ 'type' => Controls_Manager::SELECT,
393
  'options' => [
394
+ 'normal' => __('Left To Right', 'plugin-domain'),
395
+ 'reverse' => __('Right To Left', 'plugin-domain'),
396
+ 'none' => __('Disabled', 'plugin-domain'),
 
 
 
 
 
 
 
 
 
397
  ],
398
+ 'default' => 'none',
399
+ 'condition' => [
400
+ 'progress_bar_line_fill_stripe' => 'yes',
401
+ ],
402
+ ]
403
+ );
404
+
405
+ $this->end_controls_section();
406
+
407
+ /**
408
+ * Style Tab: General(Circle)
409
+ */
410
+ $this->start_controls_section(
411
+ 'progress_bar_section_style_general_circle',
412
+ [
413
+ 'label' => __('General', 'essential-addons-elementor'),
414
+ 'tab' => Controls_Manager::TAB_STYLE,
415
+ 'condition' => [
416
+ 'progress_bar_layout' => ['circle', 'half_circle'],
417
+ ],
418
+ ]
419
+ );
420
+
421
+ $this->add_control(
422
+ 'progress_bar_circle_alignment',
423
+ [
424
+ 'label' => __('Alignment', 'essential-addons-elementor'),
425
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
426
+ 'options' => [
427
+ 'left' => [
428
+ 'title' => __('Left', 'essential-addons-elementor'),
429
+ 'icon' => 'fa fa-align-left',
430
+ ],
431
+ 'center' => [
432
+ 'title' => __('Center', 'essential-addons-elementor'),
433
+ 'icon' => 'fa fa-align-center',
434
+ ],
435
+ 'right' => [
436
+ 'title' => __('Right', 'essential-addons-elementor'),
437
+ 'icon' => 'fa fa-align-right',
438
+ ],
439
+ ],
440
+ 'default' => 'center',
441
+ ]
442
+ );
443
+
444
+ $this->add_control(
445
+ 'progress_bar_circle_size',
446
+ [
447
+ 'label' => __('Size', 'essential-addons-elementor'),
448
+ 'type' => Controls_Manager::SLIDER,
449
+ 'size_units' => ['px'],
450
+ 'range' => [
451
+ 'px' => [
452
+ 'min' => 50,
453
+ 'max' => 500,
454
+ 'step' => 1,
455
+ ],
456
+ ],
457
+ 'default' => [
458
+ 'unit' => 'px',
459
+ 'size' => 200,
460
+ ],
461
+ 'selectors' => [
462
+ '{{WRAPPER}} .eael-progressbar-circle' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
463
+ '{{WRAPPER}} .eael-progressbar-half-circle' => 'width: {{SIZE}}{{UNIT}}; height: calc({{SIZE}} / 2 * 1{{UNIT}});',
464
+ '{{WRAPPER}} .eael-progressbar-half-circle-after' => 'width: {{SIZE}}{{UNIT}};',
465
+ '{{WRAPPER}} .eael-progressbar-circle-shadow' => 'width: calc({{SIZE}}{{UNIT}} + 20px); height: calc({{SIZE}}{{UNIT}} + 20px);',
466
+ ],
467
+ 'separator' => 'before',
468
+ ]
469
+ );
470
+
471
+ $this->add_control(
472
+ 'progress_bar_circle_bg_color',
473
+ [
474
+ 'label' => __('Background Color', 'essential-addons-elementor'),
475
+ 'type' => Controls_Manager::COLOR,
476
+ 'default' => '#fff',
477
+ 'selectors' => [
478
+ '{{WRAPPER}} .eael-progressbar-circle-inner' => 'background-color: {{VALUE}}',
479
+ ],
480
+ 'separator' => 'before',
481
+ ]
482
+ );
483
+
484
+ $this->add_control(
485
+ 'progress_bar_circle_stroke_width',
486
+ [
487
+ 'label' => __('Stroke Width', 'essential-addons-elementor'),
488
+ 'type' => Controls_Manager::SLIDER,
489
+ 'size_units' => ['px'],
490
+ 'range' => [
491
+ 'px' => [
492
+ 'min' => 0,
493
+ 'max' => 100,
494
+ 'step' => 1,
495
+ ],
496
+ ],
497
+ 'default' => [
498
+ 'unit' => 'px',
499
+ 'size' => 12,
500
+ ],
501
+ 'selectors' => [
502
+ '{{WRAPPER}} .eael-progressbar-circle-inner' => 'border-width: {{SIZE}}{{UNIT}}',
503
+ '{{WRAPPER}} .eael-progressbar-circle-half' => 'border-width: {{SIZE}}{{UNIT}}',
504
+ ],
505
+ 'separator' => 'before',
506
+ ]
507
+ );
508
+
509
+ $this->add_control(
510
+ 'progress_bar_circle_stroke_color',
511
+ [
512
+ 'label' => __('Stroke Color', 'essential-addons-elementor'),
513
+ 'type' => Controls_Manager::COLOR,
514
+ 'default' => '#eee',
515
+ 'selectors' => [
516
+ '{{WRAPPER}} .eael-progressbar-circle-inner' => 'border-color: {{VALUE}}',
517
+ ],
518
+ ]
519
+ );
520
+
521
+ $this->add_control(
522
+ 'progress_bar_circle_fill_color',
523
+ [
524
+ 'label' => __('Fill Color', 'essential-addons-elementor'),
525
+ 'type' => Controls_Manager::COLOR,
526
+ 'default' => '#000',
527
+ 'selectors' => [
528
+ '{{WRAPPER}} .eael-progressbar-circle-half' => 'border-color: {{VALUE}}',
529
+ ],
530
+ 'separator' => 'before',
531
+ ]
532
+ );
533
+
534
+ $this->add_group_control(
535
+ Group_Control_Box_Shadow::get_type(),
536
+ [
537
+ 'name' => 'progress_bar_circle_box_shadow',
538
+ 'label' => __('Box Shadow', 'essential-addons-elementor'),
539
+ 'selector' => '{{WRAPPER}} .eael-progressbar-circle-shadow',
540
+ 'condition' => [
541
+ 'progress_bar_layout' => 'circle',
542
+ ],
543
+ 'separator' => 'before',
544
+ ]
545
+ );
546
+
547
+ $this->end_controls_section();
548
+
549
+ /**
550
+ * Style Tab: Typography
551
+ */
552
+ $this->start_controls_section(
553
+ 'progress_bar_section_style_typography',
554
+ [
555
+ 'label' => __('Typography', 'essential-addons-elementor'),
556
+ 'tab' => Controls_Manager::TAB_STYLE,
557
  ]
558
  );
559
 
561
  Group_Control_Typography::get_type(),
562
  [
563
  'name' => 'progress_bar_title_typography',
564
+ 'label' => __('Title', 'essential-addons-elementor'),
565
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
566
+ 'selector' => '{{WRAPPER}} .eael-progressbar-title',
 
 
 
 
 
 
 
 
 
567
  ]
568
  );
569
 
570
+ $this->add_control(
571
+ 'progress_bar_title_color',
572
  [
573
+ 'label' => __('Title Color', 'essential-addons-elementor'),
574
  'type' => Controls_Manager::COLOR,
575
+ 'default' => '',
576
  'selectors' => [
577
+ '{{WRAPPER}} .eael-progressbar-title' => 'color: {{VALUE}}',
578
+ ],
579
+ 'separator' => 'after',
580
+ ]
581
+ );
582
 
583
+ $this->add_group_control(
584
+ Group_Control_Typography::get_type(),
585
+ [
586
+ 'name' => 'progress_bar_count_typography',
587
+ 'label' => __('Counter', 'essential-addons-elementor'),
588
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
589
+ 'selector' => '{{WRAPPER}} .eael-progressbar-count-wrap',
590
  ]
591
  );
592
 
593
+ $this->add_control(
594
+ 'progress_bar_count_color',
595
  [
596
+ 'label' => __('Counter Color', 'essential-addons-elementor'),
597
  'type' => Controls_Manager::COLOR,
598
+ 'default' => '',
599
  'selectors' => [
600
+ '{{WRAPPER}} .eael-progressbar-count-wrap' => 'color: {{VALUE}}',
601
+ ],
602
+ 'separator' => 'after',
603
  ]
604
  );
605
 
606
  $this->add_group_control(
607
  Group_Control_Typography::get_type(),
608
  [
609
+ 'name' => 'progress_bar_after_typography',
610
+ 'label' => __('Prefix/Postfix', 'essential-addons-elementor'),
611
  'scheme' => Scheme_Typography::TYPOGRAPHY_1,
612
+ 'selector' => '{{WRAPPER}} .eael-progressbar-half-circle-after span',
613
+ 'condition' => [
614
+ 'progress_bar_layout' => 'half_circle',
615
+ ],
616
  ]
617
+ );
 
 
618
 
619
+ $this->add_control(
620
+ 'progress_bar_after_color',
621
+ [
622
+ 'label' => __('Prefix/Postfix Color', 'essential-addons-elementor'),
623
+ 'type' => Controls_Manager::COLOR,
624
+ 'default' => '',
625
+ 'selectors' => [
626
+ '{{WRAPPER}} .eael-progressbar-half-circle-after' => 'color: {{VALUE}}',
627
+ ],
628
+ 'condition' => [
629
+ 'progress_bar_layout' => 'half_circle',
630
+ ],
631
+ ]
632
+ );
633
 
634
+ $this->end_controls_section();
635
+
636
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
637
 
638
+ protected function render() {
639
+ $settings = $this->get_settings_for_display();
640
+ $wrap_classes = ['eael-progressbar'];
641
+ $circle_wrapper = [];
642
+
643
+ if (in_array($settings['progress_bar_layout'] , ['line' ,'line_rainbow', 'circle_fill', 'half_circle_fill', 'box'])) {
644
+ $wrap_classes[] = 'eael-progressbar-line';
645
+
646
+ if ($settings['progress_bar_line_fill_stripe'] == 'yes') {
647
+ $wrap_classes[] = 'eael-progressbar-line-stripe';
648
+ }
649
+
650
+ if ($settings['progress_bar_line_fill_stripe_animate'] == 'normal') {
651
+ $wrap_classes[] = 'eael-progressbar-line-animate';
652
+ } else if ($settings['progress_bar_line_fill_stripe_animate'] == 'reverse') {
653
+ $wrap_classes[] = 'eael-progressbar-line-animate-rtl';
654
+ }
655
+
656
+ $this->add_render_attribute('eael-progressbar-line', [
657
+ 'class' => $wrap_classes,
658
+ 'data-layout' => 'line',
659
+ 'data-count' => $settings['progress_bar_value']['size'],
660
+ 'data-duration' => $settings['progress_bar_animation_duration']['size'],
661
+ ]);
662
+
663
+ $this->add_render_attribute('eael-progressbar-line-fill', [
664
+ 'class' => 'eael-progressbar-line-fill',
665
+ 'style' => '-webkit-transition-duration:' . $settings['progress_bar_animation_duration']['size'] . 'ms;-o-transition-duration:' . $settings['progress_bar_animation_duration']['size'] . 'ms;transition-duration:' . $settings['progress_bar_animation_duration']['size'] . 'ms;',
666
+ ]);
667
+
668
+ echo '<div class="eael-progressbar-line-container ' . $settings['progress_bar_line_alignment'] . '">
669
+ ' . ($settings['progress_bar_title'] ? sprintf('<%1$s class="%2$s">', $settings['progress_bar_title_html_tag'], 'eael-progressbar-title') . $settings['progress_bar_title'] . sprintf('</%1$s>', $settings['progress_bar_title_html_tag']) : '') . '
670
+
671
+ <div ' . $this->get_render_attribute_string('eael-progressbar-line') . '>
672
+ ' . ($settings['progress_bar_show_count'] === 'yes' ? '<span class="eael-progressbar-count-wrap"><span class="eael-progressbar-count">0</span><span class="postfix">' . $settings['progress_bar_value']['unit'] . '</span></span>' : '') . '
673
+ <span ' . $this->get_render_attribute_string('eael-progressbar-line-fill') . '></span>
674
+ </div>
675
+ </div>';
676
+ } else if ($settings['progress_bar_layout'] == 'circle') {
677
+ $wrap_classes[] = 'eael-progressbar-circle';
678
+
679
+ $this->add_render_attribute('eael-progressbar-circle', [
680
+ 'class' => $wrap_classes,
681
+ 'data-layout' => $settings['progress_bar_layout'],
682
+ 'data-count' => $settings['progress_bar_value']['size'],
683
+ 'data-duration' => $settings['progress_bar_animation_duration']['size'],
684
+ ]);
685
+
686
+ echo '<div class="eael-progressbar-circle-container ' . $settings['progress_bar_circle_alignment'] . '">
687
+ ' . ($settings['progress_bar_circle_box_shadow_box_shadow'] ? '<div class="eael-progressbar-circle-shadow">' : '') . '
688
+
689
+ <div ' . $this->get_render_attribute_string('eael-progressbar-circle') . '>
690
+ <div class="eael-progressbar-circle-pie">
691
+ <div class="eael-progressbar-circle-half-left eael-progressbar-circle-half"></div>
692
+ <div class="eael-progressbar-circle-half-right eael-progressbar-circle-half"></div>
693
+ </div>
694
+ <div class="eael-progressbar-circle-inner"></div>
695
+ <div class="eael-progressbar-circle-inner-content">
696
+ ' . ($settings['progress_bar_title'] ? sprintf('<%1$s class="%2$s">', $settings['progress_bar_title_html_tag'], 'eael-progressbar-title') . $settings['progress_bar_title'] . sprintf('</%1$s>', $settings['progress_bar_title_html_tag']) : '') . '
697
+ ' . ($settings['progress_bar_show_count'] === 'yes' ? '<span class="eael-progressbar-count-wrap"><span class="eael-progressbar-count">0</span><span class="postfix">' . $settings['progress_bar_value']['unit'] . '</span></span>' : '') . '
698
+ </div>
699
+ </div>
700
+
701
+ ' . ($settings['progress_bar_circle_box_shadow_box_shadow'] ? '</div>' : '') . '
702
+ </div>';
703
+ } else if ($settings['progress_bar_layout'] == 'half_circle') {
704
+ $wrap_classes[] = 'eael-progressbar-half-circle';
705
+
706
+ $this->add_render_attribute('eael-progressbar-circle-half', [
707
+ 'class' => 'eael-progressbar-circle-half',
708
+ 'style' => '-webkit-transition-duration:' . $settings['progress_bar_animation_duration']['size'] . 'ms;-o-transition-duration:' . $settings['progress_bar_animation_duration']['size'] . 'ms;transition-duration:' . $settings['progress_bar_animation_duration']['size'] . 'ms;',
709
+ ]);
710
+
711
+ $this->add_render_attribute('eael-progressbar-half-circle', [
712
+ 'class' => $wrap_classes,
713
+ 'data-layout' => $settings['progress_bar_layout'],
714
+ 'data-count' => $settings['progress_bar_value']['size'],
715
+ 'data-duration' => $settings['progress_bar_animation_duration']['size'],
716
+ ]);
717
+
718
+ echo '<div class="eael-progressbar-circle-container ' . $settings['progress_bar_circle_alignment'] . '">
719
+ <div ' . $this->get_render_attribute_string('eael-progressbar-half-circle') . '>
720
+ <div class="eael-progressbar-circle">
721
+ <div class="eael-progressbar-circle-pie">
722
+ <div ' . $this->get_render_attribute_string('eael-progressbar-circle-half') . '></div>
723
+ </div>
724
+ <div class="eael-progressbar-circle-inner"></div>
725
+ </div>
726
+ <div class="eael-progressbar-circle-inner-content">
727
+ ' . ($settings['progress_bar_title'] ? sprintf('<%1$s class="%2$s">', $settings['progress_bar_title_html_tag'], 'eael-progressbar-title') . $settings['progress_bar_title'] . sprintf('</%1$s>', $settings['progress_bar_title_html_tag']) : '') . '
728
+ ' . ($settings['progress_bar_show_count'] === 'yes' ? '<span class="eael-progressbar-count-wrap"><span class="eael-progressbar-count">0</span><span class="postfix">' . $settings['progress_bar_value']['unit'] . '</span></span>' : '') . '
729
+ </div>
730
+ </div>
731
+ <div class="eael-progressbar-half-circle-after">
732
+ ' . ($settings['progress_bar_prefix_label'] ? sprintf('<span class="eael-progressbar-prefix-label">%1$s</span>', $settings['progress_bar_prefix_label']) : '') . '
733
+ ' . ($settings['progress_bar_postfix_label'] ? sprintf('<span class="eael-progressbar-postfix-label">%1$s</span>', $settings['progress_bar_postfix_label']) : '') . '
734
+ </div>
735
+ </div>';
736
+ }
737
+ }
738
  }
739
 
740
+ Plugin::instance()->widgets_manager->register_widget_type(new Widget_Eael_Progress_Bar());
elements/wpforms/wpforms.php CHANGED
File without changes
essential_adons_elementor.php CHANGED
@@ -4,7 +4,7 @@
4
  * Description: The ultimate elements library for Elementor page builder plugin for WordPress.
5
  * Plugin URI: https://essential-addons.com/elementor/
6
  * Author: WPDeveloper
7
- * Version: 2.8.5
8
  * Author URI: https://wpdeveloper.net/
9
  *
10
  * Text Domain: essential-addons-elementor
@@ -28,7 +28,7 @@ require_once ESSENTIAL_ADDONS_EL_PATH.'admin/settings.php';
28
  */
29
  function eael_activated_modules() {
30
 
31
- $eael_default_keys = [ 'contact-form-7', 'count-down', 'creative-btn', 'fancy-text', 'img-comparison', 'instagram-gallery', 'interactive-promo', 'lightbox', 'post-block', 'post-grid', 'post-timeline', 'product-grid', 'team-members', 'testimonial-slider', 'testimonials', 'testimonials', 'weforms', 'static-product', 'call-to-action', 'flip-box', 'info-box', 'dual-header', 'price-table', 'flip-carousel', 'interactive-cards', 'ninja-form', 'gravity-form', 'caldera-form', 'wpforms', 'wisdom_registered_setting', 'twitter-feed', 'facebook-feed', 'data-table', 'filter-gallery', 'image-accordion','content-ticker', 'tooltip', 'adv-accordion', 'adv-tabs', 'progress-bar' ];
32
 
33
  $eael_default_settings = array_fill_keys( $eael_default_keys, true );
34
  $eael_get_settings = get_option( 'eael_save_settings', $eael_default_settings );
@@ -219,7 +219,7 @@ function essential_addons_el_enqueue(){
219
  }
220
 
221
  if( $is_component_active['progress-bar'] ) {
222
- wp_enqueue_script('essential_addons_elementor-progress-bar',ESSENTIAL_ADDONS_EL_URL.'assets/js/loading-bar.min.js', array('jquery'),'1.0', true);
223
  }
224
 
225
  }
@@ -349,10 +349,10 @@ function eael_admin_notice() {
349
  global $current_user ;
350
  $user_id = $current_user->ID;
351
  /* Check that the user hasn't already clicked to ignore the message */
352
- if ( ! get_user_meta($user_id, 'eael_ignore_notice284') ) {
353
  echo '<div class="eael-admin-notice updated" style="display: flex; align-items: center; padding-left: 0; border-left-color: #EF4B53"><p style="width: 32px;">';
354
  echo '<img style="width: 100%; display: block;" src="' . plugins_url( '/', __FILE__ ).'admin/assets/images/icon-bolt.svg'. '" ></p><p> ';
355
- printf(__('<strong>Essential Addons for Elementor</strong> now powering <strong>80,000+</strong> websites. Use the coupon code <strong>ACTIVE80K</strong> to redeem a <strong>25&#37; </strong> discount on Pro. <a href="https://wpdeveloper.net/in/eael-pricing" target="_blank" style="text-decoration: none;"><span class="dashicons dashicons-smiley" style="margin-left: 10px;"></span> Apply Coupon</a>
356
  <a href="%1$s" style="text-decoration: none; margin-left: 10px;"><span class="dashicons dashicons-dismiss"></span> I\'m good with free version</a>'), admin_url( 'admin.php?page=eael-settings&eael_nag_ignore=0' ));
357
  echo "</p></div>";
358
  }
@@ -369,7 +369,7 @@ function eael_nag_ignore() {
369
  $user_id = $current_user->ID;
370
  /* If user clicks to ignore the notice, add that to their user meta */
371
  if ( isset($_GET['eael_nag_ignore']) && '0' == $_GET['eael_nag_ignore'] ) {
372
- add_user_meta($user_id, 'eael_ignore_notice284', 'true', true);
373
  }
374
  }
375
  add_action('admin_init', 'eael_nag_ignore');
4
  * Description: The ultimate elements library for Elementor page builder plugin for WordPress.
5
  * Plugin URI: https://essential-addons.com/elementor/
6
  * Author: WPDeveloper
7
+ * Version: 2.8.6
8
  * Author URI: https://wpdeveloper.net/
9
  *
10
  * Text Domain: essential-addons-elementor
28
  */
29
  function eael_activated_modules() {
30
 
31
+ $eael_default_keys = [ 'contact-form-7', 'count-down', 'creative-btn', 'fancy-text', 'post-grid', 'post-timeline', 'product-grid', 'team-members', 'testimonials', 'weforms', 'call-to-action', 'flip-box', 'info-box', 'dual-header', 'price-table', 'ninja-form', 'gravity-form', 'caldera-form', 'wpforms', 'twitter-feed', 'facebook-feed', 'data-table', 'filter-gallery', 'image-accordion', 'content-ticker', 'tooltip', 'adv-accordion', 'adv-tabs', 'progress-bar' ];
32
 
33
  $eael_default_settings = array_fill_keys( $eael_default_keys, true );
34
  $eael_get_settings = get_option( 'eael_save_settings', $eael_default_settings );
219
  }
220
 
221
  if( $is_component_active['progress-bar'] ) {
222
+ wp_enqueue_script('essential_addons_elementor-eael-bar',ESSENTIAL_ADDONS_EL_URL.'assets/js/progress-bar.js', array('jquery'),'1.0', true);
223
  }
224
 
225
  }
349
  global $current_user ;
350
  $user_id = $current_user->ID;
351
  /* Check that the user hasn't already clicked to ignore the message */
352
+ if ( ! get_user_meta($user_id, 'eael_ignore_notice286') ) {
353
  echo '<div class="eael-admin-notice updated" style="display: flex; align-items: center; padding-left: 0; border-left-color: #EF4B53"><p style="width: 32px;">';
354
  echo '<img style="width: 100%; display: block;" src="' . plugins_url( '/', __FILE__ ).'admin/assets/images/icon-bolt.svg'. '" ></p><p> ';
355
+ printf(__('<strong>Essential Addons for Elementor</strong> now powering <strong>100,000+</strong> websites. Use the coupon code <strong>ACTIVE100K</strong> to redeem a <strong>30&#37; </strong> discount on Pro. <a href="https://wpdeveloper.net/in/eael-pricing" target="_blank" style="text-decoration: none;"><span class="dashicons dashicons-smiley" style="margin-left: 10px;"></span> Apply Coupon</a>
356
  <a href="%1$s" style="text-decoration: none; margin-left: 10px;"><span class="dashicons dashicons-dismiss"></span> I\'m good with free version</a>'), admin_url( 'admin.php?page=eael-settings&eael_nag_ignore=0' ));
357
  echo "</p></div>";
358
  }
369
  $user_id = $current_user->ID;
370
  /* If user clicks to ignore the notice, add that to their user meta */
371
  if ( isset($_GET['eael_nag_ignore']) && '0' == $_GET['eael_nag_ignore'] ) {
372
+ add_user_meta($user_id, 'eael_ignore_notice286', 'true', true);
373
  }
374
  }
375
  add_action('admin_init', 'eael_nag_ignore');
includes/queries.php CHANGED
File without changes
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: wpdevteam, Codetic, re_enter_rupok, Asif2BD, robicse11128, priyomukul, mahfuz01, manik08cse
3
  Tags: elementor, elements, addons, elementor addon, elementor widget, page builder, builder, visual editor, wordpress page builder, elementor form
4
  Requires at least: 4.0
5
- Tested up to: 5.0
6
  Requires PHP: 5.4
7
- Stable tag: 2.8.5
8
  License: GPLv3
9
  License URI: https://opensource.org/licenses/GPL-3.0
10
 
@@ -158,6 +158,11 @@ Your existing elements/content will work with premium version. So you won't lose
158
 
159
  == Changelog ==
160
 
 
 
 
 
 
161
  = 2.8.5 =
162
 
163
  - WPForms appearing issue fixed
@@ -416,10 +421,7 @@ Initial stable realese
416
 
417
  == Upgrade Notice ==
418
 
419
- = 2.8.0 =
420
 
421
- - Progress Bar widget added
422
- - Video card support added to Filterable Gallery
423
- - Multiple hover effects added to Post Grid
424
- - Icon changing option added to Post Grid
425
- - Few minor bugfix and improvements
2
  Contributors: wpdevteam, Codetic, re_enter_rupok, Asif2BD, robicse11128, priyomukul, mahfuz01, manik08cse
3
  Tags: elementor, elements, addons, elementor addon, elementor widget, page builder, builder, visual editor, wordpress page builder, elementor form
4
  Requires at least: 4.0
5
+ Tested up to: 5.0.0
6
  Requires PHP: 5.4
7
+ Stable tag: 2.8.6
8
  License: GPLv3
9
  License URI: https://opensource.org/licenses/GPL-3.0
10
 
158
 
159
  == Changelog ==
160
 
161
+ = 2.8.6 =
162
+
163
+ - Progress Bar revamped with faster and better script and styles
164
+ - Few minor bugfix and improvements
165
+
166
  = 2.8.5 =
167
 
168
  - WPForms appearing issue fixed
421
 
422
  == Upgrade Notice ==
423
 
424
+ = 2.8.6 =
425
 
426
+ - Progress Bar revamped with faster and better script and styles
427
+ - Few minor bugfix and improvements