Cookie Notice by dFactory - Version 2.1.0

Version Description

  • New: Introducing Cookie Compliance Free plan
Download this release

Release Info

Developer dfactory
Plugin Icon 128x128 Cookie Notice by dFactory
Version 2.1.0
Comparing to
See all releases

Code changes from version 2.0.4 to 2.1.0

assets/microtip/microtip.css ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* -------------------------------------------------------------------
2
+ Microtip
3
+
4
+ Modern, lightweight css-only tooltips
5
+ Just 1kb minified and gzipped
6
+
7
+ @author Ghosh
8
+ @package Microtip
9
+
10
+ ----------------------------------------------------------------------
11
+ 1. Base Styles
12
+ 2. Direction Modifiers
13
+ 3. Position Modifiers
14
+ --------------------------------------------------------------------*/
15
+
16
+
17
+ /* ------------------------------------------------
18
+ [1] Base Styles
19
+ -------------------------------------------------*/
20
+
21
+ [aria-label][role~="tooltip"] {
22
+ position: relative;
23
+ }
24
+
25
+ [aria-label][role~="tooltip"]::before,
26
+ [aria-label][role~="tooltip"]::after {
27
+ transform: translate3d(0, 0, 0);
28
+ -webkit-backface-visibility: hidden;
29
+ backface-visibility: hidden;
30
+ will-change: transform;
31
+ opacity: 0;
32
+ pointer-events: none;
33
+ transition: all var(--microtip-transition-duration, .18s) var(--microtip-transition-easing, ease-in-out) var(--microtip-transition-delay, 0s);
34
+ position: absolute;
35
+ box-sizing: border-box;
36
+ z-index: 10;
37
+ transform-origin: top;
38
+ }
39
+
40
+ [aria-label][role~="tooltip"]::before {
41
+ background-size: 100% auto !important;
42
+ content: "";
43
+ }
44
+
45
+ [aria-label][role~="tooltip"]::after {
46
+ background: rgba(17, 17, 17, .9);
47
+ border-radius: 4px;
48
+ color: #ffffff;
49
+ content: attr(aria-label);
50
+ font-size: var(--microtip-font-size, 13px);
51
+ font-weight: var(--microtip-font-weight, normal);
52
+ text-transform: var(--microtip-text-transform, none);
53
+ padding: .5em 1em;
54
+ white-space: nowrap;
55
+ box-sizing: content-box;
56
+ }
57
+
58
+ [aria-label][role~="tooltip"]:hover::before,
59
+ [aria-label][role~="tooltip"]:hover::after,
60
+ [aria-label][role~="tooltip"]:focus::before,
61
+ [aria-label][role~="tooltip"]:focus::after {
62
+ opacity: 1;
63
+ pointer-events: auto;
64
+ }
65
+
66
+
67
+
68
+ /* ------------------------------------------------
69
+ [2] Position Modifiers
70
+ -------------------------------------------------*/
71
+
72
+ [role~="tooltip"][data-microtip-position|="top"]::before {
73
+ background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%280%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
74
+ height: 6px;
75
+ width: 18px;
76
+ margin-bottom: 5px;
77
+ }
78
+
79
+ [role~="tooltip"][data-microtip-position|="top"]::after {
80
+ margin-bottom: 11px;
81
+ }
82
+
83
+ [role~="tooltip"][data-microtip-position|="top"]::before {
84
+ transform: translate3d(-50%, 0, 0);
85
+ bottom: 100%;
86
+ left: 50%;
87
+ }
88
+
89
+ [role~="tooltip"][data-microtip-position|="top"]:hover::before {
90
+ transform: translate3d(-50%, -5px, 0);
91
+ }
92
+
93
+ [role~="tooltip"][data-microtip-position|="top"]::after {
94
+ transform: translate3d(-50%, 0, 0);
95
+ bottom: 100%;
96
+ left: 50%;
97
+ }
98
+
99
+ [role~="tooltip"][data-microtip-position="top"]:hover::after {
100
+ transform: translate3d(-50%, -5px, 0);
101
+ }
102
+
103
+ /* ------------------------------------------------
104
+ [2.1] Top Left
105
+ -------------------------------------------------*/
106
+ [role~="tooltip"][data-microtip-position="top-left"]::after {
107
+ transform: translate3d(calc(-100% + 16px), 0, 0);
108
+ bottom: 100%;
109
+ }
110
+
111
+ [role~="tooltip"][data-microtip-position="top-left"]:hover::after {
112
+ transform: translate3d(calc(-100% + 16px), -5px, 0);
113
+ }
114
+
115
+
116
+ /* ------------------------------------------------
117
+ [2.2] Top Right
118
+ -------------------------------------------------*/
119
+ [role~="tooltip"][data-microtip-position="top-right"]::after {
120
+ transform: translate3d(calc(0% + -16px), 0, 0);
121
+ bottom: 100%;
122
+ }
123
+
124
+ [role~="tooltip"][data-microtip-position="top-right"]:hover::after {
125
+ transform: translate3d(calc(0% + -16px), -5px, 0);
126
+ }
127
+
128
+
129
+ /* ------------------------------------------------
130
+ [2.3] Bottom
131
+ -------------------------------------------------*/
132
+ [role~="tooltip"][data-microtip-position|="bottom"]::before {
133
+ background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28180%2018%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
134
+ height: 6px;
135
+ width: 18px;
136
+ margin-top: 5px;
137
+ margin-bottom: 0;
138
+ }
139
+
140
+ [role~="tooltip"][data-microtip-position|="bottom"]::after {
141
+ margin-top: 11px;
142
+ }
143
+
144
+ [role~="tooltip"][data-microtip-position|="bottom"]::before {
145
+ transform: translate3d(-50%, -10px, 0);
146
+ bottom: auto;
147
+ left: 50%;
148
+ top: 100%;
149
+ }
150
+
151
+ [role~="tooltip"][data-microtip-position|="bottom"]:hover::before {
152
+ transform: translate3d(-50%, 0, 0);
153
+ }
154
+
155
+ [role~="tooltip"][data-microtip-position|="bottom"]::after {
156
+ transform: translate3d(-50%, -10px, 0);
157
+ top: 100%;
158
+ left: 50%;
159
+ }
160
+
161
+ [role~="tooltip"][data-microtip-position="bottom"]:hover::after {
162
+ transform: translate3d(-50%, 0, 0);
163
+ }
164
+
165
+
166
+ /* ------------------------------------------------
167
+ [2.4] Bottom Left
168
+ -------------------------------------------------*/
169
+ [role~="tooltip"][data-microtip-position="bottom-left"]::after {
170
+ transform: translate3d(calc(-100% + 16px), -10px, 0);
171
+ top: 100%;
172
+ }
173
+
174
+ [role~="tooltip"][data-microtip-position="bottom-left"]:hover::after {
175
+ transform: translate3d(calc(-100% + 16px), 0, 0);
176
+ }
177
+
178
+
179
+ /* ------------------------------------------------
180
+ [2.5] Bottom Right
181
+ -------------------------------------------------*/
182
+ [role~="tooltip"][data-microtip-position="bottom-right"]::after {
183
+ transform: translate3d(calc(0% + -16px), -10px, 0);
184
+ top: 100%;
185
+ }
186
+
187
+ [role~="tooltip"][data-microtip-position="bottom-right"]:hover::after {
188
+ transform: translate3d(calc(0% + -16px), 0, 0);
189
+ }
190
+
191
+
192
+ /* ------------------------------------------------
193
+ [2.6] Left
194
+ -------------------------------------------------*/
195
+ [role~="tooltip"][data-microtip-position="left"]::before,
196
+ [role~="tooltip"][data-microtip-position="left"]::after {
197
+ bottom: auto;
198
+ left: auto;
199
+ right: 100%;
200
+ top: 50%;
201
+ transform: translate3d(10px, -50%, 0);
202
+ }
203
+
204
+ [role~="tooltip"][data-microtip-position="left"]::before {
205
+ background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28-90%2018%2018%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
206
+ height: 18px;
207
+ width: 6px;
208
+ margin-right: 5px;
209
+ margin-bottom: 0;
210
+ }
211
+
212
+ [role~="tooltip"][data-microtip-position="left"]::after {
213
+ margin-right: 11px;
214
+ }
215
+
216
+ [role~="tooltip"][data-microtip-position="left"]:hover::before,
217
+ [role~="tooltip"][data-microtip-position="left"]:hover::after {
218
+ transform: translate3d(0, -50%, 0);
219
+ }
220
+
221
+
222
+ /* ------------------------------------------------
223
+ [2.7] Right
224
+ -------------------------------------------------*/
225
+ [role~="tooltip"][data-microtip-position="right"]::before,
226
+ [role~="tooltip"][data-microtip-position="right"]::after {
227
+ bottom: auto;
228
+ left: 100%;
229
+ top: 50%;
230
+ transform: translate3d(-10px, -50%, 0);
231
+ }
232
+
233
+ [role~="tooltip"][data-microtip-position="right"]::before {
234
+ background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%2890%206%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
235
+ height: 18px;
236
+ width: 6px;
237
+ margin-bottom: 0;
238
+ margin-left: 5px;
239
+ }
240
+
241
+ [role~="tooltip"][data-microtip-position="right"]::after {
242
+ margin-left: 11px;
243
+ }
244
+
245
+ [role~="tooltip"][data-microtip-position="right"]:hover::before,
246
+ [role~="tooltip"][data-microtip-position="right"]:hover::after {
247
+ transform: translate3d(0, -50%, 0);
248
+ }
249
+
250
+ /* ------------------------------------------------
251
+ [3] Size
252
+ -------------------------------------------------*/
253
+ [role~="tooltip"][data-microtip-size="small"]::after {
254
+ white-space: initial;
255
+ width: 80px;
256
+ }
257
+
258
+ [role~="tooltip"][data-microtip-size="medium"]::after {
259
+ white-space: initial;
260
+ width: 150px;
261
+ }
262
+
263
+ [role~="tooltip"][data-microtip-size="large"]::after {
264
+ white-space: initial;
265
+ width: 260px;
266
+ }
assets/microtip/microtip.min.css ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* -------------------------------------------------------------------
2
+ Microtip
3
+
4
+ Modern, lightweight css-only tooltips
5
+ Just 1kb minified and gzipped
6
+
7
+ @author Ghosh
8
+ @package Microtip
9
+
10
+ ----------------------------------------------------------------------
11
+ 1. Base Styles
12
+ 2. Direction Modifiers
13
+ 3. Position Modifiers
14
+ --------------------------------------------------------------------*/
15
+ [aria-label][role~="tooltip"]{position:relative}[aria-label][role~="tooltip"]::before,[aria-label][role~="tooltip"]::after{transform:translate3d(0,0,0);-webkit-backface-visibility:hidden;backface-visibility:hidden;will-change:transform;opacity:0;pointer-events:none;transition:all var(--microtip-transition-duration,.18s) var(--microtip-transition-easing,ease-in-out) var(--microtip-transition-delay,0s);position:absolute;box-sizing:border-box;z-index:10;transform-origin:top}[aria-label][role~="tooltip"]::before{background-size:100% auto!important;content:""}[aria-label][role~="tooltip"]::after{background:rgba(17,17,17,.9);border-radius:4px;color:#fff;content:attr(aria-label);font-size:var(--microtip-font-size,13px);font-weight:var(--microtip-font-weight,normal);text-transform:var(--microtip-text-transform,none);padding:.5em 1em;white-space:nowrap;box-sizing:content-box}[aria-label][role~="tooltip"]:hover::before,[aria-label][role~="tooltip"]:hover::after,[aria-label][role~="tooltip"]:focus::before,[aria-label][role~="tooltip"]:focus::after{opacity:1;pointer-events:auto}[role~="tooltip"][data-microtip-position|="top"]::before{background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%280%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat;height:6px;width:18px;margin-bottom:5px}[role~="tooltip"][data-microtip-position|="top"]::after{margin-bottom:11px}[role~="tooltip"][data-microtip-position|="top"]::before{transform:translate3d(-50%,0,0);bottom:100%;left:50%}[role~="tooltip"][data-microtip-position|="top"]:hover::before{transform:translate3d(-50%,-5px,0)}[role~="tooltip"][data-microtip-position|="top"]::after{transform:translate3d(-50%,0,0);bottom:100%;left:50%}[role~="tooltip"][data-microtip-position="top"]:hover::after{transform:translate3d(-50%,-5px,0)}[role~="tooltip"][data-microtip-position="top-left"]::after{transform:translate3d(calc(-100% + 16px),0,0);bottom:100%}[role~="tooltip"][data-microtip-position="top-left"]:hover::after{transform:translate3d(calc(-100% + 16px),-5px,0)}[role~="tooltip"][data-microtip-position="top-right"]::after{transform:translate3d(calc(0% + -16px),0,0);bottom:100%}[role~="tooltip"][data-microtip-position="top-right"]:hover::after{transform:translate3d(calc(0% + -16px),-5px,0)}[role~="tooltip"][data-microtip-position|="bottom"]::before{background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28180%2018%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat;height:6px;width:18px;margin-top:5px;margin-bottom:0}[role~="tooltip"][data-microtip-position|="bottom"]::after{margin-top:11px}[role~="tooltip"][data-microtip-position|="bottom"]::before{transform:translate3d(-50%,-10px,0);bottom:auto;left:50%;top:100%}[role~="tooltip"][data-microtip-position|="bottom"]:hover::before{transform:translate3d(-50%,0,0)}[role~="tooltip"][data-microtip-position|="bottom"]::after{transform:translate3d(-50%,-10px,0);top:100%;left:50%}[role~="tooltip"][data-microtip-position="bottom"]:hover::after{transform:translate3d(-50%,0,0)}[role~="tooltip"][data-microtip-position="bottom-left"]::after{transform:translate3d(calc(-100% + 16px),-10px,0);top:100%}[role~="tooltip"][data-microtip-position="bottom-left"]:hover::after{transform:translate3d(calc(-100% + 16px),0,0)}[role~="tooltip"][data-microtip-position="bottom-right"]::after{transform:translate3d(calc(0% + -16px),-10px,0);top:100%}[role~="tooltip"][data-microtip-position="bottom-right"]:hover::after{transform:translate3d(calc(0% + -16px),0,0)}[role~="tooltip"][data-microtip-position="left"]::before,[role~="tooltip"][data-microtip-position="left"]::after{bottom:auto;left:auto;right:100%;top:50%;transform:translate3d(10px,-50%,0)}[role~="tooltip"][data-microtip-position="left"]::before{background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28-90%2018%2018%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat;height:18px;width:6px;margin-right:5px;margin-bottom:0}[role~="tooltip"][data-microtip-position="left"]::after{margin-right:11px}[role~="tooltip"][data-microtip-position="left"]:hover::before,[role~="tooltip"][data-microtip-position="left"]:hover::after{transform:translate3d(0,-50%,0)}[role~="tooltip"][data-microtip-position="right"]::before,[role~="tooltip"][data-microtip-position="right"]::after{bottom:auto;left:100%;top:50%;transform:translate3d(-10px,-50%,0)}[role~="tooltip"][data-microtip-position="right"]::before{background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%2890%206%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat;height:18px;width:6px;margin-bottom:0;margin-left:5px}[role~="tooltip"][data-microtip-position="right"]::after{margin-left:11px}[role~="tooltip"][data-microtip-position="right"]:hover::before,[role~="tooltip"][data-microtip-position="right"]:hover::after{transform:translate3d(0,-50%,0)}[role~="tooltip"][data-microtip-size="small"]::after{white-space:initial;width:80px}[role~="tooltip"][data-microtip-size="medium"]::after{white-space:initial;width:150px}[role~="tooltip"][data-microtip-size="large"]::after{white-space:initial;width:260px}
assets/modaal/css/modaal.css ADDED
@@ -0,0 +1,782 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ Modaal - accessible modals - v0.4.4
3
+ by Humaan, for all humans.
4
+ http://humaan.com
5
+ */
6
+
7
+ .modaal-noscroll {
8
+ overflow: hidden;
9
+ }
10
+
11
+ .modaal-accessible-hide {
12
+ position: absolute !important;
13
+ clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
14
+ clip: rect(1px, 1px, 1px, 1px);
15
+ padding: 0 !important;
16
+ border: 0 !important;
17
+ height: 1px !important;
18
+ width: 1px !important;
19
+ overflow: hidden;
20
+ }
21
+
22
+ .modaal-overlay {
23
+ position: fixed;
24
+ top: 0;
25
+ left: 0;
26
+ width: 100%;
27
+ height: 100%;
28
+ z-index: 999;
29
+ opacity: 0;
30
+ }
31
+
32
+ .modaal-wrapper {
33
+ display: block;
34
+ position: fixed;
35
+ top: 0;
36
+ left: 0;
37
+ width: 100%;
38
+ height: 100%;
39
+ z-index: 9999;
40
+ overflow: auto;
41
+ opacity: 1;
42
+ box-sizing: border-box;
43
+ -webkit-overflow-scrolling: touch;
44
+ -webkit-transition: all 0.3s ease-in-out;
45
+ transition: all 0.3s ease-in-out;
46
+ }
47
+
48
+ .modaal-wrapper * {
49
+ box-sizing: border-box;
50
+ -webkit-font-smoothing: antialiased;
51
+ -moz-osx-font-smoothing: grayscale;
52
+ -webkit-backface-visibility: hidden;
53
+ }
54
+
55
+ .modaal-wrapper .modaal-close {
56
+ border: none;
57
+ background: transparent;
58
+ padding: 0;
59
+ -webkit-appearance: none;
60
+ }
61
+
62
+ .modaal-wrapper.modaal-start_none {
63
+ display: none;
64
+ opacity: 1;
65
+ }
66
+
67
+ .modaal-wrapper.modaal-start_fade {
68
+ opacity: 0;
69
+ }
70
+
71
+ .modaal-wrapper *[tabindex="0"] {
72
+ outline: none !important;
73
+ }
74
+
75
+ .modaal-wrapper.modaal-fullscreen {
76
+ overflow: hidden;
77
+ }
78
+
79
+ .modaal-outer-wrapper {
80
+ display: table;
81
+ position: relative;
82
+ width: 100%;
83
+ height: 100%;
84
+ }
85
+
86
+ .modaal-fullscreen .modaal-outer-wrapper {
87
+ display: block;
88
+ }
89
+
90
+ .modaal-inner-wrapper {
91
+ display: table-cell;
92
+ width: 100%;
93
+ height: 100%;
94
+ position: relative;
95
+ vertical-align: middle;
96
+ text-align: center;
97
+ padding: 80px 25px;
98
+ }
99
+
100
+ .modaal-fullscreen .modaal-inner-wrapper {
101
+ padding: 0;
102
+ display: block;
103
+ vertical-align: top;
104
+ }
105
+
106
+ .modaal-container {
107
+ position: relative;
108
+ display: inline-block;
109
+ width: 100%;
110
+ margin: auto;
111
+ text-align: left;
112
+ color: #000;
113
+ max-width: 1000px;
114
+ border-radius: 0px;
115
+ background: #fff;
116
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
117
+ cursor: auto;
118
+ }
119
+
120
+ .modaal-container.is_loading {
121
+ height: 100px;
122
+ width: 100px;
123
+ overflow: hidden;
124
+ }
125
+
126
+ .modaal-fullscreen .modaal-container {
127
+ max-width: none;
128
+ height: 100%;
129
+ overflow: auto;
130
+ }
131
+
132
+ .modaal-close {
133
+ position: fixed;
134
+ right: 20px;
135
+ top: 20px;
136
+ color: #fff;
137
+ cursor: pointer;
138
+ opacity: 1;
139
+ width: 50px;
140
+ height: 50px;
141
+ background: rgba(0, 0, 0, 0);
142
+ border-radius: 100%;
143
+ -webkit-transition: all 0.2s ease-in-out;
144
+ transition: all 0.2s ease-in-out;
145
+ }
146
+
147
+ .modaal-close:focus,
148
+ .modaal-close:hover {
149
+ outline: none;
150
+ background: #fff;
151
+ }
152
+
153
+ .modaal-close:focus:before,
154
+ .modaal-close:focus:after,
155
+ .modaal-close:hover:before,
156
+ .modaal-close:hover:after {
157
+ background: #b93d0c;
158
+ }
159
+
160
+ .modaal-close span {
161
+ position: absolute !important;
162
+ clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
163
+ clip: rect(1px, 1px, 1px, 1px);
164
+ padding: 0 !important;
165
+ border: 0 !important;
166
+ height: 1px !important;
167
+ width: 1px !important;
168
+ overflow: hidden;
169
+ }
170
+
171
+ .modaal-close:before,
172
+ .modaal-close:after {
173
+ display: block;
174
+ content: " ";
175
+ position: absolute;
176
+ top: 14px;
177
+ left: 23px;
178
+ width: 4px;
179
+ height: 22px;
180
+ border-radius: 4px;
181
+ background: #fff;
182
+ -webkit-transition: background 0.2s ease-in-out;
183
+ transition: background 0.2s ease-in-out;
184
+ }
185
+
186
+ .modaal-close:before {
187
+ -webkit-transform: rotate(-45deg);
188
+ -ms-transform: rotate(-45deg);
189
+ transform: rotate(-45deg);
190
+ }
191
+
192
+ .modaal-close:after {
193
+ -webkit-transform: rotate(45deg);
194
+ -ms-transform: rotate(45deg);
195
+ transform: rotate(45deg);
196
+ }
197
+
198
+ .modaal-fullscreen .modaal-close {
199
+ background: #afb7bc;
200
+ right: 10px;
201
+ top: 10px;
202
+ }
203
+
204
+ .modaal-content-container {
205
+ padding: 30px;
206
+ }
207
+
208
+ .modaal-confirm-wrap {
209
+ padding: 30px 0 0;
210
+ text-align: center;
211
+ font-size: 0;
212
+ }
213
+
214
+ .modaal-confirm-btn {
215
+ font-size: 14px;
216
+ display: inline-block;
217
+ margin: 0 10px;
218
+ vertical-align: middle;
219
+ cursor: pointer;
220
+ border: none;
221
+ background: transparent;
222
+ }
223
+
224
+ .modaal-confirm-btn.modaal-ok {
225
+ padding: 10px 15px;
226
+ color: #fff;
227
+ background: #555;
228
+ border-radius: 3px;
229
+ -webkit-transition: background 0.2s ease-in-out;
230
+ transition: background 0.2s ease-in-out;
231
+ }
232
+
233
+ .modaal-confirm-btn.modaal-ok:hover {
234
+ background: #2f2f2f;
235
+ }
236
+
237
+ .modaal-confirm-btn.modaal-cancel {
238
+ text-decoration: underline;
239
+ }
240
+
241
+ .modaal-confirm-btn.modaal-cancel:hover {
242
+ text-decoration: none;
243
+ color: #2f2f2f;
244
+ }
245
+
246
+ .modaal-instagram .modaal-container {
247
+ width: auto;
248
+ background: transparent;
249
+ box-shadow: none !important;
250
+ }
251
+
252
+ .modaal-instagram .modaal-content-container {
253
+ padding: 0;
254
+ background: transparent;
255
+ }
256
+
257
+ .modaal-instagram .modaal-content-container > blockquote {
258
+ width: 1px !important;
259
+ height: 1px !important;
260
+ opacity: 0 !important;
261
+ }
262
+
263
+ .modaal-instagram iframe {
264
+ opacity: 0;
265
+ margin: -6px !important;
266
+ border-radius: 0 !important;
267
+ width: 1000px !important;
268
+ max-width: 800px !important;
269
+ box-shadow: none !important;
270
+ -webkit-animation: instaReveal 1s linear forwards;
271
+ animation: instaReveal 1s linear forwards;
272
+ }
273
+
274
+ .modaal-image .modaal-inner-wrapper {
275
+ padding-left: 140px;
276
+ padding-right: 140px;
277
+ }
278
+
279
+ .modaal-image .modaal-container {
280
+ width: auto;
281
+ max-width: 100%;
282
+ }
283
+
284
+ .modaal-gallery-wrap {
285
+ position: relative;
286
+ color: #fff;
287
+ }
288
+
289
+ .modaal-gallery-item {
290
+ display: none;
291
+ }
292
+
293
+ .modaal-gallery-item img {
294
+ display: block;
295
+ }
296
+
297
+ .modaal-gallery-item.is_active {
298
+ display: block;
299
+ }
300
+
301
+ .modaal-gallery-label {
302
+ position: absolute;
303
+ left: 0;
304
+ width: 100%;
305
+ margin: 20px 0 0;
306
+ font-size: 18px;
307
+ text-align: center;
308
+ color: #fff;
309
+ }
310
+
311
+ .modaal-gallery-label:focus {
312
+ outline: none;
313
+ }
314
+
315
+ .modaal-gallery-control {
316
+ position: absolute;
317
+ top: 50%;
318
+ -webkit-transform: translateY(-50%);
319
+ -ms-transform: translateY(-50%);
320
+ transform: translateY(-50%);
321
+ opacity: 1;
322
+ cursor: pointer;
323
+ color: #fff;
324
+ width: 50px;
325
+ height: 50px;
326
+ background: rgba(0, 0, 0, 0);
327
+ border: none;
328
+ border-radius: 100%;
329
+ -webkit-transition: all 0.2s ease-in-out;
330
+ transition: all 0.2s ease-in-out;
331
+ }
332
+
333
+ .modaal-gallery-control.is_hidden {
334
+ opacity: 0;
335
+ cursor: default;
336
+ }
337
+
338
+ .modaal-gallery-control:focus,
339
+ .modaal-gallery-control:hover {
340
+ outline: none;
341
+ background: #fff;
342
+ }
343
+
344
+ .modaal-gallery-control:focus:before,
345
+ .modaal-gallery-control:focus:after,
346
+ .modaal-gallery-control:hover:before,
347
+ .modaal-gallery-control:hover:after {
348
+ background: #afb7bc;
349
+ }
350
+
351
+ .modaal-gallery-control span {
352
+ position: absolute !important;
353
+ clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
354
+ clip: rect(1px, 1px, 1px, 1px);
355
+ padding: 0 !important;
356
+ border: 0 !important;
357
+ height: 1px !important;
358
+ width: 1px !important;
359
+ overflow: hidden;
360
+ }
361
+
362
+ .modaal-gallery-control:before,
363
+ .modaal-gallery-control:after {
364
+ display: block;
365
+ content: " ";
366
+ position: absolute;
367
+ top: 16px;
368
+ left: 25px;
369
+ width: 4px;
370
+ height: 18px;
371
+ border-radius: 4px;
372
+ background: #fff;
373
+ -webkit-transition: background 0.2s ease-in-out;
374
+ transition: background 0.2s ease-in-out;
375
+ }
376
+
377
+ .modaal-gallery-control:before {
378
+ margin: -5px 0 0;
379
+ -webkit-transform: rotate(-45deg);
380
+ -ms-transform: rotate(-45deg);
381
+ transform: rotate(-45deg);
382
+ }
383
+
384
+ .modaal-gallery-control:after {
385
+ margin: 5px 0 0;
386
+ -webkit-transform: rotate(45deg);
387
+ -ms-transform: rotate(45deg);
388
+ transform: rotate(45deg);
389
+ }
390
+
391
+ .modaal-gallery-next-inner {
392
+ left: 100%;
393
+ margin-left: 40px;
394
+ }
395
+
396
+ .modaal-gallery-next-outer {
397
+ right: 45px;
398
+ }
399
+
400
+ .modaal-gallery-prev:before,
401
+ .modaal-gallery-prev:after {
402
+ left: 22px;
403
+ }
404
+
405
+ .modaal-gallery-prev:before {
406
+ margin: 5px 0 0;
407
+ -webkit-transform: rotate(-45deg);
408
+ -ms-transform: rotate(-45deg);
409
+ transform: rotate(-45deg);
410
+ }
411
+
412
+ .modaal-gallery-prev:after {
413
+ margin: -5px 0 0;
414
+ -webkit-transform: rotate(45deg);
415
+ -ms-transform: rotate(45deg);
416
+ transform: rotate(45deg);
417
+ }
418
+
419
+ .modaal-gallery-prev-inner {
420
+ right: 100%;
421
+ margin-right: 40px;
422
+ }
423
+
424
+ .modaal-gallery-prev-outer {
425
+ left: 45px;
426
+ }
427
+
428
+ .modaal-video-wrap {
429
+ margin: auto 50px;
430
+ position: relative;
431
+ }
432
+
433
+ .modaal-video-container {
434
+ position: relative;
435
+ padding-bottom: 56.25%;
436
+ height: 0;
437
+ overflow: hidden;
438
+ max-width: 100%;
439
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
440
+ background: #000;
441
+ max-width: 1300px;
442
+ margin-left: auto;
443
+ margin-right: auto;
444
+ }
445
+
446
+ .modaal-video-container iframe,
447
+ .modaal-video-container object,
448
+ .modaal-video-container embed {
449
+ position: absolute;
450
+ top: 0;
451
+ left: 0;
452
+ width: 100%;
453
+ height: 100%;
454
+ }
455
+
456
+ .modaal-iframe .modaal-content {
457
+ width: 100%;
458
+ height: 100%;
459
+ }
460
+
461
+ .modaal-iframe-elem {
462
+ width: 100%;
463
+ height: 100%;
464
+ display: block;
465
+ }
466
+
467
+ .modaal-loading-spinner {
468
+ background: none;
469
+ position: absolute;
470
+ width: 200px;
471
+ height: 200px;
472
+ top: 50%;
473
+ left: 50%;
474
+ margin: -100px 0 0 -100px;
475
+ -webkit-transform: scale(0.25);
476
+ -ms-transform: scale(0.25);
477
+ transform: scale(0.25);
478
+ }
479
+
480
+ .modaal-loading-spinner > div {
481
+ width: 24px;
482
+ height: 24px;
483
+ margin-left: 4px;
484
+ margin-top: 4px;
485
+ position: absolute;
486
+ }
487
+
488
+ .modaal-loading-spinner > div > div {
489
+ width: 100%;
490
+ height: 100%;
491
+ border-radius: 15px;
492
+ background: #fff;
493
+ }
494
+
495
+ .modaal-loading-spinner > div:nth-of-type(1) > div {
496
+ -webkit-animation: modaal-loading-spinner 1s linear infinite;
497
+ animation: modaal-loading-spinner 1s linear infinite;
498
+ -webkit-animation-delay: 0s;
499
+ animation-delay: 0s;
500
+ }
501
+
502
+ .modaal-loading-spinner > div:nth-of-type(2) > div,
503
+ .modaal-loading-spinner > div:nth-of-type(3) > div {
504
+ -ms-animation: modaal-loading-spinner 1s linear infinite;
505
+ -moz-animation: modaal-loading-spinner 1s linear infinite;
506
+ -webkit-animation: modaal-loading-spinner 1s linear infinite;
507
+ -o-animation: modaal-loading-spinner 1s linear infinite;
508
+ }
509
+
510
+ .modaal-loading-spinner > div:nth-of-type(1) {
511
+ -ms-transform: translate(84px, 84px) rotate(45deg) translate(70px, 0);
512
+ -webkit-transform: translate(84px, 84px) rotate(45deg) translate(70px, 0);
513
+ transform: translate(84px, 84px) rotate(45deg) translate(70px, 0);
514
+ }
515
+
516
+ .modaal-loading-spinner > div:nth-of-type(2) > div {
517
+ -webkit-animation: modaal-loading-spinner 1s linear infinite;
518
+ animation: modaal-loading-spinner 1s linear infinite;
519
+ -webkit-animation-delay: .12s;
520
+ animation-delay: .12s;
521
+ }
522
+
523
+ .modaal-loading-spinner > div:nth-of-type(2) {
524
+ -ms-transform: translate(84px, 84px) rotate(90deg) translate(70px, 0);
525
+ -webkit-transform: translate(84px, 84px) rotate(90deg) translate(70px, 0);
526
+ transform: translate(84px, 84px) rotate(90deg) translate(70px, 0);
527
+ }
528
+
529
+ .modaal-loading-spinner > div:nth-of-type(3) > div {
530
+ -webkit-animation: modaal-loading-spinner 1s linear infinite;
531
+ animation: modaal-loading-spinner 1s linear infinite;
532
+ -webkit-animation-delay: .25s;
533
+ animation-delay: .25s;
534
+ }
535
+
536
+ .modaal-loading-spinner > div:nth-of-type(4) > div,
537
+ .modaal-loading-spinner > div:nth-of-type(5) > div {
538
+ -ms-animation: modaal-loading-spinner 1s linear infinite;
539
+ -moz-animation: modaal-loading-spinner 1s linear infinite;
540
+ -webkit-animation: modaal-loading-spinner 1s linear infinite;
541
+ -o-animation: modaal-loading-spinner 1s linear infinite;
542
+ }
543
+
544
+ .modaal-loading-spinner > div:nth-of-type(3) {
545
+ -ms-transform: translate(84px, 84px) rotate(135deg) translate(70px, 0);
546
+ -webkit-transform: translate(84px, 84px) rotate(135deg) translate(70px, 0);
547
+ transform: translate(84px, 84px) rotate(135deg) translate(70px, 0);
548
+ }
549
+
550
+ .modaal-loading-spinner > div:nth-of-type(4) > div {
551
+ -webkit-animation: modaal-loading-spinner 1s linear infinite;
552
+ animation: modaal-loading-spinner 1s linear infinite;
553
+ -webkit-animation-delay: .37s;
554
+ animation-delay: .37s;
555
+ }
556
+
557
+ .modaal-loading-spinner > div:nth-of-type(4) {
558
+ -ms-transform: translate(84px, 84px) rotate(180deg) translate(70px, 0);
559
+ -webkit-transform: translate(84px, 84px) rotate(180deg) translate(70px, 0);
560
+ transform: translate(84px, 84px) rotate(180deg) translate(70px, 0);
561
+ }
562
+
563
+ .modaal-loading-spinner > div:nth-of-type(5) > div {
564
+ -webkit-animation: modaal-loading-spinner 1s linear infinite;
565
+ animation: modaal-loading-spinner 1s linear infinite;
566
+ -webkit-animation-delay: .5s;
567
+ animation-delay: .5s;
568
+ }
569
+
570
+ .modaal-loading-spinner > div:nth-of-type(6) > div,
571
+ .modaal-loading-spinner > div:nth-of-type(7) > div {
572
+ -ms-animation: modaal-loading-spinner 1s linear infinite;
573
+ -moz-animation: modaal-loading-spinner 1s linear infinite;
574
+ -webkit-animation: modaal-loading-spinner 1s linear infinite;
575
+ -o-animation: modaal-loading-spinner 1s linear infinite;
576
+ }
577
+
578
+ .modaal-loading-spinner > div:nth-of-type(5) {
579
+ -ms-transform: translate(84px, 84px) rotate(225deg) translate(70px, 0);
580
+ -webkit-transform: translate(84px, 84px) rotate(225deg) translate(70px, 0);
581
+ transform: translate(84px, 84px) rotate(225deg) translate(70px, 0);
582
+ }
583
+
584
+ .modaal-loading-spinner > div:nth-of-type(6) > div {
585
+ -webkit-animation: modaal-loading-spinner 1s linear infinite;
586
+ animation: modaal-loading-spinner 1s linear infinite;
587
+ -webkit-animation-delay: .62s;
588
+ animation-delay: .62s;
589
+ }
590
+
591
+ .modaal-loading-spinner > div:nth-of-type(6) {
592
+ -ms-transform: translate(84px, 84px) rotate(270deg) translate(70px, 0);
593
+ -webkit-transform: translate(84px, 84px) rotate(270deg) translate(70px, 0);
594
+ transform: translate(84px, 84px) rotate(270deg) translate(70px, 0);
595
+ }
596
+
597
+ .modaal-loading-spinner > div:nth-of-type(7) > div {
598
+ -webkit-animation: modaal-loading-spinner 1s linear infinite;
599
+ animation: modaal-loading-spinner 1s linear infinite;
600
+ -webkit-animation-delay: .75s;
601
+ animation-delay: .75s;
602
+ }
603
+
604
+ .modaal-loading-spinner > div:nth-of-type(7) {
605
+ -ms-transform: translate(84px, 84px) rotate(315deg) translate(70px, 0);
606
+ -webkit-transform: translate(84px, 84px) rotate(315deg) translate(70px, 0);
607
+ transform: translate(84px, 84px) rotate(315deg) translate(70px, 0);
608
+ }
609
+
610
+ .modaal-loading-spinner > div:nth-of-type(8) > div {
611
+ -webkit-animation: modaal-loading-spinner 1s linear infinite;
612
+ animation: modaal-loading-spinner 1s linear infinite;
613
+ -webkit-animation-delay: .87s;
614
+ animation-delay: .87s;
615
+ }
616
+
617
+ .modaal-loading-spinner > div:nth-of-type(8) {
618
+ -ms-transform: translate(84px, 84px) rotate(360deg) translate(70px, 0);
619
+ -webkit-transform: translate(84px, 84px) rotate(360deg) translate(70px, 0);
620
+ transform: translate(84px, 84px) rotate(360deg) translate(70px, 0);
621
+ }
622
+
623
+ @media only screen and (min-width: 1400px) {
624
+
625
+ .modaal-video-container {
626
+ padding-bottom: 0;
627
+ height: 731px;
628
+ }
629
+
630
+ }
631
+
632
+ @media only screen and (max-width: 1140px) {
633
+
634
+ .modaal-image .modaal-inner-wrapper {
635
+ padding-left: 25px;
636
+ padding-right: 25px;
637
+ }
638
+
639
+ .modaal-gallery-control {
640
+ top: auto;
641
+ bottom: 20px;
642
+ -webkit-transform: none;
643
+ -ms-transform: none;
644
+ transform: none;
645
+ background: rgba(0, 0, 0, 0.7);
646
+ }
647
+
648
+ .modaal-gallery-control:before,
649
+ .modaal-gallery-control:after {
650
+ background: #fff;
651
+ }
652
+
653
+ .modaal-gallery-next {
654
+ left: auto;
655
+ right: 20px;
656
+ }
657
+
658
+ .modaal-gallery-prev {
659
+ left: 20px;
660
+ right: auto;
661
+ }
662
+
663
+ }
664
+
665
+ @media screen and (max-width: 900px) {
666
+
667
+ .modaal-instagram iframe {
668
+ width: 500px !important;
669
+ }
670
+
671
+ }
672
+
673
+ @media only screen and (max-width: 600px) {
674
+
675
+ .modaal-instagram iframe {
676
+ width: 280px !important;
677
+ }
678
+
679
+ }
680
+
681
+ @media screen and (max-height: 1100px) {
682
+
683
+ .modaal-instagram iframe {
684
+ width: 700px !important;
685
+ }
686
+
687
+ }
688
+
689
+ @media screen and (max-height: 1000px) {
690
+
691
+ .modaal-inner-wrapper {
692
+ padding-top: 60px;
693
+ padding-bottom: 60px;
694
+ }
695
+
696
+ .modaal-instagram iframe {
697
+ width: 600px !important;
698
+ }
699
+
700
+ }
701
+
702
+ @media screen and (max-height: 900px) {
703
+
704
+ .modaal-instagram iframe {
705
+ width: 500px !important;
706
+ }
707
+
708
+ .modaal-video-container {
709
+ max-width: 900px;
710
+ max-height: 510px;
711
+ }
712
+
713
+ }
714
+
715
+ @media only screen and (max-height: 820px) {
716
+
717
+ .modaal-gallery-label {
718
+ display: none;
719
+ }
720
+
721
+ }
722
+
723
+ @keyframes instaReveal {
724
+
725
+ 0% {
726
+ opacity: 0;
727
+ }
728
+
729
+ 100% {
730
+ opacity: 1;
731
+ }
732
+
733
+ }
734
+
735
+ @-webkit-keyframes instaReveal {
736
+
737
+ 0% {
738
+ opacity: 0;
739
+ }
740
+
741
+ 100% {
742
+ opacity: 1;
743
+ }
744
+
745
+ }
746
+
747
+ @-webkit-keyframes modaal-loading-spinner {
748
+
749
+ 0% {
750
+ opacity: 1;
751
+ -ms-transform: scale(1.5);
752
+ -webkit-transform: scale(1.5);
753
+ transform: scale(1.5);
754
+ }
755
+
756
+ 100% {
757
+ opacity: .1;
758
+ -ms-transform: scale(1);
759
+ -webkit-transform: scale(1);
760
+ transform: scale(1);
761
+ }
762
+
763
+ }
764
+
765
+ @keyframes modaal-loading-spinner {
766
+
767
+ 0% {
768
+ opacity: 1;
769
+ -ms-transform: scale(1.5);
770
+ -webkit-transform: scale(1.5);
771
+ transform: scale(1.5);
772
+ }
773
+
774
+ 100% {
775
+ opacity: .1;
776
+ -ms-transform: scale(1);
777
+ -webkit-transform: scale(1);
778
+ transform: scale(1);
779
+ }
780
+
781
+ }
782
+
assets/modaal/css/modaal.min.css ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ /*!
2
+ Modaal - accessible modals - v0.4.4
3
+ by Humaan, for all humans.
4
+ http://humaan.com
5
+ */.modaal-noscroll{overflow:hidden}.modaal-accessible-hide{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);padding:0!important;border:0!important;height:1px!important;width:1px!important;overflow:hidden}.modaal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:999;opacity:0}.modaal-wrapper{display:block;position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;overflow:auto;opacity:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.modaal-wrapper *{box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-backface-visibility:hidden}.modaal-wrapper .modaal-close{border:none;background:0 0;padding:0;-webkit-appearance:none}.modaal-wrapper.modaal-start_none{display:none;opacity:1}.modaal-wrapper.modaal-start_fade{opacity:0}.modaal-wrapper [tabindex="0"]{outline:0!important}.modaal-wrapper.modaal-fullscreen{overflow:hidden}.modaal-outer-wrapper{display:table;position:relative;width:100%;height:100%}.modaal-fullscreen .modaal-outer-wrapper{display:block}.modaal-inner-wrapper{display:table-cell;width:100%;height:100%;position:relative;vertical-align:middle;text-align:center;padding:80px 25px}.modaal-fullscreen .modaal-inner-wrapper{padding:0;display:block;vertical-align:top}.modaal-container{position:relative;display:inline-block;width:100%;margin:auto;text-align:left;color:#000;max-width:1000px;border-radius:0;background:#fff;box-shadow:0 4px 15px rgba(0,0,0,.2);cursor:auto}.modaal-container.is_loading{height:100px;width:100px;overflow:hidden}.modaal-fullscreen .modaal-container{max-width:none;height:100%;overflow:auto}.modaal-close{position:fixed;right:20px;top:20px;color:#fff;cursor:pointer;opacity:1;width:50px;height:50px;background:rgba(0,0,0,0);border-radius:100%;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.modaal-close:focus,.modaal-close:hover{outline:0;background:#fff}.modaal-close:focus:after,.modaal-close:focus:before,.modaal-close:hover:after,.modaal-close:hover:before{background:#b93d0c}.modaal-close span{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);padding:0!important;border:0!important;height:1px!important;width:1px!important;overflow:hidden}.modaal-close:after,.modaal-close:before{display:block;content:" ";position:absolute;top:14px;left:23px;width:4px;height:22px;border-radius:4px;background:#fff;-webkit-transition:background .2s ease-in-out;transition:background .2s ease-in-out}.modaal-close:before{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.modaal-close:after{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.modaal-fullscreen .modaal-close{background:#afb7bc;right:10px;top:10px}.modaal-content-container{padding:30px}.modaal-confirm-wrap{padding:30px 0 0;text-align:center;font-size:0}.modaal-confirm-btn{font-size:14px;display:inline-block;margin:0 10px;vertical-align:middle;cursor:pointer;border:none;background:0 0}.modaal-confirm-btn.modaal-ok{padding:10px 15px;color:#fff;background:#555;border-radius:3px;-webkit-transition:background .2s ease-in-out;transition:background .2s ease-in-out}.modaal-confirm-btn.modaal-ok:hover{background:#2f2f2f}.modaal-confirm-btn.modaal-cancel{text-decoration:underline}.modaal-confirm-btn.modaal-cancel:hover{text-decoration:none;color:#2f2f2f}.modaal-instagram .modaal-container{width:auto;background:0 0;box-shadow:none!important}.modaal-instagram .modaal-content-container{padding:0;background:0 0}.modaal-instagram .modaal-content-container>blockquote{width:1px!important;height:1px!important;opacity:0!important}.modaal-instagram iframe{opacity:0;margin:-6px!important;border-radius:0!important;width:1000px!important;max-width:800px!important;box-shadow:none!important;-webkit-animation:instaReveal 1s linear forwards;animation:instaReveal 1s linear forwards}.modaal-image .modaal-inner-wrapper{padding-left:140px;padding-right:140px}.modaal-image .modaal-container{width:auto;max-width:100%}.modaal-gallery-wrap{position:relative;color:#fff}.modaal-gallery-item{display:none}.modaal-gallery-item img{display:block}.modaal-gallery-item.is_active{display:block}.modaal-gallery-label{position:absolute;left:0;width:100%;margin:20px 0 0;font-size:18px;text-align:center;color:#fff}.modaal-gallery-label:focus{outline:0}.modaal-gallery-control{position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);opacity:1;cursor:pointer;color:#fff;width:50px;height:50px;background:rgba(0,0,0,0);border:none;border-radius:100%;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.modaal-gallery-control.is_hidden{opacity:0;cursor:default}.modaal-gallery-control:focus,.modaal-gallery-control:hover{outline:0;background:#fff}.modaal-gallery-control:focus:after,.modaal-gallery-control:focus:before,.modaal-gallery-control:hover:after,.modaal-gallery-control:hover:before{background:#afb7bc}.modaal-gallery-control span{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);padding:0!important;border:0!important;height:1px!important;width:1px!important;overflow:hidden}.modaal-gallery-control:after,.modaal-gallery-control:before{display:block;content:" ";position:absolute;top:16px;left:25px;width:4px;height:18px;border-radius:4px;background:#fff;-webkit-transition:background .2s ease-in-out;transition:background .2s ease-in-out}.modaal-gallery-control:before{margin:-5px 0 0;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.modaal-gallery-control:after{margin:5px 0 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.modaal-gallery-next-inner{left:100%;margin-left:40px}.modaal-gallery-next-outer{right:45px}.modaal-gallery-prev:after,.modaal-gallery-prev:before{left:22px}.modaal-gallery-prev:before{margin:5px 0 0;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.modaal-gallery-prev:after{margin:-5px 0 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.modaal-gallery-prev-inner{right:100%;margin-right:40px}.modaal-gallery-prev-outer{left:45px}.modaal-video-wrap{margin:auto 50px;position:relative}.modaal-video-container{position:relative;padding-bottom:56.25%;height:0;overflow:hidden;max-width:100%;box-shadow:0 0 10px rgba(0,0,0,.3);background:#000;max-width:1300px;margin-left:auto;margin-right:auto}.modaal-video-container embed,.modaal-video-container iframe,.modaal-video-container object{position:absolute;top:0;left:0;width:100%;height:100%}.modaal-iframe .modaal-content{width:100%;height:100%}.modaal-iframe-elem{width:100%;height:100%;display:block}.modaal-loading-spinner{background:0 0;position:absolute;width:200px;height:200px;top:50%;left:50%;margin:-100px 0 0 -100px;-webkit-transform:scale(.25);-ms-transform:scale(.25);transform:scale(.25)}.modaal-loading-spinner>div{width:24px;height:24px;margin-left:4px;margin-top:4px;position:absolute}.modaal-loading-spinner>div>div{width:100%;height:100%;border-radius:15px;background:#fff}.modaal-loading-spinner>div:nth-of-type(1)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:0s;animation-delay:0s}.modaal-loading-spinner>div:nth-of-type(2)>div,.modaal-loading-spinner>div:nth-of-type(3)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(1){-ms-transform:translate(84px,84px) rotate(45deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(45deg) translate(70px,0);transform:translate(84px,84px) rotate(45deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(2)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.12s;animation-delay:.12s}.modaal-loading-spinner>div:nth-of-type(2){-ms-transform:translate(84px,84px) rotate(90deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(90deg) translate(70px,0);transform:translate(84px,84px) rotate(90deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(3)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.25s;animation-delay:.25s}.modaal-loading-spinner>div:nth-of-type(4)>div,.modaal-loading-spinner>div:nth-of-type(5)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(3){-ms-transform:translate(84px,84px) rotate(135deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(135deg) translate(70px,0);transform:translate(84px,84px) rotate(135deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(4)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.37s;animation-delay:.37s}.modaal-loading-spinner>div:nth-of-type(4){-ms-transform:translate(84px,84px) rotate(180deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(180deg) translate(70px,0);transform:translate(84px,84px) rotate(180deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(5)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.5s;animation-delay:.5s}.modaal-loading-spinner>div:nth-of-type(6)>div,.modaal-loading-spinner>div:nth-of-type(7)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(5){-ms-transform:translate(84px,84px) rotate(225deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(225deg) translate(70px,0);transform:translate(84px,84px) rotate(225deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(6)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.62s;animation-delay:.62s}.modaal-loading-spinner>div:nth-of-type(6){-ms-transform:translate(84px,84px) rotate(270deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(270deg) translate(70px,0);transform:translate(84px,84px) rotate(270deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(7)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.75s;animation-delay:.75s}.modaal-loading-spinner>div:nth-of-type(7){-ms-transform:translate(84px,84px) rotate(315deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(315deg) translate(70px,0);transform:translate(84px,84px) rotate(315deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(8)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.87s;animation-delay:.87s}.modaal-loading-spinner>div:nth-of-type(8){-ms-transform:translate(84px,84px) rotate(360deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(360deg) translate(70px,0);transform:translate(84px,84px) rotate(360deg) translate(70px,0)}@media only screen and (min-width:1400px){.modaal-video-container{padding-bottom:0;height:731px}}@media only screen and (max-width:1140px){.modaal-image .modaal-inner-wrapper{padding-left:25px;padding-right:25px}.modaal-gallery-control{top:auto;bottom:20px;-webkit-transform:none;-ms-transform:none;transform:none;background:rgba(0,0,0,.7)}.modaal-gallery-control:after,.modaal-gallery-control:before{background:#fff}.modaal-gallery-next{left:auto;right:20px}.modaal-gallery-prev{left:20px;right:auto}}@media screen and (max-width:900px){.modaal-instagram iframe{width:500px!important}}@media only screen and (max-width:600px){.modaal-instagram iframe{width:280px!important}}@media screen and (max-height:1100px){.modaal-instagram iframe{width:700px!important}}@media screen and (max-height:1000px){.modaal-inner-wrapper{padding-top:60px;padding-bottom:60px}.modaal-instagram iframe{width:600px!important}}@media screen and (max-height:900px){.modaal-instagram iframe{width:500px!important}.modaal-video-container{max-width:900px;max-height:510px}}@media only screen and (max-height:820px){.modaal-gallery-label{display:none}}@keyframes instaReveal{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes instaReveal{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:.1;-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1)}}@keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:.1;-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1)}}
assets/modaal/css/modaal.scss ADDED
@@ -0,0 +1,555 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ Modaal - accessible modals - v0.4.4
3
+ by Humaan, for all humans.
4
+ http://humaan.com
5
+ */
6
+
7
+ // Modaal Variables
8
+ // --------------------------------------------------------
9
+
10
+ $modaal-overlay-color: rgba(0,0,0, 0.8);
11
+
12
+ $modaal-radius: 0px; //5px
13
+ $modaal-main-bg: #fff;
14
+ $modaal-main-text: #000;
15
+ $modaal-max-width: 1000px;
16
+ $modaal-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
17
+ $modaal-padding: 30px;
18
+ $modaal-hover-color: rgba(0,0,0, 0.7);
19
+ $modaal-close-hover-color: #b93d0c;
20
+
21
+ $modaal-light: #fff;
22
+ $modaal-primary: #555;
23
+ $modaal-grey: #afb7bc;
24
+
25
+
26
+ // Modaal Mixins
27
+ // --------------------------------------------------------
28
+ @mixin modaal-transition($type, $speed: .2s, $ease: ease-in-out) {
29
+ transition: $type #{$speed} #{$ease};
30
+ }
31
+ @mixin modaal-hidetext() {
32
+ position: absolute !important;
33
+ clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
34
+ clip: rect(1px, 1px, 1px, 1px);
35
+ padding:0 !important;
36
+ border:0 !important;
37
+ height: 1px !important;
38
+ width: 1px !important;
39
+ overflow: hidden;
40
+ }
41
+
42
+
43
+ // Modaal Structure
44
+ // --------------------------------------------------------
45
+ .modaal-noscroll {
46
+ overflow: hidden;
47
+ }
48
+ .modaal-accessible-hide {
49
+ @include modaal-hidetext;
50
+ }
51
+
52
+ .modaal-overlay {
53
+ position: fixed;
54
+ top: 0;
55
+ left: 0;
56
+ width: 100%;
57
+ height: 100%;
58
+ z-index: 999;
59
+ opacity: 0;
60
+ }
61
+ .modaal-wrapper {
62
+ display: block;
63
+ position: fixed;
64
+ top: 0;
65
+ left: 0;
66
+ width: 100%;
67
+ height: 100%;
68
+ z-index: 9999;
69
+ overflow: auto;
70
+ opacity: 1;
71
+ box-sizing: border-box;
72
+ -webkit-overflow-scrolling: touch;
73
+ @include modaal-transition(all, 0.3s);
74
+ & * {
75
+ box-sizing: border-box;
76
+ -webkit-font-smoothing: antialiased;
77
+ -moz-osx-font-smoothing: grayscale;
78
+ -webkit-backface-visibility: hidden;
79
+ }
80
+ .modaal-close {
81
+ border: none;
82
+ background: transparent;
83
+ padding: 0;
84
+ -webkit-appearance: none;
85
+ }
86
+
87
+ &.modaal-start_none {
88
+ display: none;
89
+ opacity: 1;
90
+ }
91
+ &.modaal-start_fade {
92
+ opacity: 0;
93
+ }
94
+
95
+ & *[tabindex="0"] {
96
+ outline: none !important;
97
+ }
98
+
99
+ // is fullscreen
100
+ &.modaal-fullscreen {
101
+ overflow: hidden;
102
+ }
103
+ }
104
+ .modaal-outer-wrapper {
105
+ display: table;
106
+ position: relative;
107
+ width: 100%;
108
+ height: 100%;
109
+ .modaal-fullscreen & {
110
+ display: block;
111
+ }
112
+ }
113
+ .modaal-inner-wrapper {
114
+ display: table-cell;
115
+ width: 100%;
116
+ height: 100%;
117
+ position: relative;
118
+ vertical-align: middle;
119
+ text-align: center;
120
+ padding: 80px 25px;
121
+
122
+ // when is fullscreen
123
+ .modaal-fullscreen & {
124
+ padding: 0;
125
+ display: block;
126
+ vertical-align: top;
127
+ }
128
+ }
129
+ .modaal-container {
130
+ position: relative;
131
+ display: inline-block;
132
+ width: 100%;
133
+ margin: auto;
134
+ text-align: left;
135
+ color: $modaal-main-text;
136
+ max-width: $modaal-max-width;
137
+ border-radius: $modaal-radius;
138
+ background: $modaal-main-bg;
139
+ box-shadow: $modaal-shadow;
140
+ cursor: auto;
141
+
142
+ // while loading
143
+ &.is_loading {
144
+ height: 100px;
145
+ width: 100px;
146
+ overflow: hidden;
147
+ }
148
+ // when is fullscreen
149
+ .modaal-fullscreen & {
150
+ max-width: none;
151
+ height: 100%;
152
+ overflow: auto;
153
+ }
154
+ }
155
+
156
+ .modaal-close {
157
+ position: fixed;
158
+ right: 20px;
159
+ top: 20px;
160
+ color: $modaal-light;
161
+ cursor: pointer;
162
+ opacity: 1;
163
+ width: 50px;
164
+ height: 50px;
165
+ background: rgba(0,0,0, 0);
166
+ border-radius: 100%;
167
+ @include modaal-transition(all);
168
+ &:focus,
169
+ &:hover {
170
+ outline: none;
171
+ background: #fff;
172
+ &:before,
173
+ &:after { background: $modaal-close-hover-color; }
174
+ }
175
+ span {
176
+ @include modaal-hidetext;
177
+ }
178
+ &:before,
179
+ &:after {
180
+ display: block;
181
+ content: " ";
182
+ position: absolute;
183
+ top: 14px;
184
+ left: 23px;
185
+ width: 4px;
186
+ height: 22px;
187
+ border-radius: 4px;
188
+ background: #fff;
189
+ @include modaal-transition(background);
190
+ }
191
+ &:before {
192
+ transform: rotate(-45deg);
193
+ }
194
+ &:after {
195
+ transform: rotate(45deg);
196
+ }
197
+ .modaal-fullscreen & {
198
+ background: $modaal-grey;
199
+ right: 10px;
200
+ top: 10px;
201
+ }
202
+ }
203
+
204
+ .modaal-content-container {
205
+ padding: $modaal-padding;
206
+ }
207
+
208
+
209
+ // Confirm Modaal
210
+ // --------------------------------------------------------
211
+
212
+ .modaal-confirm-wrap {
213
+ padding: 30px 0 0;
214
+ text-align: center;
215
+ font-size: 0;
216
+ }
217
+ .modaal-confirm-btn {
218
+ font-size: 14px;
219
+ display: inline-block;
220
+ margin: 0 10px;
221
+ vertical-align: middle;
222
+ cursor: pointer;
223
+ border: none;
224
+ background: transparent;
225
+
226
+ // Ok Button
227
+ &.modaal-ok {
228
+ padding: 10px 15px;
229
+ color: $modaal-light;
230
+ background: $modaal-primary;
231
+ border-radius: 3px;
232
+ @include modaal-transition(background);
233
+ &:hover {
234
+ background: darken($modaal-primary, 15%);
235
+ }
236
+ }
237
+ &.modaal-cancel {
238
+ text-decoration: underline;
239
+ &:hover {
240
+ text-decoration: none;
241
+ color: darken($modaal-primary, 15%);
242
+ }
243
+ }
244
+ }
245
+
246
+
247
+
248
+ @keyframes instaReveal {
249
+ 0% { opacity: 0; }
250
+ 100% { opacity: 1; }
251
+ }
252
+ @-o-keyframes instaReveal {
253
+ 0% { opacity: 0; }
254
+ 100% { opacity: 1; }
255
+ }
256
+ @-moz-keyframes instaReveal {
257
+ 0% { opacity: 0; }
258
+ 100% { opacity: 1; }
259
+ }
260
+ @-webkit-keyframes instaReveal {
261
+ 0% { opacity: 0; }
262
+ 100% { opacity: 1; }
263
+ }
264
+ @-ms-keyframes instaReveal {
265
+ 0% { opacity: 0; }
266
+ 100% { opacity: 1; }
267
+ }
268
+
269
+ // Instagram Photo
270
+ // --------------------------------------------------------
271
+
272
+ .modaal-instagram {
273
+ .modaal-container {
274
+ width: auto;
275
+ background: transparent;
276
+ box-shadow: none !important;
277
+ }
278
+ .modaal-content-container {
279
+ padding: 0;
280
+ background: transparent;
281
+ }
282
+ .modaal-content-container > blockquote {
283
+ width: 1px !important;
284
+ height: 1px !important;
285
+ opacity: 0 !important;
286
+ }
287
+ iframe {
288
+ opacity: 0;
289
+ margin: -6px !important;
290
+ border-radius: 0 !important;
291
+ width: 1000px !important;
292
+ max-width: 800px !important;
293
+ box-shadow: none !important;
294
+
295
+ animation: instaReveal 1s linear forwards;
296
+ }
297
+ }
298
+
299
+
300
+
301
+ // Gallery
302
+ // --------------------------------------------------------
303
+ .modaal-image {
304
+ .modaal-inner-wrapper {
305
+ padding-left: 140px;
306
+ padding-right: 140px;
307
+ }
308
+ .modaal-container {
309
+ width: auto;
310
+ max-width: 100%;
311
+ }
312
+ }
313
+
314
+ .modaal-gallery-wrap {
315
+ position: relative;
316
+ color: $modaal-light;
317
+ }
318
+ .modaal-gallery-item {
319
+ display: none;
320
+ img {
321
+ display: block;
322
+ //width: 100%;
323
+ }
324
+ &.is_active {
325
+ display: block;
326
+ }
327
+ }
328
+ .modaal-gallery-label {
329
+ position: absolute;
330
+ left: 0;
331
+ width: 100%;
332
+ margin: 20px 0 0;
333
+ font-size: 18px;
334
+ text-align: center;
335
+ color: #fff;
336
+ &:focus {
337
+ outline: none;
338
+ }
339
+ }
340
+ .modaal-gallery-control {
341
+ position: absolute;
342
+ top: 50%;
343
+ transform: translateY(-50%);
344
+ opacity: 1;
345
+ cursor: pointer;
346
+ color: $modaal-light;
347
+ width: 50px;
348
+ height: 50px;
349
+ background: rgba(0,0,0, 0);
350
+ border: none;
351
+ border-radius: 100%;
352
+ @include modaal-transition(all);
353
+ &.is_hidden {
354
+ opacity: 0;
355
+ cursor: default;
356
+ }
357
+ &:focus,
358
+ &:hover {
359
+ outline: none;
360
+ background: #fff;
361
+ &:before,
362
+ &:after {
363
+ background: $modaal-grey;
364
+ }
365
+ }
366
+ span {
367
+ @include modaal-hidetext;
368
+ }
369
+
370
+ &:before,
371
+ &:after {
372
+ display: block;
373
+ content: " ";
374
+ position: absolute;
375
+ top: 16px;
376
+ left: 25px;
377
+ width: 4px;
378
+ height: 18px;
379
+ border-radius: 4px;
380
+ background: #fff;
381
+ @include modaal-transition(background);
382
+ }
383
+ &:before {
384
+ margin: -5px 0 0;
385
+ transform: rotate(-45deg);
386
+ }
387
+ &:after {
388
+ margin: 5px 0 0;
389
+ transform: rotate(45deg);
390
+ }
391
+ }
392
+ .modaal-gallery-next {
393
+ &-inner {
394
+ left: 100%;
395
+ margin-left: 40px;
396
+ }
397
+ &-outer {
398
+ right: 45px;
399
+ }
400
+ }
401
+ .modaal-gallery-prev {
402
+ &:before,
403
+ &:after { left: 22px; }
404
+ &:before {
405
+ margin: 5px 0 0;
406
+ transform: rotate(-45deg);
407
+ }
408
+ &:after {
409
+ margin: -5px 0 0;
410
+ transform: rotate(45deg);
411
+ }
412
+
413
+ &-inner {
414
+ right: 100%;
415
+ margin-right: 40px;
416
+ }
417
+ &-outer {
418
+ left: 45px;
419
+ }
420
+ }
421
+
422
+
423
+ // Video
424
+ // --------------------------------------------------------
425
+ .modaal-video-wrap {
426
+ margin: auto 50px;
427
+ position: relative;
428
+ }
429
+
430
+ .modaal-video-container {
431
+ position: relative;
432
+ padding-bottom: 56.25%;
433
+ height: 0;
434
+ overflow: hidden;
435
+ max-width: 100%;
436
+ box-shadow: 0 0 10px rgba(0,0,0, 0.3);
437
+ background: #000;
438
+ max-width: 1300px;
439
+ margin-left: auto;
440
+ margin-right: auto;
441
+ iframe,
442
+ object,
443
+ embed {
444
+ position: absolute;
445
+ top: 0;
446
+ left: 0;
447
+ width: 100%;
448
+ height: 100%;
449
+ }
450
+ }
451
+
452
+ // Modaal iFrame
453
+ // --------------------------------------------------------
454
+ .modaal-iframe .modaal-content {
455
+ width: 100%;
456
+ height: 100%;
457
+ }
458
+ .modaal-iframe-elem {
459
+ width: 100%;
460
+ height: 100%;
461
+ display: block;
462
+ }
463
+
464
+
465
+ // Responsive styles
466
+ // --------------------------------------------------------
467
+ @media only screen and (min-width: 1400px) {
468
+ .modaal-video-container {
469
+ padding-bottom: 0;
470
+ height: 731px;
471
+ }
472
+ }
473
+
474
+ @media only screen and (max-width: 1140px) {
475
+ .modaal-image {
476
+ .modaal-inner-wrapper {
477
+ padding-left: 25px;
478
+ padding-right: 25px;
479
+ }
480
+ }
481
+ .modaal-gallery-control {
482
+ top: auto;
483
+ bottom: 20px;
484
+ transform: none;
485
+ background: rgba(0,0,0, 0.7);;
486
+ &:before,
487
+ &:after {
488
+ background: #fff;
489
+ }
490
+ }
491
+ .modaal-gallery-next {
492
+ left: auto;
493
+ right: 20px;
494
+ }
495
+ .modaal-gallery-prev {
496
+ left: 20px;
497
+ right: auto;
498
+ }
499
+ }
500
+
501
+ @media screen and (max-width: 900px) {
502
+ .modaal-instagram iframe {
503
+ width: 500px !important;
504
+ }
505
+ }
506
+ @media screen and (max-height: 1100px) {
507
+ .modaal-instagram iframe {
508
+ width: 700px !important;
509
+ }
510
+ }
511
+ @media screen and (max-height: 1000px) {
512
+ .modaal-inner-wrapper {
513
+ padding-top: 60px;
514
+ padding-bottom: 60px;
515
+ }
516
+ .modaal-instagram iframe {
517
+ width: 600px !important;
518
+ }
519
+ }
520
+ @media screen and (max-height: 900px) {
521
+ .modaal-instagram iframe {
522
+ width: 500px !important;
523
+ }
524
+ .modaal-video-container {
525
+ max-width: 900px;
526
+ max-height: 510px;
527
+ }
528
+ }
529
+
530
+ @media only screen and (max-width: 600px) {
531
+ .modaal-instagram iframe {
532
+ width: 280px !important;
533
+ }
534
+ }
535
+ @media only screen and (max-height: 820px) {
536
+ .modaal-gallery-label {
537
+ display: none;
538
+ }
539
+ }
540
+
541
+
542
+
543
+ // CSS loading gif
544
+ // --------------------------------------------------------
545
+ .modaal-loading-spinner {
546
+ background: none;
547
+ position: absolute;
548
+ width: 200px;
549
+ height: 200px;
550
+ top: 50%;
551
+ left: 50%;
552
+ margin: -100px 0 0 -100px;
553
+ transform: scale(0.25);
554
+ }
555
+ @-ms-keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-moz-transform:scale(1.5);-webkit-transform:scale(1.5);-o-transform:scale(1.5);transform:scale(1.5)}100%{opacity:.1;-ms-transform:scale(1);-moz-transform:scale(1);-webkit-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-moz-keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-moz-transform:scale(1.5);-webkit-transform:scale(1.5);-o-transform:scale(1.5);transform:scale(1.5)}100%{opacity:.1;-ms-transform:scale(1);-moz-transform:scale(1);-webkit-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-webkit-keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-moz-transform:scale(1.5);-webkit-transform:scale(1.5);-o-transform:scale(1.5);transform:scale(1.5)}100%{opacity:.1;-ms-transform:scale(1);-moz-transform:scale(1);-webkit-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-o-keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-moz-transform:scale(1.5);-webkit-transform:scale(1.5);-o-transform:scale(1.5);transform:scale(1.5)}100%{opacity:.1;-ms-transform:scale(1);-moz-transform:scale(1);-webkit-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-moz-transform:scale(1.5);-webkit-transform:scale(1.5);-o-transform:scale(1.5);transform:scale(1.5)}100%{opacity:.1;-ms-transform:scale(1);-moz-transform:scale(1);-webkit-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.modaal-loading-spinner>div{width:24px;height:24px;margin-left:4px;margin-top:4px;position:absolute}.modaal-loading-spinner>div>div{width:100%;height:100%;border-radius:15px;background:#fff}.modaal-loading-spinner>div:nth-of-type(1)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-ms-animation-delay:0s;-moz-animation-delay:0s;-webkit-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s}.modaal-loading-spinner>div:nth-of-type(2)>div,.modaal-loading-spinner>div:nth-of-type(3)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(1){-ms-transform:translate(84px,84px) rotate(45deg) translate(70px,0);-moz-transform:translate(84px,84px) rotate(45deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(45deg) translate(70px,0);-o-transform:translate(84px,84px) rotate(45deg) translate(70px,0);transform:translate(84px,84px) rotate(45deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(2)>div{animation:modaal-loading-spinner 1s linear infinite;-ms-animation-delay:.12s;-moz-animation-delay:.12s;-webkit-animation-delay:.12s;-o-animation-delay:.12s;animation-delay:.12s}.modaal-loading-spinner>div:nth-of-type(2){-ms-transform:translate(84px,84px) rotate(90deg) translate(70px,0);-moz-transform:translate(84px,84px) rotate(90deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(90deg) translate(70px,0);-o-transform:translate(84px,84px) rotate(90deg) translate(70px,0);transform:translate(84px,84px) rotate(90deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(3)>div{animation:modaal-loading-spinner 1s linear infinite;-ms-animation-delay:.25s;-moz-animation-delay:.25s;-webkit-animation-delay:.25s;-o-animation-delay:.25s;animation-delay:.25s}.modaal-loading-spinner>div:nth-of-type(4)>div,.modaal-loading-spinner>div:nth-of-type(5)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(3){-ms-transform:translate(84px,84px) rotate(135deg) translate(70px,0);-moz-transform:translate(84px,84px) rotate(135deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(135deg) translate(70px,0);-o-transform:translate(84px,84px) rotate(135deg) translate(70px,0);transform:translate(84px,84px) rotate(135deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(4)>div{animation:modaal-loading-spinner 1s linear infinite;-ms-animation-delay:.37s;-moz-animation-delay:.37s;-webkit-animation-delay:.37s;-o-animation-delay:.37s;animation-delay:.37s}.modaal-loading-spinner>div:nth-of-type(4){-ms-transform:translate(84px,84px) rotate(180deg) translate(70px,0);-moz-transform:translate(84px,84px) rotate(180deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(180deg) translate(70px,0);-o-transform:translate(84px,84px) rotate(180deg) translate(70px,0);transform:translate(84px,84px) rotate(180deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(5)>div{animation:modaal-loading-spinner 1s linear infinite;-ms-animation-delay:.5s;-moz-animation-delay:.5s;-webkit-animation-delay:.5s;-o-animation-delay:.5s;animation-delay:.5s}.modaal-loading-spinner>div:nth-of-type(6)>div,.modaal-loading-spinner>div:nth-of-type(7)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(5){-ms-transform:translate(84px,84px) rotate(225deg) translate(70px,0);-moz-transform:translate(84px,84px) rotate(225deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(225deg) translate(70px,0);-o-transform:translate(84px,84px) rotate(225deg) translate(70px,0);transform:translate(84px,84px) rotate(225deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(6)>div{animation:modaal-loading-spinner 1s linear infinite;-ms-animation-delay:.62s;-moz-animation-delay:.62s;-webkit-animation-delay:.62s;-o-animation-delay:.62s;animation-delay:.62s}.modaal-loading-spinner>div:nth-of-type(6){-ms-transform:translate(84px,84px) rotate(270deg) translate(70px,0);-moz-transform:translate(84px,84px) rotate(270deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(270deg) translate(70px,0);-o-transform:translate(84px,84px) rotate(270deg) translate(70px,0);transform:translate(84px,84px) rotate(270deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(7)>div{animation:modaal-loading-spinner 1s linear infinite;-ms-animation-delay:.75s;-moz-animation-delay:.75s;-webkit-animation-delay:.75s;-o-animation-delay:.75s;animation-delay:.75s}.modaal-loading-spinner>div:nth-of-type(7){-ms-transform:translate(84px,84px) rotate(315deg) translate(70px,0);-moz-transform:translate(84px,84px) rotate(315deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(315deg) translate(70px,0);-o-transform:translate(84px,84px) rotate(315deg) translate(70px,0);transform:translate(84px,84px) rotate(315deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(8)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-ms-animation-delay:.87s;-moz-animation-delay:.87s;-webkit-animation-delay:.87s;-o-animation-delay:.87s;animation-delay:.87s}.modaal-loading-spinner>div:nth-of-type(8){-ms-transform:translate(84px,84px) rotate(360deg) translate(70px,0);-moz-transform:translate(84px,84px) rotate(360deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(360deg) translate(70px,0);-o-transform:translate(84px,84px) rotate(360deg) translate(70px,0);transform:translate(84px,84px) rotate(360deg) translate(70px,0)}
assets/modaal/js/modaal.js ADDED
@@ -0,0 +1,1390 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ Modaal - accessible modals - v0.4.4
3
+ by Humaan, for all humans.
4
+ http://humaan.com
5
+ */
6
+ /**
7
+ Modaal jQuery Plugin : Accessible Modals
8
+
9
+ ==== General Options ===
10
+ type (string) : ajax, inline, image, iframe, confirm. Defaults to 'inline'
11
+ content_source (stribg) : Accepts a string value for your target element, such as '#my-content'. This allows for when trigger element is
12
+ an `<a href="#">` link. Not to be confused with the already existing `source` event.
13
+ animation (string) : Fade, expand, down, up. Defaults to 'fade'
14
+ after_callback_delay (integer) : Specify a delay value for the after open callbacks. This is necessary because with the bundled animations
15
+ have a set duration in the bundled CSS. Specify a delay of the same amount as the animation duration in so
16
+ more accurately fire the after open/close callbacks. Defaults 350, does not apply if animation is 'none',
17
+ after open callbacks are dispatched immediately
18
+
19
+ is_locked (boolean) : Set this to true to disable closing the modal via keypress or clicking the background. Beware that if
20
+ type != 'confirm' there will be no interface to dismiss the modal if is_locked = true, you'd have to
21
+ programmatically arrange to dismiss the modal. Confirm modals are always locked regardless of this option
22
+ Defaults to false
23
+
24
+ hide_close (boolean) : Set this to true to hide the close modal button. Key press and overlay click will still close the modal.
25
+ This method is best used when you want to put a custom close button inside the modal container space.
26
+
27
+ background (string) : Background overlay style. Defaults to '#000'
28
+ overlay_opacity (float) : Background overlay transparency. Defaults to 0.8
29
+ overlay_close (boolean) : Set this to false if you want to disable click to close on overlay background.
30
+
31
+ accessible_title (string) : Accessible title. Default 'Dialog Window'
32
+ start_open (boolean) : Set this to true to launch the Modaal window immediately on page open
33
+ fullscreen (boolean) : Set this to true to make the modaal fill the entire screen, false will default to own width/height attributes.
34
+ custom_class (string) : Fill in this string with a custom class that will be applied to the outer most modal wrapper.
35
+
36
+ width (integer) : Desired width of the modal. Required for iframe type. Defaults to undefined //TODO
37
+ height (integer) : Desired height of the modal. Required for iframe type. Defaults to undefined //TODO
38
+
39
+ background_scroll (boolean) : Set this to true to enable the page to scroll behind the open modal.
40
+
41
+ should_open (boolean|function) : Boolean or closure that returns a boolean to determine whether to open the modal or not.
42
+
43
+ close_text : String for close button text. Available for localisation and alternative languages to be used.
44
+ close_aria_label : String for close button aria-label attribute (value that screen readers will read out). Available for localisation and alternative languages to be used.
45
+
46
+ === Events ===
47
+ before_open (function) : Callback function executed before modal is opened
48
+ after_open (function) : Callback function executed after modal is opened
49
+ before_close (function) : Callback function executed before modal is closed
50
+ after_close (function) : Callback function executed after modal is closed
51
+ source (function(element, src)) : Callback function executed on the default source, it is intended to transform the
52
+ source (href in an AJAX modal or iframe). The function passes in the triggering element
53
+ as well as the default source depending of the modal type. The default output of the
54
+ function is an untransformed default source.
55
+
56
+
57
+ === Confirm Options & Events ===
58
+ confirm_button_text (string) : Text on the confirm button. Defaults to 'Confirm'
59
+ confirm_cancel_button_text (string) : Text on the confirm modal cancel button. Defaults to 'Cancel'
60
+ confirm_title (string) : Title for confirm modal. Default 'Confirm Title'
61
+ confirm_content (string) : HTML content for confirm message
62
+ confirm_callback (function) : Callback function for when the confirm button is pressed as opposed to cancel
63
+ confirm_cancel_callback (function) : Callback function for when the cancel button is pressed
64
+
65
+
66
+ === Gallery Options & Events ===
67
+ gallery_active_class (string) : Active class applied to the currently active image or image slide in a gallery 'gallery_active_item'
68
+ outer_controls (boolean) : Set to true to put the next/prev controls outside the Modaal wrapper, at the edges of the browser window.
69
+ before_image_change (function) : Callback function executed before the image slide changes in a gallery modal. Default function( current_item, incoming_item )
70
+ after_image_change (function) : Callback function executed after the image slide changes in a gallery modal. Default function ( current_item )
71
+
72
+
73
+ === AJAX Options & Events ===
74
+ loading_content (string) : HTML content for loading message. Default 'Loading &hellip;'
75
+ loading_class (string) : Class name to be applied while content is loaded via AJAX. Default 'is_loading'
76
+ ajax_error_class (string) : Class name to be applied when content has failed to load. Default is 'modaal-error'
77
+ ajax_success (function) : Callback for when AJAX content is loaded in
78
+
79
+
80
+ === SOCIAL CONTENT ===
81
+ instagram_id (string) : Unique photo ID for an Instagram photo.
82
+
83
+ */
84
+ ( function( $ ) {
85
+
86
+ var modaal_loading_spinner = '<div class="modaal-loading-spinner"><div><div></div></div><div><div></div></div><div><div></div></div><div><div></div></div><div><div></div></div><div><div></div></div><div><div></div></div><div><div></div></div></div>'
87
+
88
+ var Modaal = {
89
+ init : function(options, elem) {
90
+ var self = this;
91
+
92
+ self.dom = $('body');
93
+
94
+ self.$elem = $(elem);
95
+ self.options = $.extend({}, $.fn.modaal.options, self.$elem.data(), options);
96
+ self.xhr = null;
97
+
98
+ // set up the scope
99
+ self.scope = {
100
+ is_open: false,
101
+ id: 'modaal_' + ( new Date().getTime() ) + ( Math.random().toString(16).substring(2) ),
102
+ source: self.options.content_source ? self.options.content_source : self.$elem.attr('href')
103
+ };
104
+
105
+ // add scope attribute to trigger element
106
+ self.$elem.attr('data-modaal-scope', self.scope.id);
107
+
108
+ // private options
109
+ self.private_options = {
110
+ active_class: 'is_active'
111
+ };
112
+
113
+ self.lastFocus = null;
114
+
115
+ // if is_locked
116
+ if ( self.options.is_locked || self.options.type == 'confirm' || self.options.hide_close ) {
117
+ self.scope.close_btn = '';
118
+ } else {
119
+ self.scope.close_btn = '<button type="button" class="modaal-close" id="modaal-close" aria-label="' + self.options.close_aria_label + '"><span>' + self.options.close_text + '</span></button>';
120
+ }
121
+
122
+ // reset animation_speed
123
+ if (self.options.animation === 'none' ){
124
+ self.options.animation_speed = 0;
125
+ self.options.after_callback_delay = 0;
126
+ }
127
+
128
+ // On click to open modal
129
+ $(elem).on('click.Modaal', function(e) {
130
+ e.preventDefault();
131
+ self.create_modaal(self, e);
132
+ });
133
+
134
+ // Define next/prev buttons
135
+ if (self.options.outer_controls === true) {
136
+ var mod_class = 'outer';
137
+ } else {
138
+ var mod_class = 'inner';
139
+ }
140
+ self.scope.prev_btn = '<button type="button" class="modaal-gallery-control modaal-gallery-prev modaal-gallery-prev-' + mod_class + '" id="modaal-gallery-prev" aria-label="Previous image (use left arrow to change)"><span>Previous Image</span></button>';
141
+ self.scope.next_btn = '<button type="button" class="modaal-gallery-control modaal-gallery-next modaal-gallery-next-' + mod_class + '" id="modaal-gallery-next" aria-label="Next image (use right arrow to change)"><span>Next Image</span></button>';
142
+
143
+ // Check for start_open
144
+ if (self.options.start_open === true ){
145
+ self.create_modaal( self );
146
+ }
147
+ },
148
+
149
+ // Initial create to determine which content type it requires
150
+ // ----------------------------------------------------------------
151
+ create_modaal : function(self, e) {
152
+ var self = this;
153
+ var source;
154
+
155
+ // Save last active state before modal
156
+ self.lastFocus = self.$elem;
157
+
158
+ if ( self.options.should_open === false || ( typeof self.options.should_open === 'function' && self.options.should_open() === false ) ) {
159
+ return;
160
+ }
161
+
162
+ // CB: before_open
163
+ self.options.before_open.call(self, e);
164
+
165
+ switch (self.options.type) {
166
+ case 'inline':
167
+ self.create_basic();
168
+ break;
169
+
170
+ case 'ajax':
171
+ source = self.options.source( self.$elem, self.scope.source );
172
+ self.fetch_ajax( source );
173
+ break;
174
+
175
+ case 'confirm':
176
+ self.options.is_locked = true;
177
+ self.create_confirm();
178
+ break;
179
+
180
+ case 'image':
181
+ self.create_image();
182
+ break;
183
+
184
+ case 'iframe':
185
+ source = self.options.source( self.$elem, self.scope.source );
186
+ self.create_iframe( source );
187
+ break;
188
+
189
+ case 'video':
190
+ self.create_video(self.scope.source);
191
+ break;
192
+
193
+ case 'instagram':
194
+ self.create_instagram();
195
+ break;
196
+ }
197
+
198
+ // call events to be watched (click, tab, keyup, keydown etc.)
199
+ self.watch_events();
200
+ },
201
+
202
+ // Watching Modal
203
+ // ----------------------------------------------------------------
204
+ watch_events : function() {
205
+ var self = this;
206
+
207
+ self.dom.off('click.Modaal keyup.Modaal keydown.Modaal');
208
+
209
+ // Body keydown
210
+ self.dom.on('keydown.Modaal', function(e) {
211
+ var key = e.keyCode;
212
+ var target = e.target;
213
+
214
+ // look for tab change and reset focus to modal window
215
+ // done in keydown so the check fires repeatedly when you hold the tab key down
216
+ if (key == 9 && self.scope.is_open) {
217
+ if (!$.contains(document.getElementById(self.scope.id), target) ) {
218
+ $('#' + self.scope.id).find('*[tabindex="0"]').focus();
219
+ }
220
+ }
221
+ });
222
+
223
+ // Body keyup
224
+ self.dom.on('keyup.Modaal', function(e) {
225
+ var key = e.keyCode;
226
+ var target = e.target;
227
+
228
+ if ( (e.shiftKey && e.keyCode == 9) && self.scope.is_open) {
229
+ // Watch for shift + tab key press. if open shift focus to close button.
230
+ if (!$.contains(document.getElementById(self.scope.id), target) ) {
231
+ $('#' + self.scope.id).find('.modaal-close').focus();
232
+ }
233
+ }
234
+
235
+ if ( !self.options.is_locked ){
236
+ // On escape key press close modal
237
+ if (key == 27 && self.scope.is_open ) {
238
+ if ( $(document.activeElement).is('input:not(:checkbox):not(:radio)') ) {
239
+ return false;
240
+ }
241
+
242
+ self.modaal_close();
243
+ return;
244
+ }
245
+ }
246
+
247
+ // is gallery open and images length is > 1
248
+ if ( self.options.type == 'image' ) {
249
+ // arrow left for back
250
+ if (key == 37 && self.scope.is_open && (!$('#' + self.scope.id + ' .modaal-gallery-prev').hasClass('is_hidden')) ) {
251
+ self.gallery_update('prev');
252
+ }
253
+ // arrow right for next
254
+ if (key == 39 && self.scope.is_open && (!$('#' + self.scope.id + ' .modaal-gallery-next').hasClass('is_hidden')) ) {
255
+ self.gallery_update('next');
256
+ }
257
+ return;
258
+ }
259
+ });
260
+
261
+ // Body click/touch
262
+ self.dom.on('click.Modaal', function(e) {
263
+ var trigger = $(e.target);
264
+
265
+ // General Controls: If it's not locked allow greedy close
266
+ if ( !self.options.is_locked ){
267
+ if ( (self.options.overlay_close && trigger.is('.modaal-inner-wrapper')) || trigger.is('.modaal-close') || trigger.closest('.modaal-close').length ) {
268
+ self.modaal_close();
269
+ return;
270
+ }
271
+ }
272
+
273
+ //Confirm Controls
274
+ if ( trigger.is('.modaal-confirm-btn' ) ){
275
+ // if 'OK' button is clicked, run confirm_callback()
276
+ if ( trigger.is('.modaal-ok') ) {
277
+ self.options.confirm_callback.call(self, self.lastFocus);
278
+ }
279
+
280
+ if ( trigger.is('.modaal-cancel') ) {
281
+ self.options.confirm_cancel_callback.call(self, self.lastFocus);
282
+ }
283
+ self.modaal_close();
284
+ return;
285
+ }
286
+
287
+ // Gallery Controls
288
+ if ( trigger.is( '.modaal-gallery-control' ) ){
289
+ // it not active, don't do nuthin!
290
+ if ( trigger.hasClass('is_hidden') ) {
291
+ return;
292
+ }
293
+
294
+ // trigger previous
295
+ if ( trigger.is('.modaal-gallery-prev') ) {
296
+ self.gallery_update('prev');
297
+ }
298
+ // trigger next
299
+ if ( trigger.is('.modaal-gallery-next') ) {
300
+ self.gallery_update('next');
301
+ }
302
+ return;
303
+ }
304
+ });
305
+ },
306
+
307
+ // Append markup into DOM
308
+ build_modal : function(content) {
309
+ var self = this;
310
+
311
+ // if is instagram
312
+ var igClass = '';
313
+ if ( self.options.type == 'instagram' ) {
314
+ igClass = ' modaal-instagram';
315
+ }
316
+
317
+ var wrap_class = (self.options.type == 'video') ? 'modaal-video-wrap' : 'modaal-content';
318
+
319
+ /*
320
+ modaal-start_none : fully hidden via display:none;
321
+ modaal-start_fade : hidden via opacity:0
322
+ modaal-start_slidedown : ...
323
+
324
+ */
325
+ var animation_class;
326
+ switch ( self.options.animation ) {
327
+ case 'fade' :
328
+ animation_class = ' modaal-start_fade';
329
+ break;
330
+ case 'slide-down' :
331
+ animation_class = ' modaal-start_slidedown';
332
+ break;
333
+ default :
334
+ animation_class = ' modaal-start_none'
335
+ }
336
+
337
+ // fullscreen check
338
+ var fullscreen_class = '';
339
+ if ( self.options.fullscreen ) {
340
+ fullscreen_class = ' modaal-fullscreen';
341
+ }
342
+
343
+ // custom class check
344
+ if ( self.options.custom_class !== '' || typeof(self.options.custom_class) !== 'undefined' ) {
345
+ self.options.custom_class = ' ' + self.options.custom_class;
346
+ }
347
+
348
+ // if width and heights exists and is typeof number
349
+ var dimensionsStyle = '';
350
+ if ( self.options.width && self.options.height && typeof self.options.width == 'number' && typeof self.options.height == 'number' ) {
351
+ // if width and height exist, and they are both numbers
352
+ dimensionsStyle = ' style="max-width:' + self.options.width + 'px;height:' + self.options.height + 'px;overflow:auto;"';
353
+ } else if ( self.options.width && typeof self.options.width == 'number' ) {
354
+ // if only width
355
+ dimensionsStyle = ' style="max-width:' + self.options.width + 'px;"';
356
+ } else if ( self.options.height && typeof self.options.height == 'number' ) {
357
+ // if only height
358
+ dimensionsStyle = ' style="height:' + self.options.height + 'px;overflow:auto;"';
359
+ }
360
+
361
+ // Reset dimensions style (width and height) for certain types
362
+ if ( self.options.type == 'image' || self.options.type == 'video' || self.options.type == 'instagram' || self.options.fullscreen ) {
363
+ dimensionsStyle = '';
364
+ }
365
+
366
+ // if is touch
367
+ // this is a bug fix for iOS to allow regular click events on div elements.
368
+ var touchTrigger = '';
369
+ if ( self.is_touch() ) {
370
+ touchTrigger = ' style="cursor:pointer;"'
371
+ }
372
+
373
+ var build_markup = '<div class="modaal-wrapper modaal-' + self.options.type + animation_class + igClass + fullscreen_class + self.options.custom_class + '" id="' + self.scope.id + '"><div class="modaal-outer-wrapper"><div class="modaal-inner-wrapper"' + touchTrigger + '>';
374
+
375
+ // hide if video
376
+ if (self.options.type != 'video') {
377
+ build_markup += '<div class="modaal-container"' + dimensionsStyle + '>';
378
+ }
379
+
380
+ // add the guts of the content
381
+ build_markup += '<div class="' + wrap_class + ' modaal-focus" aria-hidden="false" aria-label="' + self.options.accessible_title + ' - ' + self.options.close_aria_label + '" role="dialog">';
382
+
383
+ // If it's inline type, we want to clone content instead of dropping it straight in
384
+ if (self.options.type == 'inline') {
385
+ build_markup += '<div class="modaal-content-container" role="document"></div>';
386
+ } else {
387
+ // Drop in the content if it's not inline
388
+ build_markup += content;
389
+ }
390
+
391
+ // close wrap_class
392
+ build_markup += '</div>' + self.scope.close_btn;
393
+
394
+ // hide if video
395
+ if (self.options.type != 'video') {
396
+ build_markup += '</div>';
397
+ }
398
+
399
+ // close off modaal-inner-wrapper
400
+ build_markup += '</div>';
401
+
402
+ // If type is image AND outer_controls is true: add gallery next and previous controls.
403
+ if (self.options.type == 'image' && self.options.outer_controls === true) {
404
+ build_markup += self.scope.prev_btn + self.scope.next_btn;
405
+ }
406
+
407
+ // close off modaal-wrapper
408
+ build_markup += '</div></div>';
409
+
410
+ // append ajax modal markup to dom
411
+ if ($('#' + self.scope.id + '_overlay').length < 1) {
412
+ self.dom.append(build_markup);
413
+ }
414
+
415
+ // if inline, clone content into space
416
+ if (self.options.type == 'inline') {
417
+ content.appendTo('#' + self.scope.id + ' .modaal-content-container');
418
+ }
419
+
420
+ // Trigger overlay show (which triggers modal show)
421
+ self.modaal_overlay('show');
422
+ },
423
+
424
+ // Create Basic Inline Modal
425
+ // ----------------------------------------------------------------
426
+ create_basic : function() {
427
+ var self = this;
428
+ var target = $(self.scope.source);
429
+ var content = '';
430
+
431
+ if (target.length) {
432
+ content = target.contents().detach();
433
+ target.empty();
434
+ } else {
435
+ content = 'Content could not be loaded. Please check the source and try again.';
436
+ }
437
+
438
+ // now push content into markup
439
+ self.build_modal(content);
440
+ },
441
+
442
+ // Create Instagram Modal
443
+ // ----------------------------------------------------------------
444
+ create_instagram : function() {
445
+ var self = this;
446
+ var id = self.options.instagram_id;
447
+ var content = '';
448
+
449
+ var error_msg = 'Instagram photo couldn\'t be loaded, please check the embed code and try again.';
450
+
451
+ self.build_modal('<div class="modaal-content-container' + ( self.options.loading_class != '' ? ' ' + self.options.loading_class : '' ) + '">' + self.options.loading_content + '</div>' );
452
+
453
+ // ID exists, is not empty null or undefined.
454
+ if ( id != '' && id !== null && id !== undefined ) {
455
+ // set up oembed url
456
+ var ig_url = 'https://api.instagram.com/oembed?url=http://instagr.am/p/' + id + '/';
457
+
458
+ $.ajax({
459
+ url: ig_url,
460
+ dataType: "jsonp",
461
+ cache: false,
462
+ success: function (data) {
463
+
464
+ // Create temp dom element from which we'll clone into the modaal instance. This is required to bypass the unusual small thumb issue instagram oembed was serving up
465
+ self.dom.append('<div id="temp-ig" style="width:0;height:0;overflow:hidden;">' + data.html + '</div>');
466
+
467
+ // Check if it has loaded once before.
468
+ // This is to stop the Embeds.process from throwing and error the first time it's being loaded.
469
+ // private_options are individual to a modaal_scope so will not work across multiple scopes when checking if true, only that one item.
470
+ if ( self.dom.attr('data-igloaded') ) {
471
+ window.instgrm.Embeds.process();
472
+ } else {
473
+ // first time it's loaded, let's set a new private option to use next time it's opened.
474
+ self.dom.attr('data-igloaded', 'true');
475
+ }
476
+
477
+ // now set location for new content
478
+ // timeout is required as well to bypass the unusual small thumb issue instagram oembed was serving up
479
+ var target = '#' + self.scope.id + ' .modaal-content-container';
480
+ if ( $(target).length > 0) {
481
+ setTimeout(function() {
482
+ $('#temp-ig').contents().clone().appendTo( target );
483
+ $('#temp-ig').remove();
484
+ }, 1000);
485
+ }
486
+
487
+ },
488
+ error: function() {
489
+ content = error_msg;
490
+
491
+ // now set location for new content
492
+ var target = $('#' + self.scope.id + ' .modaal-content-container');
493
+ if ( target.length > 0) {
494
+ target.removeClass( self.options.loading_class ).addClass( self.options.ajax_error_class );
495
+ target.html(content);
496
+ }
497
+ }
498
+ });
499
+
500
+ } else {
501
+ content = error_msg;
502
+ }
503
+
504
+ return false;
505
+ },
506
+
507
+ // Fetch Ajax Data
508
+ // ----------------------------------------------------------------
509
+ fetch_ajax : function(url) {
510
+ var self = this;
511
+ var content = '';
512
+
513
+ // If no accessible title, set it to 'Dialog Window'
514
+ if ( self.options.accessible_title == null ) {
515
+ self.options.accessible_title = 'Dialog Window'
516
+ }
517
+
518
+ if ( self.xhr !== null ){
519
+ self.xhr.abort();
520
+ self.xhr = null;
521
+ }
522
+
523
+ self.build_modal('<div class="modaal-content-container' + ( self.options.loading_class != '' ? ' ' + self.options.loading_class : '' ) + '">' + self.options.loading_content + '</div>' );
524
+
525
+ self.xhr = $.ajax(url, {
526
+ success: function(data) {
527
+ // content fetch is successful so push it into markup
528
+ var target = $('#' + self.scope.id).find('.modaal-content-container');
529
+ if ( target.length > 0){
530
+ target.removeClass( self.options.loading_class );
531
+ target.html( data );
532
+
533
+ self.options.ajax_success.call(self, target);
534
+ }
535
+ },
536
+ error: function( xhr ) {
537
+ // There were some errors so return an error message
538
+ if ( xhr.statusText == 'abort' ){
539
+ return;
540
+ }
541
+
542
+ var target = $('#' + self.scope.id + ' .modaal-content-container');
543
+ if ( target.length > 0){
544
+ target.removeClass( self.options.loading_class ).addClass( self.options.ajax_error_class );
545
+ target.html( 'Content could not be loaded. Please check the source and try again.' );
546
+ }
547
+ }
548
+ });
549
+ },
550
+
551
+ // Create Confirm Modal
552
+ // ----------------------------------------------------------------
553
+ create_confirm : function() {
554
+ var self = this;
555
+ var content;
556
+
557
+ content = '<div class="modaal-content-container">' +
558
+ '<h1 id="modaal-title">' + self.options.confirm_title + '</h1>' +
559
+ '<div class="modaal-confirm-content">' + self.options.confirm_content + '</div>' +
560
+ '<div class="modaal-confirm-wrap">' +
561
+ '<button type="button" class="modaal-confirm-btn modaal-ok" aria-label="Confirm">' + self.options.confirm_button_text + '</button>' +
562
+ '<button type="button" class="modaal-confirm-btn modaal-cancel" aria-label="Cancel">' + self.options.confirm_cancel_button_text + '</button>' +
563
+ '</div>' +
564
+ '</div>' +
565
+ '</div>';
566
+
567
+ // now push content into markup
568
+ self.build_modal(content);
569
+ },
570
+
571
+ // Create Image/Gallery Modal
572
+ // ----------------------------------------------------------------
573
+ create_image : function() {
574
+ var self = this;
575
+ var content;
576
+
577
+ var modaal_image_markup = '';
578
+ var gallery_total;
579
+
580
+ // If has group attribute
581
+ if ( self.$elem.is('[data-group]') || self.$elem.is('[rel]') ) {
582
+
583
+ // find gallery groups
584
+ var use_group = self.$elem.is('[data-group]');
585
+ var gallery_group = use_group ? self.$elem.attr('data-group') : self.$elem.attr('rel');
586
+ var gallery_group_items = use_group ? $('[data-group="' + gallery_group + '"]') : $('[rel="' + gallery_group + '"]');
587
+
588
+ // remove any previous active attribute to any in the group
589
+ gallery_group_items.removeAttr('data-gallery-active', 'is_active');
590
+ // add active attribute to the item clicked
591
+ self.$elem.attr('data-gallery-active', 'is_active');
592
+
593
+ // how many in the grouping are there (-1 to connect with each function starting with 0)
594
+ gallery_total = gallery_group_items.length - 1;
595
+
596
+ // prepare array for gallery data
597
+ var gallery = [];
598
+
599
+ // start preparing markup
600
+ modaal_image_markup = '<div class="modaal-gallery-item-wrap">';
601
+
602
+ // loop each grouping item and push it into our gallery array
603
+ gallery_group_items.each(function(i, item) {
604
+ // setup default content
605
+ var img_src = '';
606
+ var img_alt = '';
607
+ var img_description = '';
608
+ var img_active = false;
609
+ var img_src_error = false;
610
+
611
+ var data_modaal_desc = item.getAttribute('data-modaal-desc');
612
+ var data_item_active = item.getAttribute('data-gallery-active');
613
+
614
+ // if item has inline custom source, use that instead of href. Fall back to href if available.
615
+ if ( $(item).attr('data-modaal-content-source') ) {
616
+ img_src = $(item).attr('data-modaal-content-source');
617
+ } else if ( $(item).attr('href') ) {
618
+ img_src = $(item).attr('href');
619
+ } else if ( $(item).attr('src') ) {
620
+ img_src = $(item).attr('src');
621
+ } else {
622
+ img_src = 'trigger requires href or data-modaal-content-source attribute';
623
+ img_src_error = true;
624
+ }
625
+
626
+ // Does it have a modaal description
627
+ if ( data_modaal_desc != '' && data_modaal_desc !== null && data_modaal_desc !== undefined ) {
628
+ img_alt = data_modaal_desc;
629
+ img_description = '<div class="modaal-gallery-label"><span class="modaal-accessible-hide">Image ' + (i+1) + ' - </span>' + data_modaal_desc.replace(/</g, "&lt;").replace(/>/g, "&gt;") + '</div>'
630
+ } else {
631
+ img_description = '<div class="modaal-gallery-label"><span class="modaal-accessible-hide">Image ' + (i+1) + '</span></div>';
632
+ }
633
+
634
+ // is it the active item
635
+ if ( data_item_active ) {
636
+ img_active = true
637
+ }
638
+
639
+ // set new object for values we want
640
+ var gallery_item = {
641
+ 'url': img_src,
642
+ 'alt': img_alt,
643
+ 'rawdesc': data_modaal_desc,
644
+ 'desc': img_description,
645
+ 'active': img_active,
646
+ 'src_error': img_src_error
647
+ };
648
+
649
+ // push object into gallery array
650
+ gallery.push( gallery_item );
651
+ });
652
+
653
+ // now loop through all items in the gallery and build up the markup
654
+ for (var i = 0; i < gallery.length; i++) {
655
+ // Set default active class, then check if array item active is true and update string for class
656
+ var is_active = '';
657
+ var aria_label = gallery[i].rawdesc ? 'Image: ' + gallery[i].rawdesc : 'Image ' + i + ' no description';
658
+
659
+ if ( gallery[i].active ) {
660
+ is_active = ' ' + self.private_options.active_class;
661
+ }
662
+
663
+ // if gallery item has source error, output message rather than undefined image
664
+ var image_output = gallery[i].src_error ? gallery[i].url : '<img src="' + gallery[i].url + '" alt=" " style="width:100%">';
665
+
666
+ // for each item build up the markup
667
+ modaal_image_markup += '<div class="modaal-gallery-item gallery-item-' + i + is_active + '" aria-label="' + aria_label + '">' +
668
+ image_output + gallery[i].desc +
669
+ '</div>';
670
+ }
671
+
672
+ // Close off the markup for the gallery
673
+ modaal_image_markup += '</div>';
674
+
675
+ // Add next and previous buttons if outside
676
+ if (self.options.outer_controls != true) {
677
+ modaal_image_markup += self.scope.prev_btn + self.scope.next_btn;
678
+ }
679
+ } else {
680
+ // This is only a single gallery item so let's grab the necessary values
681
+
682
+ // define the source, check if content_source option exists, and use that or fall back to href.
683
+ var this_img_src;
684
+ var img_src_error = false;
685
+ if ( self.$elem.attr('data-modaal-content-source') ) {
686
+ this_img_src = self.$elem.attr('data-modaal-content-source');
687
+ } else if ( self.$elem.attr('href') ) {
688
+ this_img_src = self.$elem.attr('href');
689
+ } else if ( self.$elem.attr('src') ) {
690
+ this_img_src = self.$elem.attr('src');
691
+ } else {
692
+ this_img_src = 'trigger requires href or data-modaal-content-source attribute';
693
+ img_src_error = true;
694
+ }
695
+
696
+ var this_img_alt_txt = '';
697
+ var this_img_alt = '';
698
+ var aria_label = '';
699
+
700
+ if ( self.$elem.attr('data-modaal-desc') ) {
701
+ aria_label = self.$elem.attr('data-modaal-desc');
702
+ this_img_alt_txt = self.$elem.attr('data-modaal-desc');
703
+ this_img_alt = '<div class="modaal-gallery-label"><span class="modaal-accessible-hide">Image - </span>' + this_img_alt_txt.replace(/</g, "&lt;").replace(/>/g, "&gt;") + '</div>';
704
+ } else {
705
+ aria_label = "Image with no description";
706
+ }
707
+
708
+ // if image item has source error, output message rather than undefined image
709
+ var image_output = img_src_error ? this_img_src : '<img src="' + this_img_src + '" alt=" " style="width:100%">';
710
+
711
+ // build up the html
712
+ modaal_image_markup = '<div class="modaal-gallery-item is_active" aria-label="' + aria_label + '">' +
713
+ image_output + this_img_alt +
714
+ '</div>';
715
+ }
716
+
717
+ // Update content variable
718
+ content = modaal_image_markup;
719
+
720
+ // now push content into markup
721
+ self.build_modal(content);
722
+
723
+ // setup next & prev buttons
724
+ if ( $('.modaal-gallery-item.is_active').is('.gallery-item-0') ) {
725
+ $('.modaal-gallery-prev').hide();
726
+ }
727
+ if ( $('.modaal-gallery-item.is_active').is('.gallery-item-' + gallery_total) ) {
728
+ $('.modaal-gallery-next').hide();
729
+ }
730
+ },
731
+
732
+ // Gallery Change Image
733
+ // ----------------------------------------------------------------
734
+ gallery_update : function(direction) {
735
+ var self = this;
736
+ var this_gallery = $('#' + self.scope.id);
737
+ var this_gallery_item = this_gallery.find('.modaal-gallery-item');
738
+ var this_gallery_total = this_gallery_item.length - 1;
739
+
740
+ // if single item, don't proceed
741
+ if ( this_gallery_total == 0 ) {
742
+ return false;
743
+ }
744
+
745
+ var prev_btn = this_gallery.find('.modaal-gallery-prev'),
746
+ next_btn = this_gallery.find('.modaal-gallery-next');
747
+
748
+ var duration = 250;
749
+
750
+ var new_img_w = 0,
751
+ new_img_h = 0;
752
+
753
+ // CB: Before image change
754
+ var current_item = this_gallery.find( '.modaal-gallery-item.' + self.private_options.active_class ),
755
+ incoming_item = ( direction == 'next' ? current_item.next( '.modaal-gallery-item' ) : current_item.prev( '.modaal-gallery-item' ) );
756
+ self.options.before_image_change.call(self, current_item, incoming_item);
757
+
758
+ // stop change if at start of end
759
+ if ( direction == 'prev' && this_gallery.find('.gallery-item-0').hasClass('is_active') ) {
760
+ return false;
761
+ } else if ( direction == 'next' && this_gallery.find('.gallery-item-' + this_gallery_total).hasClass('is_active') ) {
762
+ return false;
763
+ }
764
+
765
+
766
+ // lock dimensions
767
+ current_item.stop().animate({
768
+ opacity: 0
769
+ }, duration, function(){
770
+ // Move to appropriate image
771
+ incoming_item.addClass('is_next').css({
772
+ 'position': 'absolute',
773
+ 'display': 'block',
774
+ 'opacity': 0
775
+ });
776
+
777
+ // Collect doc width
778
+ var doc_width = $(document).width();
779
+ var width_threshold = doc_width > 1140 ? 280 : 50;
780
+
781
+ // start toggle to 'is_next'
782
+ new_img_w = this_gallery.find('.modaal-gallery-item.is_next').width();
783
+ new_img_h = this_gallery.find('.modaal-gallery-item.is_next').height();
784
+
785
+ var new_natural_w = this_gallery.find('.modaal-gallery-item.is_next img').prop('naturalWidth');
786
+ var new_natural_h = this_gallery.find('.modaal-gallery-item.is_next img').prop('naturalHeight');
787
+
788
+ // if new image is wider than doc width
789
+ if ( new_natural_w > (doc_width - width_threshold) ) {
790
+ // set new width just below doc width
791
+ new_img_w = doc_width - width_threshold;
792
+
793
+ // Set temp widths so we can calulate the correct height;
794
+ this_gallery.find('.modaal-gallery-item.is_next').css({ 'width': new_img_w });
795
+ this_gallery.find('.modaal-gallery-item.is_next img').css({ 'width': new_img_w });
796
+
797
+ // Set new height variable
798
+ new_img_h = this_gallery.find('.modaal-gallery-item.is_next').find('img').height();
799
+ } else {
800
+ // new img is not wider than screen, so let's set the new dimensions
801
+ new_img_w = new_natural_w;
802
+ new_img_h = new_natural_h;
803
+ }
804
+
805
+ // resize gallery region
806
+ this_gallery.find('.modaal-gallery-item-wrap').stop().animate({
807
+ 'width': new_img_w,
808
+ 'height': new_img_h
809
+ }, duration, function() {
810
+ // hide old active image
811
+ current_item.removeClass(self.private_options.active_class + ' ' + self.options.gallery_active_class).removeAttr('style');
812
+ current_item.find('img').removeAttr('style');
813
+
814
+ // show new image
815
+ incoming_item.addClass(self.private_options.active_class + ' ' + self.options.gallery_active_class).removeClass('is_next').css('position','');
816
+
817
+ // animate in new image (now has the normal is_active class
818
+ incoming_item.stop().animate({
819
+ opacity: 1
820
+ }, duration, function(){
821
+ $(this).removeAttr('style').css({
822
+ 'width': '100%'
823
+ });
824
+ $(this).find('img').css('width', '100%');
825
+
826
+ // remove dimension lock
827
+ this_gallery.find('.modaal-gallery-item-wrap').removeAttr('style');
828
+
829
+ // CB: After image change
830
+ self.options.after_image_change.call( self, incoming_item );
831
+ });
832
+
833
+ // Focus on the new gallery item
834
+ this_gallery.find('.modaal-gallery-item').removeAttr('tabindex');
835
+ this_gallery.find('.modaal-gallery-item.' + self.private_options.active_class + '').attr('tabindex', '0').focus();
836
+
837
+ // hide/show next/prev
838
+ if ( this_gallery.find('.modaal-gallery-item.' + self.private_options.active_class).is('.gallery-item-0') ) {
839
+ prev_btn.stop().animate({
840
+ opacity: 0
841
+ }, 150, function(){
842
+ $(this).hide();
843
+ });
844
+ } else {
845
+ prev_btn.stop().css({
846
+ 'display': 'block',
847
+ 'opacity': prev_btn.css('opacity')
848
+ }).animate({
849
+ opacity: 1
850
+ }, 150);
851
+ }
852
+ if ( this_gallery.find('.modaal-gallery-item.' + self.private_options.active_class).is('.gallery-item-' + this_gallery_total) ) {
853
+ next_btn.stop().animate({
854
+ opacity: 0
855
+ }, 150, function(){
856
+ $(this).hide();
857
+ });
858
+ } else {
859
+ next_btn.stop().css({
860
+ 'display': 'block',
861
+ 'opacity': prev_btn.css('opacity')
862
+ }).animate({
863
+ opacity: 1
864
+ }, 150);
865
+ }
866
+ });
867
+ });
868
+ },
869
+
870
+ // Create Video Modal
871
+ // ----------------------------------------------------------------
872
+ create_video : function(url) {
873
+ var self = this;
874
+ var content;
875
+
876
+ // video markup
877
+ content = '<iframe src="' + url + '" class="modaal-video-frame" frameborder="0" allowfullscreen></iframe>';
878
+
879
+ // now push content into markup
880
+ self.build_modal('<div class="modaal-video-container">' + content + '</div>');
881
+ },
882
+
883
+ // Create iFrame Modal
884
+ // ----------------------------------------------------------------
885
+ create_iframe : function(url) {
886
+ var self = this;
887
+ var content;
888
+
889
+ if ( self.options.width !== null || self.options.width !== undefined || self.options.height !== null || self.options.height !== undefined ) {
890
+ // video markup
891
+ content = '<iframe src="' + url + '" class="modaal-iframe-elem" frameborder="0" allowfullscreen></iframe>';
892
+ } else {
893
+ content = '<div class="modaal-content-container">Please specify a width and height for your iframe</div>';
894
+ }
895
+
896
+ // now push content into markup
897
+ self.build_modal(content);
898
+ },
899
+
900
+ // Open Modaal
901
+ // ----------------------------------------------------------------
902
+ modaal_open : function() {
903
+ var self = this;
904
+ var modal_wrapper = $( '#' + self.scope.id );
905
+ var animation_type = self.options.animation;
906
+
907
+ if (animation_type === 'none' ){
908
+ modal_wrapper.removeClass('modaal-start_none');
909
+ self.options.after_open.call(self, modal_wrapper);
910
+ }
911
+
912
+ // Open with fade
913
+ if (animation_type === 'fade') {
914
+ modal_wrapper.removeClass('modaal-start_fade');
915
+ }
916
+
917
+ // Open with slide down
918
+ if (animation_type === 'slide-down') {
919
+ modal_wrapper.removeClass('modaal-start_slide_down');
920
+ }
921
+
922
+ var focusTarget = modal_wrapper;
923
+
924
+ // Switch focusTarget tabindex (switch from other modal if exists)
925
+ $('.modaal-wrapper *[tabindex=0]').removeAttr('tabindex');
926
+
927
+ if ( self.options.type == 'image' ) {
928
+ focusTarget = $('#' + self.scope.id).find('.modaal-gallery-item.' + self.private_options.active_class);
929
+
930
+ } else if ( modal_wrapper.find('.modaal-iframe-elem').length ) {
931
+ focusTarget = modal_wrapper.find('.modaal-iframe-elem');
932
+
933
+ } else if ( modal_wrapper.find('.modaal-video-wrap').length ) {
934
+ focusTarget = modal_wrapper.find('.modaal-video-wrap');
935
+
936
+ } else {
937
+ focusTarget = modal_wrapper.find('.modaal-focus');
938
+
939
+ }
940
+
941
+ // now set the focus
942
+ focusTarget.attr('tabindex', '0').focus();
943
+
944
+ // Run after_open
945
+ if (animation_type !== 'none') {
946
+ // CB: after_open
947
+ setTimeout(function() {
948
+ self.options.after_open.call(self, modal_wrapper)
949
+ }, self.options.after_callback_delay);
950
+ }
951
+ },
952
+
953
+ // Close Modal
954
+ // ----------------------------------------------------------------
955
+ modaal_close : function() {
956
+ var self = this;
957
+ var modal_wrapper = $( '#' + self.scope.id );
958
+
959
+ // CB: before_close
960
+ self.options.before_close.call(self, modal_wrapper);
961
+
962
+ if (self.xhr !== null){
963
+ self.xhr.abort();
964
+ self.xhr = null;
965
+ }
966
+
967
+ // Now we close the modal
968
+ if (self.options.animation === 'none' ){
969
+ modal_wrapper.addClass('modaal-start_none');
970
+ }
971
+
972
+ // Close with fade
973
+ if (self.options.animation === 'fade') {
974
+ modal_wrapper.addClass('modaal-start_fade');
975
+ }
976
+
977
+ // Close with slide up (using initial slide down)
978
+ if (self.options.animation === 'slide-down') {
979
+ modal_wrapper.addClass('modaal-start_slide_down');
980
+ }
981
+
982
+ // CB: after_close and remove
983
+ setTimeout(function() {
984
+ // clone inline content back to origin place
985
+ if (self.options.type == 'inline') {
986
+ $('#' + self.scope.id + ' .modaal-content-container').contents().detach().appendTo( self.scope.source )
987
+ }
988
+ // remove markup from dom
989
+ modal_wrapper.remove();
990
+ // CB: after_close
991
+ self.options.after_close.call(self);
992
+ // scope is now closed
993
+ self.scope.is_open = false;
994
+
995
+ }, self.options.after_callback_delay);
996
+
997
+ // Call overlay hide
998
+ self.modaal_overlay('hide');
999
+
1000
+ // Roll back to last focus state before modal open. If was closed programmatically, this might not be set
1001
+ if (self.lastFocus != null) {
1002
+ self.lastFocus.focus();
1003
+ }
1004
+ },
1005
+
1006
+ // Overlay control (accepts action for show or hide)
1007
+ // ----------------------------------------------------------------
1008
+ modaal_overlay : function(action) {
1009
+ var self = this;
1010
+
1011
+ if (action == 'show') {
1012
+ // Modal is open so update scope
1013
+ self.scope.is_open = true;
1014
+
1015
+ // set body to overflow hidden if background_scroll is false
1016
+ if (! self.options.background_scroll) {
1017
+ self.dom.addClass('modaal-noscroll');
1018
+ }
1019
+
1020
+ // append modaal overlay
1021
+ if ($('#' + self.scope.id + '_overlay').length < 1) {
1022
+ self.dom.append('<div class="modaal-overlay" id="' + self.scope.id + '_overlay"></div>');
1023
+ }
1024
+
1025
+ // now show
1026
+ $('#' + self.scope.id + '_overlay').css('background', self.options.background).stop().animate({
1027
+ opacity: self.options.overlay_opacity
1028
+ }, self.options.animation_speed, function(){
1029
+ // now open the modal
1030
+ self.modaal_open();
1031
+ });
1032
+
1033
+ } else if (action == 'hide') {
1034
+
1035
+ // now hide the overlay
1036
+ $('#' + self.scope.id + '_overlay').stop().animate({
1037
+ opacity: 0
1038
+ }, self.options.animation_speed, function(){
1039
+ // remove overlay from dom
1040
+ $(this).remove();
1041
+
1042
+ // remove body overflow lock
1043
+ self.dom.removeClass('modaal-noscroll');
1044
+ });
1045
+ }
1046
+ },
1047
+
1048
+ // Check if is touch
1049
+ // ----------------------------------------------------------------
1050
+ is_touch : function() {
1051
+ return 'ontouchstart' in window || navigator.maxTouchPoints;
1052
+ }
1053
+ };
1054
+
1055
+ // Define default object to store
1056
+ var modaal_existing_selectors = [];
1057
+
1058
+ // Declare the modaal jQuery method
1059
+ // ------------------------------------------------------------
1060
+ $.fn.modaal = function(options) {
1061
+ return this.each(function (i) {
1062
+ var existing_modaal = $(this).data('modaal');
1063
+
1064
+ if ( existing_modaal ){
1065
+ // Checking for string value, used for methods
1066
+ if (typeof(options) == 'string'){
1067
+ switch (options) {
1068
+ case 'open':
1069
+ // create the modal
1070
+ existing_modaal.create_modaal(existing_modaal);
1071
+ break;
1072
+ case 'close':
1073
+ existing_modaal.modaal_close();
1074
+ break;
1075
+ }
1076
+ }
1077
+ } else {
1078
+ // Not a string, so let's setup the modal ready to use
1079
+ var modaal = Object.create(Modaal);
1080
+ modaal.init(options, this);
1081
+ $.data(this, "modaal", modaal);
1082
+
1083
+ // push this select into existing selectors array which is referenced during modaal_dom_observer
1084
+ modaal_existing_selectors.push({
1085
+ 'element': $(this).attr('class'),
1086
+ 'options': options
1087
+ });
1088
+ }
1089
+ });
1090
+ };
1091
+
1092
+ // Default options
1093
+ // ------------------------------------------------------------
1094
+ $.fn.modaal.options = {
1095
+
1096
+ //General
1097
+ type: 'inline',
1098
+ content_source: null,
1099
+ animation: 'fade',
1100
+ animation_speed: 300,
1101
+ after_callback_delay: 350,
1102
+ is_locked: false,
1103
+ hide_close: false,
1104
+ background: '#000',
1105
+ overlay_opacity: '0.8',
1106
+ overlay_close: true,
1107
+ accessible_title: 'Dialog Window',
1108
+ start_open: false,
1109
+ fullscreen: false,
1110
+ custom_class: '',
1111
+ background_scroll: false,
1112
+ should_open: true,
1113
+ close_text: 'Close',
1114
+ close_aria_label: 'Close (Press escape to close)',
1115
+ width: null,
1116
+ height: null,
1117
+
1118
+ //Events
1119
+ before_open: function(){},
1120
+ after_open: function(){},
1121
+ before_close: function(){},
1122
+ after_close: function(){},
1123
+ source: function( element, src ){
1124
+ return src;
1125
+ },
1126
+
1127
+ //Confirm Modal
1128
+ confirm_button_text: 'Confirm', // text on confirm button
1129
+ confirm_cancel_button_text: 'Cancel',
1130
+ confirm_title: 'Confirm Title', // title for confirm modal
1131
+ confirm_content: '<p>This is the default confirm dialog content. Replace me through the options</p>', // html for confirm message
1132
+ confirm_callback: function() {},
1133
+ confirm_cancel_callback: function() {},
1134
+
1135
+
1136
+ //Gallery Modal
1137
+ gallery_active_class: 'gallery_active_item',
1138
+ outer_controls: false,
1139
+ before_image_change: function( current_item, incoming_item ) {},
1140
+ after_image_change: function( current_item ) {},
1141
+
1142
+ //Ajax Modal
1143
+ loading_content: modaal_loading_spinner,
1144
+ loading_class: 'is_loading',
1145
+ ajax_error_class: 'modaal-error',
1146
+ ajax_success: function(){},
1147
+
1148
+ //Instagram
1149
+ instagram_id: null
1150
+ };
1151
+
1152
+ // Check and Set Inline Options
1153
+ // ------------------------------------------------------------
1154
+ function modaal_inline_options(self) {
1155
+
1156
+ // new empty options
1157
+ var options = {};
1158
+ var inline_options = false;
1159
+
1160
+ // option: type
1161
+ if ( self.attr('data-modaal-type') ) {
1162
+ inline_options = true;
1163
+ options.type = self.attr('data-modaal-type');
1164
+ }
1165
+
1166
+ // option: type
1167
+ if ( self.attr('data-modaal-content-source') ) {
1168
+ inline_options = true;
1169
+ options.content_source = self.attr('data-modaal-content-source');
1170
+ }
1171
+
1172
+ // option: animation
1173
+ if ( self.attr('data-modaal-animation') ) {
1174
+ inline_options = true;
1175
+ options.animation = self.attr('data-modaal-animation');
1176
+ }
1177
+
1178
+ // option: animation_speed
1179
+ if ( self.attr('data-modaal-animation-speed') ) {
1180
+ inline_options = true;
1181
+ options.animation_speed = self.attr('data-modaal-animation-speed');
1182
+ }
1183
+
1184
+ // option: after_callback_delay
1185
+ if ( self.attr('data-modaal-after-callback-delay') ) {
1186
+ inline_options = true;
1187
+ options.after_callback_delay = self.attr('data-modaal-after-callback-delay');
1188
+ }
1189
+
1190
+ // option: is_locked
1191
+ if ( self.attr('data-modaal-is-locked') ) {
1192
+ inline_options = true;
1193
+ options.is_locked = (self.attr('data-modaal-is-locked') === 'true' ? true : false);
1194
+ }
1195
+
1196
+ // option: hide_close
1197
+ if ( self.attr('data-modaal-hide-close') ) {
1198
+ inline_options = true;
1199
+ options.hide_close = (self.attr('data-modaal-hide-close') === 'true' ? true : false);
1200
+ }
1201
+
1202
+ // option: background
1203
+ if ( self.attr('data-modaal-background') ) {
1204
+ inline_options = true;
1205
+ options.background = self.attr('data-modaal-background');
1206
+ }
1207
+
1208
+ // option: overlay_opacity
1209
+ if ( self.attr('data-modaal-overlay-opacity') ) {
1210
+ inline_options = true;
1211
+ options.overlay_opacity = self.attr('data-modaal-overlay-opacity');
1212
+ }
1213
+
1214
+ // option: overlay_close
1215
+ if ( self.attr('data-modaal-overlay-close') ) {
1216
+ inline_options = true;
1217
+ options.overlay_close = (self.attr('data-modaal-overlay-close') === 'false' ? false : true);
1218
+ }
1219
+
1220
+ // option: accessible_title
1221
+ if ( self.attr('data-modaal-accessible-title') ) {
1222
+ inline_options = true;
1223
+ options.accessible_title = self.attr('data-modaal-accessible-title');
1224
+ }
1225
+
1226
+ // option: start_open
1227
+ if ( self.attr('data-modaal-start-open') ) {
1228
+ inline_options = true;
1229
+ options.start_open = (self.attr('data-modaal-start-open') === 'true' ? true : false);
1230
+ }
1231
+
1232
+ // option: fullscreen
1233
+ if ( self.attr('data-modaal-fullscreen') ) {
1234
+ inline_options = true;
1235
+ options.fullscreen = (self.attr('data-modaal-fullscreen') === 'true' ? true : false);
1236
+ }
1237
+
1238
+ // option: custom_class
1239
+ if ( self.attr('data-modaal-custom-class') ) {
1240
+ inline_options = true;
1241
+ options.custom_class = self.attr('data-modaal-custom-class');
1242
+ }
1243
+
1244
+ // option: close_text
1245
+ if ( self.attr('data-modaal-close-text') ) {
1246
+ inline_options = true;
1247
+ options.close_text = self.attr('data-modaal-close-text');
1248
+ }
1249
+
1250
+ // option: close_aria_label
1251
+ if ( self.attr('data-modaal-close-aria-label') ) {
1252
+ inline_options = true;
1253
+ options.close_aria_label = self.attr('data-modaal-close-aria-label');
1254
+ }
1255
+
1256
+ // option: background_scroll
1257
+ if ( self.attr('data-modaal-background-scroll') ) {
1258
+ inline_options = true;
1259
+ options.background_scroll = (self.attr('data-modaal-background-scroll') === 'true' ? true : false);
1260
+ }
1261
+
1262
+ // option: width
1263
+ if ( self.attr('data-modaal-width') ) {
1264
+ inline_options = true;
1265
+ options.width = parseInt( self.attr('data-modaal-width') );
1266
+ }
1267
+
1268
+ // option: height
1269
+ if ( self.attr('data-modaal-height') ) {
1270
+ inline_options = true;
1271
+ options.height = parseInt( self.attr('data-modaal-height') );
1272
+ }
1273
+
1274
+ // option: confirm_button_text
1275
+ if ( self.attr('data-modaal-confirm-button-text') ) {
1276
+ inline_options = true;
1277
+ options.confirm_button_text = self.attr('data-modaal-confirm-button-text');
1278
+ }
1279
+
1280
+ // option: confirm_cancel_button_text
1281
+ if ( self.attr('data-modaal-confirm-cancel-button-text') ) {
1282
+ inline_options = true;
1283
+ options.confirm_cancel_button_text = self.attr('data-modaal-confirm-cancel-button-text');
1284
+ }
1285
+
1286
+ // option: confirm_title
1287
+ if ( self.attr('data-modaal-confirm-title') ) {
1288
+ inline_options = true;
1289
+ options.confirm_title = self.attr('data-modaal-confirm-title');
1290
+ }
1291
+
1292
+ // option: confirm_content
1293
+ if ( self.attr('data-modaal-confirm-content') ) {
1294
+ inline_options = true;
1295
+ options.confirm_content = self.attr('data-modaal-confirm-content');
1296
+ }
1297
+
1298
+ // option: gallery_active_class
1299
+ if ( self.attr('data-modaal-gallery-active-class') ) {
1300
+ inline_options = true;
1301
+ options.gallery_active_class = self.attr('data-modaal-gallery-active-class');
1302
+ }
1303
+
1304
+ // option: loading_content
1305
+ if ( self.attr('data-modaal-loading-content') ) {
1306
+ inline_options = true;
1307
+ options.loading_content = self.attr('data-modaal-loading-content');
1308
+ }
1309
+
1310
+ // option: loading_class
1311
+ if ( self.attr('data-modaal-loading-class') ) {
1312
+ inline_options = true;
1313
+ options.loading_class = self.attr('data-modaal-loading-class');
1314
+ }
1315
+
1316
+ // option: ajax_error_class
1317
+ if ( self.attr('data-modaal-ajax-error-class') ) {
1318
+ inline_options = true;
1319
+ options.ajax_error_class = self.attr('data-modaal-ajax-error-class');
1320
+ }
1321
+
1322
+ // option: start_open
1323
+ if ( self.attr('data-modaal-instagram-id') ) {
1324
+ inline_options = true;
1325
+ options.instagram_id = self.attr('data-modaal-instagram-id');
1326
+ }
1327
+
1328
+ // now set it up for the trigger, but only if inline_options is true
1329
+ if ( inline_options ) {
1330
+ self.modaal(options);
1331
+ }
1332
+ };
1333
+
1334
+ // On body load (or now, if already loaded), init any modaals defined inline
1335
+ // Ensure this is done after $.fn.modaal and default options are declared
1336
+ // ----------------------------------------------------------------
1337
+ $(function(){
1338
+
1339
+ var single_modaal = $('.modaal');
1340
+
1341
+ // Check for existing modaal elements
1342
+ if ( single_modaal.length ) {
1343
+ single_modaal.each(function() {
1344
+ var self = $(this);
1345
+ modaal_inline_options(self);
1346
+ });
1347
+ }
1348
+
1349
+ // Obvserve DOM mutations for newly added triggers
1350
+ var modaal_dom_observer = new MutationObserver(function(mutations) {
1351
+ mutations.forEach(function(mutation) {
1352
+ if (mutation.addedNodes && mutation.addedNodes.length > 0) {
1353
+ // element added to DOM
1354
+ var findElement = [].some.call(mutation.addedNodes, function(el) {
1355
+ var elm = $(el);
1356
+ if ( elm.is('a') || elm.is('button') ) {
1357
+
1358
+ if ( elm.hasClass('modaal') ) {
1359
+ // is inline Modaal, initialise options
1360
+ modaal_inline_options(elm);
1361
+ } else {
1362
+ // is not inline modaal. Check for existing selector
1363
+ modaal_existing_selectors.forEach(function(modaalSelector) {
1364
+ if ( modaalSelector.element == elm.attr('class') ) {
1365
+ $(elm).modaal( modaalSelector.options );
1366
+ return false;
1367
+ }
1368
+ });
1369
+ }
1370
+
1371
+ }
1372
+ });
1373
+ }
1374
+ });
1375
+ });
1376
+ var observer_config = {
1377
+ subtree: true,
1378
+ attributes: true,
1379
+ childList: true,
1380
+ characterData: true
1381
+ };
1382
+
1383
+ // pass in the target node, as well as the observer options
1384
+ setTimeout(function() {
1385
+ modaal_dom_observer.observe(document.body, observer_config);
1386
+ }, 500);
1387
+
1388
+ });
1389
+
1390
+ } ( jQuery, window, document ) );
assets/modaal/js/modaal.min.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /*!
2
+ Modaal - accessible modals - v0.4.4
3
+ by Humaan, for all humans.
4
+ http://humaan.com
5
+ */
6
+ !function(a){function t(a){var t={},o=!1;a.attr("data-modaal-type")&&(o=!0,t.type=a.attr("data-modaal-type")),a.attr("data-modaal-content-source")&&(o=!0,t.content_source=a.attr("data-modaal-content-source")),a.attr("data-modaal-animation")&&(o=!0,t.animation=a.attr("data-modaal-animation")),a.attr("data-modaal-animation-speed")&&(o=!0,t.animation_speed=a.attr("data-modaal-animation-speed")),a.attr("data-modaal-after-callback-delay")&&(o=!0,t.after_callback_delay=a.attr("data-modaal-after-callback-delay")),a.attr("data-modaal-is-locked")&&(o=!0,t.is_locked="true"===a.attr("data-modaal-is-locked")),a.attr("data-modaal-hide-close")&&(o=!0,t.hide_close="true"===a.attr("data-modaal-hide-close")),a.attr("data-modaal-background")&&(o=!0,t.background=a.attr("data-modaal-background")),a.attr("data-modaal-overlay-opacity")&&(o=!0,t.overlay_opacity=a.attr("data-modaal-overlay-opacity")),a.attr("data-modaal-overlay-close")&&(o=!0,t.overlay_close="false"!==a.attr("data-modaal-overlay-close")),a.attr("data-modaal-accessible-title")&&(o=!0,t.accessible_title=a.attr("data-modaal-accessible-title")),a.attr("data-modaal-start-open")&&(o=!0,t.start_open="true"===a.attr("data-modaal-start-open")),a.attr("data-modaal-fullscreen")&&(o=!0,t.fullscreen="true"===a.attr("data-modaal-fullscreen")),a.attr("data-modaal-custom-class")&&(o=!0,t.custom_class=a.attr("data-modaal-custom-class")),a.attr("data-modaal-close-text")&&(o=!0,t.close_text=a.attr("data-modaal-close-text")),a.attr("data-modaal-close-aria-label")&&(o=!0,t.close_aria_label=a.attr("data-modaal-close-aria-label")),a.attr("data-modaal-background-scroll")&&(o=!0,t.background_scroll="true"===a.attr("data-modaal-background-scroll")),a.attr("data-modaal-width")&&(o=!0,t.width=parseInt(a.attr("data-modaal-width"))),a.attr("data-modaal-height")&&(o=!0,t.height=parseInt(a.attr("data-modaal-height"))),a.attr("data-modaal-confirm-button-text")&&(o=!0,t.confirm_button_text=a.attr("data-modaal-confirm-button-text")),a.attr("data-modaal-confirm-cancel-button-text")&&(o=!0,t.confirm_cancel_button_text=a.attr("data-modaal-confirm-cancel-button-text")),a.attr("data-modaal-confirm-title")&&(o=!0,t.confirm_title=a.attr("data-modaal-confirm-title")),a.attr("data-modaal-confirm-content")&&(o=!0,t.confirm_content=a.attr("data-modaal-confirm-content")),a.attr("data-modaal-gallery-active-class")&&(o=!0,t.gallery_active_class=a.attr("data-modaal-gallery-active-class")),a.attr("data-modaal-loading-content")&&(o=!0,t.loading_content=a.attr("data-modaal-loading-content")),a.attr("data-modaal-loading-class")&&(o=!0,t.loading_class=a.attr("data-modaal-loading-class")),a.attr("data-modaal-ajax-error-class")&&(o=!0,t.ajax_error_class=a.attr("data-modaal-ajax-error-class")),a.attr("data-modaal-instagram-id")&&(o=!0,t.instagram_id=a.attr("data-modaal-instagram-id")),o&&a.modaal(t)}var o={init:function(t,o){var e=this;if(e.dom=a("body"),e.$elem=a(o),e.options=a.extend({},a.fn.modaal.options,e.$elem.data(),t),e.xhr=null,e.scope={is_open:!1,id:"modaal_"+(new Date).getTime()+Math.random().toString(16).substring(2),source:e.options.content_source?e.options.content_source:e.$elem.attr("href")},e.$elem.attr("data-modaal-scope",e.scope.id),e.private_options={active_class:"is_active"},e.lastFocus=null,e.options.is_locked||"confirm"==e.options.type||e.options.hide_close?e.scope.close_btn="":e.scope.close_btn='<button type="button" class="modaal-close" id="modaal-close" aria-label="'+e.options.close_aria_label+'"><span>'+e.options.close_text+"</span></button>","none"===e.options.animation&&(e.options.animation_speed=0,e.options.after_callback_delay=0),a(o).on("click.Modaal",function(a){a.preventDefault(),e.create_modaal(e,a)}),!0===e.options.outer_controls)var i="outer";else var i="inner";e.scope.prev_btn='<button type="button" class="modaal-gallery-control modaal-gallery-prev modaal-gallery-prev-'+i+'" id="modaal-gallery-prev" aria-label="Previous image (use left arrow to change)"><span>Previous Image</span></button>',e.scope.next_btn='<button type="button" class="modaal-gallery-control modaal-gallery-next modaal-gallery-next-'+i+'" id="modaal-gallery-next" aria-label="Next image (use right arrow to change)"><span>Next Image</span></button>',!0===e.options.start_open&&e.create_modaal(e)},create_modaal:function(a,t){var o,a=this;if(a.lastFocus=a.$elem,!1!==a.options.should_open&&("function"!=typeof a.options.should_open||!1!==a.options.should_open())){switch(a.options.before_open.call(a,t),a.options.type){case"inline":a.create_basic();break;case"ajax":o=a.options.source(a.$elem,a.scope.source),a.fetch_ajax(o);break;case"confirm":a.options.is_locked=!0,a.create_confirm();break;case"image":a.create_image();break;case"iframe":o=a.options.source(a.$elem,a.scope.source),a.create_iframe(o);break;case"video":a.create_video(a.scope.source);break;case"instagram":a.create_instagram()}a.watch_events()}},watch_events:function(){var t=this;t.dom.off("click.Modaal keyup.Modaal keydown.Modaal"),t.dom.on("keydown.Modaal",function(o){var e=o.keyCode,i=o.target;9==e&&t.scope.is_open&&(a.contains(document.getElementById(t.scope.id),i)||a("#"+t.scope.id).find('*[tabindex="0"]').focus())}),t.dom.on("keyup.Modaal",function(o){var e=o.keyCode,i=o.target;return o.shiftKey&&9==o.keyCode&&t.scope.is_open&&(a.contains(document.getElementById(t.scope.id),i)||a("#"+t.scope.id).find(".modaal-close").focus()),!t.options.is_locked&&27==e&&t.scope.is_open?!a(document.activeElement).is("input:not(:checkbox):not(:radio)")&&void t.modaal_close():"image"==t.options.type?(37==e&&t.scope.is_open&&!a("#"+t.scope.id+" .modaal-gallery-prev").hasClass("is_hidden")&&t.gallery_update("prev"),void(39==e&&t.scope.is_open&&!a("#"+t.scope.id+" .modaal-gallery-next").hasClass("is_hidden")&&t.gallery_update("next"))):void 0}),t.dom.on("click.Modaal",function(o){var e=a(o.target);if(!t.options.is_locked&&(t.options.overlay_close&&e.is(".modaal-inner-wrapper")||e.is(".modaal-close")||e.closest(".modaal-close").length))return void t.modaal_close();if(e.is(".modaal-confirm-btn"))return e.is(".modaal-ok")&&t.options.confirm_callback.call(t,t.lastFocus),e.is(".modaal-cancel")&&t.options.confirm_cancel_callback.call(t,t.lastFocus),void t.modaal_close();if(e.is(".modaal-gallery-control")){if(e.hasClass("is_hidden"))return;return e.is(".modaal-gallery-prev")&&t.gallery_update("prev"),void(e.is(".modaal-gallery-next")&&t.gallery_update("next"))}})},build_modal:function(t){var o=this,e="";"instagram"==o.options.type&&(e=" modaal-instagram");var i,l="video"==o.options.type?"modaal-video-wrap":"modaal-content";switch(o.options.animation){case"fade":i=" modaal-start_fade";break;case"slide-down":i=" modaal-start_slidedown";break;default:i=" modaal-start_none"}var n="";o.options.fullscreen&&(n=" modaal-fullscreen"),""===o.options.custom_class&&void 0===o.options.custom_class||(o.options.custom_class=" "+o.options.custom_class);var s="";o.options.width&&o.options.height&&"number"==typeof o.options.width&&"number"==typeof o.options.height?s=' style="max-width:'+o.options.width+"px;height:"+o.options.height+'px;overflow:auto;"':o.options.width&&"number"==typeof o.options.width?s=' style="max-width:'+o.options.width+'px;"':o.options.height&&"number"==typeof o.options.height&&(s=' style="height:'+o.options.height+'px;overflow:auto;"'),("image"==o.options.type||"video"==o.options.type||"instagram"==o.options.type||o.options.fullscreen)&&(s="");var d="";o.is_touch()&&(d=' style="cursor:pointer;"');var r='<div class="modaal-wrapper modaal-'+o.options.type+i+e+n+o.options.custom_class+'" id="'+o.scope.id+'"><div class="modaal-outer-wrapper"><div class="modaal-inner-wrapper"'+d+">";"video"!=o.options.type&&(r+='<div class="modaal-container"'+s+">"),r+='<div class="'+l+' modaal-focus" aria-hidden="false" aria-label="'+o.options.accessible_title+" - "+o.options.close_aria_label+'" role="dialog">',"inline"==o.options.type?r+='<div class="modaal-content-container" role="document"></div>':r+=t,r+="</div>"+o.scope.close_btn,"video"!=o.options.type&&(r+="</div>"),r+="</div>","image"==o.options.type&&!0===o.options.outer_controls&&(r+=o.scope.prev_btn+o.scope.next_btn),r+="</div></div>",a("#"+o.scope.id+"_overlay").length<1&&o.dom.append(r),"inline"==o.options.type&&t.appendTo("#"+o.scope.id+" .modaal-content-container"),o.modaal_overlay("show")},create_basic:function(){var t=this,o=a(t.scope.source),e="";o.length?(e=o.contents().detach(),o.empty()):e="Content could not be loaded. Please check the source and try again.",t.build_modal(e)},create_instagram:function(){var t=this,o=t.options.instagram_id,e="",i="Instagram photo couldn't be loaded, please check the embed code and try again.";if(t.build_modal('<div class="modaal-content-container'+(""!=t.options.loading_class?" "+t.options.loading_class:"")+'">'+t.options.loading_content+"</div>"),""!=o&&null!==o&&void 0!==o){var l="https://api.instagram.com/oembed?url=http://instagr.am/p/"+o+"/";a.ajax({url:l,dataType:"jsonp",cache:!1,success:function(o){t.dom.append('<div id="temp-ig" style="width:0;height:0;overflow:hidden;">'+o.html+"</div>"),t.dom.attr("data-igloaded")?window.instgrm.Embeds.process():t.dom.attr("data-igloaded","true");var e="#"+t.scope.id+" .modaal-content-container";a(e).length>0&&setTimeout(function(){a("#temp-ig").contents().clone().appendTo(e),a("#temp-ig").remove()},1e3)},error:function(){e=i;var o=a("#"+t.scope.id+" .modaal-content-container");o.length>0&&(o.removeClass(t.options.loading_class).addClass(t.options.ajax_error_class),o.html(e))}})}else e=i;return!1},fetch_ajax:function(t){var o=this;null==o.options.accessible_title&&(o.options.accessible_title="Dialog Window"),null!==o.xhr&&(o.xhr.abort(),o.xhr=null),o.build_modal('<div class="modaal-content-container'+(""!=o.options.loading_class?" "+o.options.loading_class:"")+'">'+o.options.loading_content+"</div>"),o.xhr=a.ajax(t,{success:function(t){var e=a("#"+o.scope.id).find(".modaal-content-container");e.length>0&&(e.removeClass(o.options.loading_class),e.html(t),o.options.ajax_success.call(o,e))},error:function(t){if("abort"!=t.statusText){var e=a("#"+o.scope.id+" .modaal-content-container");e.length>0&&(e.removeClass(o.options.loading_class).addClass(o.options.ajax_error_class),e.html("Content could not be loaded. Please check the source and try again."))}}})},create_confirm:function(){var a,t=this;a='<div class="modaal-content-container"><h1 id="modaal-title">'+t.options.confirm_title+'</h1><div class="modaal-confirm-content">'+t.options.confirm_content+'</div><div class="modaal-confirm-wrap"><button type="button" class="modaal-confirm-btn modaal-ok" aria-label="Confirm">'+t.options.confirm_button_text+'</button><button type="button" class="modaal-confirm-btn modaal-cancel" aria-label="Cancel">'+t.options.confirm_cancel_button_text+"</button></div></div></div>",t.build_modal(a)},create_image:function(){var t,o,e=this,i="";if(e.$elem.is("[data-group]")||e.$elem.is("[rel]")){var l=e.$elem.is("[data-group]"),n=l?e.$elem.attr("data-group"):e.$elem.attr("rel"),s=a(l?'[data-group="'+n+'"]':'[rel="'+n+'"]');s.removeAttr("data-gallery-active","is_active"),e.$elem.attr("data-gallery-active","is_active"),o=s.length-1;var d=[];i='<div class="modaal-gallery-item-wrap">',s.each(function(t,o){var e="",i="",l="",n=!1,s=!1,r=o.getAttribute("data-modaal-desc"),c=o.getAttribute("data-gallery-active");a(o).attr("data-modaal-content-source")?e=a(o).attr("data-modaal-content-source"):a(o).attr("href")?e=a(o).attr("href"):a(o).attr("src")?e=a(o).attr("src"):(e="trigger requires href or data-modaal-content-source attribute",s=!0),""!=r&&null!==r&&void 0!==r?(i=r,l='<div class="modaal-gallery-label"><span class="modaal-accessible-hide">Image '+(t+1)+" - </span>"+r.replace(/</g,"&lt;").replace(/>/g,"&gt;")+"</div>"):l='<div class="modaal-gallery-label"><span class="modaal-accessible-hide">Image '+(t+1)+"</span></div>",c&&(n=!0);var m={url:e,alt:i,rawdesc:r,desc:l,active:n,src_error:s};d.push(m)});for(var r=0;r<d.length;r++){var c="",m=d[r].rawdesc?"Image: "+d[r].rawdesc:"Image "+r+" no description";d[r].active&&(c=" "+e.private_options.active_class);var p=d[r].src_error?d[r].url:'<img src="'+d[r].url+'" alt=" " style="width:100%">';i+='<div class="modaal-gallery-item gallery-item-'+r+c+'" aria-label="'+m+'">'+p+d[r].desc+"</div>"}i+="</div>",1!=e.options.outer_controls&&(i+=e.scope.prev_btn+e.scope.next_btn)}else{var u,_=!1;e.$elem.attr("data-modaal-content-source")?u=e.$elem.attr("data-modaal-content-source"):e.$elem.attr("href")?u=e.$elem.attr("href"):e.$elem.attr("src")?u=e.$elem.attr("src"):(u="trigger requires href or data-modaal-content-source attribute",_=!0);var v="",f="",m="";e.$elem.attr("data-modaal-desc")?(m=e.$elem.attr("data-modaal-desc"),v=e.$elem.attr("data-modaal-desc"),f='<div class="modaal-gallery-label"><span class="modaal-accessible-hide">Image - </span>'+v.replace(/</g,"&lt;").replace(/>/g,"&gt;")+"</div>"):m="Image with no description";var p=_?u:'<img src="'+u+'" alt=" " style="width:100%">';i='<div class="modaal-gallery-item is_active" aria-label="'+m+'">'+p+f+"</div>"}t=i,e.build_modal(t),a(".modaal-gallery-item.is_active").is(".gallery-item-0")&&a(".modaal-gallery-prev").hide(),a(".modaal-gallery-item.is_active").is(".gallery-item-"+o)&&a(".modaal-gallery-next").hide()},gallery_update:function(t){var o=this,e=a("#"+o.scope.id),i=e.find(".modaal-gallery-item"),l=i.length-1;if(0==l)return!1;var n=e.find(".modaal-gallery-prev"),s=e.find(".modaal-gallery-next"),d=0,r=0,c=e.find(".modaal-gallery-item."+o.private_options.active_class),m="next"==t?c.next(".modaal-gallery-item"):c.prev(".modaal-gallery-item");return o.options.before_image_change.call(o,c,m),("prev"!=t||!e.find(".gallery-item-0").hasClass("is_active"))&&(("next"!=t||!e.find(".gallery-item-"+l).hasClass("is_active"))&&void c.stop().animate({opacity:0},250,function(){m.addClass("is_next").css({position:"absolute",display:"block",opacity:0});var t=a(document).width(),i=t>1140?280:50;d=e.find(".modaal-gallery-item.is_next").width(),r=e.find(".modaal-gallery-item.is_next").height();var p=e.find(".modaal-gallery-item.is_next img").prop("naturalWidth"),u=e.find(".modaal-gallery-item.is_next img").prop("naturalHeight");p>t-i?(d=t-i,e.find(".modaal-gallery-item.is_next").css({width:d}),e.find(".modaal-gallery-item.is_next img").css({width:d}),r=e.find(".modaal-gallery-item.is_next").find("img").height()):(d=p,r=u),e.find(".modaal-gallery-item-wrap").stop().animate({width:d,height:r},250,function(){c.removeClass(o.private_options.active_class+" "+o.options.gallery_active_class).removeAttr("style"),c.find("img").removeAttr("style"),m.addClass(o.private_options.active_class+" "+o.options.gallery_active_class).removeClass("is_next").css("position",""),m.stop().animate({opacity:1},250,function(){a(this).removeAttr("style").css({width:"100%"}),a(this).find("img").css("width","100%"),e.find(".modaal-gallery-item-wrap").removeAttr("style"),o.options.after_image_change.call(o,m)}),e.find(".modaal-gallery-item").removeAttr("tabindex"),e.find(".modaal-gallery-item."+o.private_options.active_class).attr("tabindex","0").focus(),e.find(".modaal-gallery-item."+o.private_options.active_class).is(".gallery-item-0")?n.stop().animate({opacity:0},150,function(){a(this).hide()}):n.stop().css({display:"block",opacity:n.css("opacity")}).animate({opacity:1},150),e.find(".modaal-gallery-item."+o.private_options.active_class).is(".gallery-item-"+l)?s.stop().animate({opacity:0},150,function(){a(this).hide()}):s.stop().css({display:"block",opacity:n.css("opacity")}).animate({opacity:1},150)})}))},create_video:function(a){var t,o=this;t='<iframe src="'+a+'" class="modaal-video-frame" frameborder="0" allowfullscreen></iframe>',o.build_modal('<div class="modaal-video-container">'+t+"</div>")},create_iframe:function(a){var t,o=this;t=null!==o.options.width||void 0!==o.options.width||null!==o.options.height||void 0!==o.options.height?'<iframe src="'+a+'" class="modaal-iframe-elem" frameborder="0" allowfullscreen></iframe>':'<div class="modaal-content-container">Please specify a width and height for your iframe</div>',o.build_modal(t)},modaal_open:function(){var t=this,o=a("#"+t.scope.id),e=t.options.animation;"none"===e&&(o.removeClass("modaal-start_none"),t.options.after_open.call(t,o)),"fade"===e&&o.removeClass("modaal-start_fade"),"slide-down"===e&&o.removeClass("modaal-start_slide_down");var i=o;a(".modaal-wrapper *[tabindex=0]").removeAttr("tabindex"),i="image"==t.options.type?a("#"+t.scope.id).find(".modaal-gallery-item."+t.private_options.active_class):o.find(".modaal-iframe-elem").length?o.find(".modaal-iframe-elem"):o.find(".modaal-video-wrap").length?o.find(".modaal-video-wrap"):o.find(".modaal-focus"),i.attr("tabindex","0").focus(),"none"!==e&&setTimeout(function(){t.options.after_open.call(t,o)},t.options.after_callback_delay)},modaal_close:function(){var t=this,o=a("#"+t.scope.id);t.options.before_close.call(t,o),null!==t.xhr&&(t.xhr.abort(),t.xhr=null),"none"===t.options.animation&&o.addClass("modaal-start_none"),"fade"===t.options.animation&&o.addClass("modaal-start_fade"),"slide-down"===t.options.animation&&o.addClass("modaal-start_slide_down"),setTimeout(function(){"inline"==t.options.type&&a("#"+t.scope.id+" .modaal-content-container").contents().detach().appendTo(t.scope.source),o.remove(),t.options.after_close.call(t),t.scope.is_open=!1},t.options.after_callback_delay),t.modaal_overlay("hide"),null!=t.lastFocus&&t.lastFocus.focus()},modaal_overlay:function(t){var o=this;"show"==t?(o.scope.is_open=!0,o.options.background_scroll||o.dom.addClass("modaal-noscroll"),a("#"+o.scope.id+"_overlay").length<1&&o.dom.append('<div class="modaal-overlay" id="'+o.scope.id+'_overlay"></div>'),a("#"+o.scope.id+"_overlay").css("background",o.options.background).stop().animate({opacity:o.options.overlay_opacity},o.options.animation_speed,function(){o.modaal_open()})):"hide"==t&&a("#"+o.scope.id+"_overlay").stop().animate({opacity:0},o.options.animation_speed,function(){a(this).remove(),o.dom.removeClass("modaal-noscroll")})},is_touch:function(){return"ontouchstart"in window||navigator.maxTouchPoints}},e=[];a.fn.modaal=function(t){return this.each(function(i){var l=a(this).data("modaal");if(l){if("string"==typeof t)switch(t){case"open":l.create_modaal(l);break;case"close":l.modaal_close()}}else{var n=Object.create(o);n.init(t,this),a.data(this,"modaal",n),e.push({element:a(this).attr("class"),options:t})}})},a.fn.modaal.options={type:"inline",content_source:null,animation:"fade",animation_speed:300,after_callback_delay:350,is_locked:!1,hide_close:!1,background:"#000",overlay_opacity:"0.8",overlay_close:!0,accessible_title:"Dialog Window",start_open:!1,fullscreen:!1,custom_class:"",background_scroll:!1,should_open:!0,close_text:"Close",close_aria_label:"Close (Press escape to close)",width:null,height:null,before_open:function(){},after_open:function(){},before_close:function(){},after_close:function(){},source:function(a,t){return t},confirm_button_text:"Confirm",confirm_cancel_button_text:"Cancel",confirm_title:"Confirm Title",confirm_content:"<p>This is the default confirm dialog content. Replace me through the options</p>",confirm_callback:function(){},confirm_cancel_callback:function(){},gallery_active_class:"gallery_active_item",outer_controls:!1,before_image_change:function(a,t){},after_image_change:function(a){},loading_content:'<div class="modaal-loading-spinner"><div><div></div></div><div><div></div></div><div><div></div></div><div><div></div></div><div><div></div></div><div><div></div></div><div><div></div></div><div><div></div></div></div>',loading_class:"is_loading",ajax_error_class:"modaal-error",ajax_success:function(){},instagram_id:null},a(function(){var o=a(".modaal");o.length&&o.each(function(){t(a(this))});var i=new MutationObserver(function(o){o.forEach(function(o){if(o.addedNodes&&o.addedNodes.length>0){[].some.call(o.addedNodes,function(o){var i=a(o);(i.is("a")||i.is("button"))&&(i.hasClass("modaal")?t(i):e.forEach(function(t){if(t.element==i.attr("class"))return a(i).modaal(t.options),!1}))})}})}),l={subtree:!0,attributes:!0,childList:!0,characterData:!0};setTimeout(function(){i.observe(document.body,l)},500)})}(jQuery,window,document);
cookie-notice.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Cookie Notice & Compliance for GDPR / CCPA
4
  Description: Cookie Notice allows you to you elegantly inform users that your site uses cookies and helps you comply with GDPR, CCPA and other data privacy laws.
5
- Version: 2.0.4
6
  Author: Hu-manity.co
7
  Author URI: https://hu-manity.co/
8
  Plugin URI: https://hu-manity.co/
@@ -29,7 +29,7 @@ if ( ! defined( 'ABSPATH' ) )
29
  * Cookie Notice class.
30
  *
31
  * @class Cookie_Notice
32
- * @version 2.0.4
33
  */
34
  class Cookie_Notice {
35
 
@@ -85,7 +85,7 @@ class Cookie_Notice {
85
  'update_notice' => true,
86
  'update_delay_date' => 0
87
  ),
88
- 'version' => '2.0.4'
89
  );
90
 
91
  private static $_instance;
@@ -165,7 +165,6 @@ class Cookie_Notice {
165
  $this->status = ! empty( $status ) && in_array( $status, array( 'active', 'pending' ), true ) ? $status : false;
166
  }
167
 
168
-
169
  /**
170
  * Include required files.
171
  *
@@ -224,7 +223,7 @@ class Cookie_Notice {
224
  if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
225
  return;
226
 
227
- $current_update = 4;
228
 
229
  // get current database version
230
  $current_db_version = get_option( 'cookie_notice_version', '1.0.0' );
@@ -238,10 +237,9 @@ class Cookie_Notice {
238
  // update plugin version
239
  update_option( 'cookie_notice_version', $this->defaults['version'], false );
240
 
241
- /* show welcome, if no compliance only
242
  if ( empty( $this->status ) )
243
- set_transient( 'cn_activation_redirect', 1 );
244
- */
245
  }
246
  }
247
 
2
  /*
3
  Plugin Name: Cookie Notice & Compliance for GDPR / CCPA
4
  Description: Cookie Notice allows you to you elegantly inform users that your site uses cookies and helps you comply with GDPR, CCPA and other data privacy laws.
5
+ Version: 2.1.0
6
  Author: Hu-manity.co
7
  Author URI: https://hu-manity.co/
8
  Plugin URI: https://hu-manity.co/
29
  * Cookie Notice class.
30
  *
31
  * @class Cookie_Notice
32
+ * @version 2.1.0
33
  */
34
  class Cookie_Notice {
35
 
85
  'update_notice' => true,
86
  'update_delay_date' => 0
87
  ),
88
+ 'version' => '2.1.0'
89
  );
90
 
91
  private static $_instance;
165
  $this->status = ! empty( $status ) && in_array( $status, array( 'active', 'pending' ), true ) ? $status : false;
166
  }
167
 
 
168
  /**
169
  * Include required files.
170
  *
223
  if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
224
  return;
225
 
226
+ $current_update = 5;
227
 
228
  // get current database version
229
  $current_db_version = get_option( 'cookie_notice_version', '1.0.0' );
237
  // update plugin version
238
  update_option( 'cookie_notice_version', $this->defaults['version'], false );
239
 
240
+ // show welcome, if no compliance only
241
  if ( empty( $this->status ) )
242
+ set_transient( 'cn_show_welcome', 1 );
 
243
  }
244
  }
245
 
css/admin-welcome.css CHANGED
@@ -1,20 +1,20 @@
1
- .dashboard_page_cookie-notice-welcome #wpcontent {
2
  padding-left: 0;
3
  }
4
 
5
- .dashboard_page_cookie-notice-welcome .update-nag {
6
  display: none;
7
  }
8
 
9
- .dashboard_page_cookie-notice-welcome * {
10
  box-sizing: border-box;
11
  }
12
 
13
- .dashboard_page_cookie-notice-welcome #wpbody-content {
14
  padding-bottom: 0;
15
  }
16
 
17
- .dashboard_page_cookie-notice-welcome #wpfooter {
18
  display: none !important;
19
  }
20
 
@@ -32,58 +32,17 @@
32
  margin: 0;
33
  background: #fff;
34
  color: #191e23;
 
35
  position: fixed;
36
  width: calc(100% - 160px);
 
 
37
  }
38
 
39
  .folded .cn-welcome-wrap {
40
  width: calc(100% - 36px);
41
  }
42
 
43
- .dashboard_page_cookie-notice-welcome .has-loader:before {
44
- display: block;
45
- content: '';
46
- background: rgba(255,255,255,0);
47
- transition: all 0.2s;
48
- position: absolute;
49
- width: 100%;
50
- height: 100%;
51
- z-index: -1;
52
- }
53
- .dashboard_page_cookie-notice-welcome .has-loader.cn-loading:before {
54
- /* background: rgba(32,193,158,.2); */
55
- background: rgba(255,255,255,.2);
56
- z-index: 99;
57
- }
58
-
59
- .dashboard_page_cookie-notice-welcome .has-loader > .cn-spinner {
60
- position: absolute;
61
- top: 50%;
62
- left: 50%;
63
- width: 21px;
64
- height: 21px;
65
- z-index: 100;
66
- }
67
-
68
- .dashboard_page_cookie-notice-welcome .has-loader > .cn-spinner:after {
69
- border: 3px solid #20C19E;
70
- border-color: #20C19E transparent #20C19E transparent;
71
- width: 21px;
72
- height: 21px;
73
- border-radius: 50%;
74
- opacity: 0;
75
- transition: all 0.3s;
76
- }
77
-
78
- .dashboard_page_cookie-notice-welcome .has-loader.cn-loading > .cn-spinner {
79
- max-width: 21px;
80
- opacity: 1;
81
- }
82
-
83
- .dashboard_page_cookie-notice-welcome .has-loader.cn-loading > .cn-spinner:after {
84
- opacity: 1;
85
- }
86
-
87
  .cn-welcome-wrap h1,
88
  .cn-welcome-wrap h2,
89
  .cn-welcome-wrap h3,
@@ -98,6 +57,16 @@
98
  .cn-content h4,
99
  .cn-content h5 {
100
  color: #191e23;
 
 
 
 
 
 
 
 
 
 
101
  }
102
 
103
  .cn-sidebar h1,
@@ -108,8 +77,14 @@
108
  color: #fff;
109
  }
110
 
 
 
 
 
 
111
  .cn-welcome-wrap h1 {
112
  font-size: 4em;
 
113
  }
114
  .cn-welcome-wrap h2 {
115
  font-size: 2em;
@@ -127,6 +102,48 @@
127
  transition: all 0.2s;
128
  }
129
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  .cn-welcome-wrap .cn-content a.cn-link {
131
  color: #20C19E;
132
  text-decoration: none;
@@ -182,7 +199,7 @@
182
  justify-content: center;
183
  align-items: flex-start;
184
  max-width: 70%;
185
- margin: 4em auto 2.5em;
186
  }
187
 
188
  .cn-welcome-wrap .cn-hero-image img {
@@ -210,14 +227,16 @@
210
 
211
  .cn-welcome-wrap .cn-flex-item ul {
212
  padding: 0;
213
- margin: 2em 0 0;
214
  list-style: none;
215
- font-size: 14px;
216
  }
217
 
218
  .cn-welcome-wrap .cn-flex-item ul li {
219
- margin: 0 0 0.5em;
220
  padding: 0;
 
 
 
221
  }
222
 
223
  .cn-welcome-wrap .cn-flex-item ul li span {
@@ -227,7 +246,7 @@
227
  }
228
 
229
  .cn-welcome-wrap .cn-flex-item ul li span::before {
230
- font-family: dashicons;
231
  line-height: 1;
232
  font-weight: 400;
233
  font-style: normal;
@@ -248,6 +267,11 @@
248
  background: none;
249
  }
250
 
 
 
 
 
 
251
  .cn-welcome-wrap .cn-logo-container {
252
  margin-bottom: 1em;
253
  }
@@ -389,6 +413,10 @@
389
  margin-top: 3em;
390
  }
391
 
 
 
 
 
392
  .cn-header {
393
  margin-bottom: 3em;
394
  }
@@ -414,6 +442,179 @@
414
  color: #20C19E;
415
  }
416
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
417
  .cn-btn {
418
  border-radius: 3em;
419
  padding: 1em 3em;
@@ -432,6 +633,7 @@
432
  .cn-btn:hover,
433
  .cn-btn:focus {
434
  box-shadow: none;
 
435
  border: 2px solid #20C19E;
436
  background: #20C19E;
437
  color: #fff;
@@ -440,7 +642,7 @@
440
 
441
  .cn-btn.cn-btn-outline {
442
  background: transparent;
443
- color: #fff;
444
  box-shadow: 0 0 15px 0 rgba(255,255,255,.4), inset 0 0 15px rgba(255,255,255,.4);
445
  }
446
 
@@ -452,6 +654,15 @@
452
  border-color: #fff transparent #fff transparent;
453
  }
454
 
 
 
 
 
 
 
 
 
 
455
  .cn-btn.cn-btn-lg {
456
  border-radius: 4em;
457
  padding: 1.5em 4em;
@@ -461,7 +672,7 @@
461
  .cn-btn.cn-btn-link {
462
  background: none;
463
  border-color: transparent;
464
- color: #fff;
465
  padding: 0;
466
  }
467
 
@@ -591,6 +802,10 @@
591
  color: #fff;
592
  }
593
 
 
 
 
 
594
  .cn-form.cn-form-disabled[data-action="payment"] {
595
  pointer-events: none;
596
  opacity: 0.5;
@@ -627,12 +842,18 @@
627
  background: rgba( 218,36,57, 0.5);
628
  }
629
 
630
- .cn-welcome-wrap form .cn-form-feedback p.cn-message {
631
  border: 1px solid #e78d26;
632
  border-radius: 3px;
633
  background: rgba( 231,141,38, 0.5);
634
  }
635
 
 
 
 
 
 
 
636
  .cn-welcome-wrap form .cn-form-feedback.cn-hidden {
637
  max-height: 0;
638
  margin-bottom: 0;
@@ -641,7 +862,11 @@
641
 
642
  .cn-welcome-wrap form .cn-field:not(:last-child) {
643
  position: relative;
644
- margin: 0 0 1em;
 
 
 
 
645
  }
646
 
647
  .cn-welcome-wrap form .cn-field.cn-field-half {
@@ -829,10 +1054,43 @@
829
  display: block;
830
  }
831
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
832
  .cn-welcome-wrap form .cn-checkbox-image-wrapper label,
833
  .cn-welcome-wrap form .cn-radio-image-wrapper label {
834
  display: inline-block;
835
  margin: 0 0.25em;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
836
  }
837
 
838
  .cn-sidebar form .cn-checkbox-image-wrapper span,
@@ -883,6 +1141,10 @@
883
  background-position: center center;
884
  }
885
 
 
 
 
 
886
  .cn-welcome-wrap form .cn-plan-wrapper label > span {
887
  margin-left: 2em;
888
  }
@@ -890,7 +1152,7 @@
890
  .cn-welcome-wrap form .cn-plan-wrapper label {
891
  position: relative;
892
  display: block;
893
- padding: 1.5em 1em;
894
  box-sizing: content-box;
895
  }
896
 
@@ -1042,7 +1304,7 @@
1042
  }
1043
 
1044
  .cn-welcome-wrap #cn_preview_about {
1045
- margin-top: -1em;
1046
  }
1047
 
1048
  .cn-welcome-wrap #cn_preview_about p {
@@ -1235,7 +1497,7 @@
1235
  .cn-sidebar.cn-theme-light .cn-form-container {
1236
  background: rgba(0,0,0,0.1);
1237
  border: 1px solid rgba(255,255,255,.3);
1238
- transition: border-color 0.2s;
1239
  }
1240
 
1241
  .cn-sidebar.cn-theme-light .cn-form-container.cn-collapsed {
@@ -1244,6 +1506,12 @@
1244
 
1245
  .cn-accordion .cn-accordion-item {
1246
  overflow: hidden;
 
 
 
 
 
 
1247
  }
1248
 
1249
  .cn-accordion .cn-accordion-item:not(:last-child) {
@@ -1254,6 +1522,10 @@
1254
  pointer-events: none;
1255
  }
1256
 
 
 
 
 
1257
  .cn-accordion .cn-accordion-item.cn-collapsed .cn-accordion-button {
1258
  color: rgba(255,255,255,.7);
1259
  }
@@ -1273,7 +1545,6 @@
1273
  border: none;
1274
  outline: none;
1275
  background: none;
1276
- transition: all 0.2s;
1277
  padding: 0;
1278
  margin: 0;
1279
  cursor: pointer;
@@ -1283,6 +1554,7 @@
1283
  color: #fff;
1284
  }
1285
 
 
1286
  .cn-accordion .cn-accordion-button:after {
1287
  font-family: dashicons;
1288
  line-height: 1;
@@ -1307,11 +1579,11 @@
1307
 
1308
  .cn-accordion .cn-collapsed .cn-accordion-button:after {
1309
  transform: rotate(0);
1310
- }
1311
 
1312
  .cn-accordion .cn-accordion-collapse {
1313
  overflow-y: hidden;
1314
- max-height: 500px; /* approximate max height */
1315
 
1316
  transition-property: all;
1317
  transition-duration: .3s;
@@ -1353,4 +1625,271 @@
1353
 
1354
  #cn_card_number.braintree-hosted-fields-valid {
1355
  color: #fff;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1356
  }
1
+ .cn-welcome-wrap #wpcontent {
2
  padding-left: 0;
3
  }
4
 
5
+ .cn-welcome-wrap .update-nag {
6
  display: none;
7
  }
8
 
9
+ .cn-welcome-wrap * {
10
  box-sizing: border-box;
11
  }
12
 
13
+ .cn-welcome-wrap #wpbody-content {
14
  padding-bottom: 0;
15
  }
16
 
17
+ .cn-welcome-wrap #wpfooter {
18
  display: none !important;
19
  }
20
 
32
  margin: 0;
33
  background: #fff;
34
  color: #191e23;
35
+ /*
36
  position: fixed;
37
  width: calc(100% - 160px);
38
+ */
39
+ width: 100%;
40
  }
41
 
42
  .folded .cn-welcome-wrap {
43
  width: calc(100% - 36px);
44
  }
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  .cn-welcome-wrap h1,
47
  .cn-welcome-wrap h2,
48
  .cn-welcome-wrap h3,
57
  .cn-content h4,
58
  .cn-content h5 {
59
  color: #191e23;
60
+ padding: 0;
61
+ }
62
+
63
+ .cn-content h1,
64
+ .cn-content h2,
65
+ .cn-content h3,
66
+ .cn-content h4,
67
+ .cn-content h5 {
68
+ color: #191e23;
69
+ padding: 0;
70
  }
71
 
72
  .cn-sidebar h1,
77
  color: #fff;
78
  }
79
 
80
+ .cn-content h1 + h2,
81
+ .cn-content h1 + h3 {
82
+ margin-top: 0.5em;
83
+ }
84
+
85
  .cn-welcome-wrap h1 {
86
  font-size: 4em;
87
+ line-height: 1.1;
88
  }
89
  .cn-welcome-wrap h2 {
90
  font-size: 2em;
102
  transition: all 0.2s;
103
  }
104
 
105
+ .cn-welcome-step-1 h3:first-child {
106
+ margin-bottom: 0;
107
+ }
108
+
109
+ .cn-welcome-step-1 .cn-content .cn-lead {
110
+ margin-top: 1.5em;
111
+ max-width: 100%;
112
+ }
113
+
114
+ .cn-welcome-step-1 .cn-content .cn-lead p:first-child {
115
+ margin-bottom: 1em;
116
+ }
117
+
118
+ .cn-welcome-step-1 .cn-content h1 {
119
+ margin-bottom: 5px;
120
+ }
121
+
122
+ .cn-welcome-step-1 .cn-content h2 {
123
+ margin-bottom: 1em;
124
+ }
125
+
126
+ .cn-welcome-step-1 .cn-content h4 {
127
+ margin-top: 1.5em;
128
+ }
129
+
130
+ .cn-welcome-step-1 .cn-sidebar .cn-lead {
131
+ margin-bottom: 1em;
132
+ }
133
+
134
+ .cn-welcome-step-1 .cn-sidebar .cn-inner,
135
+ .cn-welcome-step-1 .cn-content .cn-inner {
136
+ padding: 6em;
137
+ }
138
+
139
+ .cn-welcome-wrap.cn-welcome-step-1 .cn-sidebar {
140
+ width: 50%;
141
+ }
142
+
143
+ .cn-welcome-wrap.cn-welcome-step-1 .cn-content.cn-sidebar-visible {
144
+ width: 50%;
145
+ }
146
+
147
  .cn-welcome-wrap .cn-content a.cn-link {
148
  color: #20C19E;
149
  text-decoration: none;
199
  justify-content: center;
200
  align-items: flex-start;
201
  max-width: 70%;
202
+ margin: 2em auto;
203
  }
204
 
205
  .cn-welcome-wrap .cn-hero-image img {
227
 
228
  .cn-welcome-wrap .cn-flex-item ul {
229
  padding: 0;
230
+ margin: 0;
231
  list-style: none;
232
+ font-size: 15px;
233
  }
234
 
235
  .cn-welcome-wrap .cn-flex-item ul li {
 
236
  padding: 0;
237
+ font-size: 15px;
238
+ line-height: 1.1;
239
+ margin: 1em 0;
240
  }
241
 
242
  .cn-welcome-wrap .cn-flex-item ul li span {
246
  }
247
 
248
  .cn-welcome-wrap .cn-flex-item ul li span::before {
249
+ font-family: 'dashicons';
250
  line-height: 1;
251
  font-weight: 400;
252
  font-style: normal;
267
  background: none;
268
  }
269
 
270
+ .cn-welcome-wrap .cn-flex-item ul li b {
271
+ font-weight: bold;
272
+ font-size: 16px;
273
+ }
274
+
275
  .cn-welcome-wrap .cn-logo-container {
276
  margin-bottom: 1em;
277
  }
413
  margin-top: 3em;
414
  }
415
 
416
+ .cn-welcome-step-3 .cn-content .cn-buttons {
417
+ margin-top: 0;
418
+ }
419
+
420
  .cn-header {
421
  margin-bottom: 3em;
422
  }
442
  color: #20C19E;
443
  }
444
 
445
+ .cn-welcome-wrap .cn-pricing-select {
446
+ margin-top: 1.5em;
447
+ }
448
+
449
+ .cn-welcome-wrap .cn-pricing-table {
450
+ display: flex;
451
+ justify-content: center;
452
+ align-items: center;
453
+ margin-top: 3em;
454
+ }
455
+
456
+ .cn-welcome-wrap .cn-pricing-table .cn-pricing-item {
457
+ margin: 0 1.5em 3em;
458
+ min-width: 300px;
459
+ }
460
+
461
+ .cn-welcome-wrap .cn-pricing-table .cn-pricing-item h4 {
462
+ margin-bottom: 0.5em;
463
+ position: relative;
464
+ font-size: 1.3em;
465
+ }
466
+
467
+ .cn-welcome-wrap .cn-pricing-table .cn-pricing-item h4:after {
468
+ content: '';
469
+ display: block;
470
+ width: 60px;
471
+ border-bottom: 1px solid #86868F;
472
+ margin: 1em auto 0;
473
+ }
474
+
475
+ .cn-welcome-wrap .cn-pricing-table .cn-pricing-item button {
476
+ pointer-events: none;
477
+ }
478
+
479
+ .cn-welcome-wrap .cn-pricing-table .cn-pricing-item:hover .cn-pricing-info {
480
+ border-color: rgba(0, 0, 0, 0.1);
481
+ }
482
+
483
+ .cn-welcome-wrap .cn-pricing-table .cn-pricing-item .cn-pricing-info {
484
+ box-shadow: 0px 0px 13px 0px rgba(236, 236, 241, 1);
485
+ border: 1px solid transparent;
486
+ border-radius: 5px;
487
+ position: relative;
488
+ overflow: hidden;
489
+ }
490
+
491
+ .cn-welcome-wrap .cn-pricing-table .cn-pricing-item input {
492
+ display: none;
493
+ }
494
+
495
+ .cn-welcome-wrap .cn-pricing-table .cn-pricing-item input:checked + .cn-pricing-info {
496
+ border-color: #20C19E;
497
+ }
498
+
499
+ .cn-welcome-wrap .cn-pricing-table .cn-pricing-item .cn-pricing-info > div {
500
+ padding: 2em 1.5em;
501
+ }
502
+
503
+ .cn-welcome-wrap .cn-pricing-table input#cn_pricing_plan_free + .cn-pricing-info .cn-plan-price {
504
+ color: #515151;
505
+ font-size: 1.25em;
506
+ line-height: 1.5em;
507
+ }
508
+
509
+ .cn-welcome-wrap .cn-pricing-table input#cn_pricing_plan_yearly + .cn-pricing-info h4 {
510
+ color: #FF9E0D;
511
+ }
512
+
513
+ .cn-welcome-wrap .cn-pricing-table input#cn_pricing_plan_yearly + .cn-pricing-info .cn-pricing-body p:last-child b,
514
+ .cn-welcome-wrap .cn-pricing-table input#cn_pricing_plan_yearly + .cn-pricing-info .cn-pricing-body p:last-child .cn-icon,
515
+ .cn-welcome-wrap .cn-pricing-table input#cn_pricing_plan_yearly + .cn-pricing-info .cn-pricing-body p:last-child .cn-icon:after {
516
+ color: #FF9E0D;
517
+ border-color: #FF9E0D;
518
+ }
519
+
520
+ .cn-welcome-wrap .cn-pricing-table input#cn_pricing_plan_yearly + .cn-pricing-info .cn-plan-promo {
521
+ color: #fff;
522
+ background: #20C19E;
523
+ position: absolute;
524
+ left: 50%;
525
+ top: 0;
526
+ font-weight: bold;
527
+ font-size: 1.1em;
528
+ line-height: 1.1em;
529
+ text-transform: uppercase;
530
+ display: inline-block;
531
+ letter-spacing: 1px;
532
+ border-radius: 0 0 5px 5px;
533
+ padding: 0.25em 2em;
534
+ transform: translateX(-50%);
535
+ }
536
+
537
+ .cn-welcome-wrap .cn-pricing-table .cn-pricing-item .cn-pricing-info .cn-pricing-head {
538
+ border-bottom: 1px solid rgba(0, 0, 0, 0.05);
539
+ padding: 3em 1.5em 2.5em;
540
+ }
541
+
542
+ .cn-welcome-wrap .cn-pricing-table .cn-pricing-info div.cn-pricing-body {
543
+ padding-bottom: 0;
544
+ font-size: 14px;
545
+ text-align: left;
546
+ }
547
+
548
+ .cn-welcome-wrap .cn-pricing-table .cn-pricing-info div.cn-pricing-body p {
549
+ padding-left: 35px;
550
+ line-height: 1.5;
551
+ margin: 1em 0;
552
+ }
553
+
554
+ .cn-welcome-wrap .cn-plan-pricing {
555
+ display: block;
556
+ font-size: 1.5em;
557
+ color: #515151;
558
+ }
559
+
560
+ .cn-welcome-wrap .cn-pricing-table .cn-plan-price {
561
+ font-size: 1.5em;
562
+ font-weight: bold;
563
+ line-height: 1.1;
564
+ color: #20C19E;
565
+ text-transform: uppercase;
566
+ }
567
+
568
+ .cn-welcome-wrap .cn-pricing-table .cn-plan-price sup {
569
+ font-weight: normal;
570
+ }
571
+
572
+ .cn-welcome-wrap .cn-billing-wrapper {
573
+ font-weight: normal;
574
+ }
575
+
576
+ .cn-welcome-wrap .cn-billing-wrapper input {
577
+ display: none;
578
+ }
579
+
580
+ .cn-welcome-wrap .cn-billing-wrapper label {
581
+ position: relative;
582
+ display: inline-block;
583
+ padding: .5em 1em;
584
+ box-sizing: content-box;
585
+ }
586
+
587
+ .cn-welcome-wrap .cn-billing-wrapper input:checked + span {
588
+ color: #fff;
589
+ }
590
+
591
+ .cn-welcome-wrap .cn-billing-wrapper input:checked + span .cn-plan-overlay {
592
+ background-color: rgba(53,53,63,1);
593
+ }
594
+
595
+ .cn-welcome-wrap .cn-billing-wrapper .cn-plan-overlay {
596
+ border: none;
597
+ width: 100%;
598
+ height: 100%;
599
+ border-radius: 3px;
600
+ position: absolute;
601
+ left: 0;
602
+ top: 0;
603
+ transition: border-color 0.2s;
604
+ z-index: -1;
605
+ background-color: rgba(53,53,63,0.1);
606
+ }
607
+
608
+ .cn-welcome-wrap .cn-billing-wrapper :first-child > span .cn-plan-overlay {
609
+ border-top-right-radius: 0;
610
+ border-bottom-right-radius: 0;
611
+ }
612
+
613
+ .cn-welcome-wrap .cn-billing-wrapper :last-child > span .cn-plan-overlay {
614
+ border-top-left-radius: 0;
615
+ border-bottom-left-radius: 0;
616
+ }
617
+
618
  .cn-btn {
619
  border-radius: 3em;
620
  padding: 1em 3em;
633
  .cn-btn:hover,
634
  .cn-btn:focus {
635
  box-shadow: none;
636
+ outline: none;
637
  border: 2px solid #20C19E;
638
  background: #20C19E;
639
  color: #fff;
642
 
643
  .cn-btn.cn-btn-outline {
644
  background: transparent;
645
+ color: #20C19E;
646
  box-shadow: 0 0 15px 0 rgba(255,255,255,.4), inset 0 0 15px rgba(255,255,255,.4);
647
  }
648
 
654
  border-color: #fff transparent #fff transparent;
655
  }
656
 
657
+ .cn-btn.cn-btn-transparent,
658
+ .cn-btn.cn-btn-transparent:hover,
659
+ .cn-btn.cn-btn-transparent:focus {
660
+ box-shadow: none;
661
+ background: transparent;
662
+ color: #BBBBC0;
663
+ border-color: transparent;
664
+ }
665
+
666
  .cn-btn.cn-btn-lg {
667
  border-radius: 4em;
668
  padding: 1.5em 4em;
672
  .cn-btn.cn-btn-link {
673
  background: none;
674
  border-color: transparent;
675
+ color: inherit;
676
  padding: 0;
677
  }
678
 
802
  color: #fff;
803
  }
804
 
805
+ .cn-small {
806
+ font-size: 12px;
807
+ }
808
+
809
  .cn-form.cn-form-disabled[data-action="payment"] {
810
  pointer-events: none;
811
  opacity: 0.5;
842
  background: rgba( 218,36,57, 0.5);
843
  }
844
 
845
+ .cn-welcome-wrap form .cn-form-feedback p.cn-warning {
846
  border: 1px solid #e78d26;
847
  border-radius: 3px;
848
  background: rgba( 231,141,38, 0.5);
849
  }
850
 
851
+ .cn-welcome-wrap form .cn-form-feedback p.cn-message {
852
+ border: 1px solid #008000;
853
+ border-radius: 3px;
854
+ background: rgba( 0,128,0, 0.5);
855
+ }
856
+
857
  .cn-welcome-wrap form .cn-form-feedback.cn-hidden {
858
  max-height: 0;
859
  margin-bottom: 0;
862
 
863
  .cn-welcome-wrap form .cn-field:not(:last-child) {
864
  position: relative;
865
+ margin: 0 0 0.5em;
866
+ }
867
+
868
+ .cn-welcome-wrap form .cn-field.cn-hidden {
869
+ display: none;
870
  }
871
 
872
  .cn-welcome-wrap form .cn-field.cn-field-half {
1054
  display: block;
1055
  }
1056
 
1057
+ .cn-welcome-wrap form .cn-field-checkbox > label.cn-asterix::after {
1058
+ content: '*';
1059
+ right: 0;
1060
+ top: 0;
1061
+ line-height: 8px;
1062
+ padding-left: 3px;
1063
+ display: inline-block;
1064
+ }
1065
+
1066
+ .cn-welcome-wrap form .cn-checkbox-wrapper label > span.cn-asterix::after,
1067
+ .cn-welcome-wrap form .cn-radio-wrapper label > span.cn-asterix::after {
1068
+ content: '*';
1069
+ right: 0;
1070
+ top: 0;
1071
+ line-height: 8px;
1072
+ padding-left: 3px;
1073
+ display: inline-block;
1074
+ }
1075
+
1076
  .cn-welcome-wrap form .cn-checkbox-image-wrapper label,
1077
  .cn-welcome-wrap form .cn-radio-image-wrapper label {
1078
  display: inline-block;
1079
  margin: 0 0.25em;
1080
+ position: relative;
1081
+ }
1082
+
1083
+ .cn-welcome-wrap form .cn-checkbox-image-wrapper label.cn-asterix,
1084
+ .cn-welcome-wrap form .cn-radio-image-wrapper label.cn-asterix {
1085
+ padding-right: 8px;
1086
+ }
1087
+ .cn-welcome-wrap form .cn-checkbox-image-wrapper label.cn-asterix::after,
1088
+ .cn-welcome-wrap form .cn-radio-image-wrapper label.cn-asterix::after {
1089
+ content: '*';
1090
+ position: absolute;
1091
+ right: 0;
1092
+ top: 0;
1093
+ line-height: 8px;
1094
  }
1095
 
1096
  .cn-sidebar form .cn-checkbox-image-wrapper span,
1141
  background-position: center center;
1142
  }
1143
 
1144
+ .cn-welcome-wrap form .cn-plan-wrapper {
1145
+ margin-bottom: 1em;
1146
+ }
1147
+
1148
  .cn-welcome-wrap form .cn-plan-wrapper label > span {
1149
  margin-left: 2em;
1150
  }
1152
  .cn-welcome-wrap form .cn-plan-wrapper label {
1153
  position: relative;
1154
  display: block;
1155
+ padding: 1.25em 1em;
1156
  box-sizing: content-box;
1157
  }
1158
 
1304
  }
1305
 
1306
  .cn-welcome-wrap #cn_preview_about {
1307
+ margin-bottom: 1.5em;
1308
  }
1309
 
1310
  .cn-welcome-wrap #cn_preview_about p {
1497
  .cn-sidebar.cn-theme-light .cn-form-container {
1498
  background: rgba(0,0,0,0.1);
1499
  border: 1px solid rgba(255,255,255,.3);
1500
+ transition: all 0.2s;
1501
  }
1502
 
1503
  .cn-sidebar.cn-theme-light .cn-form-container.cn-collapsed {
1506
 
1507
  .cn-accordion .cn-accordion-item {
1508
  overflow: hidden;
1509
+ border: 1px solid rgba(255,255,255,0.05);
1510
+ transition: border-color 0.2s;
1511
+ }
1512
+
1513
+ .cn-accordion .cn-accordion-item:focus {
1514
+ border-color: #20C19E;
1515
  }
1516
 
1517
  .cn-accordion .cn-accordion-item:not(:last-child) {
1522
  pointer-events: none;
1523
  }
1524
 
1525
+ .cn-accordion .cn-accordion-item.cn-hidden {
1526
+ visibility: hidden;
1527
+ }
1528
+
1529
  .cn-accordion .cn-accordion-item.cn-collapsed .cn-accordion-button {
1530
  color: rgba(255,255,255,.7);
1531
  }
1545
  border: none;
1546
  outline: none;
1547
  background: none;
 
1548
  padding: 0;
1549
  margin: 0;
1550
  cursor: pointer;
1554
  color: #fff;
1555
  }
1556
 
1557
+ /*
1558
  .cn-accordion .cn-accordion-button:after {
1559
  font-family: dashicons;
1560
  line-height: 1;
1579
 
1580
  .cn-accordion .cn-collapsed .cn-accordion-button:after {
1581
  transform: rotate(0);
1582
+ }*/
1583
 
1584
  .cn-accordion .cn-accordion-collapse {
1585
  overflow-y: hidden;
1586
+ max-height: 1000px; /* approximate max height */
1587
 
1588
  transition-property: all;
1589
  transition-duration: .3s;
1625
 
1626
  #cn_card_number.braintree-hosted-fields-valid {
1627
  color: #fff;
1628
+ }
1629
+
1630
+ /* Loader */
1631
+
1632
+ .cn-welcome-wrap .has-loader:before {
1633
+ display: block;
1634
+ content: '';
1635
+ background: rgba(255,255,255,0);
1636
+ transition: all 0.2s;
1637
+ position: absolute;
1638
+ width: 100%;
1639
+ height: 100%;
1640
+ z-index: -1;
1641
+ }
1642
+ .cn-welcome-wrap .has-loader.cn-loading:before {
1643
+ /* background: rgba(32,193,158,.2); */
1644
+ background: rgba(255,255,255,.2);
1645
+ z-index: 99;
1646
+ }
1647
+
1648
+ .cn-welcome-wrap .has-loader > .cn-spinner {
1649
+ position: absolute;
1650
+ top: 50%;
1651
+ left: 50%;
1652
+ width: 21px;
1653
+ height: 21px;
1654
+ z-index: 100;
1655
+ }
1656
+
1657
+ .cn-welcome-wrap .has-loader > .cn-spinner:after {
1658
+ border: 3px solid #20C19E;
1659
+ border-color: #20C19E transparent #20C19E transparent;
1660
+ width: 21px;
1661
+ height: 21px;
1662
+ border-radius: 50%;
1663
+ opacity: 0;
1664
+ transition: all 0.3s;
1665
+ }
1666
+
1667
+ .cn-welcome-wrap .has-loader.cn-loading > .cn-spinner {
1668
+ max-width: 21px;
1669
+ opacity: 1;
1670
+ }
1671
+
1672
+ .cn-welcome-wrap .has-loader.cn-loading > .cn-spinner:after {
1673
+ opacity: 1;
1674
+ }
1675
+
1676
+ /* Progressbar */
1677
+
1678
+ .cn-welcome-wrap .cn-compliance-check {
1679
+ width: 100%;
1680
+ margin: 0 0 10px 0;
1681
+ }
1682
+
1683
+ .cn-welcome-wrap .cn-compliance-feedback {
1684
+ position: relative;
1685
+ margin-bottom: 1.5em;
1686
+ color: #fff;
1687
+ overflow-y: hidden;
1688
+ max-height: 500px; /* approximate max height */
1689
+ transition: all .3s cubic-bezier(0, 1, 0.5, 1);
1690
+ transition-delay: 0.3s;
1691
+ opacity: 1;
1692
+ }
1693
+
1694
+ .cn-welcome-wrap .cn-compliance-feedback p {
1695
+ padding: 15px;
1696
+ margin: 0;
1697
+ }
1698
+
1699
+ .cn-welcome-wrap .cn-compliance-feedback p.cn-error {
1700
+ border: 1px solid #da2439;
1701
+ border-radius: 3px;
1702
+ background: rgba( 218,36,57, 0.5);
1703
+ }
1704
+
1705
+ .cn-welcome-wrap .cn-compliance-feedback p.cn-error a {
1706
+ color: inherit;
1707
+ text-decoration: underline;
1708
+ }
1709
+
1710
+ .cn-welcome-wrap .cn-compliance-feedback p.cn-warning {
1711
+ border: 1px solid #e78d26;
1712
+ border-radius: 3px;
1713
+ background: rgba( 231,141,38, 0.5);
1714
+ }
1715
+
1716
+ .cn-welcome-wrap .cn-compliance-feedback p.cn-message {
1717
+ border: 1px solid #008000;
1718
+ border-radius: 3px;
1719
+ background: rgba( 0,128,0, 0.5);
1720
+ }
1721
+
1722
+ .cn-welcome-wrap .cn-compliance-feedback.cn-hidden {
1723
+ max-height: 0;
1724
+ margin-bottom: 0;
1725
+ opacity: 0;
1726
+ }
1727
+
1728
+ .cn-welcome-wrap .cn-compliance-feedback em {
1729
+ font-size: 15px;
1730
+ font-weight: bold;
1731
+ display: block;
1732
+ margin-bottom: 10px;
1733
+ color: inherit;
1734
+ }
1735
+
1736
+ .cn-welcome-wrap .cn-progressbar {
1737
+ height: 26px;
1738
+ margin: 0 0 20px;
1739
+ width: 100%;
1740
+ position: relative;
1741
+ }
1742
+
1743
+ .cn-welcome-wrap .cn-compliance-results .cn-compliance-item:not(:first-child) {
1744
+ margin-top: 10px;
1745
+ }
1746
+
1747
+ .cn-welcome-wrap .cn-compliance-results .cn-compliance-item p {
1748
+ display: flex;
1749
+ justify-content: space-between;
1750
+ margin: 0;
1751
+ }
1752
+
1753
+ .cn-welcome-wrap .cn-compliance-results .cn-compliance-item p:first-child {
1754
+ font-size: 15px;
1755
+ color: #fff;
1756
+ }
1757
+
1758
+ .cn-welcome-wrap .cn-compliance-results .cn-compliance-item p:last-child {
1759
+ }
1760
+
1761
+ .cn-welcome-wrap .cn-compliance-results .cn-compliance-label {
1762
+ }
1763
+
1764
+ .cn-welcome-wrap .cn-compliance-info {
1765
+ font-size: 15px;
1766
+ line-height: inherit;
1767
+ opacity: 0.5;
1768
+ cursor: pointer;
1769
+ }
1770
+
1771
+ .cn-welcome-wrap .cn-compliance-results .cn-compliance-status.cn-failed {
1772
+ color: red;
1773
+ }
1774
+
1775
+ .cn-welcome-wrap .cn-compliance-results .cn-compliance-status.cn-passed {
1776
+ color: #20C19E;
1777
+ }
1778
+
1779
+ .cn-welcome-wrap .cn-progress-label {
1780
+ position: absolute;
1781
+ left: 50%;
1782
+ transform: translateX(-50%);
1783
+ font-size: 14px;
1784
+ font-weight: bold;
1785
+ top: 3px;
1786
+ color: #fff;
1787
+ }
1788
+
1789
+ .cn-welcome-wrap .ui-progressbar {
1790
+ background: rgba(255,255,255,0.1);
1791
+ border-radius: 3px;
1792
+ }
1793
+
1794
+ .cn-welcome-wrap .ui-progressbar .ui-progressbar-value {
1795
+ background: #20C19E;
1796
+ height: 100%;
1797
+ border: 0 none;
1798
+ border-radius: 3px;
1799
+ margin: 3px 0;
1800
+ color: #fff;
1801
+ text-align: center;
1802
+ float: left;
1803
+ height: 20px;
1804
+ line-height: 20px;
1805
+ font-size: 20px;
1806
+ width: 0;
1807
+ min-width: 0;
1808
+ -webkit-transition: width .5s ease;
1809
+ -o-transition: width .5s ease;
1810
+ transition: width .5s ease;
1811
+ }
1812
+
1813
+ /* Modaal */
1814
+
1815
+ .cn-modal .modaal-content-container {
1816
+ padding: 0;
1817
+ }
1818
+
1819
+ .cn-modal .modaal-inner-wrapper {
1820
+ padding: 0 20px;
1821
+ }
1822
+
1823
+ .modaal-overlay {
1824
+ z-index: 9998 !important;
1825
+ }
1826
+
1827
+ .cn-included,
1828
+ .cn-excluded {
1829
+ position: relative;
1830
+ }
1831
+
1832
+ .cn-included .cn-icon,
1833
+ .cn-excluded .cn-icon {
1834
+ box-sizing: border-box;
1835
+ position: absolute;
1836
+ left: 0;
1837
+ display: block;
1838
+ transform: scale(1);
1839
+ width: 22px;
1840
+ height: 22px;
1841
+ border: 2px solid;
1842
+ }
1843
+
1844
+ .cn-included .cn-icon {
1845
+ border-radius: 100px;
1846
+ color: #20C19E;
1847
+ }
1848
+
1849
+ .cn-included b {
1850
+ color: #20C19E;
1851
+ }
1852
+
1853
+ .cn-included .cn-icon::after {
1854
+ content: "";
1855
+ display: block;
1856
+ box-sizing: border-box;
1857
+ position: absolute;
1858
+ left: 3px;
1859
+ top: -1px;
1860
+ width: 6px;
1861
+ height: 10px;
1862
+ border-color: #20C19E;
1863
+ border-width: 0 2px 2px 0;
1864
+ border-style: solid;
1865
+ transform-origin: bottom left;
1866
+ transform: rotate(45deg);
1867
+ }
1868
+
1869
+ .cn-excluded .cn-icon {
1870
+ border-radius: 40px;
1871
+ color: #FF0000;
1872
+ }
1873
+
1874
+ .cn-excluded b {
1875
+ color: #FF0000;
1876
+ }
1877
+
1878
+ .cn-excluded .cn-icon::after,
1879
+ .cn-excluded .cn-icon::before {
1880
+ content: "";
1881
+ display: block;
1882
+ box-sizing: border-box;
1883
+ position: absolute;
1884
+ width: 12px;
1885
+ height: 2px;
1886
+ background: #FF0000;
1887
+ transform: rotate(45deg);
1888
+ border-radius: 5px;
1889
+ top: 8px;
1890
+ left: 3px;
1891
+ }
1892
+
1893
+ .cn-excluded .cn-icon::after {
1894
+ transform: rotate(-45deg);
1895
  }
img/cookie-notice-logo.png ADDED
Binary file
img/screen-compliance.png ADDED
Binary file
img/screen-notice.png ADDED
Binary file
includes/frontend.php CHANGED
@@ -17,6 +17,7 @@ class Cookie_Notice_Frontend {
17
  add_action( 'init', array( $this, 'init' ) );
18
 
19
  $this->widget_url = '//cdn.hu-manity.co/hu-banner.min.js';
 
20
  }
21
 
22
  /**
@@ -61,7 +62,7 @@ class Cookie_Notice_Frontend {
61
  * Add CORS header for API requests and purge cache.
62
  */
63
  public function add_cors_http_header() {
64
- header( "Access-Control-Allow-Origin: https://app.hu-manity.co" );
65
  header( 'Access-Control-Allow-Methods: GET' );
66
  }
67
 
@@ -191,7 +192,7 @@ class Cookie_Notice_Frontend {
191
 
192
  // message output
193
  $output = '
194
- <!-- Cookie Notice plugin v' . Cookie_Notice()->defaults['version'] . ' -->
195
  <div id="cookie-notice" role="banner" class="cookie-notice-hidden cookie-revoke-hidden cn-position-' . $options['position'] . '" aria-label="' . $options['aria_label'] . '" style="background-color: rgba(' . implode( ',', Cookie_Notice()->hex2rgb( $options['colors']['bar'] ) ) . ',' . $options['colors']['bar_opacity'] * 0.01 . ');">'
196
  . '<div class="cookie-notice-container" style="color: ' . $options['colors']['text'] . ';">'
197
  . '<span id="cn-notice-text" class="cn-text-container">'. $options['message_text'] . '</span>'
17
  add_action( 'init', array( $this, 'init' ) );
18
 
19
  $this->widget_url = '//cdn.hu-manity.co/hu-banner.min.js';
20
+ $this->app_url = 'https://app.hu-manity.co';
21
  }
22
 
23
  /**
62
  * Add CORS header for API requests and purge cache.
63
  */
64
  public function add_cors_http_header() {
65
+ header( "Access-Control-Allow-Origin: $this->app_url" );
66
  header( 'Access-Control-Allow-Methods: GET' );
67
  }
68
 
192
 
193
  // message output
194
  $output = '
195
+ <!-- Cookie Notice plugin v' . Cookie_Notice()->defaults['version'] . ' by Hu-manity.co https://hu-manity.co/ -->
196
  <div id="cookie-notice" role="banner" class="cookie-notice-hidden cookie-revoke-hidden cn-position-' . $options['position'] . '" aria-label="' . $options['aria_label'] . '" style="background-color: rgba(' . implode( ',', Cookie_Notice()->hex2rgb( $options['colors']['bar'] ) ) . ',' . $options['colors']['bar_opacity'] * 0.01 . ');">'
197
  . '<div class="cookie-notice-container" style="color: ' . $options['colors']['text'] . ';">'
198
  . '<span id="cn-notice-text" class="cn-text-container">'. $options['message_text'] . '</span>'
includes/settings.php CHANGED
@@ -116,6 +116,21 @@ class Cookie_Notice_Settings {
116
  1 => __( 'You can choose whether or not you want to consent to our use of cookies through the options below. You can customise the use of cookies, and change your settings at any time.', 'cookie-notice' )
117
  );
118
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  /*
120
  $this->countries = array(
121
  'AF' => __( 'Afghanistan', 'cookie-notice' ),
@@ -414,7 +429,7 @@ class Cookie_Notice_Settings {
414
  *
415
  * @return mixed
416
  */
417
- public function options_page() {
418
  echo '
419
  <div class="wrap">
420
  <h2>' . __( 'Cookie Notice & Compliance for GDPR/CCPA', 'cookie-notice' ) . '</h2>
@@ -428,13 +443,13 @@ class Cookie_Notice_Settings {
428
  echo ' <h2>We\'re Promoting Privacy&trade;</h2>
429
  <p>' . __( 'Promote the privacy of your website visitors without affecting how you do your business.', 'cookie-notice' ) . '</p>';
430
  } else {
431
- echo ' <h1><b>' . 'Cookie Compliance&trade;' . '</b></h1>
432
  <h2>' . __( 'The next generation of Cookie Notice', 'cookie-notice' ) . '</h2>
433
  <div class="cn-lead">
434
- <p>' . __( 'An all new web application to help you deliver better consent experiences and comply with GDPR and CCPA more effectively.', 'cookie-notice' ) . '</p>
435
  </div>
436
- <img src="//cns-53eb.kxcdn.com/screen-dashboard-small.png" alt="Cookie Compliance dashboard" />
437
- <a href="' . esc_url( admin_url( 'index.php?page=cookie-notice-welcome&screen=2' ) ) . '" class="cn-btn">' . __( 'Upgrade', 'cookie-notice' ) . '</a>';
438
  }
439
 
440
  echo '
@@ -550,7 +565,7 @@ class Cookie_Notice_Settings {
550
  <span class="cn_compliance_status">' . __( 'Proof-of-Consent', 'cookie-notice' ) . ': <label class="cn-pending">' . __( 'Pending', 'cookie-notice' ) . '</label></span>
551
  </div>
552
  <div id="cn_app_actions">
553
- <a href="' . $this->app_login_url . '" class="button button-primary button-hero" target="_blank">' . __( 'Log in & Complete setup', 'cookie-notice' ) . '</a>
554
  <p class="description">' . __( 'Log into the Cookie Compliance&trade; web application and complete the setup process.', 'cookie-notice' ) . '</p>
555
  </div>
556
  </fieldset>';
@@ -565,8 +580,8 @@ class Cookie_Notice_Settings {
565
  <span class="cn_compliance_status">' . __( 'Proof-of-Consent', 'cookie-notice' ) . ': <label class="cn-inactive">' . __( 'Inactive', 'cookie-notice' ) . '</label></span>
566
  </div>
567
  <div id="cn_app_actions">
568
- <a href="' . admin_url( 'index.php?page=cookie-notice-welcome&screen=2' ) . '" class="button button-primary button-hero">' . __( 'Add GDPR/CCPA Compliance', 'cookie-notice' ) . '</a>
569
- <p class="description">' . __( 'Launch Cookie Compliance&trade; and add GDPR & CCPA compliance features.', 'cookie-notice' ) . '</p>
570
  </div>
571
  </fieldset>';
572
  break;
@@ -581,7 +596,7 @@ class Cookie_Notice_Settings {
581
  <fieldset>
582
  <div id="cn_app_id">
583
  <input type="text" class="regular-text" name="cookie_notice_options[app_id]" value="' . esc_attr( Cookie_Notice()->options['general']['app_id'] ) . '" />
584
- <p class="description">' . __( 'Enter your Cookie Compliance&trade; application ID.', 'cookie-notice' ) . '</p>
585
  </div>
586
  </fieldset>';
587
  }
@@ -1173,7 +1188,7 @@ class Cookie_Notice_Settings {
1173
 
1174
  wp_localize_script(
1175
  'cookie-notice-admin', 'cnArgs', array(
1176
- 'ajaxUrl' => admin_url( 'admin-ajax.php' ),
1177
  'nonce' => wp_create_nonce( 'cn-purge-cache' ),
1178
  'resetToDefaults' => __( 'Are you sure you want to reset these settings to defaults?', 'cookie-notice' )
1179
  )
116
  1 => __( 'You can choose whether or not you want to consent to our use of cookies through the options below. You can customise the use of cookies, and change your settings at any time.', 'cookie-notice' )
117
  );
118
 
119
+ $text_strings = array(
120
+ 'acceptBtnText' => __( 'Accept', 'cookie-notice' ),
121
+ 'rejectBtnText' => __( 'Reject', 'cookie-notice' ),
122
+ 'revokeBtnText' => __( 'Revoke Cookies', 'cookie-notice' ),
123
+ 'privacyBtnText' => __( 'Privacy policy', 'cookie-notice' ),
124
+ 'dontSellBtnText' => __( 'Do Not Sell', 'cookie-notice' ),
125
+ 'customizeBtnText' => __( 'Preferences', 'cookie-notice' ),
126
+ 'headingText' => __( "We're Promoting Privacy", 'cookie-notice' ),
127
+ 'bodyText' => $this->cookie_messages[0],
128
+ 'privacyBodyText' => __( 'You can learn more about how we use cookies by visiting our privacy policy page.', 'cookie-notice' ),
129
+ 'dontSellBodyText' => __( 'California residents can also exercise their personal information rights through the Do Not Sell My Personal Information page.', 'cookie-notice' ),
130
+ 'preferencesHeadingText' => __( 'Cookie Preferences', 'cookie-notice' ),
131
+ 'preferencesBodyText' => __( 'Use the toggles to customize your cookie consent. Learn more about the purpose of each cookie and the companies behind them through the information and links below.', 'cookie-notice' )
132
+ );
133
+
134
  /*
135
  $this->countries = array(
136
  'AF' => __( 'Afghanistan', 'cookie-notice' ),
429
  *
430
  * @return mixed
431
  */
432
+ public function options_page() {
433
  echo '
434
  <div class="wrap">
435
  <h2>' . __( 'Cookie Notice & Compliance for GDPR/CCPA', 'cookie-notice' ) . '</h2>
443
  echo ' <h2>We\'re Promoting Privacy&trade;</h2>
444
  <p>' . __( 'Promote the privacy of your website visitors without affecting how you do your business.', 'cookie-notice' ) . '</p>';
445
  } else {
446
+ echo ' <h1><b>Cookie Compliance&trade;</b></h1>
447
  <h2>' . __( 'The next generation of Cookie Notice', 'cookie-notice' ) . '</h2>
448
  <div class="cn-lead">
449
+ <p>' . __( 'A free web application to help you deliver better consent experiences and comply with GDPR, CCPA and other data privacy laws more effectively.', 'cookie-notice' ) . '</p>
450
  </div>
451
+ <img src="//cns2-53eb.kxcdn.com/screen-dashboard-small.png">
452
+ <a href="' . esc_url( admin_url( 'index.php?page=cookie-notice' ) ) . '" class="cn-btn cn-run-upgrade">' . __( 'Free Upgrade', 'cookie-notice' ) . '</a>';
453
  }
454
 
455
  echo '
565
  <span class="cn_compliance_status">' . __( 'Proof-of-Consent', 'cookie-notice' ) . ': <label class="cn-pending">' . __( 'Pending', 'cookie-notice' ) . '</label></span>
566
  </div>
567
  <div id="cn_app_actions">
568
+ <a href="' . $this->app_login_url . '" class="button button-primary button-hero" target="_blank">' . __( 'Log in & configure', 'cookie-notice' ) . '</a>
569
  <p class="description">' . __( 'Log into the Cookie Compliance&trade; web application and complete the setup process.', 'cookie-notice' ) . '</p>
570
  </div>
571
  </fieldset>';
580
  <span class="cn_compliance_status">' . __( 'Proof-of-Consent', 'cookie-notice' ) . ': <label class="cn-inactive">' . __( 'Inactive', 'cookie-notice' ) . '</label></span>
581
  </div>
582
  <div id="cn_app_actions">
583
+ <a href="' . admin_url( 'index.php?page=cookie-notice' ) . '" class="button button-primary button-hero cn-run-welcome">' . __( 'Add Compliance features', 'cookie-notice' ) . '</a>
584
+ <p class="description">' . __( 'Sign up to Cookie Compliance&trade; and add GDPR, CCPA and other international data privacy laws compliance features.', 'cookie-notice' ) . '</p>
585
  </div>
586
  </fieldset>';
587
  break;
596
  <fieldset>
597
  <div id="cn_app_id">
598
  <input type="text" class="regular-text" name="cookie_notice_options[app_id]" value="' . esc_attr( Cookie_Notice()->options['general']['app_id'] ) . '" />
599
+ <p class="description">' . __( 'Enter your Cookie Compliance&trade; application ID.', 'cookie-notice' ) . '</p>
600
  </div>
601
  </fieldset>';
602
  }
1188
 
1189
  wp_localize_script(
1190
  'cookie-notice-admin', 'cnArgs', array(
1191
+ 'ajaxURL' => admin_url( 'admin-ajax.php' ),
1192
  'nonce' => wp_create_nonce( 'cn-purge-cache' ),
1193
  'resetToDefaults' => __( 'Are you sure you want to reset these settings to defaults?', 'cookie-notice' )
1194
  )
includes/welcome-api.php CHANGED
@@ -77,7 +77,9 @@ class Cookie_Notice_Welcome_API {
77
  }
78
 
79
  // validate plan and payment method
80
- $plan = in_array( $_POST['plan'], array( 'compliance_monthly', 'compliance_yearly' ), true ) ? $_POST['plan'] : false;
 
 
81
  $method = in_array( $_POST['method'], array( 'credit_card', 'paypal' ), true ) ? $_POST['method'] : false;
82
 
83
  // valid plan and payment method?
@@ -109,8 +111,6 @@ class Cookie_Notice_Welcome_API {
109
  }
110
  }
111
 
112
- // file_put_contents( plugin_dir_path( __FILE__ ) . "bt-customer.txt", print_r( $customer, true ) . PHP_EOL, FILE_APPEND );
113
-
114
  // user created/received?
115
  if ( empty( $customer->id ) ) {
116
  $response = array( 'error' => __( 'Unable to create customer data.', 'cookie-notice' ) );
@@ -127,75 +127,12 @@ class Cookie_Notice_Welcome_API {
127
  )
128
  );
129
 
130
- // file_put_contents( plugin_dir_path( __FILE__ ) . "bt-subscription.txt", print_r( $subscription, true ) . PHP_EOL, FILE_APPEND );
131
-
132
  // subscription assigned?
133
  if ( ! empty( $subscription->error ) ) {
134
  $response = $subscription->error;
135
  break;
136
  }
137
 
138
- // get options
139
- $app_config = get_transient( 'cookie_notice_app_config' );
140
-
141
- // create quick config
142
- $params = ! empty( $app_config ) && is_array( $app_config ) ? $app_config : array();
143
-
144
- // cast to objects
145
- foreach ( $params as $key => $array ) {
146
- $object = new stdClass();
147
-
148
- foreach ( $array as $subkey => $value ) {
149
- $new_params[$key] = $object;
150
- $new_params[$key]->{$subkey} = $value;
151
- }
152
- }
153
-
154
- $params = $new_params;
155
- $params['AppID'] = $app_id;
156
- // @todo When mutliple default languages are supported
157
- $params['DefaultLanguage'] = 'en';
158
-
159
- $response = $this->request( 'quick_config', $params );
160
-
161
- if ( $response->status === 200 ) {
162
- // notify publish app
163
- $params = array(
164
- 'AppID' => $app_id
165
- );
166
-
167
- $response = $this->request( 'notify_app', $params );
168
-
169
- if ( $response->status === 200 ) {
170
- $response = true;
171
-
172
- // update app status
173
- update_option( 'cookie_notice_status', 'active' );
174
- } else {
175
- // errors?
176
- if ( ! empty( $response->error ) ) {
177
- break;
178
- }
179
-
180
- // errors?
181
- if ( ! empty( $response->message ) ) {
182
- $response->error = $response->message;
183
- break;
184
- }
185
- }
186
- } else {
187
- // errors?
188
- if ( ! empty( $response->error ) ) {
189
- $response->error = $response->error;
190
- break;
191
- }
192
-
193
- // errors?
194
- if ( ! empty( $response->message ) ) {
195
- $response->error = $response->message;
196
- break;
197
- }
198
- }
199
  break;
200
 
201
  case 'register':
@@ -305,15 +242,89 @@ class Cookie_Notice_Welcome_API {
305
  if ( empty( $response->data->AppID ) || empty( $response->data->SecretKey ) ) {
306
  $response = array( 'error' => __( 'Unexpected error occurred. Please try again later.', 'cookie-notice' ) );
307
  break;
 
 
 
308
  }
309
 
310
  // update options: app ID and secret key
311
- Cookie_Notice()->options['general'] = wp_parse_args( array( 'app_id' => $response->data->AppID, 'app_key' => $response->data->SecretKey ), Cookie_Notice()->options['general'] );
312
 
313
  update_option( 'cookie_notice_options', Cookie_Notice()->options['general'] );
314
 
315
- // update app status
316
- update_option( 'cookie_notice_status', 'pending' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
317
 
318
  break;
319
 
@@ -402,6 +413,7 @@ class Cookie_Notice_Welcome_API {
402
 
403
  // if no app, create one
404
  if ( ! $app_exists ) {
 
405
  // create new app
406
  $params = array(
407
  'DomainName' => $site_title,
@@ -432,18 +444,63 @@ class Cookie_Notice_Welcome_API {
432
  Cookie_Notice()->options['general'] = wp_parse_args( array( 'app_id' => $app_exists->AppID, 'app_key' => $app_exists->SecretKey ), Cookie_Notice()->options['general'] );
433
 
434
  update_option( 'cookie_notice_options', Cookie_Notice()->options['general'] );
435
-
436
- // update app status
437
- update_option( 'cookie_notice_status', 'pending' );
438
-
439
- // check if the app has an active subscription
440
- if ( $app_exists->PaymentStatus === 'Active' ) {
441
- $response = array( 'error' => sprintf( __( 'You have an active subscription for %s', 'cookie-notice' ), $site_url ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
442
 
 
 
 
 
 
 
 
 
 
 
 
 
443
  // update app status
444
- update_option( 'cookie_notice_status', 'active' );
445
- break;
 
 
 
 
 
 
 
 
 
 
 
446
  }
 
447
  break;
448
 
449
  case 'configure':
@@ -726,6 +783,8 @@ class Cookie_Notice_Welcome_API {
726
  if ( ! empty( $response->error ) ) {
727
  if ( $response->error == 'App is not puplised yet' )
728
  $result = 'pending';
 
 
729
  }
730
  }
731
 
77
  }
78
 
79
  // validate plan and payment method
80
+ $plan = in_array( $_POST['plan'], array( 'monthly', 'yearly' ), true ) ? $_POST['plan'] : false;
81
+ $plan = ! empty( $plan ) ? 'compliance_' . $plan . '_notrial' : false;
82
+
83
  $method = in_array( $_POST['method'], array( 'credit_card', 'paypal' ), true ) ? $_POST['method'] : false;
84
 
85
  // valid plan and payment method?
111
  }
112
  }
113
 
 
 
114
  // user created/received?
115
  if ( empty( $customer->id ) ) {
116
  $response = array( 'error' => __( 'Unable to create customer data.', 'cookie-notice' ) );
127
  )
128
  );
129
 
 
 
130
  // subscription assigned?
131
  if ( ! empty( $subscription->error ) ) {
132
  $response = $subscription->error;
133
  break;
134
  }
135
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  break;
137
 
138
  case 'register':
242
  if ( empty( $response->data->AppID ) || empty( $response->data->SecretKey ) ) {
243
  $response = array( 'error' => __( 'Unexpected error occurred. Please try again later.', 'cookie-notice' ) );
244
  break;
245
+ } else {
246
+ $app_id = $response->data->AppID;
247
+ $secret_key = $response->data->SecretKey;
248
  }
249
 
250
  // update options: app ID and secret key
251
+ Cookie_Notice()->options['general'] = wp_parse_args( array( 'app_id' => $app_id, 'app_key' => $secret_key ), Cookie_Notice()->options['general'] );
252
 
253
  update_option( 'cookie_notice_options', Cookie_Notice()->options['general'] );
254
 
255
+ // purge cache
256
+ delete_transient( 'cookie_notice_compliance_cache' );
257
+
258
+ // get options
259
+ // $app_config = get_transient( 'cookie_notice_app_config' );
260
+
261
+ // create quick config
262
+ $params = ! empty( $app_config ) && is_array( $app_config ) ? $app_config : array();
263
+
264
+ // cast to objects
265
+ if ( $params ) {
266
+ foreach ( $params as $key => $array ) {
267
+ $object = new stdClass();
268
+
269
+ foreach ( $array as $subkey => $value ) {
270
+ $new_params[$key] = $object;
271
+ $new_params[$key]->{$subkey} = $value;
272
+ }
273
+ }
274
+
275
+ $params = $new_params;
276
+ }
277
+
278
+ $params['AppID'] = $app_id;
279
+ // @todo When mutliple default languages are supported
280
+ $params['DefaultLanguage'] = 'en';
281
+
282
+ $response = $this->request( 'quick_config', $params );
283
+
284
+ if ( $response->status === 200 ) {
285
+ // notify publish app
286
+ $params = array(
287
+ 'AppID' => $app_id
288
+ );
289
+
290
+ $response = $this->request( 'notify_app', $params );
291
+
292
+ if ( $response->status === 200 ) {
293
+ $response = true;
294
+
295
+ // update app status
296
+ update_option( 'cookie_notice_status', 'active' );
297
+ } else {
298
+ // update app status
299
+ update_option( 'cookie_notice_status', 'pending' );
300
+
301
+ // errors?
302
+ if ( ! empty( $response->error ) ) {
303
+ break;
304
+ }
305
+
306
+ // errors?
307
+ if ( ! empty( $response->message ) ) {
308
+ $response->error = $response->message;
309
+ break;
310
+ }
311
+ }
312
+ } else {
313
+ // update app status
314
+ update_option( 'cookie_notice_status', 'pending' );
315
+
316
+ // errors?
317
+ if ( ! empty( $response->error ) ) {
318
+ $response->error = $response->error;
319
+ break;
320
+ }
321
+
322
+ // errors?
323
+ if ( ! empty( $response->message ) ) {
324
+ $response->error = $response->message;
325
+ break;
326
+ }
327
+ }
328
 
329
  break;
330
 
413
 
414
  // if no app, create one
415
  if ( ! $app_exists ) {
416
+
417
  // create new app
418
  $params = array(
419
  'DomainName' => $site_title,
444
  Cookie_Notice()->options['general'] = wp_parse_args( array( 'app_id' => $app_exists->AppID, 'app_key' => $app_exists->SecretKey ), Cookie_Notice()->options['general'] );
445
 
446
  update_option( 'cookie_notice_options', Cookie_Notice()->options['general'] );
447
+
448
+ // purge cache
449
+ delete_transient( 'cookie_notice_compliance_cache' );
450
+
451
+ // create quick config
452
+ $params = array(
453
+ 'AppID' => $app_exists->AppID,
454
+ 'DefaultLanguage' => 'en'
455
+ );
456
+
457
+ $response = $this->request( 'quick_config', $params );
458
+
459
+ if ( $response->status === 200 ) {
460
+ // notify publish app
461
+ $params = array(
462
+ 'AppID' => $app_exists->AppID
463
+ );
464
+
465
+ $response = $this->request( 'notify_app', $params );
466
+
467
+ if ( $response->status === 200 ) {
468
+ $response = true;
469
+
470
+ // update app status
471
+ update_option( 'cookie_notice_status', 'active' );
472
+ } else {
473
+ // update app status
474
+ update_option( 'cookie_notice_status', 'pending' );
475
 
476
+ // errors?
477
+ if ( ! empty( $response->error ) ) {
478
+ break;
479
+ }
480
+
481
+ // errors?
482
+ if ( ! empty( $response->message ) ) {
483
+ $response->error = $response->message;
484
+ break;
485
+ }
486
+ }
487
+ } else {
488
  // update app status
489
+ update_option( 'cookie_notice_status', 'pending' );
490
+
491
+ // errors?
492
+ if ( ! empty( $response->error ) ) {
493
+ $response->error = $response->error;
494
+ break;
495
+ }
496
+
497
+ // errors?
498
+ if ( ! empty( $response->message ) ) {
499
+ $response->error = $response->message;
500
+ break;
501
+ }
502
  }
503
+
504
  break;
505
 
506
  case 'configure':
783
  if ( ! empty( $response->error ) ) {
784
  if ( $response->error == 'App is not puplised yet' )
785
  $result = 'pending';
786
+ else
787
+ $result = '';
788
  }
789
  }
790
 
includes/welcome.php CHANGED
@@ -14,66 +14,54 @@ class Cookie_Notice_Welcome {
14
 
15
  public function __construct() {
16
  // actions
17
- add_action( 'admin_menu', array( $this, 'admin_menus' ) );
18
- add_action( 'admin_head', array( $this, 'admin_head' ), 1 );
19
  add_action( 'admin_init', array( $this, 'welcome' ) );
20
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
21
  add_action( 'wp_ajax_cn_welcome_screen', array( $this, 'welcome_screen' ) );
22
 
23
- // filters
24
- add_filter( 'admin_footer_text', '__return_false', 1000 );
25
- add_filter( 'admin_body_class', array( $this, 'admin_body_class' ) );
26
-
27
  $this->app_login_url = 'https://app.hu-manity.co/#/en/cc2/login';
28
  }
29
 
30
- /**
31
- * Add admin menus/screens.
32
- *
33
- * @return void
34
- */
35
- public function admin_menus() {
36
- $welcome_page_title = __( 'Welcome to Cookie Notice', 'cookie-notice' );
37
- // about
38
- $about = add_dashboard_page( $welcome_page_title, $welcome_page_title, 'manage_options', 'cookie-notice-welcome', array( $this, 'welcome_page' ) );
39
- }
40
-
41
- /**
42
- * Add styles just for this page, and remove dashboard page links.
43
- *
44
- * @return void
45
- */
46
- public function admin_head() {
47
- remove_submenu_page( 'index.php', 'cookie-notice-welcome' );
48
-
49
- if ( isset( $_GET['page'] ) && $_GET['page'] === 'cookie-notice-welcome' )
50
- remove_all_actions( 'admin_notices' );
51
- }
52
-
53
  /**
54
  * Load scripts and styles - admin.
55
  */
56
  public function admin_enqueue_scripts( $page ) {
57
- if ( $page !== 'dashboard_page_cookie-notice-welcome' )
58
  return;
59
-
 
 
 
 
 
60
  wp_enqueue_style( 'cookie-notice-spectrum', plugins_url( '../assets/spectrum/spectrum.min.css', __FILE__ ), array(), Cookie_Notice()->defaults['version'] );
 
 
61
 
62
  wp_enqueue_script( 'cookie-notice-spectrum', plugins_url( '../assets/spectrum/spectrum.min.js', __FILE__ ), array(), Cookie_Notice()->defaults['version'] );
63
- wp_enqueue_script( 'cookie-notice-welcome', plugins_url( '../js/admin-welcome.js', __FILE__ ), array( 'jquery' ), Cookie_Notice()->defaults['version'] );
64
  wp_enqueue_script( 'cookie-notice-braintree-client', 'https://js.braintreegateway.com/web/3.71.0/js/client.min.js', array(), null, false );
65
  wp_enqueue_script( 'cookie-notice-braintree-hostedfields', 'https://js.braintreegateway.com/web/3.71.0/js/hosted-fields.min.js', array(), null, false );
66
  wp_enqueue_script( 'cookie-notice-braintree-paypal', 'https://js.braintreegateway.com/web/3.71.0/js/paypal-checkout.min.js', array(), null, false );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
 
68
  wp_localize_script(
69
  'cookie-notice-welcome',
70
- 'cnArgs',
71
- array(
72
- 'ajaxURL' => admin_url( 'admin-ajax.php' ),
73
- 'nonce' => wp_create_nonce( 'cookie-notice-welcome' ),
74
- 'error' => __( 'Unexpected error occurred. Please try again later.', 'cookie-notice' ),
75
- 'invalidFields' => __( 'Please fill all the required fields.', 'cookie-notice' )
76
- )
77
  );
78
 
79
  wp_enqueue_style( 'cookie-notice-welcome', plugins_url( '../css/admin-welcome.css', __FILE__ ) );
@@ -98,12 +86,13 @@ class Cookie_Notice_Welcome {
98
  * @return void
99
  */
100
  public function welcome() {
101
- // bail if no activation redirect transient is set
102
- if ( ! get_transient( 'cn_activation_redirect' ) )
 
 
 
 
103
  return;
104
-
105
- // delete the redirect transient
106
- delete_transient( 'cn_activation_redirect' );
107
 
108
  // bail if activating from network, or bulk, or within an iFrame
109
  if ( is_network_admin() || isset( $_GET['activate-multi'] ) || defined( 'IFRAME_REQUEST' ) )
@@ -112,8 +101,17 @@ class Cookie_Notice_Welcome {
112
  if ( (isset( $_GET['action'] ) && 'upgrade-plugin' == $_GET['action']) && (isset( $_GET['plugin'] ) && strstr( $_GET['plugin'], 'cookie-notice.php' )) )
113
  return;
114
 
115
- wp_safe_redirect( admin_url( 'index.php?page=cookie-notice-welcome' ) );
116
- exit;
 
 
 
 
 
 
 
 
 
117
  }
118
 
119
  /**
@@ -136,6 +134,8 @@ class Cookie_Notice_Welcome {
136
  * @return mixed
137
  */
138
  public function welcome_screen( $screen, $echo = true ) {
 
 
139
  if ( ! current_user_can( 'install_plugins' ) )
140
  wp_die( _( 'You do not have permission to access this page.', 'cookie-notice' ) );
141
 
@@ -162,7 +162,7 @@ class Cookie_Notice_Welcome {
162
 
163
  if ( $screen == 1 ) {
164
  $html .= $this->welcome_screen( 'about', false );
165
-
166
  $html .= '
167
  <div class="cn-content cn-sidebar-visible">
168
  <div class="cn-inner">
@@ -170,17 +170,73 @@ class Cookie_Notice_Welcome {
170
  <h1><b>Cookie Compliance&trade;</b></h1>
171
  <h2>' . __( 'The next generation of Cookie Notice', 'cookie-notice' ) . '</h2>
172
  <div class="cn-lead">
173
- <p>' . __( 'An all new web application to help you deliver better consent experiences and comply with GDPR and CCPA more effectively.', 'cookie-notice' ) . '</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  </div>
175
- <div class="cn-hero-image">
176
- <img src="//cno0-53eb.kxcdn.com/screen-dashboard.png" alt="Cookie Compliance dashboard" />
 
 
 
177
  </div>
178
- <div class="cn-lead">
179
- <p>' . sprintf( __( 'Digital Factory - the original developers of Cookie Notice - has joined forces with %s, the company known for introducing the 31st Human Right, to launch the Cookie Compliance&trade; web application.', 'cookie-notice' ), '<a href="https://hu-manity.co" target="_blank" class="cn-link">Hu-manity.co</a>' ) . '</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  </div>
 
 
 
181
  </div>
182
  </div>
183
  </div>';
 
184
  } elseif ( $screen == 2 ) {
185
  $html .= $this->welcome_screen( 'configure', false );
186
 
@@ -195,27 +251,33 @@ class Cookie_Notice_Welcome {
195
  // echo '<pre>'; print_r( $app_config ); echo '</pre>';
196
 
197
  $html .= $this->welcome_screen( 'register', false );
198
-
199
  $html .= '
200
  <div class="cn-content cn-sidebar-visible">
201
  <div class="cn-inner">
202
  <div class="cn-content-full">
203
- <h1><b>' . __( 'Privacy Made Easy', 'cookie-notice' ) . '</b></h1>
204
  <h2>' . __( 'The next generation of Cookie Notice', 'cookie-notice' ) . '</h2>
205
  <div class="cn-lead">
206
- <p>' . __( 'Cookie Compliance&trade; adds GDPR & CCPA compliance features, and a new Privacy Experience to Cookie Notice.', 'cookie-notice' ) . '</p>
 
 
 
 
207
  </div>
 
 
208
  <div class="cn-hero-image">
209
  <div class="cn-flex-item">
210
  <div class="cn-logo-container">
211
  <img src="' . plugins_url( '../img/cookie-notice-logo-dark.png', __FILE__ ) . '">
212
  <span class="cn-badge">' . __( 'WP Plugin', 'cookie-notice' ) . '</span>
213
  </div>
214
- <img src="//cno0-53eb.kxcdn.com/screen-notice.png" alt="Cookie Notice dashboard" />
215
- <ul>
 
216
  <li><span>' . __( 'Customizable notice message', 'cookie-notice' ) . '</span></li>
217
  <li><span>' . __( 'Consent on click, scroll or close', 'cookie-notice' ) . '</span></li>
218
- <li><span>' . __( 'Multiple cookie expiry options', 'cookie-notice' ) . '</span></li>
219
  <li><span>' . __( 'Link to Privacy Policy page', 'cookie-notice' ) . '</span></li>
220
  </ul>
221
  </div>
@@ -227,23 +289,94 @@ class Cookie_Notice_Welcome {
227
  <img src="' . plugins_url( '../img/cookie-compliance-logo-dark.png', __FILE__ ) . '">
228
  <span class="cn-badge">' . __( 'Web App', 'cookie-notice' ) . '</span>
229
  </div>
230
- <img src="//cno0-53eb.kxcdn.com/screen-compliance.png"alt="Cookie Compliance dashboard" />
231
- <ul>
232
- <li><span>' . __( 'Customizable <b>GDPR & CCPA</b> notice templates', 'cookie-notice' ) . '</span></li>
233
- <li><span>' . __( '<b>Consent Analytics</b> Dashboard', 'cookie-notice' ) . '</span></li>
234
- <li><span>' . __( 'Cookie <b>Autoblocking</b> (complies with GDPR Art.7)', 'cookie-notice' ) . '</span></li>
235
- <li><span>' . __( '<b>Cookie Categories</b> (complies with GDPR Art.32)', 'cookie-notice' ) . '</span></li>
236
- <li><span>' . __( '<b>Proof-of-Consent</b> Storage (complies with GDPR Art.30)', 'cookie-notice' ) . '</span></li>
237
- <li><span>' . __( "Link to <b>'Do Not Sell'</b> page (supports CCPA Sec.1798)", 'cookie-notice' ) . '</span></li>
238
- <li><span>' . __( 'Enhanced design controls and options', 'cookie-notice' ) . '</span></li>
239
- <li><span>' . __( 'Multiple new banner positions', 'cookie-notice' ) . '</span></li>
240
- <li><span>' . __( 'Custom language localization', 'cookie-notice' ) . '</span></li>
241
  </ul>
242
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  </div>
 
 
 
 
 
 
244
  </div>
245
  </div>
246
  </div>';
 
247
  } elseif ( $screen == 4 ) {
248
  $html .= $this->welcome_screen( 'success', false );
249
 
@@ -251,10 +384,10 @@ class Cookie_Notice_Welcome {
251
  <div class="cn-content cn-sidebar-visible">
252
  <div class="cn-inner">
253
  <div class="cn-content-full">
254
- <h1><b>' . __( 'Welcome', 'cookie-notice' ) . '</b></h1>
255
- <h2>' . __( 'You are now Promoting Privacy', 'cookie-notice' ) . '</h2>
256
  <div class="cn-lead">
257
- <p>' . __( 'Log into the Cookie Compliance&trade; web application and continue configuring your Privacy Experience.', 'cookie-notice' ) . '</p>
258
  </div>
259
  <div class="cn-buttons">
260
  <a href="' . $this->app_login_url . '" class="cn-btn cn-btn-lg" target="_blank">' . __( 'Go to Application', 'cookie-notice' ) . '</a>
@@ -279,21 +412,28 @@ class Cookie_Notice_Welcome {
279
  <div class="cn-inner">
280
  <div class="cn-header">
281
  <div class="cn-top-bar">
282
- <div class="cn-logo"><img src="//cno1-53eb.kxcdn.com/cookie-compliance-logo.png" alt="Cookie Compliance logo" /></div>
283
  </div>
284
  </div>
285
  <div class="cn-body">
286
- <h2>' . __( 'GDPR & CCPA Upgrade Ready', 'cookie-notice' ) . '</h2>
287
- <div class="cn-lead"><p><b>' . __( 'Simulate Cookie Compliance&trade; on your site.', 'cookie-notice' ) . '</b></p><p>' . __( 'Click below to see what the next generation of Cookie Notice looks like running on your website.', 'cookie-notice' ) . '</p></div>
288
  <div id="cn_preview_about">
289
  <p>' . __( 'Site URL', 'cookie-notice' ) . ': <b>' . home_url() . '</b></p>
290
  <p>' . __( 'Site Name', 'cookie-notice' ) . ': <b>' . get_bloginfo( 'name' ) . '</b></p>
291
  </div>
292
- ' // <div id="cn_preview_frame"><img src=" ' . esc_url( $theme->get_screenshot() ) . '" /></div>
293
- . '<div id="cn_preview_frame"><div id="cn_preview_frame_wrapper"><iframe id="cn_iframe_id" src="' . home_url( '/?cn_preview_mode=0' ) . '" scrolling="no" frameborder="0"></iframe></div></div>
294
- <div class="cn-buttons">
295
- <button type="button" class="cn-btn cn-btn-lg cn-screen-button" data-screen="2"><span class="cn-spinner"></span>' . __( 'Launch Live Demo', 'cookie-notice' ) . '</button>
 
 
 
 
 
296
  </div>
 
 
297
  </div>';
298
  } elseif ( $screen === 'configure' ) {
299
  $html .= '
@@ -301,15 +441,15 @@ class Cookie_Notice_Welcome {
301
  <div class="cn-inner">
302
  <div class="cn-header">
303
  <div class="cn-top-bar">
304
- <div class="cn-logo"><img src="//cno2-53eb.kxcdn.com/cookie-compliance-logo.png" alt="Cookie Compliance logo" /></div>
305
  </div>
306
  </div>
307
  <div class="cn-body">
308
- <h2>' . __( 'Compliance Live Demo', 'cookie-notice' ) . '</h2>
309
- <div class="cn-lead"><p>' . __( 'Simulate the upgraded Cookie Compliance&trade; design and compliance features through the options below. Click Add Copmliance to save the configuration and go to creating your Cookie Compliance&trade; account.', 'cookie-notice' ) . '</p></div>
310
  <form id="cn-form-configure" class="cn-form" action="" data-action="configure">
311
  <div class="cn-accordion">
312
- <div class="cn-accordion-item cn-form-container">
313
  <div class="cn-accordion-header cn-form-header"><button class="cn-accordion-button" type="button">' . __( 'Banner Compliance', 'cookie-notice' ) . '</button></div>
314
  <div class="cn-accordion-collapse cn-form">
315
  <div class="cn-form-feedback cn-hidden"></div>' .
@@ -338,16 +478,29 @@ class Cookie_Notice_Welcome {
338
  </div>
339
  </div>
340
  <div id="cn_purposes" class="cn-field cn-field-checkbox">
341
- <label>' . __( 'What kind of services is your site using? Check all that apply', 'cookie-notice' ) . ':</label>
342
  <div class="cn-checkbox-wrapper">
343
  <label for="cn_purposes_functional"><input id="cn_purposes_functional" type="checkbox" name="cn_purposes" value="1" checked><span>' . __( 'I use personalization services on my site​', 'cookie-notice' ) . '</span></label>
344
  <label for="cn_purposes_analytics"><input id="cn_purposes_analytics" type="checkbox" name="cn_purposes" value="2"><span>' . __( 'I collect and analyse information about my website’s traffic', 'cookie-notice' ) . '</span></label>
345
  <label for="cn_purposes_marketing"><input id="cn_purposes_marketing" type="checkbox" name="cn_purposes" value="3"><span>' . __( 'I run targeted ads on my site using, for example, Google Adsense​', 'cookie-notice' ) . '</span></label>
346
  </div>
347
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
348
  </div>
349
  </div>
350
- <div class="cn-accordion-item cn-form-container cn-collapsed">
351
  <div class="cn-accordion-header cn-form-header"><button class="cn-accordion-button" type="button">' . __( 'Banner Design', 'cookie-notice' ) . '</button></div>
352
  <div class="cn-accordion-collapse cn-form">
353
  <div class="cn-form-feedback cn-hidden"></div>
@@ -356,9 +509,9 @@ class Cookie_Notice_Welcome {
356
  <div class="cn-radio-image-wrapper">
357
  <label for="cn_position_bottom"><input id="cn_position_bottom" type="radio" name="cn_position" value="bottom" title="' . __( 'Bottom', 'cookie-notice' ) . '" checked><img src="' . plugins_url( '../img/layout-bottom.png', __FILE__ ) . '" width="24" height="24"></label>
358
  <label for="cn_position_top"><input id="cn_position_top" type="radio" name="cn_position" value="top" title="' . __( 'Top', 'cookie-notice' ) . '"><img src="' . plugins_url( '../img/layout-top.png', __FILE__ ) . '" width="24" height="24"></label>
359
- <label for="cn_position_left"><input id="cn_position_left" type="radio" name="cn_position" value="left" title="' . __( 'Left', 'cookie-notice' ) . '"><img src="' . plugins_url( '../img/layout-left.png', __FILE__ ) . '" width="24" height="24"></label>
360
- <label for="cn_position_right"><input id="cn_position_right" type="radio" name="cn_position" value="right" title="' . __( 'Right', 'cookie-notice' ) . '"><img src="' . plugins_url( '../img/layout-right.png', __FILE__ ) . '" width="24" height="24"></label>
361
- <label for="cn_position_center"><input id="cn_position_center" type="radio" name="cn_position" value="center" title="' . __( 'Center', 'cookie-notice' ) . '"><img src="' . plugins_url( '../img/layout-center.png', __FILE__ ) . '" width="24" height="24"></label>
362
  </div>
363
  </div>
364
  <div class="cn-field cn-fieldset">
@@ -366,17 +519,18 @@ class Cookie_Notice_Welcome {
366
  <div class="cn-checkbox-wrapper cn-color-picker-wrapper">
367
  <label for="cn_color_primary"><input id="cn_color_primary" class="cn-color-picker" type="checkbox" name="cn_color_primary" value="#20c19e"><span>' . __( 'Color of the buttons and interactive elements.', 'cookie-notice' ) . '</span></label>
368
  <label for="cn_color_background"><input id="cn_color_background" class="cn-color-picker" type="checkbox" name="cn_color_background" value="#32323a"><span>' . __( 'Color of the banner background.', 'cookie-notice' ) . '</span></label>
369
- <label for="cn_color_border"><input id="cn_color_border" class="cn-color-picker" type="checkbox" name="cn_color_border" value="#86858b"><span>' . __( 'Color of the borders and inactive elements.', 'cookie-notice' ) . '</span></label>
370
- <label for="cn_color_text"><input id="cn_color_text" class="cn-color-picker" type="checkbox" name="cn_color_text" value="#ffffff"><span>' . __( 'Color of the body text.', 'cookie-notice' ) . '</span></label>
371
- <label for="cn_color_heading"><input id="cn_color_heading" class="cn-color-picker" type="checkbox" name="cn_color_heading" value="#86858b"><span>' . __( 'Color of the heading text.', 'cookie-notice' ) . '</span></label>
372
- <label for="cn_color_button_text"><input id="cn_color_button_text" class="cn-color-picker" type="checkbox" name="cn_color_button_text" value="#ffffff"><span>' . __( 'Color of the button text.', 'cookie-notice' ) . '</span></label>
373
  </div>
374
  </div>
 
375
  </div>
376
  </div>
377
  </div>
378
  <div class="cn-field cn-field-submit cn-nav">
379
- <button type="button" class="cn-btn cn-screen-button" data-screen="3"><span class="cn-spinner"></span>' . __( 'Add Compliance', 'cookie-notice' ) . '</button>
380
  </div>';
381
 
382
  $html .= wp_nonce_field( 'cn_api_configure', 'cn_nonce', true, false );
@@ -390,17 +544,17 @@ class Cookie_Notice_Welcome {
390
  <div class="cn-inner">
391
  <div class="cn-header">
392
  <div class="cn-top-bar">
393
- <div class="cn-logo"><img src="//cno3-53eb.kxcdn.com/cookie-compliance-logo.png" alt="Cookie Compliance logo" /></div>
394
  </div>
395
  </div>
396
  <div class="cn-body">
397
- <h2>' . __( 'GDPR & CCPA Upgrade Ready', 'cookie-notice' ) . '</h2>
398
  <div class="cn-lead">
399
- <p>' . __( 'To start using The Next Generation of Cookie Notice create a Cookie Compliance&trade; account. Then you will be asked to select plan and authorize your subscription.', 'cookie-notice' ) . '</p>
400
  </div>
401
  <div class="cn-accordion">
402
- <div id="cn-accordion-account" class="cn-accordion-item cn-form-container">
403
- <div class="cn-accordion-header cn-form-header"><button class="cn-accordion-button" type="button">' . __( 'Create Account', 'cookie-notice' ) . '</button></div>
404
  <div class="cn-accordion-collapse">
405
  <form class="cn-form" action="" data-action="register">
406
  <div class="cn-form-feedback cn-hidden"></div>
@@ -419,7 +573,7 @@ class Cookie_Notice_Welcome {
419
  </div>
420
  </div>
421
  <div class="cn-field cn-field-submit cn-nav">
422
- <button type="submit" class="cn-btn cn-screen-button" tabindex="4" ' . /* data-screen="3" */ '><span class="cn-spinner"></span>' . __( 'Sign Up', 'cookie-notice' ) . '</button>
423
  </div>';
424
 
425
  // get site language
@@ -435,53 +589,63 @@ class Cookie_Notice_Welcome {
435
  </form>
436
  <p>' . __( 'Already have an account?', 'cookie-notice' ) . ' <a href="#" class="cn-screen-button" data-screen="login">' . __( 'Sign in', 'cookie-notice' ). '</a></p>
437
  </div>
438
- </div>
439
- <div id="cn-accordion-billing" class="cn-accordion-item cn-form-container cn-disabled">
 
 
440
  <div class="cn-accordion-header cn-form-header">
441
- <button class="cn-accordion-button" type="button">' . __( 'Account Plan', 'cookie-notice' ) . '</button>
442
  </div>
443
  <form class="cn-accordion-collapse cn-form cn-form-disabled" action="" data-action="payment">
444
  <div class="cn-form-feedback cn-hidden"></div>
445
  <div class="cn-field cn-field-radio">
446
  <div class="cn-radio-wrapper cn-plan-wrapper">
447
- <label for="cn_field_plan_monthly"><input id="cn_field_plan_monthly" type="radio" name="plan" value="compliance_monthly" checked><span><span class="cn-plan-description">' . __( '<b>14 days</b> Free Trial', 'cookie-notice' ) . '</span><span class="cn-plan-pricing">then <span class="cn-plan-price">$14.95</span>' . __( '/mo', 'cookie-notice' ) . '</span><span class="cn-plan-overlay"></span></span></label>
448
- <label for="cn_field_plan_yearly"><input id="cn_field_plan_yearly" type="radio" name="plan" value="compliance_yearly"><span><span class="cn-plan-description">' . __( '<b>30 days</b> Free Trial', 'cookie-notice' ) . '</span><span class="cn-plan-pricing">then <span class="cn-plan-price">$149.50</span>' . __( '/yr', 'cookie-notice' ) . ' <span class="cn-price-off">(' . __( '15% off', 'cookie-notice' ) . ')</span></span><span class="cn-plan-overlay"></span></span></label>
 
449
  </div>
450
  </div>
451
- <div class="cn-field cn-field-radio">
452
- <label>' . __( 'Subscription Method', 'cookie-notice' ) . '</label>
453
- <div class="cn-radio-wrapper cn-horizontal-wrapper">
454
- <label for="cn_field_method_credit_card"><input id="cn_field_method_credit_card" type="radio" name="method" value="credit_card" checked><span>' . __( 'Credit Card', 'cookie-notice' ) . '</span></label>
455
- <label for="cn_field_method_paypal"><input id="cn_field_method_paypal" type="radio" name="method" value="paypal"><span>' . __( 'PayPal', 'cookie-notice' ) . '</span></label>
456
- </div>
457
  </div>
458
- <div class="cn-fieldset" id="cn_payment_method_credit_card">
459
- <input type="hidden" name="payment_nonce" value="" />
460
- <div class="cn-field cn-field-text">
461
- <label for="cn_card_number">' . __( 'Card Number', 'cookie-notice' ) . '</label>
462
- <div id="cn_card_number"></div>
463
- </div>
464
- <div class="cn-field cn-field-text cn-field-half cn-field-first">
465
- <label for="cn_expiration_date">' . __( 'Expiration Date', 'cookie-notice' ) . '</label>
466
- <div id="cn_expiration_date"></div>
467
  </div>
468
- <div class="cn-field cn-field-text cn-field-half cn-field-last">
469
- <label for="cn_cvv">' . __( 'CVC/CVV', 'cookie-notice' ) . '</label>
470
- <div id="cn_cvv"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
471
  </div>
472
- <div class="cn-field cn-field-submit cn-nav">
473
- <button type="submit" class="cn-btn cn-screen-button" tabindex="4" data-screen="4"><span class="cn-spinner"></span>' . __( 'Start Free Trial', 'cookie-notice' ) . '</button>
474
  </div>
475
- </div>
476
- <div class="cn-fieldset" id="cn_payment_method_paypal" style="display: none;">
477
- <div id="cn_paypal_button"></div>
478
  </div>';
479
 
480
  $html .= wp_nonce_field( 'cn_api_payment', 'cn_payment_nonce', true, false );
481
 
482
  $html .= '
483
  </form>
484
- </div>
 
 
485
  </div>
486
  </div>';
487
  } elseif ( $screen === 'login' ) {
@@ -490,17 +654,17 @@ class Cookie_Notice_Welcome {
490
  <div class="cn-inner">
491
  <div class="cn-header">
492
  <div class="cn-top-bar">
493
- <div class="cn-logo"><img src="//cno3-53eb.kxcdn.com/cookie-compliance-logo.png" alt="Cookie Compliance logo" /></div>
494
  </div>
495
  </div>
496
  <div class="cn-body">
497
  <h2>' . __( 'Compliance Sign in', 'cookie-notice' ) . '</h2>
498
  <div class="cn-lead">
499
- <p>' . __( 'Sign in to your existing Cookie Compliance&trade; account to continue upgrading of this website.', 'cookie-notice' ) . '</p>
500
  </div>
501
  <div class="cn-accordion">
502
- <div id="cn-accordion-account" class="cn-accordion-item cn-form-container">
503
- <div class="cn-accordion-header cn-form-header"><button class="cn-accordion-button" type="button">' . __( 'Account Login', 'cookie-notice' ) . '</button></div>
504
  <div class="cn-accordion-collapse">
505
  <form class="cn-form" action="" data-action="login">
506
  <div class="cn-form-feedback cn-hidden"></div>
@@ -527,46 +691,54 @@ class Cookie_Notice_Welcome {
527
  </form>
528
  <p>' . __( 'Don\'t have an account yet?', 'cookie-notice' ) . ' <a href="#" class="cn-screen-button" data-screen="register">' . __( 'Sign up', 'cookie-notice' ) . '</a></p>
529
  </div>
530
- </div>
531
- <div id="cn-accordion-billing" class="cn-accordion-item cn-form-container cn-disabled">
 
 
532
  <div class="cn-accordion-header cn-form-header">
533
- <button class="cn-accordion-button" type="button">' . __( 'Compliance Plan', 'cookie-notice' ) . '</button>
534
  </div>
535
  <form class="cn-accordion-collapse cn-form cn-form-disabled" action="" data-action="payment">
536
  <div class="cn-form-feedback cn-hidden"></div>
537
  <div class="cn-field cn-field-radio">
538
  <div class="cn-radio-wrapper cn-plan-wrapper">
539
- <label for="cn_field_plan_monthly"><input id="cn_field_plan_monthly" type="radio" name="plan" value="compliance_monthly" checked><span><span class="cn-plan-description">' . __( '<b>14 days</b> Free Trial', 'cookie-notice' ) . '</span><span class="cn-plan-pricing">then <span class="cn-plan-price">$14.95</span>' . __( '/mo', 'cookie-notice' ) . '</span><span class="cn-plan-overlay"></span></span></label>
540
- <label for="cn_field_plan_yearly"><input id="cn_field_plan_yearly" type="radio" name="plan" value="compliance_yearly"><span><span class="cn-plan-description">' . __( '<b>30 days</b> Free Trial', 'cookie-notice' ) . ' <span class="cn-price-off">(15% off)</span></span><span class="cn-plan-pricing">then <span class="cn-plan-price">$149.50</span>' . __( '/yr', 'cookie-notice' ) . '</span><span class="cn-plan-overlay"></span></span></label>
 
541
  </div>
542
  </div>
543
- <div class="cn-field cn-field-radio">
544
- <label>' . __( 'Subscription Method', 'cookie-notice' ) . '</label>
545
- <div class="cn-radio-wrapper cn-horizontal-wrapper">
546
- <label for="cn_field_method_credit_card"><input id="cn_field_method_credit_card" type="radio" name="method" value="credit_card" checked><span>' . __( 'Credit Card', 'cookie-notice' ) . '</span></label>
547
- <label for="cn_field_method_paypal"><input id="cn_field_method_paypal" type="radio" name="method" value="paypal"><span>' . __( 'PayPal', 'cookie-notice' ) . '</span></label>
548
- </div>
549
  </div>
550
- <div class="cn-fieldset" id="cn_payment_method_credit_card">
551
- <input type="hidden" name="payment_nonce" value="" />
552
- <div class="cn-field cn-field-text">
553
- <label for="cn_card_number">' . __( 'Card Number', 'cookie-notice' ) . '</label>
554
- <div id="cn_card_number"></div>
555
- </div>
556
- <div class="cn-field cn-field-text cn-field-half cn-field-first">
557
- <label for="cn_expiration_date">' . __( 'Expiration Date', 'cookie-notice' ) . '</label>
558
- <div id="cn_expiration_date"></div>
559
  </div>
560
- <div class="cn-field cn-field-text cn-field-half cn-field-last">
561
- <label for="cn_cvv">' . __( 'CVC/CVV', 'cookie-notice' ) . '</label>
562
- <div id="cn_cvv"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
563
  </div>
564
- <div class="cn-field cn-field-submit cn-nav">
565
- <button type="submit" class="cn-btn cn-screen-button" tabindex="4" data-screen="4"><span class="cn-spinner"></span>' . __( 'Start Free Trial', 'cookie-notice' ) . '</button>
566
  </div>
567
- </div>
568
- <div class="cn-fieldset" id="cn_payment_method_paypal" style="display: none;">
569
- <div id="cn_paypal_button"></div>
570
  </div>';
571
 
572
  $html .= wp_nonce_field( 'cn_api_payment', 'cn_payment_nonce', true, false );
@@ -582,7 +754,7 @@ class Cookie_Notice_Welcome {
582
  <div class="cn-inner">
583
  <div class="cn-header">
584
  <div class="cn-top-bar">
585
- <div class="cn-logo"><img src="//cno0-53eb.kxcdn.com/cookie-compliance-logo.png" alt="Cookie Compliance logo" /></div>
586
  </div>
587
  </div>
588
  <div class="cn-body">
@@ -591,12 +763,13 @@ class Cookie_Notice_Welcome {
591
  </div>';
592
  }
593
 
 
594
  $html .= '
595
  <div class="cn-footer">';
596
-
597
  switch ( $screen ) {
598
  case 'about':
599
- $html .= '<a href="' . esc_url( admin_url( 'admin.php?page=cookie-notice' ) ) . '" class="cn-btn cn-btn-link cn-skip-button">' . __( 'Remind me later', 'cookie-notice' ) . '</a>';
600
  break;
601
  case 'success':
602
  $html .= '<a href="' . esc_url( get_dashboard_url() ) . '" class="cn-btn cn-btn-link cn-skip-button">' . __( 'WordPress Dashboard', 'cookie-notice' ) . '</a>';
@@ -605,7 +778,7 @@ class Cookie_Notice_Welcome {
605
  $html .= '<a href="' . esc_url( admin_url( 'admin.php?page=cookie-notice' ) ) . '" class="cn-btn cn-btn-link cn-skip-button">' . __( 'Skip for now', 'cookie-notice' ) . '</a>';
606
  break;
607
  }
608
-
609
  $html .= '
610
  </div>
611
  </div>
14
 
15
  public function __construct() {
16
  // actions
 
 
17
  add_action( 'admin_init', array( $this, 'welcome' ) );
 
18
  add_action( 'wp_ajax_cn_welcome_screen', array( $this, 'welcome_screen' ) );
19
 
 
 
 
 
20
  $this->app_login_url = 'https://app.hu-manity.co/#/en/cc2/login';
21
  }
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  /**
24
  * Load scripts and styles - admin.
25
  */
26
  public function admin_enqueue_scripts( $page ) {
27
+ if ( in_array( Cookie_Notice()->get_status(), array( 'active', 'pending' ) ) )
28
  return;
29
+
30
+ wp_enqueue_style( 'dashicons' );
31
+
32
+ wp_enqueue_style( 'cookie-notice-modaal', plugins_url( '../assets/modaal/css/modaal.min.css', __FILE__ ), array(), Cookie_Notice()->defaults['version'] );
33
+ wp_enqueue_script( 'cookie-notice-modaal', plugins_url( '../assets/modaal/js/modaal.min.js', __FILE__ ), array(), Cookie_Notice()->defaults['version'] );
34
+
35
  wp_enqueue_style( 'cookie-notice-spectrum', plugins_url( '../assets/spectrum/spectrum.min.css', __FILE__ ), array(), Cookie_Notice()->defaults['version'] );
36
+
37
+ wp_enqueue_style( 'cookie-notice-microtip', plugins_url( '../assets/microtip/microtip.min.css', __FILE__ ), array(), Cookie_Notice()->defaults['version'] );
38
 
39
  wp_enqueue_script( 'cookie-notice-spectrum', plugins_url( '../assets/spectrum/spectrum.min.js', __FILE__ ), array(), Cookie_Notice()->defaults['version'] );
40
+ wp_enqueue_script( 'cookie-notice-welcome', plugins_url( '../js/admin-welcome.js', __FILE__ ), array( 'jquery', 'jquery-ui-core', 'jquery-ui-progressbar' ), Cookie_Notice()->defaults['version'] );
41
  wp_enqueue_script( 'cookie-notice-braintree-client', 'https://js.braintreegateway.com/web/3.71.0/js/client.min.js', array(), null, false );
42
  wp_enqueue_script( 'cookie-notice-braintree-hostedfields', 'https://js.braintreegateway.com/web/3.71.0/js/hosted-fields.min.js', array(), null, false );
43
  wp_enqueue_script( 'cookie-notice-braintree-paypal', 'https://js.braintreegateway.com/web/3.71.0/js/paypal-checkout.min.js', array(), null, false );
44
+
45
+ $js_args = array(
46
+ 'ajaxURL' => admin_url( 'admin-ajax.php' ),
47
+ 'nonce' => wp_create_nonce( 'cookie-notice-welcome' ),
48
+ 'initModal' => get_transient( 'cn_show_welcome' ), // welcome modal
49
+ 'error' => __( 'Unexpected error occurred. Please try again later.', 'cookie-notice' ),
50
+ 'statusPassed' => __( 'Passed', 'cookie-notice' ),
51
+ 'statusFailed' => __( 'Failed', 'cookie-notice' ),
52
+ 'complianceStatus' => Cookie_Notice()->get_status(),
53
+ 'complianceFailed' => __( '<em>Compliance Failed!</em>Your website does not achieve minimum viable compliance. <b><a href="#" class="cn-sign-up">Sign up to Cookie Compliance</a></b> to bring your site into compliance with the latest data privacy rules and regulations.', 'cookie-notice' ),
54
+ 'compliancePassed' => __( '<em>Compliance Passed!</em>Congratulations. Your website meets minimum viable compliance.', 'cookie-notice' ),
55
+ 'invalidFields' => __( 'Please fill all the required fields.', 'cookie-notice' )
56
+ );
57
+
58
+ // delete the show modal transient
59
+ delete_transient( 'cn_show_welcome' );
60
 
61
  wp_localize_script(
62
  'cookie-notice-welcome',
63
+ 'cnWelcomeArgs',
64
+ $js_args
 
 
 
 
 
65
  );
66
 
67
  wp_enqueue_style( 'cookie-notice-welcome', plugins_url( '../css/admin-welcome.css', __FILE__ ) );
86
  * @return void
87
  */
88
  public function welcome() {
89
+ global $pagenow;
90
+
91
+ if ( $pagenow != 'admin.php' )
92
+ return;
93
+
94
+ if ( isset( $_GET['page'] ) && $_GET['page'] !== 'cookie-notice' )
95
  return;
 
 
 
96
 
97
  // bail if activating from network, or bulk, or within an iFrame
98
  if ( is_network_admin() || isset( $_GET['activate-multi'] ) || defined( 'IFRAME_REQUEST' ) )
101
  if ( (isset( $_GET['action'] ) && 'upgrade-plugin' == $_GET['action']) && (isset( $_GET['plugin'] ) && strstr( $_GET['plugin'], 'cookie-notice.php' )) )
102
  return;
103
 
104
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
105
+ add_action( 'admin_footer', array( $this, 'admin_footer' ) );
106
+
107
+ add_filter( 'admin_body_class', array( $this, 'admin_body_class' ) );
108
+ }
109
+
110
+ /**
111
+ * Welcome modal container.
112
+ */
113
+ public function admin_footer() {
114
+ echo '<button id="cn-modal-trigger" style="display:none;"></button>';
115
  }
116
 
117
  /**
134
  * @return mixed
135
  */
136
  public function welcome_screen( $screen, $echo = true ) {
137
+ global $current_user;
138
+
139
  if ( ! current_user_can( 'install_plugins' ) )
140
  wp_die( _( 'You do not have permission to access this page.', 'cookie-notice' ) );
141
 
162
 
163
  if ( $screen == 1 ) {
164
  $html .= $this->welcome_screen( 'about', false );
165
+
166
  $html .= '
167
  <div class="cn-content cn-sidebar-visible">
168
  <div class="cn-inner">
170
  <h1><b>Cookie Compliance&trade;</b></h1>
171
  <h2>' . __( 'The next generation of Cookie Notice', 'cookie-notice' ) . '</h2>
172
  <div class="cn-lead">
173
+ <p><b>' . __( 'Cookie Compliance is a free web application that enables websites to take a proactive approach to data protection and consent laws.', 'cookie-notice' ) . '</b></p>
174
+ <div class="cn-hero-image">
175
+ <div class="cn-flex-item">
176
+ <img src="' . plugins_url( '../img/screen-compliance.png', __FILE__ ) . '" alt="Cookie Notice dashboard" />
177
+ </div>
178
+ </div>
179
+ <p>' . __( 'It is the first solution to offer <b>intentional consent</b>, a new consent framework that incorporates the latest guidelines from over 100+ countries, and emerging standards from leading international organizations like the IEEE.', 'cookie-notice' ) . '</p>
180
+ <p>' . __( 'Cookie Notice includes <b>seamless integration</b> with Cookie Compliance to help your site comply with the latest updates to existing consent laws and provide a beautiful, multi-level experience to engage visitors in data privacy decisions.', 'cookie-notice' ) . '</p>
181
+ </div>';
182
+ /*
183
+ <div class="cn-lead">
184
+ <p>' . __( 'Rules and regulations around cookie consent are <b>becoming more strict</b>, and enforcement of violations is rapidly increasing. So far in 2021, companies have paid fines totaling over €18M.', 'cookie-notice' ) . '</p>
185
+ <p>' . __( 'If your website collects visitor data and does not (1) <b>Autoblock</b> cookies, (2) enable visitors to consent by <b>Cookie Category</b>, and/or (3) store <b>Proof-of-Consent</b>, your business is at risk.', 'cookie-notice' ) . '</p>
186
+ <p>' . sprintf( __( 'Cookie Notice %s includes integration with <b>Cookie Compliance&trade;</b> web application that will help your site meet minimum viable compliance based on updates to existing laws (GDPR, CCPA) and introduction of new laws (ePrivacy, PECR).', 'cookie-notice' ), Cookie_Notice()->defaults['version'] ) . '</p>
187
  </div>
188
+ */
189
+ $html .= '
190
+ <div class="cn-buttons">
191
+ <button type="button" class="cn-btn cn-btn-lg cn-screen-button" data-screen="3"><span class="cn-spinner"></span>' . __( 'Sign up to Cookie Compliance', 'cookie-notice' ) . '</button><br />
192
+ <button type="button" class="cn-btn cn-btn-lg cn-btn-transparent cn-skip-button">' . __( 'Skip for now', 'cookie-notice' ) . '</button>
193
  </div>
194
+ ';
195
+ /*
196
+ $html .= '
197
+ <div class="cn-hero-image">
198
+ <div class="cn-flex-item">
199
+ <div class="cn-logo-container">
200
+ <img src="' . plugins_url( '../img/cookie-notice-logo-dark.png', __FILE__ ) . '">
201
+ <span class="cn-badge">' . __( 'WP Plugin', 'cookie-notice' ) . '</span>
202
+ </div>
203
+ <img src="' . plugins_url( '../img/screen-notice.png', __FILE__ ) . '" alt="Cookie Notice dashboard" />
204
+ <ul>
205
+ <li><span>' . __( 'Customizable notice message', 'cookie-notice' ) . '</span></li>
206
+ <li><span>' . __( 'Consent on click, scroll or close', 'cookie-notice' ) . '</span></li>
207
+ <li><span>' . __( 'Multiple cookie expiry options', 'cookie-notice' ) . '</span></li>
208
+ <li><span>' . __( 'Link to Privacy Policy page', 'cookie-notice' ) . '</span></li>
209
+ </ul>
210
+ </div>
211
+ <div class="cn-flex-item">
212
+ <img src="//cno0-53eb.kxcdn.com/screen-plus.png" alt="Cookie Notice + Compliance" />
213
+ </div>
214
+ <div class="cn-flex-item">
215
+ <div class="cn-logo-container">
216
+ <img src="' . plugins_url( '../img/cookie-compliance-logo-dark.png', __FILE__ ) . '">
217
+ <span class="cn-badge">' . __( 'Web App', 'cookie-notice' ) . '</span>
218
+ </div>
219
+ <img src="' . plugins_url( '../img/screen-compliance.png', __FILE__ ) . '"alt="Cookie Compliance dashboard" />
220
+ <ul>
221
+ <li><span>' . __( 'Customizable <b>GDPR & CCPA</b> notice templates', 'cookie-notice' ) . '</span></li>
222
+ <li><span>' . __( '<b>Consent Analytics</b> Dashboard', 'cookie-notice' ) . '</span></li>
223
+ <li><span>' . __( 'Cookie <b>Autoblocking</b> (complies with GDPR Art.7)', 'cookie-notice' ) . '</span></li>
224
+ <li><span>' . __( '<b>Cookie Categories</b> (complies with GDPR Art.32)', 'cookie-notice' ) . '</span></li>
225
+ <li><span>' . __( '<b>Proof-of-Consent</b> Storage (complies with GDPR Art.30)', 'cookie-notice' ) . '</span></li>
226
+ <li><span>' . __( "Link to <b>'Do Not Sell'</b> page (supports CCPA Sec.1798)", 'cookie-notice' ) . '</span></li>
227
+ <li><span>' . __( 'Enhanced design controls and options', 'cookie-notice' ) . '</span></li>
228
+ <li><span>' . __( 'Multiple new banner positions', 'cookie-notice' ) . '</span></li>
229
+ <li><span>' . __( 'Custom language localization', 'cookie-notice' ) . '</span></li>
230
+ </ul>
231
+ </div>
232
  </div>
233
+ */
234
+
235
+ $html .= '
236
  </div>
237
  </div>
238
  </div>';
239
+
240
  } elseif ( $screen == 2 ) {
241
  $html .= $this->welcome_screen( 'configure', false );
242
 
251
  // echo '<pre>'; print_r( $app_config ); echo '</pre>';
252
 
253
  $html .= $this->welcome_screen( 'register', false );
254
+
255
  $html .= '
256
  <div class="cn-content cn-sidebar-visible">
257
  <div class="cn-inner">
258
  <div class="cn-content-full">
259
+ <h1><b>Cookie Compliance&trade;</b></h1>
260
  <h2>' . __( 'The next generation of Cookie Notice', 'cookie-notice' ) . '</h2>
261
  <div class="cn-lead">
262
+ <p>' . __( 'Take a proactive approach to data protection and consent laws by signing up for Cookie Compliance account. Then select a limited Basic Plan for free or get one of the Professional Plans for unlimited visits, consent storage, languages and customizations.', 'cookie-notice' ) . '</p>
263
+ </div>';
264
+ /*
265
+ <div class="cn-billing-wrapper cn-radio-wrapper">
266
+ <label for="cn_billing_monthly"><input id="cn_billing_monthly" type="radio" name="cn_billing" value="monthly" checked><span><span>' . __( 'Billing Monthly', 'cookie-notice' ) . '</span><span class="cn-plan-overlay"></span></span></label><label for="cn_billing_yearly"><input id="cn_billing_yearly" type="radio" name="cn_billing" value="yearly"><span><span>' . __( 'Billing Yearly', 'cookie-notice' ) . '</span> <span class="cn-price-off">(' . __( '15% off', 'cookie-notice' ) . ')</span><span class="cn-plan-overlay"></span></span></label>
267
  </div>
268
+
269
+ $html .= '
270
  <div class="cn-hero-image">
271
  <div class="cn-flex-item">
272
  <div class="cn-logo-container">
273
  <img src="' . plugins_url( '../img/cookie-notice-logo-dark.png', __FILE__ ) . '">
274
  <span class="cn-badge">' . __( 'WP Plugin', 'cookie-notice' ) . '</span>
275
  </div>
276
+ <img src="' . plugins_url( '../img/screen-notice.png', __FILE__ ) . '" alt="Cookie Notice dashboard" />
277
+ <ul class="cn-features-list">
278
+ <li><span>' . __( '<b>Free</b>', 'cookie-notice' ) . '</span></li>
279
  <li><span>' . __( 'Customizable notice message', 'cookie-notice' ) . '</span></li>
280
  <li><span>' . __( 'Consent on click, scroll or close', 'cookie-notice' ) . '</span></li>
 
281
  <li><span>' . __( 'Link to Privacy Policy page', 'cookie-notice' ) . '</span></li>
282
  </ul>
283
  </div>
289
  <img src="' . plugins_url( '../img/cookie-compliance-logo-dark.png', __FILE__ ) . '">
290
  <span class="cn-badge">' . __( 'Web App', 'cookie-notice' ) . '</span>
291
  </div>
292
+ <img src="' . plugins_url( '../img/screen-compliance.png', __FILE__ ) . '"alt="Cookie Compliance dashboard" />
293
+ <ul class="cn-features-list">
294
+ <li><span>' . __( '<b>Free plan</b>', 'cookie-notice' ) . '</span></li>
295
+ <li><span>' . __( 'Consent Analytics Dashboard', 'cookie-notice' ) . '</span></li>
296
+ <li><span>' . __( 'Cookie Autoblocking', 'cookie-notice' ) . '</span></li>
297
+ <li><span>' . __( 'Cookie Categories', 'cookie-notice' ) . '</span></li>
298
+ <li><span>' . __( 'Proof-of-Consent Storage', 'cookie-notice' ) . '</span></li>
299
+ <li><span>' . __( "Link to 'Do Not Sell' page", 'cookie-notice' ) . '</span></li>
 
 
 
300
  </ul>
301
  </div>
302
+ </div>';
303
+ */
304
+
305
+ $html .= '
306
+ <h3 class="cn-pricing-select">' . __( 'Compliance Plans', 'cookie-notice' ) . ':</h3>
307
+ <div class="cn-pricing-table">
308
+ <label class="cn-pricing-item" for="cn_pricing_plan_free">
309
+ <input id="cn_pricing_plan_free" type="radio" name="cn_pricing_plan" value="free">
310
+ <div class="cn-pricing-info">
311
+ <div class="cn-pricing-head">
312
+ <h4>' . __( 'Basic', 'cookie-notice' ) . '</h4>
313
+ <span class="cn-plan-pricing"><span class="cn-plan-price">' . __( 'Free', 'cookie-notice' ) . '</span></span>
314
+ </div>
315
+ <div class="cn-pricing-body">
316
+ <p class="cn-included"><span class="cn-icon"></span>' . __( 'GDPR, CCPA, ePrivacy, PECR compliance', 'cookie-notice' ) . '</p>
317
+ <p class="cn-included"><span class="cn-icon"></span>' . __( 'Consent Analytics Dashboard', 'cookie-notice' ) . '</p>
318
+ <p class="cn-excluded"><span class="cn-icon"></span>' . __( '<b>10,000</b> visits', 'cookie-notice' ) . '</p>
319
+ <p class="cn-excluded"><span class="cn-icon"></span>' . __( '<b>30 days</b> consent storage', 'cookie-notice' ) . '</p>
320
+ <p class="cn-excluded"><span class="cn-icon"></span>' . __( '<b>1 additional</b> language', 'cookie-notice' ) . '</p>
321
+ <p class="cn-excluded"><span class="cn-icon"></span>' . __( '<b>Basic</b> Support', 'cookie-notice' ) . '</p>
322
+ </div>
323
+ <div class="cn-pricing-footer">
324
+ <button type="button" class="cn-btn cn-btn-outline">' . __( 'Select Plan', 'cookie-notice' ) . '</button>
325
+ </div>
326
+ </div>
327
+ </label>
328
+ <label class="cn-pricing-item" for="cn_pricing_plan_monthly">
329
+ <input id="cn_pricing_plan_monthly" type="radio" name="cn_pricing_plan" value="monthly">
330
+ <div class="cn-pricing-info">
331
+ <div class="cn-pricing-head">
332
+ <h4>' . __( 'Professional Monthly', 'cookie-notice' ) . '</h4>
333
+ <span class="cn-plan-pricing"><span class="cn-plan-price"><sup>$</sup>14.95</span> / ' . __( 'month', 'cookie-notice' ) . '</span>
334
+ </div>
335
+ <div class="cn-pricing-body">
336
+ <p class="cn-included"><span class="cn-icon"></span>' . __( 'GDPR, CCPA, ePrivacy, PECR compliance', 'cookie-notice' ) . '</p>
337
+ <p class="cn-included"><span class="cn-icon"></span>' . __( 'Consent Analytics Dashboard', 'cookie-notice' ) . '</p>
338
+ <p class="cn-included"><span class="cn-icon"></span>' . __( '<b>Unlimited</b> visits', 'cookie-notice' ) . '</p>
339
+ <p class="cn-included"><span class="cn-icon"></span>' . __( '<b>Lifetime</b> consent storage', 'cookie-notice' ) . '</p>
340
+ <p class="cn-included"><span class="cn-icon"></span>' . __( '<b>Unlimited</b> languages', 'cookie-notice' ) . '</p>
341
+ <p class="cn-included"><span class="cn-icon"></span>' . __( '<b>Regular</b> Support', 'cookie-notice' ) . '</p>
342
+ </div>
343
+ <div class="cn-pricing-footer">
344
+ <button type="button" class="cn-btn cn-btn-outline">' . __( 'Select Plan', 'cookie-notice' ) . '</button>
345
+ </div>
346
+ </div>
347
+ </label>
348
+ <label class="cn-pricing-item" for="cn_pricing_plan_yearly">
349
+ <input id="cn_pricing_plan_yearly" type="radio" name="cn_pricing_plan" value="yearly">
350
+ <div class="cn-pricing-info">
351
+ <div class="cn-pricing-head">
352
+ <h4>' . __( 'Professional Yearly', 'cookie-notice' ) . '</h4>
353
+ <span class="cn-plan-pricing"><span class="cn-plan-price"><sup>$</sup>149.50</span> / ' . __( 'year', 'cookie-notice' ) . '</span>
354
+ <span class="cn-plan-promo">' . __( 'Best Value', 'cookie-notice' ) . '</span>
355
+ </div>
356
+ <div class="cn-pricing-body">
357
+ <p class="cn-included"><span class="cn-icon"></span>' . __( 'GDPR, CCPA, ePrivacy, PECR compliance', 'cookie-notice' ) . '</p>
358
+ <p class="cn-included"><span class="cn-icon"></span>' . __( 'Consent Analytics Dashboard', 'cookie-notice' ) . '</p>
359
+ <p class="cn-included"><span class="cn-icon"></span>' . __( '<b>Unlimited</b> visits', 'cookie-notice' ) . '</p>
360
+ <p class="cn-included"><span class="cn-icon"></span>' . __( '<b>Lifetime</b> consent storage', 'cookie-notice' ) . '</p>
361
+ <p class="cn-included"><span class="cn-icon"></span>' . __( '<b>Unlimited</b> languages', 'cookie-notice' ) . '</p>
362
+ <p class="cn-included"><span class="cn-icon"></span>' . __( '<b>Premium</b> Support', 'cookie-notice' ) . '</p>
363
+ </div>
364
+ <div class="cn-pricing-footer">
365
+ <button type="button" class="cn-btn cn-btn-outline">' . __( 'Select Plan', 'cookie-notice' ) . '</button>
366
+ </div>
367
+ </div>
368
+ </label>
369
  </div>
370
+ <div class="cn-buttons">
371
+ <button type="button" class="cn-btn cn-btn-lg cn-btn-transparent cn-skip-button">' . __( "I don’t want to create an account now", 'cookie-notice' ) . '</button>
372
+ </div>';
373
+
374
+
375
+ $html .= '
376
  </div>
377
  </div>
378
  </div>';
379
+
380
  } elseif ( $screen == 4 ) {
381
  $html .= $this->welcome_screen( 'success', false );
382
 
384
  <div class="cn-content cn-sidebar-visible">
385
  <div class="cn-inner">
386
  <div class="cn-content-full">
387
+ <h1><b>' . __( 'Congratulations', 'cookie-notice' ) . '</b></h1>
388
+ <h2>' . __( 'You are now promoting privacy with Hu-manity.co', 'cookie-notice' ) . '</h2>
389
  <div class="cn-lead">
390
+ <p>' . __( 'Log in to your Cookie Compliance&trade; account and continue configuring your Privacy Experience.', 'cookie-notice' ) . '</p>
391
  </div>
392
  <div class="cn-buttons">
393
  <a href="' . $this->app_login_url . '" class="cn-btn cn-btn-lg" target="_blank">' . __( 'Go to Application', 'cookie-notice' ) . '</a>
412
  <div class="cn-inner">
413
  <div class="cn-header">
414
  <div class="cn-top-bar">
415
+ <div class="cn-logo"><img src="' . plugins_url( '../img/cookie-notice-logo.png', __FILE__ ) . '" alt="Cookie Notice logo" /></div>
416
  </div>
417
  </div>
418
  <div class="cn-body">
419
+ <h2>' . __( 'Compliance check', 'cookie-notice' ) . '</h2>
420
+ <div class="cn-lead"><p>' . __( 'This is a Compliance Check to determine your site’s compliance with updated data processing and consent rules under GDPR, CCPA and other international data privacy laws.', 'cookie-notice' ) . '</p></div>
421
  <div id="cn_preview_about">
422
  <p>' . __( 'Site URL', 'cookie-notice' ) . ': <b>' . home_url() . '</b></p>
423
  <p>' . __( 'Site Name', 'cookie-notice' ) . ': <b>' . get_bloginfo( 'name' ) . '</b></p>
424
  </div>
425
+ <div class="cn-compliance-check">
426
+ <div class="cn-progressbar"><div class="cn-progress-label">' . __( 'Checking...', 'cookie-notice' ) . '</div></div>
427
+ <div class="cn-compliance-feedback cn-hidden"></div>
428
+ <div class="cn-compliance-results">
429
+ <div class="cn-compliance-item"><p><span class="cn-compliance-label">' . __( 'Cookie Notice', 'cookie-notice' ) . ' </span><span class="cn-compliance-status"></span></p><p><span class="cn-compliance-desc">' . __( 'Notifies visitors that site uses cookies.', 'cookie-notice' ) . '</span></p></div>
430
+ <div class="cn-compliance-item" style="display: none;"><p><span class="cn-compliance-label">' . __( 'Autoblocking', 'cookie-notice' ) . ' </span><span class="cn-compliance-status"></span></p><p><span class="cn-compliance-desc">' . __( 'Non-essential cookies blocked until consent is registered.', 'cookie-notice' ) . '</span></p></div>
431
+ <div class="cn-compliance-item" style="display: none;"><p><span class="cn-compliance-label">' . __( 'Cookie Categories', 'cookie-notice' ) . ' </span><span class="cn-compliance-status"></span></p><p><span class="cn-compliance-desc">' . __( 'Separate consent requested per purpose of use.', 'cookie-notice' ) . '</span></p></div>
432
+ <div class="cn-compliance-item" style="display: none;"><p><span class="cn-compliance-label">' . __( 'Proof-of-Consent', 'cookie-notice' ) . ' </span><span class="cn-compliance-status"></span></p><p><span class="cn-compliance-desc">' . __( 'Proof-of-consent stored in secure audit format.', 'cookie-notice' ) . '</span></p></div>
433
+ </div>
434
  </div>
435
+ ' /* <div id="cn_preview_frame"><img src=" ' . esc_url( $theme->get_screenshot() ) . '" /></div>
436
+ . '<div id="cn_preview_frame"><div id="cn_preview_frame_wrapper"><iframe id="cn_iframe_id" src="' . home_url( '/?cn_preview_mode=0' ) . '" scrolling="no" frameborder="0"></iframe></div></div> */ . '
437
  </div>';
438
  } elseif ( $screen === 'configure' ) {
439
  $html .= '
441
  <div class="cn-inner">
442
  <div class="cn-header">
443
  <div class="cn-top-bar">
444
+ <div class="cn-logo"><img src="' . plugins_url( '../img/cookie-notice-logo.png', __FILE__ ) . '" alt="Cookie Notice logo" /></div>
445
  </div>
446
  </div>
447
  <div class="cn-body">
448
+ <h2>' . __( 'Live Setup', 'cookie-notice' ) . '</h2>
449
+ <div class="cn-lead"><p>' . __( 'Configure your Cookie Notice & Compliance design and compliance features through the options below. Click Apply Setup to save the configuration and go to selecting your preferred cookie solution.', 'cookie-notice' ) . '</p></div>
450
  <form id="cn-form-configure" class="cn-form" action="" data-action="configure">
451
  <div class="cn-accordion">
452
+ <div class="cn-accordion-item cn-form-container" tabindex="-1">
453
  <div class="cn-accordion-header cn-form-header"><button class="cn-accordion-button" type="button">' . __( 'Banner Compliance', 'cookie-notice' ) . '</button></div>
454
  <div class="cn-accordion-collapse cn-form">
455
  <div class="cn-form-feedback cn-hidden"></div>' .
478
  </div>
479
  </div>
480
  <div id="cn_purposes" class="cn-field cn-field-checkbox">
481
+ <label>' . __( 'Select the type of of services your website is using', 'cookie-notice' ) . ':</label>
482
  <div class="cn-checkbox-wrapper">
483
  <label for="cn_purposes_functional"><input id="cn_purposes_functional" type="checkbox" name="cn_purposes" value="1" checked><span>' . __( 'I use personalization services on my site​', 'cookie-notice' ) . '</span></label>
484
  <label for="cn_purposes_analytics"><input id="cn_purposes_analytics" type="checkbox" name="cn_purposes" value="2"><span>' . __( 'I collect and analyse information about my website’s traffic', 'cookie-notice' ) . '</span></label>
485
  <label for="cn_purposes_marketing"><input id="cn_purposes_marketing" type="checkbox" name="cn_purposes" value="3"><span>' . __( 'I run targeted ads on my site using, for example, Google Adsense​', 'cookie-notice' ) . '</span></label>
486
  </div>
487
  </div>
488
+ <div class="cn-field cn-field-checkbox">
489
+ <label class="cn-asterix">' . __( 'Enable Cookie Categories (complies with GDPR Art.32)', 'cookie-notice' ) . '</label>
490
+ <div class="cn-checkbox-wrapper">
491
+ <label for="cn_customize_consent"><input id="cn_customize_consent" type="checkbox" name="cn_customize_consent" value="1" checked><span>' . __( 'Give your visitors the ability to customize their consent based on cookie purpose categories.', 'cookie-notice' ) . '</span></label>
492
+ </div>
493
+ </div>
494
+ <div class="cn-field cn-field-checkbox">
495
+ <label class="cn-asterix">' . __( 'Enable Autoblocking (complies with GDPR Art.7)', 'cookie-notice' ) . '</label>
496
+ <div class="cn-checkbox-wrapper">
497
+ <label for="cn_autoblocking"><input id="cn_customize_consent" type="checkbox" name="cn_autoblocking" value="1" checked><span>' . __( 'Automatically block 3rd party scripts before user consent.', 'cookie-notice' ) . '</span></label>
498
+ </div>
499
+ </div>
500
+ <div class="cn-small">* ' . __( 'available in Cookie Compliance&trade; only', 'cookie-notice' ) . '</div>
501
  </div>
502
  </div>
503
+ <div class="cn-accordion-item cn-form-container cn-collapsed" tabindex="-1">
504
  <div class="cn-accordion-header cn-form-header"><button class="cn-accordion-button" type="button">' . __( 'Banner Design', 'cookie-notice' ) . '</button></div>
505
  <div class="cn-accordion-collapse cn-form">
506
  <div class="cn-form-feedback cn-hidden"></div>
509
  <div class="cn-radio-image-wrapper">
510
  <label for="cn_position_bottom"><input id="cn_position_bottom" type="radio" name="cn_position" value="bottom" title="' . __( 'Bottom', 'cookie-notice' ) . '" checked><img src="' . plugins_url( '../img/layout-bottom.png', __FILE__ ) . '" width="24" height="24"></label>
511
  <label for="cn_position_top"><input id="cn_position_top" type="radio" name="cn_position" value="top" title="' . __( 'Top', 'cookie-notice' ) . '"><img src="' . plugins_url( '../img/layout-top.png', __FILE__ ) . '" width="24" height="24"></label>
512
+ <label for="cn_position_left" class="cn-asterix"><input id="cn_position_left" type="radio" name="cn_position" value="left" title="' . __( 'Left', 'cookie-notice' ) . '"><img src="' . plugins_url( '../img/layout-left.png', __FILE__ ) . '" width="24" height="24"></label>
513
+ <label for="cn_position_right" class="cn-asterix"><input id="cn_position_right" type="radio" name="cn_position" value="right" title="' . __( 'Right', 'cookie-notice' ) . '"><img src="' . plugins_url( '../img/layout-right.png', __FILE__ ) . '" width="24" height="24"></label>
514
+ <label for="cn_position_center" class="cn-asterix"><input id="cn_position_center" type="radio" name="cn_position" value="center" title="' . __( 'Center', 'cookie-notice' ) . '"><img src="' . plugins_url( '../img/layout-center.png', __FILE__ ) . '" width="24" height="24"></label>
515
  </div>
516
  </div>
517
  <div class="cn-field cn-fieldset">
519
  <div class="cn-checkbox-wrapper cn-color-picker-wrapper">
520
  <label for="cn_color_primary"><input id="cn_color_primary" class="cn-color-picker" type="checkbox" name="cn_color_primary" value="#20c19e"><span>' . __( 'Color of the buttons and interactive elements.', 'cookie-notice' ) . '</span></label>
521
  <label for="cn_color_background"><input id="cn_color_background" class="cn-color-picker" type="checkbox" name="cn_color_background" value="#32323a"><span>' . __( 'Color of the banner background.', 'cookie-notice' ) . '</span></label>
522
+ <label for="cn_color_border"><input id="cn_color_border" class="cn-color-picker" type="checkbox" name="cn_color_border" value="#86858b"><span class="cn-asterix">' . __( 'Color of the borders and inactive elements.', 'cookie-notice' ) . '</span></label>
523
+ <label for="cn_color_text"><input id="cn_color_text" class="cn-color-picker" type="checkbox" name="cn_color_text" value="#ffffff"><span class="cn-asterix">' . __( 'Color of the body text.', 'cookie-notice' ) . '</span></label>
524
+ <label for="cn_color_heading"><input id="cn_color_heading" class="cn-color-picker" type="checkbox" name="cn_color_heading" value="#86858b"><span class="cn-asterix">' . __( 'Color of the heading text.', 'cookie-notice' ) . '</span></label>
525
+ <label for="cn_color_button_text"><input id="cn_color_button_text" class="cn-color-picker" type="checkbox" name="cn_color_button_text" value="#ffffff"><span class="cn-asterix">' . __( 'Color of the button text.', 'cookie-notice' ) . '</span></label>
526
  </div>
527
  </div>
528
+ <div class="cn-small">* ' . __( 'available in Cookie Compliance&trade; only', 'cookie-notice' ) . '</div>
529
  </div>
530
  </div>
531
  </div>
532
  <div class="cn-field cn-field-submit cn-nav">
533
+ <button type="button" class="cn-btn cn-screen-button" data-screen="3"><span class="cn-spinner"></span>' . __( 'Apply Setup', 'cookie-notice' ) . '</button>
534
  </div>';
535
 
536
  $html .= wp_nonce_field( 'cn_api_configure', 'cn_nonce', true, false );
544
  <div class="cn-inner">
545
  <div class="cn-header">
546
  <div class="cn-top-bar">
547
+ <div class="cn-logo"><img src="' . plugins_url( '../img/cookie-notice-logo.png', __FILE__ ) . '" alt="Cookie Notice logo" /></div>
548
  </div>
549
  </div>
550
  <div class="cn-body">
551
+ <h2>' . __( 'Compliance account', 'cookie-notice' ) . '</h2>
552
  <div class="cn-lead">
553
+ <p>' . __( 'Create a Cookie Compliance&trade; account and select your preferred plan.', 'cookie-notice' ) . '</p>
554
  </div>
555
  <div class="cn-accordion">
556
+ <div id="cn-accordion-account" class="cn-accordion-item cn-form-container" tabindex="-1">
557
+ <div class="cn-accordion-header cn-form-header"><button class="cn-accordion-button" type="button">1. ' . __( 'Create Account', 'cookie-notice' ) . '</button></div>
558
  <div class="cn-accordion-collapse">
559
  <form class="cn-form" action="" data-action="register">
560
  <div class="cn-form-feedback cn-hidden"></div>
573
  </div>
574
  </div>
575
  <div class="cn-field cn-field-submit cn-nav">
576
+ <button type="submit" class="cn-btn cn-screen-button" tabindex="4" data-screen="4"><span class="cn-spinner"></span>' . __( 'Sign Up', 'cookie-notice' ) . '</button>
577
  </div>';
578
 
579
  // get site language
589
  </form>
590
  <p>' . __( 'Already have an account?', 'cookie-notice' ) . ' <a href="#" class="cn-screen-button" data-screen="login">' . __( 'Sign in', 'cookie-notice' ). '</a></p>
591
  </div>
592
+ </div>';
593
+
594
+ $html .= '
595
+ <div id="cn-accordion-billing" class="cn-accordion-item cn-form-container cn-collapsed cn-disabled" tabindex="-1">
596
  <div class="cn-accordion-header cn-form-header">
597
+ <button class="cn-accordion-button" type="button">2. ' . __( 'Select Plan', 'cookie-notice' ) . '</button>
598
  </div>
599
  <form class="cn-accordion-collapse cn-form cn-form-disabled" action="" data-action="payment">
600
  <div class="cn-form-feedback cn-hidden"></div>
601
  <div class="cn-field cn-field-radio">
602
  <div class="cn-radio-wrapper cn-plan-wrapper">
603
+ <label for="cn_field_plan_free"><input id="cn_field_plan_free" type="radio" name="plan" value="free" checked><span><span class="cn-plan-description">' . __( 'Basic', 'cookie-notice' ) . '</span><span class="cn-plan-pricing"><span class="cn-plan-price">Free</span></span><span class="cn-plan-overlay"></span></span></label>
604
+ <label for="cn_field_plan_monthly"><input id="cn_field_plan_monthly" type="radio" name="plan" value="monthly"><span><span class="cn-plan-description">' . __( '<b>Professional</b> Monthly', 'cookie-notice' ) . '</span><span class="cn-plan-pricing"><span class="cn-plan-price">$14.50</span>' . __( '/mo', 'cookie-notice' ) . '</span><span class="cn-plan-overlay"></span></span></label>
605
+ <label for="cn_field_plan_yearly"><input id="cn_field_plan_yearly" type="radio" name="plan" value="yearly"><span><span class="cn-plan-description">' . __( '<b>Professional</b> Yearly', 'cookie-notice' ) . '</span><span class="cn-plan-pricing"><span class="cn-plan-price">$149.50</span>' . __( '/yr', 'cookie-notice' ) . '</span><span class="cn-plan-overlay"></span></span></label>
606
  </div>
607
  </div>
608
+ <div class="cn-field cn-fieldset" id="cn_submit_free">
609
+ <button type="submit" class="cn-btn cn-screen-button" tabindex="4" data-screen="4"><span class="cn-spinner"></span>' . __( 'Confirm', 'cookie-notice' ) . '</button>
 
 
 
 
610
  </div>
611
+ <div class="cn-field cn-fieldset cn-hidden" id="cn_submit_paid">
612
+ <div class="cn-field cn-field-radio">
613
+ <label>' . __( 'Payment Method', 'cookie-notice' ) . '</label>
614
+ <div class="cn-radio-wrapper cn-horizontal-wrapper">
615
+ <label for="cn_field_method_credit_card"><input id="cn_field_method_credit_card" type="radio" name="method" value="credit_card" checked><span>' . __( 'Credit Card', 'cookie-notice' ) . '</span></label>
616
+ <label for="cn_field_method_paypal"><input id="cn_field_method_paypal" type="radio" name="method" value="paypal"><span>' . __( 'PayPal', 'cookie-notice' ) . '</span></label>
617
+ </div>
 
 
618
  </div>
619
+ <div class="cn-fieldset" id="cn_payment_method_credit_card">
620
+ <input type="hidden" name="payment_nonce" value="" />
621
+ <div class="cn-field cn-field-text">
622
+ <label for="cn_card_number">' . __( 'Card Number', 'cookie-notice' ) . '</label>
623
+ <div id="cn_card_number"></div>
624
+ </div>
625
+ <div class="cn-field cn-field-text cn-field-half cn-field-first">
626
+ <label for="cn_expiration_date">' . __( 'Expiration Date', 'cookie-notice' ) . '</label>
627
+ <div id="cn_expiration_date"></div>
628
+ </div>
629
+ <div class="cn-field cn-field-text cn-field-half cn-field-last">
630
+ <label for="cn_cvv">' . __( 'CVC/CVV', 'cookie-notice' ) . '</label>
631
+ <div id="cn_cvv"></div>
632
+ </div>
633
+ <div class="cn-field cn-field-submit cn-nav">
634
+ <button type="submit" class="cn-btn cn-screen-button" tabindex="4" data-screen="4"><span class="cn-spinner"></span>' . __( 'Submit', 'cookie-notice' ) . '</button>
635
+ </div>
636
  </div>
637
+ <div class="cn-fieldset" id="cn_payment_method_paypal" style="display: none;">
638
+ <div id="cn_paypal_button"></div>
639
  </div>
 
 
 
640
  </div>';
641
 
642
  $html .= wp_nonce_field( 'cn_api_payment', 'cn_payment_nonce', true, false );
643
 
644
  $html .= '
645
  </form>
646
+ </div>';
647
+
648
+ $html .= '
649
  </div>
650
  </div>';
651
  } elseif ( $screen === 'login' ) {
654
  <div class="cn-inner">
655
  <div class="cn-header">
656
  <div class="cn-top-bar">
657
+ <div class="cn-logo"><img src="' . plugins_url( '../img/cookie-notice-logo.png', __FILE__ ) . '" alt="Cookie Notice logo" /></div>
658
  </div>
659
  </div>
660
  <div class="cn-body">
661
  <h2>' . __( 'Compliance Sign in', 'cookie-notice' ) . '</h2>
662
  <div class="cn-lead">
663
+ <p>' . __( 'Sign in to your existing Cookie Compliance&trade; account and select your preferred plan.', 'cookie-notice' ) . '</p>
664
  </div>
665
  <div class="cn-accordion">
666
+ <div id="cn-accordion-account" class="cn-accordion-item cn-form-container" tabindex="-1">
667
+ <div class="cn-accordion-header cn-form-header"><button class="cn-accordion-button" type="button">1. ' . __( 'Account Login', 'cookie-notice' ) . '</button></div>
668
  <div class="cn-accordion-collapse">
669
  <form class="cn-form" action="" data-action="login">
670
  <div class="cn-form-feedback cn-hidden"></div>
691
  </form>
692
  <p>' . __( 'Don\'t have an account yet?', 'cookie-notice' ) . ' <a href="#" class="cn-screen-button" data-screen="register">' . __( 'Sign up', 'cookie-notice' ) . '</a></p>
693
  </div>
694
+ </div>';
695
+
696
+ $html .= '
697
+ <div id="cn-accordion-billing" class="cn-accordion-item cn-form-container cn-collapsed cn-disabled" tabindex="-1">
698
  <div class="cn-accordion-header cn-form-header">
699
+ <button class="cn-accordion-button" type="button">2. ' . __( 'Select Plan', 'cookie-notice' ) . '</button>
700
  </div>
701
  <form class="cn-accordion-collapse cn-form cn-form-disabled" action="" data-action="payment">
702
  <div class="cn-form-feedback cn-hidden"></div>
703
  <div class="cn-field cn-field-radio">
704
  <div class="cn-radio-wrapper cn-plan-wrapper">
705
+ <label for="cn_field_plan_free"><input id="cn_field_plan_free" type="radio" name="plan" value="free" checked><span><span class="cn-plan-description">' . __( 'Basic', 'cookie-notice' ) . '</span><span class="cn-plan-pricing"><span class="cn-plan-price">Free</span></span><span class="cn-plan-overlay"></span></span></label>
706
+ <label for="cn_field_plan_monthly"><input id="cn_field_plan_monthly" type="radio" name="plan" value="monthly"><span><span class="cn-plan-description">' . __( '<b>Professional</b> Monthly', 'cookie-notice' ) . '</span><span class="cn-plan-pricing"><span class="cn-plan-price">$14.50</span>' . __( '/mo', 'cookie-notice' ) . '</span><span class="cn-plan-overlay"></span></span></label>
707
+ <label for="cn_field_plan_yearly"><input id="cn_field_plan_yearly" type="radio" name="plan" value="yearly"><span><span class="cn-plan-description">' . __( '<b>Professional</b> Yearly', 'cookie-notice' ) . '</span><span class="cn-plan-pricing"><span class="cn-plan-price">$149.50</span>' . __( '/yr', 'cookie-notice' ) . '</span><span class="cn-plan-overlay"></span></span></label>
708
  </div>
709
  </div>
710
+ <div class="cn-field cn-fieldset" id="cn_submit_free">
711
+ <button type="submit" class="cn-btn cn-screen-button" tabindex="4" data-screen="4"><span class="cn-spinner"></span>' . __( 'Confirm', 'cookie-notice' ) . '</button>
 
 
 
 
712
  </div>
713
+ <div class="cn-field cn-fieldset cn-hidden" id="cn_submit_paid">
714
+ <div class="cn-field cn-field-radio">
715
+ <label>' . __( 'Payment Method', 'cookie-notice' ) . '</label>
716
+ <div class="cn-radio-wrapper cn-horizontal-wrapper">
717
+ <label for="cn_field_method_credit_card"><input id="cn_field_method_credit_card" type="radio" name="method" value="credit_card" checked><span>' . __( 'Credit Card', 'cookie-notice' ) . '</span></label>
718
+ <label for="cn_field_method_paypal"><input id="cn_field_method_paypal" type="radio" name="method" value="paypal"><span>' . __( 'PayPal', 'cookie-notice' ) . '</span></label>
719
+ </div>
 
 
720
  </div>
721
+ <div class="cn-fieldset" id="cn_payment_method_credit_card">
722
+ <input type="hidden" name="payment_nonce" value="" />
723
+ <div class="cn-field cn-field-text">
724
+ <label for="cn_card_number">' . __( 'Card Number', 'cookie-notice' ) . '</label>
725
+ <div id="cn_card_number"></div>
726
+ </div>
727
+ <div class="cn-field cn-field-text cn-field-half cn-field-first">
728
+ <label for="cn_expiration_date">' . __( 'Expiration Date', 'cookie-notice' ) . '</label>
729
+ <div id="cn_expiration_date"></div>
730
+ </div>
731
+ <div class="cn-field cn-field-text cn-field-half cn-field-last">
732
+ <label for="cn_cvv">' . __( 'CVC/CVV', 'cookie-notice' ) . '</label>
733
+ <div id="cn_cvv"></div>
734
+ </div>
735
+ <div class="cn-field cn-field-submit cn-nav">
736
+ <button type="submit" class="cn-btn cn-screen-button" tabindex="4" data-screen="4"><span class="cn-spinner"></span>' . __( 'Submit', 'cookie-notice' ) . '</button>
737
+ </div>
738
  </div>
739
+ <div class="cn-fieldset" id="cn_payment_method_paypal" style="display: none;">
740
+ <div id="cn_paypal_button"></div>
741
  </div>
 
 
 
742
  </div>';
743
 
744
  $html .= wp_nonce_field( 'cn_api_payment', 'cn_payment_nonce', true, false );
754
  <div class="cn-inner">
755
  <div class="cn-header">
756
  <div class="cn-top-bar">
757
+ <div class="cn-logo"><img src="' . plugins_url( '../img/cookie-notice-logo.png', __FILE__ ) . '" alt="Cookie Notice logo" /></div>
758
  </div>
759
  </div>
760
  <div class="cn-body">
763
  </div>';
764
  }
765
 
766
+
767
  $html .= '
768
  <div class="cn-footer">';
769
+ /*
770
  switch ( $screen ) {
771
  case 'about':
772
+ $html .= '<a href="' . esc_url( admin_url( 'admin.php?page=cookie-notice' ) ) . '" class="cn-btn cn-btn-link cn-skip-button">' . __( 'Skip Live Setup', 'cookie-notice' ) . '</a>';
773
  break;
774
  case 'success':
775
  $html .= '<a href="' . esc_url( get_dashboard_url() ) . '" class="cn-btn cn-btn-link cn-skip-button">' . __( 'WordPress Dashboard', 'cookie-notice' ) . '</a>';
778
  $html .= '<a href="' . esc_url( admin_url( 'admin.php?page=cookie-notice' ) ) . '" class="cn-btn cn-btn-link cn-skip-button">' . __( 'Skip for now', 'cookie-notice' ) . '</a>';
779
  break;
780
  }
781
+ */
782
  $html .= '
783
  </div>
784
  </div>
js/admin-welcome.js CHANGED
@@ -1,522 +1,800 @@
1
- ( function( $ ) {
2
-
3
- // ready event
4
- $( function() {
5
- var btClient = false;
6
- var btCreditCardsInitialized = false;
7
- var btPayPalInitialized = false;
8
-
9
- var btInit = function() {
10
- var result = btInitToken();
11
-
12
- if ( result !== false && btCreditCardsInitialized === false ) {
13
- // AJAX was successful
14
- result.done( function( response ) {
15
- // token received
16
- try {
17
- // parse response
18
- data = JSON.parse( response );
19
-
20
- // first step, init braintree client
21
- btClient = braintree.client.create( {
22
- authorization: data.token
23
- } );
24
-
25
- btInitPaymentMethod( 'credit_card' );
26
- // token failed
27
- } catch( e ) {
28
- btGatewayFail( 'btInit catch' );
29
- }
30
- // AJAX failed
31
- } ).fail( function() {
32
- btGatewayFail( 'btInit AJAX failed' );
33
- } );
34
- }
35
- }
36
-
37
- var btInitToken = function() {
38
- // payment screen?
39
- var payment = $( '.cn-sidebar form[data-action="payment"]' );
40
-
41
- // init braintree
42
- if ( payment.length ) {
43
- payment.addClass( 'cn-form-disabled' );
44
-
45
- if ( typeof braintree !== 'undefined' ) {
46
- return $.ajax( {
47
- url: cnArgs.ajaxURL,
48
- type: 'POST',
49
- dataType: 'html',
50
- data: {
51
- action: 'cn_api_request',
52
- request: 'get_bt_init_token',
53
- nonce: cnArgs.nonce
54
- }
55
- } );
56
- } else
57
- return false;
58
- } else
59
- return false;
60
- }
61
-
62
- var btInitPaymentMethod = function( type ) {
63
- console.log( 'btInitPaymentMethod' );
64
-
65
- if ( btClient !== false ) {
66
- if ( type === 'credit_card' && btCreditCardsInitialized === false ) {
67
- $( 'form.cn-form[data-action="payment"]' ).addClass( 'cn-form-disabled' );
68
-
69
- btClient.then( btCreditCardsInit ).then( btHostedFieldsInstance ).catch( btGatewayFail );
70
- } else if ( type === 'paypal' && btPayPalInitialized === false ) {
71
- $( 'form.cn-form[data-action="payment"]' ).addClass( 'cn-form-disabled' );
72
-
73
- btClient.then( btPaypalCheckoutInit ).then( btPaypalCheckoutSDK ).then( btPaypalCheckoutInstance ).then( btPaypalCheckoutButton ).catch( btGatewayFail );
74
- }
75
- } else
76
- btGatewayFail( 'btInitPaymentMethod btClient is false' );
77
- }
78
-
79
- var btCreditCardsInit = function( clientInstance ) {
80
- console.log( 'btCreditCardsInit' );
81
- return braintree.hostedFields.create( {
82
- client: clientInstance,
83
- styles: {
84
- 'input': {
85
- 'font-size': '14px',
86
- 'font-family': '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif',
87
- 'color': '#fff'
88
- },
89
- ':focus': {
90
- 'color': '#fff'
91
- },
92
- "::placeholder": {
93
- 'color': '#aaa'
94
- }
95
- },
96
- fields: {
97
- number: {
98
- 'selector': '#cn_card_number',
99
- 'placeholder': '0000 0000 0000 0000'
100
- },
101
- expirationDate: {
102
- 'selector': '#cn_expiration_date',
103
- 'placeholder': 'MM / YY'
104
- },
105
- cvv: {
106
- 'selector': '#cn_cvv',
107
- 'placeholder': '123'
108
- }
109
- }
110
- } );
111
- }
112
-
113
- var btHostedFieldsInstance = function( hostedFieldsInstance ) {
114
- console.log( 'btHostedFieldsInstance' );
115
- btCreditCardsInitialized = true;
116
-
117
- var form = $( 'form.cn-form[data-action="payment"]' );
118
-
119
- form.removeClass( 'cn-form-disabled' );
120
-
121
- form.on( 'submit', function() {
122
- if ( form.hasClass( 'cn-payment-in-progress' ) )
123
- return false;
124
-
125
- form.find( '.cn-form-feedback' ).addClass( 'cn-hidden' );
126
-
127
- // spin the spinner, if exists
128
- if ( form.find( '.cn-spinner' ).length )
129
- form.find( '.cn-spinner' ).addClass( 'spin' );
130
-
131
- var invalidForm = false;
132
- var state = hostedFieldsInstance.getState();
133
-
134
- // check hosted fields
135
- Object.keys( state.fields ).forEach( function( field ) {
136
- if ( ! state.fields[field].isValid ) {
137
- $( state.fields[field].container ).addClass( 'braintree-hosted-fields-invalid' );
138
-
139
- invalidForm = true;
140
- }
141
- } );
142
-
143
- if ( invalidForm ) {
144
- setTimeout( function() {
145
- cnDisplayError( cnArgs.invalidFields, form );
146
-
147
- // spin the spinner, if exists
148
- if ( form.find( '.cn-spinner' ).length )
149
- form.find( '.cn-spinner' ).removeClass( 'spin' );
150
- }, 500 );
151
-
152
- return false;
153
- }
154
-
155
- hostedFieldsInstance.tokenize( function( err, payload ) {
156
- if ( err ) {
157
- cnDisplayError( cnArgs.error );
158
-
159
- return false;
160
- } else {
161
- form.addClass( 'cn-payment-in-progress' );
162
- form.find( 'input[name="payment_nonce"]' ).val( payload.nonce );
163
-
164
- $( document ).find( '.cn-screen-button[data-screen="4"]' ).trigger( 'click' );
165
- }
166
- } );
167
-
168
- return false;
169
- } );
170
- }
171
-
172
- var btPaypalCheckoutInit = function( clientInstance ) {
173
- console.log( 'btPaypalCheckoutInit' );
174
- return braintree.paypalCheckout.create( {
175
- client: clientInstance
176
- } );
177
- }
178
-
179
- var btPaypalCheckoutSDK = function( paypalCheckoutInstance ) {
180
- console.log( 'btPaypalCheckoutSDK' );
181
- return paypalCheckoutInstance.loadPayPalSDK( {
182
- vault: true,
183
- intent: 'tokenize'
184
- } );
185
- }
186
-
187
- var btPaypalCheckoutInstance = function( paypalCheckoutInstance ) {
188
- console.log( 'btPaypalCheckoutInstance' );
189
- var form = $( 'form.cn-form[data-action="payment"]' );
190
-
191
- return paypal.Buttons( {
192
- fundingSource: paypal.FUNDING.PAYPAL,
193
- createBillingAgreement: function() {
194
- console.log( 'createBillingAgreement' );
195
- form.addClass( 'cn-form-disabled' );
196
-
197
- return paypalCheckoutInstance.createPayment( {
198
- flow: 'vault',
199
- intent: 'tokenize',
200
- currency: 'EUR'
201
- } );
202
- },
203
- onApprove: function( data, actions ) {
204
- console.log( 'onApprove' );
205
- return paypalCheckoutInstance.tokenizePayment( data ).then( function( payload ) {
206
- form.addClass( 'cn-payment-in-progress' );
207
- form.find( 'input[name="payment_nonce"]' ).val( payload.nonce );
208
-
209
- $( document ).find( '.cn-screen-button[data-screen="4"]' ).trigger( 'click' );
210
- } );
211
- },
212
- onCancel: function( data ) {
213
- console.log( 'onCancel' );
214
- form.removeClass( 'cn-form-disabled' );
215
- },
216
- onError: function( err ) {
217
- console.log( 'onError' );
218
- form.removeClass( 'cn-form-disabled' );
219
- }
220
- } ).render( '#cn_paypal_button' );
221
- }
222
-
223
- var btPaypalCheckoutButton = function() {
224
- console.log( 'btPaypalCheckoutButton' );
225
- btPayPalInitialized = true;
226
-
227
- $( 'form.cn-form[data-action="payment"]' ).removeClass( 'cn-form-disabled' );
228
- }
229
-
230
- var btGatewayFail = function( error ) {
231
- console.log( 'btGatewayFail' );
232
-
233
- if ( typeof error !== 'undefined' )
234
- console.log( error );
235
-
236
- cnDisplayError( cnArgs.error );
237
- }
238
-
239
- var cnDisplayError = function( message, form ) {
240
- if ( typeof form === 'undefined' )
241
- form = $( 'form.cn-form[data-action="payment"]' );
242
-
243
- form.find( '.cn-form-feedback' ).html( '<p class="cn-error">' + message + '</p>' ).removeClass( 'cn-hidden' );
244
- }
245
-
246
- var cnWelcomeScreen = function( e ) {
247
- var screen = $( e.target ).data( 'screen' );
248
- var steps = [1,2,3,4];
249
- var sidebars = ['login', 'register', 'configure', 'payment'];
250
-
251
- // continue with screen loading
252
- var requestData = {
253
- action: 'cn_welcome_screen',
254
- nonce: cnArgs.nonce
255
- };
256
-
257
- if ( $.inArray( screen, steps ) != -1 ) {
258
- var container = $( '.cn-welcome-wrap' );
259
-
260
- requestData.screen = screen;
261
- } else if ( $.inArray( screen, sidebars ) != -1 ) {
262
- var container = $( '.cn-sidebar' );
263
-
264
- requestData.screen = screen;
265
- } else
266
- return false;
267
-
268
- // add loading overlay
269
- $( container ).addClass( 'cn-loading' );
270
-
271
- $.ajax( {
272
- url: cnArgs.ajaxURL,
273
- type: 'POST',
274
- dataType: 'html',
275
- data: requestData
276
- } ).done( function( response ) {
277
- $( container ).replaceWith( response );
278
- } ).fail( function( jqXHR, textStatus, errorThrown ) {
279
- //
280
- } ).always( function( response ) {
281
- // remove spinner
282
- $( container ).removeClass( 'cn-loading' );
283
-
284
- // trigger event
285
- var event = $.Event( 'screen-loaded' );
286
-
287
- $( document ).trigger( event );
288
- } );
289
-
290
- return this;
291
- };
292
-
293
- var cnWelcomeForm = function( form ) {
294
- var formAction = $( form[0] ).data( 'action' );
295
- var formResult = null;
296
- var formData = {
297
- action: 'cn_api_request',
298
- nonce: cnArgs.nonce
299
- };
300
-
301
- // clear feedback
302
- $( form[0] ).find( '.cn-form-feedback' ).addClass( 'cn-hidden' );
303
-
304
- // build request data
305
- formData.request = formAction;
306
-
307
- // convert form data to object
308
- $( form[0] ).serializeArray().map( function( x ) {
309
- // exception for checkboxes
310
- if ( x.name === 'cn_laws' ) {
311
- var arrayVal = typeof formData[x.name] !== 'undefined' ? formData[x.name] : [];
312
-
313
- arrayVal.push( x.value );
314
-
315
- formData[x.name] = arrayVal;
316
- } else {
317
- formData[x.name] = x.value;
318
- }
319
- } );
320
-
321
- formResult = $.ajax( {
322
- url: cnArgs.ajaxURL,
323
- type: 'POST',
324
- dataType: 'json',
325
- data: formData
326
- } );
327
-
328
- return formResult;
329
- };
330
-
331
- // handle screen loading
332
- $( document ).on( 'click', '.cn-screen-button', function( e ) {
333
- var form = $( e.target ).closest( 'form' );
334
- var result = false;
335
-
336
- // payment?
337
- if ( form.data( 'action' ) === 'payment' && form.find( 'input[name="payment_nonce"]' ).val() === '' )
338
- return true;
339
- else
340
- e.preventDefault();
341
-
342
- // spin the spinner, if exists
343
- if ( $( e.target ).find( '.cn-spinner' ).length )
344
- $( e.target ).find( '.cn-spinner' ).addClass( 'spin' );
345
-
346
- // get form and process it if exists
347
- if ( form.length === 1 ) {
348
- result = cnWelcomeForm( form );
349
-
350
- result.done( function( response ) {
351
- // error
352
- if ( response.hasOwnProperty( 'error' ) ) {
353
- cnDisplayError( response.error, $( form[0] ) );
354
- // message
355
- } else if ( response.hasOwnProperty( 'message' ) ) {
356
- cnDisplayError( response.message, $( form[0] ) );
357
- // all good
358
- } else {
359
- // register complete, go to billing
360
- if ( form.data( 'action' ) === 'register' || form.data( 'action' ) === 'login' ) {
361
- var accordionItem = $( form[0] ).closest( '.cn-accordion-item' );
362
-
363
- // collapse account
364
- $( accordionItem ).addClass( 'cn-collapsed cn-disabled' );
365
-
366
- // show billing
367
- $( accordionItem ).next().removeClass( 'cn-disabled' );
368
- $( accordionItem ).find( 'form' ).removeClass( 'cn-form-disabled' );
369
-
370
- // init braintree after payment screen is loaded via AJAX
371
- btInit();
372
- }
373
-
374
- cnWelcomeScreen( e );
375
- }
376
- } );
377
-
378
- result.always( function( response ) {
379
- if ( $( e.target ).find( '.cn-spinner' ).length )
380
- $( e.target ).find( '.cn-spinner' ).removeClass( 'spin' );
381
-
382
- // after invalid payment?
383
- if ( form.data( 'action' ) === 'payment' ) {
384
- form.removeClass( 'cn-payment-in-progress' );
385
- form.find( 'input[name="payment_nonce"]' ).val( '' );
386
- }
387
- } );
388
- } else
389
- result = cnWelcomeScreen( e );
390
-
391
- return result;
392
- } );
393
-
394
- //
395
- $( document ).on( 'screen-loaded', function() {
396
- var configureFields = $( '#cn-form-configure' ).serializeArray() || [];
397
- var frame = window.frames[ 'cn_iframe_id' ];
398
-
399
- if ( configureFields.length > 0 ) {
400
- $( configureFields ).each( function( index, field ) {
401
- } );
402
- }
403
- } );
404
-
405
- // change payment method
406
- $( document ).on( 'change', 'input[name="method"]', function() {
407
- var input = $( this );
408
-
409
- $( '#cn_payment_method_credit_card, #cn_payment_method_paypal' ).toggle();
410
-
411
- input.closest( 'form' ).find( '.cn-form-feedback' ).addClass( 'cn-hidden' );
412
-
413
- // init payment method if needed
414
- btInitPaymentMethod( input.val() );
415
- } );
416
-
417
- //
418
- $( document ).on( 'click', '.cn-accordion > .cn-accordion-item .cn-accordion-button', function() {
419
- var accordionItem = $( this ).closest( '.cn-accordion-item' );
420
- var activeItem = $( this ).closest( '.cn-accordion' ).find( '.cn-accordion-item:not(.cn-collapsed)' );
421
-
422
- if ( $( accordionItem ).hasClass( 'cn-collapsed' ) ) {
423
- $( activeItem ).addClass( 'cn-collapsed' );
424
- $( accordionItem ).removeClass( 'cn-collapsed' );
425
- }
426
-
427
- return false;
428
- } );
429
-
430
- // live preview
431
- $( document ).on( 'change', 'input[name="cn_position"]', function() {
432
- var val = $( this ).val();
433
- var frame = window.frames['cn_iframe_id'];
434
-
435
- frame.contentWindow.postMessage( { call: 'position', value: val } );
436
- } );
437
-
438
- $( document ).on( 'change', 'input[name="cn_purposes"]', function() {
439
- var val = [];
440
-
441
- $( 'input[name="cn_purposes"]:checked' ).each( function() {
442
- val.push( $( this ).val() );
443
- } );
444
-
445
- var frame = window.frames['cn_iframe_id'];
446
-
447
- frame.contentWindow.postMessage( { call: 'purposes', value: val } );
448
- } );
449
-
450
- $( document ).on( 'change', 'input[name="cn_laws"]', function() {
451
- var val = [];
452
-
453
- $( 'input[name="cn_laws"]:checked' ).each( function() {
454
- val.push( $( this ).val() );
455
- } );
456
-
457
- var frame = window.frames['cn_iframe_id'];
458
-
459
- frame.contentWindow.postMessage( { call: 'laws', value: val } );
460
- } );
461
-
462
- $( document ).on( 'change', 'input[name="cn_color_primary"]', function() {
463
- var val = $( this ).val();
464
- var frame = window.frames['cn_iframe_id'];
465
-
466
- frame.contentWindow.postMessage( { call: 'color_primary', value: val } );
467
- } );
468
-
469
- $( document ).on( 'change', 'input[name="cn_color_background"]', function() {
470
- var val = $( this ).val();
471
- var frame = window.frames['cn_iframe_id'];
472
-
473
- frame.contentWindow.postMessage( { call: 'color_background', value: val } );
474
- } );
475
-
476
- $( document ).on( 'change', 'input[name="cn_color_border"]', function() {
477
- var val = $( this ).val();
478
- var frame = window.frames['cn_iframe_id'];
479
-
480
- frame.contentWindow.postMessage( { call: 'color_border', value: val } );
481
- } );
482
-
483
- $( document ).on( 'change', 'input[name="cn_color_text"]', function() {
484
- var val = $( this ).val();
485
- var frame = window.frames['cn_iframe_id'];
486
-
487
- frame.contentWindow.postMessage( { call: 'color_text', value: val } );
488
- } );
489
-
490
- $( document ).on( 'change', 'input[name="cn_color_heading"]', function() {
491
- var val = $( this ).val();
492
- var frame = window.frames['cn_iframe_id'];
493
-
494
- frame.contentWindow.postMessage( { call: 'color_heading', value: val } );
495
- } );
496
-
497
- $( document ).on( 'change', 'input[name="cn_color_button_text"]', function() {
498
- var val = $( this ).val();
499
- var frame = window.frames['cn_iframe_id'];
500
-
501
- frame.contentWindow.postMessage( { call: 'color_button_text', value: val } );
502
- } );
503
-
504
- // color picker
505
- initSpectrum();
506
- } );
507
-
508
- $( document ).on( 'ajaxComplete', function() {
509
- // color picker
510
- initSpectrum();
511
- } );
512
-
513
- function initSpectrum() {
514
- $( '.cn-color-picker' ).spectrum( {
515
- showInput: true,
516
- showInitial: true,
517
- allowEmpty: false,
518
- showAlpha: false
519
- } );
520
- }
521
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
522
  } )( jQuery );
1
+ ( function( $ ) {
2
+
3
+ // ready event
4
+ $( function() {
5
+ var btClient = false;
6
+ var btCreditCardsInitialized = false;
7
+ var btPayPalInitialized = false;
8
+
9
+ var btInit = function() {
10
+ var result = btInitToken();
11
+
12
+ if ( result !== false && btCreditCardsInitialized === false ) {
13
+ // AJAX was successful
14
+ result.done( function( response ) {
15
+ // token received
16
+ try {
17
+ // parse response
18
+ data = JSON.parse( response );
19
+
20
+ // first step, init braintree client
21
+ btClient = braintree.client.create( {
22
+ authorization: data.token
23
+ } );
24
+
25
+ btInitPaymentMethod( 'credit_card' );
26
+ // token failed
27
+ } catch( e ) {
28
+ btGatewayFail( 'btInit catch' );
29
+ }
30
+ // AJAX failed
31
+ } ).fail( function() {
32
+ btGatewayFail( 'btInit AJAX failed' );
33
+ } );
34
+ }
35
+ }
36
+
37
+ var btInitToken = function() {
38
+ // payment screen?
39
+ var payment = $( '.cn-sidebar form[data-action="payment"]' );
40
+
41
+ // init braintree
42
+ if ( payment.length ) {
43
+ payment.addClass( 'cn-form-disabled' );
44
+
45
+ if ( typeof braintree !== 'undefined' ) {
46
+ return $.ajax( {
47
+ url: cnWelcomeArgs.ajaxURL,
48
+ type: 'POST',
49
+ dataType: 'html',
50
+ data: {
51
+ action: 'cn_api_request',
52
+ request: 'get_bt_init_token',
53
+ nonce: cnWelcomeArgs.nonce
54
+ }
55
+ } );
56
+ } else
57
+ return false;
58
+ } else
59
+ return false;
60
+ }
61
+
62
+ var btInitPaymentMethod = function( type ) {
63
+ // console.log( 'btInitPaymentMethod' );
64
+
65
+ if ( btClient !== false ) {
66
+ if ( type === 'credit_card' && btCreditCardsInitialized === false ) {
67
+ $( 'form.cn-form[data-action="payment"]' ).addClass( 'cn-form-disabled' );
68
+
69
+ btClient.then( btCreditCardsInit ).then( btHostedFieldsInstance ).catch( btGatewayFail );
70
+ } else if ( type === 'paypal' && btPayPalInitialized === false ) {
71
+ $( 'form.cn-form[data-action="payment"]' ).addClass( 'cn-form-disabled' );
72
+
73
+ btClient.then( btPaypalCheckoutInit ).then( btPaypalCheckoutSDK ).then( btPaypalCheckoutInstance ).then( btPaypalCheckoutButton ).catch( btGatewayFail );
74
+ }
75
+ } else
76
+ btGatewayFail( 'btInitPaymentMethod btClient is false' );
77
+ }
78
+
79
+ var btCreditCardsInit = function( clientInstance ) {
80
+ // console.log( 'btCreditCardsInit' );
81
+
82
+ return braintree.hostedFields.create( {
83
+ client: clientInstance,
84
+ styles: {
85
+ 'input': {
86
+ 'font-size': '14px',
87
+ 'font-family': '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif',
88
+ 'color': '#fff'
89
+ },
90
+ ':focus': {
91
+ 'color': '#fff'
92
+ },
93
+ "::placeholder": {
94
+ 'color': '#aaa'
95
+ }
96
+ },
97
+ fields: {
98
+ number: {
99
+ 'selector': '#cn_card_number',
100
+ 'placeholder': '0000 0000 0000 0000'
101
+ },
102
+ expirationDate: {
103
+ 'selector': '#cn_expiration_date',
104
+ 'placeholder': 'MM / YY'
105
+ },
106
+ cvv: {
107
+ 'selector': '#cn_cvv',
108
+ 'placeholder': '123'
109
+ }
110
+ }
111
+ } );
112
+ }
113
+
114
+ var btHostedFieldsInstance = function( hostedFieldsInstance ) {
115
+ // console.log( 'btHostedFieldsInstance' );
116
+
117
+ btCreditCardsInitialized = true;
118
+
119
+ var form = $( 'form.cn-form[data-action="payment"]' );
120
+
121
+ form.removeClass( 'cn-form-disabled' );
122
+
123
+ form.on( 'submit', function() {
124
+ if ( form.hasClass( 'cn-payment-in-progress' ) )
125
+ return false;
126
+
127
+ form.find( '.cn-form-feedback' ).addClass( 'cn-hidden' );
128
+
129
+ // spin the spinner, if exists
130
+ if ( form.find( '.cn-spinner' ).length )
131
+ form.find( '.cn-spinner' ).addClass( 'spin' );
132
+
133
+ var invalidForm = false;
134
+ var state = hostedFieldsInstance.getState();
135
+
136
+ // check hosted fields
137
+ Object.keys( state.fields ).forEach( function( field ) {
138
+ if ( ! state.fields[field].isValid ) {
139
+ $( state.fields[field].container ).addClass( 'braintree-hosted-fields-invalid' );
140
+
141
+ invalidForm = true;
142
+ }
143
+ } );
144
+
145
+ if ( invalidForm ) {
146
+ setTimeout( function() {
147
+ cnDisplayError( cnWelcomeArgs.invalidFields, form );
148
+
149
+ // spin the spinner, if exists
150
+ if ( form.find( '.cn-spinner' ).length )
151
+ form.find( '.cn-spinner' ).removeClass( 'spin' );
152
+ }, 500 );
153
+
154
+ return false;
155
+ }
156
+
157
+ hostedFieldsInstance.tokenize( function( err, payload ) {
158
+ if ( err ) {
159
+ cnDisplayError( cnWelcomeArgs.error );
160
+
161
+ return false;
162
+ } else {
163
+ form.addClass( 'cn-payment-in-progress' );
164
+ form.find( 'input[name="payment_nonce"]' ).val( payload.nonce );
165
+
166
+ $( '#cn_submit_paid' ).find( '.cn-screen-button[data-screen="4"]' ).trigger( 'click' );
167
+ }
168
+ } );
169
+
170
+ return false;
171
+ } );
172
+ }
173
+
174
+ var btPaypalCheckoutInit = function( clientInstance ) {
175
+ // console.log( 'btPaypalCheckoutInit' );
176
+
177
+ return braintree.paypalCheckout.create( {
178
+ client: clientInstance
179
+ } );
180
+ }
181
+
182
+ var btPaypalCheckoutSDK = function( paypalCheckoutInstance ) {
183
+ // console.log( 'btPaypalCheckoutSDK' );
184
+
185
+ return paypalCheckoutInstance.loadPayPalSDK( {
186
+ vault: true,
187
+ intent: 'tokenize'
188
+ } );
189
+ }
190
+
191
+ var btPaypalCheckoutInstance = function( paypalCheckoutInstance ) {
192
+ // console.log( 'btPaypalCheckoutInstance' );
193
+
194
+ var form = $( 'form.cn-form[data-action="payment"]' );
195
+
196
+ return paypal.Buttons( {
197
+ fundingSource: paypal.FUNDING.PAYPAL,
198
+ createBillingAgreement: function() {
199
+ // console.log( 'createBillingAgreement' );
200
+
201
+ form.addClass( 'cn-form-disabled' );
202
+
203
+ return paypalCheckoutInstance.createPayment( {
204
+ flow: 'vault',
205
+ intent: 'tokenize',
206
+ currency: 'EUR'
207
+ } );
208
+ },
209
+ onApprove: function( data, actions ) {
210
+ // console.log( 'onApprove' );
211
+
212
+ return paypalCheckoutInstance.tokenizePayment( data ).then( function( payload ) {
213
+ form.addClass( 'cn-payment-in-progress' );
214
+ form.find( 'input[name="payment_nonce"]' ).val( payload.nonce );
215
+
216
+ // console.log( 'onApprove inside' );
217
+ // console.log( $( '#cn_submit_paid' ).find( '.cn-screen-button[data-screen="4"]' ) );
218
+
219
+ $( '#cn_submit_paid' ).find( '.cn-screen-button[data-screen="4"]' ).trigger( 'click' );
220
+ } );
221
+ },
222
+ onCancel: function( data ) {
223
+ // console.log( 'onCancel' );
224
+
225
+ form.removeClass( 'cn-form-disabled' );
226
+ },
227
+ onError: function( err ) {
228
+ // console.log( 'onError' );
229
+
230
+ form.removeClass( 'cn-form-disabled' );
231
+ }
232
+ } ).render( '#cn_paypal_button' );
233
+ }
234
+
235
+ var btPaypalCheckoutButton = function() {
236
+ // console.log( 'btPaypalCheckoutButton' );
237
+
238
+ btPayPalInitialized = true;
239
+
240
+ $( 'form.cn-form[data-action="payment"]' ).removeClass( 'cn-form-disabled' );
241
+ }
242
+
243
+ var btGatewayFail = function( error ) {
244
+ // console.log( 'btGatewayFail' );
245
+
246
+ if ( typeof error !== 'undefined' )
247
+ console.log( error );
248
+
249
+ cnDisplayError( cnWelcomeArgs.error );
250
+ }
251
+
252
+ var cnDisplayError = function( message, form ) {
253
+ if ( typeof form === 'undefined' )
254
+ form = $( 'form.cn-form[data-action="payment"]' );
255
+
256
+ form.find( '.cn-form-feedback' ).html( '<p class="cn-error">' + message + '</p>' ).removeClass( 'cn-hidden' );
257
+ }
258
+
259
+ var cnWelcomeScreen = function( e ) {
260
+ var screen = $( e.target ).data( 'screen' );
261
+ var steps = [1,2,3,4];
262
+ var sidebars = ['login', 'register', 'configure', 'payment'];
263
+
264
+ // continue with screen loading
265
+ var requestData = {
266
+ action: 'cn_welcome_screen',
267
+ nonce: cnWelcomeArgs.nonce
268
+ };
269
+
270
+ if ( $.inArray( screen, steps ) != -1 ) {
271
+ var container = $( '.cn-welcome-wrap' );
272
+
273
+ requestData.screen = screen;
274
+ } else if ( $.inArray( screen, sidebars ) != -1 ) {
275
+ var container = $( '.cn-sidebar' );
276
+
277
+ requestData.screen = screen;
278
+ } else
279
+ return false;
280
+
281
+ // add loading overlay
282
+ $( container ).addClass( 'cn-loading' );
283
+
284
+ $.ajax( {
285
+ url: cnWelcomeArgs.ajaxURL,
286
+ type: 'POST',
287
+ dataType: 'html',
288
+ data: requestData
289
+ } ).done( function( response ) {
290
+ $( container ).replaceWith( response );
291
+ } ).fail( function( jqXHR, textStatus, errorThrown ) {
292
+ //
293
+ } ).always( function( response ) {
294
+ // remove spinner
295
+ $( container ).removeClass( 'cn-loading' );
296
+
297
+ // trigger event
298
+ var event = $.Event( 'screen-loaded' );
299
+
300
+ $( document ).trigger( event );
301
+ } );
302
+
303
+ return this;
304
+ };
305
+
306
+ var cnWelcomeForm = function( form ) {
307
+ var formAction = $( form[0] ).data( 'action' );
308
+ var formResult = null;
309
+ var formData = {
310
+ action: 'cn_api_request',
311
+ nonce: cnWelcomeArgs.nonce
312
+ };
313
+
314
+ // clear feedback
315
+ $( form[0] ).find( '.cn-form-feedback' ).addClass( 'cn-hidden' );
316
+
317
+ // build request data
318
+ formData.request = formAction;
319
+
320
+ // convert form data to object
321
+ $( form[0] ).serializeArray().map( function( x ) {
322
+ // exception for checkboxes
323
+ if ( x.name === 'cn_laws' ) {
324
+ var arrayVal = typeof formData[x.name] !== 'undefined' ? formData[x.name] : [];
325
+
326
+ arrayVal.push( x.value );
327
+
328
+ formData[x.name] = arrayVal;
329
+ } else {
330
+ formData[x.name] = x.value;
331
+ }
332
+ } );
333
+
334
+ formResult = $.ajax( {
335
+ url: cnWelcomeArgs.ajaxURL,
336
+ type: 'POST',
337
+ dataType: 'json',
338
+ data: formData
339
+ } );
340
+
341
+ return formResult;
342
+ };
343
+
344
+ // handle screen loading
345
+ $( document ).on( 'click', '.cn-screen-button', function( e ) {
346
+ var form = $( e.target ).closest( 'form' );
347
+ var result = false;
348
+
349
+ // spin the spinner, if exists
350
+ if ( $( e.target ).find( '.cn-spinner' ).length )
351
+ $( e.target ).find( '.cn-spinner' ).addClass( 'spin' );
352
+
353
+ // no form?
354
+ if ( form.length === 0 )
355
+ return cnWelcomeScreen( e );
356
+
357
+ var formData = {};
358
+ var formDataset = $( form[0] ).data();
359
+ var formAction = formDataset.hasOwnProperty( 'action' ) ? formDataset.action : '';
360
+
361
+ // get form data
362
+ $( form[0] ).serializeArray().map( function( x ) {
363
+ // exception for checkboxes
364
+ if ( x.name === 'cn_laws' ) {
365
+ var arrayVal = typeof formData[x.name] !== 'undefined' ? formData[x.name] : [];
366
+
367
+ arrayVal.push( x.value );
368
+
369
+ formData[x.name] = arrayVal;
370
+ } else {
371
+ formData[x.name] = x.value;
372
+ }
373
+ } );
374
+
375
+ // console.log( form[0] );
376
+ // console.log( formData );
377
+ // console.log( formAction );
378
+
379
+ // payment?
380
+ if ( formAction === 'payment' ) {
381
+ if ( formData.plan !== 'free' ) {
382
+ // only credit cards
383
+ if ( $( form[0] ).find( 'input[name="payment_nonce"]' ).val() === '' ) {
384
+ form.trigger( 'submit' );
385
+
386
+ return false;
387
+ }
388
+ } else {
389
+ // load screen
390
+ cnWelcomeScreen( e );
391
+
392
+ return false;
393
+ }
394
+ } else
395
+ e.preventDefault();
396
+
397
+ // get form and process it
398
+ result = cnWelcomeForm( form );
399
+
400
+ result.done( function( response ) {
401
+ // error
402
+ if ( response.hasOwnProperty( 'error' ) ) {
403
+ cnDisplayError( response.error, $( form[0] ) );
404
+
405
+ return false;
406
+ // message
407
+ } else if ( response.hasOwnProperty( 'message' ) ) {
408
+ cnDisplayError( response.message, $( form[0] ) );
409
+
410
+ return false;
411
+ // all good
412
+ } else {
413
+ switch ( formAction ) {
414
+ // logged in, go to success or billing
415
+ case 'login' :
416
+ // register complete, go to success or billing
417
+ case 'register' :
418
+ var accountPlan = formData.hasOwnProperty( 'plan' ) ? formData.plan : 'free';
419
+
420
+ // trigger payment
421
+ var accordionItem = $( form[0] ).closest( '.cn-accordion-item' );
422
+
423
+ // collapse account
424
+ $( accordionItem ).addClass( 'cn-collapsed cn-disabled' );
425
+
426
+ // show billing
427
+ $( accordionItem ).next().removeClass( 'cn-disabled' ).removeClass( 'cn-collapsed' );
428
+ $( accordionItem ).find( 'form' ).removeClass( 'cn-form-disabled' );
429
+
430
+ // init braintree after payment screen is loaded via AJAX
431
+ btInit();
432
+
433
+ break;
434
+
435
+ case 'configure' :
436
+ default :
437
+ // load screen
438
+ cnWelcomeScreen( e );
439
+ break;
440
+ }
441
+ }
442
+ } );
443
+
444
+ result.always( function( response ) {
445
+ if ( $( e.target ).find( '.cn-spinner' ).length )
446
+ $( e.target ).find( '.cn-spinner' ).removeClass( 'spin' );
447
+
448
+ // after invalid payment?
449
+ if ( formAction === 'payment' ) {
450
+ $( form[0] ).removeClass( 'cn-payment-in-progress' );
451
+ $( form[0] ).find( 'input[name="payment_nonce"]' ).val( '' );
452
+ }
453
+ } );
454
+
455
+ return result;
456
+ } );
457
+
458
+ //
459
+ $( document ).on( 'screen-loaded', function() {
460
+ var configureFields = $( '#cn-form-configure' ).serializeArray() || [];
461
+ var frame = window.frames[ 'cn_iframe_id' ];
462
+
463
+ if ( configureFields.length > 0 ) {
464
+ $( configureFields ).each( function( index, field ) {
465
+ } );
466
+ }
467
+ } );
468
+
469
+ // change payment method
470
+ $( document ).on( 'change', 'input[name="method"]', function() {
471
+ var input = $( this );
472
+
473
+ $( '#cn_payment_method_credit_card, #cn_payment_method_paypal' ).toggle();
474
+
475
+ input.closest( 'form' ).find( '.cn-form-feedback' ).addClass( 'cn-hidden' );
476
+
477
+ // init payment method if needed
478
+ btInitPaymentMethod( input.val() );
479
+ } );
480
+
481
+ //
482
+ $( document ).on( 'click', '.cn-accordion > .cn-accordion-item .cn-accordion-button', function() {
483
+ var accordionItem = $( this ).closest( '.cn-accordion-item' );
484
+ var activeItem = $( this ).closest( '.cn-accordion' ).find( '.cn-accordion-item:not(.cn-collapsed)' );
485
+
486
+ if ( $( accordionItem ).hasClass( 'cn-collapsed' ) ) {
487
+ $( activeItem ).addClass( 'cn-collapsed' );
488
+ $( accordionItem ).removeClass( 'cn-collapsed' );
489
+ }
490
+
491
+ return false;
492
+ } );
493
+
494
+ // live preview
495
+ $( document ).on( 'change', 'input[name="cn_position"]', function() {
496
+ var val = $( this ).val();
497
+ var frame = window.frames['cn_iframe_id'];
498
+
499
+ frame.contentWindow.postMessage( { call: 'position', value: val } );
500
+ } );
501
+
502
+ $( document ).on( 'change', 'input[name="cn_purposes"]', function() {
503
+ var val = [];
504
+
505
+ $( 'input[name="cn_purposes"]:checked' ).each( function() {
506
+ val.push( $( this ).val() );
507
+ } );
508
+
509
+ var frame = window.frames['cn_iframe_id'];
510
+
511
+ frame.contentWindow.postMessage( { call: 'purposes', value: val } );
512
+ } );
513
+
514
+ $( document ).on( 'change', 'input[name="cn_laws"]', function() {
515
+ var val = [];
516
+
517
+ $( 'input[name="cn_laws"]:checked' ).each( function() {
518
+ val.push( $( this ).val() );
519
+ } );
520
+
521
+ var frame = window.frames['cn_iframe_id'];
522
+
523
+ frame.contentWindow.postMessage( { call: 'laws', value: val } );
524
+ } );
525
+
526
+ $( document ).on( 'change', 'input[name="cn_color_primary"]', function() {
527
+ var val = $( this ).val();
528
+ var frame = window.frames['cn_iframe_id'];
529
+
530
+ frame.contentWindow.postMessage( { call: 'color_primary', value: val } );
531
+ } );
532
+
533
+ $( document ).on( 'change', 'input[name="cn_color_background"]', function() {
534
+ var val = $( this ).val();
535
+ var frame = window.frames['cn_iframe_id'];
536
+
537
+ frame.contentWindow.postMessage( { call: 'color_background', value: val } );
538
+ } );
539
+
540
+ $( document ).on( 'change', 'input[name="cn_color_border"]', function() {
541
+ var val = $( this ).val();
542
+ var frame = window.frames['cn_iframe_id'];
543
+
544
+ frame.contentWindow.postMessage( { call: 'color_border', value: val } );
545
+ } );
546
+
547
+ $( document ).on( 'change', 'input[name="cn_color_text"]', function() {
548
+ var val = $( this ).val();
549
+ var frame = window.frames['cn_iframe_id'];
550
+
551
+ frame.contentWindow.postMessage( { call: 'color_text', value: val } );
552
+ } );
553
+
554
+ $( document ).on( 'change', 'input[name="cn_color_heading"]', function() {
555
+ var val = $( this ).val();
556
+ var frame = window.frames['cn_iframe_id'];
557
+
558
+ frame.contentWindow.postMessage( { call: 'color_heading', value: val } );
559
+ } );
560
+
561
+ $( document ).on( 'change', 'input[name="cn_color_button_text"]', function() {
562
+ var val = $( this ).val();
563
+ var frame = window.frames['cn_iframe_id'];
564
+
565
+ frame.contentWindow.postMessage( { call: 'color_button_text', value: val } );
566
+ } );
567
+
568
+ // plan selection
569
+ $( document ).on( 'change', 'input[name="plan"]', function() {
570
+ var availablePlans = [ 'free', 'monthly', 'yearly' ];
571
+
572
+ var input = $( this ),
573
+ inputVal = input.val();
574
+
575
+ inputVal = availablePlans.indexOf( inputVal ) != -1 ? inputVal : 'free';
576
+
577
+ if ( inputVal === 'free' ) {
578
+ $( '#cn_submit_free' ).removeClass( 'cn-hidden' );
579
+ $( '#cn_submit_paid' ).addClass( 'cn-hidden' );
580
+ } else {
581
+ $( '#cn_submit_free' ).addClass( 'cn-hidden' );
582
+ $( '#cn_submit_paid' ).removeClass( 'cn-hidden' );
583
+ }
584
+
585
+ $( document ).find( '.cn-pricing-item input[value="' + inputVal + '"' ).prop('checked', true);
586
+ } );
587
+
588
+ // highlight form
589
+ $( document ).on( 'click', 'input[name="cn_pricing_plan"]', function() {
590
+ $( '.cn-accordion .cn-accordion-item:first-child:not(.cn-collapsed)' ).focus();
591
+ } );
592
+
593
+ // select plan
594
+ $( document ).on( 'change', 'input[name="cn_pricing_plan"]', function() {
595
+ var availablePlans = [ 'free', 'monthly', 'yearly' ];
596
+
597
+ var input = $( this ),
598
+ inputVal = input.val();
599
+
600
+ inputVal = availablePlans.indexOf( inputVal ) != -1 ? inputVal : 'free';
601
+
602
+ if ( inputVal === 'free' ) {
603
+ $( '#cn_submit_free' ).removeClass( 'cn-hidden' );
604
+ $( '#cn_submit_paid' ).addClass( 'cn-hidden' );
605
+ } else {
606
+ $( '#cn_submit_free' ).addClass( 'cn-hidden' );
607
+ $( '#cn_submit_paid' ).removeClass( 'cn-hidden' );
608
+ }
609
+
610
+ $( document ).find( '#cn_field_plan_' + inputVal ).prop('checked', true);
611
+
612
+
613
+ } );
614
+
615
+ // color picker
616
+ initSpectrum();
617
+
618
+ // init welcome modal
619
+ if ( cnWelcomeArgs.initModal == true )
620
+ initModal();
621
+
622
+ } );
623
+
624
+ $( document ).on( 'ajaxComplete', function() {
625
+ // color picker
626
+ initSpectrum();
627
+ } );
628
+
629
+ function initSpectrum() {
630
+ $( '.cn-color-picker' ).spectrum( {
631
+ showInput: true,
632
+ showInitial: true,
633
+ allowEmpty: false,
634
+ showAlpha: false
635
+ } );
636
+ }
637
+
638
+ function initModal() {
639
+ var progressbar,
640
+ timerId,
641
+ modal = $( "#cn-modal-trigger" );
642
+
643
+ if ( modal ) {
644
+
645
+ $( "#cn-modal-trigger" ).modaal( {
646
+ content_source: cnWelcomeArgs.ajaxURL + '?action=cn_welcome_screen' + '&nonce=' + cnWelcomeArgs.nonce + '&screen=1',
647
+ type: 'ajax',
648
+ width: 1600,
649
+ custom_class: 'cn-modal',
650
+ // is_locked: true
651
+ ajax_success: function() {
652
+ progressbar = $( document ).find( '.cn-progressbar' );
653
+
654
+ if ( progressbar ) {
655
+ timerId = initProgressBar( progressbar );
656
+ }
657
+ },
658
+ before_close: function() {
659
+ clearInterval( timerId );
660
+
661
+ var currentStep = $( '.cn-welcome-wrap' );
662
+
663
+ // reload if on success screen
664
+ if ( currentStep.length > 0 ) {
665
+ if ( $( currentStep[0] ).hasClass( 'cn-welcome-step-4' ) === true )
666
+ window.location.reload( true );
667
+ }
668
+ },
669
+ after_close: function() {
670
+ progressbar = $( document ).find( '.cn-progressbar' );
671
+
672
+ $( progressbar ).progressbar( "destroy" );
673
+ }
674
+ } );
675
+
676
+ $( modal ).trigger( 'click' );
677
+
678
+ $( document ).on( 'click', '.cn-skip-button', function( e ) {
679
+ $( '#modaal-close' ).trigger( 'click' );
680
+ } );
681
+ }
682
+ }
683
+
684
+ function initProgressBar( progressbar ) {
685
+ var progressbarObj,
686
+ progressLabel = $( document ).find( '.cn-progress-label' ),
687
+ complianceResults = $( document ).find( '.cn-compliance-results' ),
688
+ currentProgress = 0,
689
+ timerId;
690
+
691
+ if ( progressbar ) {
692
+
693
+ $( document ).on( 'click', '.cn-screen-button', function( e ) {
694
+ e.preventDefault();
695
+
696
+ // console.log( e );
697
+
698
+ clearInterval( timerId );
699
+ } );
700
+
701
+ $( progressbar ).progressbar( {
702
+ value: 5,
703
+ max: 100,
704
+ create: function ( event, ui ) {
705
+ // console.log( event );
706
+
707
+ timerId = setInterval( function() {
708
+ // increment progress bar
709
+ currentProgress += 5;
710
+
711
+ // console.log( currentProgress );
712
+
713
+ // update progressbar
714
+ progressbar.progressbar( 'value', currentProgress );
715
+
716
+ var lastItem = $( complianceResults ).find( 'div:visible' ).last(),
717
+ lastItemText = $( lastItem ).find( '.cn-compliance-status' ).text();
718
+
719
+ $( lastItem ).find( '.cn-compliance-status' ).text( lastItemText + ' .' );
720
+
721
+ switch ( currentProgress ) {
722
+ case 25:
723
+ $( lastItem ).find( '.cn-compliance-status' ).addClass( 'cn-passed' ).text( cnWelcomeArgs.statusPassed );
724
+
725
+ $( lastItem ).next().slideDown( 200 );
726
+ break;
727
+ case 50:
728
+ if ( cnWelcomeArgs.complianceStatus === 'active' ) {
729
+ $( lastItem ).find( '.cn-compliance-status' ).addClass( 'cn-passed' ).text( cnWelcomeArgs.statusPassed );
730
+ } else {
731
+ $( lastItem ).find( '.cn-compliance-status' ).addClass( 'cn-failed' ).text( cnWelcomeArgs.statusFailed );
732
+ }
733
+
734
+ $( lastItem ).next().slideDown( 200 );
735
+ break;
736
+ case 75:
737
+ if ( cnWelcomeArgs.complianceStatus === 'active' ) {
738
+ $( lastItem ).find( '.cn-compliance-status' ).addClass( 'cn-passed' ).text( cnWelcomeArgs.statusPassed );
739
+ } else {
740
+ $( lastItem ).find( '.cn-compliance-status' ).addClass( 'cn-failed' ).text( cnWelcomeArgs.statusFailed );
741
+ }
742
+
743
+ $( lastItem ).next().slideDown( 200 );
744
+ break;
745
+ case 100:
746
+ if ( cnWelcomeArgs.complianceStatus === 'active' ) {
747
+ $( lastItem ).find( '.cn-compliance-status' ).addClass( 'cn-passed' ).text( cnWelcomeArgs.statusPassed );
748
+ } else {
749
+ $( lastItem ).find( '.cn-compliance-status' ).addClass( 'cn-failed' ).text( cnWelcomeArgs.statusFailed );
750
+ }
751
+ break;
752
+ }
753
+
754
+ // complete
755
+ if ( currentProgress >= 100 ) {
756
+ clearInterval( timerId );
757
+ }
758
+ }, 300 );
759
+ },
760
+ change: function ( event, ui ) {
761
+ // console.log( event );
762
+
763
+ progressLabel.text( progressbar.progressbar( 'value' ) + '%' );
764
+ },
765
+ complete: function ( event, ui ) {
766
+ // console.log( event );
767
+
768
+ setTimeout( function () {
769
+ if ( cnWelcomeArgs.complianceStatus )
770
+ $( '.cn-compliance-check' ).find( '.cn-compliance-feedback' ).html( '<p class="cn-message">' + cnWelcomeArgs.compliancePassed + '</p>' ).removeClass( 'cn-hidden' );
771
+ else
772
+ $( '.cn-compliance-check' ).find( '.cn-compliance-feedback' ).html( '<p class="cn-error">' + cnWelcomeArgs.complianceFailed + '</p>' ).removeClass( 'cn-hidden' );
773
+ }, 500 );
774
+
775
+ // $( progressbar ).progressbar( "destroy" );
776
+ }
777
+ } );
778
+
779
+ progressbarObj = $( progressbar ).progressbar( "instance" );
780
+
781
+ return timerId;
782
+ }
783
+ }
784
+
785
+ $( document ).on( 'click', '.cn-run-upgrade, .cn-run-welcome', function( e ) {
786
+ e.preventDefault();
787
+
788
+ // console.log( e );
789
+
790
+ // modal
791
+ initModal();
792
+ } );
793
+
794
+ $( document ).on( 'click', '.cn-sign-up', function( e ) {
795
+ e.preventDefault();
796
+
797
+ $( '.cn-screen-button' ).trigger( 'click' );
798
+ } );
799
+
800
  } )( jQuery );
js/admin.js CHANGED
@@ -13,7 +13,7 @@
13
  $( el ).parent().addClass( 'loading' ).append( '<span class="spinner is-active" style="float: none;"></span>' );
14
 
15
  $.ajax( {
16
- url: cnArgs.ajaxUrl,
17
  type: 'POST',
18
  dataType: 'json',
19
  data: {
13
  $( el ).parent().addClass( 'loading' ).append( '<span class="spinner is-active" style="float: none;"></span>' );
14
 
15
  $.ajax( {
16
+ url: cnArgs.ajaxURL,
17
  type: 'POST',
18
  dataType: 'json',
19
  data: {
js/admin.min.js CHANGED
@@ -1,4 +1,4 @@
1
- (function($){$(function(){$('.cn_color').wpColorPicker();$('#cn_app_purge_cache a').on('click',function(e){e.preventDefault();var el=this;$(el).parent().addClass('loading').append('<span class="spinner is-active" style="float: none;"></span>');$.ajax({url:cnArgs.ajaxUrl,type:'POST',dataType:'json',data:{action:'cn_purge_cache',nonce:cnArgs.nonce}}).done(function(result){console.log(result)}).always(function(result){$(el).parent().find('.spinner').remove()})});$('#cn_refuse_opt').on('change',function(){if($(this).is(':checked'))
2
  $('#cn_refuse_opt_container').slideDown('fast');else $('#cn_refuse_opt_container').slideUp('fast')});$('#cn_revoke_cookies').on('change',function(){if($(this).is(':checked'))
3
  $('#cn_revoke_opt_container').slideDown('fast');else $('#cn_revoke_opt_container').slideUp('fast')});$('#cn_see_more').on('change',function(){if($(this).is(':checked'))
4
  $('#cn_see_more_opt').slideDown('fast');else $('#cn_see_more_opt').slideUp('fast')});$('#cn_on_scroll').on('change',function(){if($(this).is(':checked'))
1
+ (function($){$(function(){$('.cn_color').wpColorPicker();$('#cn_app_purge_cache a').on('click',function(e){e.preventDefault();var el=this;$(el).parent().addClass('loading').append('<span class="spinner is-active" style="float: none;"></span>');$.ajax({url:cnArgs.ajaxURL,type:'POST',dataType:'json',data:{action:'cn_purge_cache',nonce:cnArgs.nonce}}).done(function(result){console.log(result)}).always(function(result){$(el).parent().find('.spinner').remove()})});$('#cn_refuse_opt').on('change',function(){if($(this).is(':checked'))
2
  $('#cn_refuse_opt_container').slideDown('fast');else $('#cn_refuse_opt_container').slideUp('fast')});$('#cn_revoke_cookies').on('change',function(){if($(this).is(':checked'))
3
  $('#cn_revoke_opt_container').slideDown('fast');else $('#cn_revoke_opt_container').slideUp('fast')});$('#cn_see_more').on('change',function(){if($(this).is(':checked'))
4
  $('#cn_see_more_opt').slideDown('fast');else $('#cn_see_more_opt').slideUp('fast')});$('#cn_on_scroll').on('change',function(){if($(this).is(':checked'))
languages/cookie-notice.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Cookie Notice\n"
5
- "POT-Creation-Date: 2021-02-05 18:15+0100\n"
6
  "PO-Revision-Date: 2015-03-24 11:30+0100\n"
7
  "Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
8
  "Language-Team: dFactory <info@dfactory.eu>\n"
@@ -16,15 +16,15 @@ msgstr ""
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
- #: ../cookie-notice.php:464
20
  msgid "Settings"
21
  msgstr ""
22
 
23
- #: ../includes/settings.php:48 ../includes/welcome.php:358
24
  msgid "Top"
25
  msgstr ""
26
 
27
- #: ../includes/settings.php:49 ../includes/welcome.php:357
28
  msgid "Bottom"
29
  msgstr ""
30
 
@@ -60,7 +60,7 @@ msgstr ""
60
  msgid "Banner"
61
  msgstr ""
62
 
63
- #: ../includes/settings.php:75 ../includes/settings.php:490
64
  msgid "Message"
65
  msgstr ""
66
 
@@ -144,384 +144,426 @@ msgstr ""
144
  msgid "You can choose whether or not you want to consent to our use of cookies through the options below. You can customise the use of cookies, and change your settings at any time."
145
  msgstr ""
146
 
147
- #: ../includes/settings.php:369
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  msgid "We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it."
149
  msgstr ""
150
 
151
- #: ../includes/settings.php:370
152
  msgid "Ok"
153
  msgstr ""
154
 
155
- #: ../includes/settings.php:371
156
  msgid "No"
157
  msgstr ""
158
 
159
- #: ../includes/settings.php:372
160
  msgid "You can revoke your consent any time using the Revoke consent button."
161
  msgstr ""
162
 
163
- #: ../includes/settings.php:373 ../includes/settings.php:494
164
  msgid "Revoke consent"
165
  msgstr ""
166
 
167
- #: ../includes/settings.php:374 ../includes/settings.php:492
168
- msgid "Privacy policy"
169
- msgstr ""
170
-
171
- #: ../includes/settings.php:409
172
  msgid "Cookie Notice"
173
  msgstr ""
174
 
175
- #: ../includes/settings.php:409
176
  msgid "Cookies"
177
  msgstr ""
178
 
179
- #: ../includes/settings.php:420
180
  msgid "Cookie Notice & Compliance for GDPR/CCPA"
181
  msgstr ""
182
 
183
- #: ../includes/settings.php:429
184
  msgid "Promote the privacy of your website visitors without affecting how you do your business."
185
  msgstr ""
186
 
187
- #: ../includes/settings.php:432 ../includes/welcome.php:171
188
- #: ../includes/welcome.php:204
189
  msgid "The next generation of Cookie Notice"
190
  msgstr ""
191
 
192
- #: ../includes/settings.php:434 ../includes/welcome.php:173
193
- msgid "An all new web application to help you deliver better consent experiences and comply with GDPR and CCPA more effectively."
194
  msgstr ""
195
 
196
- #: ../includes/settings.php:437
197
- msgid "Upgrade"
198
  msgstr ""
199
 
200
- #: ../includes/settings.php:453
201
  msgid "Reset to defaults"
202
  msgstr ""
203
 
204
- #: ../includes/settings.php:471 ../includes/settings.php:484
205
  msgid "Compliance Settings"
206
  msgstr ""
207
 
208
- #: ../includes/settings.php:472 ../includes/settings.php:485
209
  msgid "Compliance status"
210
  msgstr ""
211
 
212
- #: ../includes/settings.php:473 ../includes/settings.php:486
213
  msgid "App ID"
214
  msgstr ""
215
 
216
- #: ../includes/settings.php:474 ../includes/settings.php:487
217
  msgid "App Key"
218
  msgstr ""
219
 
220
- #: ../includes/settings.php:476
221
  msgid "Miscellaneous Settings"
222
  msgstr ""
223
 
224
- #: ../includes/settings.php:477 ../includes/settings.php:533
225
- #: ../includes/settings.php:548 ../includes/settings.php:563
 
226
  msgid "Autoblocking"
227
  msgstr ""
228
 
229
- #: ../includes/settings.php:478
230
  msgid "Cache"
231
  msgstr ""
232
 
233
- #: ../includes/settings.php:479 ../includes/settings.php:501
234
  msgid "Script placement"
235
  msgstr ""
236
 
237
- #: ../includes/settings.php:480 ../includes/settings.php:502
238
  msgid "Deactivation"
239
  msgstr ""
240
 
241
- #: ../includes/settings.php:489
242
  msgid "Notice Settings"
243
  msgstr ""
244
 
245
- #: ../includes/settings.php:491
246
  msgid "Button text"
247
  msgstr ""
248
 
249
- #: ../includes/settings.php:493
250
  msgid "Refuse consent"
251
  msgstr ""
252
 
253
- #: ../includes/settings.php:495
254
  msgid "Script blocking"
255
  msgstr ""
256
 
257
- #: ../includes/settings.php:496
258
  msgid "Reloading"
259
  msgstr ""
260
 
261
- #: ../includes/settings.php:497
262
  msgid "On scroll"
263
  msgstr ""
264
 
265
- #: ../includes/settings.php:498
266
  msgid "On click"
267
  msgstr ""
268
 
269
- #: ../includes/settings.php:499
270
  msgid "Accepted expiry"
271
  msgstr ""
272
 
273
- #: ../includes/settings.php:500
274
  msgid "Rejected expiry"
275
  msgstr ""
276
 
277
- #: ../includes/settings.php:505
278
  msgid "Notice Design"
279
  msgstr ""
280
 
281
- #: ../includes/settings.php:506
282
  msgid "Position"
283
  msgstr ""
284
 
285
- #: ../includes/settings.php:507
286
  msgid "Animation"
287
  msgstr ""
288
 
289
- #: ../includes/settings.php:508
290
  msgid "Button style"
291
  msgstr ""
292
 
293
- #: ../includes/settings.php:509
294
  msgid "Button class"
295
  msgstr ""
296
 
297
- #: ../includes/settings.php:510
298
  msgid "Colors"
299
  msgstr ""
300
 
301
- #: ../includes/settings.php:532 ../includes/settings.php:547
302
- #: ../includes/settings.php:562
303
  msgid "Notice"
304
  msgstr ""
305
 
306
- #: ../includes/settings.php:532 ../includes/settings.php:533
307
- #: ../includes/settings.php:534 ../includes/settings.php:535
308
- #: ../includes/settings.php:547 ../includes/settings.php:562
309
  msgid "Active"
310
  msgstr ""
311
 
312
- #: ../includes/settings.php:534 ../includes/settings.php:549
313
- #: ../includes/settings.php:564
314
  msgid "Cookie Categories"
315
  msgstr ""
316
 
317
- #: ../includes/settings.php:535 ../includes/settings.php:550
318
- #: ../includes/settings.php:565
319
  msgid "Proof-of-Consent"
320
  msgstr ""
321
 
322
- #: ../includes/settings.php:538
323
  msgid "Log in & Configure"
324
  msgstr ""
325
 
326
- #: ../includes/settings.php:539
327
  msgid "Log into the Cookie Compliance&trade; web application and configure your Privacy Experience."
328
  msgstr ""
329
 
330
- #: ../includes/settings.php:548 ../includes/settings.php:549
331
- #: ../includes/settings.php:550
332
  msgid "Pending"
333
  msgstr ""
334
 
335
- #: ../includes/settings.php:553
336
- msgid "Log in & Complete setup"
337
  msgstr ""
338
 
339
- #: ../includes/settings.php:554
340
  msgid "Log into the Cookie Compliance&trade; web application and complete the setup process."
341
  msgstr ""
342
 
343
- #: ../includes/settings.php:563 ../includes/settings.php:564
344
- #: ../includes/settings.php:565
345
  msgid "Inactive"
346
  msgstr ""
347
 
348
- #: ../includes/settings.php:568
349
- msgid "Add GDPR/CCPA Compliance"
350
  msgstr ""
351
 
352
- #: ../includes/settings.php:569
353
- msgid "Launch Cookie Compliance&trade; and add GDPR & CCPA compliance features."
354
  msgstr ""
355
 
356
- #: ../includes/settings.php:584
357
  msgid "Enter your Cookie Compliance&trade; application ID."
358
  msgstr ""
359
 
360
- #: ../includes/settings.php:596
361
  msgid "Enter your Cookie Compliance&trade; application secret key."
362
  msgstr ""
363
 
364
- #: ../includes/settings.php:606
365
  msgid "Enable to automatically block 3rd party scripts before user consent."
366
  msgstr ""
367
 
368
- #: ../includes/settings.php:607
369
  msgid "In case you're experiencing issues with your site disable that feature temporarily."
370
  msgstr ""
371
 
372
- #: ../includes/settings.php:618
373
  msgid "Purge Cache"
374
  msgstr ""
375
 
376
- #: ../includes/settings.php:620
377
  msgid "Click the Purge Cache button to refresh the app configuration."
378
  msgstr ""
379
 
380
- #: ../includes/settings.php:631
381
  msgid "Enter the cookie notice message."
382
  msgstr ""
383
 
384
- #: ../includes/settings.php:642
385
  msgid "The text of the option to accept the notice and make it disappear."
386
  msgstr ""
387
 
388
- #: ../includes/settings.php:652
389
  msgid "Enable to give to the user the possibility to refuse third party non functional cookies."
390
  msgstr ""
391
 
392
- #: ../includes/settings.php:656
393
  msgid "The text of the button to refuse the consent."
394
  msgstr ""
395
 
396
- #: ../includes/settings.php:674
397
  msgid "Head"
398
  msgstr ""
399
 
400
- #: ../includes/settings.php:675
401
  msgid "Body"
402
  msgstr ""
403
 
404
- #: ../includes/settings.php:678
405
  msgid "The code to be used in your site header, before the closing head tag."
406
  msgstr ""
407
 
408
- #: ../includes/settings.php:682
409
  msgid "The code to be used in your site footer, before the closing body tag."
410
  msgstr ""
411
 
412
- #: ../includes/settings.php:686
413
  msgid "Enter non functional cookies Javascript code here (for e.g. Google Analitycs) to be used after the notice is accepted."
414
  msgstr ""
415
 
416
- #: ../includes/settings.php:686
417
  msgid "To get the user consent status use the <code>cn_cookies_accepted()</code> function."
418
  msgstr ""
419
 
420
- #: ../includes/settings.php:697
421
  msgid "Enable to give to the user the possibility to revoke their consent <i>(requires \"Refuse consent\" option enabled)</i>."
422
  msgstr ""
423
 
424
- #: ../includes/settings.php:700
425
  msgid "Enter the revoke message."
426
  msgstr ""
427
 
428
- #: ../includes/settings.php:702
429
  msgid "The text of the button to revoke the consent."
430
  msgstr ""
431
 
432
- #: ../includes/settings.php:710
433
  msgid "Select the method for displaying the revoke button - automatic (in the banner) or manual using <code>[cookies_revoke]</code> shortcode."
434
  msgstr ""
435
 
436
- #: ../includes/settings.php:721
437
  msgid "Enable to reload the page after the notice is accepted."
438
  msgstr ""
439
 
440
- #: ../includes/settings.php:744
441
  msgid "Enable privacy policy link."
442
  msgstr ""
443
 
444
- #: ../includes/settings.php:747
445
  msgid "The text of the privacy policy button."
446
  msgstr ""
447
 
448
- #: ../includes/settings.php:759
449
  msgid "Select where to redirect user for more information."
450
  msgstr ""
451
 
452
- #: ../includes/settings.php:762
453
  msgid "-- select page --"
454
  msgstr ""
455
 
456
- #: ../includes/settings.php:773
457
  msgid "Select from one of your site's pages."
458
  msgstr ""
459
 
460
- #: ../includes/settings.php:779
461
  msgid "Synchronize with WordPress Privacy Policy page."
462
  msgstr ""
463
 
464
- #: ../includes/settings.php:786
465
  msgid "Enter the full URL starting with http(s)://"
466
  msgstr ""
467
 
468
- #: ../includes/settings.php:829
469
  msgid "The amount of time that the cookie should be stored for when user accepts the notice."
470
  msgstr ""
471
 
472
- #: ../includes/settings.php:852
473
  msgid "The amount of time that the cookie should be stored for when the user doesn't accept the notice."
474
  msgstr ""
475
 
476
- #: ../includes/settings.php:870
477
  msgid "Select where all the plugin scripts should be placed."
478
  msgstr ""
479
 
480
- #: ../includes/settings.php:890
481
  msgid "Select location for the notice."
482
  msgstr ""
483
 
484
- #: ../includes/settings.php:911
485
  msgid "Select the animation style."
486
  msgstr ""
487
 
488
- #: ../includes/settings.php:922
489
  msgid "Enable to accept the notice when user scrolls."
490
  msgstr ""
491
 
492
- #: ../includes/settings.php:925
493
  msgid "Number of pixels user has to scroll to accept the notice and make it disappear."
494
  msgstr ""
495
 
496
- #: ../includes/settings.php:936
497
  msgid "Enable to accept the notice on any click on the page."
498
  msgstr ""
499
 
500
- #: ../includes/settings.php:946
501
  msgid "Enable if you want all plugin data to be deleted on deactivation."
502
  msgstr ""
503
 
504
- #: ../includes/settings.php:966
505
  msgid "Select the buttons style."
506
  msgstr ""
507
 
508
- #: ../includes/settings.php:979
509
  msgid "Enter additional button CSS classes separated by spaces."
510
  msgstr ""
511
 
512
- #: ../includes/settings.php:1003
513
  msgid "Bar opacity"
514
  msgstr ""
515
 
516
- #: ../includes/settings.php:1144
517
  msgid "Settings saved."
518
  msgstr ""
519
 
520
- #: ../includes/settings.php:1151
521
  msgid "Settings restored to defaults."
522
  msgstr ""
523
 
524
- #: ../includes/settings.php:1178
525
  msgid "Are you sure you want to reset these settings to defaults?"
526
  msgstr ""
527
 
@@ -532,390 +574,452 @@ msgstr ""
532
  msgid "You do not have permission to access this page."
533
  msgstr ""
534
 
535
- #: ../includes/welcome-api.php:71 ../includes/welcome-api.php:267
536
- #: ../includes/welcome-api.php:306 ../includes/welcome-api.php:354
537
- #: ../includes/welcome-api.php:427 ../includes/welcome-api.php:697
538
- #: ../includes/welcome.php:74
539
  msgid "Unexpected error occurred. Please try again later."
540
  msgstr ""
541
 
542
- #: ../includes/welcome-api.php:85
543
  msgid "Empty plan or payment method data."
544
  msgstr ""
545
 
546
- #: ../includes/welcome-api.php:116
547
  msgid "Unable to create customer data."
548
  msgstr ""
549
 
550
- #: ../includes/welcome-api.php:209
551
  msgid "Please accept the Terms of Service to proceed."
552
  msgstr ""
553
 
554
- #: ../includes/welcome-api.php:214 ../includes/welcome-api.php:325
555
  msgid "Email is not allowed to be empty."
556
  msgstr ""
557
 
558
- #: ../includes/welcome-api.php:219 ../includes/welcome-api.php:330
559
  msgid "Password is not allowed to be empty."
560
  msgstr ""
561
 
562
- #: ../includes/welcome-api.php:224
563
  msgid "Passwords do not match."
564
  msgstr ""
565
 
566
- #: ../includes/welcome-api.php:441
567
- #, php-format
568
- msgid "You have an active subscription for %s"
 
 
 
569
  msgstr ""
570
 
571
- #: ../includes/welcome.php:36
572
- msgid "Welcome to Cookie Notice"
573
  msgstr ""
574
 
575
- #: ../includes/welcome.php:75
 
 
 
 
576
  msgid "Please fill all the required fields."
577
  msgstr ""
578
 
 
 
 
 
579
  #: ../includes/welcome.php:179
580
- #, php-format
581
- msgid "Digital Factory - the original developers of Cookie Notice - has joined forces with %s, the company known for introducing the 31st Human Right, to launch the Cookie Compliance&trade; web application."
582
  msgstr ""
583
 
584
- #: ../includes/welcome.php:203
585
- msgid "Privacy Made Easy"
586
  msgstr ""
587
 
588
- #: ../includes/welcome.php:206
589
- msgid "Cookie Compliance&trade; adds GDPR & CCPA compliance features, and a new Privacy Experience to Cookie Notice."
590
  msgstr ""
591
 
592
- #: ../includes/welcome.php:212
593
- msgid "WP Plugin"
594
  msgstr ""
595
 
596
- #: ../includes/welcome.php:216
597
- msgid "Customizable notice message"
598
  msgstr ""
599
 
600
- #: ../includes/welcome.php:217
601
- msgid "Consent on click, scroll or close"
602
  msgstr ""
603
 
604
- #: ../includes/welcome.php:218
605
- msgid "Multiple cookie expiry options"
 
606
  msgstr ""
607
 
608
- #: ../includes/welcome.php:219
609
- msgid "Link to Privacy Policy page"
610
  msgstr ""
611
 
612
- #: ../includes/welcome.php:228
613
- msgid "Web App"
 
614
  msgstr ""
615
 
616
- #: ../includes/welcome.php:232
617
- msgid "Customizable <b>GDPR & CCPA</b> notice templates"
 
618
  msgstr ""
619
 
620
- #: ../includes/welcome.php:233
621
- msgid "<b>Consent Analytics</b> Dashboard"
622
  msgstr ""
623
 
624
- #: ../includes/welcome.php:234
625
- msgid "Cookie <b>Autoblocking</b> (complies with GDPR Art.7)"
626
  msgstr ""
627
 
628
- #: ../includes/welcome.php:235
629
- msgid "<b>Cookie Categories</b> (complies with GDPR Art.32)"
630
  msgstr ""
631
 
632
- #: ../includes/welcome.php:236
633
- msgid "<b>Proof-of-Consent</b> Storage (complies with GDPR Art.30)"
634
  msgstr ""
635
 
636
- #: ../includes/welcome.php:237
637
- msgid "Link to <b>'Do Not Sell'</b> page (supports CCPA Sec.1798)"
 
 
638
  msgstr ""
639
 
640
- #: ../includes/welcome.php:238
641
- msgid "Enhanced design controls and options"
642
  msgstr ""
643
 
644
- #: ../includes/welcome.php:239
645
- msgid "Multiple new banner positions"
646
  msgstr ""
647
 
648
- #: ../includes/welcome.php:240
649
- msgid "Custom language localization"
650
  msgstr ""
651
 
652
- #: ../includes/welcome.php:254
653
- msgid "Welcome"
654
  msgstr ""
655
 
656
- #: ../includes/welcome.php:255
657
- msgid "You are now Promoting Privacy"
658
  msgstr ""
659
 
660
- #: ../includes/welcome.php:257
661
- msgid "Log into the Cookie Compliance&trade; web application and continue configuring your Privacy Experience."
662
  msgstr ""
663
 
664
- #: ../includes/welcome.php:260
665
- msgid "Go to Application"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
666
  msgstr ""
667
 
668
- #: ../includes/welcome.php:286 ../includes/welcome.php:397
669
- msgid "GDPR & CCPA Upgrade Ready"
670
  msgstr ""
671
 
672
- #: ../includes/welcome.php:287
673
- msgid "Simulate Cookie Compliance&trade; on your site."
674
  msgstr ""
675
 
676
- #: ../includes/welcome.php:287
677
- msgid "Click below to see what the next generation of Cookie Notice looks like running on your website."
 
 
 
 
 
 
 
 
678
  msgstr ""
679
 
680
- #: ../includes/welcome.php:289
681
  msgid "Site URL"
682
  msgstr ""
683
 
684
- #: ../includes/welcome.php:290
685
  msgid "Site Name"
686
  msgstr ""
687
 
688
- #: ../includes/welcome.php:295
689
- msgid "Launch Live Demo"
690
  msgstr ""
691
 
692
- #: ../includes/welcome.php:308
693
- msgid "Compliance Live Demo"
694
  msgstr ""
695
 
696
- #: ../includes/welcome.php:309
697
- msgid "Simulate the upgraded Cookie Compliance&trade; design and compliance features through the options below. Click Add Copmliance to save the configuration and go to creating your Cookie Compliance&trade; account."
698
  msgstr ""
699
 
700
- #: ../includes/welcome.php:313
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
701
  msgid "Banner Compliance"
702
  msgstr ""
703
 
704
- #: ../includes/welcome.php:334
705
  msgid "Select the laws that apply to your business"
706
  msgstr ""
707
 
708
- #: ../includes/welcome.php:336
709
  msgid "GDPR"
710
  msgstr ""
711
 
712
- #: ../includes/welcome.php:337
713
  msgid "CCPA"
714
  msgstr ""
715
 
716
- #: ../includes/welcome.php:341
717
- msgid "What kind of services is your site using? Check all that apply"
718
  msgstr ""
719
 
720
- #: ../includes/welcome.php:343
721
  msgid "I use personalization services on my site​"
722
  msgstr ""
723
 
724
- #: ../includes/welcome.php:344
725
  msgid "I collect and analyse information about my website’s traffic"
726
  msgstr ""
727
 
728
- #: ../includes/welcome.php:345
729
  msgid "I run targeted ads on my site using, for example, Google Adsense​"
730
  msgstr ""
731
 
732
- #: ../includes/welcome.php:351
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
733
  msgid "Banner Design"
734
  msgstr ""
735
 
736
- #: ../includes/welcome.php:355
737
  msgid "Select your preferred display position"
738
  msgstr ""
739
 
740
- #: ../includes/welcome.php:359
741
  msgid "Left"
742
  msgstr ""
743
 
744
- #: ../includes/welcome.php:360
745
  msgid "Right"
746
  msgstr ""
747
 
748
- #: ../includes/welcome.php:361
749
  msgid "Center"
750
  msgstr ""
751
 
752
- #: ../includes/welcome.php:365
753
  msgid "Adjust the banner color scheme"
754
  msgstr ""
755
 
756
- #: ../includes/welcome.php:367
757
  msgid "Color of the buttons and interactive elements."
758
  msgstr ""
759
 
760
- #: ../includes/welcome.php:368
761
  msgid "Color of the banner background."
762
  msgstr ""
763
 
764
- #: ../includes/welcome.php:369
765
  msgid "Color of the borders and inactive elements."
766
  msgstr ""
767
 
768
- #: ../includes/welcome.php:370
769
  msgid "Color of the body text."
770
  msgstr ""
771
 
772
- #: ../includes/welcome.php:371
773
  msgid "Color of the heading text."
774
  msgstr ""
775
 
776
- #: ../includes/welcome.php:372
777
  msgid "Color of the button text."
778
  msgstr ""
779
 
780
- #: ../includes/welcome.php:379
781
- msgid "Add Compliance"
 
 
 
 
782
  msgstr ""
783
 
784
- #: ../includes/welcome.php:399
785
- msgid "To start using The Next Generation of Cookie Notice create a Cookie Compliance&trade; account. Then you will be asked to select plan and authorize your subscription."
786
  msgstr ""
787
 
788
- #: ../includes/welcome.php:403
789
  msgid "Create Account"
790
  msgstr ""
791
 
792
- #: ../includes/welcome.php:408 ../includes/welcome.php:508
793
  msgid "Email address"
794
  msgstr ""
795
 
796
- #: ../includes/welcome.php:411 ../includes/welcome.php:511
797
  msgid "Password"
798
  msgstr ""
799
 
800
- #: ../includes/welcome.php:414
801
  msgid "Confirm Password"
802
  msgstr ""
803
 
804
- #: ../includes/welcome.php:418
805
  #, php-format
806
  msgid "I have read and agree to the <a href=\"%s\" target=\"_blank\">Terms of Service"
807
  msgstr ""
808
 
809
- #: ../includes/welcome.php:422
810
  msgid "Sign Up"
811
  msgstr ""
812
 
813
- #: ../includes/welcome.php:436
814
  msgid "Already have an account?"
815
  msgstr ""
816
 
817
- #: ../includes/welcome.php:436 ../includes/welcome.php:514
818
  msgid "Sign in"
819
  msgstr ""
820
 
821
- #: ../includes/welcome.php:441
822
- msgid "Account Plan"
823
  msgstr ""
824
 
825
- #: ../includes/welcome.php:447 ../includes/welcome.php:539
826
- msgid "<b>14 days</b> Free Trial"
827
- msgstr ""
828
-
829
- #: ../includes/welcome.php:447 ../includes/welcome.php:539
830
  msgid "/mo"
831
  msgstr ""
832
 
833
- #: ../includes/welcome.php:448 ../includes/welcome.php:540
834
- msgid "<b>30 days</b> Free Trial"
835
  msgstr ""
836
 
837
- #: ../includes/welcome.php:448 ../includes/welcome.php:540
838
  msgid "/yr"
839
  msgstr ""
840
 
841
- #: ../includes/welcome.php:448
842
- #, php-format
843
- msgid "15% off"
844
  msgstr ""
845
 
846
- #: ../includes/welcome.php:452 ../includes/welcome.php:544
847
- msgid "Subscription Method"
848
  msgstr ""
849
 
850
- #: ../includes/welcome.php:454 ../includes/welcome.php:546
851
  msgid "Credit Card"
852
  msgstr ""
853
 
854
- #: ../includes/welcome.php:455 ../includes/welcome.php:547
855
  msgid "PayPal"
856
  msgstr ""
857
 
858
- #: ../includes/welcome.php:461 ../includes/welcome.php:553
859
  msgid "Card Number"
860
  msgstr ""
861
 
862
- #: ../includes/welcome.php:465 ../includes/welcome.php:557
863
  msgid "Expiration Date"
864
  msgstr ""
865
 
866
- #: ../includes/welcome.php:469 ../includes/welcome.php:561
867
  msgid "CVC/CVV"
868
  msgstr ""
869
 
870
- #: ../includes/welcome.php:473 ../includes/welcome.php:565
871
- msgid "Start Free Trial"
872
  msgstr ""
873
 
874
- #: ../includes/welcome.php:497
875
  msgid "Compliance Sign in"
876
  msgstr ""
877
 
878
- #: ../includes/welcome.php:499
879
- msgid "Sign in to your existing Cookie Compliance&trade; account to continue upgrading of this website."
880
  msgstr ""
881
 
882
- #: ../includes/welcome.php:503
883
  msgid "Account Login"
884
  msgstr ""
885
 
886
- #: ../includes/welcome.php:528
887
  msgid "Don't have an account yet?"
888
  msgstr ""
889
 
890
- #: ../includes/welcome.php:528
891
  msgid "Sign up"
892
  msgstr ""
893
 
894
- #: ../includes/welcome.php:533
895
- msgid "Compliance Plan"
896
- msgstr ""
897
-
898
- #: ../includes/welcome.php:589
899
  msgid "Success!"
900
  msgstr ""
901
 
902
- #: ../includes/welcome.php:590
903
  msgid "You have successfully upgraded your website to Cookie Compliance&trade;"
904
  msgstr ""
905
 
906
- #: ../includes/welcome.php:590
907
  #, php-format
908
  msgid "Go to Cookie Compliance&trade; application now. Or access it anytime from your <a href=\"%s\">Cookie Notice settings page</a>."
909
  msgstr ""
910
-
911
- #: ../includes/welcome.php:599
912
- msgid "Remind me later"
913
- msgstr ""
914
-
915
- #: ../includes/welcome.php:602
916
- msgid "WordPress Dashboard"
917
- msgstr ""
918
-
919
- #: ../includes/welcome.php:605
920
- msgid "Skip for now"
921
- msgstr ""
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Cookie Notice\n"
5
+ "POT-Creation-Date: 2021-07-10 10:27+0200\n"
6
  "PO-Revision-Date: 2015-03-24 11:30+0100\n"
7
  "Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
8
  "Language-Team: dFactory <info@dfactory.eu>\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
+ #: ../cookie-notice.php:475
20
  msgid "Settings"
21
  msgstr ""
22
 
23
+ #: ../includes/settings.php:48 ../includes/welcome.php:511
24
  msgid "Top"
25
  msgstr ""
26
 
27
+ #: ../includes/settings.php:49 ../includes/welcome.php:510
28
  msgid "Bottom"
29
  msgstr ""
30
 
60
  msgid "Banner"
61
  msgstr ""
62
 
63
+ #: ../includes/settings.php:75 ../includes/settings.php:505
64
  msgid "Message"
65
  msgstr ""
66
 
144
  msgid "You can choose whether or not you want to consent to our use of cookies through the options below. You can customise the use of cookies, and change your settings at any time."
145
  msgstr ""
146
 
147
+ #: ../includes/settings.php:120
148
+ msgid "Accept"
149
+ msgstr ""
150
+
151
+ #: ../includes/settings.php:121
152
+ msgid "Reject"
153
+ msgstr ""
154
+
155
+ #: ../includes/settings.php:122
156
+ msgid "Revoke Cookies"
157
+ msgstr ""
158
+
159
+ #: ../includes/settings.php:123 ../includes/settings.php:389
160
+ #: ../includes/settings.php:507
161
+ msgid "Privacy policy"
162
+ msgstr ""
163
+
164
+ #: ../includes/settings.php:124
165
+ msgid "Do Not Sell"
166
+ msgstr ""
167
+
168
+ #: ../includes/settings.php:125
169
+ msgid "Preferences"
170
+ msgstr ""
171
+
172
+ #: ../includes/settings.php:126
173
+ msgid "We're Promoting Privacy"
174
+ msgstr ""
175
+
176
+ #: ../includes/settings.php:128
177
+ msgid "You can learn more about how we use cookies by visiting our privacy policy page."
178
+ msgstr ""
179
+
180
+ #: ../includes/settings.php:129
181
+ msgid "California residents can also exercise their personal information rights through the Do Not Sell My Personal Information page."
182
+ msgstr ""
183
+
184
+ #: ../includes/settings.php:130
185
+ msgid "Cookie Preferences"
186
+ msgstr ""
187
+
188
+ #: ../includes/settings.php:131
189
+ msgid "Use the toggles to customize your cookie consent. Learn more about the purpose of each cookie and the companies behind them through the information and links below."
190
+ msgstr ""
191
+
192
+ #: ../includes/settings.php:384
193
  msgid "We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it."
194
  msgstr ""
195
 
196
+ #: ../includes/settings.php:385
197
  msgid "Ok"
198
  msgstr ""
199
 
200
+ #: ../includes/settings.php:386
201
  msgid "No"
202
  msgstr ""
203
 
204
+ #: ../includes/settings.php:387
205
  msgid "You can revoke your consent any time using the Revoke consent button."
206
  msgstr ""
207
 
208
+ #: ../includes/settings.php:388 ../includes/settings.php:509
209
  msgid "Revoke consent"
210
  msgstr ""
211
 
212
+ #: ../includes/settings.php:424 ../includes/welcome.php:429
 
 
 
 
213
  msgid "Cookie Notice"
214
  msgstr ""
215
 
216
+ #: ../includes/settings.php:424
217
  msgid "Cookies"
218
  msgstr ""
219
 
220
+ #: ../includes/settings.php:435
221
  msgid "Cookie Notice & Compliance for GDPR/CCPA"
222
  msgstr ""
223
 
224
+ #: ../includes/settings.php:444
225
  msgid "Promote the privacy of your website visitors without affecting how you do your business."
226
  msgstr ""
227
 
228
+ #: ../includes/settings.php:447 ../includes/welcome.php:171
229
+ #: ../includes/welcome.php:260
230
  msgid "The next generation of Cookie Notice"
231
  msgstr ""
232
 
233
+ #: ../includes/settings.php:449
234
+ msgid "A free web application to help you deliver better consent experiences and comply with GDPR, CCPA and other data privacy laws more effectively."
235
  msgstr ""
236
 
237
+ #: ../includes/settings.php:452
238
+ msgid "Free Upgrade"
239
  msgstr ""
240
 
241
+ #: ../includes/settings.php:468
242
  msgid "Reset to defaults"
243
  msgstr ""
244
 
245
+ #: ../includes/settings.php:486 ../includes/settings.php:499
246
  msgid "Compliance Settings"
247
  msgstr ""
248
 
249
+ #: ../includes/settings.php:487 ../includes/settings.php:500
250
  msgid "Compliance status"
251
  msgstr ""
252
 
253
+ #: ../includes/settings.php:488 ../includes/settings.php:501
254
  msgid "App ID"
255
  msgstr ""
256
 
257
+ #: ../includes/settings.php:489 ../includes/settings.php:502
258
  msgid "App Key"
259
  msgstr ""
260
 
261
+ #: ../includes/settings.php:491
262
  msgid "Miscellaneous Settings"
263
  msgstr ""
264
 
265
+ #: ../includes/settings.php:492 ../includes/settings.php:548
266
+ #: ../includes/settings.php:563 ../includes/settings.php:578
267
+ #: ../includes/welcome.php:430
268
  msgid "Autoblocking"
269
  msgstr ""
270
 
271
+ #: ../includes/settings.php:493
272
  msgid "Cache"
273
  msgstr ""
274
 
275
+ #: ../includes/settings.php:494 ../includes/settings.php:516
276
  msgid "Script placement"
277
  msgstr ""
278
 
279
+ #: ../includes/settings.php:495 ../includes/settings.php:517
280
  msgid "Deactivation"
281
  msgstr ""
282
 
283
+ #: ../includes/settings.php:504
284
  msgid "Notice Settings"
285
  msgstr ""
286
 
287
+ #: ../includes/settings.php:506
288
  msgid "Button text"
289
  msgstr ""
290
 
291
+ #: ../includes/settings.php:508
292
  msgid "Refuse consent"
293
  msgstr ""
294
 
295
+ #: ../includes/settings.php:510
296
  msgid "Script blocking"
297
  msgstr ""
298
 
299
+ #: ../includes/settings.php:511
300
  msgid "Reloading"
301
  msgstr ""
302
 
303
+ #: ../includes/settings.php:512
304
  msgid "On scroll"
305
  msgstr ""
306
 
307
+ #: ../includes/settings.php:513
308
  msgid "On click"
309
  msgstr ""
310
 
311
+ #: ../includes/settings.php:514
312
  msgid "Accepted expiry"
313
  msgstr ""
314
 
315
+ #: ../includes/settings.php:515
316
  msgid "Rejected expiry"
317
  msgstr ""
318
 
319
+ #: ../includes/settings.php:520
320
  msgid "Notice Design"
321
  msgstr ""
322
 
323
+ #: ../includes/settings.php:521
324
  msgid "Position"
325
  msgstr ""
326
 
327
+ #: ../includes/settings.php:522
328
  msgid "Animation"
329
  msgstr ""
330
 
331
+ #: ../includes/settings.php:523
332
  msgid "Button style"
333
  msgstr ""
334
 
335
+ #: ../includes/settings.php:524
336
  msgid "Button class"
337
  msgstr ""
338
 
339
+ #: ../includes/settings.php:525
340
  msgid "Colors"
341
  msgstr ""
342
 
343
+ #: ../includes/settings.php:547 ../includes/settings.php:562
344
+ #: ../includes/settings.php:577
345
  msgid "Notice"
346
  msgstr ""
347
 
348
+ #: ../includes/settings.php:547 ../includes/settings.php:548
349
+ #: ../includes/settings.php:549 ../includes/settings.php:550
350
+ #: ../includes/settings.php:562 ../includes/settings.php:577
351
  msgid "Active"
352
  msgstr ""
353
 
354
+ #: ../includes/settings.php:549 ../includes/settings.php:564
355
+ #: ../includes/settings.php:579 ../includes/welcome.php:431
356
  msgid "Cookie Categories"
357
  msgstr ""
358
 
359
+ #: ../includes/settings.php:550 ../includes/settings.php:565
360
+ #: ../includes/settings.php:580 ../includes/welcome.php:432
361
  msgid "Proof-of-Consent"
362
  msgstr ""
363
 
364
+ #: ../includes/settings.php:553
365
  msgid "Log in & Configure"
366
  msgstr ""
367
 
368
+ #: ../includes/settings.php:554
369
  msgid "Log into the Cookie Compliance&trade; web application and configure your Privacy Experience."
370
  msgstr ""
371
 
372
+ #: ../includes/settings.php:563 ../includes/settings.php:564
373
+ #: ../includes/settings.php:565
374
  msgid "Pending"
375
  msgstr ""
376
 
377
+ #: ../includes/settings.php:568
378
+ msgid "Log in & configure"
379
  msgstr ""
380
 
381
+ #: ../includes/settings.php:569
382
  msgid "Log into the Cookie Compliance&trade; web application and complete the setup process."
383
  msgstr ""
384
 
385
+ #: ../includes/settings.php:578 ../includes/settings.php:579
386
+ #: ../includes/settings.php:580
387
  msgid "Inactive"
388
  msgstr ""
389
 
390
+ #: ../includes/settings.php:583
391
+ msgid "Add Compliance features"
392
  msgstr ""
393
 
394
+ #: ../includes/settings.php:584
395
+ msgid "Sign up to Cookie Compliance&trade; and add GDPR, CCPA and other international data privacy laws compliance features."
396
  msgstr ""
397
 
398
+ #: ../includes/settings.php:599
399
  msgid "Enter your Cookie Compliance&trade; application ID."
400
  msgstr ""
401
 
402
+ #: ../includes/settings.php:611
403
  msgid "Enter your Cookie Compliance&trade; application secret key."
404
  msgstr ""
405
 
406
+ #: ../includes/settings.php:621
407
  msgid "Enable to automatically block 3rd party scripts before user consent."
408
  msgstr ""
409
 
410
+ #: ../includes/settings.php:622
411
  msgid "In case you're experiencing issues with your site disable that feature temporarily."
412
  msgstr ""
413
 
414
+ #: ../includes/settings.php:633
415
  msgid "Purge Cache"
416
  msgstr ""
417
 
418
+ #: ../includes/settings.php:635
419
  msgid "Click the Purge Cache button to refresh the app configuration."
420
  msgstr ""
421
 
422
+ #: ../includes/settings.php:646
423
  msgid "Enter the cookie notice message."
424
  msgstr ""
425
 
426
+ #: ../includes/settings.php:657
427
  msgid "The text of the option to accept the notice and make it disappear."
428
  msgstr ""
429
 
430
+ #: ../includes/settings.php:667
431
  msgid "Enable to give to the user the possibility to refuse third party non functional cookies."
432
  msgstr ""
433
 
434
+ #: ../includes/settings.php:671
435
  msgid "The text of the button to refuse the consent."
436
  msgstr ""
437
 
438
+ #: ../includes/settings.php:689
439
  msgid "Head"
440
  msgstr ""
441
 
442
+ #: ../includes/settings.php:690
443
  msgid "Body"
444
  msgstr ""
445
 
446
+ #: ../includes/settings.php:693
447
  msgid "The code to be used in your site header, before the closing head tag."
448
  msgstr ""
449
 
450
+ #: ../includes/settings.php:697
451
  msgid "The code to be used in your site footer, before the closing body tag."
452
  msgstr ""
453
 
454
+ #: ../includes/settings.php:701
455
  msgid "Enter non functional cookies Javascript code here (for e.g. Google Analitycs) to be used after the notice is accepted."
456
  msgstr ""
457
 
458
+ #: ../includes/settings.php:701
459
  msgid "To get the user consent status use the <code>cn_cookies_accepted()</code> function."
460
  msgstr ""
461
 
462
+ #: ../includes/settings.php:712
463
  msgid "Enable to give to the user the possibility to revoke their consent <i>(requires \"Refuse consent\" option enabled)</i>."
464
  msgstr ""
465
 
466
+ #: ../includes/settings.php:715
467
  msgid "Enter the revoke message."
468
  msgstr ""
469
 
470
+ #: ../includes/settings.php:717
471
  msgid "The text of the button to revoke the consent."
472
  msgstr ""
473
 
474
+ #: ../includes/settings.php:725
475
  msgid "Select the method for displaying the revoke button - automatic (in the banner) or manual using <code>[cookies_revoke]</code> shortcode."
476
  msgstr ""
477
 
478
+ #: ../includes/settings.php:736
479
  msgid "Enable to reload the page after the notice is accepted."
480
  msgstr ""
481
 
482
+ #: ../includes/settings.php:759
483
  msgid "Enable privacy policy link."
484
  msgstr ""
485
 
486
+ #: ../includes/settings.php:762
487
  msgid "The text of the privacy policy button."
488
  msgstr ""
489
 
490
+ #: ../includes/settings.php:774
491
  msgid "Select where to redirect user for more information."
492
  msgstr ""
493
 
494
+ #: ../includes/settings.php:777
495
  msgid "-- select page --"
496
  msgstr ""
497
 
498
+ #: ../includes/settings.php:788
499
  msgid "Select from one of your site's pages."
500
  msgstr ""
501
 
502
+ #: ../includes/settings.php:794
503
  msgid "Synchronize with WordPress Privacy Policy page."
504
  msgstr ""
505
 
506
+ #: ../includes/settings.php:801
507
  msgid "Enter the full URL starting with http(s)://"
508
  msgstr ""
509
 
510
+ #: ../includes/settings.php:844
511
  msgid "The amount of time that the cookie should be stored for when user accepts the notice."
512
  msgstr ""
513
 
514
+ #: ../includes/settings.php:867
515
  msgid "The amount of time that the cookie should be stored for when the user doesn't accept the notice."
516
  msgstr ""
517
 
518
+ #: ../includes/settings.php:885
519
  msgid "Select where all the plugin scripts should be placed."
520
  msgstr ""
521
 
522
+ #: ../includes/settings.php:905
523
  msgid "Select location for the notice."
524
  msgstr ""
525
 
526
+ #: ../includes/settings.php:926
527
  msgid "Select the animation style."
528
  msgstr ""
529
 
530
+ #: ../includes/settings.php:937
531
  msgid "Enable to accept the notice when user scrolls."
532
  msgstr ""
533
 
534
+ #: ../includes/settings.php:940
535
  msgid "Number of pixels user has to scroll to accept the notice and make it disappear."
536
  msgstr ""
537
 
538
+ #: ../includes/settings.php:951
539
  msgid "Enable to accept the notice on any click on the page."
540
  msgstr ""
541
 
542
+ #: ../includes/settings.php:961
543
  msgid "Enable if you want all plugin data to be deleted on deactivation."
544
  msgstr ""
545
 
546
+ #: ../includes/settings.php:981
547
  msgid "Select the buttons style."
548
  msgstr ""
549
 
550
+ #: ../includes/settings.php:994
551
  msgid "Enter additional button CSS classes separated by spaces."
552
  msgstr ""
553
 
554
+ #: ../includes/settings.php:1018
555
  msgid "Bar opacity"
556
  msgstr ""
557
 
558
+ #: ../includes/settings.php:1159
559
  msgid "Settings saved."
560
  msgstr ""
561
 
562
+ #: ../includes/settings.php:1166
563
  msgid "Settings restored to defaults."
564
  msgstr ""
565
 
566
+ #: ../includes/settings.php:1193
567
  msgid "Are you sure you want to reset these settings to defaults?"
568
  msgstr ""
569
 
574
  msgid "You do not have permission to access this page."
575
  msgstr ""
576
 
577
+ #: ../includes/welcome-api.php:71 ../includes/welcome-api.php:208
578
+ #: ../includes/welcome-api.php:247 ../includes/welcome-api.php:369
579
+ #: ../includes/welcome-api.php:443 ../includes/welcome-api.php:758
580
+ #: ../includes/welcome.php:49
581
  msgid "Unexpected error occurred. Please try again later."
582
  msgstr ""
583
 
584
+ #: ../includes/welcome-api.php:87
585
  msgid "Empty plan or payment method data."
586
  msgstr ""
587
 
588
+ #: ../includes/welcome-api.php:118
589
  msgid "Unable to create customer data."
590
  msgstr ""
591
 
592
+ #: ../includes/welcome-api.php:150
593
  msgid "Please accept the Terms of Service to proceed."
594
  msgstr ""
595
 
596
+ #: ../includes/welcome-api.php:155 ../includes/welcome-api.php:340
597
  msgid "Email is not allowed to be empty."
598
  msgstr ""
599
 
600
+ #: ../includes/welcome-api.php:160 ../includes/welcome-api.php:345
601
  msgid "Password is not allowed to be empty."
602
  msgstr ""
603
 
604
+ #: ../includes/welcome-api.php:165
605
  msgid "Passwords do not match."
606
  msgstr ""
607
 
608
+ #: ../includes/welcome.php:50
609
+ msgid "Passed"
610
+ msgstr ""
611
+
612
+ #: ../includes/welcome.php:51
613
+ msgid "Failed"
614
  msgstr ""
615
 
616
+ #: ../includes/welcome.php:53
617
+ msgid "<em>Compliance Failed!</em>Your website does not achieve minimum viable compliance. <b><a href=\"#\" class=\"cn-sign-up\">Sign up to Cookie Compliance</a></b> to bring your site into compliance with the latest data privacy rules and regulations."
618
  msgstr ""
619
 
620
+ #: ../includes/welcome.php:54
621
+ msgid "<em>Compliance Passed!</em>Congratulations. Your website meets minimum viable compliance."
622
+ msgstr ""
623
+
624
+ #: ../includes/welcome.php:55
625
  msgid "Please fill all the required fields."
626
  msgstr ""
627
 
628
+ #: ../includes/welcome.php:173
629
+ msgid "Cookie Compliance is a free web application that enables websites to take a proactive approach to data protection and consent laws."
630
+ msgstr ""
631
+
632
  #: ../includes/welcome.php:179
633
+ msgid "It is the first solution to offer <b>intentional consent</b>, a new consent framework that incorporates the latest guidelines from over 100+ countries, and emerging standards from leading international organizations like the IEEE."
 
634
  msgstr ""
635
 
636
+ #: ../includes/welcome.php:180
637
+ msgid "Cookie Notice includes <b>seamless integration</b> with Cookie Compliance to help your site comply with the latest updates to existing consent laws and provide a beautiful, multi-level experience to engage visitors in data privacy decisions."
638
  msgstr ""
639
 
640
+ #: ../includes/welcome.php:191
641
+ msgid "Sign up to Cookie Compliance"
642
  msgstr ""
643
 
644
+ #: ../includes/welcome.php:192
645
+ msgid "Skip for now"
646
  msgstr ""
647
 
648
+ #: ../includes/welcome.php:262
649
+ msgid "Take a proactive approach to data protection and consent laws by signing up for Cookie Compliance account. Then select a limited Basic Plan for free or get one of the Professional Plans for unlimited visits, consent storage, languages and customizations."
650
  msgstr ""
651
 
652
+ #: ../includes/welcome.php:306
653
+ msgid "Compliance Plans"
654
  msgstr ""
655
 
656
+ #: ../includes/welcome.php:312 ../includes/welcome.php:603
657
+ #: ../includes/welcome.php:705
658
+ msgid "Basic"
659
  msgstr ""
660
 
661
+ #: ../includes/welcome.php:313
662
+ msgid "Free"
663
  msgstr ""
664
 
665
+ #: ../includes/welcome.php:316 ../includes/welcome.php:336
666
+ #: ../includes/welcome.php:357
667
+ msgid "GDPR, CCPA, ePrivacy, PECR compliance"
668
  msgstr ""
669
 
670
+ #: ../includes/welcome.php:317 ../includes/welcome.php:337
671
+ #: ../includes/welcome.php:358
672
+ msgid "Consent Analytics Dashboard"
673
  msgstr ""
674
 
675
+ #: ../includes/welcome.php:318
676
+ msgid "<b>10,000</b> visits"
677
  msgstr ""
678
 
679
+ #: ../includes/welcome.php:319
680
+ msgid "<b>30 days</b> consent storage"
681
  msgstr ""
682
 
683
+ #: ../includes/welcome.php:320
684
+ msgid "<b>1 additional</b> language"
685
  msgstr ""
686
 
687
+ #: ../includes/welcome.php:321
688
+ msgid "<b>Basic</b> Support"
689
  msgstr ""
690
 
691
+ #: ../includes/welcome.php:324 ../includes/welcome.php:344
692
+ #: ../includes/welcome.php:365 ../includes/welcome.php:597
693
+ #: ../includes/welcome.php:699
694
+ msgid "Select Plan"
695
  msgstr ""
696
 
697
+ #: ../includes/welcome.php:332
698
+ msgid "Professional Monthly"
699
  msgstr ""
700
 
701
+ #: ../includes/welcome.php:333
702
+ msgid "month"
703
  msgstr ""
704
 
705
+ #: ../includes/welcome.php:338 ../includes/welcome.php:359
706
+ msgid "<b>Unlimited</b> visits"
707
  msgstr ""
708
 
709
+ #: ../includes/welcome.php:339 ../includes/welcome.php:360
710
+ msgid "<b>Lifetime</b> consent storage"
711
  msgstr ""
712
 
713
+ #: ../includes/welcome.php:340 ../includes/welcome.php:361
714
+ msgid "<b>Unlimited</b> languages"
715
  msgstr ""
716
 
717
+ #: ../includes/welcome.php:341
718
+ msgid "<b>Regular</b> Support"
719
  msgstr ""
720
 
721
+ #: ../includes/welcome.php:352
722
+ msgid "Professional Yearly"
723
+ msgstr ""
724
+
725
+ #: ../includes/welcome.php:353
726
+ msgid "year"
727
+ msgstr ""
728
+
729
+ #: ../includes/welcome.php:354
730
+ msgid "Best Value"
731
+ msgstr ""
732
+
733
+ #: ../includes/welcome.php:362
734
+ msgid "<b>Premium</b> Support"
735
+ msgstr ""
736
+
737
+ #: ../includes/welcome.php:371
738
+ msgid "I don’t want to create an account now"
739
+ msgstr ""
740
+
741
+ #: ../includes/welcome.php:387
742
+ msgid "Congratulations"
743
  msgstr ""
744
 
745
+ #: ../includes/welcome.php:388
746
+ msgid "You are now promoting privacy with Hu-manity.co"
747
  msgstr ""
748
 
749
+ #: ../includes/welcome.php:390
750
+ msgid "Log in to your Cookie Compliance&trade; account and continue configuring your Privacy Experience."
751
  msgstr ""
752
 
753
+ #: ../includes/welcome.php:393
754
+ msgid "Go to Application"
755
+ msgstr ""
756
+
757
+ #: ../includes/welcome.php:419
758
+ msgid "Compliance check"
759
+ msgstr ""
760
+
761
+ #: ../includes/welcome.php:420
762
+ msgid "This is a Compliance Check to determine your site’s compliance with updated data processing and consent rules under GDPR, CCPA and other international data privacy laws."
763
  msgstr ""
764
 
765
+ #: ../includes/welcome.php:422
766
  msgid "Site URL"
767
  msgstr ""
768
 
769
+ #: ../includes/welcome.php:423
770
  msgid "Site Name"
771
  msgstr ""
772
 
773
+ #: ../includes/welcome.php:426
774
+ msgid "Checking..."
775
  msgstr ""
776
 
777
+ #: ../includes/welcome.php:429
778
+ msgid "Notifies visitors that site uses cookies."
779
  msgstr ""
780
 
781
+ #: ../includes/welcome.php:430
782
+ msgid "Non-essential cookies blocked until consent is registered."
783
  msgstr ""
784
 
785
+ #: ../includes/welcome.php:431
786
+ msgid "Separate consent requested per purpose of use."
787
+ msgstr ""
788
+
789
+ #: ../includes/welcome.php:432
790
+ msgid "Proof-of-consent stored in secure audit format."
791
+ msgstr ""
792
+
793
+ #: ../includes/welcome.php:448
794
+ msgid "Live Setup"
795
+ msgstr ""
796
+
797
+ #: ../includes/welcome.php:449
798
+ msgid "Configure your Cookie Notice & Compliance design and compliance features through the options below. Click Apply Setup to save the configuration and go to selecting your preferred cookie solution."
799
+ msgstr ""
800
+
801
+ #: ../includes/welcome.php:453
802
  msgid "Banner Compliance"
803
  msgstr ""
804
 
805
+ #: ../includes/welcome.php:474
806
  msgid "Select the laws that apply to your business"
807
  msgstr ""
808
 
809
+ #: ../includes/welcome.php:476
810
  msgid "GDPR"
811
  msgstr ""
812
 
813
+ #: ../includes/welcome.php:477
814
  msgid "CCPA"
815
  msgstr ""
816
 
817
+ #: ../includes/welcome.php:481
818
+ msgid "Select the type of of services your website is using"
819
  msgstr ""
820
 
821
+ #: ../includes/welcome.php:483
822
  msgid "I use personalization services on my site​"
823
  msgstr ""
824
 
825
+ #: ../includes/welcome.php:484
826
  msgid "I collect and analyse information about my website’s traffic"
827
  msgstr ""
828
 
829
+ #: ../includes/welcome.php:485
830
  msgid "I run targeted ads on my site using, for example, Google Adsense​"
831
  msgstr ""
832
 
833
+ #: ../includes/welcome.php:489
834
+ msgid "Enable Cookie Categories (complies with GDPR Art.32)"
835
+ msgstr ""
836
+
837
+ #: ../includes/welcome.php:491
838
+ msgid "Give your visitors the ability to customize their consent based on cookie purpose categories."
839
+ msgstr ""
840
+
841
+ #: ../includes/welcome.php:495
842
+ msgid "Enable Autoblocking (complies with GDPR Art.7)"
843
+ msgstr ""
844
+
845
+ #: ../includes/welcome.php:497
846
+ msgid "Automatically block 3rd party scripts before user consent."
847
+ msgstr ""
848
+
849
+ #: ../includes/welcome.php:500 ../includes/welcome.php:528
850
+ msgid "available in Cookie Compliance&trade; only"
851
+ msgstr ""
852
+
853
+ #: ../includes/welcome.php:504
854
  msgid "Banner Design"
855
  msgstr ""
856
 
857
+ #: ../includes/welcome.php:508
858
  msgid "Select your preferred display position"
859
  msgstr ""
860
 
861
+ #: ../includes/welcome.php:512
862
  msgid "Left"
863
  msgstr ""
864
 
865
+ #: ../includes/welcome.php:513
866
  msgid "Right"
867
  msgstr ""
868
 
869
+ #: ../includes/welcome.php:514
870
  msgid "Center"
871
  msgstr ""
872
 
873
+ #: ../includes/welcome.php:518
874
  msgid "Adjust the banner color scheme"
875
  msgstr ""
876
 
877
+ #: ../includes/welcome.php:520
878
  msgid "Color of the buttons and interactive elements."
879
  msgstr ""
880
 
881
+ #: ../includes/welcome.php:521
882
  msgid "Color of the banner background."
883
  msgstr ""
884
 
885
+ #: ../includes/welcome.php:522
886
  msgid "Color of the borders and inactive elements."
887
  msgstr ""
888
 
889
+ #: ../includes/welcome.php:523
890
  msgid "Color of the body text."
891
  msgstr ""
892
 
893
+ #: ../includes/welcome.php:524
894
  msgid "Color of the heading text."
895
  msgstr ""
896
 
897
+ #: ../includes/welcome.php:525
898
  msgid "Color of the button text."
899
  msgstr ""
900
 
901
+ #: ../includes/welcome.php:533
902
+ msgid "Apply Setup"
903
+ msgstr ""
904
+
905
+ #: ../includes/welcome.php:551
906
+ msgid "Compliance account"
907
  msgstr ""
908
 
909
+ #: ../includes/welcome.php:553
910
+ msgid "Create a Cookie Compliance&trade; account and select your preferred plan."
911
  msgstr ""
912
 
913
+ #: ../includes/welcome.php:557
914
  msgid "Create Account"
915
  msgstr ""
916
 
917
+ #: ../includes/welcome.php:562 ../includes/welcome.php:672
918
  msgid "Email address"
919
  msgstr ""
920
 
921
+ #: ../includes/welcome.php:565 ../includes/welcome.php:675
922
  msgid "Password"
923
  msgstr ""
924
 
925
+ #: ../includes/welcome.php:568
926
  msgid "Confirm Password"
927
  msgstr ""
928
 
929
+ #: ../includes/welcome.php:572
930
  #, php-format
931
  msgid "I have read and agree to the <a href=\"%s\" target=\"_blank\">Terms of Service"
932
  msgstr ""
933
 
934
+ #: ../includes/welcome.php:576
935
  msgid "Sign Up"
936
  msgstr ""
937
 
938
+ #: ../includes/welcome.php:590
939
  msgid "Already have an account?"
940
  msgstr ""
941
 
942
+ #: ../includes/welcome.php:590 ../includes/welcome.php:678
943
  msgid "Sign in"
944
  msgstr ""
945
 
946
+ #: ../includes/welcome.php:604 ../includes/welcome.php:706
947
+ msgid "<b>Professional</b> Monthly"
948
  msgstr ""
949
 
950
+ #: ../includes/welcome.php:604 ../includes/welcome.php:706
 
 
 
 
951
  msgid "/mo"
952
  msgstr ""
953
 
954
+ #: ../includes/welcome.php:605 ../includes/welcome.php:707
955
+ msgid "<b>Professional</b> Yearly"
956
  msgstr ""
957
 
958
+ #: ../includes/welcome.php:605 ../includes/welcome.php:707
959
  msgid "/yr"
960
  msgstr ""
961
 
962
+ #: ../includes/welcome.php:609 ../includes/welcome.php:711
963
+ msgid "Confirm"
 
964
  msgstr ""
965
 
966
+ #: ../includes/welcome.php:613 ../includes/welcome.php:715
967
+ msgid "Payment Method"
968
  msgstr ""
969
 
970
+ #: ../includes/welcome.php:615 ../includes/welcome.php:717
971
  msgid "Credit Card"
972
  msgstr ""
973
 
974
+ #: ../includes/welcome.php:616 ../includes/welcome.php:718
975
  msgid "PayPal"
976
  msgstr ""
977
 
978
+ #: ../includes/welcome.php:622 ../includes/welcome.php:724
979
  msgid "Card Number"
980
  msgstr ""
981
 
982
+ #: ../includes/welcome.php:626 ../includes/welcome.php:728
983
  msgid "Expiration Date"
984
  msgstr ""
985
 
986
+ #: ../includes/welcome.php:630 ../includes/welcome.php:732
987
  msgid "CVC/CVV"
988
  msgstr ""
989
 
990
+ #: ../includes/welcome.php:634 ../includes/welcome.php:736
991
+ msgid "Submit"
992
  msgstr ""
993
 
994
+ #: ../includes/welcome.php:661
995
  msgid "Compliance Sign in"
996
  msgstr ""
997
 
998
+ #: ../includes/welcome.php:663
999
+ msgid "Sign in to your existing Cookie Compliance&trade; account and select your preferred plan."
1000
  msgstr ""
1001
 
1002
+ #: ../includes/welcome.php:667
1003
  msgid "Account Login"
1004
  msgstr ""
1005
 
1006
+ #: ../includes/welcome.php:692
1007
  msgid "Don't have an account yet?"
1008
  msgstr ""
1009
 
1010
+ #: ../includes/welcome.php:692
1011
  msgid "Sign up"
1012
  msgstr ""
1013
 
1014
+ #: ../includes/welcome.php:761
 
 
 
 
1015
  msgid "Success!"
1016
  msgstr ""
1017
 
1018
+ #: ../includes/welcome.php:762
1019
  msgid "You have successfully upgraded your website to Cookie Compliance&trade;"
1020
  msgstr ""
1021
 
1022
+ #: ../includes/welcome.php:762
1023
  #, php-format
1024
  msgid "Go to Cookie Compliance&trade; application now. Or access it anytime from your <a href=\"%s\">Cookie Notice settings page</a>."
1025
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: humanityco
3
  Tags: gdpr, ccpa, cookies, consent, compliance
4
  Requires at least: 4.3
5
  Requires PHP: 5.3
6
- Tested up to: 5.7.1
7
- Stable tag: 2.0.4
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
@@ -58,6 +58,9 @@ No questions yet.
58
 
59
  == Changelog ==
60
 
 
 
 
61
  = 2.0.4 =
62
  * Fix: Undefined constant HOURS_IN_SECONDS
63
  * Fix: Button style none adding CSS classes "cn-set-cookie cn-button"
@@ -315,8 +318,5 @@ Initial release
315
 
316
  == Upgrade Notice ==
317
 
318
- = 2.0.4 =
319
- * Fix: Undefined constant HOURS_IN_SECONDS
320
- * Fix: Button style none adding CSS classes "cn-set-cookie cn-button"
321
- * Tweak: Switched the behavior of close icon from accept to reject
322
- * Tweak: Minified frontend and admin js files
3
  Tags: gdpr, ccpa, cookies, consent, compliance
4
  Requires at least: 4.3
5
  Requires PHP: 5.3
6
+ Tested up to: 5.7.2
7
+ Stable tag: 2.1.0
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
58
 
59
  == Changelog ==
60
 
61
+ = 2.1.0 =
62
+ * New: Introducing Cookie Compliance Free plan
63
+
64
  = 2.0.4 =
65
  * Fix: Undefined constant HOURS_IN_SECONDS
66
  * Fix: Button style none adding CSS classes "cn-set-cookie cn-button"
318
 
319
  == Upgrade Notice ==
320
 
321
+ = 2.1.0 =
322
+ * New: Introducing Cookie Compliance Free plan