Page Builder: PageLayer – Drag and Drop website builder - Version 0.9.4

Version Description

(May 7, 2019) = * [Feature] Added Inner Row which allows to create columns within columns for complex designs * [Task] The PageLayer Admin JS and CSS was loaded everywhere in the admin panel. This is fixed. * [Bug-Fix] The PageLayer rating message was not dismissable. This is fixed.

Download this release

Release Info

Developer pagelayer
Plugin Icon 128x128 Page Builder: PageLayer – Drag and Drop website builder
Version 0.9.4
Comparing to
See all releases

Code changes from version 0.9.3 to 0.9.4

css/chartist.min.css ADDED
@@ -0,0 +1 @@
1
+ .ct-double-octave:after,.ct-major-eleventh:after,.ct-major-second:after,.ct-major-seventh:after,.ct-major-sixth:after,.ct-major-tenth:after,.ct-major-third:after,.ct-major-twelfth:after,.ct-minor-second:after,.ct-minor-seventh:after,.ct-minor-sixth:after,.ct-minor-third:after,.ct-octave:after,.ct-perfect-fifth:after,.ct-perfect-fourth:after,.ct-square:after{content:"";clear:both}.ct-label{fill:rgba(0,0,0,.4);color:rgba(0,0,0,.4);font-size:.75rem;line-height:1}.ct-grid-background,.ct-line{fill:none}.ct-chart-bar .ct-label,.ct-chart-line .ct-label{display:block;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.ct-chart-donut .ct-label,.ct-chart-pie .ct-label{dominant-baseline:central}.ct-label.ct-horizontal.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-label.ct-horizontal.ct-end{-webkit-box-align:flex-start;-webkit-align-items:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-label.ct-vertical.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-end;-webkit-justify-content:flex-end;-ms-flex-pack:flex-end;justify-content:flex-end;text-align:right;text-anchor:end}.ct-label.ct-vertical.ct-end{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar .ct-label.ct-horizontal.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;text-anchor:start}.ct-chart-bar .ct-label.ct-horizontal.ct-end{-webkit-box-align:flex-start;-webkit-align-items:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end{-webkit-box-align:flex-start;-webkit-align-items:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:flex-end;-webkit-justify-content:flex-end;-ms-flex-pack:flex-end;justify-content:flex-end;text-align:right;text-anchor:end}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:end}.ct-grid{stroke:rgba(0,0,0,.2);stroke-width:1px;stroke-dasharray:2px}.ct-point{stroke-width:10px;stroke-linecap:round}.ct-line{stroke-width:4px}.ct-area{stroke:none;fill-opacity:.1}.ct-bar{fill:none;stroke-width:10px}.ct-slice-donut{fill:none;stroke-width:60px}.ct-series-a .ct-bar,.ct-series-a .ct-line,.ct-series-a .ct-point,.ct-series-a .ct-slice-donut{stroke:#d70206}.ct-series-a .ct-area,.ct-series-a .ct-slice-donut-solid,.ct-series-a .ct-slice-pie{fill:#d70206}.ct-series-b .ct-bar,.ct-series-b .ct-line,.ct-series-b .ct-point,.ct-series-b .ct-slice-donut{stroke:#f05b4f}.ct-series-b .ct-area,.ct-series-b .ct-slice-donut-solid,.ct-series-b .ct-slice-pie{fill:#f05b4f}.ct-series-c .ct-bar,.ct-series-c .ct-line,.ct-series-c .ct-point,.ct-series-c .ct-slice-donut{stroke:#f4c63d}.ct-series-c .ct-area,.ct-series-c .ct-slice-donut-solid,.ct-series-c .ct-slice-pie{fill:#f4c63d}.ct-series-d .ct-bar,.ct-series-d .ct-line,.ct-series-d .ct-point,.ct-series-d .ct-slice-donut{stroke:#d17905}.ct-series-d .ct-area,.ct-series-d .ct-slice-donut-solid,.ct-series-d .ct-slice-pie{fill:#d17905}.ct-series-e .ct-bar,.ct-series-e .ct-line,.ct-series-e .ct-point,.ct-series-e .ct-slice-donut{stroke:#453d3f}.ct-series-e .ct-area,.ct-series-e .ct-slice-donut-solid,.ct-series-e .ct-slice-pie{fill:#453d3f}.ct-series-f .ct-bar,.ct-series-f .ct-line,.ct-series-f .ct-point,.ct-series-f .ct-slice-donut{stroke:#59922b}.ct-series-f .ct-area,.ct-series-f .ct-slice-donut-solid,.ct-series-f .ct-slice-pie{fill:#59922b}.ct-series-g .ct-bar,.ct-series-g .ct-line,.ct-series-g .ct-point,.ct-series-g .ct-slice-donut{stroke:#0544d3}.ct-series-g .ct-area,.ct-series-g .ct-slice-donut-solid,.ct-series-g .ct-slice-pie{fill:#0544d3}.ct-series-h .ct-bar,.ct-series-h .ct-line,.ct-series-h .ct-point,.ct-series-h .ct-slice-donut{stroke:#6b0392}.ct-series-h .ct-area,.ct-series-h .ct-slice-donut-solid,.ct-series-h .ct-slice-pie{fill:#6b0392}.ct-series-i .ct-bar,.ct-series-i .ct-line,.ct-series-i .ct-point,.ct-series-i .ct-slice-donut{stroke:#f05b4f}.ct-series-i .ct-area,.ct-series-i .ct-slice-donut-solid,.ct-series-i .ct-slice-pie{fill:#f05b4f}.ct-series-j .ct-bar,.ct-series-j .ct-line,.ct-series-j .ct-point,.ct-series-j .ct-slice-donut{stroke:#dda458}.ct-series-j .ct-area,.ct-series-j .ct-slice-donut-solid,.ct-series-j .ct-slice-pie{fill:#dda458}.ct-series-k .ct-bar,.ct-series-k .ct-line,.ct-series-k .ct-point,.ct-series-k .ct-slice-donut{stroke:#eacf7d}.ct-series-k .ct-area,.ct-series-k .ct-slice-donut-solid,.ct-series-k .ct-slice-pie{fill:#eacf7d}.ct-series-l .ct-bar,.ct-series-l .ct-line,.ct-series-l .ct-point,.ct-series-l .ct-slice-donut{stroke:#86797d}.ct-series-l .ct-area,.ct-series-l .ct-slice-donut-solid,.ct-series-l .ct-slice-pie{fill:#86797d}.ct-series-m .ct-bar,.ct-series-m .ct-line,.ct-series-m .ct-point,.ct-series-m .ct-slice-donut{stroke:#b2c326}.ct-series-m .ct-area,.ct-series-m .ct-slice-donut-solid,.ct-series-m .ct-slice-pie{fill:#b2c326}.ct-series-n .ct-bar,.ct-series-n .ct-line,.ct-series-n .ct-point,.ct-series-n .ct-slice-donut{stroke:#6188e2}.ct-series-n .ct-area,.ct-series-n .ct-slice-donut-solid,.ct-series-n .ct-slice-pie{fill:#6188e2}.ct-series-o .ct-bar,.ct-series-o .ct-line,.ct-series-o .ct-point,.ct-series-o .ct-slice-donut{stroke:#a748ca}.ct-series-o .ct-area,.ct-series-o .ct-slice-donut-solid,.ct-series-o .ct-slice-pie{fill:#a748ca}.ct-square{display:block;position:relative;width:100%}.ct-square:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:100%}.ct-square:after{display:table}.ct-square>svg{display:block;position:absolute;top:0;left:0}.ct-minor-second{display:block;position:relative;width:100%}.ct-minor-second:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:93.75%}.ct-minor-second:after{display:table}.ct-minor-second>svg{display:block;position:absolute;top:0;left:0}.ct-major-second{display:block;position:relative;width:100%}.ct-major-second:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:88.8888888889%}.ct-major-second:after{display:table}.ct-major-second>svg{display:block;position:absolute;top:0;left:0}.ct-minor-third{display:block;position:relative;width:100%}.ct-minor-third:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:83.3333333333%}.ct-minor-third:after{display:table}.ct-minor-third>svg{display:block;position:absolute;top:0;left:0}.ct-major-third{display:block;position:relative;width:100%}.ct-major-third:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:80%}.ct-major-third:after{display:table}.ct-major-third>svg{display:block;position:absolute;top:0;left:0}.ct-perfect-fourth{display:block;position:relative;width:100%}.ct-perfect-fourth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:75%}.ct-perfect-fourth:after{display:table}.ct-perfect-fourth>svg{display:block;position:absolute;top:0;left:0}.ct-perfect-fifth{display:block;position:relative;width:100%}.ct-perfect-fifth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:66.6666666667%}.ct-perfect-fifth:after{display:table}.ct-perfect-fifth>svg{display:block;position:absolute;top:0;left:0}.ct-minor-sixth{display:block;position:relative;width:100%}.ct-minor-sixth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:62.5%}.ct-minor-sixth:after{display:table}.ct-minor-sixth>svg{display:block;position:absolute;top:0;left:0}.ct-golden-section{display:block;position:relative;width:100%}.ct-golden-section:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:61.804697157%}.ct-golden-section:after{content:"";display:table;clear:both}.ct-golden-section>svg{display:block;position:absolute;top:0;left:0}.ct-major-sixth{display:block;position:relative;width:100%}.ct-major-sixth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:60%}.ct-major-sixth:after{display:table}.ct-major-sixth>svg{display:block;position:absolute;top:0;left:0}.ct-minor-seventh{display:block;position:relative;width:100%}.ct-minor-seventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:56.25%}.ct-minor-seventh:after{display:table}.ct-minor-seventh>svg{display:block;position:absolute;top:0;left:0}.ct-major-seventh{display:block;position:relative;width:100%}.ct-major-seventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:53.3333333333%}.ct-major-seventh:after{display:table}.ct-major-seventh>svg{display:block;position:absolute;top:0;left:0}.ct-octave{display:block;position:relative;width:100%}.ct-octave:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:50%}.ct-octave:after{display:table}.ct-octave>svg{display:block;position:absolute;top:0;left:0}.ct-major-tenth{display:block;position:relative;width:100%}.ct-major-tenth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:40%}.ct-major-tenth:after{display:table}.ct-major-tenth>svg{display:block;position:absolute;top:0;left:0}.ct-major-eleventh{display:block;position:relative;width:100%}.ct-major-eleventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:37.5%}.ct-major-eleventh:after{display:table}.ct-major-eleventh>svg{display:block;position:absolute;top:0;left:0}.ct-major-twelfth{display:block;position:relative;width:100%}.ct-major-twelfth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:33.3333333333%}.ct-major-twelfth:after{display:table}.ct-major-twelfth>svg{display:block;position:absolute;top:0;left:0}.ct-double-octave{display:block;position:relative;width:100%}.ct-double-octave:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:25%}.ct-double-octave:after{display:table}.ct-double-octave>svg{display:block;position:absolute;top:0;left:0}
css/givecss.php CHANGED
@@ -22,6 +22,7 @@
22
23
// Read the file
24
$data = '';
25
$files = array(
26
// Admin CSS
27
'pagelayer-editor.css',
@@ -34,6 +35,7 @@ $files = array(
34
'slippry.css',
35
'pagelayer-frontend.css',
36
'animate.min.css',
37
);
38
39
// What files to give
@@ -60,7 +62,7 @@ if(empty($final)){
60
61
foreach($final as $k => $v){
62
//echo $k.'<br>';
63
- $data .= file_get_contents($v)."\n\n";
64
}
65
66
// We are zipping if possible
@@ -72,7 +74,7 @@ if(function_exists('ob_gzhandler')){
72
header("Content-type: text/css; charset: UTF-8");
73
74
// Set a zero Mtime
75
- $filetime = filemtime('pagelayer-editor.css');
76
77
// Cache Control
78
header("Cache-Control: must-revalidate");
22
23
// Read the file
24
$data = '';
25
+ $self_path = dirname(__FILE__);
26
$files = array(
27
// Admin CSS
28
'pagelayer-editor.css',
35
'slippry.css',
36
'pagelayer-frontend.css',
37
'animate.min.css',
38
+ 'chartist.min.css',
39
);
40
41
// What files to give
62
63
foreach($final as $k => $v){
64
//echo $k.'<br>';
65
+ $data .= file_get_contents($self_path.'/'.$v)."\n\n";
66
}
67
68
// We are zipping if possible
74
header("Content-type: text/css; charset: UTF-8");
75
76
// Set a zero Mtime
77
+ $filetime = filemtime($self_path.'/pagelayer-editor.css');
78
79
// Cache Control
80
header("Cache-Control: must-revalidate");
css/pagelayer-admin.css CHANGED
@@ -23,75 +23,3 @@ padding:10px;
23
padding:0px 20px;
24
display:none;
25
}
26
-
27
- .pagelayer_promo_button {
28
- background-color: #4CAF50; /* Green */
29
- border: none;
30
- color: white;
31
- padding: 6px 10px;
32
- text-align: center;
33
- text-decoration: none;
34
- display: inline-block;
35
- font-size: 13px;
36
- margin: 4px 2px;
37
- -webkit-transition-duration: 0.4s; /* Safari */
38
- transition-duration: 0.4s;
39
- cursor: pointer;
40
- }
41
-
42
- .pagelayer_promo_button:focus{
43
- border: none;
44
- color: white;
45
- }
46
-
47
- .pagelayer_promo_button1 {
48
- color: white;
49
- background-color: #4CAF50;
50
- border:3px solid #4CAF50;
51
- }
52
-
53
- .pagelayer_promo_button1:hover {
54
- box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19);
55
- color: white;
56
- border:3px solid #4CAF50;
57
- }
58
-
59
- .pagelayer_promo_button2 {
60
- color: white;
61
- background-color: #0085ba;
62
- }
63
-
64
- .pagelayer_promo_button2:hover {
65
- box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19);
66
- color: white;
67
- }
68
-
69
- .pagelayer_promo_button3 {
70
- color: white;
71
- background-color: #365899;
72
- }
73
-
74
- .pagelayer_promo_button3:hover {
75
- box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19);
76
- color: white;
77
- }
78
-
79
- .pagelayer_promo_button4 {
80
- color: white;
81
- background-color: rgb(66, 184, 221);
82
- }
83
-
84
- .pagelayer_promo_button4:hover {
85
- box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19);
86
- color: white;
87
- }
88
-
89
- .pagelayer_promo-close{
90
- float:right;
91
- text-decoration:none;
92
- margin: 5px 10px 0px 0px;
93
- }
94
-
95
- .pagelayer_promo-close:hover{
96
- color: red;
97
- }
23
padding:0px 20px;
24
display:none;
25
}
css/pagelayer-editor.css CHANGED
@@ -1232,6 +1232,10 @@ display: none;
1232
padding: 7px 10px;
1233
}
1234
1235
.pagelayer-elp-padding{
1236
width:21% !important;
1237
}
@@ -1424,6 +1428,7 @@ padding:1px;
1424
@font-face{font-family:pagelayer;src:url(../fonts/pagelayer.woff) format('woff'),url(../fonts/pagelayer.ttf) format("truetype"),url(../fonts/pagelayer.svg#pagelayer) format("svg");font-weight:400;font-style:normal}
1425
1426
.pagelayer-pl_row:before{content:"\f0c9"} /* e916 */
1427
.pagelayer-pl_col:before{content:"\f0db"}
1428
.pagelayer-pl_heading:before{content:"\e90f";font-size:18px;}
1429
.pagelayer-pl_text:before{content:"\f036"}
@@ -1463,6 +1468,7 @@ padding:1px;
1463
.pagelayer-pl_anchor:before{content:"\f13d"}
1464
.pagelayer-pl_progress:before{content:"\f0ae"}
1465
.pagelayer-pl_social_grp:before{content:"\f029"}
1466
.pagelayer-pl_counter:before{content:"\f162"}
1467
.pagelayer-pl_shortcodes:before{content:"\f141"}
1468
.pagelayer-pl_divider:before{content:"\f2d1"}
@@ -1470,7 +1476,7 @@ padding:1px;
1470
.pagelayer-pl_block:before{content:"\f0c8"}
1471
.pagelayer-pl_collapse:before{content:"\f233"}
1472
.pagelayer-pl_iconbox:before{content:"\e912"}
1473
- .pagelayer-pl_tooltip:before{content:"\f18d"}
1474
.pagelayer-pl_badge:before{content:"\f2c1"}
1475
.pagelayer-pl_wp_widgets:before{content:"\e945"}
1476
.pagelayer-pl_wp_custom_menu:before{content:"\e92a"}
1232
padding: 7px 10px;
1233
}
1234
1235
+ .pagelayer-elp-group-item-clone{
1236
+ padding-right:0px !important;
1237
+ }
1238
+
1239
.pagelayer-elp-padding{
1240
width:21% !important;
1241
}
1428
@font-face{font-family:pagelayer;src:url(../fonts/pagelayer.woff) format('woff'),url(../fonts/pagelayer.ttf) format("truetype"),url(../fonts/pagelayer.svg#pagelayer) format("svg");font-weight:400;font-style:normal}
1429
1430
.pagelayer-pl_row:before{content:"\f0c9"} /* e916 */
1431
+ .pagelayer-pl_inner_row:before{content:"\f022"}
1432
.pagelayer-pl_col:before{content:"\f0db"}
1433
.pagelayer-pl_heading:before{content:"\e90f";font-size:18px;}
1434
.pagelayer-pl_text:before{content:"\f036"}
1468
.pagelayer-pl_anchor:before{content:"\f13d"}
1469
.pagelayer-pl_progress:before{content:"\f0ae"}
1470
.pagelayer-pl_social_grp:before{content:"\f029"}
1471
+ .pagelayer-pl_share_grp:before{content:"\e952"}
1472
.pagelayer-pl_counter:before{content:"\f162"}
1473
.pagelayer-pl_shortcodes:before{content:"\f141"}
1474
.pagelayer-pl_divider:before{content:"\f2d1"}
1476
.pagelayer-pl_block:before{content:"\f0c8"}
1477
.pagelayer-pl_collapse:before{content:"\f233"}
1478
.pagelayer-pl_iconbox:before{content:"\e912"}
1479
+ .pagelayer-pl_tooltip:before{content:"\f27a"} /*f18d*/
1480
.pagelayer-pl_badge:before{content:"\f2c1"}
1481
.pagelayer-pl_wp_widgets:before{content:"\e945"}
1482
.pagelayer-pl_wp_custom_menu:before{content:"\e92a"}
css/pagelayer-frontend.css CHANGED
@@ -822,6 +822,7 @@ text-align: center;
822
border-radius: 6px;
823
position: absolute;
824
z-index: 1;
825
}
826
827
.pagelayer-tooltip-icon{
@@ -2687,3 +2688,37 @@ max-width:unset;
2687
}
2688
2689
/*******************/
822
border-radius: 6px;
823
position: absolute;
824
z-index: 1;
825
+ padding:5px;
826
}
827
828
.pagelayer-tooltip-icon{
2688
}
2689
2690
/*******************/
2691
+
2692
+ /* Image hotspot */
2693
+
2694
+ .pagelayer-image-hotspots-anim:hover:before{
2695
+ transform: scale(2);
2696
+ }
2697
+ .pagelayer-image-hotspots-anim i{
2698
+ position: relative;
2699
+ }
2700
+
2701
+ .pagelayer-image-hotspots-anim::before {
2702
+ content: "";
2703
+ transform: scale(1);
2704
+ position: absolute;
2705
+ top:0;
2706
+ left:0;
2707
+ bottom:0;
2708
+ right:0;
2709
+ pointer-events: none;
2710
+ animation: pagelayer-hotspot 2s infinite;
2711
+ }
2712
+
2713
+ @keyframes pagelayer-hotspot {
2714
+ 0% {transform: scale(1);opacity: 1;}
2715
+ 100% {transform: scale(1.5); opacity: 0;}
2716
+ }
2717
+
2718
+ .pagelayer-hotspots-hover .pagelayer-hotspots-icon-holder:hover .pagelayer-tooltip-text,
2719
+ .pagelayer-hotspots-always .pagelayer-hotspots-icon-holder .pagelayer-tooltip-text{
2720
+ visibility:visible;
2721
+ }
2722
+
2723
+ /* Image Hotspot end */
2724
+
init.php CHANGED
@@ -5,7 +5,7 @@ if (!defined('ABSPATH')) exit;
5
6
define('PAGELAYER_BASE', plugin_basename(__FILE__));
7
define('PAGELAYER_FILE', __FILE__);
8
- define('PAGELAYER_VERSION', '0.9.3');
9
define('PAGELAYER_DIR', WP_PLUGIN_DIR.'/'.basename(dirname(PAGELAYER_FILE)));
10
define('PAGELAYER_SLUG', 'pagelayer');
11
define('PAGELAYER_URL', plugins_url('', PAGELAYER_FILE));
@@ -148,6 +148,9 @@ function pagelayer_admin_menu() {
148
function pagelayer_page_handler(){
149
150
global $wp_version, $pagelayer;
151
152
include_once(PAGELAYER_DIR.'/main/settings.php');
153
@@ -158,13 +161,6 @@ function pagelayer_page_handler(){
158
159
}
160
161
- // Enqueue JS and CSS in Admin Panel for settings
162
- add_action( 'admin_enqueue_scripts', 'pagelayer_admin_script' );
163
- function pagelayer_admin_script() {
164
- wp_enqueue_script( 'pagelayer-admin', PAGELAYER_JS.'/pagelayer-admin.js', array('jquery'), PAGELAYER_VERSION);
165
- wp_enqueue_style( 'pagelayer-admin', PAGELAYER_CSS.'/pagelayer-admin.css', array(), PAGELAYER_VERSION);
166
- }
167
-
168
// Load the Live Body
169
add_action('template_redirect', 'pagelayer_load_live_body', 4);
170
5
6
define('PAGELAYER_BASE', plugin_basename(__FILE__));
7
define('PAGELAYER_FILE', __FILE__);
8
+ define('PAGELAYER_VERSION', '0.9.4');
9
define('PAGELAYER_DIR', WP_PLUGIN_DIR.'/'.basename(dirname(PAGELAYER_FILE)));
10
define('PAGELAYER_SLUG', 'pagelayer');
11
define('PAGELAYER_URL', plugins_url('', PAGELAYER_FILE));
148
function pagelayer_page_handler(){
149
150
global $wp_version, $pagelayer;
151
+
152
+ wp_enqueue_script( 'pagelayer-admin', PAGELAYER_JS.'/pagelayer-admin.js', array('jquery'), PAGELAYER_VERSION);
153
+ wp_enqueue_style( 'pagelayer-admin', PAGELAYER_CSS.'/pagelayer-admin.css', array(), PAGELAYER_VERSION);
154
155
include_once(PAGELAYER_DIR.'/main/settings.php');
156
161
162
}
163
164
// Load the Live Body
165
add_action('template_redirect', 'pagelayer_load_live_body', 4);
166
js/chartist.min.js ADDED
@@ -0,0 +1,10 @@
1
+ /* Chartist.js 0.11.0
2
+ * Copyright © 2017 Gion Kunz
3
+ * Free to use under either the WTFPL license or the MIT license.
4
+ * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-WTFPL
5
+ * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-MIT
6
+ */
7
+
8
+ !function(a,b){"function"==typeof define&&define.amd?define("Chartist",[],function(){return a.Chartist=b()}):"object"==typeof module&&module.exports?module.exports=b():a.Chartist=b()}(this,function(){var a={version:"0.11.0"};return function(a,b,c){"use strict";c.namespaces={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",ct:"http://gionkunz.github.com/chartist-js/ct"},c.noop=function(a){return a},c.alphaNumerate=function(a){return String.fromCharCode(97+a%26)},c.extend=function(a){var b,d,e;for(a=a||{},b=1;b<arguments.length;b++){d=arguments[b];for(var f in d)e=d[f],"object"!=typeof e||null===e||e instanceof Array?a[f]=e:a[f]=c.extend(a[f],e)}return a},c.replaceAll=function(a,b,c){return a.replace(new RegExp(b,"g"),c)},c.ensureUnit=function(a,b){return"number"==typeof a&&(a+=b),a},c.quantity=function(a){if("string"==typeof a){var b=/^(\d+)\s*(.*)#x2F;g.exec(a);return{value:+b[1],unit:b[2]||void 0}}return{value:a}},c.querySelector=function(a){return a instanceof Node?a:b.querySelector(a)},c.times=function(a){return Array.apply(null,new Array(a))},c.sum=function(a,b){return a+(b?b:0)},c.mapMultiply=function(a){return function(b){return b*a}},c.mapAdd=function(a){return function(b){return b+a}},c.serialMap=function(a,b){var d=[],e=Math.max.apply(null,a.map(function(a){return a.length}));return c.times(e).forEach(function(c,e){var f=a.map(function(a){return a[e]});d[e]=b.apply(null,f)}),d},c.roundWithPrecision=function(a,b){var d=Math.pow(10,b||c.precision);return Math.round(a*d)/d},c.precision=8,c.escapingMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"},c.serialize=function(a){return null===a||void 0===a?a:("number"==typeof a?a=""+a:"object"==typeof a&&(a=JSON.stringify({data:a})),Object.keys(c.escapingMap).reduce(function(a,b){return c.replaceAll(a,b,c.escapingMap[b])},a))},c.deserialize=function(a){if("string"!=typeof a)return a;a=Object.keys(c.escapingMap).reduce(function(a,b){return c.replaceAll(a,c.escapingMap[b],b)},a);try{a=JSON.parse(a),a=void 0!==a.data?a.data:a}catch(b){}return a},c.createSvg=function(a,b,d,e){var f;return b=b||"100%",d=d||"100%",Array.prototype.slice.call(a.querySelectorAll("svg")).filter(function(a){return a.getAttributeNS(c.namespaces.xmlns,"ct")}).forEach(function(b){a.removeChild(b)}),f=new c.Svg("svg").attr({width:b,height:d}).addClass(e),f._node.style.width=b,f._node.style.height=d,a.appendChild(f._node),f},c.normalizeData=function(a,b,d){var e,f={raw:a,normalized:{}};return f.normalized.series=c.getDataArray({series:a.series||[]},b,d),e=f.normalized.series.every(function(a){return a instanceof Array})?Math.max.apply(null,f.normalized.series.map(function(a){return a.length})):f.normalized.series.length,f.normalized.labels=(a.labels||[]).slice(),Array.prototype.push.apply(f.normalized.labels,c.times(Math.max(0,e-f.normalized.labels.length)).map(function(){return""})),b&&c.reverseData(f.normalized),f},c.safeHasProperty=function(a,b){return null!==a&&"object"==typeof a&&a.hasOwnProperty(b)},c.isDataHoleValue=function(a){return null===a||void 0===a||"number"==typeof a&&isNaN(a)},c.reverseData=function(a){a.labels.reverse(),a.series.reverse();for(var b=0;b<a.series.length;b++)"object"==typeof a.series[b]&&void 0!==a.series[b].data?a.series[b].data.reverse():a.series[b]instanceof Array&&a.series[b].reverse()},c.getDataArray=function(a,b,d){function e(a){if(c.safeHasProperty(a,"value"))return e(a.value);if(c.safeHasProperty(a,"data"))return e(a.data);if(a instanceof Array)return a.map(e);if(!c.isDataHoleValue(a)){if(d){var b={};return"string"==typeof d?b[d]=c.getNumberOrUndefined(a):b.y=c.getNumberOrUndefined(a),b.x=a.hasOwnProperty("x")?c.getNumberOrUndefined(a.x):b.x,b.y=a.hasOwnProperty("y")?c.getNumberOrUndefined(a.y):b.y,b}return c.getNumberOrUndefined(a)}}return a.series.map(e)},c.normalizePadding=function(a,b){return b=b||0,"number"==typeof a?{top:a,right:a,bottom:a,left:a}:{top:"number"==typeof a.top?a.top:b,right:"number"==typeof a.right?a.right:b,bottom:"number"==typeof a.bottom?a.bottom:b,left:"number"==typeof a.left?a.left:b}},c.getMetaData=function(a,b){var c=a.data?a.data[b]:a[b];return c?c.meta:void 0},c.orderOfMagnitude=function(a){return Math.floor(Math.log(Math.abs(a))/Math.LN10)},c.projectLength=function(a,b,c){return b/c.range*a},c.getAvailableHeight=function(a,b){return Math.max((c.quantity(b.height).value||a.height())-(b.chartPadding.top+b.chartPadding.bottom)-b.axisX.offset,0)},c.getHighLow=function(a,b,d){function e(a){if(void 0!==a)if(a instanceof Array)for(var b=0;b<a.length;b++)e(a[b]);else{var c=d?+a[d]:+a;g&&c>f.high&&(f.high=c),h&&c<f.low&&(f.low=c)}}b=c.extend({},b,d?b["axis"+d.toUpperCase()]:{});var f={high:void 0===b.high?-Number.MAX_VALUE:+b.high,low:void 0===b.low?Number.MAX_VALUE:+b.low},g=void 0===b.high,h=void 0===b.low;return(g||h)&&e(a),(b.referenceValue||0===b.referenceValue)&&(f.high=Math.max(b.referenceValue,f.high),f.low=Math.min(b.referenceValue,f.low)),f.high<=f.low&&(0===f.low?f.high=1:f.low<0?f.high=0:f.high>0?f.low=0:(f.high=1,f.low=0)),f},c.isNumeric=function(a){return null!==a&&isFinite(a)},c.isFalseyButZero=function(a){return!a&&0!==a},c.getNumberOrUndefined=function(a){return c.isNumeric(a)?+a:void 0},c.isMultiValue=function(a){return"object"==typeof a&&("x"in a||"y"in a)},c.getMultiValue=function(a,b){return c.isMultiValue(a)?c.getNumberOrUndefined(a[b||"y"]):c.getNumberOrUndefined(a)},c.rho=function(a){function b(a,c){return a%c===0?c:b(c,a%c)}function c(a){return a*a+1}if(1===a)return a;var d,e=2,f=2;if(a%2===0)return 2;do e=c(e)%a,f=c(c(f))%a,d=b(Math.abs(e-f),a);while(1===d);return d},c.getBounds=function(a,b,d,e){function f(a,b){return a===(a+=b)&&(a*=1+(b>0?o:-o)),a}var g,h,i,j=0,k={high:b.high,low:b.low};k.valueRange=k.high-k.low,k.oom=c.orderOfMagnitude(k.valueRange),k.step=Math.pow(10,k.oom),k.min=Math.floor(k.low/k.step)*k.step,k.max=Math.ceil(k.high/k.step)*k.step,k.range=k.max-k.min,k.numberOfSteps=Math.round(k.range/k.step);var l=c.projectLength(a,k.step,k),m=l<d,n=e?c.rho(k.range):0;if(e&&c.projectLength(a,1,k)>=d)k.step=1;else if(e&&n<k.step&&c.projectLength(a,n,k)>=d)k.step=n;else for(;;){if(m&&c.projectLength(a,k.step,k)<=d)k.step*=2;else{if(m||!(c.projectLength(a,k.step/2,k)>=d))break;if(k.step/=2,e&&k.step%1!==0){k.step*=2;break}}if(j++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}var o=2.221e-16;for(k.step=Math.max(k.step,o),h=k.min,i=k.max;h+k.step<=k.low;)h=f(h,k.step);for(;i-k.step>=k.high;)i=f(i,-k.step);k.min=h,k.max=i,k.range=k.max-k.min;var p=[];for(g=k.min;g<=k.max;g=f(g,k.step)){var q=c.roundWithPrecision(g);q!==p[p.length-1]&&p.push(q)}return k.values=p,k},c.polarToCartesian=function(a,b,c,d){var e=(d-90)*Math.PI/180;return{x:a+c*Math.cos(e),y:b+c*Math.sin(e)}},c.createChartRect=function(a,b,d){var e=!(!b.axisX&&!b.axisY),f=e?b.axisY.offset:0,g=e?b.axisX.offset:0,h=a.width()||c.quantity(b.width).value||0,i=a.height()||c.quantity(b.height).value||0,j=c.normalizePadding(b.chartPadding,d);h=Math.max(h,f+j.left+j.right),i=Math.max(i,g+j.top+j.bottom);var k={padding:j,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return e?("start"===b.axisX.position?(k.y2=j.top+g,k.y1=Math.max(i-j.bottom,k.y2+1)):(k.y2=j.top,k.y1=Math.max(i-j.bottom-g,k.y2+1)),"start"===b.axisY.position?(k.x1=j.left+f,k.x2=Math.max(h-j.right,k.x1+1)):(k.x1=j.left,k.x2=Math.max(h-j.right-f,k.x1+1))):(k.x1=j.left,k.x2=Math.max(h-j.right,k.x1+1),k.y2=j.top,k.y1=Math.max(i-j.bottom,k.y2+1)),k},c.createGrid=function(a,b,d,e,f,g,h,i){var j={};j[d.units.pos+"1"]=a,j[d.units.pos+"2"]=a,j[d.counterUnits.pos+"1"]=e,j[d.counterUnits.pos+"2"]=e+f;var k=g.elem("line",j,h.join(" "));i.emit("draw",c.extend({type:"grid",axis:d,index:b,group:g,element:k},j))},c.createGridBackground=function(a,b,c,d){var e=a.elem("rect",{x:b.x1,y:b.y2,width:b.width(),height:b.height()},c,!0);d.emit("draw",{type:"gridBackground",group:a,element:e})},c.createLabel=function(a,d,e,f,g,h,i,j,k,l,m){var n,o={};if(o[g.units.pos]=a+i[g.units.pos],o[g.counterUnits.pos]=i[g.counterUnits.pos],o[g.units.len]=d,o[g.counterUnits.len]=Math.max(0,h-10),l){var p=b.createElement("span");p.className=k.join(" "),p.setAttribute("xmlns",c.namespaces.xhtml),p.innerText=f[e],p.style[g.units.len]=Math.round(o[g.units.len])+"px",p.style[g.counterUnits.len]=Math.round(o[g.counterUnits.len])+"px",n=j.foreignObject(p,c.extend({style:"overflow: visible;"},o))}else n=j.elem("text",o,k.join(" ")).text(f[e]);m.emit("draw",c.extend({type:"label",axis:g,index:e,group:j,element:n,text:f[e]},o))},c.getSeriesOption=function(a,b,c){if(a.name&&b.series&&b.series[a.name]){var d=b.series[a.name];return d.hasOwnProperty(c)?d[c]:b[c]}return b[c]},c.optionsProvider=function(b,d,e){function f(b){var f=h;if(h=c.extend({},j),d)for(i=0;i<d.length;i++){var g=a.matchMedia(d[i][0]);g.matches&&(h=c.extend(h,d[i][1]))}e&&b&&e.emit("optionsChanged",{previousOptions:f,currentOptions:h})}function g(){k.forEach(function(a){a.removeListener(f)})}var h,i,j=c.extend({},b),k=[];if(!a.matchMedia)throw"window.matchMedia not found! Make sure you're using a polyfill.";if(d)for(i=0;i<d.length;i++){var l=a.matchMedia(d[i][0]);l.addListener(f),k.push(l)}return f(),{removeMediaQueryListeners:g,getCurrentOptions:function(){return c.extend({},h)}}},c.splitIntoSegments=function(a,b,d){var e={increasingX:!1,fillHoles:!1};d=c.extend({},e,d);for(var f=[],g=!0,h=0;h<a.length;h+=2)void 0===c.getMultiValue(b[h/2].value)?d.fillHoles||(g=!0):(d.increasingX&&h>=2&&a[h]<=a[h-2]&&(g=!0),g&&(f.push({pathCoordinates:[],valueData:[]}),g=!1),f[f.length-1].pathCoordinates.push(a[h],a[h+1]),f[f.length-1].valueData.push(b[h/2]));return f}}(window,document,a),function(a,b,c){"use strict";c.Interpolation={},c.Interpolation.none=function(a){var b={fillHoles:!1};return a=c.extend({},b,a),function(b,d){for(var e=new c.Svg.Path,f=!0,g=0;g<b.length;g+=2){var h=b[g],i=b[g+1],j=d[g/2];void 0!==c.getMultiValue(j.value)?(f?e.move(h,i,!1,j):e.line(h,i,!1,j),f=!1):a.fillHoles||(f=!0)}return e}},c.Interpolation.simple=function(a){var b={divisor:2,fillHoles:!1};a=c.extend({},b,a);var d=1/Math.max(1,a.divisor);return function(b,e){for(var f,g,h,i=new c.Svg.Path,j=0;j<b.length;j+=2){var k=b[j],l=b[j+1],m=(k-f)*d,n=e[j/2];void 0!==n.value?(void 0===h?i.move(k,l,!1,n):i.curve(f+m,g,k-m,l,k,l,!1,n),f=k,g=l,h=n):a.fillHoles||(f=k=h=void 0)}return i}},c.Interpolation.cardinal=function(a){var b={tension:1,fillHoles:!1};a=c.extend({},b,a);var d=Math.min(1,Math.max(0,a.tension)),e=1-d;return function f(b,g){var h=c.splitIntoSegments(b,g,{fillHoles:a.fillHoles});if(h.length){if(h.length>1){var i=[];return h.forEach(function(a){i.push(f(a.pathCoordinates,a.valueData))}),c.Svg.Path.join(i)}if(b=h[0].pathCoordinates,g=h[0].valueData,b.length<=4)return c.Interpolation.none()(b,g);for(var j,k=(new c.Svg.Path).move(b[0],b[1],!1,g[0]),l=0,m=b.length;m-2*!j>l;l+=2){var n=[{x:+b[l-2],y:+b[l-1]},{x:+b[l],y:+b[l+1]},{x:+b[l+2],y:+b[l+3]},{x:+b[l+4],y:+b[l+5]}];j?l?m-4===l?n[3]={x:+b[0],y:+b[1]}:m-2===l&&(n[2]={x:+b[0],y:+b[1]},n[3]={x:+b[2],y:+b[3]}):n[0]={x:+b[m-2],y:+b[m-1]}:m-4===l?n[3]=n[2]:l||(n[0]={x:+b[l],y:+b[l+1]}),k.curve(d*(-n[0].x+6*n[1].x+n[2].x)/6+e*n[2].x,d*(-n[0].y+6*n[1].y+n[2].y)/6+e*n[2].y,d*(n[1].x+6*n[2].x-n[3].x)/6+e*n[2].x,d*(n[1].y+6*n[2].y-n[3].y)/6+e*n[2].y,n[2].x,n[2].y,!1,g[(l+2)/2])}return k}return c.Interpolation.none()([])}},c.Interpolation.monotoneCubic=function(a){var b={fillHoles:!1};return a=c.extend({},b,a),function d(b,e){var f=c.splitIntoSegments(b,e,{fillHoles:a.fillHoles,increasingX:!0});if(f.length){if(f.length>1){var g=[];return f.forEach(function(a){g.push(d(a.pathCoordinates,a.valueData))}),c.Svg.Path.join(g)}if(b=f[0].pathCoordinates,e=f[0].valueData,b.length<=4)return c.Interpolation.none()(b,e);var h,i,j=[],k=[],l=b.length/2,m=[],n=[],o=[],p=[];for(h=0;h<l;h++)j[h]=b[2*h],k[h]=b[2*h+1];for(h=0;h<l-1;h++)o[h]=k[h+1]-k[h],p[h]=j[h+1]-j[h],n[h]=o[h]/p[h];for(m[0]=n[0],m[l-1]=n[l-2],h=1;h<l-1;h++)0===n[h]||0===n[h-1]||n[h-1]>0!=n[h]>0?m[h]=0:(m[h]=3*(p[h-1]+p[h])/((2*p[h]+p[h-1])/n[h-1]+(p[h]+2*p[h-1])/n[h]),isFinite(m[h])||(m[h]=0));for(i=(new c.Svg.Path).move(j[0],k[0],!1,e[0]),h=0;h<l-1;h++)i.curve(j[h]+p[h]/3,k[h]+m[h]*p[h]/3,j[h+1]-p[h]/3,k[h+1]-m[h+1]*p[h]/3,j[h+1],k[h+1],!1,e[h+1]);return i}return c.Interpolation.none()([])}},c.Interpolation.step=function(a){var b={postpone:!0,fillHoles:!1};return a=c.extend({},b,a),function(b,d){for(var e,f,g,h=new c.Svg.Path,i=0;i<b.length;i+=2){var j=b[i],k=b[i+1],l=d[i/2];void 0!==l.value?(void 0===g?h.move(j,k,!1,l):(a.postpone?h.line(j,f,!1,g):h.line(e,k,!1,l),h.line(j,k,!1,l)),e=j,f=k,g=l):a.fillHoles||(e=f=g=void 0)}return h}}}(window,document,a),function(a,b,c){"use strict";c.EventEmitter=function(){function a(a,b){d[a]=d[a]||[],d[a].push(b)}function b(a,b){d[a]&&(b?(d[a].splice(d[a].indexOf(b),1),0===d[a].length&&delete d[a]):delete d[a])}function c(a,b){d[a]&&d[a].forEach(function(a){a(b)}),d["*"]&&d["*"].forEach(function(c){c(a,b)})}var d=[];return{addEventHandler:a,removeEventHandler:b,emit:c}}}(window,document,a),function(a,b,c){"use strict";function d(a){var b=[];if(a.length)for(var c=0;c<a.length;c++)b.push(a[c]);return b}function e(a,b){var d=b||this.prototype||c.Class,e=Object.create(d);c.Class.cloneDefinitions(e,a);var f=function(){var a,b=e.constructor||function(){};return a=this===c?Object.create(e):this,b.apply(a,Array.prototype.slice.call(arguments,0)),a};return f.prototype=e,f["super"]=d,f.extend=this.extend,f}function f(){var a=d(arguments),b=a[0];return a.splice(1,a.length-1).forEach(function(a){Object.getOwnPropertyNames(a).forEach(function(c){delete b[c],Object.defineProperty(b,c,Object.getOwnPropertyDescriptor(a,c))})}),b}c.Class={extend:e,cloneDefinitions:f}}(window,document,a),function(a,b,c){"use strict";function d(a,b,d){return a&&(this.data=a||{},this.data.labels=this.data.labels||[],this.data.series=this.data.series||[],this.eventEmitter.emit("data",{type:"update",data:this.data})),b&&(this.options=c.extend({},d?this.options:this.defaultOptions,b),this.initializeTimeoutId||(this.optionsProvider.removeMediaQueryListeners(),this.optionsProvider=c.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter))),this.initializeTimeoutId||this.createChart(this.optionsProvider.getCurrentOptions()),this}function e(){return this.initializeTimeoutId?a.clearTimeout(this.initializeTimeoutId):(a.removeEventListener("resize",this.resizeListener),this.optionsProvider.removeMediaQueryListeners()),this}function f(a,b){return this.eventEmitter.addEventHandler(a,b),this}function g(a,b){return this.eventEmitter.removeEventHandler(a,b),this}function h(){a.addEventListener("resize",this.resizeListener),this.optionsProvider=c.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter),this.eventEmitter.addEventHandler("optionsChanged",function(){this.update()}.bind(this)),this.options.plugins&&this.options.plugins.forEach(function(a){a instanceof Array?a[0](this,a[1]):a(this)}.bind(this)),this.eventEmitter.emit("data",{type:"initial",data:this.data}),this.createChart(this.optionsProvider.getCurrentOptions()),this.initializeTimeoutId=void 0}function i(a,b,d,e,f){this.container=c.querySelector(a),this.data=b||{},this.data.labels=this.data.labels||[],this.data.series=this.data.series||[],this.defaultOptions=d,this.options=e,this.responsiveOptions=f,this.eventEmitter=c.EventEmitter(),this.supportsForeignObject=c.Svg.isSupported("Extensibility"),this.supportsAnimations=c.Svg.isSupported("AnimationEventsAttribute"),this.resizeListener=function(){this.update()}.bind(this),this.container&&(this.container.__chartist__&&this.container.__chartist__.detach(),this.container.__chartist__=this),this.initializeTimeoutId=setTimeout(h.bind(this),0)}c.Base=c.Class.extend({constructor:i,optionsProvider:void 0,container:void 0,svg:void 0,eventEmitter:void 0,createChart:function(){throw new Error("Base chart type can't be instantiated!")},update:d,detach:e,on:f,off:g,version:c.version,supportsForeignObject:!1})}(window,document,a),function(a,b,c){"use strict";function d(a,d,e,f,g){a instanceof Element?this._node=a:(this._node=b.createElementNS(c.namespaces.svg,a),"svg"===a&&this.attr({"xmlns:ct":c.namespaces.ct})),d&&this.attr(d),e&&this.addClass(e),f&&(g&&f._node.firstChild?f._node.insertBefore(this._node,f._node.firstChild):f._node.appendChild(this._node))}function e(a,b){return"string"==typeof a?b?this._node.getAttributeNS(b,a):this._node.getAttribute(a):(Object.keys(a).forEach(function(b){if(void 0!==a[b])if(b.indexOf(":")!==-1){var d=b.split(":");this._node.setAttributeNS(c.namespaces[d[0]],b,a[b])}else this._node.setAttribute(b,a[b])}.bind(this)),this)}function f(a,b,d,e){return new c.Svg(a,b,d,this,e)}function g(){return this._node.parentNode instanceof SVGElement?new c.Svg(this._node.parentNode):null}function h(){for(var a=this._node;"svg"!==a.nodeName;)a=a.parentNode;return new c.Svg(a)}function i(a){var b=this._node.querySelector(a);return b?new c.Svg(b):null}function j(a){var b=this._node.querySelectorAll(a);return b.length?new c.Svg.List(b):null}function k(){return this._node}function l(a,d,e,f){if("string"==typeof a){var g=b.createElement("div");g.innerHTML=a,a=g.firstChild}a.setAttribute("xmlns",c.namespaces.xmlns);var h=this.elem("foreignObject",d,e,f);return h._node.appendChild(a),h}function m(a){return this._node.appendChild(b.createTextNode(a)),this}function n(){for(;this._node.firstChild;)this._node.removeChild(this._node.firstChild);return this}function o(){return this._node.parentNode.removeChild(this._node),this.parent()}function p(a){return this._node.parentNode.replaceChild(a._node,this._node),a}function q(a,b){return b&&this._node.firstChild?this._node.insertBefore(a._node,this._node.firstChild):this._node.appendChild(a._node),this}function r(){return this._node.getAttribute("class")?this._node.getAttribute("class").trim().split(/\s+/):[]}function s(a){return this._node.setAttribute("class",this.classes(this._node).concat(a.trim().split(/\s+/)).filter(function(a,b,c){return c.indexOf(a)===b}).join(" ")),this}function t(a){var b=a.trim().split(/\s+/);return this._node.setAttribute("class",this.classes(this._node).filter(function(a){return b.indexOf(a)===-1}).join(" ")),this}function u(){return this._node.setAttribute("class",""),this}function v(){return this._node.getBoundingClientRect().height}function w(){return this._node.getBoundingClientRect().width}function x(a,b,d){return void 0===b&&(b=!0),Object.keys(a).forEach(function(e){function f(a,b){var f,g,h,i={};a.easing&&(h=a.easing instanceof Array?a.easing:c.Svg.Easing[a.easing],delete a.easing),a.begin=c.ensureUnit(a.begin,"ms"),a.dur=c.ensureUnit(a.dur,"ms"),h&&(a.calcMode="spline",a.keySplines=h.join(" "),a.keyTimes="0;1"),b&&(a.fill="freeze",i[e]=a.from,this.attr(i),g=c.quantity(a.begin||0).value,a.begin="indefinite"),f=this.elem("animate",c.extend({attributeName:e},a)),b&&setTimeout(function(){try{f._node.beginElement()}catch(b){i[e]=a.to,this.attr(i),f.remove()}}.bind(this),g),d&&f._node.addEventListener("beginEvent",function(){d.emit("animationBegin",{element:this,animate:f._node,params:a})}.bind(this)),f._node.addEventListener("endEvent",function(){d&&d.emit("animationEnd",{element:this,animate:f._node,params:a}),b&&(i[e]=a.to,this.attr(i),f.remove())}.bind(this))}a[e]instanceof Array?a[e].forEach(function(a){f.bind(this)(a,!1)}.bind(this)):f.bind(this)(a[e],b)}.bind(this)),this}function y(a){var b=this;this.svgElements=[];for(var d=0;d<a.length;d++)this.svgElements.push(new c.Svg(a[d]));Object.keys(c.Svg.prototype).filter(function(a){return["constructor","parent","querySelector","querySelectorAll","replace","append","classes","height","width"].indexOf(a)===-1}).forEach(function(a){b[a]=function(){var d=Array.prototype.slice.call(arguments,0);return b.svgElements.forEach(function(b){c.Svg.prototype[a].apply(b,d)}),b}})}c.Svg=c.Class.extend({constructor:d,attr:e,elem:f,parent:g,root:h,querySelector:i,querySelectorAll:j,getNode:k,foreignObject:l,text:m,empty:n,remove:o,replace:p,append:q,classes:r,addClass:s,removeClass:t,removeAllClasses:u,height:v,width:w,animate:x}),c.Svg.isSupported=function(a){return b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#"+a,"1.1")};var z={easeInSine:[.47,0,.745,.715],easeOutSine:[.39,.575,.565,1],easeInOutSine:[.445,.05,.55,.95],easeInQuad:[.55,.085,.68,.53],easeOutQuad:[.25,.46,.45,.94],easeInOutQuad:[.455,.03,.515,.955],easeInCubic:[.55,.055,.675,.19],easeOutCubic:[.215,.61,.355,1],easeInOutCubic:[.645,.045,.355,1],easeInQuart:[.895,.03,.685,.22],easeOutQuart:[.165,.84,.44,1],easeInOutQuart:[.77,0,.175,1],easeInQuint:[.755,.05,.855,.06],easeOutQuint:[.23,1,.32,1],easeInOutQuint:[.86,0,.07,1],easeInExpo:[.95,.05,.795,.035],easeOutExpo:[.19,1,.22,1],easeInOutExpo:[1,0,0,1],easeInCirc:[.6,.04,.98,.335],easeOutCirc:[.075,.82,.165,1],easeInOutCirc:[.785,.135,.15,.86],easeInBack:[.6,-.28,.735,.045],easeOutBack:[.175,.885,.32,1.275],easeInOutBack:[.68,-.55,.265,1.55]};c.Svg.Easing=z,c.Svg.List=c.Class.extend({constructor:y})}(window,document,a),function(a,b,c){"use strict";function d(a,b,d,e,f,g){var h=c.extend({command:f?a.toLowerCase():a.toUpperCase()},b,g?{data:g}:{});d.splice(e,0,h)}function e(a,b){a.forEach(function(c,d){u[c.command.toLowerCase()].forEach(function(e,f){b(c,e,d,f,a)})})}function f(a,b){this.pathElements=[],this.pos=0,this.close=a,this.options=c.extend({},v,b)}function g(a){return void 0!==a?(this.pos=Math.max(0,Math.min(this.pathElements.length,a)),this):this.pos}function h(a){return this.pathElements.splice(this.pos,a),this}function i(a,b,c,e){return d("M",{x:+a,y:+b},this.pathElements,this.pos++,c,e),this}function j(a,b,c,e){return d("L",{x:+a,y:+b},this.pathElements,this.pos++,c,e),this}function k(a,b,c,e,f,g,h,i){return d("C",{x1:+a,y1:+b,x2:+c,y2:+e,x:+f,y:+g},this.pathElements,this.pos++,h,i),this}function l(a,b,c,e,f,g,h,i,j){return d("A",{rx:+a,ry:+b,xAr:+c,lAf:+e,sf:+f,x:+g,y:+h},this.pathElements,this.pos++,i,j),this}function m(a){var b=a.replace(/([A-Za-z])([0-9])/g,"$1 $2").replace(/([0-9])([A-Za-z])/g,"$1 $2").split(/[\s,]+/).reduce(function(a,b){return b.match(/[A-Za-z]/)&&a.push([]),a[a.length-1].push(b),a},[]);"Z"===b[b.length-1][0].toUpperCase()&&b.pop();var d=b.map(function(a){var b=a.shift(),d=u[b.toLowerCase()];return c.extend({command:b},d.reduce(function(b,c,d){return b[c]=+a[d],b},{}))}),e=[this.pos,0];return Array.prototype.push.apply(e,d),Array.prototype.splice.apply(this.pathElements,e),this.pos+=d.length,this}function n(){var a=Math.pow(10,this.options.accuracy);return this.pathElements.reduce(function(b,c){var d=u[c.command.toLowerCase()].map(function(b){return this.options.accuracy?Math.round(c[b]*a)/a:c[b]}.bind(this));return b+c.command+d.join(",")}.bind(this),"")+(this.close?"Z":"")}function o(a,b){return e(this.pathElements,function(c,d){c[d]*="x"===d[0]?a:b}),this}function p(a,b){return e(this.pathElements,function(c,d){c[d]+="x"===d[0]?a:b}),this}function q(a){return e(this.pathElements,function(b,c,d,e,f){var g=a(b,c,d,e,f);(g||0===g)&&(b[c]=g)}),this}function r(a){var b=new c.Svg.Path(a||this.close);return b.pos=this.pos,b.pathElements=this.pathElements.slice().map(function(a){return c.extend({},a)}),b.options=c.extend({},this.options),b}function s(a){var b=[new c.Svg.Path];return this.pathElements.forEach(function(d){d.command===a.toUpperCase()&&0!==b[b.length-1].pathElements.length&&b.push(new c.Svg.Path),b[b.length-1].pathElements.push(d)}),b}function t(a,b,d){for(var e=new c.Svg.Path(b,d),f=0;f<a.length;f++)for(var g=a[f],h=0;h<g.pathElements.length;h++)e.pathElements.push(g.pathElements[h]);return e}var u={m:["x","y"],l:["x","y"],c:["x1","y1","x2","y2","x","y"],a:["rx","ry","xAr","lAf","sf","x","y"]},v={accuracy:3};c.Svg.Path=c.Class.extend({constructor:f,position:g,remove:h,move:i,line:j,curve:k,arc:l,scale:o,translate:p,transform:q,parse:m,stringify:n,clone:r,splitByCommand:s}),c.Svg.Path.elementDescriptions=u,c.Svg.Path.join=t}(window,document,a),function(a,b,c){"use strict";function d(a,b,c,d){this.units=a,this.counterUnits=a===f.x?f.y:f.x,this.chartRect=b,this.axisLength=b[a.rectEnd]-b[a.rectStart],this.gridOffset=b[a.rectOffset],this.ticks=c,this.options=d}function e(a,b,d,e,f){var g=e["axis"+this.units.pos.toUpperCase()],h=this.ticks.map(this.projectValue.bind(this)),i=this.ticks.map(g.labelInterpolationFnc);h.forEach(function(j,k){var l,m={x:0,y:0};l=h[k+1]?h[k+1]-j:Math.max(this.axisLength-j,30),c.isFalseyButZero(i[k])&&""!==i[k]||("x"===this.units.pos?(j=this.chartRect.x1+j,m.x=e.axisX.labelOffset.x,"start"===e.axisX.position?m.y=this.chartRect.padding.top+e.axisX.labelOffset.y+(d?5:20):m.y=this.chartRect.y1+e.axisX.labelOffset.y+(d?5:20)):(j=this.chartRect.y1-j,m.y=e.axisY.labelOffset.y-(d?l:0),"start"===e.axisY.position?m.x=d?this.chartRect.padding.left+e.axisY.labelOffset.x:this.chartRect.x1-10:m.x=this.chartRect.x2+e.axisY.labelOffset.x+10),g.showGrid&&c.createGrid(j,k,this,this.gridOffset,this.chartRect[this.counterUnits.len](),a,[e.classNames.grid,e.classNames[this.units.dir]],f),g.showLabel&&c.createLabel(j,l,k,i,this,g.offset,m,b,[e.classNames.label,e.classNames[this.units.dir],"start"===g.position?e.classNames[g.position]:e.classNames.end],d,f))}.bind(this))}var f={x:{pos:"x",len:"width",dir:"horizontal",rectStart:"x1",rectEnd:"x2",rectOffset:"y2"},y:{pos:"y",len:"height",dir:"vertical",rectStart:"y2",rectEnd:"y1",rectOffset:"x1"}};c.Axis=c.Class.extend({constructor:d,createGridAndLabels:e,projectValue:function(a,b,c){throw new Error("Base axis can't be instantiated!")}}),c.Axis.units=f}(window,document,a),function(a,b,c){"use strict";function d(a,b,d,e){var f=e.highLow||c.getHighLow(b,e,a.pos);this.bounds=c.getBounds(d[a.rectEnd]-d[a.rectStart],f,e.scaleMinSpace||20,e.onlyInteger),this.range={min:this.bounds.min,max:this.bounds.max},c.AutoScaleAxis["super"].constructor.call(this,a,d,this.bounds.values,e)}function e(a){return this.axisLength*(+c.getMultiValue(a,this.units.pos)-this.bounds.min)/this.bounds.range}c.AutoScaleAxis=c.Axis.extend({constructor:d,projectValue:e})}(window,document,a),function(a,b,c){"use strict";function d(a,b,d,e){var f=e.highLow||c.getHighLow(b,e,a.pos);this.divisor=e.divisor||1,this.ticks=e.ticks||c.times(this.divisor).map(function(a,b){return f.low+(f.high-f.low)/this.divisor*b}.bind(this)),this.ticks.sort(function(a,b){return a-b}),this.range={min:f.low,max:f.high},c.FixedScaleAxis["super"].constructor.call(this,a,d,this.ticks,e),this.stepLength=this.axisLength/this.divisor}function e(a){return this.axisLength*(+c.getMultiValue(a,this.units.pos)-this.range.min)/(this.range.max-this.range.min)}c.FixedScaleAxis=c.Axis.extend({constructor:d,projectValue:e})}(window,document,a),function(a,b,c){"use strict";function d(a,b,d,e){c.StepAxis["super"].constructor.call(this,a,d,e.ticks,e);var f=Math.max(1,e.ticks.length-(e.stretch?1:0));this.stepLength=this.axisLength/f}function e(a,b){return this.stepLength*b}c.StepAxis=c.Axis.extend({constructor:d,projectValue:e})}(window,document,a),function(a,b,c){"use strict";function d(a){var b=c.normalizeData(this.data,a.reverseData,!0);this.svg=c.createSvg(this.container,a.width,a.height,a.classNames.chart);var d,e,g=this.svg.elem("g").addClass(a.classNames.gridGroup),h=this.svg.elem("g"),i=this.svg.elem("g").addClass(a.classNames.labelGroup),j=c.createChartRect(this.svg,a,f.padding);d=void 0===a.axisX.type?new c.StepAxis(c.Axis.units.x,b.normalized.series,j,c.extend({},a.axisX,{ticks:b.normalized.labels,stretch:a.fullWidth})):a.axisX.type.call(c,c.Axis.units.x,b.normalized.series,j,a.axisX),e=void 0===a.axisY.type?new c.AutoScaleAxis(c.Axis.units.y,b.normalized.series,j,c.extend({},a.axisY,{high:c.isNumeric(a.high)?a.high:a.axisY.high,low:c.isNumeric(a.low)?a.low:a.axisY.low})):a.axisY.type.call(c,c.Axis.units.y,b.normalized.series,j,a.axisY),d.createGridAndLabels(g,i,this.supportsForeignObject,a,this.eventEmitter),e.createGridAndLabels(g,i,this.supportsForeignObject,a,this.eventEmitter),a.showGridBackground&&c.createGridBackground(g,j,a.classNames.gridBackground,this.eventEmitter),b.raw.series.forEach(function(f,g){var i=h.elem("g");i.attr({"ct:series-name":f.name,"ct:meta":c.serialize(f.meta)}),i.addClass([a.classNames.series,f.className||a.classNames.series+"-"+c.alphaNumerate(g)].join(" "));var k=[],l=[];b.normalized.series[g].forEach(function(a,h){var i={x:j.x1+d.projectValue(a,h,b.normalized.series[g]),y:j.y1-e.projectValue(a,h,b.normalized.series[g])};k.push(i.x,i.y),l.push({value:a,valueIndex:h,meta:c.getMetaData(f,h)})}.bind(this));var m={lineSmooth:c.getSeriesOption(f,a,"lineSmooth"),showPoint:c.getSeriesOption(f,a,"showPoint"),showLine:c.getSeriesOption(f,a,"showLine"),showArea:c.getSeriesOption(f,a,"showArea"),areaBase:c.getSeriesOption(f,a,"areaBase")},n="function"==typeof m.lineSmooth?m.lineSmooth:m.lineSmooth?c.Interpolation.monotoneCubic():c.Interpolation.none(),o=n(k,l);if(m.showPoint&&o.pathElements.forEach(function(b){var h=i.elem("line",{x1:b.x,y1:b.y,x2:b.x+.01,y2:b.y},a.classNames.point).attr({"ct:value":[b.data.value.x,b.data.value.y].filter(c.isNumeric).join(","),"ct:meta":c.serialize(b.data.meta)});this.eventEmitter.emit("draw",{type:"point",value:b.data.value,index:b.data.valueIndex,meta:b.data.meta,series:f,seriesIndex:g,axisX:d,axisY:e,group:i,element:h,x:b.x,y:b.y})}.bind(this)),m.showLine){var p=i.elem("path",{d:o.stringify()},a.classNames.line,!0);this.eventEmitter.emit("draw",{type:"line",values:b.normalized.series[g],path:o.clone(),chartRect:j,index:g,series:f,seriesIndex:g,seriesMeta:f.meta,axisX:d,axisY:e,group:i,element:p})}if(m.showArea&&e.range){var q=Math.max(Math.min(m.areaBase,e.range.max),e.range.min),r=j.y1-e.projectValue(q);o.splitByCommand("M").filter(function(a){return a.pathElements.length>1}).map(function(a){var b=a.pathElements[0],c=a.pathElements[a.pathElements.length-1];return a.clone(!0).position(0).remove(1).move(b.x,r).line(b.x,b.y).position(a.pathElements.length+1).line(c.x,r)}).forEach(function(c){var h=i.elem("path",{d:c.stringify()},a.classNames.area,!0);this.eventEmitter.emit("draw",{type:"area",values:b.normalized.series[g],path:c.clone(),series:f,seriesIndex:g,axisX:d,axisY:e,chartRect:j,index:g,group:i,element:h})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:e.bounds,chartRect:j,axisX:d,axisY:e,svg:this.svg,options:a})}function e(a,b,d,e){c.Line["super"].constructor.call(this,a,b,f,c.extend({},f,d),e)}var f={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:c.noop,type:void 0},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:c.noop,type:void 0,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,showLine:!0,showPoint:!0,showArea:!1,areaBase:0,lineSmooth:!0,showGridBackground:!1,low:void 0,high:void 0,chartPadding:{top:15,right:15,bottom:5,left:10},fullWidth:!1,reverseData:!1,classNames:{chart:"ct-chart-line",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",line:"ct-line",point:"ct-point",area:"ct-area",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};c.Line=c.Base.extend({constructor:e,createChart:d})}(window,document,a),function(a,b,c){"use strict";function d(a){var b,d;a.distributeSeries?(b=c.normalizeData(this.data,a.reverseData,a.horizontalBars?"x":"y"),b.normalized.series=b.normalized.series.map(function(a){return[a]})):b=c.normalizeData(this.data,a.reverseData,a.horizontalBars?"x":"y"),this.svg=c.createSvg(this.container,a.width,a.height,a.classNames.chart+(a.horizontalBars?" "+a.classNames.horizontalBars:""));var e=this.svg.elem("g").addClass(a.classNames.gridGroup),g=this.svg.elem("g"),h=this.svg.elem("g").addClass(a.classNames.labelGroup);if(a.stackBars&&0!==b.normalized.series.length){var i=c.serialMap(b.normalized.series,function(){
9
+ return Array.prototype.slice.call(arguments).map(function(a){return a}).reduce(function(a,b){return{x:a.x+(b&&b.x)||0,y:a.y+(b&&b.y)||0}},{x:0,y:0})});d=c.getHighLow([i],a,a.horizontalBars?"x":"y")}else d=c.getHighLow(b.normalized.series,a,a.horizontalBars?"x":"y");d.high=+a.high||(0===a.high?0:d.high),d.low=+a.low||(0===a.low?0:d.low);var j,k,l,m,n,o=c.createChartRect(this.svg,a,f.padding);k=a.distributeSeries&&a.stackBars?b.normalized.labels.slice(0,1):b.normalized.labels,a.horizontalBars?(j=m=void 0===a.axisX.type?new c.AutoScaleAxis(c.Axis.units.x,b.normalized.series,o,c.extend({},a.axisX,{highLow:d,referenceValue:0})):a.axisX.type.call(c,c.Axis.units.x,b.normalized.series,o,c.extend({},a.axisX,{highLow:d,referenceValue:0})),l=n=void 0===a.axisY.type?new c.StepAxis(c.Axis.units.y,b.normalized.series,o,{ticks:k}):a.axisY.type.call(c,c.Axis.units.y,b.normalized.series,o,a.axisY)):(l=m=void 0===a.axisX.type?new c.StepAxis(c.Axis.units.x,b.normalized.series,o,{ticks:k}):a.axisX.type.call(c,c.Axis.units.x,b.normalized.series,o,a.axisX),j=n=void 0===a.axisY.type?new c.AutoScaleAxis(c.Axis.units.y,b.normalized.series,o,c.extend({},a.axisY,{highLow:d,referenceValue:0})):a.axisY.type.call(c,c.Axis.units.y,b.normalized.series,o,c.extend({},a.axisY,{highLow:d,referenceValue:0})));var p=a.horizontalBars?o.x1+j.projectValue(0):o.y1-j.projectValue(0),q=[];l.createGridAndLabels(e,h,this.supportsForeignObject,a,this.eventEmitter),j.createGridAndLabels(e,h,this.supportsForeignObject,a,this.eventEmitter),a.showGridBackground&&c.createGridBackground(e,o,a.classNames.gridBackground,this.eventEmitter),b.raw.series.forEach(function(d,e){var f,h,i=e-(b.raw.series.length-1)/2;f=a.distributeSeries&&!a.stackBars?l.axisLength/b.normalized.series.length/2:a.distributeSeries&&a.stackBars?l.axisLength/2:l.axisLength/b.normalized.series[e].length/2,h=g.elem("g"),h.attr({"ct:series-name":d.name,"ct:meta":c.serialize(d.meta)}),h.addClass([a.classNames.series,d.className||a.classNames.series+"-"+c.alphaNumerate(e)].join(" ")),b.normalized.series[e].forEach(function(g,k){var r,s,t,u;if(u=a.distributeSeries&&!a.stackBars?e:a.distributeSeries&&a.stackBars?0:k,r=a.horizontalBars?{x:o.x1+j.projectValue(g&&g.x?g.x:0,k,b.normalized.series[e]),y:o.y1-l.projectValue(g&&g.y?g.y:0,u,b.normalized.series[e])}:{x:o.x1+l.projectValue(g&&g.x?g.x:0,u,b.normalized.series[e]),y:o.y1-j.projectValue(g&&g.y?g.y:0,k,b.normalized.series[e])},l instanceof c.StepAxis&&(l.options.stretch||(r[l.units.pos]+=f*(a.horizontalBars?-1:1)),r[l.units.pos]+=a.stackBars||a.distributeSeries?0:i*a.seriesBarDistance*(a.horizontalBars?-1:1)),t=q[k]||p,q[k]=t-(p-r[l.counterUnits.pos]),void 0!==g){var v={};v[l.units.pos+"1"]=r[l.units.pos],v[l.units.pos+"2"]=r[l.units.pos],!a.stackBars||"accumulate"!==a.stackMode&&a.stackMode?(v[l.counterUnits.pos+"1"]=p,v[l.counterUnits.pos+"2"]=r[l.counterUnits.pos]):(v[l.counterUnits.pos+"1"]=t,v[l.counterUnits.pos+"2"]=q[k]),v.x1=Math.min(Math.max(v.x1,o.x1),o.x2),v.x2=Math.min(Math.max(v.x2,o.x1),o.x2),v.y1=Math.min(Math.max(v.y1,o.y2),o.y1),v.y2=Math.min(Math.max(v.y2,o.y2),o.y1);var w=c.getMetaData(d,k);s=h.elem("line",v,a.classNames.bar).attr({"ct:value":[g.x,g.y].filter(c.isNumeric).join(","),"ct:meta":c.serialize(w)}),this.eventEmitter.emit("draw",c.extend({type:"bar",value:g,index:k,meta:w,series:d,seriesIndex:e,axisX:m,axisY:n,chartRect:o,group:h,element:s},v))}}.bind(this))}.bind(this)),this.eventEmitter.emit("created",{bounds:j.bounds,chartRect:o,axisX:m,axisY:n,svg:this.svg,options:a})}function e(a,b,d,e){c.Bar["super"].constructor.call(this,a,b,f,c.extend({},f,d),e)}var f={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:c.noop,scaleMinSpace:30,onlyInteger:!1},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:c.noop,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,high:void 0,low:void 0,referenceValue:0,chartPadding:{top:15,right:15,bottom:5,left:10},seriesBarDistance:15,stackBars:!1,stackMode:"accumulate",horizontalBars:!1,distributeSeries:!1,reverseData:!1,showGridBackground:!1,classNames:{chart:"ct-chart-bar",horizontalBars:"ct-horizontal-bars",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",bar:"ct-bar",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};c.Bar=c.Base.extend({constructor:e,createChart:d})}(window,document,a),function(a,b,c){"use strict";function d(a,b,c){var d=b.x>a.x;return d&&"explode"===c||!d&&"implode"===c?"start":d&&"implode"===c||!d&&"explode"===c?"end":"middle"}function e(a){var b,e,f,h,i,j=c.normalizeData(this.data),k=[],l=a.startAngle;this.svg=c.createSvg(this.container,a.width,a.height,a.donut?a.classNames.chartDonut:a.classNames.chartPie),e=c.createChartRect(this.svg,a,g.padding),f=Math.min(e.width()/2,e.height()/2),i=a.total||j.normalized.series.reduce(function(a,b){return a+b},0);var m=c.quantity(a.donutWidth);"%"===m.unit&&(m.value*=f/100),f-=a.donut&&!a.donutSolid?m.value/2:0,h="outside"===a.labelPosition||a.donut&&!a.donutSolid?f:"center"===a.labelPosition?0:a.donutSolid?f-m.value/2:f/2,h+=a.labelOffset;var n={x:e.x1+e.width()/2,y:e.y2+e.height()/2},o=1===j.raw.series.filter(function(a){return a.hasOwnProperty("value")?0!==a.value:0!==a}).length;j.raw.series.forEach(function(a,b){k[b]=this.svg.elem("g",null,null)}.bind(this)),a.showLabel&&(b=this.svg.elem("g",null,null)),j.raw.series.forEach(function(e,g){if(0!==j.normalized.series[g]||!a.ignoreEmptyValues){k[g].attr({"ct:series-name":e.name}),k[g].addClass([a.classNames.series,e.className||a.classNames.series+"-"+c.alphaNumerate(g)].join(" "));var p=i>0?l+j.normalized.series[g]/i*360:0,q=Math.max(0,l-(0===g||o?0:.2));p-q>=359.99&&(p=q+359.99);var r,s,t,u=c.polarToCartesian(n.x,n.y,f,q),v=c.polarToCartesian(n.x,n.y,f,p),w=new c.Svg.Path(!a.donut||a.donutSolid).move(v.x,v.y).arc(f,f,0,p-l>180,0,u.x,u.y);a.donut?a.donutSolid&&(t=f-m.value,r=c.polarToCartesian(n.x,n.y,t,l-(0===g||o?0:.2)),s=c.polarToCartesian(n.x,n.y,t,p),w.line(r.x,r.y),w.arc(t,t,0,p-l>180,1,s.x,s.y)):w.line(n.x,n.y);var x=a.classNames.slicePie;a.donut&&(x=a.classNames.sliceDonut,a.donutSolid&&(x=a.classNames.sliceDonutSolid));var y=k[g].elem("path",{d:w.stringify()},x);if(y.attr({"ct:value":j.normalized.series[g],"ct:meta":c.serialize(e.meta)}),a.donut&&!a.donutSolid&&(y._node.style.strokeWidth=m.value+"px"),this.eventEmitter.emit("draw",{type:"slice",value:j.normalized.series[g],totalDataSum:i,index:g,meta:e.meta,series:e,group:k[g],element:y,path:w.clone(),center:n,radius:f,startAngle:l,endAngle:p}),a.showLabel){var z;z=1===j.raw.series.length?{x:n.x,y:n.y}:c.polarToCartesian(n.x,n.y,h,l+(p-l)/2);var A;A=j.normalized.labels&&!c.isFalseyButZero(j.normalized.labels[g])?j.normalized.labels[g]:j.normalized.series[g];var B=a.labelInterpolationFnc(A,g);if(B||0===B){var C=b.elem("text",{dx:z.x,dy:z.y,"text-anchor":d(n,z,a.labelDirection)},a.classNames.label).text(""+B);this.eventEmitter.emit("draw",{type:"label",index:g,group:b,element:C,text:""+B,x:z.x,y:z.y})}}l=p}}.bind(this)),this.eventEmitter.emit("created",{chartRect:e,svg:this.svg,options:a})}function f(a,b,d,e){c.Pie["super"].constructor.call(this,a,b,g,c.extend({},g,d),e)}var g={width:void 0,height:void 0,chartPadding:5,classNames:{chartPie:"ct-chart-pie",chartDonut:"ct-chart-donut",series:"ct-series",slicePie:"ct-slice-pie",sliceDonut:"ct-slice-donut",sliceDonutSolid:"ct-slice-donut-solid",label:"ct-label"},startAngle:0,total:void 0,donut:!1,donutSolid:!1,donutWidth:60,showLabel:!0,labelOffset:0,labelPosition:"inside",labelInterpolationFnc:c.noop,labelDirection:"neutral",reverseData:!1,ignoreEmptyValues:!1};c.Pie=c.Base.extend({constructor:f,createChart:e,determineAnchorPosition:d})}(window,document,a),a});
10
+ //# sourceMappingURL=chartist.min.js.map
js/givejs.php CHANGED
@@ -22,6 +22,7 @@
22
23
// Read the file
24
$data = '';
25
$files = array(
26
// Admin JS
27
'pagelayer-editor.js',
@@ -43,6 +44,7 @@ $files = array(
43
'wow.min.js',
44
'jquery-numerator.js',
45
'simpleParallax.min.js',
46
);
47
48
// What files to give
@@ -69,7 +71,7 @@ if(empty($final)){
69
70
foreach($final as $k => $v){
71
//echo $k.'<br>';
72
- $data .= file_get_contents($v)."\n\n";
73
}
74
75
// We are zipping if possible
@@ -81,7 +83,7 @@ if(function_exists('ob_gzhandler')){
81
header("Content-type: text/javascript; charset: UTF-8");
82
83
// Set a zero Mtime
84
- $filetime = filemtime('pagelayer-editor.js');
85
86
// Cache Control
87
header("Cache-Control: must-revalidate");
22
23
// Read the file
24
$data = '';
25
+ $self_path = dirname(__FILE__);
26
$files = array(
27
// Admin JS
28
'pagelayer-editor.js',
44
'wow.min.js',
45
'jquery-numerator.js',
46
'simpleParallax.min.js',
47
+ 'chartist.min.js',
48
);
49
50
// What files to give
71
72
foreach($final as $k => $v){
73
//echo $k.'<br>';
74
+ $data .= file_get_contents($self_path.'/'.$v)."\n\n";
75
}
76
77
// We are zipping if possible
83
header("Content-type: text/javascript; charset: UTF-8");
84
85
// Set a zero Mtime
86
+ $filetime = filemtime($self_path.'/pagelayer-editor.js');
87
88
// Cache Control
89
header("Cache-Control: must-revalidate");
js/pagelayer-admin.js CHANGED
@@ -66,24 +66,7 @@ jQuery(document).ready(function(){
66
});
67
}
68
69
- // Close promo notice
70
- var pagelayer_promo = function(){
71
- jQuery("#pagelayer_promo .pagelayer_promo-close").click(function(){
72
-
73
- var data;
74
-
75
- // Hide it
76
- jQuery("#pagelayer_promo").hide();
77
-
78
- // Save this preference
79
- jQuery.post("'.admin_url('?pagelayer_promo=0').'", data, function(response) {
80
- //alert(response);
81
- });
82
- });
83
- }
84
-
85
pl_admin_tabs();
86
pl_admin_accourdion();
87
- pagelayer_promo();
88
89
});
66
});
67
}
68
69
pl_admin_tabs();
70
pl_admin_accourdion();
71
72
});
js/pagelayer-editor.js CHANGED
@@ -16,6 +16,10 @@ pagelayer = {
16
17
// Lets start
18
jQuery(document).ready(function(){
19
20
// Make the Topbar
21
pagelayer_bottombar();
@@ -204,7 +208,7 @@ function pagelayer_setup_drag(){
204
205
// If we are a column, we can be over another column or row
206
if(tag == 'pl_col'){
207
- onWrap = jQuery(ele).closest('.pagelayer-wrap-col,.pagelayer-wrap-row');
208
//console.log(pagelayer_id(onWrap));
209
210
// If we are a row, we can be over another row or a column
@@ -212,6 +216,14 @@ function pagelayer_setup_drag(){
212
onWrap = jQuery(ele).closest('.pagelayer-wrap-row');
213
//console.log(pagelayer_id(onWrap));
214
215
// For every other element, we can be over a col or ele
216
}else{
217
onWrap = jQuery(ele).closest('.pagelayer-wrap-ele,.pagelayer-wrap-col');
@@ -219,7 +231,7 @@ function pagelayer_setup_drag(){
219
//console.log(onWrap);
220
221
// If we find nothing
222
- if(onWrap.length < 1){
223
clear_prospect();// Clear existing prospects
224
reset_on_drag();// Also reset the last on item
225
return false;
@@ -412,7 +424,7 @@ function pagelayer_setup_drag(){
412
413
// If I am a column and I am on a row
414
// OR I am a normal element and I am on column
415
- }else if((tag == 'pl_col' && onTag == 'pl_row') || onTag == 'pl_col'){
416
// We need to find the holder and add the prospect there
417
var holder = pagelayer_shortcodes[onTag]['holder'];
418
onWrap = onWrap.children('.pagelayer-ele').children(holder);
@@ -613,7 +625,7 @@ function pagelayer_element_added(jEle){
613
614
for(var i=0; i < gProp['count']; i++){
615
var cid = pagelayer_element_add_child(jQuery("[pagelayer-id="+id+"]"), gProp['sc']);
616
- pagelayer_element_setup('[pagelayer-id='+cid+']', true);
617
}
618
619
}
@@ -643,6 +655,20 @@ function pagelayer_element_add_child(pEle, sc){
643
pEle.append(child);
644
}
645
646
return cid;
647
};
648
@@ -805,6 +831,8 @@ function pagelayer_element_setup(selector, render){
805
806
}else if(tag == 'pl_row'){
807
wrap.addClass('pagelayer-wrap-row');
808
}else{
809
wrap.addClass('pagelayer-wrap-ele');
810
}
@@ -815,7 +843,7 @@ function pagelayer_element_setup(selector, render){
815
var overlay = wrap.children('.pagelayer-ele-overlay');
816
var html;
817
818
- if(tag == 'pl_row'){
819
820
overlay.addClass('pagelayer-row-hover');
821
@@ -1122,6 +1150,7 @@ function pagelayer_copy_element(selector, insertAfter){
1122
var jEle = jQuery(html);
1123
jEle.removeAttr('pagelayer-id');
1124
jEle.find('[pagelayer-id]').removeAttr('pagelayer-id');
1125
jEle.find('style').remove();
1126
jEle.find('.pagelayer-ele-overlay').remove();
1127
@@ -1147,6 +1176,8 @@ function pagelayer_copy_element(selector, insertAfter){
1147
}
1148
1149
pagelayer_isDirty = true;
1150
};
1151
1152
// Language key
@@ -1718,7 +1749,7 @@ function pagelayer_sc_render(jEle){
1718
if('holder' in pagelayer_shortcodes[el.tag]){
1719
1720
var hSel = pagelayer_shortcodes[el.tag]['holder'];
1721
- var holder = jEle.find(hSel);
1722
1723
// Detach the holder
1724
holder.detach();
@@ -1899,7 +1930,7 @@ function pagelayer_is_group(tag){
1899
function pagelayer_save(){
1900
1901
var post = pagelayer_generate_sc(".entry-content");//alert(post);return;
1902
- var pagelayerajaxurl = pagelayer_ajax_url+'?action=pagelayer_save_content&postID='+pagelayer_postID;
1903
jQuery.ajax({
1904
type: "POST",
1905
url: pagelayerajaxurl,
@@ -1957,6 +1988,16 @@ function pagelayer_generate_sc(selector){
1957
1958
// Find the type of tag
1959
var tag = jEle.attr('pagelayer-tag');
1960
1961
// Is there an innerHTML ele
1962
var inner = '';
@@ -1965,7 +2006,7 @@ function pagelayer_generate_sc(selector){
1965
}
1966
1967
// Create the tag
1968
- var data = '['+tag;
1969
1970
// Get the attributes to store
1971
jQuery.each(jEle[0].attributes, function(i, attrib){
@@ -1993,7 +2034,7 @@ function pagelayer_generate_sc(selector){
1993
}
1994
1995
// If its a Row or Column or Group then it will have children
1996
- }else if(jEle.hasClass('pagelayer-row') || jEle.hasClass('pagelayer-col') || pagelayer_is_group(tag)){
1997
1998
var sel = "[pagelayer-id="+id+"]";
1999
@@ -2002,7 +2043,7 @@ function pagelayer_generate_sc(selector){
2002
sel = sel+' '+pagelayer_shortcodes[tag]['holder'];
2003
}
2004
2005
- var childrens = pagelayer_generate_sc(sel);
2006
if(childrens.length > 0){
2007
txt = txt+childrens;
2008
}
@@ -2027,7 +2068,7 @@ function pagelayer_generate_sc(selector){
2027
}
2028
2029
// Close the tag
2030
- txt = txt+"[/"+tag+"]\n";
2031
2032
});
2033
@@ -2256,14 +2297,14 @@ function pagelayer_update_site_title(val){
2256
var site_name = jQuery('.pagelayer-wp-title').attr('pagelayer-a-site_name');
2257
if(!pagelayer_empty(site_name)){
2258
var site_title = jQuery.ajax({
2259
- url: pagelayer_ajax_url+'?action=pagelayer_fetch_site_title',
2260
type: 'post',
2261
async: false
2262
}).responseText;
2263
2264
if(site_title != site_name){
2265
var site_title = jQuery.ajax({
2266
- url: pagelayer_ajax_url+'?action=pagelayer_update_site_title',
2267
type: 'post',
2268
data: {'site_title': site_name},
2269
async: false
16
17
// Lets start
18
jQuery(document).ready(function(){
19
+
20
+ pagelayer_shortcodes['pl_inner_row'] = JSON.parse(JSON.stringify(pagelayer_shortcodes['pl_row']));
21
+ pagelayer_shortcodes['pl_inner_row']['name'] = 'Inner Row';
22
+ pagelayer_groups['grid'].push('pl_inner_row');
23
24
// Make the Topbar
25
pagelayer_bottombar();
208
209
// If we are a column, we can be over another column or row
210
if(tag == 'pl_col'){
211
+ onWrap = jQuery(ele).closest('.pagelayer-wrap-col,.pagelayer-wrap-row,.pagelayer-wrap-inner-row');
212
//console.log(pagelayer_id(onWrap));
213
214
// If we are a row, we can be over another row or a column
216
onWrap = jQuery(ele).closest('.pagelayer-wrap-row');
217
//console.log(pagelayer_id(onWrap));
218
219
+ // For inner row we restrict to 1 level only
220
+ }else if(tag == 'pl_inner_row'){
221
+ var ele_wrap = jQuery(ele).parents('.pagelayer-wrap-col')
222
+ if(ele_wrap.length == 1){
223
+ onWrap = jQuery(ele).closest('.pagelayer-wrap-ele,.pagelayer-wrap-col');
224
+ }else{
225
+ onWrap = jQuery(ele).closest('.pagelayer-wrap-ele,.pagelayer-wrap-inner-row');
226
+ }
227
// For every other element, we can be over a col or ele
228
}else{
229
onWrap = jQuery(ele).closest('.pagelayer-wrap-ele,.pagelayer-wrap-col');
231
//console.log(onWrap);
232
233
// If we find nothing
234
+ if(pagelayer_empty(onWrap) || onWrap.length < 1){
235
clear_prospect();// Clear existing prospects
236
reset_on_drag();// Also reset the last on item
237
return false;
424
425
// If I am a column and I am on a row
426
// OR I am a normal element and I am on column
427
+ }else if((tag == 'pl_col' && (onTag == 'pl_row' || onTag == 'pl_inner_row')) || onTag == 'pl_col'){
428
// We need to find the holder and add the prospect there
429
var holder = pagelayer_shortcodes[onTag]['holder'];
430
onWrap = onWrap.children('.pagelayer-ele').children(holder);
625
626
for(var i=0; i < gProp['count']; i++){
627
var cid = pagelayer_element_add_child(jQuery("[pagelayer-id="+id+"]"), gProp['sc']);
628
+ //pagelayer_element_setup('[pagelayer-id='+cid+']', true);
629
}
630
631
}
655
pEle.append(child);
656
}
657
658
+ pagelayer_element_setup('[pagelayer-id='+cid+']', true);
659
+
660
+ // Do we have to create children ?
661
+ if('has_group' in pagelayer_shortcodes[sc]){
662
+
663
+ var has_group = pagelayer_shortcodes[sc]['has_group'];
664
+ var gProp = pagelayer_shortcodes[sc][has_group['section']][has_group['prop']];
665
+
666
+ for(var i=0; i < gProp['count']; i++){
667
+ var in_cid = pagelayer_element_add_child(jQuery("[pagelayer-id="+cid+"]"), gProp['sc']);
668
+ }
669
+
670
+ }
671
+
672
return cid;
673
};
674
831
832
}else if(tag == 'pl_row'){
833
wrap.addClass('pagelayer-wrap-row');
834
+ }else if(tag == 'pl_inner_row'){
835
+ wrap.addClass('pagelayer-wrap-inner-row');
836
}else{
837
wrap.addClass('pagelayer-wrap-ele');
838
}
843
var overlay = wrap.children('.pagelayer-ele-overlay');
844
var html;
845
846
+ if(tag == 'pl_row' || tag == 'pl_inner_row'){
847
848
overlay.addClass('pagelayer-row-hover');
849
1150
var jEle = jQuery(html);
1151
jEle.removeAttr('pagelayer-id');
1152
jEle.find('[pagelayer-id]').removeAttr('pagelayer-id');
1153
+ jEle.find('[pagelayer-parent]').removeAttr('pagelayer-parent');// Remove the parent attribute as it will be reset during pagelayer_element_setup
1154
jEle.find('style').remove();
1155
jEle.find('.pagelayer-ele-overlay').remove();
1156
1176
}
1177
1178
pagelayer_isDirty = true;
1179
+
1180
+ return id;
1181
};
1182
1183
// Language key
1749
if('holder' in pagelayer_shortcodes[el.tag]){
1750
1751
var hSel = pagelayer_shortcodes[el.tag]['holder'];
1752
+ var holder = jEle.find(hSel).first();
1753
1754
// Detach the holder
1755
holder.detach();
1930
function pagelayer_save(){
1931
1932
var post = pagelayer_generate_sc(".entry-content");//alert(post);return;
1933
+ var pagelayerajaxurl = pagelayer_ajax_url+'&action=pagelayer_save_content&postID='+pagelayer_postID;
1934
jQuery.ajax({
1935
type: "POST",
1936
url: pagelayerajaxurl,
1988
1989
// Find the type of tag
1990
var tag = jEle.attr('pagelayer-tag');
1991
+ var final_tag = tag;
1992
+
1993
+ // Define inner row and inner column
1994
+ if(tag == 'pl_row' && jQuery(this).closest('.pagelayer-col-holder').length > 0){
1995
+ final_tag = 'pl_inner_row';
1996
+ }
1997
+ if(tag == 'pl_col' && jQuery(this).closest('.pagelayer-col-holder').length > 0){
1998
+ final_tag = 'pl_inner_col';
1999
+ }
2000
+ //console.log(tag);
2001
2002
// Is there an innerHTML ele
2003
var inner = '';
2006
}
2007
2008
// Create the tag
2009
+ var data = '['+final_tag;
2010
2011
// Get the attributes to store
2012
jQuery.each(jEle[0].attributes, function(i, attrib){
2034
}
2035
2036
// If its a Row or Column or Group then it will have children
2037
+ }else if(jEle.hasClass('pagelayer-row') || jEle.hasClass('pagelayer-col') || jEle.hasClass('pagelayer-inner_row') || pagelayer_is_group(tag)){
2038
2039
var sel = "[pagelayer-id="+id+"]";
2040
2043
sel = sel+' '+pagelayer_shortcodes[tag]['holder'];
2044
}
2045
2046
+ var childrens = pagelayer_generate_sc(jQuery(sel).first());
2047
if(childrens.length > 0){
2048
txt = txt+childrens;
2049
}
2068
}
2069
2070
// Close the tag
2071
+ txt = txt+"[/"+final_tag+"]\n";
2072
2073
});
2074
2297
var site_name = jQuery('.pagelayer-wp-title').attr('pagelayer-a-site_name');
2298
if(!pagelayer_empty(site_name)){
2299
var site_title = jQuery.ajax({
2300
+ url: pagelayer_ajax_url+'&action=pagelayer_fetch_site_title',
2301
type: 'post',
2302
async: false
2303
}).responseText;
2304
2305
if(site_title != site_name){
2306
var site_title = jQuery.ajax({
2307
+ url: pagelayer_ajax_url+'&action=pagelayer_update_site_title',
2308
type: 'post',
2309
data: {'site_title': site_name},
2310
async: false
js/pagelayer-frontend.js CHANGED
@@ -67,6 +67,24 @@ jQuery(document).ready(function(){
67
}
68
69
new WOW({boxClass:'pagelayer-wow'}).init();
70
});
71
72
// For automatic row change
@@ -603,4 +621,185 @@ function pagelayer_empty(mixed_var) {
603
}
604
605
return false;
606
- };
67
}
68
69
new WOW({boxClass:'pagelayer-wow'}).init();
70
+
71
+ // For Pagelayer Pro
72
+ jQuery('.pagelayer-image_hotspot').each(function(){
73
+ pagelayer_image_hotspot(jQuery(this));
74
+ });
75
+
76
+ jQuery('.pagelayer-countdown').each(function(){
77
+ pagelayer_countdown(jQuery(this));
78
+ });
79
+
80
+ jQuery('.pagelayer-chart').each(function(){
81
+ pagelayer_chart(jQuery(this));
82
+ });
83
+
84
+ jQuery('.pagelayer-table').each(function(){
85
+ pagelayer_table(jQuery(this));
86
+ });
87
+
88
});
89
90
// For automatic row change
621
}
622
623
return false;
624
+ };
625
+
626
+ // For Pagelayer Pro
627
+ // Show tooltip in image hotspot
628
+ function pagelayer_image_hotspot(jEle){
629
+
630
+ var tooltip_click = jEle.find('.pagelayer-icon-holder').hasClass('pagelayer-hotspots-click');
631
+
632
+ if(tooltip_click){
633
+ jEle.find('.pagelayer-hotspots-icon-holder').each(function(){
634
+
635
+ jQuery(this).toggle(function(){
636
+ jQuery(this).find('.pagelayer-tooltip-text').css({'visibility': 'visible'});
637
+ }, function(){
638
+ jQuery(this).find('.pagelayer-tooltip-text').css({'visibility': 'hidden'});
639
+ });
640
+
641
+ });
642
+ }
643
+ }
644
+
645
+ var count_int ={};
646
+ // Show countdown render
647
+ function pagelayer_countdown(jEle){
648
+
649
+ var expiry_date = jEle.find('.pagelayer-countdown-container').attr('pagelayer-expiry-date');
650
+ var jEle_id = jEle.attr('pagelayer-id');
651
+
652
+ if(!pagelayer_empty(expiry_date)){
653
+
654
+ clearInterval(count_int[jEle_id]);
655
+
656
+ count_int[jEle_id] = setInterval(function() {
657
+
658
+ var countDownDate = new Date(expiry_date).getTime();
659
+ var now = new Date().getTime();
660
+ var distance = countDownDate - now;
661
+
662
+ // Time calculations for days, hours, minutes and seconds
663
+ var days = Math.floor(distance / (1000 * 60 * 60 * 24));
664
+ var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
665
+ var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
666
+ var seconds = Math.floor((distance % (1000 * 60)) / 1000);
667
+
668
+ jEle.find('.pagelayer-days-count').html(days);
669
+ jEle.find('.pagelayer-hours-count').html(hours);
670
+ jEle.find('.pagelayer-minutes-count').html(minutes);
671
+ jEle.find('.pagelayer-seconds-count').html(seconds);
672
+
673
+ // If the count down is over, write some text
674
+ if (distance < 0) {
675
+ clearInterval(count_int[jEle_id]);
676
+ jEle.find('.pagelayer-countdown-container').html("EXPIRED");
677
+ }
678
+ }, 1000);
679
+ }
680
+
681
+ }
682
+
683
+ // Show Chart render
684
+ function pagelayer_chart(jEle){
685
+
686
+ var pl_id = jEle.attr('pagelayer-id');
687
+ var chart_holder = jEle.find('.pagelayer-chart-holder');
688
+ var chart_type = chart_holder.attr('chart-type');
689
+ var chart_colors = chart_holder.attr('chart-colors') || '';
690
+ var chart_labels = jEle.find('.pagelayer-chart-holder').attr('chart-labels') || '';
691
+ var chart_series = [];
692
+ var tmp_series = '';
693
+
694
+ chart_colors = chart_colors.split(',');
695
+ var alphabets = 'abcdefghijklmnopqrstuvwxyz';
696
+
697
+ for(var i =0; chart_colors.length > i; i++){
698
+ var char_at = alphabets.charAt(i);
699
+
700
+ if(i == 26){i=0;}
701
+
702
+ var styles = '[pagelayer-id="'+pl_id+'"] .ct-series-'+char_at+' .ct-bar, .ct-series-'+char_at+' .ct-line, .ct-series-'+char_at+' .ct-point, .ct-series-'+char_at+' .ct-slice-donut {stroke : '+chart_colors[i]+'}'+
703
+ '[pagelayer-id="'+pl_id+'"] .ct-series-'+char_at+' .ct-area, .ct-series-'+char_at+' .ct-slice-donut-solid, .ct-series-'+char_at+' .ct-slice-pie{fill : '+chart_colors[i]+'}';
704
+
705
+ jEle.find('style')[0].append(styles);
706
+ }
707
+
708
+ chart_labels = chart_labels.split(',');
709
+
710
+ jEle.find('.pagelayer-chart-child-holder').find('[chart-series]').each(function(){
711
+ tmp_series = jQuery(this).attr('chart-series');
712
+ tmp_series = tmp_series.split(',');
713
+ chart_series.push(tmp_series);
714
+ });
715
+
716
+ var data = {
717
+ labels: chart_labels,
718
+ series: chart_series
719
+ };
720
+
721
+ var options = {};
722
+
723
+ jQuery.each(chart_holder[0].attributes, function(index, att){
724
+ if(att.name.match(/data\-/i)){
725
+
726
+ var name = att.name.substr(5);
727
+
728
+ for(var i = 0; name.length > i; i++){
729
+ var index = name.search("_");
730
+ if(index < 0)break;
731
+ var s_char = name.charAt(index+1);
732
+ var C_char = s_char.toUpperCase();
733
+ name = name.replace("_"+s_char, C_char);
734
+ }
735
+
736
+ var value = att.value;
737
+
738
+ if(value == "true"){
739
+ value= true;
740
+ }else if(value == "false"){
741
+ value = false;
742
+ }else if(jQuery.isNumeric(value)){
743
+ value = parseInt(value);
744
+ }
745
+
746
+ options[name] = value;
747
+ }
748
+ });
749
+
750
+ //console.log(options);
751
+
752
+ var responsiveOptions = [];
753
+
754
+ if(chart_type == "Pie"){
755
+ data.series = tmp_series;
756
+ }
757
+
758
+ new Chartist[chart_type]('[pagelayer-id="'+pl_id+'"] .pagelayer-chart-holder', data, options, responsiveOptions);
759
+ }
760
+
761
+ // Show table render
762
+ function pagelayer_table(jEle){
763
+
764
+ var tHolder = jEle.find('.pagelayer-table-holder');
765
+ var dHolder = jEle.find('.pagelayer-data-holder');
766
+ var trEle = dHolder.find(".pagelayer-table_row");
767
+ var tdlength = 0;
768
+ tHolder.empty();
769
+
770
+ /* trEle.each(function(){
771
+ var tdEle = jQuery(this).find(".pagelayer-table_col").length;
772
+ if(tdlength < tdEle){tdlength = tdEle}
773
+ }) */;
774
+
775
+ // Add rows
776
+ trEle.each(function(){
777
+ var this_trEle = jQuery(this);
778
+ var tdEle = this_trEle.find(".pagelayer-table_col");
779
+ var style_row = 'color:'+this_trEle.find('.pagelayer-table-row-holder').attr('data-trcolor')+';background-color:'+this_trEle.find('.pagelayer-table-row-holder').attr('data-trbg-color')+'';
780
+
781
+ var html = '';
782
+
783
+ // Add columns
784
+ tdEle.each(function(){
785
+ var td_data_Holder = jQuery(this).find('.pagelayer-col-data');
786
+ var tdata = td_data_Holder.attr('data-td') || '';
787
+ var t_tag = td_data_Holder.attr('data-tag') || '';
788
+ var style_col = 'color:'+td_data_Holder.attr('data-color')+';background-color:'+td_data_Holder.attr('data-bg-color')+'';
789
+ var col_attr = 'style="'+style_col+'" colspan="'+td_data_Holder.attr('data-colspan')+'" rowspan="'+td_data_Holder.attr('data-rowspan')+'"';
790
+
791
+ html = html+'<'+t_tag +' '+col_attr+'>'+tdata+'</'+t_tag+'>';
792
+ });
793
+
794
+ /* if(tdlength > tdEle.length){
795
+
796
+ var extra_td = tdlength - tdEle.length;
797
+ for(var i=0; extra_td >i; i++){
798
+ html = html+'<td></td>';
799
+ }
800
+ } */
801
+
802
+ tHolder.append('<tr style="'+style_row+'">'+html+'</tr>');
803
+ });
804
+
805
+ }
js/premium.js DELETED
@@ -1,591 +0,0 @@
1
-
2
-
3
- // Render for audio
4
- function pagelayer_render_pl_audio(el){
5
-
6
- el.tmp['src-url'] = el.tmp['src-url'] || el.atts['src'];
7
-
8
- return;
9
-
10
- /*// Do we have a URL ?
11
- if(!pagelayer_empty(el.atts['a_url'])){
12
-
13
- //Get the file extension
14
- var extension = el.atts['a_url'].substr(el.atts['a_url'].lastIndexOf('.') + 1);
15
-
16
- //Create source tag according to audio file
17
- switch(extension){
18
-
19
- default:
20
- case 'mp3':
21
- el.atts['a_type'] = 'audio/mpeg';
22
- break;
23
-
24
- case 'ogg':
25
- el.atts['a_type']= 'audio/ogg';
26
- break;
27
-
28
- case 'wav':
29
- el.atts['a_type'] = 'audio/wav';
30
- break;
31
-
32
- }
33
-
34
- }
35
-
36
- // Add the attr
37
- if(!pagelayer_empty(el.atts['a_url']) && !pagelayer_empty(el.atts['a_type'])){
38
- el.CSS.attr.push({'sel': '{{element}} source', 'val': 'src="{{a_url}}"'});
39
- el.CSS.attr.push({'sel': '{{element}} source', 'val': 'type="{{a_type}}"'});
40
- } */
41
-
42
- };
43
-
44
- // render the video slider
45
- function pagelayer_render_html_pl_video_slider(el){
46
-
47
- var pager = (!pagelayer_empty(el.atts['slider_pager'])) ? true : false;
48
- var loop = (!pagelayer_empty(el.atts['slider_loop'])) ? true : false;
49
- var autoplay = (!pagelayer_empty(el.atts['autoplay']))? true : false;
50
- var slideshow_speed = parseInt(el.atts['slideshow_speed']);
51
- var slideshow_start = parseInt(el.atts['slideshow_start']);
52
- var slider_preload = el.atts['slider_preload'];
53
-
54
- jQuery("[pagelayer-id="+el.id+"] .pagelayer-video-slider-holder").slippry({
55
- elements: "div.pagelayer-video",
56
- auto: autoplay,
57
- speed: slideshow_speed,
58
- transition:''+el.atts['slider_transition']+'',
59
- preload: ''+slider_preload+'',
60
- pager: pager,
61
- start : slideshow_start,
62
- loop : loop,
63
- });
64
- };
65
-
66
- // Render the share
67
- function pagelayer_render_pl_share(el){
68
-
69
- if('text' in el.atts){
70
- el.atts['icon_label'] = el.atts['text'];
71
- }else{
72
- var labelList = { 'Facebook' : ['facebook', 'facebook-official', 'facebook-square'],
73
- 'Twitter' : ['twitter', 'twitter-square'],
74
- 'Google+' : ['google-plus', 'google-plus-square'],
75
- 'Instagram' : ['instagram'],
76
- 'Linkedin' : ['linkedin', 'linkedin-square'],
77
- 'pinterest' : ['pinterest', 'pinterest-p', 'pinterest-square'],
78
- 'Reddit' : ['reddit-alien', 'reddit-square', 'reddit'],
79
- 'Skype' : ['skype'],
80
- 'Stumbleupon' : ['stumbleupon'],
81
- 'Telegram' : ['telegram'],
82
- 'Tumblr' : ['tumblr', 'tumblr-square'],
83
- 'VK' : ['vk'],
84
- 'Weibo' : ['weibo'],
85
- 'WhatsApp' : ['whatsapp'],
86
- 'WordPress' : ['wordpress'],
87
- 'Xing' : ['xing', 'xing-square'],
88
- 'Delicious' : ['delicious'],
89
- 'Dribbble' : ['dribbble']
90
- }
91
-
92
- jQuery.each(labelList, function(key, value){
93
- if(jQuery.inArray(el.atts['icon'], value) != -1){
94
- el.atts['icon_label'] = key;
95
- }
96
- });
97
- }
98
- }
99
-
100
- // Render for Splash
101
- function pagelayer_render_pl_splash(el){ var jEle = el.$;
102
- console.log(el.$.find('.pagelayer-splash-container'));
103
-
104
- if(el.atts['display'] == 'once'){
105
-
106
- if (!sessionStorage.isVisited) {
107
- sessionStorage.isVisited = 'true'
108
- jQuery(function() {
109
- el.$.find('.pagelayer-splash-container').delay(5000).show();
110
- });
111
- }
112
- }else{
113
- jQuery(function() {
114
- el.$.find('.pagelayer-splash-container').delay(5000).show();
115
- });
116
- }
117
-
118
- el.$.find('.pagelayer-splash-close').on('click', function(e){
119
- alert(e);
120
- jEle.find('.pagelayer-splash-container').delay(5000).hide();;
121
- });
122
-
123
- if(jEle.attr('pagelayer-a-modal_style') == 'custom'){
124
- jEle.find('.pagelayer-splash-container').css({'background': jEle.attr('pagelayer-a-modal_shadow_color'), 'color': jEle.attr('pagelayer-a-modal_content_color')});
125
- }else{
126
- jEle.find('.pagelayer-splash-container').css({'background': '', 'color': ''});
127
- }
128
-
129
- jEle.find('.pagelayer-splash-container').removeClass().addClass('pagelayer-splash-container pagelayer-splash-'+jEle.attr('pagelayer-a-modal_style'));
130
- }
131
-
132
- // Render the countdown
133
- function pagelayer_sc_render_pl_countdown(el){ var jEle = el.$;
134
-
135
- if(!pagelayer_empty(jEle.attr('pagelayer-a-date'))){
136
-
137
- var x = setInterval(function() {
138
-
139
- var countDownDate = new Date(jEle.attr('pagelayer-a-date')).getTime();
140
-
141
- // Get todays date and time
142
- var now = new Date().getTime();
143
-
144
- // Find the distance between now and the count down date
145
- var distance = countDownDate - now;
146
-
147
- // Time calculations for days, hours, minutes and seconds
148
- var days = Math.floor(distance / (1000 * 60 * 60 * 24));
149
- var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
150
- var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
151
- var seconds = Math.floor((distance % (1000 * 60)) / 1000);
152
-
153
- //console.log(days + "d " + hours + "h " + minutes + "m " + seconds + "s ");
154
-
155
- // Output the result in an element with id="demo"
156
- //jEle.find('.pagelayer-countdown-container').html(days + "d " + hours + "h " + minutes + "m " + seconds + "s ");
157
-
158
- jEle.find('.pagelayer-countdown-container .pagelayer-days-count').html(days);
159
- jEle.find('.pagelayer-countdown-container .pagelayer-hours-count').html(hours);
160
- jEle.find('.pagelayer-countdown-container .pagelayer-minutes-count').html(minutes);
161
- jEle.find('.pagelayer-countdown-container .pagelayer-seconds-count').html(seconds);
162
-
163
- jEle.find('.pagelayer-countdown-container .pagelayer-count').css('font-size', jEle.attr('pagelayer-a-digits_font_size')+'px');
164
-
165
- jEle.find('.pagelayer-countdown-container .pagelayer-countdown-item').css({'width': jEle.attr('pagelayer-a-blocks_size')+'px', 'height': jEle.attr('pagelayer-a-blocks_size')+'px', 'background': jEle.attr('pagelayer-a-block_color')});
166
-
167
- jEle.find('.pagelayer-countdown-container .pagelayer-countdown-name').css('font-size', jEle.attr('pagelayer-a-labels_font_size')+'px');
168
-
169
- // If the count down is over, write some text
170
- if (distance < 0) {
171
- clearInterval(x);
172
- jEle.find('.pagelayer-countdown-container').html("EXPIRED");
173
- }
174
- }, 1000);
175
- }
176
-
177
- jEle.find('.pagelayer-countdown-container center').css({'border-spacing': jEle.attr('pagelayer-a-blocks_space')+'px 0', 'color': jEle.attr('pagelayer-a-font_color')});
178
- }
179
-
180
- // Render the chart
181
- function pagelayer_sc_render_pl_chart(el){ var jEle = el.$;
182
-
183
- }
184
-
185
- // Render the Primary menu
186
- function pagelayer_render_pl_wp_menu(el){
187
- jQuery.ajax({
188
- url: pagelayer_ajax_url+'?action=pagelayer_fetch_primary_menu',
189
- type: 'post',
190
- success: function(data) {
191
- //console.log(data);
192
- el.$.find('.pagelayer-wp-menu-container').html(data);
193
- }
194
- });
195
- }
196
-
197
- // Render the wp custom menus
198
- function pagelayer_sc_render_pl_wp_custom_menu(el){ var jEle = el.$;
199
-
200
- var params = {
201
- title: jEle.attr('pagelayer-a-title'),
202
- nav_menu: jEle.attr('pagelayer-a-nav_menu')
203
- };
204
-
205
- var wp_custom_menu = jQuery.ajax({
206
- url: pagelayer_ajax_url+'?action=pagelayer_fetch_wp_custom_menu',
207
- type: 'POST',
208
- data: params,
209
- async: false
210
- }).responseText;
211
-
212
- jEle.find('.pagelayer-wp-custom-menu-container').html(wp_custom_menu);
213
-
214
- }
215
-
216
- // Render the wp posts grid
217
- function pagelayer_sc_render_pl_wp_posts_grid(el){ var jEle = el.$;
218
-
219
- if(jEle.attr('pagelayer-a-show_featured_image') == 'checked'){
220
- show_featured = true;
221
- }else{
222
- show_featured = false;
223
- }
224
-
225
- if(jEle.attr('pagelayer-a-show_date_comments') == 'checked'){
226
- show_date_comments = true;
227
- }else{
228
- show_date_comments = false;
229
- }
230
-
231
- var params = {
232
- numberposts : jEle.attr('pagelayer-a-posts_per_page'),
233
- order : jEle.attr('pagelayer-a-posts_order'),
234
- show_img : show_featured,
235
- img_size : jEle.attr('pagelayer-a-image_size'),
236
- title_tag : jEle.attr('pagelayer-a-title_tag'),
237
- show_meta : show_date_comments,
238
- show_content : jEle.attr('pagelayer-a-show_content'),
239
- short_content_length : ('pagelayer-a-short_content_length')
240
- };
241
-
242
- var posts_grid = jQuery.ajax({
243
- url: pagelayer_ajax_url+'?action=pagelayer_fetch_wp_posts_grid',
244
- type: 'POST',
245
- data: params,
246
- async: false
247
- }).responseText;
248
-
249
- jEle.find('.pagelayer-wp-posts-grid-container').html(posts_grid);
250
-
251
- jEle.find('.pagelayer-wp-posts-grid-container').removeClass().addClass('pagelayer-wp-posts-grid-container pagelayer-grid-columns-'+jEle.attr('pagelayer-a-columns'));
252
-
253
- }
254
-
255
- // Render the wp posts slider
256
- function pagelayer_sc_render_pl_wp_posts_slider(el){ var jEle = el.$;
257
-
258
- var params = {
259
- posts_count : jEle.attr('pagelayer-a-posts_count'),
260
- sort_order : jEle.attr('pagelayer-a-sort_order'),
261
- img_size : jEle.attr('pagelayer-a-image_size'),
262
- title_tag : jEle.attr('pagelayer-a-title_tag'),
263
- show_content : jEle.attr('pagelayer-a-show_content'),
264
- short_content_length : jEle.attr('pagelayer-a-short_content_length'),
265
- post_type : jEle.attr('pagelayer-a-post_type'),
266
- category : jEle.attr('pagelayer-a-category'),
267
- tag : jEle.attr('pagelayer-a-tag'),
268
- order_by : jEle.attr('pagelayer-a-order_by')
269
- };
270
-
271
- var posts_slider = jQuery.ajax({
272
- url: pagelayer_ajax_url+'?action=pagelayer_fetch_wp_posts_slider',
273
- type: 'POST',
274
- data: params,
275
- async: false
276
- }).responseText;
277
-
278
- jEle.find('.pagelayer-wp-posts-slider-ul').empty().html(posts_slider);
279
-
280
- var smooth_height, show_pager, pause_on_hover;
281
-
282
- if(jEle.attr('pagelayer-a-smooth_height') == 'checked'){
283
- smooth_height = true;
284
- }else{
285
- smooth_height = false;
286
- }
287
-
288
- if(jEle.attr('pagelayer-a-pause_on_hover') == 'checked'){
289
- pause_on_hover = true;
290
- }else{
291
- pause_on_hover = false;
292
- }
293
-
294
- jEle.find('.pagelayer-wp-posts-slider-ul').slippry({
295
- // general elements & wrapper
296
- auto: true,
297
- elements: '.pagelayer-posts-slider-section',
298
- slippryWrapper: '<div class="pagelayer-imgsl-box pagelayer-wp-posts-slider-ul" />',
299
- adaptiveHeight: smooth_height, // height of the sliders adapts to current slide
300
- useCSS: true, // true, false -> fallback to js if no browser support
301
- autoHover: false,
302
- transition: jEle.attr('pagelayer-a-animation'),
303
- captions: false,
304
- pause: jEle.attr('pagelayer-a-slideshow_speed'),
305
- autoHover: pause_on_hover
306
- });
307
-
308
- }
309
-
310
- // Render the pages
311
- function pagelayer_sc_render_pl_wp_pages(el){ var jEle = el.$;
312
-
313
- var params = {
314
- sortby: jEle.attr('pagelayer-a-sortby'),
315
- exclude: jEle.attr('pagelayer-a-exclude')
316
- }
317
-
318
- var wp_pages = jQuery.ajax({
319
- url: pagelayer_ajax_url+'?action=pagelayer_fetch_wp_pages',
320
- type: 'POST',
321
- data: params,
322
- async: false
323
- }).responseText;
324
-
325
- jEle.find('.pagelayer-wp-pages-title').html(jEle.attr('pagelayer-a-title'));
326
-
327
- jEle.find('.pagelayer-wp-pages').html(wp_pages);
328
-
329
- }
330
-
331
- // Render the wp posts
332
- function pagelayer_sc_render_pl_wp_posts(el){ var jEle = el.$;
333
-
334
- var show_date;
335
-
336
- if(jEle.attr('pagelayer-a-show_date') == 'checked'){
337
- show_date = 1;
338
- }else{
339
- show_date = 0;
340
- }
341
-
342
- var params = {
343
- title : jEle.attr('pagelayer-a-title'),
344
- posts_count : jEle.attr('pagelayer-a-number'),
345
- show_date : show_date
346
- };
347
-
348
- var wp_posts = jQuery.ajax({
349
- url: pagelayer_ajax_url+'?action=pagelayer_fetch_wp_posts',
350
- type: 'POST',
351
- data: params,
352
- async: false
353
- }).responseText;
354
-
355
- jEle.find('.pagelayer-wp-posts-title').html(wp_posts);
356
- }
357
-
358
- // Render the wp categories
359
- function pagelayer_sc_render_pl_wp_categories(el){ var jEle = el.$;
360
-
361
- var show_count, show_hierarchy;
362
-
363
- if(jEle.attr('pagelayer-a-dropdown') == 'checked'){
364
- dropdown = 1;
365
- }else{
366
- dropdown = 0;
367
- }
368
-
369
- if(jEle.attr('pagelayer-a-count') == 'checked'){
370
- post_count = 1;
371
- }else{
372
- post_count = 0;
373
- }
374
-
375
- if(jEle.attr('pagelayer-a-hierarchy') == 'checked'){
376
- show_hierarchy = 1;
377
- }else{
378
- show_hierarchy = 0;
379
- }
380
-
381
- var params = {
382
- title : jEle.attr('pagelayer-a-title'),
383
- show_count : post_count,
384
- show_hierarchy: show_hierarchy,
385
- dropdown: dropdown
386
- };
387
-
388
- var wp_categories = jQuery.ajax({
389
- url: pagelayer_ajax_url+'?action=pagelayer_fetch_wp_categories',
390
- type: 'POST',
391
- data: params,
392
- async: false
393
- }).responseText;
394
-
395
- //jEle.find('.pagelayer-wp-categories-title').html(jEle.attr('pagelayer-a-title'));
396
-
397
- jEle.find('.pagelayer-wp-categories-section').html(wp_categories);
398
- }
399
-
400
- // Render the wp calendar
401
- function pagelayer_sc_render_pl_wp_calendar(el){ var jEle = el.$;
402
-
403
- var params = {
404
- title : jEle.attr('pagelayer-a-title')
405
- };
406
-
407
- var wp_calendar = jQuery.ajax({
408
- url: pagelayer_ajax_url+'?action=pagelayer_fetch_wp_calendar',
409
- type: 'POST',
410
- data: params,
411
- async: false
412
- }).responseText;
413
- //console.log(wp_calendar);
414
- jEle.find('.pagelayer-wp-calendar-container').html(wp_calendar);
415
-
416
- }
417
- //render recent comments
418
- function pagelayer_sc_render_pl_wp_comments(el){ var jEle = el.$;
419
-
420
- var title = ''+jEle.attr('pagelayer-a-title')+'';
421
- var pagelayerajaxurl = pagelayer_ajax_url+'?action=pagelayer_recent_comments';
422
-
423
- //show title for recent comments
424
- jEle.find('.pagelayer-recent-comments-title').empty().text(title);
425
-
426
- //Ajax call for fetching recent comments
427
- jQuery.ajax({
428
- type: "POST",
429
- url: pagelayerajaxurl,
430
- data: { "num_comments" : jEle.attr('pagelayer-a-number') },
431
- success: function(response){
432
- var obj = jQuery.parseJSON(response);
433
- if(obj['error']){
434
- alert(obj['error']);
435
- }else{
436
- if(!pagelayer_empty(obj)){
437
- var html_data = '';
438
- for(x in obj){
439
- html_data += '<li class="pagelayer-highlight-comments">'+
440
- '<span class="pagelayer-comment-author"><a href="'+obj[x].author_url+'"'+
441
- ' rel="external nofollow" class="pagelayer-author-url">'+obj[x].author+'</a>'+
442
- '</span> on '+
443
- '<span class="pagelayer-comment-page"><a href="'+obj[x].link+'"'+
444
- ' rel="external nofollow" class="pagelayer-page-url" >'+obj[x].title+'</a></span>'+
445
- '</li>';
446
- }
447
- jEle.find('.pagelayer-recent-comments-ul').empty().html(html_data);
448
- }
449
- }
450
- }
451
- });
452
-
453
- }
454
-
455
- //archives
456
- function pagelayer_sc_render_pl_wp_archives(el){ var jEle = el.$;
457
- //Button Text Rendering
458
- var title = ''+jEle.attr('pagelayer-a-title')+'';
459
- var dropdown = 0;
460
- var count = 0;
461
-
462
- if(jEle.attr('pagelayer-a-dropdown') == 'checked'){
463
- dropdown = 1;
464
- }
465
-
466
- if(jEle.attr('pagelayer-a-count') == 'checked'){
467
- count = 1;
468
- }
469
-
470
- //show title for recent comments
471
- jEle.find('.pagelayer-wp-archives-title').empty().text(title);
472
-
473
- var pagelayerajaxurl = pagelayer_ajax_url+'?action=pagelayer_wp_archives';
474
-
475
- //Ajax call for fetching recent comments
476
- jQuery.ajax({
477
- type: "POST",
478
- url: pagelayerajaxurl,
479
- data: {"dropdown_options": ''+dropdown+'', "archives_count": ''+count+'' },
480
- success: function(response){
481
- if(!pagelayer_empty(response)){
482
- var html_data;
483
- if(!pagelayer_empty(dropdown)){
484
- html_data = '<select class="pagelayer-select-archives">';
485
- html_data += response;
486
- html_data += '</select>';
487
- }else{
488
- html_data = '<ul class="pagelayer-list-archives">';
489
- html_data += response;
490
- html_data += '</ul>';
491
- }
492
- jEle.find('.pagelayer-wp-archives-option').empty().html(html_data);
493
- }
494
- }
495
- });
496
- }
497
-
498
- //render tags
499
- function pagelayer_sc_render_pl_wp_tags(el){ var jEle = el.$;
500
- var title = ''+jEle.attr('pagelayer-a-title')+'';
501
- var type = ''+jEle.attr('pagelayer-a-taxonomy')+'';
502
-
503
- //show title for recent comments
504
- jEle.find('.pagelayer-wp-tags-title').empty().text(title);
505
-
506
- var pagelayerajaxurl = pagelayer_ajax_url+'?action=pagelayer_wp_tags';
507
-
508
- //Ajax call for fetching recent comments
509
- jQuery.ajax({
510
- type: "POST",
511
- url: pagelayerajaxurl,
512
- data: {"type": type },
513
- success: function(response){
514
- if(!pagelayer_empty(response)){
515
- jEle.find('.pagelayer-wp-tags-option').empty().html(response);
516
- }
517
- }
518
- });
519
- }
520
-
521
- //render tags
522
- function pagelayer_sc_render_pl_wp_search(el){ var jEle = el.$;
523
- var title = ''+jEle.attr('pagelayer-a-title')+'';
524
-
525
- //show title for recent comments
526
- jEle.find('.pagelayer-wp-search-title').empty().text(title);
527
-
528
- //Ajax call for fetching recent comments
529
- jQuery.ajax({
530
- type: "POST",
531
- url: pagelayer_ajax_url+'?action=pagelayer_wp_search',
532
- success: function(response){
533
- if(!pagelayer_empty(response)){
534
- jEle.find('.pagelayer-wp-search-option').empty().html(response);
535
- }
536
- }
537
- });
538
- }
539
-
540
- //render tags
541
- function pagelayer_sc_render_pl_wp_rss(el){ var jEle = el.$;
542
- var title = '';
543
- var items = ''+jEle.attr('pagelayer-a-items')+'';
544
- var url = ''+jEle.attr('pagelayer-a-url')+'';
545
- var summary, author, date = 0;
546
-
547
- if(jEle.attr('pagelayer-a-show_summary') == 'checked'){
548
- summary = 1;
549
- }
550
- if(jEle.attr('pagelayer-a-show_author') == 'checked'){
551
- author = 1;
552
- }
553
- if(jEle.attr('pagelayer-a-show_date') == 'checked'){
554
- date = 1;
555
- }
556
- if(!pagelayer_empty(jEle.attr('pagelayer-a-title'))){
557
- title = ''+jEle.attr('pagelayer-a-title')+'';
558
- }
559
-
560
- //Ajax call for fetching recent comments
561
- jQuery.ajax({
562
- type: "POST",
563
- url: pagelayer_ajax_url+'?action=pagelayer_wp_rss',
564
- data: {"num_items": items, "URL" : url, "summary" : summary, "author" : author, "date" : date, "title": title },
565
- success: function(response){
566
- if(!pagelayer_empty(response)){
567
- jEle.find('.pagelayer-wp-rss-option').empty().html(response);
568
- }
569
- }
570
- });
571
- }
572
-
573
- //render tags
574
- function pagelayer_sc_render_pl_wp_meta(el){ var jEle = el.$;
575
- title = '';
576
- if(!pagelayer_empty(jEle.attr('pagelayer-a-title'))){
577
- title = ''+jEle.attr('pagelayer-a-title')+'';
578
- }
579
-
580
- //Ajax call for fetching recent comments
581
- jQuery.ajax({
582
- type: "POST",
583
- url: pagelayer_ajax_url+'?action=pagelayer_wp_meta',
584
- data: { "title": title },
585
- success: function(response){
586
- if(!pagelayer_empty(response)){
587
- jEle.find('.pagelayer-wp-meta-option').empty().html(response);
588
- }
589
- }
590
- });
591
- }
js/properties.js CHANGED
@@ -952,6 +952,12 @@ function pagelayer_elp_image(row, prop){
952
var def = pagelayer_url+'/images/default-image.png';
953
var src = (tmp in prop.el.tmp) ? prop.el.tmp[tmp] : def;
954
955
// Do we have a URL set ?
956
style = 'style="background-image:url(\''+src+'\')"';
957
@@ -1752,19 +1758,30 @@ function pagelayer_elp_group(row, prop){
1752
// Add button
1753
var add_item = function(row){
1754
1755
// First add the element inside the group element
1756
- var id = pagelayer_element_add_child(prop.el.$, prop['sc']);
1757
- pagelayer_element_setup('[pagelayer-id='+id+']', true);
1758
1759
show_item(id);
1760
1761
};
1762
1763
// Show the properties of the existing things
1764
- var show_item = function(id){
1765
1766
// Since the element is added very fast, we reselect via jQuery for it to re-access the dom
1767
- jEle = jQuery('[pagelayer-id='+id+']');
1768
1769
var label_param = prop['item_label']['param'] || '';
1770
var title = pagelayer_get_att(jEle, label_param) || prop['item_label']['default'];
@@ -1774,33 +1791,70 @@ function pagelayer_elp_group(row, prop){
1774
'<div class="pagelayer-elp-group-item-head">'+
1775
'<span class="pagelayer-elp-group-item-drag"><i class="fa fa-bars" /></span>'+
1776
'<span class="pagelayer-elp-group-item-title">'+title+'</span>'+
1777
'<span class="pagelayer-elp-group-item-del"><i class="fa fa-trash" /></span>'+
1778
'</div>'+
1779
'<div class="pagelayer-elp-group-item-body"></div>'+
1780
'</div>');
1781
1782
// Append to the row
1783
- row.find('.pagelayer-elp-group-div').append(holder);
1784
-
1785
- pagelayer_elpd_generate(jEle, holder.find('.pagelayer-elp-group-item-body'));
1786
-
1787
- // Change the group item title
1788
- var tmp_title = holder.find('[pagelayer-elp-name='+label_param+'] [name='+label_param+']')
1789
- if(tmp_title.length > 0){
1790
- jQuery(tmp_title).on('input', function(){
1791
- holder.find('.pagelayer-elp-group-item-title').html(tmp_title.val());
1792
- });
1793
}
1794
1795
// Setup the toggle
1796
- holder.find('.pagelayer-elp-group-item-title').on('click', function(){
1797
- holder.find('.pagelayer-elp-group-item-body').toggle('slow');
1798
});
1799
1800
// Delete the item
1801
holder.find('.pagelayer-elp-group-item-head .fa-trash').on('click', function(){
1802
holder.remove();
1803
- pagelayer_delete_element('[pagelayer-id='+id+']');
1804
});
1805
1806
};
@@ -1822,7 +1876,7 @@ function pagelayer_elp_group(row, prop){
1822
function pagelayer_elp_datetime(row, prop){
1823
1824
var div = '<div class="pagelayer-elp-datetime-div pagelayer-elp-input-icon">'+
1825
- '<input type="date" class="pagelayer-elp-datetime" name="'+prop.c['name']+'"/>'+
1826
'</div>';
1827
1828
row.append(div);
@@ -2315,9 +2369,17 @@ function pagelayer_elp_dimension(row, prop){
2315
2316
// Is the value linked ?
2317
var link = row.find('.pagelayer-elp-dimension-div .fa');
2318
- var isLinked = _pagelayer_get_tmp_att(row, 'linked');
2319
- isLinked = isLinked == 2 ? false : true;
2320
- //console.log(isLinked);
2321
2322
if(isLinked){
2323
link.addClass('pagelayer-elp-dimension-linked');
@@ -2335,9 +2397,7 @@ function pagelayer_elp_dimension(row, prop){
2335
}else{
2336
link.addClass('pagelayer-elp-dimension-linked');
2337
}
2338
-
2339
- _pagelayer_set_tmp_atts(row, 'linked', (linked ? 2 : 1));
2340
-
2341
});
2342
2343
row.find('input').on('input', function(){
952
var def = pagelayer_url+'/images/default-image.png';
953
var src = (tmp in prop.el.tmp) ? prop.el.tmp[tmp] : def;
954
955
+ // Set temp image
956
+ if(!(tmp in prop.el.tmp)){
957
+ _pagelayer_set_tmp_atts(row, 'url', def);
958
+ _pagelayer_set_atts(row, def);
959
+ }
960
+
961
// Do we have a URL set ?
962
style = 'style="background-image:url(\''+src+'\')"';
963
1758
// Add button
1759
var add_item = function(row){
1760
1761
+ var ele_id = row.closest('[pagelayer-element-id]').attr('pagelayer-element-id') || '';
1762
+ var pEle = jQuery('[pagelayer-id="'+ele_id+'"]');
1763
+
1764
// First add the element inside the group element
1765
+ var id = pagelayer_element_add_child(pEle, prop['sc']);
1766
+ //pagelayer_element_setup('[pagelayer-id='+id+']', true);
1767
1768
show_item(id);
1769
1770
};
1771
1772
// Show the properties of the existing things
1773
+ var show_item = function(id, sel){
1774
+
1775
+ // To append after an existing item
1776
+ sel = sel || false;
1777
+
1778
+ // If pagelayer id empty then return
1779
+ if(pagelayer_empty(id)){
1780
+ return false;
1781
+ }
1782
1783
// Since the element is added very fast, we reselect via jQuery for it to re-access the dom
1784
+ jEle = jQuery('[pagelayer-id="'+id+'"]');
1785
1786
var label_param = prop['item_label']['param'] || '';
1787
var title = pagelayer_get_att(jEle, label_param) || prop['item_label']['default'];
1791
'<div class="pagelayer-elp-group-item-head">'+
1792
'<span class="pagelayer-elp-group-item-drag"><i class="fa fa-bars" /></span>'+
1793
'<span class="pagelayer-elp-group-item-title">'+title+'</span>'+
1794
+ '<span class="pagelayer-elp-group-item-clone"><i class="fa fa-clone" /></span>'+
1795
'<span class="pagelayer-elp-group-item-del"><i class="fa fa-trash" /></span>'+
1796
'</div>'+
1797
'<div class="pagelayer-elp-group-item-body"></div>'+
1798
'</div>');
1799
1800
// Append to the row
1801
+ if(sel){
1802
+ row.find(sel).after(holder);
1803
+ }else{
1804
+ row.find('.pagelayer-elp-group-div').first().append(holder);
1805
}
1806
1807
// Setup the toggle
1808
+ holder.find('.pagelayer-elp-group-item-title').first().on('click', function(){
1809
+ var rEle = holder.find('.pagelayer-elp-group-item-body').first();
1810
+ var r_id = holder.attr('pagelayer-group-item-id');
1811
+
1812
+ // If the props are not already setup
1813
+ if(rEle.html().length < 1){
1814
+
1815
+ pagelayer_elpd_generate(jQuery('[pagelayer-id="'+r_id+'"]'), rEle);
1816
+
1817
+ // Change the group item title
1818
+ var tmp_title = holder.find('[pagelayer-elp-name="'+label_param+'"] [name="'+label_param+'"]');
1819
+
1820
+ if(tmp_title.length > 0){
1821
+ jQuery(tmp_title).on('input', function(){
1822
+ holder.find('.pagelayer-elp-group-item-title').html(tmp_title.val());
1823
+ });
1824
+ }
1825
+
1826
+ }
1827
+
1828
+ rEle.toggle('slow');
1829
+ });
1830
+
1831
+ // Clone the item
1832
+ holder.find('.pagelayer-elp-group-item-head .fa-clone').on('click', function(){
1833
+
1834
+ // If the element have any parent
1835
+ var jEle = jQuery('[pagelayer-id="'+id+'"]');
1836
+ var par = pagelayer_get_parent(jEle);
1837
+ var clone_ele = pagelayer_copy_element(jEle);
1838
+ //console.log(clone_ele);console.log('[pagelayer-group-item-id="'+id+'"]');
1839
+ show_item(clone_ele, '[pagelayer-group-item-id="'+id+'"]');
1840
+
1841
+ if(par){
1842
+ pagelayer_sc_render(pagelayer_ele_by_id(par));
1843
+ }
1844
});
1845
1846
// Delete the item
1847
holder.find('.pagelayer-elp-group-item-head .fa-trash').on('click', function(){
1848
+
1849
+ // If the element have any parent
1850
+ var jEle = jQuery('[pagelayer-id="'+id+'"]');
1851
+ var par = pagelayer_get_parent(jEle);
1852
holder.remove();
1853
+ pagelayer_delete_element(jEle);
1854
+
1855
+ if(par){
1856
+ pagelayer_sc_render(pagelayer_ele_by_id(par));
1857
+ }
1858
});
1859
1860
};
1876
function pagelayer_elp_datetime(row, prop){
1877
1878
var div = '<div class="pagelayer-elp-datetime-div pagelayer-elp-input-icon">'+
1879
+ '<input type="date" class="pagelayer-elp-datetime" name="'+prop.c['name']+'" value="'+prop.c['val']+'" />'+
1880
'</div>';
1881
1882
row.append(div);
2369
2370
// Is the value linked ?
2371
var link = row.find('.pagelayer-elp-dimension-div .fa');
2372
+ var isLinked = 1;
2373
+ var tmp_val = val[0];
2374
+
2375
+ for(var p_val in val){
2376
+
2377
+ // Check if unlinked
2378
+ if(tmp_val != val[p_val] ){
2379
+ isLinked = 0;
2380
+ }
2381
+ tmp_val = val[p_val];
2382
+ }
2383
2384
if(isLinked){
2385
link.addClass('pagelayer-elp-dimension-linked');
2397
}else{
2398
link.addClass('pagelayer-elp-dimension-linked');
2399
}
2400
+
2401
});
2402
2403
row.find('input').on('input', function(){
js/widgets.js CHANGED
@@ -456,7 +456,7 @@ function pagelayer_render_pl_shortcodes(el){
456
457
// Make the call
458
jQuery.ajax({
459
- url: pagelayer_ajax_url+'?action=pagelayer_do_shortcodes',
460
type: 'POST',
461
data: {
462
nonce: pagelayer_ajax_nonce,
@@ -482,7 +482,7 @@ function pagelayer_render_pl_wp_widgets(el){
482
483
// Make the call
484
jQuery.ajax({
485
- url: pagelayer_ajax_url+'?action=pagelayer_fetch_sidebar',
486
type: 'POST',
487
data: {
488
nonce: pagelayer_ajax_nonce,
456
457
// Make the call
458
jQuery.ajax({
459
+ url: pagelayer_ajax_url+'&action=pagelayer_do_shortcodes',
460
type: 'POST',
461
data: {
462
nonce: pagelayer_ajax_nonce,
482
483
// Make the call
484
jQuery.ajax({
485
+ url: pagelayer_ajax_url+'&action=pagelayer_fetch_sidebar',
486
type: 'POST',
487
data: {
488
nonce: pagelayer_ajax_nonce,
main/functions.php CHANGED
@@ -500,6 +500,17 @@ function pagelayer_add_shortcode($tag, $params = array()){
500
501
// Is there a handler function ?
502
if(!empty($params['func'])){
503
add_shortcode($tag, 'pagelayer_render_shortcode');//$params['func']);
504
//unset($params['func']);
505
}
@@ -756,8 +767,82 @@ function pagelayer_show_promo(){
756
global $pagelayer_promo_opts;
757
$opts = $pagelayer_promo_opts;
758
759
- echo '
760
- <div class="notice notice-success" id="pagelayer_promo" style="min-height:90px">
761
<a class="pagelayer_promo-close" href="javascript:" aria-label="Dismiss this Notice">
762
<span class="dashicons dashicons-dismiss"></span> Dismiss
763
</a>';
500
501
// Is there a handler function ?
502
if(!empty($params['func'])){
503
+
504
+ if($tag == 'pl_row'){
505
+ $inner_tag = 'pl_inner_row';
506
+ add_shortcode($inner_tag, 'pagelayer_render_shortcode');
507
+ }
508
+
509
+ if($tag == 'pl_col'){
510
+ $inner_tag = 'pl_inner_col';
511
+ add_shortcode($inner_tag, 'pagelayer_render_shortcode');
512
+ }
513
+
514
add_shortcode($tag, 'pagelayer_render_shortcode');//$params['func']);
515
//unset($params['func']);
516
}
767
global $pagelayer_promo_opts;
768
$opts = $pagelayer_promo_opts;
769
770
+ echo '<style>
771
+ .pagelayer_promo_button {
772
+ background-color: #4CAF50; /* Green */
773
+ border: none;
774
+ color: white;
775
+ padding: 6px 10px;
776
+ text-align: center;
777
+ text-decoration: none;
778
+ display: inline-block;
779
+ font-size: 13px;
780
+ margin: 4px 2px;
781
+ -webkit-transition-duration: 0.4s; /* Safari */
782
+ transition-duration: 0.4s;
783
+ cursor: pointer;
784
+ }
785
+ .pagelayer_promo_button:focus{
786
+ border: none;
787
+ color: white;
788
+ }
789
+ .pagelayer_promo_button1 {
790
+ color: white;
791
+ background-color: #4CAF50;
792
+ border:3px solid #4CAF50;
793
+ }
794
+ .pagelayer_promo_button1:hover {
795
+ box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19);
796
+ color: white;
797
+ border:3px solid #4CAF50;
798
+ }
799
+ .pagelayer_promo_button2 {
800
+ color: white;
801
+ background-color: #0085ba;
802
+ }
803
+ .pagelayer_promo_button2:hover {
804
+ box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19);
805
+ color: white;
806
+ }
807
+ .pagelayer_promo_button3 {
808
+ color: white;
809
+ background-color: #365899;
810
+ }
811
+ .pagelayer_promo_button3:hover {
812
+ box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19);
813
+ color: white;
814
+ }
815
+ .pagelayer_promo_button4 {
816
+ color: white;
817
+ background-color: rgb(66, 184, 221);
818
+ }
819
+ .pagelayer_promo_button4:hover {
820
+ box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19);
821
+ color: white;
822
+ }
823
+ .pagelayer_promo-close{
824
+ float:right;
825
+ text-decoration:none;
826
+ margin: 5px 10px 0px 0px;
827
+ }
828
+ .pagelayer_promo-close:hover{
829
+ color: red;
830
+ }
831
+ </style>
832
+ <script type="application/javascript">
833
+ jQuery(document).ready(function(){
834
+ jQuery("#pagelayer_promo .pagelayer_promo-close").click(function(){
835
+ var data;
836
+ jQuery("#pagelayer_promo").hide();
837
+ // Save this preference
838
+ jQuery.post("'.admin_url('?pagelayer_promo=0').'", data, function(response) {
839
+ //alert(response);
840
+ });
841
+ });
842
+ });
843
+ </script>
844
+
845
+ <div class="notice notice-success" id="pagelayer_promo" style="min-height:90px">
846
<a class="pagelayer_promo-close" href="javascript:" aria-label="Dismiss this Notice">
847
<span class="dashicons dashicons-dismiss"></span> Dismiss
848
</a>';
main/live.php CHANGED
@@ -96,7 +96,7 @@ pagelayer_ver = "'.PAGELAYER_VERSION .'";
96
pagelayer_shortcodes = '.json_encode($pagelayer->shortcodes).';
97
pagelayer_styles = '.json_encode($pagelayer->styles).';
98
pagelayer_groups = '.json_encode($pagelayer->groups).';
99
- pagelayer_ajax_url = "'.admin_url( 'admin-ajax.php' ).'";
100
pagelayer_ajax_nonce = "'.wp_create_nonce('pagelayer_ajax').'";
101
pagelayer_url = "'.PAGELAYER_URL.'";
102
pagelayer_postID = "'.$post->ID.'";
96
pagelayer_shortcodes = '.json_encode($pagelayer->shortcodes).';
97
pagelayer_styles = '.json_encode($pagelayer->styles).';
98
pagelayer_groups = '.json_encode($pagelayer->groups).';
99
+ pagelayer_ajax_url = "'.admin_url( 'admin-ajax.php' ).'?";
100
pagelayer_ajax_nonce = "'.wp_create_nonce('pagelayer_ajax').'";
101
pagelayer_url = "'.PAGELAYER_URL.'";
102
pagelayer_postID = "'.$post->ID.'";
main/premium.php DELETED
@@ -1,3238 +0,0 @@
1
- <?php
2
-
3
- //////////////////////////////////////////////////////////////
4
- //===========================================================
5
- // premium.php
6
- //===========================================================
7
- // PAGELAYER
8
- // Inspired by the DESIRE to be the BEST OF ALL
9
- // ----------------------------------------------------------
10
- // Started by: Pulkit Gupta
11
- // Date: 23rd Jan 2017
12
- // Time: 23:00 hrs
13
- // Site: http://pagelayer.com/wordpress (PAGELAYER)
14
- // ----------------------------------------------------------
15
- // Please Read the Terms of use at http://pagelayer.com/tos
16
- // ----------------------------------------------------------
17
- //===========================================================
18
- // (c)Pagelayer Team
19
- //===========================================================
20
- //////////////////////////////////////////////////////////////
21
-
22
- // Are we being accessed directly ?
23
- if(!defined('PAGELAYER_VERSION')) {
24
- exit('Hacking Attempt !');
25
- }
26
-
27
-
28
-
29
- // Image Hotspot
30
- pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_image_hotspot', array(
31
- 'name' => __pl('Image Hotspot'),
32
- 'group' => 'image',
33
- 'func' => 'pagelayer_sc_image_hotspot',
34
- 'params' => array(
35
- 'elements' => array(
36
- 'type' => 'group',
37
- 'sc' => PAGELAYER_SC_PREFIX.'_image_hotspot',
38
- 'items' => array(
39
- 'label' => array(
40
- 'default' => __pl('hotspot'),
41
- ),
42
- 'count' => 0
43
- ),
44
- 'text' => __pl('Add New Hotspot'),
45
- 'rules' => array(
46
- 'rootSelector' => '.pagelayer-tooltip', // css selector of the internal object
47
- 'activeSelector' => '.pagelayer-hotspot', // css selector of the active element
48
- 'activeClass' => 'active' // css class name of the active element
49
- ),
50
- 'events' => array(
51
- 'onActive' => array( // javascript event when item is activated
52
- 'selector' => '.pagelayer-hotspot', // css selector of the element
53
- 'event' => 'click' // event name
54
- ),
55
- 'onInactive' => array( // javascript event when item is de-activated
56
- 'selector' => '.pagelayer-hotspot', // css selector of the element
57
- 'event' => 'click' // event name
58
- )
59
- )
60
- ),
61
- 'img' => array(
62
- 'type' => 'image',
63
- 'label' => __pl('Main Image'),
64
- 'default' => '',
65
- 'desc' => __pl('Choose an image from Media Library'),
66
- ),
67
- 'common_hotspot_color' => array(
68
- 'type' => 'color',
69
- 'label' => __pl('Hotspot Theme'),
70
- 'default' => 'mp-text-color-red',
71
- 'list' => array(
72
- 'mp-text-color-red' => __pl('red'),
73
- 'mp-text-color-dark-grey' => __pl('grey'),
74
- 'mp-text-color-black' => __pl('black'),
75
- 'custom' => __pl('custom'),
76
- ),
77
- ),
78
- 'common_hotspot_custom_color' => array(
79
- 'type' => 'color',
80
- 'label' => __pl('Hotspot Color'),
81
- 'default' => '#e25441',
82
- 'req' => array(
83
- 'common_hotspot_color' => 'custom'
84
- )
85
- ),
86
- 'common_plus_color' => array(
87
- 'type' => 'color',
88
- 'label' => __pl('Hotspot Icon Color'),
89
- 'default' => '#ffffff',
90
- 'req' => array(
91
- 'common_hotspot_color' => 'custom'
92
- )
93
- ),
94
- 'common_hotspot_size' => array(
95
- 'type' => 'radio',
96
- 'label' => __pl('Hotspot Size'),
97
- 'default' => 'normal',
98
- 'list' => array(
99
- 'small' => __pl('small'),
100
- 'normal' => __pl('middle'),
101
- 'big' => __pl('large'),
102
- )
103
- ),
104
- 'common_tip_theme' => array(
105
- 'type' => 'select',
106
- 'label' => __pl('Tooltip Theme'),
107
- 'default' => 'tooltipster-shadow',
108
- 'list' => array(
109
- 'tooltipster-default' => __pl('dark'),
110
- 'tooltipster-light' => __pl('silver'),
111
- 'tooltipster-noir' => __pl('noir'),
112
- 'tooltipster-shadow' => __pl('shadow'),
113
- 'tooltipster-dark' => __pl('black'),
114
- 'custom' => __pl('custom'),
115
- ),
116
- ),
117
- 'common_custom_bg_theme' => array(
118
- 'type' => 'color',
119
- 'label' => __pl('Tooltip Background Color'),
120
- 'default' => '#eb002c',
121
- 'req' => array(
122
- 'common_tip_theme' => 'custom'
123
- )
124
- ),
125
- 'common_custom_font_theme' => array(
126
- 'type' => 'color',
127
- 'label' => __pl('Tooltip Font Color'),
128
- 'default' => '#ffffff',
129
- 'req' => array(
130
- 'common_tip_theme' => 'custom'
131
- )
132
- ),
133
- 'common_tip_position' => array(
134
- 'type' => 'select',
135
- 'label' => 'Tooltip Position',
136
- 'default' => 'top',
137
- 'list' => array(
138
- 'top' => __pl('top'),
139
- 'right' => __pl('right'),
140
- 'bottom' => __pl('bottom'),
141
- 'left' => __pl('left'),
142
- )
143
- ),
144
- 'common_tip_show' => array(
145
- 'type' => 'select',
146
- 'label' => 'Display',
147
- 'default' => 'hover',
148
- 'list' => array(
149
- 'hover' => __pl('On Hover'),
150
- 'always' => __pl('always'),
151
- 'click' => __pl('On Click'),
152
- )
153
- ),
154
- )
155
- )
156
- );
157
-
158
-
159
-
160
-
161
- // Audio
162
- pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_audio', array(
163
- 'name' => __pl('audio'),
164
- 'group' => 'media',
165
- 'func' => 'pagelayer_sc_audio',
166
- 'html' => '<div class="pagelayer-audio-container">
167
- <audio controls>
168
- <source src="{{{src-url}}}"></source>
169
- </audio>
170
- </div>',
171
- 'params' => array(
172
- 'src' => array(
173
- 'type' => 'audio',
174
- 'label' => __pl('wp_audio_source_title'),
175
- 'desc' => __pl('wp_audio_source_desc'),
176
- 'default' => 'http://wpcom.files.wordpress.com/2007/01/mattmullenweg-interview.mp3',
177
- ),
178
- 'autoplay' => array(
179
- 'type' => 'checkbox',
180
- 'label' => __pl('wp_audio_autoplay_title'),
181
- 'desc' => __pl('wp_audio_autoplay_desc'),
182
- 'default' => '',
183
- 'addAttr' => ['{{element}} audio' => 'autoplay="autoplay"'],
184
- ),
185
- 'loop' => array(
186
- 'type' => 'checkbox',
187
- 'label' => __pl('wp_audio_loop_title'),
188
- 'desc' => __pl('wp_audio_loop_desc'),
189
- 'default' => '',
190
- 'addAttr' => ['{{element}} audio' => 'loop="loop"'],
191
- )
192
- )
193
- )
194
- );
195
-
196
-
197
- // Video Slider
198
- pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_video_slider', array(
199
- 'name' => __pl('Video Slider'),
200
- 'group' => 'media',
201
- 'func' => 'pagelayer_sc_video_slider',
202
- 'holder' => '.pagelayer-video-slider-holder',
203
- 'html' => '<div class="pagelayer-video-slider-holder"></div>',
204
- 'params' => array(
205
- 'elements' => array(
206
- 'type' => 'group',
207
- 'label' => __pl('Videos'),
208
- 'sc' => PAGELAYER_SC_PREFIX.'_video',
209
- 'item_label' => array(
210
- 'default' => __pl('video'),
211
- 'param' => 'video_type'
212
- ),
213
- 'count' => 2,
214
- 'text' => __pl('Add Media'),
215
- ),
216
- 'slideshow' => array(
217
- 'type' => 'checkbox',
218
- 'label' => __pl('Enable slideshow'),
219
- 'desc' => '',
220
- ),
221
- 'autoplay' => array(
222
- 'type' => 'checkbox',
223
- 'label' => __pl('Autoplay slider'),
224
- 'desc' => '',
225
- 'default' => 'true',
226
- 'req' => array(
227
- 'slideshow' => 'true'
228
- )
229
- ),
230
- 'slideshow_speed' => array(
231
- 'type' => 'spinner',
232
- 'label' => __pl('Slideshow speed in seconds'),
233
- 'default' => 800,
234
- 'min' => 100,
235
- 'max' => 10000,
236
- 'step' => 100,
237
- 'req' => array(
238
- 'slideshow' => 'true'
239
- )
240
- ),
241
- 'slideshow_start' => array(
242
- 'type' => 'spinner',
243
- 'label' => __pl('Slideshow start with slide'),
244
- 'default' => 1,
245
- 'step' => 1,
246
- ),
247
- 'slider_transition' => array(
248
- 'type' => 'select',
249
- 'label' => __pl('Transition'),
250
- 'desc' => '',
251
- 'default' => 'fade',
252
- 'list' => [
253
- 'fade' => __pl('fade'),
254
- 'horizontal' => __pl('horizontal'),
255
- 'vertical' => __pl('vertical'),
256
- 'kenburns' => __pl('kenburns'),
257
- 'false' => __pl('none'),
258
- ],
259
- ),
260
- 'slider_preload' => array(
261
- 'type' => 'select',
262
- 'label' => __pl('Preload slides'),
263
- 'default' => 'visible',
264
- 'list' => [
265
- 'visible' => __pl('visible'),
266
- 'all' => __pl('all'),
267
- ],
268
- ),
269
- 'slider_pager' => array(
270
- 'type' => 'checkbox',
271
- 'label' => __pl('Pager'),
272
- 'desc' => '',
273
- 'default' => 'true',
274
- ),
275
- 'slider_loop' => array(
276
- 'type' => 'checkbox',
277
- 'label' => __pl('Slider loop'),
278
- 'desc' => '',
279
- 'default' => 'true',
280
- ),
281
- )
282
- )
283
- );
284
-
285
- // Button Group
286
- pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_btn_grp', array(
287
- 'name' => __pl('Button Group'),
288
- 'group' => 'button',
289