Version Description
- 19 April 2017 =
- Fixed RTL layouts for new flexbox layout.
- Renamed front.css to ensure cache busting.
- Allow cache with auto legacy layout.
- Use HTTPS for layout directory screenshots.
- Fixed namespaced widget escaping.
Download this release
Release Info
Developer | gpriday |
Plugin | Page Builder by SiteOrigin |
Version | 2.5.2 |
Comparing to | |
See all releases |
Code changes from version 2.5.1 to 2.5.2
- css/admin.less +0 -1927
- css/front-flex.css +53 -0
- css/front.less +0 -26
- css/icons/siteorigin-panels.eot +0 -0
- css/icons/siteorigin-panels.svg +0 -19
- css/icons/siteorigin-panels.ttf +0 -0
- css/icons/siteorigin-panels.woff +0 -0
- inc/admin-actions.php +0 -267
- inc/admin-layouts.php +13 -2
- inc/admin.php +18 -50
- inc/css.php +0 -186
- inc/debug.php +0 -19
- inc/default-styles.php +0 -507
- inc/learn.php +0 -39
- inc/plugin-activation.php +0 -131
- inc/renderer.php +8 -8
- inc/settings.php +1 -17
- inc/widget-shortcode.php +4 -3
- inc/widgets-bundle.php +0 -76
- inc/widgets.php +0 -216
- js/siteorigin-panels-25.js +1 -1
- js/siteorigin-panels-25.min.js +1 -1
- lang/siteorigin-panels.pot +159 -167
- readme.txt +10 -3
- siteorigin-panels.php +20 -5
- tpl/live-editor-preview.php +1 -1
- tpl/options.php +0 -97
- widgets/basic.php +1 -2
- widgets/widgets.php +3 -3
css/admin.less
DELETED
@@ -1,1927 +0,0 @@
|
|
1 |
-
@import "mixins";
|
2 |
-
|
3 |
-
@font-face {
|
4 |
-
font-family: 'siteorigin-panels';
|
5 |
-
src:url('icons/siteorigin-panels.eot?-yv2c11');
|
6 |
-
src:url('icons/siteorigin-panels.eot?#iefix-yv2c11') format('embedded-opentype'),
|
7 |
-
url('icons/siteorigin-panels.woff?-yv2c11') format('woff'),
|
8 |
-
url('icons/siteorigin-panels.ttf?-yv2c11') format('truetype'),
|
9 |
-
url('icons/siteorigin-panels.svg?-yv2c11#siteorigin-panels') format('svg');
|
10 |
-
font-weight: normal;
|
11 |
-
font-style: normal;
|
12 |
-
}
|
13 |
-
|
14 |
-
#panels{
|
15 |
-
}
|
16 |
-
|
17 |
-
/* This is for the metabox */
|
18 |
-
|
19 |
-
#so-panels-panels {
|
20 |
-
&.attached-to-editor{
|
21 |
-
|
22 |
-
margin-top: 20px;
|
23 |
-
|
24 |
-
h3.hndle {
|
25 |
-
display: none;
|
26 |
-
}
|
27 |
-
|
28 |
-
.inside {
|
29 |
-
margin: 0 !important;
|
30 |
-
padding: 0 !important;
|
31 |
-
}
|
32 |
-
|
33 |
-
.so-toolbar .so-switch-to-standard{
|
34 |
-
display: block;
|
35 |
-
}
|
36 |
-
}
|
37 |
-
}
|
38 |
-
|
39 |
-
/* Everything for the main builder interface */
|
40 |
-
|
41 |
-
.siteorigin-panels-builder {
|
42 |
-
|
43 |
-
position: relative;
|
44 |
-
|
45 |
-
.so-builder-container {
|
46 |
-
/* Top padding for the toolbar */
|
47 |
-
padding-top: 38px;
|
48 |
-
position: relative;
|
49 |
-
}
|
50 |
-
|
51 |
-
/* These are generic iconic buttons used in the page builder interface */
|
52 |
-
.so-tool-button {
|
53 |
-
padding: 6px 7px;
|
54 |
-
font-size: 11px;
|
55 |
-
text-decoration: none;
|
56 |
-
line-height: 0.9em;
|
57 |
-
|
58 |
-
float: left;
|
59 |
-
margin-right: 2px;
|
60 |
-
display: block;
|
61 |
-
visibility: visible;
|
62 |
-
position: relative;
|
63 |
-
|
64 |
-
border: 1px solid #C0C0C0;
|
65 |
-
.gradient(#F0F0F0, #F0F0F0, #F9F9F9);
|
66 |
-
.box-shadow(~"0 1px 1px rgba(0,0,0,0.04)");
|
67 |
-
outline: none;
|
68 |
-
.rounded(2px);
|
69 |
-
|
70 |
-
span {
|
71 |
-
display: inline-block;
|
72 |
-
color: #666666;
|
73 |
-
text-shadow: 0 1px 0 #FFFFFF;
|
74 |
-
min-width: 10px;
|
75 |
-
text-align: center;
|
76 |
-
}
|
77 |
-
|
78 |
-
&:hover {
|
79 |
-
background: #FFFFFF;
|
80 |
-
|
81 |
-
span {
|
82 |
-
color: #444444;
|
83 |
-
}
|
84 |
-
}
|
85 |
-
}
|
86 |
-
|
87 |
-
.so-builder-toolbar {
|
88 |
-
.box-sizing(border-box);
|
89 |
-
border-bottom: 1px solid #D0D0D0;
|
90 |
-
background: #F5F5F5;
|
91 |
-
line-height: 1em;
|
92 |
-
position: absolute;
|
93 |
-
z-index: 101;
|
94 |
-
white-space: nowrap;
|
95 |
-
overflow-x: hidden;
|
96 |
-
|
97 |
-
box-shadow: 0 1px 1px rgba(0,0,0,0.04);
|
98 |
-
|
99 |
-
top: 0;
|
100 |
-
left: 0;
|
101 |
-
width: 100%;
|
102 |
-
|
103 |
-
padding: 6px 9px;
|
104 |
-
margin-top: 0 !important;
|
105 |
-
.clearfix();
|
106 |
-
|
107 |
-
/* The toolbar buttons */
|
108 |
-
> .so-tool-button {
|
109 |
-
display: inline-block;
|
110 |
-
color: #666666;
|
111 |
-
padding-right: 8px;
|
112 |
-
|
113 |
-
.so-panels-icon {
|
114 |
-
float: left;
|
115 |
-
margin: 0 5px 0 0;
|
116 |
-
}
|
117 |
-
|
118 |
-
&:hover {
|
119 |
-
color: #444444;
|
120 |
-
}
|
121 |
-
}
|
122 |
-
|
123 |
-
.so-switch-to-standard {
|
124 |
-
position: absolute;
|
125 |
-
top: 5px;
|
126 |
-
right: 10px;
|
127 |
-
|
128 |
-
display: none;
|
129 |
-
text-decoration: none;
|
130 |
-
color: #666666;
|
131 |
-
padding: 5px 6px;
|
132 |
-
.rounded(2px);
|
133 |
-
border: 1px solid transparent;
|
134 |
-
margin-top: 2px;
|
135 |
-
font-size: 11px;
|
136 |
-
|
137 |
-
&:hover {
|
138 |
-
background: #fafafa;
|
139 |
-
border: 1px solid #999999;
|
140 |
-
color: #444444;
|
141 |
-
}
|
142 |
-
}
|
143 |
-
}
|
144 |
-
|
145 |
-
@media screen and (max-width: 600px) {
|
146 |
-
.so-builder-toolbar {
|
147 |
-
|
148 |
-
padding: 10px;
|
149 |
-
|
150 |
-
> .so-tool-button {
|
151 |
-
padding-right: 2px;
|
152 |
-
|
153 |
-
.so-panels-icon {
|
154 |
-
font-size: 20px;
|
155 |
-
}
|
156 |
-
|
157 |
-
span.so-button-text {
|
158 |
-
display: none;
|
159 |
-
}
|
160 |
-
}
|
161 |
-
|
162 |
-
}
|
163 |
-
|
164 |
-
}
|
165 |
-
|
166 |
-
.so-rows-container{
|
167 |
-
padding: 20px 15px 0 15px;
|
168 |
-
|
169 |
-
.so-row-toolbar {
|
170 |
-
.clearfix();
|
171 |
-
|
172 |
-
.so-tool-button {
|
173 |
-
.box-sizing(border-box);
|
174 |
-
height: 22px;
|
175 |
-
padding: 5px;
|
176 |
-
font-size: 10px;
|
177 |
-
float: right;
|
178 |
-
|
179 |
-
&.so-row-move {
|
180 |
-
cursor: move;
|
181 |
-
}
|
182 |
-
}
|
183 |
-
|
184 |
-
margin-bottom: 4px;
|
185 |
-
|
186 |
-
.so-dropdown-wrapper {
|
187 |
-
position: relative;
|
188 |
-
float: right;
|
189 |
-
|
190 |
-
.so-dropdown-links-wrapper {
|
191 |
-
display: none;
|
192 |
-
z-index: 11;
|
193 |
-
position:absolute;
|
194 |
-
right: -10px;
|
195 |
-
padding: 6px 0 0 0;
|
196 |
-
top: 22px;
|
197 |
-
width: 125px;
|
198 |
-
|
199 |
-
ul {
|
200 |
-
margin: 0;
|
201 |
-
border: 1px solid #C0C0C0;
|
202 |
-
background: #F9F9F9;
|
203 |
-
.rounded(2px);
|
204 |
-
padding: 4px 0;
|
205 |
-
.box-shadow(~"0 2px 2px rgba(0,0,0,0.1)");
|
206 |
-
|
207 |
-
li {
|
208 |
-
margin: 0;
|
209 |
-
|
210 |
-
&:first-child {
|
211 |
-
border-top-width: 1px;
|
212 |
-
}
|
213 |
-
|
214 |
-
a {
|
215 |
-
display: block;
|
216 |
-
padding: 2px 8px;
|
217 |
-
text-decoration: none;
|
218 |
-
color: #666;
|
219 |
-
font-size: 11px;
|
220 |
-
font-weight: bold;
|
221 |
-
|
222 |
-
outline: 0 !important;
|
223 |
-
.box-shadow(none);
|
224 |
-
|
225 |
-
&:hover {
|
226 |
-
background: #F0F0F0;
|
227 |
-
color: #444;
|
228 |
-
}
|
229 |
-
|
230 |
-
.dashicons {
|
231 |
-
font-size: 16px;
|
232 |
-
margin: 0;
|
233 |
-
float: right;
|
234 |
-
line-height: 16px;
|
235 |
-
}
|
236 |
-
|
237 |
-
/* Specific drop down hovers */
|
238 |
-
|
239 |
-
&.so-row-delete {
|
240 |
-
color: #a00;
|
241 |
-
|
242 |
-
&:hover {
|
243 |
-
color: #FFF;
|
244 |
-
background: #a00;
|
245 |
-
}
|
246 |
-
}
|
247 |
-
}
|
248 |
-
}
|
249 |
-
|
250 |
-
.so-pointer {
|
251 |
-
width: 12px;
|
252 |
-
height: 6px;
|
253 |
-
position: absolute;
|
254 |
-
z-index: 12;
|
255 |
-
background: url("./images/dropdown-pointer.png");
|
256 |
-
background-size: 12px 6px;
|
257 |
-
top: 1px;
|
258 |
-
right: 18px;
|
259 |
-
}
|
260 |
-
}
|
261 |
-
|
262 |
-
}
|
263 |
-
|
264 |
-
&:hover {
|
265 |
-
.so-dropdown-links-wrapper {
|
266 |
-
display: block;
|
267 |
-
}
|
268 |
-
}
|
269 |
-
|
270 |
-
}
|
271 |
-
|
272 |
-
}
|
273 |
-
|
274 |
-
.ui-sortable-placeholder {
|
275 |
-
visibility: visible !important;
|
276 |
-
background: #F7F7F7;
|
277 |
-
.box-sizing(border-box);
|
278 |
-
}
|
279 |
-
|
280 |
-
.so-row-container {
|
281 |
-
margin-bottom: 20px;
|
282 |
-
.user-select(none);
|
283 |
-
|
284 |
-
.so-cells {
|
285 |
-
.clearfix();
|
286 |
-
margin: 0 -5px;
|
287 |
-
position: relative;
|
288 |
-
|
289 |
-
.ui-resizable-handle.ui-resizable-w{
|
290 |
-
width: 10px;
|
291 |
-
left: -11px;
|
292 |
-
cursor: col-resize;
|
293 |
-
background: rgba(0,150,211, 0);
|
294 |
-
background: rgba(0,150,211, 0.25);
|
295 |
-
|
296 |
-
-webkit-transition: background 0.25s ease-in-out;
|
297 |
-
-moz-transition: background 0.25s ease-in-out;
|
298 |
-
-o-transition: background 0.25s ease-in-out;
|
299 |
-
transition: background 0.25s ease-in-out;
|
300 |
-
|
301 |
-
&:hover{
|
302 |
-
background: rgba(0,150,211, 0.1);
|
303 |
-
}
|
304 |
-
}
|
305 |
-
|
306 |
-
.cell {
|
307 |
-
|
308 |
-
.box-sizing(border-box);
|
309 |
-
float: left;
|
310 |
-
position: relative;
|
311 |
-
padding: 0 5px;
|
312 |
-
|
313 |
-
&.so-first{
|
314 |
-
margin-left: 0;
|
315 |
-
}
|
316 |
-
|
317 |
-
&.so-last{
|
318 |
-
margin-right: 0;
|
319 |
-
}
|
320 |
-
|
321 |
-
.cell-wrapper{
|
322 |
-
background: #e4eff4;
|
323 |
-
border: 1px solid #bcccd2;
|
324 |
-
padding: 10px 10px 4px 10px; /* 6px bottom to remove bottom margin from panels */
|
325 |
-
height: 100%;
|
326 |
-
min-height: 70px;
|
327 |
-
}
|
328 |
-
|
329 |
-
&.cell-selected .cell-wrapper{
|
330 |
-
background: #cae7f4 url("images/cell-selected.png") repeat;
|
331 |
-
border-color: #9abcc7;
|
332 |
-
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
|
333 |
-
}
|
334 |
-
|
335 |
-
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
336 |
-
&.cell-selected .cell-wrapper{
|
337 |
-
background-size: 3px 3px;
|
338 |
-
}
|
339 |
-
}
|
340 |
-
|
341 |
-
&, .cell-wrapper {
|
342 |
-
.box-sizing(border-box);
|
343 |
-
}
|
344 |
-
|
345 |
-
.widgets-container {
|
346 |
-
|
347 |
-
.so-widget {
|
348 |
-
cursor: move;
|
349 |
-
margin-bottom: 5px;
|
350 |
-
|
351 |
-
background: #f9f9fb;
|
352 |
-
|
353 |
-
border: 1px solid #9bafb5;
|
354 |
-
max-height: 49px;
|
355 |
-
.box-sizing(border-box);
|
356 |
-
.box-shadow(~"0 1px 2px rgba(0,0,0,0.075)");
|
357 |
-
|
358 |
-
|
359 |
-
&:hover {
|
360 |
-
border: 1px solid #93a7ad;
|
361 |
-
background: #feffff;
|
362 |
-
.box-shadow(~"0 2px 2px rgba(0,0,0,0.075)");
|
363 |
-
}
|
364 |
-
|
365 |
-
.so-widget-wrapper{
|
366 |
-
padding: 7px 9px;
|
367 |
-
overflow: hidden;
|
368 |
-
position: relative;
|
369 |
-
}
|
370 |
-
|
371 |
-
h4{
|
372 |
-
display: block;
|
373 |
-
cursor: pointer;
|
374 |
-
margin: 0 15px 3px 0;
|
375 |
-
font-weight: 600;
|
376 |
-
line-height: 1.25em;
|
377 |
-
color: #474747;
|
378 |
-
text-shadow: 0 1px 0 #FFF;
|
379 |
-
white-space: nowrap;
|
380 |
-
|
381 |
-
span {
|
382 |
-
font-weight: normal;
|
383 |
-
display: inline-block;
|
384 |
-
color: #999;
|
385 |
-
text-shadow: 0 1px 0 #FFF;
|
386 |
-
margin-left: 12px;
|
387 |
-
margin-right: 5px;
|
388 |
-
font-style: italic;
|
389 |
-
}
|
390 |
-
}
|
391 |
-
|
392 |
-
.title {
|
393 |
-
.actions {
|
394 |
-
font-size: 12px;
|
395 |
-
position: absolute;
|
396 |
-
top: 5px;
|
397 |
-
right: 7px;
|
398 |
-
cursor: pointer;
|
399 |
-
padding: 2px 2px 2px 15px;
|
400 |
-
z-index: 10;
|
401 |
-
|
402 |
-
&:hover {
|
403 |
-
background: #feffff;
|
404 |
-
|
405 |
-
a{
|
406 |
-
opacity: 1;
|
407 |
-
}
|
408 |
-
}
|
409 |
-
|
410 |
-
a{
|
411 |
-
display: none;
|
412 |
-
margin-right: 3px;
|
413 |
-
text-decoration: none;
|
414 |
-
}
|
415 |
-
|
416 |
-
a.widget-delete{
|
417 |
-
color: #FF0000;
|
418 |
-
|
419 |
-
&:hover {
|
420 |
-
color: white;
|
421 |
-
background: #FF0000;
|
422 |
-
}
|
423 |
-
}
|
424 |
-
|
425 |
-
}
|
426 |
-
}
|
427 |
-
|
428 |
-
&:hover {
|
429 |
-
.title a{
|
430 |
-
display: inline-block;
|
431 |
-
opacity: 0.5;
|
432 |
-
}
|
433 |
-
}
|
434 |
-
|
435 |
-
&.panel-being-dragged .title .actions {
|
436 |
-
display: none;
|
437 |
-
}
|
438 |
-
|
439 |
-
small{
|
440 |
-
display: block;
|
441 |
-
height: 16px;
|
442 |
-
overflow: hidden;
|
443 |
-
color: #777;
|
444 |
-
}
|
445 |
-
|
446 |
-
.form{
|
447 |
-
display: none;
|
448 |
-
}
|
449 |
-
|
450 |
-
&.widget-being-dragged {
|
451 |
-
opacity: 0.9;
|
452 |
-
pointer-events: none;
|
453 |
-
}
|
454 |
-
|
455 |
-
}
|
456 |
-
|
457 |
-
.so-widget-sortable-highlight{
|
458 |
-
border: 1px solid;
|
459 |
-
.box-sizing(border-box);
|
460 |
-
|
461 |
-
height: 49px;
|
462 |
-
|
463 |
-
background: #ddebef;
|
464 |
-
border-color: #bcccd2;
|
465 |
-
margin-bottom: 5px;
|
466 |
-
|
467 |
-
position: relative;
|
468 |
-
|
469 |
-
.box-shadow(~"inset 2px 2px 2px rgba(0,0,0,0.01)");
|
470 |
-
}
|
471 |
-
|
472 |
-
}
|
473 |
-
|
474 |
-
.resize-handle{
|
475 |
-
z-index: 100;
|
476 |
-
position: absolute;
|
477 |
-
top: 0;
|
478 |
-
width: 10px;
|
479 |
-
left: -5px;
|
480 |
-
cursor: col-resize;
|
481 |
-
background: #e5f4fa;
|
482 |
-
height: 100%;
|
483 |
-
|
484 |
-
.transition(0.25s, background, ease-in-out);
|
485 |
-
|
486 |
-
&:hover{
|
487 |
-
background: #bfe4f3;
|
488 |
-
}
|
489 |
-
}
|
490 |
-
|
491 |
-
&:first-child {
|
492 |
-
.resize-handle {
|
493 |
-
display: none;
|
494 |
-
}
|
495 |
-
}
|
496 |
-
}
|
497 |
-
}
|
498 |
-
|
499 |
-
}
|
500 |
-
}
|
501 |
-
|
502 |
-
/* Page Builder icons */
|
503 |
-
|
504 |
-
.so-panels-icon {
|
505 |
-
font-family: 'siteorigin-panels';
|
506 |
-
speak: none;
|
507 |
-
font-style: normal;
|
508 |
-
font-weight: normal;
|
509 |
-
font-variant: normal;
|
510 |
-
text-transform: none;
|
511 |
-
line-height: 1;
|
512 |
-
|
513 |
-
/* Better Font Rendering =========== */
|
514 |
-
-webkit-font-smoothing: antialiased;
|
515 |
-
-moz-osx-font-smoothing: grayscale;
|
516 |
-
|
517 |
-
&.so-panels-icon-plus:before {
|
518 |
-
content: "\f067";
|
519 |
-
}
|
520 |
-
&.so-panels-icon-eye:before {
|
521 |
-
content: "\f06e";
|
522 |
-
}
|
523 |
-
&.so-panels-icon-arrows-v:before {
|
524 |
-
content: "\f07d";
|
525 |
-
}
|
526 |
-
&.so-panels-icon-wrench:before {
|
527 |
-
content: "\f0ad";
|
528 |
-
}
|
529 |
-
&.so-panels-icon-columns:before {
|
530 |
-
content: "\f0db";
|
531 |
-
}
|
532 |
-
&.so-panels-icon-rotate-left:before {
|
533 |
-
content: "\f0e2";
|
534 |
-
}
|
535 |
-
&.so-panels-icon-puzzle-piece:before {
|
536 |
-
content: "\f12e";
|
537 |
-
}
|
538 |
-
&.so-panels-icon-cubes:before {
|
539 |
-
content: "\f1b3";
|
540 |
-
}
|
541 |
-
}
|
542 |
-
|
543 |
-
.so-panels-welcome-message {
|
544 |
-
text-align: center;
|
545 |
-
padding: 0px 15px 20px 15px;
|
546 |
-
color: #555;
|
547 |
-
line-height: 1.8em;
|
548 |
-
|
549 |
-
.so-message-wrapper {
|
550 |
-
padding: 15px 10px;
|
551 |
-
background: #F8F8F8;
|
552 |
-
border: 1px solid #E0E0E0;
|
553 |
-
}
|
554 |
-
|
555 |
-
.so-tool-button {
|
556 |
-
font-size: inherit;
|
557 |
-
display: inline-block;
|
558 |
-
float: none;
|
559 |
-
color: #666;
|
560 |
-
padding: 5px 10px;
|
561 |
-
margin: 0 3px;
|
562 |
-
|
563 |
-
.so-panels-icon {
|
564 |
-
color: #777;
|
565 |
-
font-size: 0.8em;
|
566 |
-
}
|
567 |
-
}
|
568 |
-
}
|
569 |
-
|
570 |
-
}
|
571 |
-
|
572 |
-
/* This is to display a draggable widget */
|
573 |
-
.so-widget.ui-sortable-helper.widget-being-dragged {
|
574 |
-
/* Need a high z-index for layout builder widget */
|
575 |
-
z-index: 500002 !important;
|
576 |
-
|
577 |
-
.siteorigin-panels-builder.so-rows-container.so-row-container.so-cells.cell.widgets-container.so-widget;
|
578 |
-
}
|
579 |
-
|
580 |
-
/* Handles displaying a builder in the WordPress widget interface */
|
581 |
-
.widgets-holder-wrap .widget-inside {
|
582 |
-
|
583 |
-
.siteorigin-panels-builder {
|
584 |
-
|
585 |
-
.so-builder-container {
|
586 |
-
padding-top: 0;
|
587 |
-
}
|
588 |
-
|
589 |
-
.so-rows-container {
|
590 |
-
padding: 10px 0 0 0;
|
591 |
-
}
|
592 |
-
|
593 |
-
.so-builder-toolbar {
|
594 |
-
padding-left: 15px;
|
595 |
-
padding-right: 15px;
|
596 |
-
margin: 0 -15px;
|
597 |
-
}
|
598 |
-
}
|
599 |
-
|
600 |
-
}
|
601 |
-
|
602 |
-
.so-panels-dialog {
|
603 |
-
|
604 |
-
@edge_spacing: 30px;
|
605 |
-
|
606 |
-
@title_bar_height: 50px;
|
607 |
-
@toolbar_height: 58px;
|
608 |
-
@sidebar_width: 290px;
|
609 |
-
|
610 |
-
@pane_padding: 15px;
|
611 |
-
@border_color: #D8D8D8;
|
612 |
-
|
613 |
-
.so-overlay, .so-content, .so-title-bar, .so-toolbar, .so-left-sidebar, .so-right-sidebar {
|
614 |
-
z-index: 100000;
|
615 |
-
position: fixed;
|
616 |
-
.box-sizing(border-box);
|
617 |
-
padding: @pane_padding;
|
618 |
-
|
619 |
-
}
|
620 |
-
|
621 |
-
.so-content, .so-left-sidebar, .so-right-sidebar {
|
622 |
-
overflow-y: auto;
|
623 |
-
}
|
624 |
-
|
625 |
-
.so-overlay {
|
626 |
-
top: 0;
|
627 |
-
left: 0;
|
628 |
-
right: 0;
|
629 |
-
bottom: 0;
|
630 |
-
background: rgba(0,0,0,0.5);
|
631 |
-
}
|
632 |
-
|
633 |
-
.so-content {
|
634 |
-
top: @edge_spacing + @title_bar_height;
|
635 |
-
left: @edge_spacing;
|
636 |
-
right: @edge_spacing;
|
637 |
-
bottom: @edge_spacing + @toolbar_height;
|
638 |
-
background-color: #fdfdfd;
|
639 |
-
overflow-x: hidden;
|
640 |
-
|
641 |
-
.box-shadow(~"inset 0 2px 2px rgba(0,0,0,0.03)");
|
642 |
-
|
643 |
-
> *:first-child {
|
644 |
-
margin-top: 0;
|
645 |
-
}
|
646 |
-
|
647 |
-
> *:last-child {
|
648 |
-
margin-bottom: 0;
|
649 |
-
}
|
650 |
-
|
651 |
-
.so-content-tabs > * {
|
652 |
-
display: none;
|
653 |
-
}
|
654 |
-
|
655 |
-
}
|
656 |
-
|
657 |
-
.so-title-bar {
|
658 |
-
left: @edge_spacing;
|
659 |
-
right: @edge_spacing;
|
660 |
-
top: @edge_spacing;
|
661 |
-
height: @title_bar_height;
|
662 |
-
background-color: #fafafa;
|
663 |
-
border-bottom: 1px solid @border_color;
|
664 |
-
|
665 |
-
h3.so-title {
|
666 |
-
margin: 0 !important;
|
667 |
-
padding: 0 !important;
|
668 |
-
}
|
669 |
-
|
670 |
-
h3.so-parent-link {
|
671 |
-
cursor: pointer;
|
672 |
-
position: relative;
|
673 |
-
float: left;
|
674 |
-
margin: 0 @pane_padding 0 0 !important;
|
675 |
-
padding: 0 @pane_padding+12px 0 0 !important;
|
676 |
-
|
677 |
-
.so-separator {
|
678 |
-
position: absolute;
|
679 |
-
top: -@pane_padding;
|
680 |
-
right: 0;
|
681 |
-
width: 12px;
|
682 |
-
height: @title_bar_height;
|
683 |
-
display: block;
|
684 |
-
background: url(./images/dialog-separator.png) no-repeat;
|
685 |
-
}
|
686 |
-
|
687 |
-
|
688 |
-
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
689 |
-
.so-separator {
|
690 |
-
background: url(./images/dialog-separator@2x.png) no-repeat;
|
691 |
-
background-size: cover;
|
692 |
-
}
|
693 |
-
}
|
694 |
-
|
695 |
-
|
696 |
-
}
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
/* These are the action buttons in the title bar */
|
701 |
-
a {
|
702 |
-
cursor: pointer;
|
703 |
-
position: absolute;
|
704 |
-
box-sizing: border-box;
|
705 |
-
width: 50px;
|
706 |
-
height: 50px;
|
707 |
-
display: block;
|
708 |
-
|
709 |
-
top: 0;
|
710 |
-
right: 0;
|
711 |
-
|
712 |
-
.transition(0.2s);
|
713 |
-
background: #fafafa;
|
714 |
-
border-left: 1px solid #d8d8d8;
|
715 |
-
border-bottom: 1px solid #d8d8d8;
|
716 |
-
|
717 |
-
&:hover {
|
718 |
-
background: #e9e9e9;
|
719 |
-
.so-dialog-icon {
|
720 |
-
color: #333333;
|
721 |
-
}
|
722 |
-
}
|
723 |
-
|
724 |
-
.so-dialog-icon {
|
725 |
-
position: absolute;
|
726 |
-
top: 50%;
|
727 |
-
left: 50%;
|
728 |
-
text-decoration: none;
|
729 |
-
width: 20px;
|
730 |
-
height: 20px;
|
731 |
-
margin-left: -10px;
|
732 |
-
margin-top: -10px;
|
733 |
-
color: #666666;
|
734 |
-
text-align: center;
|
735 |
-
|
736 |
-
&:before {
|
737 |
-
font: 400 20px/1em dashicons;
|
738 |
-
|
739 |
-
top: 7px;
|
740 |
-
left: 13px;
|
741 |
-
}
|
742 |
-
}
|
743 |
-
|
744 |
-
&.so-close {
|
745 |
-
right: 0;
|
746 |
-
|
747 |
-
.so-dialog-icon:before {
|
748 |
-
content: "\f335";
|
749 |
-
}
|
750 |
-
}
|
751 |
-
|
752 |
-
&.so-next {
|
753 |
-
right: 50px;
|
754 |
-
|
755 |
-
.so-dialog-icon:before {
|
756 |
-
content: '\f345';
|
757 |
-
}
|
758 |
-
}
|
759 |
-
|
760 |
-
&.so-previous {
|
761 |
-
right: 100px;
|
762 |
-
|
763 |
-
.so-dialog-icon:before {
|
764 |
-
content: '\f341';
|
765 |
-
}
|
766 |
-
}
|
767 |
-
|
768 |
-
/* Disabled nav */
|
769 |
-
&.so-nav.so-disabled {
|
770 |
-
cursor: default;
|
771 |
-
pointer-events:none;
|
772 |
-
|
773 |
-
.so-dialog-icon {
|
774 |
-
color: #dddddd;
|
775 |
-
}
|
776 |
-
}
|
777 |
-
|
778 |
-
}
|
779 |
-
}
|
780 |
-
|
781 |
-
.so-toolbar {
|
782 |
-
left: @edge_spacing;
|
783 |
-
right: @edge_spacing;
|
784 |
-
bottom: @edge_spacing;
|
785 |
-
height: @toolbar_height;
|
786 |
-
background-color: #fafafa;
|
787 |
-
border-top: 1px solid @border_color;
|
788 |
-
|
789 |
-
.so-status {
|
790 |
-
float: left;
|
791 |
-
padding-top: 6px;
|
792 |
-
padding-bottom: 6px;
|
793 |
-
font-style: italic;
|
794 |
-
color: #999999;
|
795 |
-
line-height: 1em;
|
796 |
-
|
797 |
-
&.so-panels-loading {
|
798 |
-
padding-left: 26px;
|
799 |
-
background-position: left center;
|
800 |
-
}
|
801 |
-
}
|
802 |
-
|
803 |
-
.so-buttons {
|
804 |
-
|
805 |
-
.action-buttons {
|
806 |
-
|
807 |
-
position: absolute;
|
808 |
-
left: 15px;
|
809 |
-
top: 50%;
|
810 |
-
margin-top: -0.65em;
|
811 |
-
|
812 |
-
a {
|
813 |
-
display: inline;
|
814 |
-
padding: 0.2em 0.5em;
|
815 |
-
line-height: 1em;
|
816 |
-
margin-right: 0.5em;
|
817 |
-
text-decoration: none;
|
818 |
-
}
|
819 |
-
|
820 |
-
.so-delete {
|
821 |
-
color: #a00;
|
822 |
-
|
823 |
-
&:hover {
|
824 |
-
background: #a00;
|
825 |
-
color: #FFFFFF;
|
826 |
-
}
|
827 |
-
}
|
828 |
-
|
829 |
-
.so-duplicate:hover {
|
830 |
-
text-decoration: underline;
|
831 |
-
}
|
832 |
-
|
833 |
-
}
|
834 |
-
|
835 |
-
float: right;
|
836 |
-
}
|
837 |
-
}
|
838 |
-
|
839 |
-
.so-left-sidebar, .so-right-sidebar {
|
840 |
-
background-color: #f3f3f3;
|
841 |
-
}
|
842 |
-
|
843 |
-
.so-left-sidebar {
|
844 |
-
display: none;
|
845 |
-
|
846 |
-
top: @edge_spacing;
|
847 |
-
left: @edge_spacing;
|
848 |
-
bottom: @edge_spacing;
|
849 |
-
width: @sidebar_width;
|
850 |
-
|
851 |
-
|
852 |
-
border-right: 1px solid @border_color;
|
853 |
-
|
854 |
-
h4 {
|
855 |
-
margin: 0 0 20px 0;
|
856 |
-
font-size: 18px;
|
857 |
-
}
|
858 |
-
|
859 |
-
.so-sidebar-search {
|
860 |
-
width: 100%;
|
861 |
-
padding: 6px;
|
862 |
-
margin-bottom: 20px;
|
863 |
-
}
|
864 |
-
|
865 |
-
.so-sidebar-tabs {
|
866 |
-
list-style: none;
|
867 |
-
margin: 0 -15px;
|
868 |
-
|
869 |
-
li {
|
870 |
-
margin-bottom: 0;
|
871 |
-
a {
|
872 |
-
padding: 7px 16px;
|
873 |
-
display: block;
|
874 |
-
font-size: 14px;
|
875 |
-
text-decoration: none;
|
876 |
-
|
877 |
-
&:hover {
|
878 |
-
background: #FFFFFF;
|
879 |
-
}
|
880 |
-
|
881 |
-
box-shadow: none !important;
|
882 |
-
}
|
883 |
-
|
884 |
-
&.tab-active {
|
885 |
-
a {
|
886 |
-
color: #555;
|
887 |
-
font-weight: bold;
|
888 |
-
background: #FFFFFF;
|
889 |
-
&:hover {
|
890 |
-
background: #FFFFFF;
|
891 |
-
}
|
892 |
-
}
|
893 |
-
}
|
894 |
-
}
|
895 |
-
}
|
896 |
-
|
897 |
-
}
|
898 |
-
|
899 |
-
.so-right-sidebar {
|
900 |
-
display: none;
|
901 |
-
|
902 |
-
top: @edge_spacing + @title_bar_height;
|
903 |
-
right: @edge_spacing;
|
904 |
-
bottom: @edge_spacing + @toolbar_height;
|
905 |
-
width: @sidebar_width;
|
906 |
-
|
907 |
-
border-left: 1px solid @border_color;
|
908 |
-
|
909 |
-
h3 {
|
910 |
-
color: #333;
|
911 |
-
|
912 |
-
&:first-child {
|
913 |
-
margin-top: 0;
|
914 |
-
}
|
915 |
-
}
|
916 |
-
}
|
917 |
-
|
918 |
-
.so-sidebar {
|
919 |
-
.form-field {
|
920 |
-
margin-bottom: 20px;
|
921 |
-
|
922 |
-
label{
|
923 |
-
font-weight: 500;
|
924 |
-
font-size: 15px;
|
925 |
-
display: block;
|
926 |
-
margin-bottom: 10px;
|
927 |
-
}
|
928 |
-
|
929 |
-
input[type=text] {
|
930 |
-
|
931 |
-
}
|
932 |
-
}
|
933 |
-
}
|
934 |
-
|
935 |
-
&.so-panels-dialog-has-left-sidebar {
|
936 |
-
.so-content, .so-toolbar, .so-title-bar {
|
937 |
-
left: @edge_spacing + @sidebar_width;
|
938 |
-
}
|
939 |
-
|
940 |
-
.so-content {
|
941 |
-
.box-shadow(~"inset 2px 2px 2px rgba(0,0,0,0.03)");
|
942 |
-
}
|
943 |
-
|
944 |
-
.so-left-sidebar {
|
945 |
-
display: block;
|
946 |
-
}
|
947 |
-
}
|
948 |
-
|
949 |
-
&.so-panels-dialog-has-right-sidebar {
|
950 |
-
.so-content {
|
951 |
-
right: @edge_spacing + @sidebar_width;
|
952 |
-
}
|
953 |
-
|
954 |
-
.so-right-sidebar {
|
955 |
-
display: block;
|
956 |
-
}
|
957 |
-
}
|
958 |
-
|
959 |
-
&.so-panels-dialog-edit-widget {
|
960 |
-
|
961 |
-
.so-left-sidebar {
|
962 |
-
|
963 |
-
.so-widgets {
|
964 |
-
|
965 |
-
.so-widget {
|
966 |
-
.rounded(2px);
|
967 |
-
|
968 |
-
border: 1px solid #cccccc;
|
969 |
-
cursor: pointer;
|
970 |
-
padding: 10px;
|
971 |
-
background: #f9f9f9;
|
972 |
-
.box-shadow(~"0 1px 2px rgba(0,0,0,0.075), inset 0 1px 0 #FFFFFF");
|
973 |
-
margin-bottom: 15px;
|
974 |
-
|
975 |
-
&:hover {
|
976 |
-
border: 1px solid #BBBBBB;
|
977 |
-
background: #FFFFFF;
|
978 |
-
}
|
979 |
-
|
980 |
-
&.so-current {
|
981 |
-
border-color: #0074a2;
|
982 |
-
background: #2ea2cc;
|
983 |
-
cursor: auto;
|
984 |
-
.box-shadow(~"0 1px 2px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.2)");
|
985 |
-
|
986 |
-
h3 {
|
987 |
-
color: #FFFFFF;
|
988 |
-
}
|
989 |
-
|
990 |
-
small {
|
991 |
-
color: #eeeeee;
|
992 |
-
}
|
993 |
-
|
994 |
-
&:hover {
|
995 |
-
border-color: #0074a2;
|
996 |
-
background: #2ea2cc;
|
997 |
-
}
|
998 |
-
}
|
999 |
-
|
1000 |
-
&:last-child {
|
1001 |
-
margin-bottom: 0;
|
1002 |
-
}
|
1003 |
-
|
1004 |
-
h3 {
|
1005 |
-
margin: 0 0 7px 0;
|
1006 |
-
padding: 0;
|
1007 |
-
height: 1.2em;
|
1008 |
-
color: #222222;
|
1009 |
-
font-size: 14px;
|
1010 |
-
}
|
1011 |
-
|
1012 |
-
small{
|
1013 |
-
font-size: 11px;
|
1014 |
-
line-height: 1.25em;
|
1015 |
-
display: block;
|
1016 |
-
overflow: hidden;
|
1017 |
-
color: #888888;
|
1018 |
-
}
|
1019 |
-
|
1020 |
-
}
|
1021 |
-
|
1022 |
-
}
|
1023 |
-
|
1024 |
-
}
|
1025 |
-
|
1026 |
-
}
|
1027 |
-
|
1028 |
-
/* The add widget dialog */
|
1029 |
-
|
1030 |
-
&.so-panels-dialog-add-widget {
|
1031 |
-
|
1032 |
-
.widget-type-list {
|
1033 |
-
|
1034 |
-
.clearfix();
|
1035 |
-
|
1036 |
-
margin: 0 -5px -10px -5px;
|
1037 |
-
min-height: 10px;
|
1038 |
-
|
1039 |
-
.widget-type {
|
1040 |
-
-ms-user-select: none; /* IE 10+ */
|
1041 |
-
-moz-user-select: -moz-none;
|
1042 |
-
-khtml-user-select: none;
|
1043 |
-
-webkit-user-select: none;
|
1044 |
-
user-select: none;
|
1045 |
-
|
1046 |
-
.box-sizing(border-box);
|
1047 |
-
|
1048 |
-
width: 25%;
|
1049 |
-
padding: 0 5px;
|
1050 |
-
margin-bottom: 10px;
|
1051 |
-
float: left;
|
1052 |
-
|
1053 |
-
@media (max-width: 1280px) {
|
1054 |
-
& {
|
1055 |
-
width: 33.333%;
|
1056 |
-
}
|
1057 |
-
|
1058 |
-
}
|
1059 |
-
|
1060 |
-
@media (max-width: 960px) {
|
1061 |
-
& {
|
1062 |
-
width: 50%;
|
1063 |
-
}
|
1064 |
-
|
1065 |
-
}
|
1066 |
-
|
1067 |
-
h3 {
|
1068 |
-
margin: 0 0 7px 0;
|
1069 |
-
padding: 0;
|
1070 |
-
color: #222222;
|
1071 |
-
font-size: 14px;
|
1072 |
-
}
|
1073 |
-
|
1074 |
-
small{
|
1075 |
-
font-size: 11px;
|
1076 |
-
min-height: 2.5em;
|
1077 |
-
line-height: 1.25em;
|
1078 |
-
display: block;
|
1079 |
-
overflow: hidden;
|
1080 |
-
color: #888888;
|
1081 |
-
}
|
1082 |
-
|
1083 |
-
.widget-icon {
|
1084 |
-
font-size: 20px;
|
1085 |
-
width: 20px;
|
1086 |
-
height: 20px;
|
1087 |
-
color: #666;
|
1088 |
-
float: left;
|
1089 |
-
margin: -1px 0.5em 0 0;
|
1090 |
-
}
|
1091 |
-
}
|
1092 |
-
|
1093 |
-
.widget-type-wrapper {
|
1094 |
-
border: 1px solid #cccccc;
|
1095 |
-
cursor: pointer;
|
1096 |
-
padding: 10px;
|
1097 |
-
background: #F8F8F8;
|
1098 |
-
.box-shadow(~"0 1px 2px rgba(0,0,0,0.075)");
|
1099 |
-
|
1100 |
-
&:hover {
|
1101 |
-
border: 1px solid #BBBBBB;
|
1102 |
-
background: #FFFFFF;
|
1103 |
-
.box-shadow(~"0 2px 2px rgba(0,0,0,0.075)");
|
1104 |
-
}
|
1105 |
-
}
|
1106 |
-
|
1107 |
-
}
|
1108 |
-
|
1109 |
-
}
|
1110 |
-
|
1111 |
-
/* The row edit dialog */
|
1112 |
-
|
1113 |
-
&.so-panels-dialog-row-edit {
|
1114 |
-
|
1115 |
-
.so-content {
|
1116 |
-
|
1117 |
-
@preview_height: 360px;
|
1118 |
-
|
1119 |
-
.row-set-form {
|
1120 |
-
.clearfix();
|
1121 |
-
padding: 8px;
|
1122 |
-
border: 1px solid #ccc;
|
1123 |
-
margin-bottom: 20px;
|
1124 |
-
background: #F3F3F3;
|
1125 |
-
|
1126 |
-
input, select, button, strong, span {
|
1127 |
-
display: inline;
|
1128 |
-
margin: 1px 5px;
|
1129 |
-
|
1130 |
-
outline: none;
|
1131 |
-
box-shadow: none;
|
1132 |
-
}
|
1133 |
-
|
1134 |
-
button {
|
1135 |
-
margin-top: 2px;
|
1136 |
-
}
|
1137 |
-
|
1138 |
-
label{
|
1139 |
-
display: inline;
|
1140 |
-
}
|
1141 |
-
}
|
1142 |
-
|
1143 |
-
.row-preview {
|
1144 |
-
|
1145 |
-
margin: 0 -6px;
|
1146 |
-
height: @preview_height;
|
1147 |
-
position: relative;
|
1148 |
-
.preview-cell, .preview-cell-in, .preview-cell-weight {
|
1149 |
-
.box-sizing(border-box);
|
1150 |
-
}
|
1151 |
-
|
1152 |
-
white-space: nowrap;
|
1153 |
-
|
1154 |
-
.preview-cell {
|
1155 |
-
display: inline-block;
|
1156 |
-
position: relative;
|
1157 |
-
padding: 0 6px;
|
1158 |
-
|
1159 |
-
.preview-cell-in {
|
1160 |
-
border: 1px solid #bcccd2;
|
1161 |
-
min-height: @preview_height;
|
1162 |
-
background: #e4eff4;
|
1163 |
-
position: relative;
|
1164 |
-
|
1165 |
-
.preview-cell-weight,
|
1166 |
-
.preview-cell-weight-input {
|
1167 |
-
position: absolute;
|
1168 |
-
font-size: 17px;
|
1169 |
-
font-weight: bold;
|
1170 |
-
top: 50%;
|
1171 |
-
left: 50%;
|
1172 |
-
width: 80px;
|
1173 |
-
text-align: center;
|
1174 |
-
color: #5e6d72;
|
1175 |
-
margin: -0.95em 0 0 -40px;
|
1176 |
-
padding: 10px 0;
|
1177 |
-
border: 1px solid transparent;
|
1178 |
-
line-height: 1.4em !important;
|
1179 |
-
|
1180 |
-
&:after{
|
1181 |
-
content: '%';
|
1182 |
-
}
|
1183 |
-
overflow: hidden;
|
1184 |
-
cursor: pointer;
|
1185 |
-
|
1186 |
-
&:hover {
|
1187 |
-
background: #F6F6F6;
|
1188 |
-
border: 1px solid #D0D0D0;
|
1189 |
-
}
|
1190 |
-
}
|
1191 |
-
|
1192 |
-
.preview-cell-weight-input {
|
1193 |
-
background: #F6F6F6;
|
1194 |
-
border: 1px solid #D0D0D0;
|
1195 |
-
.box-shadow(none);
|
1196 |
-
}
|
1197 |
-
}
|
1198 |
-
|
1199 |
-
.resize-handle{
|
1200 |
-
z-index: 100;
|
1201 |
-
position: absolute;
|
1202 |
-
top: 0;
|
1203 |
-
width: 12px;
|
1204 |
-
left: -6px;
|
1205 |
-
cursor: col-resize;
|
1206 |
-
background: #e5f4fb;
|
1207 |
-
height: @preview_height;
|
1208 |
-
|
1209 |
-
.transition(0.15s, background, ease-in-out);
|
1210 |
-
|
1211 |
-
&:hover, &.ui-draggable-dragging {
|
1212 |
-
background: #b7e0f1;
|
1213 |
-
}
|
1214 |
-
}
|
1215 |
-
}
|
1216 |
-
}
|
1217 |
-
|
1218 |
-
}
|
1219 |
-
|
1220 |
-
|
1221 |
-
}
|
1222 |
-
|
1223 |
-
&.so-panels-dialog-history {
|
1224 |
-
|
1225 |
-
.so-left-sidebar {
|
1226 |
-
padding: 0;
|
1227 |
-
}
|
1228 |
-
|
1229 |
-
.history-entries {
|
1230 |
-
|
1231 |
-
|
1232 |
-
.history-entry {
|
1233 |
-
padding: 10px;
|
1234 |
-
background: #F8F8F8;
|
1235 |
-
cursor: pointer;
|
1236 |
-
|
1237 |
-
h3 {
|
1238 |
-
margin: 0 0 0.6em 0;
|
1239 |
-
font-size: 12px;
|
1240 |
-
font-weight: bold;
|
1241 |
-
color: #444444;
|
1242 |
-
line-height: 1em;
|
1243 |
-
}
|
1244 |
-
|
1245 |
-
.timesince {
|
1246 |
-
color: #999999;
|
1247 |
-
font-size: 11px;
|
1248 |
-
line-height: 1em;
|
1249 |
-
}
|
1250 |
-
|
1251 |
-
border-bottom: 1px solid #ccc;
|
1252 |
-
|
1253 |
-
&:hover {
|
1254 |
-
background: #F0F0F0;
|
1255 |
-
}
|
1256 |
-
|
1257 |
-
&.so-selected {
|
1258 |
-
background: #EEEEEE;
|
1259 |
-
}
|
1260 |
-
|
1261 |
-
.count {
|
1262 |
-
color: #999999;
|
1263 |
-
}
|
1264 |
-
}
|
1265 |
-
}
|
1266 |
-
|
1267 |
-
.so-content {
|
1268 |
-
padding: 0;
|
1269 |
-
overflow-y: hidden;
|
1270 |
-
|
1271 |
-
form.history-form {
|
1272 |
-
display: none;
|
1273 |
-
}
|
1274 |
-
|
1275 |
-
iframe.siteorigin-panels-history-iframe {
|
1276 |
-
width: 100%;
|
1277 |
-
height: 100%;
|
1278 |
-
}
|
1279 |
-
}
|
1280 |
-
}
|
1281 |
-
|
1282 |
-
/* For prebuilt layouts */
|
1283 |
-
|
1284 |
-
&.so-panels-dialog-prebuilt-layouts {
|
1285 |
-
.so-content {
|
1286 |
-
|
1287 |
-
padding-left: 10px;
|
1288 |
-
padding-right: 10px;
|
1289 |
-
|
1290 |
-
.layout {
|
1291 |
-
.box-sizing(border-box);
|
1292 |
-
float: left;
|
1293 |
-
width: 33.333%;
|
1294 |
-
padding: 0 5px 10px 5px;
|
1295 |
-
|
1296 |
-
.layout-inside {
|
1297 |
-
padding: 10px 15px;
|
1298 |
-
cursor: pointer;
|
1299 |
-
border: 1px solid #cccccc;
|
1300 |
-
background: #F8F8F8;
|
1301 |
-
.box-shadow(~"0 1px 2px rgba(0,0,0,0.075)");
|
1302 |
-
|
1303 |
-
&:hover {
|
1304 |
-
border: 1px solid #BBBBBB;
|
1305 |
-
background: #FFFFFF;
|
1306 |
-
.box-shadow(~"0 2px 2px rgba(0,0,0,0.075)");
|
1307 |
-
}
|
1308 |
-
|
1309 |
-
h4 {
|
1310 |
-
font-size: 15px;
|
1311 |
-
margin: 0;
|
1312 |
-
line-height: 1.2em;
|
1313 |
-
height: 1.2em;
|
1314 |
-
overflow: hidden;
|
1315 |
-
}
|
1316 |
-
|
1317 |
-
.description {
|
1318 |
-
line-height: 1.2em;
|
1319 |
-
height: 1.2em;
|
1320 |
-
margin-top: 0.7em;
|
1321 |
-
font-size: 12px;
|
1322 |
-
color: #888;
|
1323 |
-
overflow: hidden;
|
1324 |
-
}
|
1325 |
-
|
1326 |
-
.dashicons {
|
1327 |
-
display: none;
|
1328 |
-
float: left;
|
1329 |
-
margin-top: 10px;
|
1330 |
-
}
|
1331 |
-
|
1332 |
-
}
|
1333 |
-
|
1334 |
-
&.so-selected {
|
1335 |
-
|
1336 |
-
.layout-inside {
|
1337 |
-
border: 1px solid #aaaaaa;
|
1338 |
-
background: #F2F2F2;
|
1339 |
-
|
1340 |
-
h4, .description {
|
1341 |
-
margin-left: 35px;
|
1342 |
-
}
|
1343 |
-
|
1344 |
-
.dashicons {
|
1345 |
-
display: inline-block;
|
1346 |
-
}
|
1347 |
-
}
|
1348 |
-
|
1349 |
-
}
|
1350 |
-
|
1351 |
-
}
|
1352 |
-
|
1353 |
-
.so-error-message {
|
1354 |
-
font-size: 14px;
|
1355 |
-
border: 1px solid #cccccc;
|
1356 |
-
background: #F8F8F8;
|
1357 |
-
padding: 15px 20px;
|
1358 |
-
}
|
1359 |
-
|
1360 |
-
.export-file-ui {
|
1361 |
-
padding: 5px 15px;
|
1362 |
-
text-align: right;
|
1363 |
-
}
|
1364 |
-
|
1365 |
-
.import-upload-ui {
|
1366 |
-
padding: 15px;
|
1367 |
-
|
1368 |
-
.drag-drop-message {
|
1369 |
-
display: none;
|
1370 |
-
}
|
1371 |
-
|
1372 |
-
&.has-drag-drop .drag-drop-message {
|
1373 |
-
display: block;
|
1374 |
-
}
|
1375 |
-
|
1376 |
-
p.drag-drop-message{
|
1377 |
-
font-size: 0.9em;
|
1378 |
-
}
|
1379 |
-
|
1380 |
-
.drag-upload-area {
|
1381 |
-
display: block;
|
1382 |
-
.box-sizing(border-box);
|
1383 |
-
padding: 50px 30px;
|
1384 |
-
border: 4px dashed #E0E0E0;
|
1385 |
-
text-align: center;
|
1386 |
-
.transition(0.25s);
|
1387 |
-
|
1388 |
-
&.file-dragover {
|
1389 |
-
background-color: #f2f9fc;
|
1390 |
-
border-color: #0074a2;
|
1391 |
-
}
|
1392 |
-
}
|
1393 |
-
|
1394 |
-
.progress-bar {
|
1395 |
-
display: none;
|
1396 |
-
padding: 2px;
|
1397 |
-
border: 2px solid #2181b1;
|
1398 |
-
.rounded(2px);
|
1399 |
-
margin-top: 20px;
|
1400 |
-
|
1401 |
-
.progress-percent{
|
1402 |
-
height: 14px;
|
1403 |
-
background-color: #358ebe;
|
1404 |
-
.rounded(1px);
|
1405 |
-
}
|
1406 |
-
}
|
1407 |
-
|
1408 |
-
.file-browse-button {
|
1409 |
-
padding: 12px 30px;
|
1410 |
-
height: auto;
|
1411 |
-
}
|
1412 |
-
}
|
1413 |
-
}
|
1414 |
-
|
1415 |
-
}
|
1416 |
-
|
1417 |
-
/* Everything we need for the style fields */
|
1418 |
-
|
1419 |
-
.so-visual-styles {
|
1420 |
-
|
1421 |
-
margin: -15px;
|
1422 |
-
|
1423 |
-
h3 {
|
1424 |
-
line-height: 1em;
|
1425 |
-
margin: 0;
|
1426 |
-
padding: 20px 15px;
|
1427 |
-
border-bottom: 1px solid #ddd;
|
1428 |
-
}
|
1429 |
-
|
1430 |
-
.style-section-head {
|
1431 |
-
background: white;
|
1432 |
-
padding: 15px 10px;
|
1433 |
-
border-bottom: 1px solid #ddd;
|
1434 |
-
cursor: pointer;
|
1435 |
-
|
1436 |
-
.user-select(none);
|
1437 |
-
|
1438 |
-
h4 {
|
1439 |
-
margin: 0;
|
1440 |
-
}
|
1441 |
-
}
|
1442 |
-
|
1443 |
-
.style-section-fields {
|
1444 |
-
padding: 15px;
|
1445 |
-
border-bottom: 1px solid #ddd;
|
1446 |
-
background: #F7F7F7;
|
1447 |
-
|
1448 |
-
.style-field-wrapper {
|
1449 |
-
margin-bottom: 20px;
|
1450 |
-
|
1451 |
-
&:last-child {
|
1452 |
-
margin-bottom: 0;
|
1453 |
-
}
|
1454 |
-
|
1455 |
-
> label {
|
1456 |
-
font-weight: bold;
|
1457 |
-
display: block;
|
1458 |
-
margin-bottom: 3px;
|
1459 |
-
}
|
1460 |
-
|
1461 |
-
.style-field {
|
1462 |
-
.clearfix();
|
1463 |
-
|
1464 |
-
input {
|
1465 |
-
font-size: 12px;
|
1466 |
-
}
|
1467 |
-
}
|
1468 |
-
}
|
1469 |
-
}
|
1470 |
-
|
1471 |
-
.style-input-wrapper {
|
1472 |
-
.clearfix();
|
1473 |
-
|
1474 |
-
input {
|
1475 |
-
max-width: 100%;
|
1476 |
-
}
|
1477 |
-
}
|
1478 |
-
|
1479 |
-
/* All the field types */
|
1480 |
-
|
1481 |
-
.style-field-measurement {
|
1482 |
-
input[type="text"] {
|
1483 |
-
width: 60px;
|
1484 |
-
float: left;
|
1485 |
-
}
|
1486 |
-
|
1487 |
-
select {
|
1488 |
-
float: left;
|
1489 |
-
}
|
1490 |
-
}
|
1491 |
-
|
1492 |
-
.style-field-image {
|
1493 |
-
|
1494 |
-
@image_field_height: 28px;
|
1495 |
-
|
1496 |
-
.so-image-selector {
|
1497 |
-
display: inline-block;
|
1498 |
-
background-color: #f7f7f7;
|
1499 |
-
border: 1px solid #ccc;
|
1500 |
-
height: @image_field_height;
|
1501 |
-
float: left;
|
1502 |
-
.rounded(3px);
|
1503 |
-
cursor: pointer;
|
1504 |
-
|
1505 |
-
.box-shadow(~"inset 0 1px #FFFFFF");
|
1506 |
-
|
1507 |
-
.current-image {
|
1508 |
-
height: @image_field_height;
|
1509 |
-
width: @image_field_height;
|
1510 |
-
float: left;
|
1511 |
-
background: #ffffff;
|
1512 |
-
border-right: 1px solid #ccc;
|
1513 |
-
background-size: cover;
|
1514 |
-
|
1515 |
-
.border-radius(0, 0, 3px, 3px);
|
1516 |
-
}
|
1517 |
-
|
1518 |
-
.select-image {
|
1519 |
-
font-size: 12px;
|
1520 |
-
line-height: @image_field_height;
|
1521 |
-
float: left;
|
1522 |
-
padding: 0 8px;
|
1523 |
-
color: #555;
|
1524 |
-
}
|
1525 |
-
}
|
1526 |
-
|
1527 |
-
.remove-image {
|
1528 |
-
font-size: 12px;
|
1529 |
-
margin-top: 4px;
|
1530 |
-
margin-left: 15px;
|
1531 |
-
|
1532 |
-
display: inline-block;
|
1533 |
-
float: left;
|
1534 |
-
color: #666;
|
1535 |
-
text-decoration: none;
|
1536 |
-
|
1537 |
-
.remove-image {
|
1538 |
-
color: #333;
|
1539 |
-
}
|
1540 |
-
}
|
1541 |
-
}
|
1542 |
-
|
1543 |
-
.so-field-code {
|
1544 |
-
font-size: 12px;
|
1545 |
-
font-family: "Courier 10 Pitch", Courier, monospace;
|
1546 |
-
}
|
1547 |
-
|
1548 |
-
.so-description {
|
1549 |
-
color: #999;
|
1550 |
-
font-size: 12px;
|
1551 |
-
margin-top: 5px;
|
1552 |
-
margin-bottom: 0;
|
1553 |
-
font-style: italic;
|
1554 |
-
clear:both;
|
1555 |
-
}
|
1556 |
-
|
1557 |
-
}
|
1558 |
-
|
1559 |
-
/* Special case of the builder interface being inside a dialog */
|
1560 |
-
|
1561 |
-
.so-content {
|
1562 |
-
.siteorigin-panels-builder {
|
1563 |
-
.so-builder-toolbar {
|
1564 |
-
border: 1px solid #dedede;
|
1565 |
-
}
|
1566 |
-
|
1567 |
-
.so-rows-container {
|
1568 |
-
padding: 20px 0 0 0;
|
1569 |
-
}
|
1570 |
-
|
1571 |
-
.so-panels-welcome-message {
|
1572 |
-
padding-left: 0;
|
1573 |
-
padding-right: 0;
|
1574 |
-
}
|
1575 |
-
}
|
1576 |
-
}
|
1577 |
-
}
|
1578 |
-
|
1579 |
-
/* Display the dialog with a proper z-index in the customizer */
|
1580 |
-
.wp-customizer .so-panels-dialog {
|
1581 |
-
.so-overlay, .so-content, .so-title-bar, .so-toolbar, .so-left-sidebar, .so-right-sidebar {
|
1582 |
-
z-index: 500001;
|
1583 |
-
}
|
1584 |
-
}
|
1585 |
-
|
1586 |
-
.so-panels-live-editor {
|
1587 |
-
> div {
|
1588 |
-
position: fixed;
|
1589 |
-
z-index: 99999;
|
1590 |
-
}
|
1591 |
-
|
1592 |
-
.live-editor-form {
|
1593 |
-
display: none;
|
1594 |
-
}
|
1595 |
-
|
1596 |
-
.so-overlay {
|
1597 |
-
top: 0;
|
1598 |
-
right: 0;
|
1599 |
-
bottom: 0;
|
1600 |
-
left: 0;
|
1601 |
-
background: rgba(0,0,0,0.75);
|
1602 |
-
}
|
1603 |
-
|
1604 |
-
.so-sidebar {
|
1605 |
-
top: 0;
|
1606 |
-
left: 0;
|
1607 |
-
bottom: 0;
|
1608 |
-
width: 260px;
|
1609 |
-
overflow-y: auto;
|
1610 |
-
|
1611 |
-
background: #F2F2F2;
|
1612 |
-
|
1613 |
-
border-right: 1px solid #D0D0D0;
|
1614 |
-
.box-sizing(border-box);
|
1615 |
-
|
1616 |
-
.so-sidebar-tools {
|
1617 |
-
background: #eee;
|
1618 |
-
border-bottom: 1px solid #ddd;
|
1619 |
-
|
1620 |
-
.live-editor-close {
|
1621 |
-
.box-sizing(border-box);
|
1622 |
-
display: block;
|
1623 |
-
width: 45px;
|
1624 |
-
height: 45px;
|
1625 |
-
background: #eee;
|
1626 |
-
border-right: 1px solid #ddd;
|
1627 |
-
color: #444;
|
1628 |
-
cursor: pointer;
|
1629 |
-
text-decoration: none;
|
1630 |
-
position: relative;
|
1631 |
-
text-align: center;
|
1632 |
-
padding-top: 12px;
|
1633 |
-
|
1634 |
-
&:hover {
|
1635 |
-
background: #FFFFFF;
|
1636 |
-
}
|
1637 |
-
|
1638 |
-
&:before {
|
1639 |
-
font: 400 22px/1 dashicons;
|
1640 |
-
content: "\f341";
|
1641 |
-
top: 7px;
|
1642 |
-
left: 13px;
|
1643 |
-
}
|
1644 |
-
}
|
1645 |
-
|
1646 |
-
}
|
1647 |
-
|
1648 |
-
.page-widgets {
|
1649 |
-
|
1650 |
-
.page-widgets-section {
|
1651 |
-
|
1652 |
-
.section-header {
|
1653 |
-
cursor: pointer;
|
1654 |
-
background: white;
|
1655 |
-
padding: 15px 10px;
|
1656 |
-
border: solid #ddd;
|
1657 |
-
border-width: 1px 0;
|
1658 |
-
|
1659 |
-
h4 {
|
1660 |
-
margin: 0;
|
1661 |
-
font-size: 16px;
|
1662 |
-
}
|
1663 |
-
}
|
1664 |
-
|
1665 |
-
.section-widgets {
|
1666 |
-
padding: 10px;
|
1667 |
-
}
|
1668 |
-
|
1669 |
-
|
1670 |
-
&:first-child {
|
1671 |
-
.section-header {
|
1672 |
-
border-top: 0;
|
1673 |
-
}
|
1674 |
-
}
|
1675 |
-
}
|
1676 |
-
|
1677 |
-
.so-widget {
|
1678 |
-
border: 1px solid #cccccc;
|
1679 |
-
cursor: pointer;
|
1680 |
-
padding: 10px;
|
1681 |
-
background: #F8F8F8;
|
1682 |
-
.box-shadow(~"0 1px 2px rgba(0,0,0,0.075), inset 0 1px 0 #FFFFFF");
|
1683 |
-
margin-bottom: 6px;
|
1684 |
-
|
1685 |
-
&:hover, &.so-hovered {
|
1686 |
-
.box-shadow(~"0 2px 2px rgba(0,0,0,0.0125), inset 0 1px 0 #FFFFFF");
|
1687 |
-
border: 1px solid #9bafb5;
|
1688 |
-
background: #f4f9fd;
|
1689 |
-
}
|
1690 |
-
|
1691 |
-
&.so-current {
|
1692 |
-
border-color: #0074a2;
|
1693 |
-
background: #2ea2cc;
|
1694 |
-
cursor: auto;
|
1695 |
-
.box-shadow(~"0 1px 2px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.2)");
|
1696 |
-
|
1697 |
-
h4 {
|
1698 |
-
color: #FFFFFF;
|
1699 |
-
}
|
1700 |
-
|
1701 |
-
small {
|
1702 |
-
color: #eeeeee;
|
1703 |
-
}
|
1704 |
-
|
1705 |
-
&:hover {
|
1706 |
-
border-color: #0074a2;
|
1707 |
-
background: #2ea2cc;
|
1708 |
-
}
|
1709 |
-
}
|
1710 |
-
|
1711 |
-
&:last-child {
|
1712 |
-
margin-bottom: 0;
|
1713 |
-
}
|
1714 |
-
|
1715 |
-
h4 {
|
1716 |
-
margin: 0 0 7px 0;
|
1717 |
-
padding: 0;
|
1718 |
-
height: 1.2em;
|
1719 |
-
color: #222222;
|
1720 |
-
font-size: 14px;
|
1721 |
-
}
|
1722 |
-
|
1723 |
-
.actions {
|
1724 |
-
display: none;
|
1725 |
-
}
|
1726 |
-
|
1727 |
-
small{
|
1728 |
-
font-size: 11px;
|
1729 |
-
line-height: 1.2em;
|
1730 |
-
height: 1.2em;
|
1731 |
-
display: block;
|
1732 |
-
overflow: hidden;
|
1733 |
-
color: #888888;
|
1734 |
-
}
|
1735 |
-
|
1736 |
-
}
|
1737 |
-
|
1738 |
-
}
|
1739 |
-
}
|
1740 |
-
|
1741 |
-
.so-preview {
|
1742 |
-
top: 0;
|
1743 |
-
right: 0;
|
1744 |
-
bottom: 0;
|
1745 |
-
left: 260px;
|
1746 |
-
|
1747 |
-
background: #F4F4F4;
|
1748 |
-
|
1749 |
-
iframe{
|
1750 |
-
width: 100%;
|
1751 |
-
height: 100%;
|
1752 |
-
}
|
1753 |
-
}
|
1754 |
-
|
1755 |
-
}
|
1756 |
-
|
1757 |
-
.so-panels-loading {
|
1758 |
-
background-image: url("images/wpspin_light.gif");
|
1759 |
-
background-position: center center;
|
1760 |
-
background-repeat: no-repeat;
|
1761 |
-
|
1762 |
-
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
1763 |
-
& {
|
1764 |
-
background-image: url(images/wpspin_light-2x.gif);
|
1765 |
-
background-size: 16px 16px;
|
1766 |
-
}
|
1767 |
-
}
|
1768 |
-
}
|
1769 |
-
|
1770 |
-
|
1771 |
-
/* For the custom home page interface */
|
1772 |
-
|
1773 |
-
#panels-home-page {
|
1774 |
-
|
1775 |
-
.siteorigin-panels-builder {
|
1776 |
-
border: 1px solid #D0D0D0;
|
1777 |
-
background-color: #ffffff;
|
1778 |
-
margin: 10px 0;
|
1779 |
-
|
1780 |
-
&.so-panels-loading {
|
1781 |
-
min-height: 150px;
|
1782 |
-
}
|
1783 |
-
}
|
1784 |
-
|
1785 |
-
/* The Switch - © 2013 Thibaut Courouble - MIT License */
|
1786 |
-
|
1787 |
-
.switch {
|
1788 |
-
@switch_height: 24px;
|
1789 |
-
@switch_width: 68px;
|
1790 |
-
@switch_padding: 3px;
|
1791 |
-
|
1792 |
-
margin: 0 10px 0 0;
|
1793 |
-
float: left;
|
1794 |
-
position: relative;
|
1795 |
-
display: inline-block;
|
1796 |
-
vertical-align: top;
|
1797 |
-
width: @switch_width;
|
1798 |
-
height: @switch_height;
|
1799 |
-
padding: @switch_padding;
|
1800 |
-
background-color: white;
|
1801 |
-
border-radius: @switch_height;
|
1802 |
-
box-shadow: inset 0 -1px white, inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
1803 |
-
cursor: pointer;
|
1804 |
-
background-image: -webkit-linear-gradient(top, #eeeeee, white 25px);
|
1805 |
-
background-image: -moz-linear-gradient(top, #eeeeee, white 25px);
|
1806 |
-
background-image: -o-linear-gradient(top, #eeeeee, white 25px);
|
1807 |
-
background-image: linear-gradient(to bottom, #eeeeee, white 25px);
|
1808 |
-
|
1809 |
-
.switch-input {
|
1810 |
-
position: absolute;
|
1811 |
-
top: 0;
|
1812 |
-
left: 0;
|
1813 |
-
opacity: 0;
|
1814 |
-
}
|
1815 |
-
|
1816 |
-
.switch-label {
|
1817 |
-
position: relative;
|
1818 |
-
display: block;
|
1819 |
-
height: inherit;
|
1820 |
-
font-size: @switch_height/2;
|
1821 |
-
text-transform: uppercase;
|
1822 |
-
background: #eceeef;
|
1823 |
-
border-radius: inherit;
|
1824 |
-
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 0 2px rgba(0, 0, 0, 0.15);
|
1825 |
-
-webkit-transition: 0.15s ease-out;
|
1826 |
-
-moz-transition: 0.15s ease-out;
|
1827 |
-
-o-transition: 0.15s ease-out;
|
1828 |
-
transition: 0.15s ease-out;
|
1829 |
-
-webkit-transition-property: opacity background;
|
1830 |
-
-moz-transition-property: opacity background;
|
1831 |
-
-o-transition-property: opacity background;
|
1832 |
-
transition-property: opacity background;
|
1833 |
-
}
|
1834 |
-
.switch-label:before,
|
1835 |
-
.switch-label:after {
|
1836 |
-
position: absolute;
|
1837 |
-
top: 50%;
|
1838 |
-
margin-top: -.5em;
|
1839 |
-
line-height: 1;
|
1840 |
-
-webkit-transition: inherit;
|
1841 |
-
-moz-transition: inherit;
|
1842 |
-
-o-transition: inherit;
|
1843 |
-
transition: inherit;
|
1844 |
-
}
|
1845 |
-
.switch-label:before {
|
1846 |
-
content: attr(data-off);
|
1847 |
-
right: 11px;
|
1848 |
-
color: #aaa;
|
1849 |
-
text-shadow: 0 1px rgba(255, 255, 255, 0.5);
|
1850 |
-
}
|
1851 |
-
.switch-label:after {
|
1852 |
-
content: attr(data-on);
|
1853 |
-
left: @switch_height/2 + 1px;
|
1854 |
-
color: white;
|
1855 |
-
text-shadow: 0 1px rgba(0, 0, 0, 0.2);
|
1856 |
-
opacity: 0;
|
1857 |
-
}
|
1858 |
-
.switch-input:checked ~ .switch-label {
|
1859 |
-
background: #47a8d8;
|
1860 |
-
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 0 3px rgba(0, 0, 0, 0.2);
|
1861 |
-
}
|
1862 |
-
.switch-input:checked ~ .switch-label:before {
|
1863 |
-
opacity: 0;
|
1864 |
-
}
|
1865 |
-
.switch-input:checked ~ .switch-label:after {
|
1866 |
-
opacity: 1;
|
1867 |
-
}
|
1868 |
-
|
1869 |
-
.switch-handle {
|
1870 |
-
position: absolute;
|
1871 |
-
top: 4px;
|
1872 |
-
left: @switch_padding + 1px;
|
1873 |
-
width: @switch_height - 2px;
|
1874 |
-
height: @switch_height - 2px;
|
1875 |
-
background: white;
|
1876 |
-
border-radius: @switch_height/2;
|
1877 |
-
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
|
1878 |
-
background-image: -webkit-linear-gradient(top, white 40%, #f0f0f0);
|
1879 |
-
background-image: -moz-linear-gradient(top, white 40%, #f0f0f0);
|
1880 |
-
background-image: -o-linear-gradient(top, white 40%, #f0f0f0);
|
1881 |
-
background-image: linear-gradient(to bottom, white 40%, #f0f0f0);
|
1882 |
-
-webkit-transition: left 0.15s ease-out;
|
1883 |
-
-moz-transition: left 0.15s ease-out;
|
1884 |
-
-o-transition: left 0.15s ease-out;
|
1885 |
-
transition: left 0.15s ease-out;
|
1886 |
-
}
|
1887 |
-
.switch-handle:before {
|
1888 |
-
content: '';
|
1889 |
-
position: absolute;
|
1890 |
-
top: 50%;
|
1891 |
-
left: 50%;
|
1892 |
-
margin: -7px 0 0 -7px;
|
1893 |
-
width: @switch_height/2 + 2px;
|
1894 |
-
height: @switch_height/2 + 2px;
|
1895 |
-
background: #f9f9f9;
|
1896 |
-
border-radius: (@switch_height/2 + 2px) / 2;
|
1897 |
-
box-shadow: inset 0 1px rgba(0, 0, 0, 0.02);
|
1898 |
-
background-image: -webkit-linear-gradient(top, #eeeeee, white);
|
1899 |
-
background-image: -moz-linear-gradient(top, #eeeeee, white);
|
1900 |
-
background-image: -o-linear-gradient(top, #eeeeee, white);
|
1901 |
-
background-image: linear-gradient(to bottom, #eeeeee, white);
|
1902 |
-
}
|
1903 |
-
.switch-input:checked ~ .switch-handle {
|
1904 |
-
left: @switch_width - @switch_height + 2px + 2px;
|
1905 |
-
box-shadow: -1px 1px 5px rgba(0, 0, 0, 0.2);
|
1906 |
-
}
|
1907 |
-
|
1908 |
-
.switch-green > .switch-input:checked ~ .switch-label {
|
1909 |
-
background: #4fb845;
|
1910 |
-
}
|
1911 |
-
}
|
1912 |
-
|
1913 |
-
#panels-view-as-page {
|
1914 |
-
display: inline-block;
|
1915 |
-
margin-left: 50px;
|
1916 |
-
}
|
1917 |
-
}
|
1918 |
-
|
1919 |
-
.siteorigin-page-builder-widget {
|
1920 |
-
.siteorigin-panels-display-builder {
|
1921 |
-
display: inline-block !important;
|
1922 |
-
}
|
1923 |
-
|
1924 |
-
.siteorigin-panels-no-builder {
|
1925 |
-
display: none !important;
|
1926 |
-
}
|
1927 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/front-flex.css
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.panel-grid.panel-no-style,
|
2 |
+
.panel-grid.panel-has-style > .panel-row-style {
|
3 |
+
display: -webkit-flex;
|
4 |
+
display: flex;
|
5 |
+
-ms-flex-wrap: wrap;
|
6 |
+
-webkit-flex-wrap: wrap;
|
7 |
+
flex-wrap: nowrap;
|
8 |
+
-ms-justify-content: space-between;
|
9 |
+
-webkit-justify-content: space-between;
|
10 |
+
justify-content: space-between;
|
11 |
+
}
|
12 |
+
.panel-layout.panel-is-rtl .panel-grid.panel-no-style,
|
13 |
+
.panel-layout.panel-is-rtl .panel-grid.panel-has-style > .panel-row-style {
|
14 |
+
-ms-flex-direction: row-reverse;
|
15 |
+
-webkit-flex-direction: row-reverse;
|
16 |
+
flex-direction: row-reverse;
|
17 |
+
}
|
18 |
+
.panel-grid-cell {
|
19 |
+
-ms-box-sizing: border-box;
|
20 |
+
-moz-box-sizing: border-box;
|
21 |
+
-webkit-box-sizing: border-box;
|
22 |
+
box-sizing: border-box;
|
23 |
+
}
|
24 |
+
.panel-grid-cell .panel-cell-style {
|
25 |
+
height: 100%;
|
26 |
+
}
|
27 |
+
.panel-grid-cell .so-panel {
|
28 |
+
zoom: 1;
|
29 |
+
}
|
30 |
+
.panel-grid-cell .so-panel:before {
|
31 |
+
content: '';
|
32 |
+
display: block;
|
33 |
+
}
|
34 |
+
.panel-grid-cell .so-panel:after {
|
35 |
+
content: '';
|
36 |
+
display: table;
|
37 |
+
clear: both;
|
38 |
+
}
|
39 |
+
.panel-grid-cell .panel-last-child {
|
40 |
+
margin-bottom: 0;
|
41 |
+
}
|
42 |
+
.panel-grid-cell .widget-title {
|
43 |
+
margin-top: 0;
|
44 |
+
}
|
45 |
+
body.siteorigin-panels-before-js {
|
46 |
+
overflow-x: hidden;
|
47 |
+
}
|
48 |
+
body.siteorigin-panels-before-js .siteorigin-panels-stretch {
|
49 |
+
margin-right: -1000px !important;
|
50 |
+
margin-left: -1000px !important;
|
51 |
+
padding-right: 1000px !important;
|
52 |
+
padding-left: 1000px !important;
|
53 |
+
}
|
css/front.less
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
@import "mixins";
|
2 |
-
|
3 |
-
.panel-grid {
|
4 |
-
zoom: 1;
|
5 |
-
.clearfix();
|
6 |
-
}
|
7 |
-
.panel-grid-cell {
|
8 |
-
.box-sizing(border-box);
|
9 |
-
min-height: 1em;
|
10 |
-
|
11 |
-
.so-panel.widget {
|
12 |
-
.clearfix();
|
13 |
-
}
|
14 |
-
|
15 |
-
.widget.panel-last-child {
|
16 |
-
margin-bottom: 0;
|
17 |
-
}
|
18 |
-
|
19 |
-
.widget-title {
|
20 |
-
margin-top: 0;
|
21 |
-
}
|
22 |
-
}
|
23 |
-
|
24 |
-
.panel-row-style {
|
25 |
-
.clearfix();
|
26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/icons/siteorigin-panels.eot
DELETED
Binary file
|
css/icons/siteorigin-panels.svg
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?xml version="1.0" standalone="no"?>
|
2 |
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3 |
-
<svg xmlns="http://www.w3.org/2000/svg">
|
4 |
-
<metadata>Generated by IcoMoon</metadata>
|
5 |
-
<defs>
|
6 |
-
<font id="icomoon" horiz-adv-x="1024">
|
7 |
-
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
8 |
-
<missing-glyph horiz-adv-x="1024" />
|
9 |
-
<glyph unicode=" " horiz-adv-x="512" d="" />
|
10 |
-
<glyph unicode="" glyph-name="film" horiz-adv-x="1097" d="M219.429 36.571v73.143c0 20-16.571 36.571-36.571 36.571h-73.143c-20 0-36.571-16.571-36.571-36.571v-73.143c0-20 16.571-36.571 36.571-36.571h73.143c20 0 36.571 16.571 36.571 36.571zM219.429 256v73.143c0 20-16.571 36.571-36.571 36.571h-73.143c-20 0-36.571-16.571-36.571-36.571v-73.143c0-20 16.571-36.571 36.571-36.571h73.143c20 0 36.571 16.571 36.571 36.571zM219.429 475.428v73.143c0 20-16.571 36.571-36.571 36.571h-73.143c-20 0-36.571-16.571-36.571-36.571v-73.143c0-20 16.571-36.571 36.571-36.571h73.143c20 0 36.571 16.571 36.571 36.571zM804.571 36.571v292.571c0 20-16.571 36.571-36.571 36.571h-438.857c-20 0-36.571-16.571-36.571-36.571v-292.571c0-20 16.571-36.571 36.571-36.571h438.857c20 0 36.571 16.571 36.571 36.571zM219.429 694.857v73.143c0 20-16.571 36.571-36.571 36.571h-73.143c-20 0-36.571-16.571-36.571-36.571v-73.143c0-20 16.571-36.571 36.571-36.571h73.143c20 0 36.571 16.571 36.571 36.571zM1024 36.571v73.143c0 20-16.571 36.571-36.571 36.571h-73.143c-20 0-36.571-16.571-36.571-36.571v-73.143c0-20 16.571-36.571 36.571-36.571h73.143c20 0 36.571 16.571 36.571 36.571zM804.571 475.428v292.571c0 20-16.571 36.571-36.571 36.571h-438.857c-20 0-36.571-16.571-36.571-36.571v-292.571c0-20 16.571-36.571 36.571-36.571h438.857c20 0 36.571 16.571 36.571 36.571zM1024 256v73.143c0 20-16.571 36.571-36.571 36.571h-73.143c-20 0-36.571-16.571-36.571-36.571v-73.143c0-20 16.571-36.571 36.571-36.571h73.143c20 0 36.571 16.571 36.571 36.571zM1024 475.428v73.143c0 20-16.571 36.571-36.571 36.571h-73.143c-20 0-36.571-16.571-36.571-36.571v-73.143c0-20 16.571-36.571 36.571-36.571h73.143c20 0 36.571 16.571 36.571 36.571zM1024 694.857v73.143c0 20-16.571 36.571-36.571 36.571h-73.143c-20 0-36.571-16.571-36.571-36.571v-73.143c0-20 16.571-36.571 36.571-36.571h73.143c20 0 36.571 16.571 36.571 36.571zM1097.143 786.286v-768c0-50.286-41.143-91.429-91.429-91.429h-914.286c-50.286 0-91.429 41.143-91.429 91.429v768c0 50.286 41.143 91.429 91.429 91.429h914.286c50.286 0 91.429-41.143 91.429-91.429z" />
|
11 |
-
<glyph unicode="" glyph-name="th-large" horiz-adv-x="951" d="M438.857 365.714v-219.429c0-40-33.143-73.143-73.143-73.143h-292.571c-40 0-73.143 33.143-73.143 73.143v219.429c0 40 33.143 73.143 73.143 73.143h292.571c40 0 73.143-33.143 73.143-73.143zM438.857 804.571v-219.429c0-40-33.143-73.143-73.143-73.143h-292.571c-40 0-73.143 33.143-73.143 73.143v219.429c0 40 33.143 73.143 73.143 73.143h292.571c40 0 73.143-33.143 73.143-73.143zM950.857 365.714v-219.429c0-40-33.143-73.143-73.143-73.143h-292.571c-40 0-73.143 33.143-73.143 73.143v219.429c0 40 33.143 73.143 73.143 73.143h292.571c40 0 73.143-33.143 73.143-73.143zM950.857 804.571v-219.429c0-40-33.143-73.143-73.143-73.143h-292.571c-40 0-73.143 33.143-73.143 73.143v219.429c0 40 33.143 73.143 73.143 73.143h292.571c40 0 73.143-33.143 73.143-73.143z" />
|
12 |
-
<glyph unicode="" glyph-name="arrows" d="M1024 438.857c0-9.714-4-18.857-10.857-25.714l-146.286-146.286c-6.857-6.857-16-10.857-25.714-10.857-20 0-36.571 16.571-36.571 36.571v73.143h-219.429v-219.429h73.143c20 0 36.571-16.571 36.571-36.571 0-9.714-4-18.857-10.857-25.714l-146.286-146.286c-6.857-6.857-16-10.857-25.714-10.857s-18.857 4-25.714 10.857l-146.286 146.286c-6.857 6.857-10.857 16-10.857 25.714 0 20 16.571 36.571 36.571 36.571h73.143v219.429h-219.429v-73.143c0-20-16.571-36.571-36.571-36.571-9.714 0-18.857 4-25.714 10.857l-146.286 146.286c-6.857 6.857-10.857 16-10.857 25.714s4 18.857 10.857 25.714l146.286 146.286c6.857 6.857 16 10.857 25.714 10.857 20 0 36.571-16.571 36.571-36.571v-73.143h219.429v219.429h-73.143c-20 0-36.571 16.571-36.571 36.571 0 9.714 4 18.857 10.857 25.714l146.286 146.286c6.857 6.857 16 10.857 25.714 10.857s18.857-4 25.714-10.857l146.286-146.286c6.857-6.857 10.857-16 10.857-25.714 0-20-16.571-36.571-36.571-36.571h-73.143v-219.429h219.429v73.143c0 20 16.571 36.571 36.571 36.571 9.714 0 18.857-4 25.714-10.857l146.286-146.286c6.857-6.857 10.857-16 10.857-25.714z" />
|
13 |
-
<glyph unicode="" glyph-name="arrow-up" horiz-adv-x="951" d="M920.571 396c0-19.429-8-37.714-21.143-51.429l-42.857-42.857c-13.714-13.714-32.571-21.714-52-21.714s-38.286 8-51.429 21.714l-168 167.429v-402.286c0-41.143-34.286-66.857-73.143-66.857h-73.143c-38.857 0-73.143 25.714-73.143 66.857v402.286l-168-167.429c-13.143-13.714-32-21.714-51.429-21.714s-38.286 8-51.429 21.714l-42.857 42.857c-13.714 13.714-21.714 32-21.714 51.429s8 38.286 21.714 52l372 372c13.143 13.714 32 21.143 51.429 21.143s38.286-7.429 52-21.143l372-372c13.143-13.714 21.143-32.571 21.143-52z" />
|
14 |
-
<glyph unicode="" glyph-name="plus" horiz-adv-x="805" d="M804.571 530.286v-109.714c0-30.286-24.571-54.857-54.857-54.857h-237.714v-237.714c0-30.286-24.571-54.857-54.857-54.857h-109.714c-30.286 0-54.857 24.571-54.857 54.857v237.714h-237.714c-30.286 0-54.857 24.571-54.857 54.857v109.714c0 30.286 24.571 54.857 54.857 54.857h237.714v237.714c0 30.286 24.571 54.857 54.857 54.857h109.714c30.286 0 54.857-24.571 54.857-54.857v-237.714h237.714c30.286 0 54.857-24.571 54.857-54.857z" />
|
15 |
-
<glyph unicode="" glyph-name="eye" d="M950.857 402.286c-54.286 84-128.571 156-217.714 201.714 22.857-38.857 34.857-83.429 34.857-128.571 0-141.143-114.857-256-256-256s-256 114.857-256 256c0 45.143 12 89.714 34.857 128.571-89.143-45.714-163.429-117.714-217.714-201.714 97.714-150.857 255.429-256 438.857-256s341.143 105.143 438.857 256zM539.429 621.714c0 14.857-12.571 27.429-27.429 27.429-95.429 0-173.714-78.286-173.714-173.714 0-14.857 12.571-27.429 27.429-27.429s27.429 12.571 27.429 27.429c0 65.143 53.714 118.857 118.857 118.857 14.857 0 27.429 12.571 27.429 27.429zM1024 402.286c0-14.286-4.571-27.429-11.429-39.429-105.143-173.143-297.714-289.714-500.571-289.714s-395.429 117.143-500.571 289.714c-6.857 12-11.429 25.143-11.429 39.429s4.571 27.429 11.429 39.429c105.143 172.571 297.714 289.714 500.571 289.714s395.429-117.143 500.571-289.714c6.857-12 11.429-25.143 11.429-39.429z" />
|
16 |
-
<glyph unicode="" glyph-name="hdd-o" horiz-adv-x="878" d="M594.286 256c0-25.143-20.571-45.714-45.714-45.714s-45.714 20.571-45.714 45.714 20.571 45.714 45.714 45.714 45.714-20.571 45.714-45.714zM740.571 256c0-25.143-20.571-45.714-45.714-45.714s-45.714 20.571-45.714 45.714 20.571 45.714 45.714 45.714 45.714-20.571 45.714-45.714zM804.571 164.571v182.857c0 9.714-8.571 18.286-18.286 18.286h-694.857c-9.714 0-18.286-8.571-18.286-18.286v-182.857c0-9.714 8.571-18.286 18.286-18.286h694.857c9.714 0 18.286 8.571 18.286 18.286zM101.714 438.857h674.286l-89.714 275.429c-2.857 9.714-13.714 17.143-24 17.143h-446.857c-10.286 0-21.143-7.429-24-17.143zM877.714 347.428v-182.857c0-50.286-41.143-91.429-91.429-91.429h-694.857c-50.286 0-91.429 41.143-91.429 91.429v182.857c0 15.429 4.571 28.571 9.143 42.857l112.571 346.286c13.143 40 51.429 68 93.714 68h446.857c42.286 0 80.571-28 93.714-68l112.571-346.286c4.571-14.286 9.143-27.429 9.143-42.857z" />
|
17 |
-
<glyph unicode="" glyph-name="wrench" horiz-adv-x="962" d="M219.429 109.714c0 20-16.571 36.571-36.571 36.571s-36.571-16.571-36.571-36.571 16.571-36.571 36.571-36.571 36.571 16.571 36.571 36.571zM587.429 349.714l-389.714-389.714c-13.143-13.143-32-21.143-51.429-21.143s-38.286 8-52 21.143l-60.571 61.714c-13.714 13.143-21.714 32-21.714 51.429s8 38.286 21.714 52l389.143 389.143c29.714-74.857 89.714-134.857 164.571-164.571zM949.714 598.286c0-18.857-6.857-42.286-13.143-60.571-36-101.714-133.714-172-241.714-172-141.143 0-256 114.857-256 256s114.857 256 256 256c41.714 0 96-12.571 130.857-36 5.714-4 9.143-9.143 9.143-16 0-6.286-4-12.571-9.143-16l-167.429-96.571v-128l110.286-61.143c18.857 10.857 151.429 94.286 162.857 94.286s18.286-8.571 18.286-20z" />
|
18 |
-
<glyph unicode="" glyph-name="rotate-left, undo" horiz-adv-x="878" d="M877.714 438.857c0-241.714-197.143-438.857-438.857-438.857-130.857 0-254.286 57.714-337.714 158.286-5.714 7.429-5.143 18.286 1.143 24.571l78.286 78.857c4 3.429 9.143 5.143 14.286 5.143 5.143-0.571 10.286-2.857 13.143-6.857 56-72.571 140-113.714 230.857-113.714 161.143 0 292.571 131.429 292.571 292.571s-131.429 292.571-292.571 292.571c-74.857 0-145.714-28.571-198.857-78.286l78.286-78.857c10.857-10.286 13.714-26.286 8-39.429-5.714-13.714-18.857-22.857-33.714-22.857h-256c-20 0-36.571 16.571-36.571 36.571v256c0 14.857 9.143 28 22.857 33.714 13.143 5.714 29.143 2.857 39.429-8l74.286-73.714c80.571 76 189.714 121.143 302.286 121.143 241.714 0 438.857-197.143 438.857-438.857z" />
|
19 |
-
</font></defs></svg>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/icons/siteorigin-panels.ttf
DELETED
Binary file
|
css/icons/siteorigin-panels.woff
DELETED
Binary file
|
inc/admin-actions.php
DELETED
@@ -1,267 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
define('SITEORIGIN_PANELS_LAYOUT_URL', 'http://layouts.siteorigin.com/');
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Get builder content based on the submitted panels_data.
|
7 |
-
*/
|
8 |
-
function siteorigin_panels_ajax_builder_content(){
|
9 |
-
header('content-type: text/html');
|
10 |
-
|
11 |
-
if( !current_user_can('edit_post', $_POST['post_id'] ) ) wp_die();
|
12 |
-
|
13 |
-
if( empty( $_POST['post_id'] ) || empty( $_POST['panels_data'] ) ) {
|
14 |
-
echo '';
|
15 |
-
wp_die();
|
16 |
-
}
|
17 |
-
|
18 |
-
// echo the content
|
19 |
-
$panels_data = json_decode( wp_unslash( $_POST['panels_data'] ), true);
|
20 |
-
$panels_data['widgets'] = siteorigin_panels_process_raw_widgets($panels_data['widgets']);
|
21 |
-
$panels_data = siteorigin_panels_styles_sanitize_all( $panels_data );
|
22 |
-
echo siteorigin_panels_render( intval($_POST['post_id']), false, $panels_data );
|
23 |
-
|
24 |
-
wp_die();
|
25 |
-
}
|
26 |
-
add_action('wp_ajax_so_panels_builder_content', 'siteorigin_panels_ajax_builder_content');
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Display a widget form with the provided data
|
30 |
-
*/
|
31 |
-
function siteorigin_panels_ajax_widget_form(){
|
32 |
-
if( empty( $_REQUEST['widget'] ) ) wp_die();
|
33 |
-
if( empty( $_REQUEST['_panelsnonce'] ) || !wp_verify_nonce($_REQUEST['_panelsnonce'], 'panels_action') ) wp_die();
|
34 |
-
|
35 |
-
$request = array_map('stripslashes_deep', $_REQUEST);
|
36 |
-
|
37 |
-
$widget = $request['widget'];
|
38 |
-
$instance = !empty($request['instance']) ? json_decode( $request['instance'], true ) : array();
|
39 |
-
|
40 |
-
$form = siteorigin_panels_render_form( $widget, $instance, $_REQUEST['raw'] == 'true' );
|
41 |
-
$form = apply_filters('siteorigin_panels_ajax_widget_form', $form, $widget, $instance);
|
42 |
-
|
43 |
-
echo $form;
|
44 |
-
wp_die();
|
45 |
-
}
|
46 |
-
add_action('wp_ajax_so_panels_widget_form', 'siteorigin_panels_ajax_widget_form');
|
47 |
-
|
48 |
-
|
49 |
-
function siteorigin_panels_ajax_get_prebuilt_layouts(){
|
50 |
-
if( empty( $_REQUEST['_panelsnonce'] ) || !wp_verify_nonce($_REQUEST['_panelsnonce'], 'panels_action') ) wp_die();
|
51 |
-
|
52 |
-
// Get any layouts that the current user could edit.
|
53 |
-
header('content-type: application/json');
|
54 |
-
|
55 |
-
$type = !empty( $_REQUEST['type'] ) ? $_REQUEST['type'] : 'directory';
|
56 |
-
$search = !empty($_REQUEST['search']) ? trim( strtolower( $_REQUEST['search'] ) ) : '';
|
57 |
-
$page = !empty( $_REQUEST['page'] ) ? intval( $_REQUEST['page'] ) : 1;
|
58 |
-
|
59 |
-
$return = array(
|
60 |
-
'title' => '',
|
61 |
-
'items' => array()
|
62 |
-
);
|
63 |
-
if( $type == 'prebuilt' ) {
|
64 |
-
$return['title'] = __( 'Theme Defined Layouts', 'siteorigin-panels' );
|
65 |
-
|
66 |
-
// This is for theme bundled prebuilt directories
|
67 |
-
$layouts = apply_filters( 'siteorigin_panels_prebuilt_layouts', array() );
|
68 |
-
|
69 |
-
foreach($layouts as $id => $vals) {
|
70 |
-
if( !empty($search) && strpos( strtolower($vals['name']), $search ) === false ) {
|
71 |
-
continue;
|
72 |
-
}
|
73 |
-
|
74 |
-
$return['items'][] = array(
|
75 |
-
'title' => $vals['name'],
|
76 |
-
'id' => $id,
|
77 |
-
'type' => 'prebuilt',
|
78 |
-
'description' => isset($vals['description']) ? $vals['description'] : '',
|
79 |
-
'screenshot' => !empty($vals['screenshot']) ? $vals['screenshot'] : ''
|
80 |
-
);
|
81 |
-
}
|
82 |
-
|
83 |
-
$return['max_num_pages'] = 1;
|
84 |
-
}
|
85 |
-
elseif( $type == 'directory' ) {
|
86 |
-
$return['title'] = __( 'Layouts Directory', 'siteorigin-panels' );
|
87 |
-
|
88 |
-
// This is a query of the prebuilt layout directory
|
89 |
-
$query = array();
|
90 |
-
if( !empty($search) ) $query['search'] = $search;
|
91 |
-
$query['page'] = $page;
|
92 |
-
|
93 |
-
$url = add_query_arg( $query, SITEORIGIN_PANELS_LAYOUT_URL . 'wp-admin/admin-ajax.php?action=query_layouts');
|
94 |
-
$response = wp_remote_get( $url );
|
95 |
-
|
96 |
-
if( is_array($response) && $response['response']['code'] == 200 ) {
|
97 |
-
$results = json_decode( $response['body'], true );
|
98 |
-
if ( !empty( $results ) && !empty($results['items']) ) {
|
99 |
-
foreach( $results['items'] as $item ) {
|
100 |
-
$item['id'] = $item['slug'];
|
101 |
-
$item['screenshot'] = 'http://s.wordpress.com/mshots/v1/' . urlencode( $item['preview'] ) . '?w=400';
|
102 |
-
$item['type'] = 'directory';
|
103 |
-
$return['items'][] = $item;
|
104 |
-
}
|
105 |
-
}
|
106 |
-
|
107 |
-
$return['max_num_pages'] = $results['max_num_pages'];
|
108 |
-
}
|
109 |
-
}
|
110 |
-
elseif ( strpos( $type, 'clone_' ) !== false ) {
|
111 |
-
// Check that the user can view the given page types
|
112 |
-
$post_type = str_replace('clone_', '', $type );
|
113 |
-
|
114 |
-
$return['title'] = sprintf( __( 'Clone %s', 'siteorigin-panels' ), esc_html( ucfirst( $post_type ) ) );
|
115 |
-
|
116 |
-
global $wpdb;
|
117 |
-
$user_can_read_private = ( $post_type == 'post' && current_user_can( 'read_private_posts' ) || ( $post_type == 'page' && current_user_can( 'read_private_pages' ) ));
|
118 |
-
$include_private = $user_can_read_private ? "OR posts.post_status = 'private' " : "";
|
119 |
-
|
120 |
-
// Select only the posts with the given post type that also have panels_data
|
121 |
-
$results = $wpdb->get_results( "
|
122 |
-
SELECT SQL_CALC_FOUND_ROWS DISTINCT ID, post_title, meta.meta_value
|
123 |
-
FROM {$wpdb->posts} AS posts
|
124 |
-
JOIN {$wpdb->postmeta} AS meta ON posts.ID = meta.post_id
|
125 |
-
WHERE
|
126 |
-
posts.post_type = '" . esc_sql( $post_type ) . "'
|
127 |
-
AND meta.meta_key = 'panels_data'
|
128 |
-
" . ( !empty($search) ? 'AND posts.post_title LIKE "%' . esc_sql( $search ) . '%"' : '' ) . "
|
129 |
-
AND ( posts.post_status = 'publish' OR posts.post_status = 'draft' " . $include_private . ")
|
130 |
-
ORDER BY post_date DESC
|
131 |
-
LIMIT 16 OFFSET " . intval( ( $page - 1 ) * 16 ) );
|
132 |
-
$total_posts = $wpdb->get_var( "SELECT FOUND_ROWS();" );
|
133 |
-
|
134 |
-
foreach( $results as $result ) {
|
135 |
-
$thumbnail = get_the_post_thumbnail_url( $result->ID, array( 400,300 ) );
|
136 |
-
$return['items'][] = array(
|
137 |
-
'id' => $result->ID,
|
138 |
-
'title' => $result->post_title,
|
139 |
-
'type' => $type,
|
140 |
-
'screenshot' => !empty($thumbnail) ? $thumbnail : ''
|
141 |
-
);
|
142 |
-
}
|
143 |
-
|
144 |
-
$return['max_num_pages'] = ceil( $total_posts / 16 );
|
145 |
-
|
146 |
-
}
|
147 |
-
else {
|
148 |
-
// An invalid type. Display an error message.
|
149 |
-
}
|
150 |
-
|
151 |
-
// Add the search part to the title
|
152 |
-
if( !empty($search) ) {
|
153 |
-
$return['title'] .= __(' - Results For:', 'siteorigin-panels') . ' <em>' . esc_html( $search ) . '</em>';
|
154 |
-
}
|
155 |
-
|
156 |
-
echo json_encode( $return );
|
157 |
-
|
158 |
-
wp_die();
|
159 |
-
}
|
160 |
-
add_action('wp_ajax_so_panels_layouts_query', 'siteorigin_panels_ajax_get_prebuilt_layouts');
|
161 |
-
|
162 |
-
/**
|
163 |
-
* Ajax handler to get an individual prebuilt layout
|
164 |
-
*/
|
165 |
-
function siteorigin_panels_ajax_get_prebuilt_layout(){
|
166 |
-
if( empty( $_REQUEST['type'] ) ) wp_die();
|
167 |
-
if( empty( $_REQUEST['lid'] ) ) wp_die();
|
168 |
-
if( empty( $_REQUEST['_panelsnonce'] ) || !wp_verify_nonce($_REQUEST['_panelsnonce'], 'panels_action') ) wp_die();
|
169 |
-
|
170 |
-
header('content-type: application/json');
|
171 |
-
|
172 |
-
if( $_REQUEST['type'] == 'prebuilt' ) {
|
173 |
-
$layouts = apply_filters( 'siteorigin_panels_prebuilt_layouts', array() );
|
174 |
-
if( empty( $layouts[ $_REQUEST['lid'] ] ) ) {
|
175 |
-
// Display an error message
|
176 |
-
wp_die();
|
177 |
-
}
|
178 |
-
|
179 |
-
$layout = $layouts[ $_REQUEST['lid'] ];
|
180 |
-
if( isset($layout['name']) ) unset($layout['name']);
|
181 |
-
|
182 |
-
$layout = apply_filters('siteorigin_panels_prebuilt_layout', $layout);
|
183 |
-
$layout = apply_filters('siteorigin_panels_data', $layout);
|
184 |
-
|
185 |
-
echo json_encode( $layout );
|
186 |
-
wp_die();
|
187 |
-
}
|
188 |
-
if( $_REQUEST['type'] == 'directory' ) {
|
189 |
-
$response = wp_remote_get(
|
190 |
-
SITEORIGIN_PANELS_LAYOUT_URL . 'layout/' . urlencode($_REQUEST['lid']) . '/?action=download'
|
191 |
-
);
|
192 |
-
|
193 |
-
// var_dump($response['body']);
|
194 |
-
if( $response['response']['code'] == 200 ) {
|
195 |
-
// For now, we'll just pretend to load this
|
196 |
-
echo $response['body'];
|
197 |
-
wp_die();
|
198 |
-
}
|
199 |
-
else {
|
200 |
-
// Display some sort of error message
|
201 |
-
}
|
202 |
-
}
|
203 |
-
elseif( current_user_can('edit_post', $_REQUEST['lid']) ) {
|
204 |
-
$panels_data = get_post_meta( $_REQUEST['lid'], 'panels_data', true );
|
205 |
-
$panels_data = apply_filters('siteorigin_panels_data', $panels_data);
|
206 |
-
echo json_encode( $panels_data );
|
207 |
-
wp_die();
|
208 |
-
}
|
209 |
-
}
|
210 |
-
add_action('wp_ajax_so_panels_get_layout', 'siteorigin_panels_ajax_get_prebuilt_layout');
|
211 |
-
|
212 |
-
/**
|
213 |
-
* Ajax handler to import a layout
|
214 |
-
*/
|
215 |
-
function siteorigin_panels_ajax_import_layout(){
|
216 |
-
if( empty( $_REQUEST['_panelsnonce'] ) || !wp_verify_nonce($_REQUEST['_panelsnonce'], 'panels_action') ) wp_die();
|
217 |
-
|
218 |
-
if( !empty($_FILES['panels_import_data']['tmp_name']) ) {
|
219 |
-
header('content-type:application/json');
|
220 |
-
$json = file_get_contents( $_FILES['panels_import_data']['tmp_name'] );
|
221 |
-
@unlink( $_FILES['panels_import_data']['tmp_name'] );
|
222 |
-
echo $json;
|
223 |
-
}
|
224 |
-
wp_die();
|
225 |
-
}
|
226 |
-
add_action('wp_ajax_so_panels_import_layout', 'siteorigin_panels_ajax_import_layout');
|
227 |
-
|
228 |
-
/**
|
229 |
-
* Ajax handler to export a layout
|
230 |
-
*/
|
231 |
-
function siteorigin_panels_ajax_export_layout(){
|
232 |
-
if( empty( $_REQUEST['_panelsnonce'] ) || !wp_verify_nonce($_REQUEST['_panelsnonce'], 'panels_action') ) wp_die();
|
233 |
-
|
234 |
-
header('content-type: application/json');
|
235 |
-
header('Content-Disposition: attachment; filename=layout-' . date('dmY') . '.json');
|
236 |
-
|
237 |
-
$export_data = wp_unslash( $_POST['panels_export_data'] );
|
238 |
-
echo $export_data;
|
239 |
-
|
240 |
-
wp_die();
|
241 |
-
}
|
242 |
-
add_action('wp_ajax_so_panels_export_layout', 'siteorigin_panels_ajax_export_layout');
|
243 |
-
|
244 |
-
/**
|
245 |
-
* We want users to be informed of what the layout directory is, so they need to enable it.
|
246 |
-
*/
|
247 |
-
function siteorigin_panels_ajax_directory_enable(){
|
248 |
-
if( empty( $_REQUEST['_panelsnonce'] ) || !wp_verify_nonce($_REQUEST['_panelsnonce'], 'panels_action') ) wp_die();
|
249 |
-
|
250 |
-
$user = get_current_user_id();
|
251 |
-
update_user_meta( $user, 'so_panels_directory_enabled', true );
|
252 |
-
|
253 |
-
wp_die();
|
254 |
-
}
|
255 |
-
add_action('wp_ajax_so_panels_directory_enable', 'siteorigin_panels_ajax_directory_enable');
|
256 |
-
|
257 |
-
/**
|
258 |
-
* Preview in the live editor when there is no public view of the item
|
259 |
-
*/
|
260 |
-
function siteorigin_panels_live_editor_preview(){
|
261 |
-
if( empty( $_REQUEST['_panelsnonce'] ) || !wp_verify_nonce($_REQUEST['_panelsnonce'], 'live-editor-preview') ) wp_die();
|
262 |
-
|
263 |
-
include plugin_dir_path( __FILE__ ) . '../tpl/live-editor-preview.php';
|
264 |
-
|
265 |
-
exit();
|
266 |
-
}
|
267 |
-
add_action('wp_ajax_so_panels_live_editor_preview', 'siteorigin_panels_live_editor_preview');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/admin-layouts.php
CHANGED
@@ -134,8 +134,7 @@ class SiteOrigin_Panels_Admin_Layouts {
|
|
134 |
$item['type'] = $type;
|
135 |
|
136 |
if( empty( $item['screenshot'] ) && ! empty( $item['preview'] ) ) {
|
137 |
-
$
|
138 |
-
$item['screenshot'] = 'http://s.wordpress.com/mshots/v1/' . urlencode( $screenshot_url ) . '?w=700';
|
139 |
}
|
140 |
|
141 |
$return['items'][] = $item;
|
@@ -310,4 +309,16 @@ class SiteOrigin_Panels_Admin_Layouts {
|
|
310 |
|
311 |
wp_die();
|
312 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
}
|
134 |
$item['type'] = $type;
|
135 |
|
136 |
if( empty( $item['screenshot'] ) && ! empty( $item['preview'] ) ) {
|
137 |
+
$item['screenshot'] = 'https://s.wordpress.com/mshots/v1/' . urlencode( $item[ 'preview' ] ) . '?w=700';
|
|
|
138 |
}
|
139 |
|
140 |
$return['items'][] = $item;
|
309 |
|
310 |
wp_die();
|
311 |
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Enable the directory.
|
315 |
+
*/
|
316 |
+
function action_directory_enable() {
|
317 |
+
if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'panels_action' ) ) {
|
318 |
+
wp_die();
|
319 |
+
}
|
320 |
+
$user = get_current_user_id();
|
321 |
+
update_user_meta( $user, 'so_panels_directory_enabled', true );
|
322 |
+
wp_die();
|
323 |
+
}
|
324 |
}
|
inc/admin.php
CHANGED
@@ -173,7 +173,8 @@ class SiteOrigin_Panels_Admin {
|
|
173 |
|
174 |
$panels_data['widgets'] = $this->process_raw_widgets(
|
175 |
$panels_data['widgets'],
|
176 |
-
! empty( $old_panels_data['widgets'] ) ? $old_panels_data['widgets'] : false
|
|
|
177 |
);
|
178 |
$panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
|
179 |
$panels_data = apply_filters( 'siteorigin_panels_data_pre_save', $panels_data, $post, $post_id );
|
@@ -555,7 +556,8 @@ class SiteOrigin_Panels_Admin {
|
|
555 |
$panels_data = json_decode( wp_unslash( $_POST['panels_data'] ), true );
|
556 |
$panels_data['widgets'] = $this->process_raw_widgets(
|
557 |
$panels_data['widgets'],
|
558 |
-
! empty( $old_panels_data['widgets'] ) ? $old_panels_data['widgets'] : false
|
|
|
559 |
);
|
560 |
$panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
|
561 |
$panels_data = apply_filters( 'siteorigin_panels_data_pre_save', $panels_data, $page, $page_id );
|
@@ -668,16 +670,18 @@ class SiteOrigin_Panels_Admin {
|
|
668 |
|
669 |
return $a['title'] > $b['title'] ? 1 : - 1;
|
670 |
}
|
671 |
-
|
672 |
/**
|
673 |
* Process raw widgets that have come from the Page Builder front end.
|
674 |
*
|
675 |
* @param array $widgets An array of widgets from panels_data.
|
676 |
-
* @param
|
|
|
|
|
677 |
*
|
678 |
* @return array
|
679 |
*/
|
680 |
-
function process_raw_widgets( $widgets, $old_widgets = array(), $escape_classes =
|
681 |
if ( empty( $widgets ) || ! is_array( $widgets ) ) {
|
682 |
return array();
|
683 |
}
|
@@ -705,6 +709,8 @@ class SiteOrigin_Panels_Admin {
|
|
705 |
$info = array();
|
706 |
}
|
707 |
unset( $widget['info'] );
|
|
|
|
|
708 |
|
709 |
if ( ! empty( $info['raw'] ) || $force ) {
|
710 |
if ( isset( $wp_widget_factory->widgets[ $info['class'] ] ) && method_exists( $info['class'], 'update' ) ) {
|
@@ -732,7 +738,7 @@ class SiteOrigin_Panels_Admin {
|
|
732 |
|
733 |
if( $escape_classes ) {
|
734 |
// Escaping for namespaced widgets
|
735 |
-
$info['class'] = preg_replace( '
|
736 |
}
|
737 |
$widget['panels_info'] = $info;
|
738 |
}
|
@@ -839,34 +845,6 @@ class SiteOrigin_Panels_Admin {
|
|
839 |
return $form;
|
840 |
}
|
841 |
|
842 |
-
/**
|
843 |
-
* Should we display premium teasers.
|
844 |
-
*
|
845 |
-
* @return bool
|
846 |
-
*/
|
847 |
-
public static function display_teaser() {
|
848 |
-
return
|
849 |
-
siteorigin_panels_setting( 'display-teaser' ) &&
|
850 |
-
apply_filters( 'siteorigin_premium_upgrade_teaser', true ) &&
|
851 |
-
! defined( 'SITEORIGIN_PREMIUM_VERSION' );
|
852 |
-
}
|
853 |
-
|
854 |
-
/**
|
855 |
-
* @return string
|
856 |
-
*/
|
857 |
-
public static function premium_url(){
|
858 |
-
$ref = apply_filters( 'siteorigin_premium_affiliate_id', '' );
|
859 |
-
$url = 'https://siteorigin.com/downloads/premium/?featured_plugin=siteorigin-panels';
|
860 |
-
|
861 |
-
if( $ref ) {
|
862 |
-
$url = add_query_arg( 'ref', urlencode( $ref ), $url );
|
863 |
-
}
|
864 |
-
|
865 |
-
return $url;
|
866 |
-
}
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
871 |
// ADMIN AJAX ACTIONS
|
872 |
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
@@ -891,7 +869,8 @@ class SiteOrigin_Panels_Admin {
|
|
891 |
$panels_data = json_decode( wp_unslash( $_POST['panels_data'] ), true );
|
892 |
$panels_data['widgets'] = $this->process_raw_widgets(
|
893 |
$panels_data['widgets'],
|
894 |
-
! empty( $old_panels_data['widgets'] ) ? $old_panels_data['widgets'] : false
|
|
|
895 |
);
|
896 |
$panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
|
897 |
|
@@ -918,11 +897,12 @@ class SiteOrigin_Panels_Admin {
|
|
918 |
|
919 |
$request = array_map( 'stripslashes_deep', $_REQUEST );
|
920 |
|
921 |
-
$
|
|
|
922 |
$instance = ! empty( $request['instance'] ) ? json_decode( $request['instance'], true ) : array();
|
923 |
|
924 |
-
$form = $this->render_form( $
|
925 |
-
$form = apply_filters( 'siteorigin_panels_ajax_widget_form', $form, $
|
926 |
|
927 |
echo $form;
|
928 |
wp_die();
|
@@ -941,18 +921,6 @@ class SiteOrigin_Panels_Admin {
|
|
941 |
exit();
|
942 |
}
|
943 |
|
944 |
-
/**
|
945 |
-
* Enable the directory.
|
946 |
-
*/
|
947 |
-
function action_directory_enable() {
|
948 |
-
if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'panels_action' ) ) {
|
949 |
-
wp_die();
|
950 |
-
}
|
951 |
-
$user = get_current_user_id();
|
952 |
-
update_user_meta( $user, 'so_panels_directory_enabled', true );
|
953 |
-
wp_die();
|
954 |
-
}
|
955 |
-
|
956 |
/**
|
957 |
* Add a column that indicates if a column is powered by Page Builder
|
958 |
*
|
173 |
|
174 |
$panels_data['widgets'] = $this->process_raw_widgets(
|
175 |
$panels_data['widgets'],
|
176 |
+
! empty( $old_panels_data['widgets'] ) ? $old_panels_data['widgets'] : false,
|
177 |
+
false
|
178 |
);
|
179 |
$panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
|
180 |
$panels_data = apply_filters( 'siteorigin_panels_data_pre_save', $panels_data, $post, $post_id );
|
556 |
$panels_data = json_decode( wp_unslash( $_POST['panels_data'] ), true );
|
557 |
$panels_data['widgets'] = $this->process_raw_widgets(
|
558 |
$panels_data['widgets'],
|
559 |
+
! empty( $old_panels_data['widgets'] ) ? $old_panels_data['widgets'] : false,
|
560 |
+
false
|
561 |
);
|
562 |
$panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
|
563 |
$panels_data = apply_filters( 'siteorigin_panels_data_pre_save', $panels_data, $page, $page_id );
|
670 |
|
671 |
return $a['title'] > $b['title'] ? 1 : - 1;
|
672 |
}
|
673 |
+
|
674 |
/**
|
675 |
* Process raw widgets that have come from the Page Builder front end.
|
676 |
*
|
677 |
* @param array $widgets An array of widgets from panels_data.
|
678 |
+
* @param array $old_widgets
|
679 |
+
* @param bool $escape_classes Should the class names be escaped.
|
680 |
+
* @param bool $force
|
681 |
*
|
682 |
* @return array
|
683 |
*/
|
684 |
+
function process_raw_widgets( $widgets, $old_widgets = array(), $escape_classes = false, $force = false ) {
|
685 |
if ( empty( $widgets ) || ! is_array( $widgets ) ) {
|
686 |
return array();
|
687 |
}
|
709 |
$info = array();
|
710 |
}
|
711 |
unset( $widget['info'] );
|
712 |
+
|
713 |
+
$info[ 'class' ] = apply_filters( 'siteorigin_panels_widget_class', $info[ 'class' ] );
|
714 |
|
715 |
if ( ! empty( $info['raw'] ) || $force ) {
|
716 |
if ( isset( $wp_widget_factory->widgets[ $info['class'] ] ) && method_exists( $info['class'], 'update' ) ) {
|
738 |
|
739 |
if( $escape_classes ) {
|
740 |
// Escaping for namespaced widgets
|
741 |
+
$info[ 'class' ] = preg_replace( '/\\\\+/', '\\\\\\\\', $info['class'] );
|
742 |
}
|
743 |
$widget['panels_info'] = $info;
|
744 |
}
|
845 |
return $form;
|
846 |
}
|
847 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
848 |
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
849 |
// ADMIN AJAX ACTIONS
|
850 |
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
869 |
$panels_data = json_decode( wp_unslash( $_POST['panels_data'] ), true );
|
870 |
$panels_data['widgets'] = $this->process_raw_widgets(
|
871 |
$panels_data['widgets'],
|
872 |
+
! empty( $old_panels_data['widgets'] ) ? $old_panels_data['widgets'] : false,
|
873 |
+
false
|
874 |
);
|
875 |
$panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
|
876 |
|
897 |
|
898 |
$request = array_map( 'stripslashes_deep', $_REQUEST );
|
899 |
|
900 |
+
$widget_class = $request['widget'];
|
901 |
+
$widget_class = apply_filters( 'siteorigin_panels_widget_class', $widget_class );
|
902 |
$instance = ! empty( $request['instance'] ) ? json_decode( $request['instance'], true ) : array();
|
903 |
|
904 |
+
$form = $this->render_form( $widget_class, $instance, $_REQUEST['raw'] == 'true' );
|
905 |
+
$form = apply_filters( 'siteorigin_panels_ajax_widget_form', $form, $widget_class, $instance );
|
906 |
|
907 |
echo $form;
|
908 |
wp_die();
|
921 |
exit();
|
922 |
}
|
923 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
924 |
/**
|
925 |
* Add a column that indicates if a column is powered by Page Builder
|
926 |
*
|
inc/css.php
DELETED
@@ -1,186 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Class SiteOrigin_Panels_Css_Builder
|
6 |
-
*
|
7 |
-
* Use for building CSS for a page.
|
8 |
-
*/
|
9 |
-
class SiteOrigin_Panels_Css_Builder {
|
10 |
-
|
11 |
-
private $css;
|
12 |
-
|
13 |
-
function __construct() {
|
14 |
-
$this->css = array();
|
15 |
-
}
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Add some general CSS.
|
19 |
-
*
|
20 |
-
* @param string $selector
|
21 |
-
* @param array $attributes
|
22 |
-
* @param int $resolution The pixel resolution that this applies to
|
23 |
-
*/
|
24 |
-
public function add_css($selector, $attributes, $resolution = 1920) {
|
25 |
-
$attribute_string = array();
|
26 |
-
foreach( $attributes as $k => $v ) {
|
27 |
-
if( empty( $v ) ) continue;
|
28 |
-
$attribute_string[] = $k.':'.$v;
|
29 |
-
}
|
30 |
-
$attribute_string = implode(';', $attribute_string);
|
31 |
-
|
32 |
-
// Add everything we need to the CSS selector
|
33 |
-
if( empty( $this->css[$resolution] ) ) $this->css[$resolution] = array();
|
34 |
-
if( empty( $this->css[$resolution][$attribute_string] ) ) $this->css[$resolution][$attribute_string] = array();
|
35 |
-
$this->css[$resolution][$attribute_string][] = $selector;
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Add CSS that applies to a row or group of rows.
|
40 |
-
*
|
41 |
-
* @param int $li The layout ID. If false, then the CSS applies to all layouts.
|
42 |
-
* @param int|bool|string $ri The row index. If false, then the CSS applies to all rows.
|
43 |
-
* @param string $sub_selector A sub selector if we need one.
|
44 |
-
* @param array $attributes An array of attributes.
|
45 |
-
* @param int $resolution The pixel resolution that this applies to
|
46 |
-
* @param bool $specify_layout Sometimes for CSS specificity, we need to include the layout ID.
|
47 |
-
*/
|
48 |
-
public function add_row_css($li, $ri = false, $sub_selector = '', $attributes = array(), $resolution = 1920, $specify_layout = false) {
|
49 |
-
$selector = array();
|
50 |
-
|
51 |
-
if( $ri === false ) {
|
52 |
-
// This applies to all rows
|
53 |
-
$selector[] = '#pl-'.$li;
|
54 |
-
$selector[] = '.panel-grid';
|
55 |
-
}
|
56 |
-
else {
|
57 |
-
// This applies to a specific row
|
58 |
-
if( $specify_layout ) $selector[] = '#pl-'.$li;
|
59 |
-
if( is_string($ri) ) {
|
60 |
-
$selector[] = '#' . $ri;
|
61 |
-
}
|
62 |
-
else {
|
63 |
-
$selector[] = '#pg-'.$li.'-'.$ri;
|
64 |
-
}
|
65 |
-
|
66 |
-
}
|
67 |
-
|
68 |
-
// Add in the sub selector
|
69 |
-
if( !empty($sub_selector) ) $selector[] = $sub_selector;
|
70 |
-
|
71 |
-
// Add this to the CSS array
|
72 |
-
$this->add_css( implode(' ', $selector), $attributes, $resolution );
|
73 |
-
}
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Add cell specific CSS
|
77 |
-
*
|
78 |
-
* @param int $li The layout ID. If false, then the CSS applies to all layouts.
|
79 |
-
* @param int|bool $ri The row index. If false, then the CSS applies to all rows.
|
80 |
-
* @param int|bool $ci The cell index. If false, then the CSS applies to all rows.
|
81 |
-
* @param string $sub_selector A sub selector if we need one.
|
82 |
-
* @param array $attributes An array of attributes.
|
83 |
-
* @param int $resolution The pixel resolution that this applies to
|
84 |
-
* @param bool $specify_layout Sometimes for CSS specificity, we need to include the layout ID.
|
85 |
-
*/
|
86 |
-
public function add_cell_css( $li, $ri = false, $ci = false, $sub_selector = '', $attributes = array(), $resolution = 1920, $specify_layout = false) {
|
87 |
-
$selector = array();
|
88 |
-
|
89 |
-
if( $ri === false && $ci === false ) {
|
90 |
-
// This applies to all cells in the layout
|
91 |
-
$selector[] = '#pl-'.$li;
|
92 |
-
$selector[] = '.panel-grid-cell';
|
93 |
-
}
|
94 |
-
elseif( $ri !== false && $ci === false ) {
|
95 |
-
// This applies to all cells in a row
|
96 |
-
if( $specify_layout ) $selector[] = '#pl-'.$li;
|
97 |
-
$selector[] = is_string( $ri ) ? ( '#' . $ri ) : '#pg-'.$li.'-'.$ri;
|
98 |
-
$selector[] = '.panel-grid-cell';
|
99 |
-
}
|
100 |
-
elseif( $ri !== false && $ci !== false ) {
|
101 |
-
// This applies to a specific cell
|
102 |
-
if( $specify_layout ) $selector[] = '#pl-'.$li;
|
103 |
-
$selector[] = '#pgc-' . $li . '-' . $ri . '-' . $ci;
|
104 |
-
}
|
105 |
-
|
106 |
-
// Add in the sub selector
|
107 |
-
if( !empty($sub_selector) ) {
|
108 |
-
$selector[] = $sub_selector;
|
109 |
-
}
|
110 |
-
|
111 |
-
// Add this to the CSS array
|
112 |
-
$this->add_css( implode(' ', $selector), $attributes, $resolution );
|
113 |
-
}
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Add widget specific CSS
|
117 |
-
*
|
118 |
-
* @param int $li The layout ID. If false, then the CSS applies to all layouts.
|
119 |
-
* @param int|bool $ri The row index. If false, then the CSS applies to all rows.
|
120 |
-
* @param int|bool $ci The cell index. If false, then the CSS applies to all rows.
|
121 |
-
* @param int|bool $wi The widget index. If false, then CSS applies to all widgets.
|
122 |
-
* @param string $sub_selector A sub selector if we need one.
|
123 |
-
* @param array $attributes An array of attributes.
|
124 |
-
* @param int $resolution The pixel resolution that this applies to
|
125 |
-
* @param bool $specify_layout Sometimes for CSS specificity, we need to include the layout ID.
|
126 |
-
*/
|
127 |
-
public function add_widget_css( $li, $ri = false, $ci = false, $wi = false, $sub_selector, $attributes = array(), $resolution = 1920, $specify_layout = false ) {
|
128 |
-
$selector = array();
|
129 |
-
|
130 |
-
if( $ri === false && $ci === false && $wi === false ) {
|
131 |
-
// This applies to all widgets in the layout
|
132 |
-
$selector[] = '#pl-'.$li;
|
133 |
-
$selector[] = '.so-panel';
|
134 |
-
}
|
135 |
-
else if( $ri !== false && $ci === false && $wi === false ) {
|
136 |
-
// This applies to all widgets in a row
|
137 |
-
if( $specify_layout ) $selector[] = '#pl-'.$li;
|
138 |
-
$selector[] = is_string( $ri ) ? ( '#' . $ri ) : '#pg-'.$li.'-'.$ri;
|
139 |
-
$selector[] = '.so-panel';
|
140 |
-
}
|
141 |
-
else if( $ri !== false && $ci !== false && $wi === false ) {
|
142 |
-
if( $specify_layout ) $selector[] = '#pl-'.$li;
|
143 |
-
$selector[] = '#pgc-' . $li . '-' . $ri . '-' . $ci;
|
144 |
-
$selector[] = '.so-panel';
|
145 |
-
}
|
146 |
-
else {
|
147 |
-
// This applies to a specific widget
|
148 |
-
if( $specify_layout ) $selector[] = '#pl-'.$li;
|
149 |
-
$selector[] = '#panel-' . $li . '-' . $ri . '-' . $ci . '-' . $wi;
|
150 |
-
}
|
151 |
-
|
152 |
-
// Add in the sub selector
|
153 |
-
if( !empty($sub_selector) ) {
|
154 |
-
$selector[] = $sub_selector;
|
155 |
-
}
|
156 |
-
|
157 |
-
// Add this to the CSS array
|
158 |
-
$this->add_css( implode(' ', $selector), $attributes, $resolution );
|
159 |
-
}
|
160 |
-
|
161 |
-
/**
|
162 |
-
* Gets the CSS for this particular layout.
|
163 |
-
*/
|
164 |
-
public function get_css(){
|
165 |
-
// Build actual CSS from the array
|
166 |
-
$css_text = '';
|
167 |
-
krsort( $this->css );
|
168 |
-
foreach ( $this->css as $res => $def ) {
|
169 |
-
if ( empty( $def ) ) continue;
|
170 |
-
|
171 |
-
if ( $res < 1920 ) {
|
172 |
-
$css_text .= '@media (max-width:' . $res . 'px)';
|
173 |
-
$css_text .= '{ ';
|
174 |
-
}
|
175 |
-
|
176 |
-
foreach ( $def as $property => $selector ) {
|
177 |
-
$selector = array_unique( $selector );
|
178 |
-
$css_text .= implode( ' , ', $selector ) . ' { ' . $property . ' } ';
|
179 |
-
}
|
180 |
-
|
181 |
-
if ( $res < 1920 ) $css_text .= ' } ';
|
182 |
-
}
|
183 |
-
|
184 |
-
return $css_text;
|
185 |
-
}
|
186 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/debug.php
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* If we're in debug mode, display the panels data.
|
5 |
-
*/
|
6 |
-
function siteorigin_panels_dump(){
|
7 |
-
echo "<!--\n\n";
|
8 |
-
echo "// Page Builder Data\n\n";
|
9 |
-
|
10 |
-
if(isset($_GET['page']) && $_GET['page'] == 'so_panels_home_page') {
|
11 |
-
var_export( get_option( 'siteorigin_panels_home_page', null ) );
|
12 |
-
}
|
13 |
-
else{
|
14 |
-
global $post;
|
15 |
-
var_export( get_post_meta($post->ID, 'panels_data', true));
|
16 |
-
}
|
17 |
-
echo "\n\n-->";
|
18 |
-
}
|
19 |
-
add_action('siteorigin_panels_metabox_end', 'siteorigin_panels_dump');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/default-styles.php
DELETED
@@ -1,507 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Register the custom styles scripts
|
5 |
-
*/
|
6 |
-
function siteorigin_panels_default_styles_register_scripts(){
|
7 |
-
wp_register_script( 'siteorigin-panels-front-styles', plugin_dir_url(SITEORIGIN_PANELS_BASE_FILE) . 'js/styling' . SITEORIGIN_PANELS_VERSION_SUFFIX . SITEORIGIN_PANELS_JS_SUFFIX . '.js', array('jquery'), SITEORIGIN_PANELS_VERSION );
|
8 |
-
wp_register_script( 'siteorigin-parallax', plugin_dir_url(SITEORIGIN_PANELS_BASE_FILE) . 'js/siteorigin-parallax' . SITEORIGIN_PANELS_JS_SUFFIX . '.js', array('jquery'), SITEORIGIN_PANELS_VERSION );
|
9 |
-
wp_localize_script( 'siteorigin-panels-front-styles', 'panelsStyles', array(
|
10 |
-
'fullContainer' => apply_filters( 'siteorigin_panels_full_width_container', siteorigin_panels_setting('full-width-container') )
|
11 |
-
) );
|
12 |
-
}
|
13 |
-
add_action('wp_enqueue_scripts', 'siteorigin_panels_default_styles_register_scripts', 5);
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Class for handling all the default styling.
|
17 |
-
*
|
18 |
-
* Class SiteOrigin_Panels_Default_Styling
|
19 |
-
*/
|
20 |
-
class SiteOrigin_Panels_Default_Styling {
|
21 |
-
|
22 |
-
static function init() {
|
23 |
-
// Adding all the fields
|
24 |
-
add_filter('siteorigin_panels_row_style_fields', array('SiteOrigin_Panels_Default_Styling', 'row_style_fields' ) );
|
25 |
-
add_filter('siteorigin_panels_widget_style_fields', array('SiteOrigin_Panels_Default_Styling', 'widget_style_fields' ) );
|
26 |
-
|
27 |
-
// Filter the row style
|
28 |
-
add_filter('siteorigin_panels_row_style_attributes', array('SiteOrigin_Panels_Default_Styling', 'row_style_attributes' ), 10, 2);
|
29 |
-
add_filter('siteorigin_panels_cell_style_attributes', array('SiteOrigin_Panels_Default_Styling', 'cell_style_attributes' ), 10, 2);
|
30 |
-
add_filter('siteorigin_panels_widget_style_attributes', array('SiteOrigin_Panels_Default_Styling', 'widget_style_attributes' ), 10, 2);
|
31 |
-
|
32 |
-
// Main filter to add any custom CSS.
|
33 |
-
add_filter('siteorigin_panels_css_object', array('SiteOrigin_Panels_Default_Styling', 'filter_css_object' ), 10, 3);
|
34 |
-
|
35 |
-
// Filtering specific attributes
|
36 |
-
add_filter('siteorigin_panels_css_row_margin_bottom', array('SiteOrigin_Panels_Default_Styling', 'filter_row_bottom_margin' ), 10, 2);
|
37 |
-
add_filter('siteorigin_panels_css_row_gutter', array('SiteOrigin_Panels_Default_Styling', 'filter_row_gutter' ), 10, 2);
|
38 |
-
}
|
39 |
-
|
40 |
-
static function row_style_fields($fields) {
|
41 |
-
// Add the attribute fields
|
42 |
-
|
43 |
-
$fields['id'] = array(
|
44 |
-
'name' => __('Row ID', 'siteorigin-panels'),
|
45 |
-
'type' => 'text',
|
46 |
-
'group' => 'attributes',
|
47 |
-
'description' => __('A custom ID used for this row.', 'siteorigin-panels'),
|
48 |
-
'priority' => 4,
|
49 |
-
);
|
50 |
-
|
51 |
-
$fields['class'] = array(
|
52 |
-
'name' => __('Row Class', 'siteorigin-panels'),
|
53 |
-
'type' => 'text',
|
54 |
-
'group' => 'attributes',
|
55 |
-
'description' => __('A CSS class', 'siteorigin-panels'),
|
56 |
-
'priority' => 5,
|
57 |
-
);
|
58 |
-
|
59 |
-
$fields['cell_class'] = array(
|
60 |
-
'name' => __('Cell Class', 'siteorigin-panels'),
|
61 |
-
'type' => 'text',
|
62 |
-
'group' => 'attributes',
|
63 |
-
'description' => __('Class added to all cells in this row.', 'siteorigin-panels'),
|
64 |
-
'priority' => 6,
|
65 |
-
);
|
66 |
-
|
67 |
-
$fields['row_css'] = array(
|
68 |
-
'name' => __('CSS Styles', 'siteorigin-panels'),
|
69 |
-
'type' => 'code',
|
70 |
-
'group' => 'attributes',
|
71 |
-
'description' => __('One style attribute per line.', 'siteorigin-panels'),
|
72 |
-
'priority' => 10,
|
73 |
-
);
|
74 |
-
|
75 |
-
// Add the layout fields
|
76 |
-
|
77 |
-
$fields['bottom_margin'] = array(
|
78 |
-
'name' => __('Bottom Margin', 'siteorigin-panels'),
|
79 |
-
'type' => 'measurement',
|
80 |
-
'group' => 'layout',
|
81 |
-
'description' => sprintf( __('Space below the row. Default is %spx.', 'siteorigin-panels'), siteorigin_panels_setting( 'margin-bottom' ) ),
|
82 |
-
'priority' => 5,
|
83 |
-
);
|
84 |
-
|
85 |
-
$fields['gutter'] = array(
|
86 |
-
'name' => __('Gutter', 'siteorigin-panels'),
|
87 |
-
'type' => 'measurement',
|
88 |
-
'group' => 'layout',
|
89 |
-
'description' => sprintf( __('Amount of space between columns. Default is %spx.', 'siteorigin-panels'), siteorigin_panels_setting( 'margin-sides' ) ),
|
90 |
-
'priority' => 6,
|
91 |
-
);
|
92 |
-
|
93 |
-
$fields['padding'] = array(
|
94 |
-
'name' => __('Padding', 'siteorigin-panels'),
|
95 |
-
'type' => 'measurement',
|
96 |
-
'group' => 'layout',
|
97 |
-
'description' => __('Padding around the entire row.', 'siteorigin-panels'),
|
98 |
-
'priority' => 7,
|
99 |
-
'multiple' => true
|
100 |
-
);
|
101 |
-
|
102 |
-
$fields['mobile_padding'] = array(
|
103 |
-
'name' => __('Mobile Padding', 'siteorigin-panels'),
|
104 |
-
'type' => 'measurement',
|
105 |
-
'group' => 'layout',
|
106 |
-
'description' => __('Padding when on mobile devices.', 'siteorigin-panels'),
|
107 |
-
'priority' => 8,
|
108 |
-
'multiple' => true
|
109 |
-
);
|
110 |
-
|
111 |
-
$fields['row_stretch'] = array(
|
112 |
-
'name' => __('Row Layout', 'siteorigin-panels'),
|
113 |
-
'type' => 'select',
|
114 |
-
'group' => 'layout',
|
115 |
-
'options' => array(
|
116 |
-
'' => __('Standard', 'siteorigin-panels'),
|
117 |
-
'full' => __('Full Width', 'siteorigin-panels'),
|
118 |
-
'full-stretched' => __('Full Width Stretched', 'siteorigin-panels'),
|
119 |
-
),
|
120 |
-
'priority' => 10,
|
121 |
-
);
|
122 |
-
|
123 |
-
$fields['collapse_order'] = array(
|
124 |
-
'name' => __('Collapse Order', 'siteorigin-panels'),
|
125 |
-
'type' => 'select',
|
126 |
-
'group' => 'layout',
|
127 |
-
'options' => array(
|
128 |
-
'' => __('Default', 'siteorigin-panels'),
|
129 |
-
'left-top' => __('Left on Top', 'siteorigin-panels'),
|
130 |
-
'right-top' => __('Right on Top', 'siteorigin-panels'),
|
131 |
-
),
|
132 |
-
'priority' => 15,
|
133 |
-
);
|
134 |
-
|
135 |
-
// How lets add the design fields
|
136 |
-
|
137 |
-
$fields['background'] = array(
|
138 |
-
'name' => __('Background Color', 'siteorigin-panels'),
|
139 |
-
'type' => 'color',
|
140 |
-
'group' => 'design',
|
141 |
-
'description' => __('Background color of the row.', 'siteorigin-panels'),
|
142 |
-
'priority' => 5,
|
143 |
-
);
|
144 |
-
|
145 |
-
$fields['background_image_attachment'] = array(
|
146 |
-
'name' => __('Background Image', 'siteorigin-panels'),
|
147 |
-
'type' => 'image',
|
148 |
-
'group' => 'design',
|
149 |
-
'description' => __('Background image of the row.', 'siteorigin-panels'),
|
150 |
-
'priority' => 6,
|
151 |
-
);
|
152 |
-
|
153 |
-
$fields['background_display'] = array(
|
154 |
-
'name' => __('Background Image Display', 'siteorigin-panels'),
|
155 |
-
'type' => 'select',
|
156 |
-
'group' => 'design',
|
157 |
-
'options' => array(
|
158 |
-
'tile' => __('Tiled Image', 'siteorigin-panels'),
|
159 |
-
'cover' => __('Cover', 'siteorigin-panels'),
|
160 |
-
'center' => __('Centered, with original size', 'siteorigin-panels'),
|
161 |
-
'fixed' => __( 'Fixed', 'siteorigin-panels' ),
|
162 |
-
'parallax' => __('Parallax', 'siteorigin-panels'),
|
163 |
-
'parallax-original' => __('Parallax (Original Size)', 'siteorigin-panels'),
|
164 |
-
),
|
165 |
-
'description' => __('How the background image is displayed.', 'siteorigin-panels'),
|
166 |
-
'priority' => 7,
|
167 |
-
);
|
168 |
-
|
169 |
-
$fields['border_color'] = array(
|
170 |
-
'name' => __('Border Color', 'siteorigin-panels'),
|
171 |
-
'type' => 'color',
|
172 |
-
'group' => 'design',
|
173 |
-
'description' => __('Border color of the row.', 'siteorigin-panels'),
|
174 |
-
'priority' => 10,
|
175 |
-
);
|
176 |
-
|
177 |
-
return $fields;
|
178 |
-
}
|
179 |
-
|
180 |
-
static function widget_style_fields($fields) {
|
181 |
-
$fields['class'] = array(
|
182 |
-
'name' => __('Widget Class', 'siteorigin-panels'),
|
183 |
-
'type' => 'text',
|
184 |
-
'group' => 'attributes',
|
185 |
-
'description' => __('A CSS class', 'siteorigin-panels'),
|
186 |
-
'priority' => 5,
|
187 |
-
);
|
188 |
-
|
189 |
-
$fields['widget_css'] = array(
|
190 |
-
'name' => __('CSS Styles', 'siteorigin-panels'),
|
191 |
-
'type' => 'code',
|
192 |
-
'group' => 'attributes',
|
193 |
-
'description' => __('One style attribute per line.', 'siteorigin-panels'),
|
194 |
-
'priority' => 10,
|
195 |
-
);
|
196 |
-
|
197 |
-
$fields['padding'] = array(
|
198 |
-
'name' => __('Padding', 'siteorigin-panels'),
|
199 |
-
'type' => 'measurement',
|
200 |
-
'group' => 'layout',
|
201 |
-
'description' => __('Padding around the entire widget.', 'siteorigin-panels'),
|
202 |
-
'priority' => 7,
|
203 |
-
'multiple' => true
|
204 |
-
);
|
205 |
-
|
206 |
-
$fields['mobile_padding'] = array(
|
207 |
-
'name' => __('Mobile Padding', 'siteorigin-panels'),
|
208 |
-
'type' => 'measurement',
|
209 |
-
'group' => 'layout',
|
210 |
-
'description' => __('Padding when on mobile devices.', 'siteorigin-panels'),
|
211 |
-
'priority' => 8,
|
212 |
-
'multiple' => true
|
213 |
-
);
|
214 |
-
|
215 |
-
// How lets add the design fields
|
216 |
-
|
217 |
-
$fields['background'] = array(
|
218 |
-
'name' => __('Background Color', 'siteorigin-panels'),
|
219 |
-
'type' => 'color',
|
220 |
-
'group' => 'design',
|
221 |
-
'description' => __('Background color of the widget.', 'siteorigin-panels'),
|
222 |
-
'priority' => 5,
|
223 |
-
);
|
224 |
-
|
225 |
-
$fields['background_image_attachment'] = array(
|
226 |
-
'name' => __('Background Image', 'siteorigin-panels'),
|
227 |
-
'type' => 'image',
|
228 |
-
'group' => 'design',
|
229 |
-
'description' => __('Background image of the widget.', 'siteorigin-panels'),
|
230 |
-
'priority' => 6,
|
231 |
-
);
|
232 |
-
|
233 |
-
$fields['background_display'] = array(
|
234 |
-
'name' => __('Background Image Display', 'siteorigin-panels'),
|
235 |
-
'type' => 'select',
|
236 |
-
'group' => 'design',
|
237 |
-
'options' => array(
|
238 |
-
'tile' => __('Tiled Image', 'siteorigin-panels'),
|
239 |
-
'cover' => __('Cover', 'siteorigin-panels'),
|
240 |
-
'center' => __('Centered, with original size', 'siteorigin-panels'),
|
241 |
-
'fixed' => __( 'Fixed', 'siteorigin-panels' ),
|
242 |
-
'parallax' => __('Parallax', 'siteorigin-panels'),
|
243 |
-
'parallax-original' => __('Parallax (Original Size)', 'siteorigin-panels'),
|
244 |
-
),
|
245 |
-
'description' => __('How the background image is displayed.', 'siteorigin-panels'),
|
246 |
-
'priority' => 7,
|
247 |
-
);
|
248 |
-
|
249 |
-
$fields['border_color'] = array(
|
250 |
-
'name' => __('Border Color', 'siteorigin-panels'),
|
251 |
-
'type' => 'color',
|
252 |
-
'group' => 'design',
|
253 |
-
'description' => __('Border color of the widget.', 'siteorigin-panels'),
|
254 |
-
'priority' => 10,
|
255 |
-
);
|
256 |
-
|
257 |
-
$fields['font_color'] = array(
|
258 |
-
'name' => __('Font Color', 'siteorigin-panels'),
|
259 |
-
'type' => 'color',
|
260 |
-
'group' => 'design',
|
261 |
-
'description' => __('Color of text inside this widget.', 'siteorigin-panels'),
|
262 |
-
'priority' => 15,
|
263 |
-
);
|
264 |
-
|
265 |
-
$fields['link_color'] = array(
|
266 |
-
'name' => __('Links Color', 'siteorigin-panels'),
|
267 |
-
'type' => 'color',
|
268 |
-
'group' => 'design',
|
269 |
-
'description' => __('Color of links inside this widget.', 'siteorigin-panels'),
|
270 |
-
'priority' => 16,
|
271 |
-
);
|
272 |
-
|
273 |
-
return $fields;
|
274 |
-
}
|
275 |
-
|
276 |
-
static function row_style_attributes( $attributes, $args ) {
|
277 |
-
if( !empty( $args['row_stretch'] ) ) {
|
278 |
-
$attributes['class'][] = 'siteorigin-panels-stretch';
|
279 |
-
$attributes['data-stretch-type'] = $args['row_stretch'];
|
280 |
-
wp_enqueue_script('siteorigin-panels-front-styles');
|
281 |
-
}
|
282 |
-
|
283 |
-
if( !empty( $args['class'] ) ) {
|
284 |
-
$attributes['class'] = array_merge( $attributes['class'], explode(' ', $args['class']) );
|
285 |
-
}
|
286 |
-
|
287 |
-
if( !empty($args['row_css']) ){
|
288 |
-
preg_match_all('/^(.+?):(.+?);?$/m', $args['row_css'], $matches);
|
289 |
-
|
290 |
-
if(!empty($matches[0])){
|
291 |
-
for($i = 0; $i < count($matches[0]); $i++) {
|
292 |
-
$attributes['style'] .= $matches[1][$i] . ':' . $matches[2][$i] . ';';
|
293 |
-
}
|
294 |
-
}
|
295 |
-
}
|
296 |
-
|
297 |
-
if( !empty( $args['background'] ) ) {
|
298 |
-
$attributes['style'] .= 'background-color:' . $args['background']. ';';
|
299 |
-
}
|
300 |
-
|
301 |
-
if( !empty( $args['background_display'] ) && !empty( $args['background_image_attachment'] ) ) {
|
302 |
-
|
303 |
-
if( $args['background_display'] == 'parallax' || $args['background_display'] == 'parallax-original' ) {
|
304 |
-
wp_enqueue_script('siteorigin-panels-front-styles');
|
305 |
-
}
|
306 |
-
|
307 |
-
$url = wp_get_attachment_image_src( $args['background_image_attachment'], 'full' );
|
308 |
-
|
309 |
-
if( !empty($url) ) {
|
310 |
-
|
311 |
-
if( $args['background_display'] == 'parallax' || $args['background_display'] == 'parallax-original' ) {
|
312 |
-
wp_enqueue_script('siteorigin-parallax');
|
313 |
-
$parallax_args = array(
|
314 |
-
'backgroundUrl' => $url[0],
|
315 |
-
'backgroundSize' => array( $url[1], $url[2] ),
|
316 |
-
'backgroundSizing' => $args['background_display'] == 'parallax-original' ? 'original' : 'scaled',
|
317 |
-
'limitMotion' => siteorigin_panels_setting( 'parallax-motion' ) ? floatval( siteorigin_panels_setting( 'parallax-motion' ) ) : 'auto',
|
318 |
-
);
|
319 |
-
$attributes['data-siteorigin-parallax'] = json_encode( $parallax_args );
|
320 |
-
$attributes['style'] .= 'background-image: url(' . $url[0] . '); background-position: center center; background-repeat: no-repeat;';
|
321 |
-
}
|
322 |
-
else {
|
323 |
-
$attributes['style'] .= 'background-image: url(' . $url[0] . ');';
|
324 |
-
switch( $args['background_display'] ) {
|
325 |
-
case 'tile':
|
326 |
-
$attributes['style'] .= 'background-repeat: repeat;';
|
327 |
-
break;
|
328 |
-
case 'cover':
|
329 |
-
$attributes['style'] .= 'background-size: cover;';
|
330 |
-
break;
|
331 |
-
case 'center':
|
332 |
-
$attributes['style'] .= 'background-position: center center; background-repeat: no-repeat;';
|
333 |
-
break;
|
334 |
-
case 'fixed':
|
335 |
-
$attributes['style'] .= 'background-attachment: fixed; background-size: cover;';
|
336 |
-
break;
|
337 |
-
}
|
338 |
-
}
|
339 |
-
}
|
340 |
-
}
|
341 |
-
|
342 |
-
// We need the style wrapper if there is padding or mobile padding
|
343 |
-
if( ! empty( $args[ 'padding' ] ) || ! empty( $args[ 'mobile_padding' ] ) ) {
|
344 |
-
$attributes['class'][] = 'panel-row-style';
|
345 |
-
}
|
346 |
-
|
347 |
-
if( !empty( $args['border_color'] ) ) {
|
348 |
-
$attributes['style'] .= 'border: 1px solid ' . $args['border_color']. ';';
|
349 |
-
}
|
350 |
-
|
351 |
-
if( !empty( $args['id'] ) ) {
|
352 |
-
$attributes[ 'id' ] = sanitize_html_class( $args[ 'id' ] );
|
353 |
-
}
|
354 |
-
|
355 |
-
return $attributes;
|
356 |
-
}
|
357 |
-
|
358 |
-
static function cell_style_attributes( $attributes, $row_args ) {
|
359 |
-
if( !empty( $row_args['cell_class'] ) ) {
|
360 |
-
if( empty($attributes['class']) ) $attributes['class'] = array();
|
361 |
-
$attributes['class'] = array_merge( $attributes['class'], explode(' ', $row_args['cell_class']) );
|
362 |
-
}
|
363 |
-
|
364 |
-
return $attributes;
|
365 |
-
}
|
366 |
-
|
367 |
-
static function widget_style_attributes( $attributes, $args ) {
|
368 |
-
if( !empty( $args['class'] ) ) {
|
369 |
-
if( empty($attributes['class']) ) $attributes['class'] = array();
|
370 |
-
$attributes['class'] = array_merge( $attributes['class'], explode(' ', $args['class']) );
|
371 |
-
}
|
372 |
-
|
373 |
-
if( !empty($args['widget_css']) ){
|
374 |
-
preg_match_all('/^(.+?):(.+?);?$/m', $args['widget_css'], $matches);
|
375 |
-
|
376 |
-
if(!empty($matches[0])){
|
377 |
-
for($i = 0; $i < count($matches[0]); $i++) {
|
378 |
-
$attributes['style'] .= $matches[1][$i] . ':' . $matches[2][$i] . ';';
|
379 |
-
}
|
380 |
-
}
|
381 |
-
}
|
382 |
-
|
383 |
-
if( !empty( $args['background'] ) ) {
|
384 |
-
$attributes['style'] .= 'background-color:' . $args['background']. ';';
|
385 |
-
}
|
386 |
-
|
387 |
-
if( !empty($args['background_display']) && !empty( $args['background_image_attachment'] ) ) {
|
388 |
-
$url = wp_get_attachment_image_src( $args['background_image_attachment'], 'full' );
|
389 |
-
|
390 |
-
if( $args['background_display'] == 'parallax' || $args['background_display'] == 'parallax-original' ) {
|
391 |
-
wp_enqueue_script('siteorigin-panels-front-styles');
|
392 |
-
}
|
393 |
-
|
394 |
-
if( !empty($url) ) {
|
395 |
-
|
396 |
-
if( $args['background_display'] == 'parallax' || $args['background_display'] == 'parallax-original' ) {
|
397 |
-
wp_enqueue_script('siteorigin-parallax');
|
398 |
-
$parallax_args = array(
|
399 |
-
'backgroundUrl' => $url[0],
|
400 |
-
'backgroundSize' => array( $url[1], $url[2] ),
|
401 |
-
'backgroundSizing' => $args['background_display'] == 'parallax-original' ? 'original' : 'scaled',
|
402 |
-
);
|
403 |
-
$attributes['data-siteorigin-parallax'] = json_encode( $parallax_args );
|
404 |
-
$attributes['style'] .= 'background-image: url(' . $url[0] . '); background-position: center center; background-repeat: no-repeat;';
|
405 |
-
}
|
406 |
-
else {
|
407 |
-
$attributes['style'] .= 'background-image: url(' . $url[0] . ');';
|
408 |
-
|
409 |
-
switch( $args['background_display'] ) {
|
410 |
-
case 'tile':
|
411 |
-
$attributes['style'] .= 'background-repeat: repeat;';
|
412 |
-
break;
|
413 |
-
case 'cover':
|
414 |
-
$attributes['style'] .= 'background-size: cover;';
|
415 |
-
break;
|
416 |
-
case 'center':
|
417 |
-
$attributes['style'] .= 'background-position: center center; background-repeat: no-repeat;';
|
418 |
-
break;
|
419 |
-
case 'fixed':
|
420 |
-
$attributes['style'] .= 'background-attachment: fixed; background-size: cover;';
|
421 |
-
break;
|
422 |
-
}
|
423 |
-
}
|
424 |
-
|
425 |
-
}
|
426 |
-
}
|
427 |
-
|
428 |
-
// We need the style wrapper if there is padding or mobile padding
|
429 |
-
if( ! empty( $args[ 'padding' ] ) || ! empty( $args[ 'mobile_padding' ] ) ) {
|
430 |
-
$attributes['class'][] = 'panel-widget-style';
|
431 |
-
}
|
432 |
-
|
433 |
-
if( !empty( $args['border_color'] ) ) {
|
434 |
-
$attributes['style'] .= 'border: 1px solid ' . $args['border_color']. ';';
|
435 |
-
}
|
436 |
-
|
437 |
-
if( !empty( $args['font_color'] ) ) {
|
438 |
-
$attributes['style'] .= 'color: ' . $args['font_color']. ';';
|
439 |
-
}
|
440 |
-
|
441 |
-
return $attributes;
|
442 |
-
}
|
443 |
-
|
444 |
-
/**
|
445 |
-
* @param SiteOrigin_Panels_Css_Builder $css
|
446 |
-
* @param $panels_data
|
447 |
-
* @param $post_id
|
448 |
-
*
|
449 |
-
* @return mixed
|
450 |
-
*/
|
451 |
-
static function filter_css_object( $css, $panels_data, $post_id ) {
|
452 |
-
|
453 |
-
$mobile_width = siteorigin_panels_setting( 'mobile-width' );
|
454 |
-
|
455 |
-
// Add in the widget padding styling
|
456 |
-
foreach( $panels_data[ 'widgets' ] as $i => $widget ) {
|
457 |
-
if( empty( $widget[ 'panels_info' ] ) ) continue;
|
458 |
-
|
459 |
-
if( ! empty( $widget[ 'panels_info' ][ 'style' ][ 'padding' ] ) ) {
|
460 |
-
$css->add_widget_css( $post_id, $widget['panels_info']['grid'], $widget['panels_info']['cell'], $widget['panels_info']['cell_index'], '> .panel-widget-style', array(
|
461 |
-
'padding' => $widget[ 'panels_info' ][ 'style' ][ 'padding' ]
|
462 |
-
) );
|
463 |
-
}
|
464 |
-
if( ! empty( $widget[ 'panels_info' ][ 'style' ][ 'mobile_padding' ] ) ) {
|
465 |
-
$css->add_widget_css( $post_id, $widget['panels_info']['grid'], $widget['panels_info']['cell'], $widget['panels_info']['cell_index'], '> .panel-widget-style', array(
|
466 |
-
'padding' => $widget[ 'panels_info' ][ 'style' ][ 'mobile_padding' ]
|
467 |
-
), $mobile_width );
|
468 |
-
}
|
469 |
-
}
|
470 |
-
|
471 |
-
// Add in the row padding styling
|
472 |
-
foreach( $panels_data[ 'grids' ] as $i => $row ) {
|
473 |
-
if( empty( $row[ 'style' ] ) ) continue;
|
474 |
-
|
475 |
-
if( ! empty( $row['style']['padding'] ) ) {
|
476 |
-
$css->add_row_css( $post_id, $i, '> .panel-row-style', array(
|
477 |
-
'padding' => $row['style']['padding']
|
478 |
-
) );
|
479 |
-
}
|
480 |
-
if( ! empty( $row['style'][ 'mobile_padding' ] ) ) {
|
481 |
-
$css->add_row_css( $post_id, $i, '> .panel-row-style', array(
|
482 |
-
'padding' => $row['style'][ 'mobile_padding' ]
|
483 |
-
), $mobile_width );
|
484 |
-
}
|
485 |
-
}
|
486 |
-
|
487 |
-
return $css;
|
488 |
-
}
|
489 |
-
|
490 |
-
static function filter_row_bottom_margin( $margin, $grid ){
|
491 |
-
if( !empty($grid['style']['bottom_margin']) ) {
|
492 |
-
$margin = $grid['style']['bottom_margin'];
|
493 |
-
}
|
494 |
-
return $margin;
|
495 |
-
}
|
496 |
-
|
497 |
-
static function filter_row_gutter( $gutter, $grid ) {
|
498 |
-
if( !empty($grid['style']['gutter']) ) {
|
499 |
-
$gutter = $grid['style']['gutter'];
|
500 |
-
}
|
501 |
-
|
502 |
-
return $gutter;
|
503 |
-
}
|
504 |
-
|
505 |
-
}
|
506 |
-
|
507 |
-
SiteOrigin_Panels_Default_Styling::init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/learn.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class SiteOrigin_Panels_Learn {
|
4 |
-
|
5 |
-
static function display_learn_button(){
|
6 |
-
return siteorigin_panels_setting( 'display-learn' ) &&
|
7 |
-
apply_filters( 'siteorigin_panels_learn', true );
|
8 |
-
}
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Get the learning URL
|
12 |
-
*
|
13 |
-
* @param bool $lesson
|
14 |
-
* @param bool $category
|
15 |
-
*
|
16 |
-
* @return string
|
17 |
-
*/
|
18 |
-
static function get_url( $lesson = false, $category = false ){
|
19 |
-
$learn_url = 'https://siteorigin.com/wp-admin/admin-ajax.php?action=lesson_explore';
|
20 |
-
|
21 |
-
$user = wp_get_current_user();
|
22 |
-
if( $user ) {
|
23 |
-
$learn_url = add_query_arg( array(
|
24 |
-
'email' => $user->user_email,
|
25 |
-
'name' => $user->first_name,
|
26 |
-
), $learn_url );
|
27 |
-
}
|
28 |
-
|
29 |
-
if( $lesson ) {
|
30 |
-
$learn_url .= '#lesson-' . urlencode( $lesson );
|
31 |
-
}
|
32 |
-
elseif ( $category ) {
|
33 |
-
$learn_url .= '#category-' . urlencode( $category );
|
34 |
-
}
|
35 |
-
|
36 |
-
return $learn_url;
|
37 |
-
}
|
38 |
-
|
39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/plugin-activation.php
DELETED
@@ -1,131 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function siteorigin_panels_plugin_activation_page(){
|
4 |
-
if( !isset( $_GET[ 'siteorigin-pa-install' ] ) ) return;
|
5 |
-
|
6 |
-
add_plugins_page(
|
7 |
-
__('Install Page Builder Plugin', 'siteorigin-panels'),
|
8 |
-
__('Install Page Builder Plugin', 'siteorigin-panels'),
|
9 |
-
'install_plugins',
|
10 |
-
'siteorigin_panels_plugin_activation',
|
11 |
-
'siteorigin_panels_plugin_activation_render_page'
|
12 |
-
);
|
13 |
-
}
|
14 |
-
add_action('admin_menu', 'siteorigin_panels_plugin_activation_page');
|
15 |
-
|
16 |
-
function siteorigin_panels_plugin_activation_render_page(){
|
17 |
-
?>
|
18 |
-
<div class="wrap">
|
19 |
-
<?php siteorigin_panels_plugin_activation_do_plugin_install() ?>
|
20 |
-
</div>
|
21 |
-
<?php
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Install a plugin
|
26 |
-
*/
|
27 |
-
function siteorigin_panels_plugin_activation_do_plugin_install(){
|
28 |
-
/** All plugin information will be stored in an array for processing */
|
29 |
-
$plugin = array();
|
30 |
-
|
31 |
-
/** Checks for actions from hover links to process the installation */
|
32 |
-
if ( isset( $_GET[sanitize_key( 'plugin' )] ) && ( isset( $_GET[sanitize_key( 'siteorigin-pa-install' )] ) && 'install-plugin' == $_GET[sanitize_key( 'siteorigin-pa-install' )] ) && current_user_can('install_plugins') ) {
|
33 |
-
check_admin_referer( 'siteorigin-pa-install' );
|
34 |
-
|
35 |
-
$plugin['name'] = $_GET['plugin_name']; // Plugin name
|
36 |
-
$plugin['slug'] = $_GET['plugin']; // Plugin slug
|
37 |
-
|
38 |
-
if(!empty($_GET['plugin_source'])) {
|
39 |
-
$plugin['source'] = $_GET['plugin_source'];
|
40 |
-
}
|
41 |
-
else {
|
42 |
-
$plugin['source'] = false;
|
43 |
-
}
|
44 |
-
|
45 |
-
/** Pass all necessary information via URL if WP_Filesystem is needed */
|
46 |
-
$url = wp_nonce_url(
|
47 |
-
add_query_arg(
|
48 |
-
array(
|
49 |
-
'page' => 'siteorigin_panels_plugin_activation',
|
50 |
-
'plugin' => $plugin['slug'],
|
51 |
-
'plugin_name' => $plugin['name'],
|
52 |
-
'plugin_source' => $plugin['source'],
|
53 |
-
'siteorigin-pa-install' => 'install-plugin',
|
54 |
-
),
|
55 |
-
admin_url( 'themes.php' )
|
56 |
-
),
|
57 |
-
'siteorigin-pa-install'
|
58 |
-
);
|
59 |
-
$method = ''; // Leave blank so WP_Filesystem can populate it as necessary
|
60 |
-
$fields = array( sanitize_key( 'siteorigin-pa-install' ) ); // Extra fields to pass to WP_Filesystem
|
61 |
-
|
62 |
-
if ( false === ( $creds = request_filesystem_credentials( $url, $method, false, false, $fields ) ) )
|
63 |
-
return true;
|
64 |
-
|
65 |
-
if ( ! WP_Filesystem( $creds ) ) {
|
66 |
-
request_filesystem_credentials( $url, $method, true, false, $fields ); // Setup WP_Filesystem
|
67 |
-
return true;
|
68 |
-
}
|
69 |
-
|
70 |
-
require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; // Need for plugins_api
|
71 |
-
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; // Need for upgrade classes
|
72 |
-
|
73 |
-
/** Prep variables for Plugin_Installer_Skin class */
|
74 |
-
$title = sprintf( __('Installing %s', 'siteorigin-panels'), $plugin['name'] );
|
75 |
-
$url = add_query_arg( array( 'action' => 'install-plugin', 'plugin' => urlencode( $plugin['slug'] ) ), 'update.php' );
|
76 |
-
if ( isset( $_GET['from'] ) )
|
77 |
-
$url .= add_query_arg( 'from', urlencode( stripslashes( $_GET['from'] ) ), $url );
|
78 |
-
|
79 |
-
$nonce = 'install-plugin_' . $plugin['slug'];
|
80 |
-
|
81 |
-
// Find the source of the plugin
|
82 |
-
$source = !empty( $plugin['source'] ) ? $plugin['source'] : 'http://downloads.wordpress.org/plugin/'.urlencode($plugin['slug']).'.zip';
|
83 |
-
|
84 |
-
/** Create a new instance of Plugin_Upgrader */
|
85 |
-
$upgrader = new Plugin_Upgrader( $skin = new Plugin_Installer_Skin( compact( 'type', 'title', 'url', 'nonce', 'plugin', 'api' ) ) );
|
86 |
-
|
87 |
-
/** Perform the action and install the plugin from the $source urldecode() */
|
88 |
-
$upgrader->install( $source );
|
89 |
-
|
90 |
-
/** Flush plugins cache so we can make sure that the installed plugins list is always up to date */
|
91 |
-
wp_cache_flush();
|
92 |
-
}
|
93 |
-
}
|
94 |
-
|
95 |
-
function siteorigin_panels_plugin_activation_install_url($plugin, $plugin_name, $source = false){
|
96 |
-
// This is to prevent the issue where this URL is called from outside the admin
|
97 |
-
if( !is_admin() || !function_exists('get_plugins') ) return false;
|
98 |
-
|
99 |
-
$plugins = get_plugins();
|
100 |
-
$plugins = array_keys($plugins);
|
101 |
-
|
102 |
-
$installed = false;
|
103 |
-
foreach($plugins as $plugin_path){
|
104 |
-
if(strpos($plugin_path, $plugin.'/') === 0) {
|
105 |
-
$installed = true;
|
106 |
-
break;
|
107 |
-
}
|
108 |
-
}
|
109 |
-
|
110 |
-
if($installed && !is_plugin_active($plugin)){
|
111 |
-
return wp_nonce_url( self_admin_url('plugins.php?action=activate&plugin='.$plugin_path), 'activate-plugin_'.$plugin_path);
|
112 |
-
}
|
113 |
-
elseif($installed && is_plugin_active($plugin)){
|
114 |
-
return '#';
|
115 |
-
}
|
116 |
-
else{
|
117 |
-
return wp_nonce_url(
|
118 |
-
add_query_arg(
|
119 |
-
array(
|
120 |
-
'page' => 'siteorigin_panels_plugin_activation',
|
121 |
-
'plugin' => $plugin,
|
122 |
-
'plugin_name' => $plugin_name,
|
123 |
-
'plugin_source' => !empty($source) ? urlencode($source) : false,
|
124 |
-
'siteorigin-pa-install' => 'install-plugin',
|
125 |
-
),
|
126 |
-
admin_url( 'plugins.php' )
|
127 |
-
),
|
128 |
-
'siteorigin-pa-install'
|
129 |
-
);
|
130 |
-
}
|
131 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/renderer.php
CHANGED
@@ -258,6 +258,7 @@ class SiteOrigin_Panels_Renderer {
|
|
258 |
|
259 |
// Add the panel layout wrapper
|
260 |
$layout_classes = apply_filters( 'siteorigin_panels_layout_classes', array( 'panel-layout' ), $post_id, $panels_data );
|
|
|
261 |
$layout_attributes = apply_filters( 'siteorigin_panels_layout_attributes', array(
|
262 |
'id' => 'pl-' . $post_id,
|
263 |
'class' => implode( ' ', $layout_classes ),
|
@@ -381,11 +382,12 @@ class SiteOrigin_Panels_Renderer {
|
|
381 |
global $wp_widget_factory;
|
382 |
|
383 |
// Set widget class to $widget
|
384 |
-
$
|
|
|
385 |
|
386 |
// Load the widget from the widget factory and give themes and plugins a chance to provide their own
|
387 |
-
$the_widget = ! empty( $wp_widget_factory->widgets[ $
|
388 |
-
$the_widget = apply_filters( 'siteorigin_panels_widget_object', $the_widget, $
|
389 |
|
390 |
if ( empty( $post_id ) ) {
|
391 |
$post_id = get_the_ID();
|
@@ -410,7 +412,7 @@ class SiteOrigin_Panels_Renderer {
|
|
410 |
$id = 'panel-' . $post_id . '-' . $grid_index . '-' . $cell_index . '-' . $widget_index;
|
411 |
|
412 |
// Filter and sanitize the classes
|
413 |
-
$classes = apply_filters( 'siteorigin_panels_widget_classes', $classes, $
|
414 |
$classes = explode( ' ', implode( ' ', $classes ) );
|
415 |
$classes = array_filter( $classes );
|
416 |
$classes = array_unique( $classes );
|
@@ -465,7 +467,7 @@ class SiteOrigin_Panels_Renderer {
|
|
465 |
$the_widget->widget( $args, $instance );
|
466 |
} else {
|
467 |
// This gives themes a chance to display some sort of placeholder for missing widgets
|
468 |
-
echo apply_filters( 'siteorigin_panels_missing_widget', $args['before_widget'] . $args['after_widget'], $
|
469 |
}
|
470 |
}
|
471 |
|
@@ -643,8 +645,6 @@ class SiteOrigin_Panels_Renderer {
|
|
643 |
echo $row_style_wrapper;
|
644 |
}
|
645 |
|
646 |
-
$collapse_order = ! empty( $row['style']['collapse_order'] ) ? $row['style']['collapse_order'] : ( ! is_rtl() ? 'left-top' : 'right-top' );
|
647 |
-
|
648 |
foreach ( $row['cells'] as $ci => & $cell ) {
|
649 |
$this->render_cell( $post_id, $ri, $ci, $cell, $row['cells'], $panels_data );
|
650 |
}
|
@@ -766,6 +766,6 @@ class SiteOrigin_Panels_Renderer {
|
|
766 |
}
|
767 |
|
768 |
public function front_css_url(){
|
769 |
-
return plugin_dir_url( __FILE__ ) . '../css/front.css';
|
770 |
}
|
771 |
}
|
258 |
|
259 |
// Add the panel layout wrapper
|
260 |
$layout_classes = apply_filters( 'siteorigin_panels_layout_classes', array( 'panel-layout' ), $post_id, $panels_data );
|
261 |
+
if( is_rtl() ) $layout_classes[] = 'panel-is-rtl';
|
262 |
$layout_attributes = apply_filters( 'siteorigin_panels_layout_attributes', array(
|
263 |
'id' => 'pl-' . $post_id,
|
264 |
'class' => implode( ' ', $layout_classes ),
|
382 |
global $wp_widget_factory;
|
383 |
|
384 |
// Set widget class to $widget
|
385 |
+
$widget_class = $widget_info['class'];
|
386 |
+
$widget_class = apply_filters( 'siteorigin_panels_widget_class', $widget_class );
|
387 |
|
388 |
// Load the widget from the widget factory and give themes and plugins a chance to provide their own
|
389 |
+
$the_widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
|
390 |
+
$the_widget = apply_filters( 'siteorigin_panels_widget_object', $the_widget, $widget_class, $instance );
|
391 |
|
392 |
if ( empty( $post_id ) ) {
|
393 |
$post_id = get_the_ID();
|
412 |
$id = 'panel-' . $post_id . '-' . $grid_index . '-' . $cell_index . '-' . $widget_index;
|
413 |
|
414 |
// Filter and sanitize the classes
|
415 |
+
$classes = apply_filters( 'siteorigin_panels_widget_classes', $classes, $widget_class, $instance, $widget_info );
|
416 |
$classes = explode( ' ', implode( ' ', $classes ) );
|
417 |
$classes = array_filter( $classes );
|
418 |
$classes = array_unique( $classes );
|
467 |
$the_widget->widget( $args, $instance );
|
468 |
} else {
|
469 |
// This gives themes a chance to display some sort of placeholder for missing widgets
|
470 |
+
echo apply_filters( 'siteorigin_panels_missing_widget', $args['before_widget'] . $args['after_widget'], $widget_class, $args, $instance );
|
471 |
}
|
472 |
}
|
473 |
|
645 |
echo $row_style_wrapper;
|
646 |
}
|
647 |
|
|
|
|
|
648 |
foreach ( $row['cells'] as $ci => & $cell ) {
|
649 |
$this->render_cell( $post_id, $ri, $ci, $cell, $row['cells'], $panels_data );
|
650 |
}
|
766 |
}
|
767 |
|
768 |
public function front_css_url(){
|
769 |
+
return plugin_dir_url( __FILE__ ) . '../css/front-flex.css';
|
770 |
}
|
771 |
}
|
inc/settings.php
CHANGED
@@ -261,16 +261,6 @@ class SiteOrigin_Panels_Settings {
|
|
261 |
'description' => __( 'Page Builder will create an emulated sidebar, that contains all widgets in the page.', 'siteorigin-panels' ),
|
262 |
);
|
263 |
|
264 |
-
$fields['general']['fields']['display-teaser'] = array(
|
265 |
-
'type' => 'checkbox',
|
266 |
-
'label' => __( 'Upgrade Teaser', 'siteorigin-panels' ),
|
267 |
-
'description' => sprintf(
|
268 |
-
__( 'Display the %sSiteOrigin Premium%s upgrade teaser in the Page Builder toolbar.', 'siteorigin-panels' ),
|
269 |
-
'<a href="siteorigin.com/downloads/premium/" target="_blank">',
|
270 |
-
'</a>'
|
271 |
-
)
|
272 |
-
);
|
273 |
-
|
274 |
$fields['general']['fields']['display-learn'] = array(
|
275 |
'type' => 'checkbox',
|
276 |
'label' => __( 'Page Builder Learning', 'siteorigin-panels' ),
|
@@ -410,7 +400,7 @@ class SiteOrigin_Panels_Settings {
|
|
410 |
$fields['content']['fields']['cache-content'] = array(
|
411 |
'type' => 'checkbox',
|
412 |
'label' => __( 'Content Cache', 'siteorigin-panels' ),
|
413 |
-
'description' => __( "Cache CSS and HTML generated by Page Builder.
|
414 |
);
|
415 |
|
416 |
return $fields;
|
@@ -580,12 +570,6 @@ class SiteOrigin_Panels_Settings {
|
|
580 |
// Don't let mobile width go below 320
|
581 |
$values[ 'mobile-width' ] = max( $values[ 'mobile-width' ], 320 );
|
582 |
|
583 |
-
// Don't enable cache when legacy layout is auto
|
584 |
-
if( $values[ 'legacy-layout' ] == 'auto' ) {
|
585 |
-
$values['copy-styles'] = false;
|
586 |
-
$values['cache-content'] = false;
|
587 |
-
}
|
588 |
-
|
589 |
// Save the values to the database
|
590 |
update_option( 'siteorigin_panels_settings', $values );
|
591 |
do_action( 'siteorigin_panels_save_settings', $values );
|
261 |
'description' => __( 'Page Builder will create an emulated sidebar, that contains all widgets in the page.', 'siteorigin-panels' ),
|
262 |
);
|
263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
$fields['general']['fields']['display-learn'] = array(
|
265 |
'type' => 'checkbox',
|
266 |
'label' => __( 'Page Builder Learning', 'siteorigin-panels' ),
|
400 |
$fields['content']['fields']['cache-content'] = array(
|
401 |
'type' => 'checkbox',
|
402 |
'label' => __( 'Content Cache', 'siteorigin-panels' ),
|
403 |
+
'description' => __( "Cache CSS and HTML generated by Page Builder." , 'siteorigin-panels' ),
|
404 |
);
|
405 |
|
406 |
return $fields;
|
570 |
// Don't let mobile width go below 320
|
571 |
$values[ 'mobile-width' ] = max( $values[ 'mobile-width' ], 320 );
|
572 |
|
|
|
|
|
|
|
|
|
|
|
|
|
573 |
// Save the values to the database
|
574 |
update_option( 'siteorigin_panels_settings', $values );
|
575 |
do_action( 'siteorigin_panels_save_settings', $values );
|
inc/widget-shortcode.php
CHANGED
@@ -38,8 +38,9 @@ class SiteOrigin_Panels_Widget_Shortcode {
|
|
38 |
'class' => false,
|
39 |
'id' => '',
|
40 |
), $attr, 'siteorigin_widget' );
|
41 |
-
|
42 |
$attr[ 'class' ] = html_entity_decode( $attr[ 'class' ] );
|
|
|
43 |
|
44 |
global $wp_widget_factory;
|
45 |
if( ! empty( $attr[ 'class' ] ) && isset( $wp_widget_factory->widgets[ $attr[ 'class' ] ] ) ) {
|
@@ -84,10 +85,10 @@ class SiteOrigin_Panels_Widget_Shortcode {
|
|
84 |
$shortcode_name = apply_filters( 'siteorigin_panels_cache_shortcode', 'siteorigin_widget', $widget, $instance, $args );
|
85 |
|
86 |
$shortcode = '[' . $shortcode_name . ' ';
|
87 |
-
$shortcode .= 'class="' . htmlentities( get_class( $widget ) ) . '"]';
|
88 |
$shortcode .= self::encode_data( $data ) ;
|
89 |
$shortcode .= '[/' . $shortcode_name . ']';
|
90 |
-
|
91 |
return $shortcode;
|
92 |
}
|
93 |
|
38 |
'class' => false,
|
39 |
'id' => '',
|
40 |
), $attr, 'siteorigin_widget' );
|
41 |
+
|
42 |
$attr[ 'class' ] = html_entity_decode( $attr[ 'class' ] );
|
43 |
+
$attr[ 'class' ] = apply_filters( 'siteorigin_panels_widget_class', $attr[ 'class' ] );
|
44 |
|
45 |
global $wp_widget_factory;
|
46 |
if( ! empty( $attr[ 'class' ] ) && isset( $wp_widget_factory->widgets[ $attr[ 'class' ] ] ) ) {
|
85 |
$shortcode_name = apply_filters( 'siteorigin_panels_cache_shortcode', 'siteorigin_widget', $widget, $instance, $args );
|
86 |
|
87 |
$shortcode = '[' . $shortcode_name . ' ';
|
88 |
+
$shortcode .= 'class="' . htmlentities( preg_replace( '/\\\\+/', '\\\\\\\\', get_class( $widget ) ) ) . '"]';
|
89 |
$shortcode .= self::encode_data( $data ) ;
|
90 |
$shortcode .= '[/' . $shortcode_name . ']';
|
91 |
+
|
92 |
return $shortcode;
|
93 |
}
|
94 |
|
inc/widgets-bundle.php
DELETED
@@ -1,76 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// An array with all the SiteOrigin Widget Bundle widgets
|
4 |
-
return array(
|
5 |
-
'SiteOrigin_Widget_Editor_Widget' => array(
|
6 |
-
'class' => 'SiteOrigin_Widget_Editor_Widget',
|
7 |
-
'title' => __('SiteOrigin Editor', 'siteorigin-panels'),
|
8 |
-
'description' => __('A rich text editor', 'siteorigin-panels'),
|
9 |
-
'installed' => false,
|
10 |
-
'plugin' => array(
|
11 |
-
'name' => __('SiteOrigin Widgets Bundle', 'siteorigin-panels'),
|
12 |
-
'slug' => 'so-widgets-bundle'
|
13 |
-
),
|
14 |
-
'groups' => array('so-widgets-bundle'),
|
15 |
-
),
|
16 |
-
|
17 |
-
'SiteOrigin_Widget_Button_Widget' => array(
|
18 |
-
'class' => 'SiteOrigin_Widget_Button_Widget',
|
19 |
-
'title' => __('SiteOrigin Button', 'siteorigin-panels'),
|
20 |
-
'description' => __('A simple button', 'siteorigin-panels'),
|
21 |
-
'installed' => false,
|
22 |
-
'plugin' => array(
|
23 |
-
'name' => __('SiteOrigin Widgets Bundle', 'siteorigin-panels'),
|
24 |
-
'slug' => 'so-widgets-bundle'
|
25 |
-
),
|
26 |
-
'groups' => array('so-widgets-bundle'),
|
27 |
-
),
|
28 |
-
|
29 |
-
'SiteOrigin_Widget_Image_Widget' => array(
|
30 |
-
'class' => 'SiteOrigin_Widget_Image_Widget',
|
31 |
-
'title' => __('SiteOrigin Image', 'siteorigin-panels'),
|
32 |
-
'description' => __('Choose images from your media library.', 'siteorigin-panels'),
|
33 |
-
'installed' => false,
|
34 |
-
'plugin' => array(
|
35 |
-
'name' => __('SiteOrigin Widgets Bundle', 'siteorigin-panels'),
|
36 |
-
'slug' => 'so-widgets-bundle'
|
37 |
-
),
|
38 |
-
'groups' => array('so-widgets-bundle'),
|
39 |
-
),
|
40 |
-
|
41 |
-
'SiteOrigin_Widget_Slider_Widget' => array(
|
42 |
-
'class' => 'SiteOrigin_Widget_Slider_Widget',
|
43 |
-
'title' => __('SiteOrigin Slider', 'siteorigin-panels'),
|
44 |
-
'description' => __('A basic slider widget.', 'siteorigin-panels'),
|
45 |
-
'installed' => false,
|
46 |
-
'plugin' => array(
|
47 |
-
'name' => __('SiteOrigin Widgets Bundle', 'siteorigin-panels'),
|
48 |
-
'slug' => 'so-widgets-bundle'
|
49 |
-
),
|
50 |
-
'groups' => array('so-widgets-bundle'),
|
51 |
-
),
|
52 |
-
|
53 |
-
'SiteOrigin_Widget_Features_Widget' => array(
|
54 |
-
'class' => 'SiteOrigin_Widget_Features_Widget',
|
55 |
-
'title' => __('SiteOrigin Features', 'siteorigin-panels'),
|
56 |
-
'description' => __('Display site features as a collection of icons.', 'siteorigin-panels'),
|
57 |
-
'installed' => false,
|
58 |
-
'plugin' => array(
|
59 |
-
'name' => __('SiteOrigin Widgets Bundle', 'siteorigin-panels'),
|
60 |
-
'slug' => 'so-widgets-bundle'
|
61 |
-
),
|
62 |
-
'groups' => array('so-widgets-bundle'),
|
63 |
-
),
|
64 |
-
|
65 |
-
'SiteOrigin_Widget_PostCarousel_Widget' => array(
|
66 |
-
'class' => 'SiteOrigin_Widget_PostCarousel_Widget',
|
67 |
-
'title' => __('SiteOrigin Post Carousel', 'siteorigin-panels'),
|
68 |
-
'description' => __('Display your posts as a carousel.', 'siteorigin-panels'),
|
69 |
-
'installed' => false,
|
70 |
-
'plugin' => array(
|
71 |
-
'name' => __('SiteOrigin Widgets Bundle', 'siteorigin-panels'),
|
72 |
-
'slug' => 'so-widgets-bundle'
|
73 |
-
),
|
74 |
-
'groups' => array('so-widgets-bundle'),
|
75 |
-
),
|
76 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/widgets.php
DELETED
@@ -1,216 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Add some default recommended widgets.
|
5 |
-
*
|
6 |
-
* @param $widgets
|
7 |
-
*
|
8 |
-
* @return array
|
9 |
-
*/
|
10 |
-
function siteorigin_panels_add_recommended_widgets($widgets){
|
11 |
-
|
12 |
-
if( !empty( $widgets['WP_Widget_Black_Studio_TinyMCE'] ) ){
|
13 |
-
$widgets['WP_Widget_Black_Studio_TinyMCE']['groups'] = array('recommended');
|
14 |
-
$widgets['WP_Widget_Black_Studio_TinyMCE']['icon'] = 'dashicons dashicons-edit';
|
15 |
-
}
|
16 |
-
|
17 |
-
if( siteorigin_panels_setting('recommended-widgets') ) {
|
18 |
-
// Add in all the widgets bundle widgets
|
19 |
-
$widgets = wp_parse_args(
|
20 |
-
$widgets,
|
21 |
-
include plugin_dir_path( __FILE__ ) . '/widgets-bundle.php'
|
22 |
-
);
|
23 |
-
}
|
24 |
-
|
25 |
-
foreach($widgets as $class => $data) {
|
26 |
-
if( strpos( $class, 'SiteOrigin_Panels_Widgets_' ) === 0 || strpos( $class, 'SiteOrigin_Panels_Widget_' ) === 0 ) {
|
27 |
-
$widgets[$class]['groups'] = array('panels');
|
28 |
-
}
|
29 |
-
}
|
30 |
-
|
31 |
-
$widgets['SiteOrigin_Panels_Widgets_Layout']['icon'] = 'dashicons dashicons-analytics';
|
32 |
-
|
33 |
-
$wordpress_widgets = array(
|
34 |
-
'WP_Widget_Pages',
|
35 |
-
'WP_Widget_Links',
|
36 |
-
'WP_Widget_Search',
|
37 |
-
'WP_Widget_Archives',
|
38 |
-
'WP_Widget_Meta',
|
39 |
-
'WP_Widget_Calendar',
|
40 |
-
'WP_Widget_Text',
|
41 |
-
'WP_Widget_Categories',
|
42 |
-
'WP_Widget_Recent_Posts',
|
43 |
-
'WP_Widget_Recent_Comments',
|
44 |
-
'WP_Widget_RSS',
|
45 |
-
'WP_Widget_Tag_Cloud',
|
46 |
-
'WP_Nav_Menu_Widget',
|
47 |
-
);
|
48 |
-
|
49 |
-
foreach($wordpress_widgets as $wordpress_widget) {
|
50 |
-
if( isset( $widgets[$wordpress_widget] ) ) {
|
51 |
-
$widgets[$wordpress_widget]['groups'] = array('wordpress');
|
52 |
-
$widgets[$wordpress_widget]['icon'] = 'dashicons dashicons-wordpress';
|
53 |
-
}
|
54 |
-
}
|
55 |
-
|
56 |
-
// Third-party plugins dettection.
|
57 |
-
foreach ($widgets as $widget_id => &$widget) {
|
58 |
-
if (strpos($widget_id, 'WC_') === 0 || strpos($widget_id, 'WooCommerce') !== FALSE) {
|
59 |
-
$widget['groups'][] = 'woocommerce';
|
60 |
-
}
|
61 |
-
if (strpos($widget_id, 'BBP_') === 0 || strpos($widget_id, 'BBPress') !== FALSE) {
|
62 |
-
$widget['groups'][] = 'bbpress';
|
63 |
-
}
|
64 |
-
if (strpos($widget_id, 'Jetpack') !== FALSE || strpos($widget['title'], 'Jetpack') !== FALSE) {
|
65 |
-
$widget['groups'][] = 'jetpack';
|
66 |
-
}
|
67 |
-
}
|
68 |
-
|
69 |
-
return $widgets;
|
70 |
-
|
71 |
-
}
|
72 |
-
add_filter('siteorigin_panels_widgets', 'siteorigin_panels_add_recommended_widgets');
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Add tabs to the widget dialog
|
76 |
-
*
|
77 |
-
* @param $tabs
|
78 |
-
*
|
79 |
-
* @return array
|
80 |
-
*/
|
81 |
-
function siteorigin_panels_add_widgets_dialog_tabs($tabs){
|
82 |
-
|
83 |
-
$tabs['widgets_bundle'] = array(
|
84 |
-
'title' => __('Widgets Bundle', 'siteorigin-panels'),
|
85 |
-
'filter' => array(
|
86 |
-
'groups' => array('so-widgets-bundle')
|
87 |
-
)
|
88 |
-
);
|
89 |
-
|
90 |
-
if( class_exists('SiteOrigin_Widgets_Bundle') ) {
|
91 |
-
// Add a message about enabling more widgets
|
92 |
-
$tabs['widgets_bundle']['message'] = preg_replace(
|
93 |
-
array(
|
94 |
-
'/1\{ *(.*?) *\}/'
|
95 |
-
),
|
96 |
-
array(
|
97 |
-
'<a href="' . admin_url('plugins.php?page=so-widgets-plugins') . '">$1</a>'
|
98 |
-
),
|
99 |
-
__('Enable more widgets in the 1{Widgets Bundle settings}.', 'siteorigin-panels')
|
100 |
-
);
|
101 |
-
}
|
102 |
-
else {
|
103 |
-
// Add a message about installing the widgets bundle
|
104 |
-
$tabs['widgets_bundle']['message'] = preg_replace(
|
105 |
-
'/1\{ *(.*?) *\}/',
|
106 |
-
'<a href="' . siteorigin_panels_plugin_activation_install_url( 'so-widgets-bundle', __('SiteOrigin Widgets Bundle', 'siteorigin-panels') ) . '">$1</a>',
|
107 |
-
__('Install the 1{Widgets Bundle} to get extra widgets.', 'siteorigin-panels')
|
108 |
-
);
|
109 |
-
}
|
110 |
-
|
111 |
-
$tabs['page_builder'] = array(
|
112 |
-
'title' => __('Page Builder Widgets', 'siteorigin-panels'),
|
113 |
-
'message' => preg_replace(
|
114 |
-
array(
|
115 |
-
'/1\{ *(.*?) *\}/'
|
116 |
-
),
|
117 |
-
array(
|
118 |
-
'<a href="' . admin_url('options-general.php?page=siteorigin_panels') . '">$1</a>'
|
119 |
-
),
|
120 |
-
__('You can enable the legacy (PB) widgets in the 1{Page Builder settings}.', 'siteorigin-panels')
|
121 |
-
),
|
122 |
-
'filter' => array(
|
123 |
-
'groups' => array('panels')
|
124 |
-
)
|
125 |
-
);
|
126 |
-
|
127 |
-
$tabs['wordpress'] = array(
|
128 |
-
'title' => __('WordPress Widgets', 'siteorigin-panels'),
|
129 |
-
'filter' => array(
|
130 |
-
'groups' => array('wordpress')
|
131 |
-
)
|
132 |
-
);
|
133 |
-
|
134 |
-
// Check for woocommerce plugin.
|
135 |
-
if (defined('WOOCOMMERCE_VERSION')) {
|
136 |
-
$tabs['woocommerce'] = array(
|
137 |
-
// TRANSLATORS: The name of WordPress plugin
|
138 |
-
'title' => __('WooCommerce', 'woocommerce'),
|
139 |
-
'filter' => array(
|
140 |
-
'groups' => array('woocommerce')
|
141 |
-
)
|
142 |
-
);
|
143 |
-
}
|
144 |
-
|
145 |
-
// Check for jetpack plugin.
|
146 |
-
if (defined('JETPACK__VERSION')) {
|
147 |
-
$tabs['jetpack'] = array(
|
148 |
-
// TRANSLATORS: The name of WordPress plugin
|
149 |
-
'title' => __('Jetpack', 'jetpack'),
|
150 |
-
'filter' => array(
|
151 |
-
'groups' => array('jetpack')
|
152 |
-
),
|
153 |
-
);
|
154 |
-
}
|
155 |
-
|
156 |
-
// Check for bbpress plugin.
|
157 |
-
if (function_exists('bbpress')) {
|
158 |
-
$tabs['bbpress'] = array(
|
159 |
-
// TRANSLATORS: The name of WordPress plugin
|
160 |
-
'title' => __('BBPress', 'bbpress'),
|
161 |
-
'filter' => array(
|
162 |
-
'groups' => array('bbpress')
|
163 |
-
),
|
164 |
-
);
|
165 |
-
}
|
166 |
-
|
167 |
-
$tabs['recommended'] = array(
|
168 |
-
'title' => __('Recommended Widgets', 'siteorigin-panels'),
|
169 |
-
'filter' => array(
|
170 |
-
'groups' => array('recommended')
|
171 |
-
)
|
172 |
-
);
|
173 |
-
|
174 |
-
return $tabs;
|
175 |
-
}
|
176 |
-
add_filter('siteorigin_panels_widget_dialog_tabs', 'siteorigin_panels_add_widgets_dialog_tabs', 20);
|
177 |
-
|
178 |
-
/**
|
179 |
-
* This will try restore bundled widgets.
|
180 |
-
*
|
181 |
-
* @param $object
|
182 |
-
* @param $widget
|
183 |
-
*
|
184 |
-
* @return \WP_Widget_Text
|
185 |
-
*/
|
186 |
-
function siteorigin_panels_restore_bundled_widget($object, $widget){
|
187 |
-
|
188 |
-
// We can skip this if there's already an object
|
189 |
-
if( !empty($object) ) return $object;
|
190 |
-
|
191 |
-
if( strpos($widget, 'SiteOrigin_Panels_Widget_') === 0 || strpos($widget, 'SiteOrigin_Panels_Widgets_') === 0 ) {
|
192 |
-
|
193 |
-
if( !class_exists('SiteOrigin_Panels_Widget') ) {
|
194 |
-
// Initialize the bundled widgets
|
195 |
-
include plugin_dir_path( SITEORIGIN_PANELS_BASE_FILE ) . '/widgets/widgets.php';
|
196 |
-
|
197 |
-
// Initialize all the widgets
|
198 |
-
origin_widgets_init();
|
199 |
-
siteorigin_panels_widgets_init();
|
200 |
-
|
201 |
-
// Set this to change the default behaviour to using the bundled widgets, wont override user settings though
|
202 |
-
add_option('siteorigin_panels_is_using_bundled', true);
|
203 |
-
}
|
204 |
-
|
205 |
-
if( class_exists($widget) ) {
|
206 |
-
$object = new $widget();
|
207 |
-
}
|
208 |
-
}
|
209 |
-
elseif(!is_admin() && ( $widget == 'WP_Widget_Black_Studio_TinyMCE' || $widget == 'SiteOrigin_Widget_Editor_Widget' ) ) {
|
210 |
-
// If the visual editor is missing, we can replace it with the text widget for now
|
211 |
-
$object = new WP_Widget_Text();
|
212 |
-
}
|
213 |
-
|
214 |
-
return $object;
|
215 |
-
}
|
216 |
-
add_filter('siteorigin_panels_widget_object', 'siteorigin_panels_restore_bundled_widget', 10, 2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/siteorigin-panels-25.js
CHANGED
@@ -2982,7 +2982,7 @@ module.exports = Backbone.Model.extend({
|
|
2982 |
data = JSON.parse( decodeEntities( dataInput.val( ) ) ),
|
2983 |
newWidget = data.instance;
|
2984 |
|
2985 |
-
panels_info.class = classMatch[1];
|
2986 |
panels_info.raw = false;
|
2987 |
|
2988 |
newWidget.panels_info = panels_info;
|
2982 |
data = JSON.parse( decodeEntities( dataInput.val( ) ) ),
|
2983 |
newWidget = data.instance;
|
2984 |
|
2985 |
+
panels_info.class = classMatch[1].replace( /\\\\+/g, '\\' );
|
2986 |
panels_info.raw = false;
|
2987 |
|
2988 |
newWidget.panels_info = panels_info;
|
js/siteorigin-panels-25.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
!function e(t,i,s){function l(n,a){if(!i[n]){if(!t[n]){var r="function"==typeof require&&require;if(!a&&r)return r(n,!0);if(o)return o(n,!0);var d=new Error("Cannot find module '"+n+"'");throw d.code="MODULE_NOT_FOUND",d}var c=i[n]={exports:{}};t[n][0].call(c.exports,function(e){var i=t[n][1][e];return l(i||e)},c,c.exports,e,t,i,s)}return i[n].exports}for(var o="function"==typeof require&&require,n=0;n<s.length;n++)l(s[n]);return l}({1:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.cell,initialize:function(){},totalWeight:function(){var e=0;return this.each(function(t){e+=t.get("weight")}),e}})},{}],2:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.historyEntry,builder:null,maxSize:12,initialize:function(){this.on("add",this.onAddEntry,this)},addEntry:function(e,t){_.isEmpty(t)&&(t=this.builder.getPanelsData());var i=new s.model.historyEntry({text:e,data:JSON.stringify(t),time:parseInt((new Date).getTime()/1e3),collection:this});this.add(i)},onAddEntry:function(e){if(this.models.length>1){var t=this.at(this.models.length-2);(e.get("text")===t.get("text")&&e.get("time")-t.get("time")<15||e.get("data")===t.get("data"))&&(this.remove(e),t.set("count",t.get("count")+1))}for(;this.models.length>this.maxSize;)this.shift()}})},{}],3:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.row,empty:function(){for(var e;;){if(!(e=this.collection.first()))break;e.destroy()}}})},{}],4:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.widget,initialize:function(){}})},{}],5:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({dialogClass:"so-panels-dialog-add-builder",render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-builder").html(),{})),this.$(".so-content .siteorigin-panels-builder").append(this.builder.$el)},initializeDialog:function(){var e=this;this.once("open_dialog_complete",function(){e.builder.initSortable()}),this.on("open_dialog_complete",function(){e.builder.trigger("builder_resize")})}})},{}],6:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({historyEntryTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-history-entry").html())),entries:{},currentEntry:null,revertEntry:null,selectedEntry:null,previewScrollTop:null,dialogClass:"so-panels-dialog-history",dialogIcon:"history",events:{"click .so-close":"closeDialog","click .so-restore":"restoreSelectedEntry"},initializeDialog:function(){this.entries=new s.collection.historyEntries,this.on("open_dialog",this.setCurrentEntry,this),this.on("open_dialog",this.renderHistoryEntries,this)},render:function(){var e=this;this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-history").html(),{})),this.$("iframe.siteorigin-panels-history-iframe").load(function(){var t=l(this);t.show(),t.contents().scrollTop(e.previewScrollTop)})},setRevertEntry:function(e){this.revertEntry=new s.model.historyEntry({data:JSON.stringify(e.getPanelsData()),time:parseInt((new Date).getTime()/1e3)})},setCurrentEntry:function(){this.currentEntry=new s.model.historyEntry({data:JSON.stringify(this.builder.model.getPanelsData()),time:parseInt((new Date).getTime()/1e3)}),this.selectedEntry=this.currentEntry,this.previewEntry(this.currentEntry),this.$(".so-buttons .so-restore").addClass("disabled")},renderHistoryEntries:function(){var e=this,t=this.$(".history-entries").empty();this.currentEntry.get("data")===this.revertEntry.get("data")&&_.isEmpty(this.entries.models)||l(this.historyEntryTemplate({title:panelsOptions.loc.history.revert,count:1})).data("historyEntry",this.revertEntry).prependTo(t),this.entries.each(function(i){var s=e.historyEntryTemplate({title:panelsOptions.loc.history[i.get("text")],count:i.get("count")});l(s).data("historyEntry",i).prependTo(t)}),l(this.historyEntryTemplate({title:panelsOptions.loc.history.current,count:1})).data("historyEntry",this.currentEntry).addClass("so-selected").prependTo(t),t.find(".history-entry").click(function(){var i=jQuery(this);t.find(".history-entry").not(i).removeClass("so-selected"),i.addClass("so-selected");var s=i.data("historyEntry");e.selectedEntry=s,e.selectedEntry.cid!==e.currentEntry.cid?e.$(".so-buttons .so-restore").removeClass("disabled"):e.$(".so-buttons .so-restore").addClass("disabled"),e.previewEntry(s)}),this.updateEntryTimes()},previewEntry:function(e){var t=this.$("iframe.siteorigin-panels-history-iframe");t.hide(),this.previewScrollTop=t.contents().scrollTop(),this.$('form.history-form input[name="live_editor_panels_data"]').val(e.get("data")),this.$('form.history-form input[name="live_editor_post_ID"]').val(this.builder.config.postId),this.$("form.history-form").submit()},restoreSelectedEntry:function(){return!this.$(".so-buttons .so-restore").hasClass("disabled")&&(this.currentEntry.get("data")===this.selectedEntry.get("data")?(this.closeDialog(),!1):("restore"!==this.selectedEntry.get("text")&&this.builder.addHistoryEntry("restore",this.builder.model.getPanelsData()),this.builder.model.loadPanelsData(JSON.parse(this.selectedEntry.get("data"))),this.closeDialog(),!1))},updateEntryTimes:function(){var e=this;this.$(".history-entries .history-entry").each(function(){var t=jQuery(this),i=t.find(".timesince"),s=t.data("historyEntry");i.html(e.timeSince(s.get("time")))})},timeSince:function(e){var t,i=parseInt((new Date).getTime()/1e3)-e,s=[];return i>3600&&(t=Math.floor(i/3600),1===t?s.push(panelsOptions.loc.time.hour.replace("%d",t)):s.push(panelsOptions.loc.time.hours.replace("%d",t)),i-=3600*t),i>60&&(t=Math.floor(i/60),1===t?s.push(panelsOptions.loc.time.minute.replace("%d",t)):s.push(panelsOptions.loc.time.minutes.replace("%d",t)),i-=60*t),i>0&&(1===i?s.push(panelsOptions.loc.time.second.replace("%d",i)):s.push(panelsOptions.loc.time.seconds.replace("%d",i))),_.isEmpty(s)?panelsOptions.loc.time.now:panelsOptions.loc.time.ago.replace("%s",s.slice(0,2).join(", "))}})},{}],7:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({directoryTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-directory-items").html())),builder:null,dialogClass:"so-panels-dialog-prebuilt-layouts",dialogIcon:"layouts",layoutCache:{},currentTab:!1,directoryPage:1,events:{"click .so-close":"closeDialog","click .so-sidebar-tabs li a":"tabClickHandler","click .so-content .layout":"layoutClickHandler","keyup .so-sidebar-search":"searchHandler","click .so-screenshot, .so-title":"directoryItemClickHandler"},initializeDialog:function(){var e=this;this.on("open_dialog",function(){e.$(".so-sidebar-tabs li a").first().click(),e.$(".so-status").removeClass("so-panels-loading")}),this.on("button_click",this.toolbarButtonClick,this)},render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-prebuilt").html(),{})),this.initToolbar()},tabClickHandler:function(e){e.preventDefault(),this.selectedLayoutItem=null,this.uploadedLayout=null,this.updateButtonState(!1),this.$(".so-sidebar-tabs li").removeClass("tab-active");var t=l(e.target),i=t.attr("href").split("#")[1];t.parent().addClass("tab-active");var s=this;this.$(".so-content").empty(),s.currentTab=i,"import"==i?this.displayImportExport():this.displayLayoutDirectory("",1,i),s.$(".so-sidebar-search").val("")},displayImportExport:function(){var e=this.$(".so-content").empty().removeClass("so-panels-loading");e.html(l("#siteorigin-panels-dialog-prebuilt-importexport").html());var t=this,i=t.$(".import-upload-ui").hide();new plupload.Uploader({runtimes:"html5,silverlight,flash,html4",browse_button:i.find(".file-browse-button").get(0),container:i.get(0),drop_element:i.find(".drag-upload-area").get(0),file_data_name:"panels_import_data",multiple_queues:!1,max_file_size:panelsOptions.plupload.max_file_size,url:panelsOptions.plupload.url,flash_swf_url:panelsOptions.plupload.flash_swf_url,silverlight_xap_url:panelsOptions.plupload.silverlight_xap_url,filters:[{title:panelsOptions.plupload.filter_title,extensions:"json"}],multipart_params:{action:"so_panels_import_layout"},init:{PostInit:function(e){e.features.dragdrop&&i.addClass("has-drag-drop"),i.show().find(".progress-precent").css("width","0%")},FilesAdded:function(e){i.find(".file-browse-button").blur(),i.find(".drag-upload-area").removeClass("file-dragover"),i.find(".progress-bar").fadeIn("fast"),t.$(".js-so-selected-file").text(panelsOptions.loc.prebuilt_loading),e.start()},UploadProgress:function(e,t){i.find(".progress-precent").css("width",t.percent+"%")},FileUploaded:function(e,s,l){var o=JSON.parse(l.response);_.isUndefined(o.widgets)?alert(panelsOptions.plupload.error_message):(t.uploadedLayout=o,i.find(".progress-bar").hide(),t.$(".js-so-selected-file").text(panelsOptions.loc.ready_to_insert.replace("%s",s.name)),t.updateButtonState(!0))},Error:function(){alert(panelsOptions.plupload.error_message)}}}).init(),i.find(".drag-upload-area").on("dragover",function(){l(this).addClass("file-dragover")}).on("dragleave",function(){l(this).removeClass("file-dragover")}),e.find(".so-export").submit(function(e){l(this).find('input[name="panels_export_data"]').val(JSON.stringify(t.builder.model.getPanelsData()))})},displayLayoutDirectory:function(e,t,i){var s=this,o=this.$(".so-content").empty().addClass("so-panels-loading");if(void 0===e&&(e=""),void 0===t&&(t=1),void 0===i&&(i="directory-siteorigin"),i.match("^directory-")&&!panelsOptions.directory_enabled)return o.removeClass("so-panels-loading").html(l("#siteorigin-panels-directory-enable").html()),void o.find(".so-panels-enable-directory").click(function(n){n.preventDefault(),l.get(panelsOptions.ajaxurl,{action:"so_panels_directory_enable"},function(){}),panelsOptions.directory_enabled=!0,o.addClass("so-panels-loading"),s.displayLayoutDirectory(e,t,i)});l.get(panelsOptions.ajaxurl,{action:"so_panels_layouts_query",search:e,page:t,type:i},function(n){if(s.currentTab===i){o.removeClass("so-panels-loading").html(s.directoryTemplate(n));var a=o.find(".so-previous"),r=o.find(".so-next");t<=1?a.addClass("button-disabled"):a.click(function(i){i.preventDefault(),s.displayLayoutDirectory(e,t-1,s.currentTab)}),t===n.max_num_pages||0===n.max_num_pages?r.addClass("button-disabled"):r.click(function(i){i.preventDefault(),s.displayLayoutDirectory(e,t+1,s.currentTab)}),o.find(".so-screenshot").each(function(){var e=l(this),t=e.find(".so-screenshot-wrapper");if(t.css("height",t.width()/4*3+"px").addClass("so-loading"),""!==e.data("src"))var i=l("<img/>").attr("src",e.data("src")).load(function(){t.removeClass("so-loading").css("height","auto"),i.appendTo(t).hide().fadeIn("fast")});else l("<img/>").attr("src",panelsOptions.prebuiltDefaultScreenshot).appendTo(t).hide().fadeIn("fast")}),o.find(".so-directory-browse").html(n.title)}},"json")},directoryItemClickHandler:function(e){var t=this.$(e.target).closest(".so-directory-item");this.$(".so-directory-items").find(".selected").removeClass("selected"),t.addClass("selected"),this.selectedLayoutItem={lid:t.data("layout-id"),type:t.data("layout-type")},this.updateButtonState(!0)},toolbarButtonClick:function(e){if(!this.canAddLayout())return!1;var t=e.data("value");if(_.isUndefined(t))return!1;if(this.updateButtonState(!1),e.hasClass("so-needs-confirm")&&!e.hasClass("so-confirmed")){if(this.updateButtonState(!0),e.hasClass("so-confirming"))return;e.addClass("so-confirming");var i=e.html();return e.html('<span class="dashicons dashicons-yes"></span>'+e.data("confirm")),setTimeout(function(){e.removeClass("so-confirmed").html(i)},2500),setTimeout(function(){e.removeClass("so-confirming"),e.addClass("so-confirmed")},200),!1}this.addingLayout=!0,"import"===this.currentTab?this.addLayoutToBuilder(this.uploadedLayout,t):this.loadSelectedLayout().then(function(e){this.addLayoutToBuilder(e,t)}.bind(this))},canAddLayout:function(){return(this.selectedLayoutItem||this.uploadedLayout)&&!this.addingLayout},loadSelectedLayout:function(){this.setStatusMessage(panelsOptions.loc.prebuilt_loading,!0);var e=_.extend(this.selectedLayoutItem,{action:"so_panels_get_layout"}),t=new l.Deferred;return l.get(panelsOptions.ajaxurl,e,function(e){void 0!==e.error?(alert(e.error),t.reject(e)):(this.setStatusMessage("",!1),t.resolve(e))}.bind(this)),t.promise()},searchHandler:function(e){13===e.keyCode&&this.displayLayoutDirectory(l(e.currentTarget).val(),1,this.currentTab)},updateButtonState:function(e){e=e&&(this.selectedLayoutItem||this.uploadedLayout);var t=this.$(".so-import-layout");t.prop("disabled",!e),e?t.removeClass("disabled"):t.addClass("disabled")},addLayoutToBuilder:function(e,t){this.builder.addHistoryEntry("prebuilt_loaded"),this.builder.model.loadPanelsData(e,t),this.addingLayout=!1,this.closeDialog()}})},{}],8:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({cellPreviewTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-row-cell-preview").html())),editableLabel:!0,events:{"click .so-close":"closeDialog","click .so-toolbar .so-save":"saveHandler","click .so-toolbar .so-insert":"insertHandler","click .so-toolbar .so-delete":"deleteHandler","click .so-toolbar .so-duplicate":"duplicateHandler","change .row-set-form > *":"setCellsFromForm","click .row-set-form button.set-row":"setCellsFromForm"},dialogIcon:"add-row",dialogClass:"so-panels-dialog-row-edit",styleType:"row",dialogType:"edit",row:{cells:null,style:{}},cellStylesCache:[],initializeDialog:function(){this.on("open_dialog",function(){_.isUndefined(this.model)||_.isEmpty(this.model.get("cells"))?this.setRowModel(null):this.setRowModel(this.model),this.regenerateRowPreview()},this),this.row={cells:new s.collection.cells([{weight:.5},{weight:.5}]),style:{}},this.dialogFormsLoaded=0;var e=this;this.on("form_loaded styles_loaded",function(){2===++this.dialogFormsLoaded&&e.updateModel({refreshArgs:{silent:!0}})}),this.on("close_dialog",this.closeHandler),this.on("edit_label",function(e){if(e!==panelsOptions.loc.row.add&&e!==panelsOptions.loc.row.edit||(e=""),this.model.set("label",e),_.isEmpty(e)){var t="create"===this.dialogType?panelsOptions.loc.row.add:panelsOptions.loc.row.edit;this.$(".so-title").text(t)}}.bind(this))},setRowDialogType:function(e){this.dialogType=e},render:function(){var e="create"===this.dialogType?panelsOptions.loc.row.add:panelsOptions.loc.row.edit;this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-row").html(),{title:e,dialogType:this.dialogType}));var t=this.$(".so-title");this.model.has("label")&&!_.isEmpty(this.model.get("label"))&&t.text(this.model.get("label")),this.$(".so-edit-title").val(t.text()),this.styles=new s.view.styles,this.styles.model=this.model,this.styles.render("row",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this}),this.builder.supports("addRow")||this.$(".so-buttons .so-duplicate").remove(),this.builder.supports("deleteRow")||this.$(".so-buttons .so-delete").remove();var i=this.$(".so-sidebar.so-right-sidebar");return this.styles.attach(i),this.styles.on("styles_loaded",function(e){e?i.removeClass("so-panels-loading"):(i.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar"),i.remove())},this),i.addClass("so-panels-loading"),_.isUndefined(this.model)||this.$("input.so-row-field").val(this.model.get("cells").length),this.$("input.so-row-field").keyup(function(){l(this).trigger("change")}),this},setRowModel:function(e){return this.model=e,_.isEmpty(this.model)?this:(this.row={cells:this.model.get("cells").clone(),style:{}},this.$("input.so-row-field").val(this.model.get("cells").length),this.clearCellStylesCache(),this)},regenerateRowPreview:function(){var e=this,t=this.$(".row-preview"),i=this.getSelectedCellIndex();t.empty();var s;this.row.cells.each(function(o,n){var a=l(this.cellPreviewTemplate({weight:o.get("weight")}));t.append(a),n==i&&a.find(".preview-cell-in").addClass("cell-selected");var r,d=a.prev();d.length&&(r=l('<div class="resize-handle"></div>'),r.appendTo(a).dblclick(function(){var t=e.row.cells.at(n-1),i=o.get("weight")+t.get("weight");o.set("weight",i/2),t.set("weight",i/2),e.scaleRowWidths()}),r.draggable({axis:"x",containment:t,start:function(e,t){var i=a.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:a.outerWidth(),left:6,height:a.outerHeight()});i.find(".resize-handle").remove();var s=d.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:d.outerWidth(),right:6,height:d.outerHeight()});s.find(".resize-handle").remove(),l(this).data({newCellClone:i,prevCellClone:s}),a.find("> .preview-cell-in").css("visibility","hidden"),d.find("> .preview-cell-in").css("visibility","hidden")},drag:function(i,s){var o=e.row.cells.at(n).get("weight"),a=e.row.cells.at(n-1).get("weight"),r=o-(s.position.left+6)/t.width(),d=a+(s.position.left+6)/t.width();s.helper.offset().left,t.offset().left;l(this).data("newCellClone").css("width",t.width()*r).find(".preview-cell-weight").html(Math.round(1e3*r)/10),l(this).data("prevCellClone").css("width",t.width()*d).find(".preview-cell-weight").html(Math.round(1e3*d)/10)},stop:function(i,s){l(this).data("newCellClone").remove(),l(this).data("prevCellClone").remove(),a.find(".preview-cell-in").css("visibility","visible"),d.find(".preview-cell-in").css("visibility","visible");var o=s.position.left+6,r=o/t.width(),c=e.row.cells.at(n),h=e.row.cells.at(n-1);c.get("weight")-r>.02&&h.get("weight")+r>.02&&(c.set("weight",c.get("weight")-r),h.set("weight",h.get("weight")+r)),e.scaleRowWidths(),s.helper.css("left",-6)}})),a.click(function(e){if(l(e.target).is(".preview-cell")||l(e.target).is(".preview-cell-in")){var t=l(e.target);t.closest(".row-preview").find(".preview-cell .preview-cell-in").removeClass("cell-selected"),t.addClass("cell-selected"),this.openSelectedCellStyles()}}.bind(this)),a.find(".preview-cell-weight").click(function(i){e.$(".resize-handle").css("pointer-event","none").draggable("disable"),t.find(".preview-cell-weight").each(function(){var i=jQuery(this).hide();l('<input type="text" class="preview-cell-weight-input no-user-interacted" />').val(parseFloat(i.html())).insertAfter(i).focus(function(){clearTimeout(s)}).keyup(function(e){9!==e.keyCode&&l(this).removeClass("no-user-interacted"),13===e.keyCode&&(e.preventDefault(),l(this).blur())}).keydown(function(e){if(9===e.keyCode){e.preventDefault();var i=t.find(".preview-cell-weight-input"),s=i.index(l(this));s===i.length-1?i.eq(0).focus().select():i.eq(s+1).focus().select()}}).blur(function(){t.find(".preview-cell-weight-input").each(function(t,i){isNaN(parseFloat(l(i).val()))&&l(i).val(Math.floor(1e3*e.row.cells.at(t).get("weight"))/10)}),s=setTimeout(function(){if(0===t.find(".preview-cell-weight-input").length)return!1;var i=[],s=[],o=0,n=0;if(t.find(".preview-cell-weight-input").each(function(t,a){var r=parseFloat(l(a).val());r=isNaN(r)?1/e.row.cells.length:Math.round(10*r)/1e3;var d=!l(a).hasClass("no-user-interacted");i.push(r),s.push(d),d?o+=r:n+=r}),o>0&&n>0&&1-o>0)for(var a=0;a<i.length;a++)s[a]||(i[a]=i[a]/n*(1-o));var r=_.reduce(i,function(e,t){return e+t});i=i.map(function(e){return e/r}),Math.min.apply(Math,i)>.01&&e.row.cells.each(function(e,t){e.set("weight",i[t])}),t.find(".preview-cell").each(function(t,i){var s=e.row.cells.at(t).get("weight");l(i).animate({width:Math.round(1e3*s)/10+"%"},250),l(i).find(".preview-cell-weight-input").val(Math.round(1e3*s)/10)}),t.find(".preview-cell").css("overflow","visible"),setTimeout(function(){e.regenerateRowPreview()},260)},100)}).click(function(){l(this).select()})}),l(this).siblings(".preview-cell-weight-input").select()})},this),this.openSelectedCellStyles(),this.trigger("form_loaded",this)},getSelectedCellIndex:function(){var e=-1;return this.$(".preview-cell .preview-cell-in").each(function(t,i){l(i).is(".cell-selected")&&(e=t)}),e},openSelectedCellStyles:function(){if(!_.isUndefined(this.cellStyles)){if(this.cellStyles.stylesLoaded){var e={};try{e=this.getFormValues(".so-sidebar .so-visual-styles.so-cell-styles").style}catch(e){console.log("Error retrieving cell styles - "+e.message)}this.cellStyles.model.set("style",e)}this.cellStyles.detach()}if(this.cellStyles=this.getSelectedCellStyles(),this.cellStyles){var t=this.$(".so-sidebar.so-right-sidebar");this.cellStyles.attach(t),this.cellStyles.stylesLoaded||(this.cellStyles.on("styles_loaded",function(){t.removeClass("so-panels-loading")},this),t.addClass("so-panels-loading"))}},getSelectedCellStyles:function(){var e=this.getSelectedCellIndex();if(e>-1){var t=this.cellStylesCache[e];t||(t=new s.view.styles,t.model=this.row.cells.at(e),t.render("cell",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this,index:e}),this.cellStylesCache[e]=t)}return t},clearCellStylesCache:function(){this.cellStylesCache.forEach(function(e){e.remove()}),this.cellStylesCache=[]},scaleRowWidths:function(){var e=this;this.$(".row-preview .preview-cell").each(function(t,i){var s=e.row.cells.at(t);l(i).css("width",100*s.get("weight")+"%").find(".preview-cell-weight").html(Math.round(1e3*s.get("weight"))/10)})},setCellsFromForm:function(){try{var e={cells:parseInt(this.$('.row-set-form input[name="cells"]').val()),ratio:parseFloat(this.$('.row-set-form select[name="ratio"]').val()),direction:this.$('.row-set-form select[name="ratio_direction"]').val()};_.isNaN(e.cells)&&(e.cells=1),isNaN(e.ratio)&&(e.ratio=1),e.cells<1?(e.cells=1,this.$('.row-set-form input[name="cells"]').val(e.cells)):e.cells>12&&(e.cells=12,this.$('.row-set-form input[name="cells"]').val(e.cells)),this.$('.row-set-form input[name="ratio"]').val(e.ratio);for(var t=[],i=this.row.cells.length!==e.cells,o=1,n=0;n<e.cells;n++)t.push(o),o*=e.ratio;var a=_.reduce(t,function(e,t){return e+t});if(t=_.map(t,function(e){return e/a}),t=_.filter(t,function(e){return e>.01}),"left"===e.direction&&(t=t.reverse()),this.row.cells=new s.collection.cells(this.row.cells.first(t.length)),_.each(t,function(e,t){var i=this.row.cells.at(t);i?i.set("weight",e):(i=new s.model.cell({weight:e,row:this.model}),this.row.cells.add(i))}.bind(this)),i)this.regenerateRowPreview();else{var r=this;this.$(".preview-cell").each(function(e,t){var i=r.row.cells.at(e).get("weight");l(t).animate({width:Math.round(1e3*i)/10+"%"},250),l(t).find(".preview-cell-weight").html(Math.round(1e3*i)/10)}),this.$(".preview-cell").css("overflow","visible"),setTimeout(function(){r.regenerateRowPreview()},260)}}catch(e){console.log("Error setting cells - "+e.message)}this.$(".row-set-form .so-button-row-set").removeClass("button-primary")},tabClickHandler:function(e){"#row-layout"===e.attr("href")?this.$(".so-panels-dialog").addClass("so-panels-dialog-has-right-sidebar"):this.$(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar")},updateModel:function(e){if(e=_.extend({refresh:!0,refreshArgs:null},e),_.isEmpty(this.model)||this.model.setCells(this.row.cells),!_.isUndefined(this.styles)&&this.styles.stylesLoaded){var t={};try{t=this.getFormValues(".so-sidebar .so-visual-styles.so-row-styles").style}catch(e){console.log("Error retrieving row styles - "+e.message)}this.model.set("style",t)}if(!_.isUndefined(this.cellStyles)&&this.cellStyles.stylesLoaded){var t={};try{t=this.getFormValues(".so-sidebar .so-visual-styles.so-cell-styles").style}catch(e){console.log("Error retrieving cell styles - "+e.message)}this.cellStyles.model.set("style",t)}e.refresh&&this.builder.model.refreshPanelsData(e.refreshArgs)},insertHandler:function(){this.builder.addHistoryEntry("row_added"),this.updateModel();var e=this.builder.getActiveCell({createCell:!1}),t={};return null!==e&&(t.at=this.builder.model.get("rows").indexOf(e.row)+1),this.model.collection=this.builder.model.get("rows"),this.builder.model.get("rows").add(this.model,t),this.closeDialog(),this.builder.model.refreshPanelsData(),!1},saveHandler:function(){return this.builder.addHistoryEntry("row_edited"),this.updateModel(),this.closeDialog(),this.builder.model.refreshPanelsData(),!1},deleteHandler:function(){return this.model.trigger("visual_destroy"),this.closeDialog({silent:!0}),!1},duplicateHandler:function(){this.builder.addHistoryEntry("row_duplicated");var e=this.model.clone(this.builder.model);return this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.closeDialog({silent:!0}),!1},closeHandler:function(){this.clearCellStylesCache(),_.isUndefined(this.cellStyles)||(this.cellStyles=void 0)}})},{}],9:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({builder:null,sidebarWidgetTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-widget-sidebar-widget").html())),dialogClass:"so-panels-dialog-edit-widget",dialogIcon:"add-widget",widgetView:!1,savingWidget:!1,editableLabel:!0,events:{"click .so-close":"saveHandler","click .so-nav.so-previous":"navToPrevious","click .so-nav.so-next":"navToNext","click .so-toolbar .so-delete":"deleteHandler","click .so-toolbar .so-duplicate":"duplicateHandler"},initializeDialog:function(){var e=this;this.model.on("change:values",this.handleChangeValues,this),this.model.on("destroy",this.remove,this),this.dialogFormsLoaded=0,this.on("form_loaded styles_loaded",function(){2===++this.dialogFormsLoaded&&e.updateModel({refreshArgs:{silent:!0}})}),this.on("edit_label",function(e){e===panelsOptions.widgets[this.model.get("class")].title&&(e=""),this.model.set("label",e),_.isEmpty(e)&&this.$(".so-title").text(this.model.getWidgetField("title"))}.bind(this))},render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-widget").html(),{})),this.loadForm();var e=this.model.getWidgetField("title");this.$(".so-title .widget-name").html(e),this.$(".so-edit-title").val(e),this.builder.supports("addWidget")||this.$(".so-buttons .so-duplicate").remove(),this.builder.supports("deleteWidget")||this.$(".so-buttons .so-delete").remove(),this.styles=new s.view.styles,this.styles.model=this.model,this.styles.render("widget",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this});var t=this.$(".so-sidebar.so-right-sidebar");this.styles.attach(t),this.styles.on("styles_loaded",function(e){e?t.removeClass("so-panels-loading"):(t.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar"),t.remove())},this),t.addClass("so-panels-loading")},getPrevDialog:function(){var e=this.builder.$(".so-cells .cell .so-widget");if(e.length<=1)return!1;var t=e.index(this.widgetView.$el);if(0===t)return!1;do{if(widgetView=e.eq(--t).data("view"),!_.isUndefined(widgetView)&&!widgetView.model.get("read_only"))return widgetView.getEditDialog()}while(!_.isUndefined(widgetView)&&t>0);return!1},getNextDialog:function(){var e=this.builder.$(".so-cells .cell .so-widget");if(e.length<=1)return!1;var t,i=e.index(this.widgetView.$el);if(i===e.length-1)return!1;do{if(t=e.eq(++i).data("view"),!_.isUndefined(t)&&!t.model.get("read_only"))return t.getEditDialog()}while(!_.isUndefined(t));return!1},loadForm:function(){if(this.$("> *").length){var e=this;this.$(".so-content").addClass("so-panels-loading");var t={action:"so_panels_widget_form",widget:this.model.get("class"),instance:JSON.stringify(this.model.get("values")),raw:this.model.get("raw")};l.post(panelsOptions.ajaxurl,t,function(t){var i=t.replace(/{\$id}/g,e.model.cid);e.$(".so-content").removeClass("so-panels-loading").html(i),e.trigger("form_loaded",e),e.$(".panel-dialog").trigger("panelsopen"),e.on("close_dialog",e.updateModel,e)},"html")}},updateModel:function(e){if(e=_.extend({refresh:!0,refreshArgs:null},e),this.savingWidget=!0,!this.model.get("missing")){var t=this.getFormValues();_.isUndefined(t.widgets)?t={}:(t=t.widgets,t=t[Object.keys(t)[0]]),this.model.setValues(t),this.model.set("raw",!0)}if(this.styles.stylesLoaded){var i={};try{i=this.getFormValues(".so-sidebar .so-visual-styles").style}catch(e){}this.model.set("style",i)}this.savingWidget=!1,e.refresh&&this.builder.model.refreshPanelsData(e.refreshArgs)},handleChangeValues:function(){this.savingWidget||this.loadForm()},saveHandler:function(){this.builder.addHistoryEntry("widget_edited"),this.closeDialog()},deleteHandler:function(){return this.model.trigger("visual_destroy"),this.closeDialog({silent:!0}),this.builder.model.refreshPanelsData(),!1},duplicateHandler:function(){return this.model.trigger("user_duplicate"),this.closeDialog({silent:!0}),this.builder.model.refreshPanelsData(),!1}})},{}],10:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({builder:null,widgetTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-widgets-widget").html())),filter:{},dialogClass:"so-panels-dialog-add-widget",dialogIcon:"add-widget",events:{"click .so-close":"closeDialog","click .widget-type":"widgetClickHandler","keyup .so-sidebar-search":"searchHandler"},initializeDialog:function(){this.on("open_dialog",function(){this.filter.search="",this.filterWidgets(this.filter)},this),this.on("open_dialog_complete",function(){this.$(".so-sidebar-search").val("").focus(),this.balanceWidgetHeights()}),this.on("tab_click",this.tabClickHandler,this)},render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-widgets").html(),{})),_.each(panelsOptions.widgets,function(e){var t=l(this.widgetTemplate({title:e.title,description:e.description}));_.isUndefined(e.icon)&&(e.icon="dashicons dashicons-admin-generic"),l('<span class="widget-icon" />').addClass(e.icon).prependTo(t.find(".widget-type-wrapper")),t.data("class",e.class).appendTo(this.$(".widget-type-list"))},this);var e=this.$(".so-sidebar-tabs");_.each(panelsOptions.widget_dialog_tabs,function(t){l(this.dialogTabTemplate({title:t.title})).data({message:t.message,filter:t.filter}).appendTo(e)},this),this.initTabs();var t=this;l(window).resize(function(){t.balanceWidgetHeights()})},tabClickHandler:function(e){this.filter=e.parent().data("filter"),this.filter.search=this.$(".so-sidebar-search").val();var t=e.parent().data("message");return _.isEmpty(t)&&(t=""),this.$(".so-toolbar .so-status").html(t),this.filterWidgets(this.filter),!1},searchHandler:function(e){if(13===e.which){var t=this.$(".widget-type-list .widget-type:visible");1===t.length&&t.click()}else this.filter.search=l(e.target).val().trim(),this.filterWidgets(this.filter)},filterWidgets:function(e){_.isUndefined(e)&&(e={}),_.isUndefined(e.groups)&&(e.groups=""),this.$(".widget-type-list .widget-type").each(function(){var t,i=l(this),s=i.data("class"),o=_.isUndefined(panelsOptions.widgets[s])?null:panelsOptions.widgets[s];t=!!_.isEmpty(e.groups)||null!==o&&!_.isEmpty(_.intersection(e.groups,panelsOptions.widgets[s].groups)),t&&(_.isUndefined(e.search)||""===e.search||-1===o.title.toLowerCase().indexOf(e.search.toLowerCase())&&(t=!1)),t?i.show():i.hide()}),this.balanceWidgetHeights()},widgetClickHandler:function(e){this.builder.addHistoryEntry("widget_added");var t=l(e.currentTarget),i=new s.model.widget({class:t.data("class")});i.cell=this.builder.getActiveCell(),i.cell.get("widgets").add(i),this.closeDialog(),this.builder.model.refreshPanelsData()},balanceWidgetHeights:function(e){var t=[[]],i=null,s=Math.round(this.$(".widget-type").parent().width()/this.$(".widget-type").width());this.$(".widget-type").css("clear","none").filter(":visible").each(function(e,t){e%s==0&&0!==e&&l(t).css("clear","both")}),this.$(".widget-type-wrapper").css("height","auto").filter(":visible").each(function(e,s){var o=l(s);null!==i&&i.position().top!==o.position().top&&(t[t.length]=[]),i=o,t[t.length-1].push(o)}),_.each(t,function(e,t){var i=_.max(e.map(function(e){return e.height()}));_.each(e,function(e){e.height(i)})})}})},{}],11:[function(e,t,i){t.exports={canCopyPaste:function(){return"undefined"!=typeof Storage&&panelsOptions.user},setModel:function(e){if(!this.canCopyPaste())return!1;var t=panels.helpers.serialize.serialize(e)
|
2 |
-
;return e instanceof panels.model.row?t.thingType="row-model":e instanceof panels.model.widget&&(t.thingType="widget-model"),localStorage["panels_clipboard_"+panelsOptions.user]=JSON.stringify(t),!0},isModel:function(e){if(!this.canCopyPaste())return!1;var t=localStorage["panels_clipboard_"+panelsOptions.user];return void 0!==t&&(t=JSON.parse(t),t.thingType&&t.thingType===e)},getModel:function(e){if(!this.canCopyPaste())return null;var t=localStorage["panels_clipboard_"+panelsOptions.user];return void 0!==t&&(t=JSON.parse(t),t.thingType&&t.thingType===e)?panels.helpers.serialize.unserialize(t,t.thingType,null):null}}},{}],12:[function(e,t,i){t.exports={lock:function(){if("hidden"!==jQuery("body").css("overflow")){var e=[self.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,self.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop];jQuery("body").data({"scroll-position":e}).css("overflow","hidden"),_.isUndefined(e)||window.scrollTo(e[0],e[1])}},unlock:function(){if("hidden"===jQuery("body").css("overflow")&&!jQuery(".so-panels-dialog-wrapper").is(":visible")&&!jQuery(".so-panels-live-editor").is(":visible")){jQuery("body").css("overflow","visible");var e=jQuery("body").data("scroll-position");_.isUndefined(e)||window.scrollTo(e[0],e[1])}}}},{}],13:[function(e,t,i){t.exports={serialize:function(e){var t;if(e instanceof Backbone.Model){var i={};for(var s in e.attributes)if(e.attributes.hasOwnProperty(s)){if("builder"===s||"collection"===s)continue;t=e.attributes[s],t instanceof Backbone.Model||t instanceof Backbone.Collection?i[s]=this.serialize(t):i[s]=t}return i}if(e instanceof Backbone.Collection){for(var l=[],o=0;o<e.models.length;o++)t=e.models[o],t instanceof Backbone.Model||t instanceof Backbone.Collection?l.push(this.serialize(t)):l.push(t);return l}},unserialize:function(e,t,i){var s;switch(t){case"row-model":s=new panels.model.row,s.builder=i,s.set("style",e.style),s.setCells(this.unserialize(e.cells,"cell-collection",s));break;case"cell-model":s=new panels.model.cell,s.row=i,s.set("weight",e.weight),s.set("style",e.style),s.set("widgets",this.unserialize(e.widgets,"widget-collection",s));break;case"widget-model":s=new panels.model.widget,s.cell=i;for(var l in e)e.hasOwnProperty(l)&&s.set(l,e[l]);s.set("widget_id",panels.helpers.utils.generateUUID());break;case"cell-collection":s=new panels.collection.cells;for(var o=0;o<e.length;o++)s.push(this.unserialize(e[o],"cell-model",i));break;case"widget-collection":s=new panels.collection.widgets;for(var o=0;o<e.length;o++)s.push(this.unserialize(e[o],"widget-model",i));break;default:console.log("Unknown Thing - "+t)}return s}}},{}],14:[function(e,t,i){t.exports={generateUUID:function(){var e=(new Date).getTime();return window.performance&&"function"==typeof window.performance.now&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?i:3&i|8).toString(16)})},processTemplate:function(e){return e=e.replace(/{{%/g,"<%"),e=e.replace(/%}}/g,"%>"),e=e.trim()},selectElementContents:function(e){var t=document.createRange();t.selectNodeContents(e);var i=window.getSelection();i.removeAllRanges(),i.addRange(t)}}},{}],15:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=function(e){return this.each(function(){var t=jQuery(this),i=t.closest("form").find(".widget-id").val(),o=l.extend(!0,{},e);if(_.isUndefined(i)||!(i.indexOf("__i__")>-1)){var n=new s.model.builder,a=new s.view.builder({model:n,config:o}),r=t.closest(".so-panels-dialog-wrapper").data("view");_.isUndefined(r)||(r.on("close_dialog",function(){n.refreshPanelsData()}),r.on("open_dialog_complete",function(){a.trigger("builder_resize")}),r.model.on("destroy",function(){n.emptyRows().destroy()}),a.setDialogParents(panelsOptions.loc.layout_widget,r));var d=Boolean(t.closest(".widget-content").length);a.render().attach({container:t,dialog:d||"dialog"===t.data("mode"),type:t.data("type")}).setDataField(t.find("input.panels-data")),d||"dialog"===t.data("mode")?(a.setDialogParents(panelsOptions.loc.layout_widget,a.dialog),t.find(".siteorigin-panels-display-builder").click(function(e){e.preventDefault(),a.dialog.openDialog()})):t.find(".siteorigin-panels-display-builder").parent().remove(),l(document).trigger("panels_setup",a)}})}},{}],16:[function(e,t,i){var s={};window.panels=s,window.siteoriginPanels=s,s.helpers={},s.helpers.clipboard=e("./helpers/clipboard"),s.helpers.utils=e("./helpers/utils"),s.helpers.serialize=e("./helpers/serialize"),s.helpers.pageScroll=e("./helpers/page-scroll"),s.model={},s.model.widget=e("./model/widget"),s.model.cell=e("./model/cell"),s.model.row=e("./model/row"),s.model.builder=e("./model/builder"),s.model.historyEntry=e("./model/history-entry"),s.collection={},s.collection.widgets=e("./collection/widgets"),s.collection.cells=e("./collection/cells"),s.collection.rows=e("./collection/rows"),s.collection.historyEntries=e("./collection/history-entries"),s.view={},s.view.widget=e("./view/widget"),s.view.cell=e("./view/cell"),s.view.row=e("./view/row"),s.view.builder=e("./view/builder"),s.view.dialog=e("./view/dialog"),s.view.styles=e("./view/styles"),s.view.liveEditor=e("./view/live-editor"),s.dialog={},s.dialog.builder=e("./dialog/builder"),s.dialog.widgets=e("./dialog/widgets"),s.dialog.widget=e("./dialog/widget"),s.dialog.prebuilt=e("./dialog/prebuilt"),s.dialog.row=e("./dialog/row"),s.dialog.history=e("./dialog/history"),s.utils={},s.utils.menu=e("./utils/menu"),jQuery.fn.soPanelsSetupBuilderWidget=e("./jquery/setup-builder-widget"),jQuery(function(e){var t,i,s,l;if(e("#siteorigin-panels-metabox").length&&e("form#post").length)t=e("#siteorigin-panels-metabox"),i=e("#siteorigin-panels-metabox .siteorigin-panels-data-field"),s=e("form#post"),l={editorType:"tinyMCE",postId:e("#post_ID").val(),editorId:"#content",builderType:e("#siteorigin-panels-metabox").data("builder-type"),builderSupports:e("#siteorigin-panels-metabox").data("builder-supports"),loadOnAttach:panelsOptions.loadOnAttach&&1==e("#auto_draft").val(),loadLiveEditor:1==e("#siteorigin-panels-metabox").data("live-editor"),liveEditorPreview:t.data("preview-url")};else if(e(".siteorigin-panels-builder-form").length){var o=e(".siteorigin-panels-builder-form");t=o.find(".siteorigin-panels-builder-container"),i=o.find('input[name="panels_data"]'),s=o,l={editorType:"standalone",postId:o.data("post-id"),editorId:"#post_content",builderType:o.data("type"),builderSupports:o.data("builder-supports"),loadLiveEditor:!1,liveEditorPreview:o.data("preview-url")}}if(!_.isUndefined(t)){var n=window.siteoriginPanels,a=new n.model.builder,r=new n.view.builder({model:a,config:l});r.render().attach({container:t}).setDataField(i).attachToEditor(),s.submit(function(){a.refreshPanelsData()}),t.removeClass("so-panels-loading"),e(document).trigger("panels_setup",r,window.panels)}e(document).on("widget-added",function(t,i){e(i).find(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()}),e("body").hasClass("wp-customizer")||e(function(){e(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()})})},{"./collection/cells":1,"./collection/history-entries":2,"./collection/rows":3,"./collection/widgets":4,"./dialog/builder":5,"./dialog/history":6,"./dialog/prebuilt":7,"./dialog/row":8,"./dialog/widget":9,"./dialog/widgets":10,"./helpers/clipboard":11,"./helpers/page-scroll":12,"./helpers/serialize":13,"./helpers/utils":14,"./jquery/setup-builder-widget":15,"./model/builder":17,"./model/cell":18,"./model/history-entry":19,"./model/row":20,"./model/widget":21,"./utils/menu":22,"./view/builder":23,"./view/cell":24,"./view/dialog":25,"./view/live-editor":26,"./view/row":27,"./view/styles":28,"./view/widget":29}],17:[function(e,t,i){t.exports=Backbone.Model.extend({layoutPosition:{BEFORE:"before",AFTER:"after",REPLACE:"replace"},rows:{},defaults:{data:{widgets:[],grids:[],grid_cells:[]}},initialize:function(){this.set("rows",new panels.collection.rows)},addRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var s=new panels.collection.cells(t);e=_.extend({collection:this.get("rows"),cells:s},e);var l=new panels.model.row(e);return l.builder=this,this.get("rows").add(l,i),l},loadPanelsData:function(e,t){try{t===this.layoutPosition.BEFORE?e=this.concatPanelsData(e,this.getPanelsData()):t===this.layoutPosition.AFTER&&(e=this.concatPanelsData(this.getPanelsData(),e)),this.emptyRows(),this.set("data",JSON.parse(JSON.stringify(e)),{silent:!0});var i=[];if(_.isUndefined(e.grid_cells))return void this.trigger("load_panels_data");for(var s,l=0;l<e.grid_cells.length;l++)s=parseInt(e.grid_cells[l].grid),_.isUndefined(i[s])&&(i[s]=[]),i[s].push(e.grid_cells[l]);var o=this;if(_.each(i,function(t,i){var s={};_.isUndefined(e.grids[i].style)||(s.style=e.grids[i].style),_.isUndefined(e.grids[i].color_label)||(s.color_label=e.grids[i].color_label),_.isUndefined(e.grids[i].label)||(s.label=e.grids[i].label),o.addRow(s,t,{noAnimate:!0})}),_.isUndefined(e.widgets))return;_.each(e.widgets,function(e){var t=null;_.isUndefined(e.panels_info)?(t=e.info,delete e.info):(t=e.panels_info,delete e.panels_info);var i=o.get("rows").at(parseInt(t.grid)),s=i.get("cells").at(parseInt(t.cell)),l=new panels.model.widget({class:t.class,values:e});_.isUndefined(t.style)||l.set("style",t.style),_.isUndefined(t.read_only)||l.set("read_only",t.read_only),_.isUndefined(t.widget_id)?l.set("widget_id",panels.helpers.utils.generateUUID()):l.set("widget_id",t.widget_id),_.isUndefined(t.label)||l.set("label",t.label),l.cell=s,s.get("widgets").add(l,{noAnimate:!0})}),this.trigger("load_panels_data")}catch(e){console.log("Error loading data: "+e.message)}},concatPanelsData:function(e,t){if(_.isUndefined(t)||_.isUndefined(t.grids)||_.isEmpty(t.grids)||_.isUndefined(t.grid_cells)||_.isEmpty(t.grid_cells))return e;if(_.isUndefined(e)||_.isUndefined(e.grids)||_.isEmpty(e.grids))return t;var i=e.grids.length,s=_.isUndefined(e.widgets)?0:e.widgets.length,l={grids:[],grid_cells:[],widgets:[]};l.grids=e.grids.concat(t.grids),_.isUndefined(e.grid_cells)||(l.grid_cells=e.grid_cells.slice()),_.isUndefined(e.widgets)||(l.widgets=e.widgets.slice());var o;for(o=0;o<t.grid_cells.length;o++){var n=t.grid_cells[o];n.grid=parseInt(n.grid)+i,l.grid_cells.push(n)}if(!_.isUndefined(t.widgets))for(o=0;o<t.widgets.length;o++){var a=t.widgets[o];a.panels_info.grid=parseInt(a.panels_info.grid)+i,a.panels_info.id=parseInt(a.panels_info.id)+s,l.widgets.push(a)}return l},getPanelsData:function(){var e={widgets:[],grids:[],grid_cells:[]},t=0;return this.get("rows").each(function(i,s){i.get("cells").each(function(i,l){i.get("widgets").each(function(i,o){var n={class:i.get("class"),raw:i.get("raw"),grid:s,cell:l,id:t++,widget_id:i.get("widget_id"),style:i.get("style"),label:i.get("label")};_.isEmpty(n.widget_id)&&(n.widget_id=panels.helpers.utils.generateUUID());var a=_.extend(_.clone(i.get("values")),{panels_info:n});e.widgets.push(a)}),e.grid_cells.push({grid:s,index:l,weight:i.get("weight"),style:i.get("style")})}),e.grids.push({cells:i.get("cells").length,style:i.get("style"),color_label:i.get("color_label"),label:i.get("label")})}),e},refreshPanelsData:function(e){e=_.extend({silent:!1},e);var t=this.get("data"),i=this.getPanelsData();this.set("data",i,{silent:!0}),e.silent||JSON.stringify(i)===JSON.stringify(t)||(this.trigger("change"),this.trigger("change:data"),this.trigger("refresh_panels_data",i,e))},emptyRows:function(){return _.invoke(this.get("rows").toArray(),"destroy"),this.get("rows").reset(),this},isValidLayoutPosition:function(e){return e===this.layoutPosition.BEFORE||e===this.layoutPosition.AFTER||e===this.layoutPosition.REPLACE},getPanelsDataFromHtml:function(e,t){var i=this,s=jQuery('<div id="wrapper">'+e+"</div>");if(s.find(".panel-layout .panel-grid").length){var l={grids:[],grid_cells:[],widgets:[]},o=new RegExp(panelsOptions.siteoriginWidgetRegex,"i"),n=function(){function e(e){return e&&"string"==typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),t.innerHTML=e,e=t.textContent,t.textContent=""),e}var t=document.createElement("div");return e}(),a=function(e){var t=e.find("div");if(!t.length)return e.html();var i;for(i=0;i<t.length-1&&jQuery.trim(t.eq(i).text())==jQuery.trim(t.eq(i+1).text());i++);var s=t.eq(i).find(".widget-title:header"),l="";return s.length&&(l=s.html(),s.remove()),{title:l,text:t.eq(i).html()}},r=s.find(".panel-layout").eq(0),d=function(e,t){return jQuery(t).closest(".panel-layout").is(r)};return s.find("> .panel-layout > .panel-grid").filter(d).each(function(e,s){var r=jQuery(s),c=r.find(".panel-grid-cell").filter(d);l.grids.push({cells:c.length,style:r.data("style"),color_label:r.data("color-label"),label:r.data("label")}),c.each(function(s,r){var c=jQuery(r),h=c.find(".so-panel").filter(d);l.grid_cells.push({grid:e,weight:_.isUndefined(c.data("weight"))?1:parseFloat(c.data("weight")),style:c.data("style")}),h.each(function(r,d){var c=jQuery(d),h=c.find(".panel-widget-style").length?c.find(".panel-widget-style").html():c.html(),u={grid:e,cell:s,raw:!1,label:c.data("label")};h=h.trim();var p=o.exec(h);if(!_.isNull(p)&&""===h.replace(o,"").trim()){try{var g=/class="(.*?)"/.exec(p[3]),f=jQuery(p[5]),w=JSON.parse(n(f.val())),m=w.instance;u.class=g[1],u.raw=!1,m.panels_info=u,l.widgets.push(m)}catch(e){u.class=t,l.widgets.push(_.extend(a(c),{filter:"1",type:"visual",panels_info:u}))}return!0}if(-1!==h.indexOf("panel-layout")){if(jQuery("<div>"+h+"</div>").find(".panel-layout .panel-grid").length)return u.class="SiteOrigin_Panels_Widgets_Layout",l.widgets.push({panels_data:i.getPanelsDataFromHtml(h,t),panels_info:u}),!0}return u.class=t,l.widgets.push(_.extend(a(c),{filter:"1",type:"visual",panels_info:u})),!0})})}),s.find(".panel-layout").remove(),s.find("style[data-panels-style-for-post]").remove(),s.html().replace(/^\s+|\s+$/gm,"").length&&(l.grids.push({cells:1,style:{}}),l.grid_cells.push({grid:l.grids.length-1,weight:1}),l.widgets.push({filter:"1",text:s.html().replace(/^\s+|\s+$/gm,""),title:"",type:"visual",panels_info:{class:t,raw:!1,grid:l.grids.length-1,cell:0}})),l}return{grid_cells:[{grid:0,weight:1}],grids:[{cells:1}],widgets:[{filter:"1",text:e,title:"",type:"visual",panels_info:{class:t,raw:!1,grid:0,cell:0}}]}}})},{}],18:[function(e,t,i){t.exports=Backbone.Model.extend({widgets:{},row:null,defaults:{weight:0,style:{}},indexes:null,initialize:function(){this.set("widgets",new panels.collection.widgets),this.on("destroy",this.onDestroy,this)},onDestroy:function(){_.invoke(this.get("widgets").toArray(),"destroy"),this.get("widgets").reset()},clone:function(e,t){_.isUndefined(e)&&(e=this.row),t=_.extend({cloneWidgets:!0},t);var i=new this.constructor(this.attributes);return i.set("collection",e.get("cells"),{silent:!0}),i.row=e,t.cloneWidgets&&this.get("widgets").each(function(e){i.get("widgets").add(e.clone(i,t),{silent:!0})}),i}})},{}],19:[function(e,t,i){t.exports=Backbone.Model.extend({defaults:{text:"",data:"",time:null,count:1}})},{}],20:[function(e,t,i){t.exports=Backbone.Model.extend({builder:null,defaults:{style:{}},indexes:null,initialize:function(){_.isEmpty(this.get("cells"))?this.set("cells",new panels.collection.cells):this.get("cells").each(function(e){e.row=this}.bind(this)),this.on("destroy",this.onDestroy,this)},setCells:function(e){var t=this.get("cells")||new panels.collection.cells,i=[];t.each(function(s,l){var o=e.at(l);if(o)s.set("weight",o.get("weight"));else{for(var n=t.at(e.length-1),a=s.get("widgets").models.slice(),r=0;r<a.length;r++)a[r].moveToCell(n,{silent:!1});i.push(s)}}),_.each(i,function(e){t.remove(e)}),e.length>t.length&&_.each(e.slice(t.length,e.length),function(e){e.set({collection:t}),e.row=this,t.add(e)}.bind(this)),this.reweightCells()},reweightCells:function(){var e=0,t=this.get("cells");t.each(function(t){e+=t.get("weight")}),t.each(function(t){t.set("weight",t.get("weight")/e)}),this.trigger("reweight_cells")},onDestroy:function(){_.invoke(this.get("cells").toArray(),"destroy"),this.get("cells").reset()},clone:function(e){_.isUndefined(e)&&(e=this.builder);var t=new this.constructor(this.attributes);t.set("collection",e.get("rows"),{silent:!0}),t.builder=e;var i=new panels.collection.cells;return this.get("cells").each(function(e){i.add(e.clone(t),{silent:!0})}),t.set("cells",i),t}})},{}],21:[function(e,t,i){t.exports=Backbone.Model.extend({cell:null,defaults:{class:null,missing:!1,values:{},raw:!1,style:{},read_only:!1,widget_id:""},indexes:null,initialize:function(){var e=this.get("class");!_.isUndefined(panelsOptions.widgets[e])&&panelsOptions.widgets[e].installed||this.set("missing",!0)},getWidgetField:function(e){return _.isUndefined(panelsOptions.widgets[this.get("class")])?"title"===e||"description"===e?panelsOptions.loc.missing_widget[e]:"":this.has("label")&&!_.isEmpty(this.get("label"))?this.get("label"):panelsOptions.widgets[this.get("class")][e]},moveToCell:function(e,t,i){return t=_.extend({silent:!0},t),this.cell=e,this.collection.remove(this,t),e.get("widgets").add(this,_.extend({at:i},t)),this.trigger("move_to_cell",e,i),this},triggerEdit:function(){this.trigger("user_edit",this)},triggerDuplicate:function(){this.trigger("user_duplicate",this)},setValues:function(e){var t=!1;JSON.stringify(e)!==JSON.stringify(this.get("values"))&&(t=!0),this.set("values",e,{silent:!0}),t&&(this.trigger("change",this),this.trigger("change:values"))},clone:function(e,t){_.isUndefined(e)&&(e=this.cell);var i=new this.constructor(this.attributes),s=JSON.parse(JSON.stringify(this.get("values"))),l=function(e){return _.each(e,function(t,i){_.isString(i)&&"_"===i[0]?delete e[i]:_.isObject(e[i])&&l(e[i])}),e};return s=l(s),"SiteOrigin_Panels_Widgets_Layout"===this.get("class")&&(s.builder_id=Math.random().toString(36).substr(2)),i.set("values",s,{silent:!0}),i.set("collection",e.get("widgets"),{silent:!0}),i.cell=e,i.isDuplicate=!0,i},getTitle:function(){var e=panelsOptions.widgets[this.get("class")];if(_.isUndefined(e))return this.get("class").replace(/_/g," ");if(!_.isUndefined(e.panels_title)&&!1===e.panels_title)return panelsOptions.widgets[this.get("class")].description;var t=this.get("values"),i=["title","text"];for(var s in t)t.hasOwnProperty(s)&&i.push(s);i=_.uniq(i);for(var l in i)if(!_.isUndefined(t[i[l]])&&_.isString(t[i[l]])&&""!==t[i[l]]&&"on"!==t[i[l]]&&"_"!==i[l][0]&&!jQuery.isNumeric(t[i[l]])){var o=t[i[l]];o=o.replace(/<\/?[^>]+(>|$)/g,"");var n=o.split(" ");return n=n.slice(0,20),n.join(" ")}return this.getWidgetField("description")}})},{}],22:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({wrapperTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-context-menu").html())),sectionTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-context-menu-section").html())),contexts:[],active:!1,events:{"keyup .so-search-wrapper input":"searchKeyUp"},initialize:function(){this.listenContextMenu(),this.render(),this.attach()},listenContextMenu:function(){var e=this;l(window).on("contextmenu",function(t){return e.active&&!e.isOverEl(e.$el,t)?(e.closeMenu(),e.active=!1,t.preventDefault(),!1):!!e.active||(e.active=!1,e.trigger("activate_context",t,e),void(e.active&&(t.preventDefault(),e.openMenu({left:t.pageX,top:t.pageY}))))})},render:function(){this.setElement(this.wrapperTemplate())},attach:function(){this.$el.appendTo("body")},openMenu:function(e){this.trigger("open_menu"),l(window).on("keyup",{menu:this},this.keyboardListen),l(window).on("click",{menu:this},this.clickOutsideListen),this.$el.css("max-height",l(window).height()-20),e.left+this.$el.outerWidth()+10>=l(window).width()&&(e.left=l(window).width()-this.$el.outerWidth()-10),e.left<=0&&(e.left=10),e.top+this.$el.outerHeight()-l(window).scrollTop()+10>=l(window).height()&&(e.top=l(window).height()+l(window).scrollTop()-this.$el.outerHeight()-10),e.left<=0&&(e.left=10),this.$el.css({left:e.left+1,top:e.top+1}).show(),this.$(".so-search-wrapper input").focus()},closeMenu:function(){this.trigger("close_menu"),l(window).off("keyup",this.keyboardListen),l(window).off("click",this.clickOutsideListen),this.active=!1,this.$el.empty().hide()},keyboardListen:function(e){var t=e.data.menu;switch(e.which){case 27:t.closeMenu()}},clickOutsideListen:function(e){var t=e.data.menu;3!==e.which&&t.$el.is(":visible")&&!t.isOverEl(t.$el,e)&&t.closeMenu()},addSection:function(e,t,i,s){var o=this;t=_.extend({display:5,defaultDisplay:!1,search:!0,sectionTitle:"",searchPlaceholder:"",titleKey:"title"},t);var n=l(this.sectionTemplate({settings:t,items:i})).attr("id","panels-menu-section-"+e);this.$el.append(n),n.find(".so-item:not(.so-confirm)").click(function(){var e=l(this);s(e.data("key")),o.closeMenu()}),n.find(".so-item.so-confirm").click(function(){var e=l(this);if(e.hasClass("so-confirming"))return s(e.data("key")),void o.closeMenu();e.data("original-text",e.html()).addClass("so-confirming").html('<span class="dashicons dashicons-yes"></span> '+panelsOptions.loc.dropdown_confirm),setTimeout(function(){e.removeClass("so-confirming"),e.html(e.data("original-text"))},2500)}),n.data("settings",t).find(".so-search-wrapper input").trigger("keyup"),this.active=!0},hasSection:function(e){return this.$el.find("#panels-menu-section-"+e).length>0},searchKeyUp:function(e){var t=l(e.currentTarget),i=t.closest(".so-section"),s=i.data("settings");if(38===e.which||40===e.which){var o=i.find("ul li:visible"),n=o.filter(".so-active").eq(0);if(n.length){o.removeClass("so-active");var a=o.index(n);38===e.which?n=a-1<0?o.last():o.eq(a-1):40===e.which&&(n=a+1>=o.length?o.first():o.eq(a+1))}else 38===e.which?n=o.last():40===e.which&&(n=o.first());return n.addClass("so-active"),!1}if(13===e.which)return 1===i.find("ul li:visible").length?(i.find("ul li:visible").trigger("click"),!1):(i.find("ul li.so-active:visible").trigger("click"),!1);if(""===t.val())if(s.defaultDisplay){i.find(".so-item").hide();for(var r=0;r<s.defaultDisplay.length;r++)i.find('.so-item[data-key="'+s.defaultDisplay[r]+'"]').show()}else i.find(".so-item").show();else i.find(".so-item").hide().each(function(){var e=l(this);-1!==e.html().toLowerCase().indexOf(t.val().toLowerCase())&&e.show()});i.find(".so-item:visible:gt("+(s.display-1)+")").hide(),0===i.find(".so-item:visible").length&&""!==t.val()?i.find(".so-no-results").show():i.find(".so-no-results").hide()},isOverEl:function(e,t){var i=[[e.offset().left,e.offset().top],[e.offset().left+e.outerWidth(),e.offset().top+e.outerHeight()]];return t.pageX>=i[0][0]&&t.pageX<=i[1][0]&&t.pageY>=i[0][1]&&t.pageY<=i[1][1]}})},{}],23:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({config:{},template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder").html())),dialogs:{},rowsSortable:null,dataField:!1,currentData:"",attachedToEditor:!1,attachedVisible:!1,liveEditor:void 0,menu:!1,activeCell:null,events:{"click .so-tool-button.so-widget-add":"displayAddWidgetDialog","click .so-tool-button.so-row-add":"displayAddRowDialog","click .so-tool-button.so-prebuilt-add":"displayAddPrebuiltDialog","click .so-tool-button.so-history":"displayHistoryDialog","click .so-tool-button.so-live-editor":"displayLiveEditor"},rows:null,initialize:function(e){var t=this;return this.config=_.extend({loadLiveEditor:!1,builderSupports:{}},e.config),this.config.builderSupports=_.extend({addRow:!0,editRow:!0,deleteRow:!0,moveRow:!0,addWidget:!0,editWidget:!0,deleteWidget:!0,moveWidget:!0,prebuilt:!0,history:!0,liveEditor:!0,revertToEditor:!0},this.config.builderSupports),e.config.loadLiveEditor&&this.on("builder_live_editor_added",function(){this.displayLiveEditor()}),this.dialogs={widgets:new s.dialog.widgets,row:new s.dialog.row,prebuilt:new s.dialog.prebuilt},_.each(this.dialogs,function(e,i,s){s[i].setBuilder(t)}),this.dialogs.row.setRowDialogType("create"),this.model.get("rows").on("add",this.onAddRow,this),l(window).resize(function(e){e.target===window&&t.trigger("builder_resize")}),this.model.on("change:data load_panels_data",this.storeModelData,this),this.on("content_change",this.handleContentChange,this),this.on("display_builder",this.handleDisplayBuilder,this),this.on("hide_builder",this.handleHideBuilder,this),this.on("builder_rendered builder_resize",this.handleBuilderSizing,this),this.model.on("change:data load_panels_data",this.toggleWelcomeDisplay,this),this.on("display_builder",this.wrapEditorExpandAdjust,this),this.menu=new s.utils.menu({}),this.menu.on("activate_context",this.activateContextMenu,this),this.config.loadOnAttach&&this.on("builder_attached_to_editor",function(){this.displayAttachedBuilder({confirm:!1})},this),this},render:function(){return this.setElement(this.template()),this.$el.attr("id","siteorigin-panels-builder-"+this.cid).addClass("so-builder-container"),this.trigger("builder_rendered"),this},attach:function(e){e=_.extend({container:!1,dialog:!1},e),e.dialog?(this.dialog=new s.dialog.builder,this.dialog.builder=this):(this.$el.appendTo(e.container),this.metabox=e.container.closest(".postbox"),this.initSortable(),this.trigger("attached_to_container",e.container)),this.trigger("builder_attached"),this.supports("liveEditor")&&this.addLiveEditor(),this.supports("history")&&this.addHistoryBrowser();var t=this.$(".so-builder-toolbar");return this.supports("addWidget")||t.find(".so-widget-add").hide(),this.supports("addRow")||t.find(".so-row-add").hide(),this.supports("prebuilt")||t.find(".so-prebuilt-add").hide(),this},attachToEditor:function(){if("tinyMCE"!==this.config.editorType)return this;this.attachedToEditor=!0;var e=this.metabox,t=this;l("#wp-content-wrap .wp-editor-tabs").find(".wp-switch-editor").click(function(e){e.preventDefault(),l("#wp-content-editor-container").show(),l("#wp-content-wrap").removeClass("panels-active"),l("#content-resize-handle").show(),t.trigger("hide_builder")}).end().append(l('<a id="content-panels" class="hide-if-no-js wp-switch-editor switch-panels">'+e.find(".hndle span").html()+"</a>").click(function(e){t.displayAttachedBuilder({confirm:!0})&&e.preventDefault()})),this.supports("revertToEditor")&&e.find(".so-switch-to-standard").click(function(i){i.preventDefault(),confirm(panelsOptions.loc.confirm_stop_builder)&&(t.addHistoryEntry("back_to_editor"),t.model.loadPanelsData(!1),l("#wp-content-wrap").show(),e.hide(),l(window).resize(),t.attachedVisible=!1,t.trigger("hide_builder"))}).show(),e.insertAfter("#wp-content-wrap").hide().addClass("attached-to-editor");var i=this.model.get("data");_.isEmpty(i.widgets)&&_.isEmpty(i.grids)||this.displayAttachedBuilder({confirm:!1});var s=function(){var e=t.$(".so-builder-toolbar");if(t.$el.hasClass("so-display-narrow"))return e.css({top:0,left:0,width:"100%",position:"absolute"}),void t.$el.css("padding-top",e.outerHeight());var i=l(window).scrollTop()-t.$el.offset().top;"fixed"===l("#wpadminbar").css("position")&&(i+=l("#wpadminbar").outerHeight());var s={top:0,bottom:t.$el.outerHeight()-e.outerHeight()+20};i>s.top&&i<s.bottom?"fixed"!==e.css("position")&&e.css({top:l("#wpadminbar").outerHeight(),left:t.$el.offset().left,width:t.$el.outerWidth(),position:"fixed"}):e.css({top:Math.min(Math.max(i,0),t.$el.outerHeight()-e.outerHeight()+20),left:0,width:"100%",position:"absolute"}),t.$el.css("padding-top",e.outerHeight())};return this.on("builder_resize",s,this),l(document).scroll(s),s(),this.trigger("builder_attached_to_editor"),this},displayAttachedBuilder:function(e){if(e=_.extend({confirm:!0},e),e.confirm){var t="undefined"!=typeof tinyMCE&&tinyMCE.get("content");if(""!==(t&&_.isFunction(t.getContent)?t.getContent():l("textarea#content").val())&&!confirm(panelsOptions.loc.confirm_use_builder))return!1}return l("#wp-content-wrap").hide(),this.metabox.show().find("> .inside").show(),l(window).resize(),l(document).scroll(),this.attachedVisible=!0,this.trigger("display_builder"),!0},initSortable:function(){if(!this.supports("moveRow"))return this;var e=this;return this.rowsSortable=this.$(".so-rows-container").sortable({appendTo:"#wpwrap",items:".so-row-container",handle:".so-row-move",axis:"y",tolerance:"pointer",scroll:!1,stop:function(t,i){e.addHistoryEntry("row_moved");var s=l(i.item),o=s.data("view");e.model.get("rows").remove(o.model,{silent:!0}),e.model.get("rows").add(o.model,{silent:!0,at:s.index()}),o.trigger("move",s.index()),e.model.refreshPanelsData()}}),this},refreshSortable:function(){_.isNull(this.rowsSortable)||this.rowsSortable.sortable("refresh")},setDataField:function(e,t){if(t=_.extend({load:!0},t),this.dataField=e,this.dataField.data("builder",this),t.load&&""!==e.val()){var i=this.dataField.val();try{i=JSON.parse(i)}catch(e){i={}}this.model.loadPanelsData(i),this.currentData=i,this.toggleWelcomeDisplay()}return this},storeModelData:function(){var e=JSON.stringify(this.model.get("data"));l(this.dataField).val()!==e&&(l(this.dataField).val(e),l(this.dataField).trigger("change"),this.trigger("content_change"))},onAddRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var l=new s.view.row({model:e});l.builder=this,l.render(),_.isUndefined(i.at)||t.length<=1?l.$el.appendTo(this.$(".so-rows-container")):l.$el.insertAfter(this.$(".so-rows-container .so-row-container").eq(i.at-1)),!1===i.noAnimate&&l.visualCreate(),this.refreshSortable(),l.resize()},displayAddWidgetDialog:function(){this.dialogs.widgets.openDialog()},displayAddRowDialog:function(){var e=new s.model.row,t=new s.collection.cells([{weight:.5},{weight:.5}]);t.each(function(t){t.row=e}),e.set("cells",t),e.builder=this.model,this.dialogs.row.setRowModel(e),this.dialogs.row.openDialog()},displayAddPrebuiltDialog:function(){this.dialogs.prebuilt.openDialog()},displayHistoryDialog:function(){this.dialogs.history.openDialog()},pasteRowHandler:function(){var e=s.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof s.model.row&&(this.addHistoryEntry("row_pasted"),e.builder=this.model,this.model.get("rows").add(e,{at:this.model.get("rows").indexOf(this.model)+1}),this.model.refreshPanelsData())},getActiveCell:function(e){if(e=_.extend({createCell:!0},e),!this.model.get("rows").length){if(!e.createCell)return null;this.model.addRow({},[{weight:1}],{noAnimate:!0})}var t=this.activeCell;return _.isEmpty(t)||-1===this.model.get("rows").indexOf(t.model.row)?this.model.get("rows").last().get("cells").first():t.model},addLiveEditor:function(){return _.isEmpty(this.config.liveEditorPreview)?this:(this.liveEditor=new s.view.liveEditor({builder:this,previewUrl:this.config.liveEditorPreview}),this.liveEditor.hasPreviewUrl()&&this.$(".so-builder-toolbar .so-live-editor").show(),this.trigger("builder_live_editor_added"),this)},displayLiveEditor:function(){_.isUndefined(this.liveEditor)||this.liveEditor.open()},addHistoryBrowser:function(){if(_.isEmpty(this.config.liveEditorPreview))return this;this.dialogs.history=new s.dialog.history,this.dialogs.history.builder=this,this.dialogs.history.entries.builder=this.model,this.dialogs.history.setRevertEntry(this.model),this.$(".so-builder-toolbar .so-history").show()},addHistoryEntry:function(e,t){_.isUndefined(t)&&(t=null),_.isUndefined(this.dialogs.history)||this.dialogs.history.entries.addEntry(e,t)},supports:function(e){return"rowAction"===e?this.supports("addRow")||this.supports("editRow")||this.supports("deleteRow"):"widgetAction"===e?this.supports("addWidget")||this.supports("editWidget")||this.supports("deleteWidget"):!_.isUndefined(this.config.builderSupports[e])&&this.config.builderSupports[e]},handleContentChange:function(){if(panelsOptions.copy_content&&this.attachedToEditor&&this.$el.is(":visible")){var e=this.model.getPanelsData();_.isEmpty(e.widgets)||l.post(panelsOptions.ajaxurl,{action:"so_panels_builder_content",panels_data:JSON.stringify(e),post_id:this.config.postId},function(e){""!==e&&this.updateEditorContent(e)}.bind(this))}},updateEditorContent:function(e){
|
3 |
if("tinyMCE"!==this.config.editorType||"undefined"==typeof tinyMCE||_.isNull(tinyMCE.get("content"))){l(this.config.editorId).val(e).trigger("change").trigger("keyup")}else{var t=tinyMCE.get("content");t.setContent(e),t.fire("change"),t.fire("keyup")}this.triggerYoastSeoChange()},triggerYoastSeoChange:function(){if(l("#yoast_wpseo_focuskw_text_input").length){var e,t=document.getElementById("yoast_wpseo_focuskw_text_input");document.createEvent?(e=document.createEvent("HTMLEvents"),e.initEvent("keyup",!0,!0)):(e=document.createEventObject(),e.eventType="keyup"),e.eventName="keyup",document.createEvent?t.dispatchEvent(e):t.fireEvent("on"+e.eventType,e)}},handleDisplayBuilder:function(){var e="undefined"!=typeof tinyMCE&&tinyMCE.get("content"),t=e&&_.isFunction(e.getContent)?e.getContent():l("textarea#content").val();if((_.isEmpty(this.model.get("data"))||_.isEmpty(this.model.get("data").widgets)&&_.isEmpty(this.model.get("data").grids))&&""!==t){var i=panelsOptions.text_widget;if(_.isEmpty(i))return;this.model.loadPanelsData(this.model.getPanelsDataFromHtml(t,i)),this.model.trigger("change"),this.model.trigger("change:data")}l("#post-status-info").addClass("for-siteorigin-panels")},handleHideBuilder:function(){l("#post-status-info").show().removeClass("for-siteorigin-panels")},wrapEditorExpandAdjust:function(){try{for(var e,t=(l.hasData(window)&&l._data(window)).events.scroll,i=0;i<t.length;i++)if("editor-expand"===t[i].namespace){e=t[i],l(window).unbind("scroll",e.handler),l(window).bind("scroll",function(t){this.attachedVisible||e.handler(t)}.bind(this));break}}catch(e){return}},handleBuilderSizing:function(){var e=this.$el.width();return e?(e<480?this.$el.addClass("so-display-narrow"):this.$el.removeClass("so-display-narrow"),this):this},setDialogParents:function(e,t){_.each(this.dialogs,function(i,s,l){l[s].setParent(e,t)}),this.on("add_dialog",function(i){i.setParent(e,t)},this)},toggleWelcomeDisplay:function(){this.model.get("rows").isEmpty()?this.$(".so-panels-welcome-message").show():this.$(".so-panels-welcome-message").hide()},activateContextMenu:function(e,t){var i=this,s=l(".siteorigin-panels-builder:visible").sort(function(e,t){return l(e).zIndex()>l(t).zIndex()?1:-1}).last(),o=l(".so-panels-dialog-wrapper:visible").sort(function(e,t){return l(e).zIndex()>l(t).zIndex()?1:-1}).last(),n=i.$el.closest(".so-panels-dialog-wrapper");if(i.$el.is(s)&&(0===o.length||o.is(n))){var a=l([]).add(i.$(".so-panels-welcome-message:visible")).add(i.$(".so-rows-container > .so-row-container")).add(i.$(".so-cells > .cell")).add(i.$(".cell-wrapper > .so-widget")).filter(function(i){return t.isOverEl(l(this),e)}),r=a.last().data("view");void 0!==r&&void 0!==r.buildContextualMenu?r.buildContextualMenu(e,t):a.last().hasClass("so-panels-welcome-message")&&this.buildContextualMenu(e,t)}},buildContextualMenu:function(e,t){var i={};this.supports("addRow")&&(i.add_row={title:panelsOptions.loc.contextual.add_row}),s.helpers.clipboard.canCopyPaste()&&s.helpers.clipboard.isModel("row-model")&&this.supports("addRow")&&(i.paste_row={title:panelsOptions.loc.contextual.row_paste}),_.isEmpty(i)||t.addSection("builder-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},i,function(e){switch(e){case"add_row":this.displayAddRowDialog();break;case"paste_row":this.pasteRowHandler()}}.bind(this))}})},{}],24:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-cell").html())),events:{"click .cell-wrapper":"handleCellClick"},row:null,widgetSortable:null,initialize:function(){this.model.get("widgets").on("add",this.onAddWidget,this)},render:function(){var e={weight:this.model.get("weight"),totalWeight:this.row.model.get("cells").totalWeight()};this.setElement(this.template(e)),this.$el.data("view",this);var t=this;return this.model.get("widgets").each(function(e){var i=new s.view.widget({model:e});i.cell=t,i.render(),i.$el.appendTo(t.$(".widgets-container"))}),this.initSortable(),this.initResizable(),this},initSortable:function(){if(!this.row.builder.supports("moveWidget"))return this;var e=this,t=e.row.builder.$el.attr("id");return this.widgetSortable=this.$(".widgets-container").sortable({placeholder:"so-widget-sortable-highlight",connectWith:"#"+t+" .so-cells .cell .widgets-container",tolerance:"pointer",scroll:!1,over:function(t,i){e.row.builder.trigger("widget_sortable_move")},stop:function(t,i){e.row.builder.addHistoryEntry("widget_moved");var s=l(i.item),o=s.data("view"),n=s.closest(".cell").data("view");o.model.moveToCell(n.model,{},s.index()),o.cell=n,o.cell.row.builder.model.refreshPanelsData()},helper:function(e,t){var i=t.clone().css({width:t.outerWidth(),"z-index":1e4,position:"fixed"}).addClass("widget-being-dragged").appendTo("body");return t.outerWidth()>720&&i.animate({"margin-left":e.pageX-t.offset().left-240,width:480},"fast"),i}}),this},refreshSortable:function(){_.isNull(this.widgetSortable)||this.widgetSortable.sortable("refresh")},initResizable:function(){if(!this.row.builder.supports("editRow"))return this;var e,t=this.$(".resize-handle").css("position","absolute"),i=this.row.$el,s=this;return t.draggable({axis:"x",containment:i,start:function(t,i){if(e=s.$el.prev().data("view"),!_.isUndefined(e)){var o=s.$el.clone().appendTo(i.helper).css({position:"absolute",top:"0",width:s.$el.outerWidth(),left:5,height:s.$el.outerHeight()});o.find(".resize-handle").remove();var n=e.$el.clone().appendTo(i.helper).css({position:"absolute",top:"0",width:e.$el.outerWidth(),right:5,height:e.$el.outerHeight()});n.find(".resize-handle").remove(),l(this).data({newCellClone:o,prevCellClone:n})}},drag:function(i,o){var n=s.row.$el.width()+10,a=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,r=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;l(this).data("newCellClone").css("width",n*a).find(".preview-cell-weight").html(Math.round(1e3*a)/10),l(this).data("prevCellClone").css("width",n*r).find(".preview-cell-weight").html(Math.round(1e3*r)/10)},stop:function(i,o){l(this).data("newCellClone").remove(),l(this).data("prevCellClone").remove();var n=s.row.$el.width()+10,a=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,r=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;a>.02&&r>.02&&(s.row.builder.addHistoryEntry("cell_resized"),s.model.set("weight",a),e.model.set("weight",r),s.row.resize()),o.helper.css("left",-t.outerWidth()/2),s.row.builder.model.refreshPanelsData()}}),this},onAddWidget:function(e,t,i){i=_.extend({noAnimate:!1},i);var l=new s.view.widget({model:e});l.cell=this,_.isUndefined(e.isDuplicate)&&(e.isDuplicate=!1),l.render({loadForm:e.isDuplicate}),_.isUndefined(i.at)||t.length<=1?l.$el.appendTo(this.$(".widgets-container")):l.$el.insertAfter(this.$(".widgets-container .so-widget").eq(i.at-1)),!1===i.noAnimate&&l.visualCreate(),this.refreshSortable(),this.row.resize()},handleCellClick:function(e){this.row.builder.$el.find(".so-cells .cell").removeClass("cell-selected"),this.row.builder.activeCell!==this||this.model.get("widgets").length?(this.$el.addClass("cell-selected"),this.row.builder.activeCell=this):this.row.builder.activeCell=null},pasteHandler:function(){var e=s.helpers.clipboard.getModel("widget-model");!_.isEmpty(e)&&e instanceof s.model.widget&&(this.row.builder.addHistoryEntry("widget_pasted"),e.cell=this.model,this.model.get("widgets").add(e),this.row.builder.model.refreshPanelsData())},buildContextualMenu:function(e,t){var i=this;t.hasSection("add-widget-below")||t.addSection("add-widget-cell",{sectionTitle:panelsOptions.loc.contextual.add_widget_cell,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,function(e){i.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=i.model,t.cell.get("widgets").add(t),i.row.builder.model.refreshPanelsData()});var l={};this.row.builder.supports("addWidget")&&s.helpers.clipboard.isModel("widget-model")&&(l.paste={title:panelsOptions.loc.contextual.cell_paste_widget}),_.isEmpty(l)||t.addSection("cell-actions",{sectionTitle:panelsOptions.loc.contextual.cell_actions,search:!1},l,function(e){switch(e){case"paste":this.pasteHandler()}this.row.builder.model.refreshPanelsData()}.bind(this)),this.row.buildContextualMenu(e,t)}})},{}],25:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({dialogTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog").html())),dialogTabTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-tab").html())),tabbed:!1,rendered:!1,builder:!1,className:"so-panels-dialog-wrapper",dialogClass:"",dialogIcon:"",parentDialog:!1,dialogOpen:!1,editableLabel:!1,events:{"click .so-close":"closeDialog","click .so-nav.so-previous":"navToPrevious","click .so-nav.so-next":"navToNext"},initialize:function(){this.once("open_dialog",this.render),this.once("open_dialog",this.attach),this.once("open_dialog",this.setDialogClass),this.trigger("initialize_dialog",this),_.isUndefined(this.initializeDialog)||this.initializeDialog()},getNextDialog:function(){return null},getPrevDialog:function(){return null},setDialogClass:function(){""!==this.dialogClass&&this.$(".so-panels-dialog").addClass(this.dialogClass)},setBuilder:function(e){return this.builder=e,e.trigger("add_dialog",this,this.builder),this},attach:function(){return this.$el.appendTo("body"),this},parseDialogContent:function(e,t){t=_.extend({cid:this.cid},t);var i=l(_.template(s.helpers.utils.processTemplate(e))(t)),o={title:i.find(".title").html(),buttons:i.find(".buttons").html(),content:i.find(".content").html()};return i.has(".left-sidebar")&&(o.left_sidebar=i.find(".left-sidebar").html()),i.has(".right-sidebar")&&(o.right_sidebar=i.find(".right-sidebar").html()),o},renderDialog:function(e){if(e=_.extend({editableLabel:this.editableLabel,dialogIcon:this.dialogIcon},e),this.$el.html(this.dialogTemplate(e)).hide(),this.$el.data("view",this),this.$el.addClass("so-panels-dialog-wrapper"),!1!==this.parentDialog){var t=this,i=l('<h3 class="so-parent-link"></h3>').html(this.parentDialog.text+'<div class="so-separator"></div>');i.click(function(e){e.preventDefault(),t.closeDialog(),t.parentDialog.openDialog()}),this.$(".so-title-bar").prepend(i)}return this.$(".so-title-bar .so-title-editable").length&&this.initEditableLabel(),this},initTabs:function(){var e=this.$(".so-sidebar-tabs li a");if(0===e.length)return this;var t=this;return e.click(function(e){e.preventDefault();var i=l(this);t.$(".so-sidebar-tabs li").removeClass("tab-active"),t.$(".so-content .so-content-tabs > *").hide(),i.parent().addClass("tab-active");var s=i.attr("href");if(!_.isUndefined(s)&&"#"===s.charAt(0)){var o=s.split("#")[1];t.$(".so-content .so-content-tabs .tab-"+o).show()}t.trigger("tab_click",i)}),this.$(".so-sidebar-tabs li a").first().click(),this},initToolbar:function(){this.$(".so-toolbar .so-buttons .so-toolbar-button").click(function(e){e.preventDefault(),this.trigger("button_click",l(e.currentTarget))}.bind(this)),this.$(".so-toolbar .so-buttons .so-dropdown-button").click(function(e){e.preventDefault();var t=l(e.currentTarget),i=t.siblings(".so-dropdown-links-wrapper");i.is(".hidden")?i.removeClass("hidden"):i.addClass("hidden")}.bind(this)),l("html").click(function(e){this.$(".so-dropdown-links-wrapper").not(".hidden").each(function(t,i){var s=l(i),o=l(e.target);0!==o.length&&(o.is(".so-needs-confirm")&&!o.is(".so-confirmed")||o.is(".so-dropdown-button"))||s.addClass("hidden")})}.bind(this))},initEditableLabel:function(){var e=this.$(".so-title-bar .so-title-editable");e.keypress(function(t){var i="keypress"===t.type&&13===t.keyCode;if(i){var s=l(":tabbable"),o=s.index(e);s.eq(o+1).focus(),window.getSelection().removeAllRanges()}return!i}).blur(function(){var t=e.text().replace(/^\s+|\s+$/gm,"");t!==e.data("original-value").replace(/^\s+|\s+$/gm,"")&&(e.text(t),this.trigger("edit_label",t))}.bind(this)),e.focus(function(){e.data("original-value",e.text()),s.helpers.utils.selectElementContents(this)})},setupDialog:function(){this.openDialog(),this.closeDialog()},refreshDialogNav:function(){this.$(".so-title-bar .so-nav").show().removeClass("so-disabled");var e=this.getNextDialog(),t=this.$(".so-title-bar .so-next"),i=this.getPrevDialog(),s=this.$(".so-title-bar .so-previous");null===e?t.hide():!1===e&&t.addClass("so-disabled"),null===i?s.hide():!1===i&&s.addClass("so-disabled")},openDialog:function(e){e=_.extend({silent:!1},e),e.silent||this.trigger("open_dialog"),this.dialogOpen=!0,this.refreshDialogNav(),s.helpers.pageScroll.lock(),l(window).on("keyup",this.keyboardListen),this.$el.show(),e.silent||(this.trigger("open_dialog_complete"),this.builder.trigger("open_dialog",this))},closeDialog:function(e){e=_.extend({silent:!1},e),e.silent||this.trigger("close_dialog"),this.dialogOpen=!1,this.$el.hide(),s.helpers.pageScroll.unlock(),l(window).off("keyup",this.keyboardListen),e.silent||(this.trigger("close_dialog_complete"),this.builder.trigger("close_dialog",this))},keyboardListen:function(e){27===e.which&&l(".so-panels-dialog-wrapper .so-close").trigger("click")},navToPrevious:function(){this.closeDialog();var e=this.getPrevDialog();null!==e&&!1!==e&&e.openDialog()},navToNext:function(){this.closeDialog();var e=this.getNextDialog();null!==e&&!1!==e&&e.openDialog()},getFormValues:function(e){_.isUndefined(e)&&(e=".so-content");var t,i=this.$(e),s={};return i.find("[name]").each(function(){var e=l(this);try{var i=/([A-Za-z_]+)\[(.*)\]/.exec(e.attr("name"));if(_.isEmpty(i))return!0;_.isUndefined(i[2])?t=e.attr("name"):(t=i[2].split("]["),t.unshift(i[1])),t=t.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});var o=s,n=null,a=!!_.isString(e.attr("type"))&&e.attr("type").toLowerCase();if("checkbox"===a)n=e.is(":checked")?""===e.val()||e.val():null;else if("radio"===a){if(!e.is(":checked"))return;n=e.val()}else if("TEXTAREA"===e.prop("tagName")&&e.hasClass("wp-editor-area")){var r=null;"undefined"!=typeof tinyMCE&&(r=tinyMCE.get(e.attr("id"))),n=null!==r&&_.isFunction(r.getContent)&&!r.isHidden()?r.getContent():e.val()}else if("SELECT"===e.prop("tagName")){var d=e.find("option:selected");1===d.length?n=e.find("option:selected").val():d.length>1&&(n=_.map(e.find("option:selected"),function(e,t){return l(e).val()}))}else n=e.val();if(!_.isUndefined(e.data("panels-filter")))switch(e.data("panels-filter")){case"json_parse":try{n=JSON.parse(n)}catch(e){n=""}}if(null!==n)for(var c=0;c<t.length;c++)c===t.length-1?""===t[c]?o.push(n):o[t[c]]=n:(_.isUndefined(o[t[c]])&&(""===t[c+1]?o[t[c]]=[]:o[t[c]]={}),o=o[t[c]])}catch(t){console.log("Field ["+e.attr("name")+"] could not be processed and was skipped - "+t.message)}}),s},setStatusMessage:function(e,t){this.$(".so-toolbar .so-status").html(e),!_.isUndefined(t)&&t&&this.$(".so-toolbar .so-status").addClass("so-panels-loading")},setParent:function(e,t){this.parentDialog={text:e,dialog:t}}})},{}],26:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-live-editor").html())),previewScrollTop:0,loadTimes:[],previewFrameId:1,previewUrl:null,previewIframe:null,events:{"click .live-editor-close":"close","click .live-editor-collapse":"collapse","click .live-editor-mode":"mobileToggle"},initialize:function(e){e=_.extend({builder:!1,previewUrl:!1},e),_.isEmpty(e.previewUrl)&&(e.previewUrl=panelsOptions.ajaxurl+"&action=so_panels_live_editor_preview"),this.builder=e.builder,this.previewUrl=e.previewUrl,this.builder.model.on("refresh_panels_data",this.handleRefreshData,this),this.builder.model.on("load_panels_data",this.handleLoadData,this)},render:function(){this.setElement(this.template()),this.$el.hide();var e=this,t=!1;return l(document).mousedown(function(){t=!0}).mouseup(function(){t=!1}),this.$el.on("mouseenter",".so-widget-wrapper",function(){var i=l(this),s=i.data("live-editor-preview-widget");t||void 0===s||!s.length||e.$(".so-preview-overlay").is(":visible")||(e.highlightElement(s),e.scrollToElement(s))}),e.$el.on("mouseleave",".so-widget-wrapper",function(){e.resetHighlights()}),e.builder.on("open_dialog",function(){e.resetHighlights()}),this},attach:function(){this.$el.appendTo("body")},open:function(){if(""===this.$el.html()&&this.render(),0===this.$el.closest("body").length&&this.attach(),s.helpers.pageScroll.lock(),this.$el.is(":visible"))return this;if(this.$el.show(),this.refreshPreview(this.builder.model.getPanelsData()),this.originalContainer=this.builder.$el.parent(),this.builder.$el.appendTo(this.$(".so-live-editor-builder")),this.builder.$(".so-tool-button.so-live-editor").hide(),this.builder.trigger("builder_resize"),"auto-draft"===l("#original_post_status").val()&&!this.autoSaved){var e=this;wp.autosave&&(""===l('#title[name="post_title"]').val()&&l('#title[name="post_title"]').val(panelsOptions.loc.draft).trigger("keydown"),l(document).one("heartbeat-tick.autosave",function(){e.autoSaved=!0,e.refreshPreview(e.builder.model.getPanelsData())}),wp.autosave.server.triggerSave())}},close:function(){if(!this.$el.is(":visible"))return this;this.$el.hide(),s.helpers.pageScroll.unlock(),this.builder.$el.appendTo(this.originalContainer),this.builder.$(".so-tool-button.so-live-editor").show(),this.builder.trigger("builder_resize")},collapse:function(){this.$el.toggleClass("so-collapsed");var e=this.$(".live-editor-collapse span");e.html(e.data(this.$el.hasClass("so-collapsed")?"expand":"collapse"))},highlightElement:function(e){_.isUndefined(this.resetHighlightTimeout)||clearTimeout(this.resetHighlightTimeout),this.previewIframe.contents().find("body").find(".panel-grid .panel-grid-cell .so-panel").filter(function(){return 0===l(this).parents(".so-panel").length}).not(e).addClass("so-panels-faded"),e.removeClass("so-panels-faded").addClass("so-panels-highlighted")},resetHighlights:function(){var e=this.previewIframe.contents().find("body");this.resetHighlightTimeout=setTimeout(function(){e.find(".panel-grid .panel-grid-cell .so-panel").removeClass("so-panels-faded so-panels-highlighted")},100)},scrollToElement:function(e){this.$(".so-preview iframe")[0].contentWindow.liveEditorScrollTo(e)},handleRefreshData:function(e,t){if(!this.$el.is(":visible"))return this;this.refreshPreview(e)},handleLoadData:function(){if(!this.$el.is(":visible"))return this;this.refreshPreview(this.builder.model.getPanelsData())},refreshPreview:function(e){var t=this.loadTimes.length?_.reduce(this.loadTimes,function(e,t){return e+t},0)/this.loadTimes.length:1e3;_.isNull(this.previewIframe)||this.$(".so-preview-overlay").is(":visible")||(this.previewScrollTop=this.previewIframe.contents().scrollTop()),this.$(".so-preview-overlay").show(),this.$(".so-preview-overlay .so-loading-bar").clearQueue().css("width","0%").animate({width:"100%"},parseInt(t)+100),this.postToIframe({live_editor_panels_data:JSON.stringify(e),live_editor_post_ID:this.builder.config.postId},this.previewUrl,this.$(".so-preview")),this.previewIframe.data("load-start",(new Date).getTime())},postToIframe:function(e,t,i){_.isNull(this.previewIframe)||this.previewIframe.remove();var s="siteorigin-panels-live-preview-"+this.previewFrameId;this.previewIframe=l('<iframe src="javascript:false;" />').attr({id:s,name:s}).appendTo(i),this.setupPreviewFrame(this.previewIframe);var o=l('<form id="soPostToPreviewFrame" method="post" />').attr({id:s,target:this.previewIframe.attr("id"),action:t}).appendTo("body");return l.each(e,function(e,t){l('<input type="hidden" />').attr({name:e,value:t}).appendTo(o)}),o.submit().remove(),this.previewFrameId++,this.previewIframe},setupPreviewFrame:function(e){var t=this;e.data("iframeready",!1).on("iframeready",function(){var e=l(this),i=e.contents();if(!e.data("iframeready")){e.data("iframeready",!0),void 0!==e.data("load-start")&&(t.loadTimes.unshift((new Date).getTime()-e.data("load-start")),_.isEmpty(t.loadTimes)||(t.loadTimes=t.loadTimes.slice(0,4))),setTimeout(function(){i.scrollTop(t.previewScrollTop),t.$(".so-preview-overlay").hide()},100);var s=i.find("#pl-"+t.builder.config.postId);s.find(".panel-grid .panel-grid-cell .so-panel").filter(function(){return l(this).closest(".panel-layout").is(s)}).each(function(e,i){var s=l(i),o=t.$(".so-live-editor-builder .so-widget-wrapper").eq(s.data("index"));o.data("live-editor-preview-widget",s),s.css({cursor:"pointer"}).mouseenter(function(){o.parent().addClass("so-hovered"),t.highlightElement(s)}).mouseleave(function(){o.parent().removeClass("so-hovered"),t.resetHighlights()}).click(function(e){e.preventDefault(),o.find(".title h4").click()})}),i.find("a").css({"pointer-events":"none"}).click(function(e){e.preventDefault()})}}).on("load",function(){var e=l(this);e.data("iframeready")||e.trigger("iframeready")})},hasPreviewUrl:function(){return""!==this.$("form.live-editor-form").attr("action")},mobileToggle:function(e){var t=l(e.currentTarget);this.$(".live-editor-mode").not(t).removeClass("so-active"),t.addClass("so-active"),this.$el.removeClass("live-editor-desktop-mode live-editor-tablet-mode live-editor-mobile-mode").addClass("live-editor-"+t.data("mode")+"-mode")}})},{}],27:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-row").html())),events:{"click .so-row-settings":"editSettingsHandler","click .so-row-duplicate":"duplicateHandler","click .so-row-delete":"confirmedDeleteHandler","click .so-row-color":"rowColorChangeHandler"},builder:null,dialog:null,initialize:function(){var e=this.model.get("cells");e.on("add",this.handleCellAdd,this),e.on("remove",this.handleCellRemove,this),this.model.on("reweight_cells",this.resize,this),this.model.on("destroy",this.onModelDestroy,this),this.model.on("visual_destroy",this.visualDestroyModel,this);var t=this;e.each(function(e){t.listenTo(e.get("widgets"),"add",t.resize)}),e.on("add",function(e){t.listenTo(e.get("widgets"),"add",t.resize)},this),this.model.on("change:label",this.onLabelChange,this)},render:function(){var e=this.model.has("color_label")?this.model.get("color_label"):1,t=this.model.has("label")?this.model.get("label"):"";this.setElement(this.template({rowColorLabel:e,rowLabel:t})),this.$el.data("view",this);var i=this;return this.model.get("cells").each(function(e){var t=new s.view.cell({model:e});t.row=i,t.render(),t.$el.appendTo(i.$(".so-cells"))}),this.builder.supports("rowAction")?(this.builder.supports("editWidget")||(this.$(".so-row-toolbar .so-row-settings").parent().remove(),this.$el.addClass("so-row-no-edit")),this.builder.supports("addWidget")||(this.$(".so-row-toolbar .so-row-duplicate").parent().remove(),this.$el.addClass("so-row-no-duplicate")),this.builder.supports("deleteWidget")||(this.$(".so-row-toolbar .so-row-delete").parent().remove(),this.$el.addClass("so-row-no-delete"))):(this.$(".so-row-toolbar .so-dropdown-wrapper").remove(),this.$el.addClass("so-row-no-actions")),this.builder.supports("moveRow")||(this.$(".so-row-toolbar .so-row-move").remove(),this.$el.addClass("so-row-no-move")),l.trim(this.$(".so-row-toolbar").html()).length||this.$(".so-row-toolbar").remove(),this.builder.on("widget_sortable_move",this.resize,this),this.builder.on("builder_resize",this.resize,this),this.resize(),this},visualCreate:function(){this.$el.hide().fadeIn("fast")},resize:function(e){if(this.$el.is(":visible")){this.$(".so-cells .cell-wrapper").css("min-height",0),this.$(".so-cells .resize-handle").css("height",0);var t=0;this.$(".so-cells .cell").each(function(){t=Math.max(t,l(this).height()),l(this).css("width",100*l(this).data("view").model.get("weight")+"%")}),this.$(".so-cells .cell-wrapper").css("min-height",Math.max(t,63)),this.$(".so-cells .resize-handle").css("height",this.$(".so-cells .cell-wrapper").outerHeight())}},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){this.builder.addHistoryEntry("row_deleted");var e=this;this.$el.fadeOut("normal",function(){e.model.destroy(),e.builder.model.refreshPanelsData()})},onLabelChange:function(e,t){0==this.$(".so-row-label").length?this.$(".so-row-toolbar").prepend('<h3 class="so-row-label">'+t+"</h3>"):this.$(".so-row-label").text(t)},duplicateHandler:function(){this.builder.addHistoryEntry("row_duplicated");var e=this.model.clone(this.builder.model);this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},pasteHandler:function(){var e=s.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof s.model.row&&(this.builder.addHistoryEntry("row_pasted"),e.builder=this.builder.model,this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData())},confirmedDeleteHandler:function(e){var t=l(e.target);if(t.hasClass("dashicons")&&(t=l.parent()),t.hasClass("so-confirmed"))this.visualDestroyModel();else{var i=t.html();t.addClass("so-confirmed").html('<span class="dashicons dashicons-yes"></span>'+panelsOptions.loc.dropdown_confirm),setTimeout(function(){t.removeClass("so-confirmed").html(i)},2500)}},editSettingsHandler:function(){return null===this.dialog&&(this.dialog=new s.dialog.row,this.dialog.setBuilder(this.builder).setRowModel(this.model)),this.dialog.openDialog(),this},deleteHandler:function(){return this.model.destroy(),this},rowColorChangeHandler:function(e){this.$(".so-row-color").removeClass("so-row-color-selected");var t=l(e.target),i=t.data("color-label"),s=this.model.has("color_label")?this.model.get("color_label"):1;t.addClass("so-row-color-selected"),this.$el.removeClass("so-row-color-"+s),this.$el.addClass("so-row-color-"+i),this.model.set("color_label",i)},handleCellAdd:function(e){var t=new s.view.cell({model:e});t.row=this,t.render(),t.$el.appendTo(this.$(".so-cells"))},handleCellRemove:function(e){this.$(".so-cells > .cell").each(function(){var t=l(this).data("view");_.isUndefined(t)||t.model.cid===e.cid&&t.remove()})},buildContextualMenu:function(e,t){for(var i=[],l=1;l<5;l++)i.push({title:l+" "+panelsOptions.loc.contextual.column});this.builder.supports("addRow")&&t.addSection("add-row",{sectionTitle:panelsOptions.loc.contextual.add_row,search:!1},i,function(e){this.builder.addHistoryEntry("row_added");for(var t=Number(e)+1,i=[],l=0;l<t;l++)i.push({weight:100/t});var o=new s.model.row({collection:this.collection}),n=new s.collection.cells(i);n.each(function(e){e.row=o}),o.setCells(n),o.builder=this.builder.model,this.builder.model.get("rows").add(o,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()}.bind(this));var o={};this.builder.supports("editRow")&&(o.edit={title:panelsOptions.loc.contextual.row_edit}),s.helpers.clipboard.canCopyPaste()&&(o.copy={title:panelsOptions.loc.contextual.row_copy},this.builder.supports("addRow")&&s.helpers.clipboard.isModel("row-model")&&(o.paste={title:panelsOptions.loc.contextual.row_paste})),this.builder.supports("addRow")&&(o.duplicate={title:panelsOptions.loc.contextual.row_duplicate}),this.builder.supports("deleteRow")&&(o.delete={title:panelsOptions.loc.contextual.row_delete,confirm:!0}),_.isEmpty(o)||t.addSection("row-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},o,function(e){switch(e){case"edit":this.editSettingsHandler();break;case"copy":this.copyHandler();break;case"paste":this.pasteHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this))}})},{}],28:[function(e,t,i){var s=(window.panels,jQuery);t.exports=Backbone.View.extend({stylesLoaded:!1,initialize:function(){},render:function(e,t,i){if(!_.isUndefined(e)){i=_.extend({builderType:"",dialog:null},i),this.$el.addClass("so-visual-styles so-"+e+"-styles");var l={builderType:i.builderType};return"cell"===e&&(l.index=i.index),s.post(panelsOptions.ajaxurl,{action:"so_panels_style_form",type:e,style:this.model.get("style"),args:JSON.stringify(l),postId:t},function(e){this.$el.html(e),this.setupFields(),this.stylesLoaded=!0,this.trigger("styles_loaded",!_.isEmpty(e)),_.isNull(i.dialog)||i.dialog.trigger("styles_loaded",!_.isEmpty(e))}.bind(this)),this}},attach:function(e){e.append(this.$el)},detach:function(){this.$el.detach()},setupFields:function(){this.$(".style-section-wrapper").each(function(){var e=s(this);e.find(".style-section-head").click(function(t){t.preventDefault(),e.find(".style-section-fields").slideToggle("fast")})}),_.isUndefined(s.fn.wpColorPicker)||(_.isObject(panelsOptions.wpColorPickerOptions.palettes)&&!s.isArray(panelsOptions.wpColorPickerOptions.palettes)&&(panelsOptions.wpColorPickerOptions.palettes=s.map(panelsOptions.wpColorPickerOptions.palettes,function(e){return e})),this.$(".so-wp-color-field").wpColorPicker(panelsOptions.wpColorPickerOptions)),this.$(".style-field-image").each(function(){var e=null,t=s(this);t.find(".so-image-selector").click(function(i){i.preventDefault(),null===e&&(e=wp.media({title:"choose",library:{type:"image"},button:{text:"Done",close:!0}}),e.on("select",function(){var i=e.state().get("selection").first().attributes,s=i.url;if(!_.isUndefined(i.sizes))try{s=i.sizes.thumbnail.url}catch(e){s=i.sizes.full.url}t.find(".current-image").css("background-image","url("+s+")"),t.find("input").val(i.id)})),e.open()}),t.find(".remove-image").click(function(e){e.preventDefault(),t.find(".current-image").css("background-image","none"),t.find("input").val("")})}),this.$(".style-field-measurement").each(function(){var e=s(this),t=e.find('input[type="text"]'),i=e.find("select"),l=e.find('input[type="hidden"]');t.focus(function(){s(this).select()});!function(e){if(""!==e){var o=/(?:([0-9\.,\-]+)(.*))+/,n=l.val().split(" "),a=[];for(var r in n){var d=o.exec(n[r]);_.isNull(d)||_.isUndefined(d[1])||_.isUndefined(d[2])||(a.push(d[1]),i.val(d[2]))}1===t.length?t.val(a.join(" ")):(1===a.length?a=[a[0],a[0],a[0],a[0]]:2===a.length?a=[a[0],a[1],a[0],a[1]]:3===a.length&&(a=[a[0],a[1],a[2],a[1]]),t.each(function(e,t){s(t).val(a[e])}))}}(l.val());var o=function(e){if(1===t.length){var o=t.val().split(" ").filter(function(e){return""!==e}).map(function(e){return e+i.val()}).join(" ");l.val(o)}else{var n=s(e.target),a=[],r=[],d=[];t.each(function(e,t){var i=""!==s(t).val()?parseFloat(s(t).val()):null;a.push(i),null===i?r.push(e):d.push(e)}),3===r.length&&d[0]===t.index(n)&&(t.val(n.val()),a=[n.val(),n.val(),n.val(),n.val()]),JSON.stringify(a)===JSON.stringify([null,null,null,null])?l.val(""):l.val(a.map(function(e){return(null===e?0:e)+i.val()}).join(" "))}};t.change(o),i.change(o)})}})},{}],29:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-widget").html())),cell:null,dialog:null,events:{"click .widget-edit":"editHandler","click .title h4":"titleClickHandler","click .actions .widget-duplicate":"duplicateHandler","click .actions .widget-delete":"deleteHandler"},initialize:function(){this.model.on("user_edit",this.editHandler,this),this.model.on("user_duplicate",this.duplicateHandler,this),this.model.on("destroy",this.onModelDestroy,this),this.model.on("visual_destroy",this.visualDestroyModel,this),this.model.on("change:values",this.onModelChange,this),this.model.on("change:label",this.onLabelChange,this)},render:function(e){if(e=_.extend({loadForm:!1},e),this.setElement(this.template({title:this.model.getWidgetField("title"),description:this.model.getTitle()})),this.$el.data("view",this),this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")||(this.$(".actions .widget-edit").remove(),this.$el.addClass("so-widget-no-edit")),this.cell.row.builder.supports("addWidget")||(this.$(".actions .widget-duplicate").remove(),
|
4 |
this.$el.addClass("so-widget-no-duplicate")),this.cell.row.builder.supports("deleteWidget")||(this.$(".actions .widget-delete").remove(),this.$el.addClass("so-widget-no-delete")),this.cell.row.builder.supports("moveWidget")||this.$el.addClass("so-widget-no-move"),l.trim(this.$(".actions").html()).length||this.$(".actions").remove(),this.model.get("read_only")&&this.$el.addClass("so-widget-read-only"),0===_.size(this.model.get("values"))||e.loadForm){var t=this.getEditDialog();t.once("form_loaded",t.saveWidget,t),t.setupDialog()}return this},visualCreate:function(){this.$el.hide().fadeIn("fast")},getEditDialog:function(){return null===this.dialog&&(this.dialog=new s.dialog.widget({model:this.model}),this.dialog.setBuilder(this.cell.row.builder),this.dialog.widgetView=this),this.dialog},editHandler:function(){this.getEditDialog().openDialog()},titleClickHandler:function(e){return!this.cell.row.builder.supports("editWidget")||this.model.get("read_only")?this:(this.editHandler(),this)},duplicateHandler:function(){this.cell.row.builder.addHistoryEntry("widget_duplicated");var e=this.model.clone(this.model.cell);return this.cell.model.get("widgets").add(e,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},deleteHandler:function(){return this.model.trigger("visual_destroy"),this},onModelChange:function(){this.$(".description").html(this.model.getTitle())},onLabelChange:function(e){this.$(".title > h4").text(e.getWidgetField("title"))},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){this.cell.row.builder.addHistoryEntry("widget_deleted");var e=this;return this.$el.fadeOut("fast",function(){e.cell.row.resize(),e.model.destroy(),e.cell.row.builder.model.refreshPanelsData(),e.remove()}),this},buildContextualMenu:function(e,t){this.cell.row.builder.supports("addWidget")&&t.addSection("add-widget-below",{sectionTitle:panelsOptions.loc.contextual.add_widget_below,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,function(e){this.cell.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=this.cell.model,this.cell.model.get("widgets").add(t,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData()}.bind(this));var i={};this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")&&(i.edit={title:panelsOptions.loc.contextual.widget_edit}),s.helpers.clipboard.canCopyPaste()&&(i.copy={title:panelsOptions.loc.contextual.widget_copy}),this.cell.row.builder.supports("addWidget")&&(i.duplicate={title:panelsOptions.loc.contextual.widget_duplicate}),this.cell.row.builder.supports("deleteWidget")&&(i.delete={title:panelsOptions.loc.contextual.widget_delete,confirm:!0}),_.isEmpty(i)||t.addSection("widget-actions",{sectionTitle:panelsOptions.loc.contextual.widget_actions,search:!1},i,function(e){switch(e){case"edit":this.editHandler();break;case"copy":this.copyHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this)),this.cell.buildContextualMenu(e,t)}})},{}]},{},[16]);
|
1 |
!function e(t,i,s){function l(n,a){if(!i[n]){if(!t[n]){var r="function"==typeof require&&require;if(!a&&r)return r(n,!0);if(o)return o(n,!0);var d=new Error("Cannot find module '"+n+"'");throw d.code="MODULE_NOT_FOUND",d}var c=i[n]={exports:{}};t[n][0].call(c.exports,function(e){var i=t[n][1][e];return l(i||e)},c,c.exports,e,t,i,s)}return i[n].exports}for(var o="function"==typeof require&&require,n=0;n<s.length;n++)l(s[n]);return l}({1:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.cell,initialize:function(){},totalWeight:function(){var e=0;return this.each(function(t){e+=t.get("weight")}),e}})},{}],2:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.historyEntry,builder:null,maxSize:12,initialize:function(){this.on("add",this.onAddEntry,this)},addEntry:function(e,t){_.isEmpty(t)&&(t=this.builder.getPanelsData());var i=new s.model.historyEntry({text:e,data:JSON.stringify(t),time:parseInt((new Date).getTime()/1e3),collection:this});this.add(i)},onAddEntry:function(e){if(this.models.length>1){var t=this.at(this.models.length-2);(e.get("text")===t.get("text")&&e.get("time")-t.get("time")<15||e.get("data")===t.get("data"))&&(this.remove(e),t.set("count",t.get("count")+1))}for(;this.models.length>this.maxSize;)this.shift()}})},{}],3:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.row,empty:function(){for(var e;;){if(!(e=this.collection.first()))break;e.destroy()}}})},{}],4:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.widget,initialize:function(){}})},{}],5:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({dialogClass:"so-panels-dialog-add-builder",render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-builder").html(),{})),this.$(".so-content .siteorigin-panels-builder").append(this.builder.$el)},initializeDialog:function(){var e=this;this.once("open_dialog_complete",function(){e.builder.initSortable()}),this.on("open_dialog_complete",function(){e.builder.trigger("builder_resize")})}})},{}],6:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({historyEntryTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-history-entry").html())),entries:{},currentEntry:null,revertEntry:null,selectedEntry:null,previewScrollTop:null,dialogClass:"so-panels-dialog-history",dialogIcon:"history",events:{"click .so-close":"closeDialog","click .so-restore":"restoreSelectedEntry"},initializeDialog:function(){this.entries=new s.collection.historyEntries,this.on("open_dialog",this.setCurrentEntry,this),this.on("open_dialog",this.renderHistoryEntries,this)},render:function(){var e=this;this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-history").html(),{})),this.$("iframe.siteorigin-panels-history-iframe").load(function(){var t=l(this);t.show(),t.contents().scrollTop(e.previewScrollTop)})},setRevertEntry:function(e){this.revertEntry=new s.model.historyEntry({data:JSON.stringify(e.getPanelsData()),time:parseInt((new Date).getTime()/1e3)})},setCurrentEntry:function(){this.currentEntry=new s.model.historyEntry({data:JSON.stringify(this.builder.model.getPanelsData()),time:parseInt((new Date).getTime()/1e3)}),this.selectedEntry=this.currentEntry,this.previewEntry(this.currentEntry),this.$(".so-buttons .so-restore").addClass("disabled")},renderHistoryEntries:function(){var e=this,t=this.$(".history-entries").empty();this.currentEntry.get("data")===this.revertEntry.get("data")&&_.isEmpty(this.entries.models)||l(this.historyEntryTemplate({title:panelsOptions.loc.history.revert,count:1})).data("historyEntry",this.revertEntry).prependTo(t),this.entries.each(function(i){var s=e.historyEntryTemplate({title:panelsOptions.loc.history[i.get("text")],count:i.get("count")});l(s).data("historyEntry",i).prependTo(t)}),l(this.historyEntryTemplate({title:panelsOptions.loc.history.current,count:1})).data("historyEntry",this.currentEntry).addClass("so-selected").prependTo(t),t.find(".history-entry").click(function(){var i=jQuery(this);t.find(".history-entry").not(i).removeClass("so-selected"),i.addClass("so-selected");var s=i.data("historyEntry");e.selectedEntry=s,e.selectedEntry.cid!==e.currentEntry.cid?e.$(".so-buttons .so-restore").removeClass("disabled"):e.$(".so-buttons .so-restore").addClass("disabled"),e.previewEntry(s)}),this.updateEntryTimes()},previewEntry:function(e){var t=this.$("iframe.siteorigin-panels-history-iframe");t.hide(),this.previewScrollTop=t.contents().scrollTop(),this.$('form.history-form input[name="live_editor_panels_data"]').val(e.get("data")),this.$('form.history-form input[name="live_editor_post_ID"]').val(this.builder.config.postId),this.$("form.history-form").submit()},restoreSelectedEntry:function(){return!this.$(".so-buttons .so-restore").hasClass("disabled")&&(this.currentEntry.get("data")===this.selectedEntry.get("data")?(this.closeDialog(),!1):("restore"!==this.selectedEntry.get("text")&&this.builder.addHistoryEntry("restore",this.builder.model.getPanelsData()),this.builder.model.loadPanelsData(JSON.parse(this.selectedEntry.get("data"))),this.closeDialog(),!1))},updateEntryTimes:function(){var e=this;this.$(".history-entries .history-entry").each(function(){var t=jQuery(this),i=t.find(".timesince"),s=t.data("historyEntry");i.html(e.timeSince(s.get("time")))})},timeSince:function(e){var t,i=parseInt((new Date).getTime()/1e3)-e,s=[];return i>3600&&(t=Math.floor(i/3600),1===t?s.push(panelsOptions.loc.time.hour.replace("%d",t)):s.push(panelsOptions.loc.time.hours.replace("%d",t)),i-=3600*t),i>60&&(t=Math.floor(i/60),1===t?s.push(panelsOptions.loc.time.minute.replace("%d",t)):s.push(panelsOptions.loc.time.minutes.replace("%d",t)),i-=60*t),i>0&&(1===i?s.push(panelsOptions.loc.time.second.replace("%d",i)):s.push(panelsOptions.loc.time.seconds.replace("%d",i))),_.isEmpty(s)?panelsOptions.loc.time.now:panelsOptions.loc.time.ago.replace("%s",s.slice(0,2).join(", "))}})},{}],7:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({directoryTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-directory-items").html())),builder:null,dialogClass:"so-panels-dialog-prebuilt-layouts",dialogIcon:"layouts",layoutCache:{},currentTab:!1,directoryPage:1,events:{"click .so-close":"closeDialog","click .so-sidebar-tabs li a":"tabClickHandler","click .so-content .layout":"layoutClickHandler","keyup .so-sidebar-search":"searchHandler","click .so-screenshot, .so-title":"directoryItemClickHandler"},initializeDialog:function(){var e=this;this.on("open_dialog",function(){e.$(".so-sidebar-tabs li a").first().click(),e.$(".so-status").removeClass("so-panels-loading")}),this.on("button_click",this.toolbarButtonClick,this)},render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-prebuilt").html(),{})),this.initToolbar()},tabClickHandler:function(e){e.preventDefault(),this.selectedLayoutItem=null,this.uploadedLayout=null,this.updateButtonState(!1),this.$(".so-sidebar-tabs li").removeClass("tab-active");var t=l(e.target),i=t.attr("href").split("#")[1];t.parent().addClass("tab-active");var s=this;this.$(".so-content").empty(),s.currentTab=i,"import"==i?this.displayImportExport():this.displayLayoutDirectory("",1,i),s.$(".so-sidebar-search").val("")},displayImportExport:function(){var e=this.$(".so-content").empty().removeClass("so-panels-loading");e.html(l("#siteorigin-panels-dialog-prebuilt-importexport").html());var t=this,i=t.$(".import-upload-ui").hide();new plupload.Uploader({runtimes:"html5,silverlight,flash,html4",browse_button:i.find(".file-browse-button").get(0),container:i.get(0),drop_element:i.find(".drag-upload-area").get(0),file_data_name:"panels_import_data",multiple_queues:!1,max_file_size:panelsOptions.plupload.max_file_size,url:panelsOptions.plupload.url,flash_swf_url:panelsOptions.plupload.flash_swf_url,silverlight_xap_url:panelsOptions.plupload.silverlight_xap_url,filters:[{title:panelsOptions.plupload.filter_title,extensions:"json"}],multipart_params:{action:"so_panels_import_layout"},init:{PostInit:function(e){e.features.dragdrop&&i.addClass("has-drag-drop"),i.show().find(".progress-precent").css("width","0%")},FilesAdded:function(e){i.find(".file-browse-button").blur(),i.find(".drag-upload-area").removeClass("file-dragover"),i.find(".progress-bar").fadeIn("fast"),t.$(".js-so-selected-file").text(panelsOptions.loc.prebuilt_loading),e.start()},UploadProgress:function(e,t){i.find(".progress-precent").css("width",t.percent+"%")},FileUploaded:function(e,s,l){var o=JSON.parse(l.response);_.isUndefined(o.widgets)?alert(panelsOptions.plupload.error_message):(t.uploadedLayout=o,i.find(".progress-bar").hide(),t.$(".js-so-selected-file").text(panelsOptions.loc.ready_to_insert.replace("%s",s.name)),t.updateButtonState(!0))},Error:function(){alert(panelsOptions.plupload.error_message)}}}).init(),i.find(".drag-upload-area").on("dragover",function(){l(this).addClass("file-dragover")}).on("dragleave",function(){l(this).removeClass("file-dragover")}),e.find(".so-export").submit(function(e){l(this).find('input[name="panels_export_data"]').val(JSON.stringify(t.builder.model.getPanelsData()))})},displayLayoutDirectory:function(e,t,i){var s=this,o=this.$(".so-content").empty().addClass("so-panels-loading");if(void 0===e&&(e=""),void 0===t&&(t=1),void 0===i&&(i="directory-siteorigin"),i.match("^directory-")&&!panelsOptions.directory_enabled)return o.removeClass("so-panels-loading").html(l("#siteorigin-panels-directory-enable").html()),void o.find(".so-panels-enable-directory").click(function(n){n.preventDefault(),l.get(panelsOptions.ajaxurl,{action:"so_panels_directory_enable"},function(){}),panelsOptions.directory_enabled=!0,o.addClass("so-panels-loading"),s.displayLayoutDirectory(e,t,i)});l.get(panelsOptions.ajaxurl,{action:"so_panels_layouts_query",search:e,page:t,type:i},function(n){if(s.currentTab===i){o.removeClass("so-panels-loading").html(s.directoryTemplate(n));var a=o.find(".so-previous"),r=o.find(".so-next");t<=1?a.addClass("button-disabled"):a.click(function(i){i.preventDefault(),s.displayLayoutDirectory(e,t-1,s.currentTab)}),t===n.max_num_pages||0===n.max_num_pages?r.addClass("button-disabled"):r.click(function(i){i.preventDefault(),s.displayLayoutDirectory(e,t+1,s.currentTab)}),o.find(".so-screenshot").each(function(){var e=l(this),t=e.find(".so-screenshot-wrapper");if(t.css("height",t.width()/4*3+"px").addClass("so-loading"),""!==e.data("src"))var i=l("<img/>").attr("src",e.data("src")).load(function(){t.removeClass("so-loading").css("height","auto"),i.appendTo(t).hide().fadeIn("fast")});else l("<img/>").attr("src",panelsOptions.prebuiltDefaultScreenshot).appendTo(t).hide().fadeIn("fast")}),o.find(".so-directory-browse").html(n.title)}},"json")},directoryItemClickHandler:function(e){var t=this.$(e.target).closest(".so-directory-item");this.$(".so-directory-items").find(".selected").removeClass("selected"),t.addClass("selected"),this.selectedLayoutItem={lid:t.data("layout-id"),type:t.data("layout-type")},this.updateButtonState(!0)},toolbarButtonClick:function(e){if(!this.canAddLayout())return!1;var t=e.data("value");if(_.isUndefined(t))return!1;if(this.updateButtonState(!1),e.hasClass("so-needs-confirm")&&!e.hasClass("so-confirmed")){if(this.updateButtonState(!0),e.hasClass("so-confirming"))return;e.addClass("so-confirming");var i=e.html();return e.html('<span class="dashicons dashicons-yes"></span>'+e.data("confirm")),setTimeout(function(){e.removeClass("so-confirmed").html(i)},2500),setTimeout(function(){e.removeClass("so-confirming"),e.addClass("so-confirmed")},200),!1}this.addingLayout=!0,"import"===this.currentTab?this.addLayoutToBuilder(this.uploadedLayout,t):this.loadSelectedLayout().then(function(e){this.addLayoutToBuilder(e,t)}.bind(this))},canAddLayout:function(){return(this.selectedLayoutItem||this.uploadedLayout)&&!this.addingLayout},loadSelectedLayout:function(){this.setStatusMessage(panelsOptions.loc.prebuilt_loading,!0);var e=_.extend(this.selectedLayoutItem,{action:"so_panels_get_layout"}),t=new l.Deferred;return l.get(panelsOptions.ajaxurl,e,function(e){void 0!==e.error?(alert(e.error),t.reject(e)):(this.setStatusMessage("",!1),t.resolve(e))}.bind(this)),t.promise()},searchHandler:function(e){13===e.keyCode&&this.displayLayoutDirectory(l(e.currentTarget).val(),1,this.currentTab)},updateButtonState:function(e){e=e&&(this.selectedLayoutItem||this.uploadedLayout);var t=this.$(".so-import-layout");t.prop("disabled",!e),e?t.removeClass("disabled"):t.addClass("disabled")},addLayoutToBuilder:function(e,t){this.builder.addHistoryEntry("prebuilt_loaded"),this.builder.model.loadPanelsData(e,t),this.addingLayout=!1,this.closeDialog()}})},{}],8:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({cellPreviewTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-row-cell-preview").html())),editableLabel:!0,events:{"click .so-close":"closeDialog","click .so-toolbar .so-save":"saveHandler","click .so-toolbar .so-insert":"insertHandler","click .so-toolbar .so-delete":"deleteHandler","click .so-toolbar .so-duplicate":"duplicateHandler","change .row-set-form > *":"setCellsFromForm","click .row-set-form button.set-row":"setCellsFromForm"},dialogIcon:"add-row",dialogClass:"so-panels-dialog-row-edit",styleType:"row",dialogType:"edit",row:{cells:null,style:{}},cellStylesCache:[],initializeDialog:function(){this.on("open_dialog",function(){_.isUndefined(this.model)||_.isEmpty(this.model.get("cells"))?this.setRowModel(null):this.setRowModel(this.model),this.regenerateRowPreview()},this),this.row={cells:new s.collection.cells([{weight:.5},{weight:.5}]),style:{}},this.dialogFormsLoaded=0;var e=this;this.on("form_loaded styles_loaded",function(){2===++this.dialogFormsLoaded&&e.updateModel({refreshArgs:{silent:!0}})}),this.on("close_dialog",this.closeHandler),this.on("edit_label",function(e){if(e!==panelsOptions.loc.row.add&&e!==panelsOptions.loc.row.edit||(e=""),this.model.set("label",e),_.isEmpty(e)){var t="create"===this.dialogType?panelsOptions.loc.row.add:panelsOptions.loc.row.edit;this.$(".so-title").text(t)}}.bind(this))},setRowDialogType:function(e){this.dialogType=e},render:function(){var e="create"===this.dialogType?panelsOptions.loc.row.add:panelsOptions.loc.row.edit;this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-row").html(),{title:e,dialogType:this.dialogType}));var t=this.$(".so-title");this.model.has("label")&&!_.isEmpty(this.model.get("label"))&&t.text(this.model.get("label")),this.$(".so-edit-title").val(t.text()),this.styles=new s.view.styles,this.styles.model=this.model,this.styles.render("row",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this}),this.builder.supports("addRow")||this.$(".so-buttons .so-duplicate").remove(),this.builder.supports("deleteRow")||this.$(".so-buttons .so-delete").remove();var i=this.$(".so-sidebar.so-right-sidebar");return this.styles.attach(i),this.styles.on("styles_loaded",function(e){e?i.removeClass("so-panels-loading"):(i.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar"),i.remove())},this),i.addClass("so-panels-loading"),_.isUndefined(this.model)||this.$("input.so-row-field").val(this.model.get("cells").length),this.$("input.so-row-field").keyup(function(){l(this).trigger("change")}),this},setRowModel:function(e){return this.model=e,_.isEmpty(this.model)?this:(this.row={cells:this.model.get("cells").clone(),style:{}},this.$("input.so-row-field").val(this.model.get("cells").length),this.clearCellStylesCache(),this)},regenerateRowPreview:function(){var e=this,t=this.$(".row-preview"),i=this.getSelectedCellIndex();t.empty();var s;this.row.cells.each(function(o,n){var a=l(this.cellPreviewTemplate({weight:o.get("weight")}));t.append(a),n==i&&a.find(".preview-cell-in").addClass("cell-selected");var r,d=a.prev();d.length&&(r=l('<div class="resize-handle"></div>'),r.appendTo(a).dblclick(function(){var t=e.row.cells.at(n-1),i=o.get("weight")+t.get("weight");o.set("weight",i/2),t.set("weight",i/2),e.scaleRowWidths()}),r.draggable({axis:"x",containment:t,start:function(e,t){var i=a.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:a.outerWidth(),left:6,height:a.outerHeight()});i.find(".resize-handle").remove();var s=d.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:d.outerWidth(),right:6,height:d.outerHeight()});s.find(".resize-handle").remove(),l(this).data({newCellClone:i,prevCellClone:s}),a.find("> .preview-cell-in").css("visibility","hidden"),d.find("> .preview-cell-in").css("visibility","hidden")},drag:function(i,s){var o=e.row.cells.at(n).get("weight"),a=e.row.cells.at(n-1).get("weight"),r=o-(s.position.left+6)/t.width(),d=a+(s.position.left+6)/t.width();s.helper.offset().left,t.offset().left;l(this).data("newCellClone").css("width",t.width()*r).find(".preview-cell-weight").html(Math.round(1e3*r)/10),l(this).data("prevCellClone").css("width",t.width()*d).find(".preview-cell-weight").html(Math.round(1e3*d)/10)},stop:function(i,s){l(this).data("newCellClone").remove(),l(this).data("prevCellClone").remove(),a.find(".preview-cell-in").css("visibility","visible"),d.find(".preview-cell-in").css("visibility","visible");var o=s.position.left+6,r=o/t.width(),c=e.row.cells.at(n),h=e.row.cells.at(n-1);c.get("weight")-r>.02&&h.get("weight")+r>.02&&(c.set("weight",c.get("weight")-r),h.set("weight",h.get("weight")+r)),e.scaleRowWidths(),s.helper.css("left",-6)}})),a.click(function(e){if(l(e.target).is(".preview-cell")||l(e.target).is(".preview-cell-in")){var t=l(e.target);t.closest(".row-preview").find(".preview-cell .preview-cell-in").removeClass("cell-selected"),t.addClass("cell-selected"),this.openSelectedCellStyles()}}.bind(this)),a.find(".preview-cell-weight").click(function(i){e.$(".resize-handle").css("pointer-event","none").draggable("disable"),t.find(".preview-cell-weight").each(function(){var i=jQuery(this).hide();l('<input type="text" class="preview-cell-weight-input no-user-interacted" />').val(parseFloat(i.html())).insertAfter(i).focus(function(){clearTimeout(s)}).keyup(function(e){9!==e.keyCode&&l(this).removeClass("no-user-interacted"),13===e.keyCode&&(e.preventDefault(),l(this).blur())}).keydown(function(e){if(9===e.keyCode){e.preventDefault();var i=t.find(".preview-cell-weight-input"),s=i.index(l(this));s===i.length-1?i.eq(0).focus().select():i.eq(s+1).focus().select()}}).blur(function(){t.find(".preview-cell-weight-input").each(function(t,i){isNaN(parseFloat(l(i).val()))&&l(i).val(Math.floor(1e3*e.row.cells.at(t).get("weight"))/10)}),s=setTimeout(function(){if(0===t.find(".preview-cell-weight-input").length)return!1;var i=[],s=[],o=0,n=0;if(t.find(".preview-cell-weight-input").each(function(t,a){var r=parseFloat(l(a).val());r=isNaN(r)?1/e.row.cells.length:Math.round(10*r)/1e3;var d=!l(a).hasClass("no-user-interacted");i.push(r),s.push(d),d?o+=r:n+=r}),o>0&&n>0&&1-o>0)for(var a=0;a<i.length;a++)s[a]||(i[a]=i[a]/n*(1-o));var r=_.reduce(i,function(e,t){return e+t});i=i.map(function(e){return e/r}),Math.min.apply(Math,i)>.01&&e.row.cells.each(function(e,t){e.set("weight",i[t])}),t.find(".preview-cell").each(function(t,i){var s=e.row.cells.at(t).get("weight");l(i).animate({width:Math.round(1e3*s)/10+"%"},250),l(i).find(".preview-cell-weight-input").val(Math.round(1e3*s)/10)}),t.find(".preview-cell").css("overflow","visible"),setTimeout(function(){e.regenerateRowPreview()},260)},100)}).click(function(){l(this).select()})}),l(this).siblings(".preview-cell-weight-input").select()})},this),this.openSelectedCellStyles(),this.trigger("form_loaded",this)},getSelectedCellIndex:function(){var e=-1;return this.$(".preview-cell .preview-cell-in").each(function(t,i){l(i).is(".cell-selected")&&(e=t)}),e},openSelectedCellStyles:function(){if(!_.isUndefined(this.cellStyles)){if(this.cellStyles.stylesLoaded){var e={};try{e=this.getFormValues(".so-sidebar .so-visual-styles.so-cell-styles").style}catch(e){console.log("Error retrieving cell styles - "+e.message)}this.cellStyles.model.set("style",e)}this.cellStyles.detach()}if(this.cellStyles=this.getSelectedCellStyles(),this.cellStyles){var t=this.$(".so-sidebar.so-right-sidebar");this.cellStyles.attach(t),this.cellStyles.stylesLoaded||(this.cellStyles.on("styles_loaded",function(){t.removeClass("so-panels-loading")},this),t.addClass("so-panels-loading"))}},getSelectedCellStyles:function(){var e=this.getSelectedCellIndex();if(e>-1){var t=this.cellStylesCache[e];t||(t=new s.view.styles,t.model=this.row.cells.at(e),t.render("cell",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this,index:e}),this.cellStylesCache[e]=t)}return t},clearCellStylesCache:function(){this.cellStylesCache.forEach(function(e){e.remove()}),this.cellStylesCache=[]},scaleRowWidths:function(){var e=this;this.$(".row-preview .preview-cell").each(function(t,i){var s=e.row.cells.at(t);l(i).css("width",100*s.get("weight")+"%").find(".preview-cell-weight").html(Math.round(1e3*s.get("weight"))/10)})},setCellsFromForm:function(){try{var e={cells:parseInt(this.$('.row-set-form input[name="cells"]').val()),ratio:parseFloat(this.$('.row-set-form select[name="ratio"]').val()),direction:this.$('.row-set-form select[name="ratio_direction"]').val()};_.isNaN(e.cells)&&(e.cells=1),isNaN(e.ratio)&&(e.ratio=1),e.cells<1?(e.cells=1,this.$('.row-set-form input[name="cells"]').val(e.cells)):e.cells>12&&(e.cells=12,this.$('.row-set-form input[name="cells"]').val(e.cells)),this.$('.row-set-form input[name="ratio"]').val(e.ratio);for(var t=[],i=this.row.cells.length!==e.cells,o=1,n=0;n<e.cells;n++)t.push(o),o*=e.ratio;var a=_.reduce(t,function(e,t){return e+t});if(t=_.map(t,function(e){return e/a}),t=_.filter(t,function(e){return e>.01}),"left"===e.direction&&(t=t.reverse()),this.row.cells=new s.collection.cells(this.row.cells.first(t.length)),_.each(t,function(e,t){var i=this.row.cells.at(t);i?i.set("weight",e):(i=new s.model.cell({weight:e,row:this.model}),this.row.cells.add(i))}.bind(this)),i)this.regenerateRowPreview();else{var r=this;this.$(".preview-cell").each(function(e,t){var i=r.row.cells.at(e).get("weight");l(t).animate({width:Math.round(1e3*i)/10+"%"},250),l(t).find(".preview-cell-weight").html(Math.round(1e3*i)/10)}),this.$(".preview-cell").css("overflow","visible"),setTimeout(function(){r.regenerateRowPreview()},260)}}catch(e){console.log("Error setting cells - "+e.message)}this.$(".row-set-form .so-button-row-set").removeClass("button-primary")},tabClickHandler:function(e){"#row-layout"===e.attr("href")?this.$(".so-panels-dialog").addClass("so-panels-dialog-has-right-sidebar"):this.$(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar")},updateModel:function(e){if(e=_.extend({refresh:!0,refreshArgs:null},e),_.isEmpty(this.model)||this.model.setCells(this.row.cells),!_.isUndefined(this.styles)&&this.styles.stylesLoaded){var t={};try{t=this.getFormValues(".so-sidebar .so-visual-styles.so-row-styles").style}catch(e){console.log("Error retrieving row styles - "+e.message)}this.model.set("style",t)}if(!_.isUndefined(this.cellStyles)&&this.cellStyles.stylesLoaded){var t={};try{t=this.getFormValues(".so-sidebar .so-visual-styles.so-cell-styles").style}catch(e){console.log("Error retrieving cell styles - "+e.message)}this.cellStyles.model.set("style",t)}e.refresh&&this.builder.model.refreshPanelsData(e.refreshArgs)},insertHandler:function(){this.builder.addHistoryEntry("row_added"),this.updateModel();var e=this.builder.getActiveCell({createCell:!1}),t={};return null!==e&&(t.at=this.builder.model.get("rows").indexOf(e.row)+1),this.model.collection=this.builder.model.get("rows"),this.builder.model.get("rows").add(this.model,t),this.closeDialog(),this.builder.model.refreshPanelsData(),!1},saveHandler:function(){return this.builder.addHistoryEntry("row_edited"),this.updateModel(),this.closeDialog(),this.builder.model.refreshPanelsData(),!1},deleteHandler:function(){return this.model.trigger("visual_destroy"),this.closeDialog({silent:!0}),!1},duplicateHandler:function(){this.builder.addHistoryEntry("row_duplicated");var e=this.model.clone(this.builder.model);return this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.closeDialog({silent:!0}),!1},closeHandler:function(){this.clearCellStylesCache(),_.isUndefined(this.cellStyles)||(this.cellStyles=void 0)}})},{}],9:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({builder:null,sidebarWidgetTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-widget-sidebar-widget").html())),dialogClass:"so-panels-dialog-edit-widget",dialogIcon:"add-widget",widgetView:!1,savingWidget:!1,editableLabel:!0,events:{"click .so-close":"saveHandler","click .so-nav.so-previous":"navToPrevious","click .so-nav.so-next":"navToNext","click .so-toolbar .so-delete":"deleteHandler","click .so-toolbar .so-duplicate":"duplicateHandler"},initializeDialog:function(){var e=this;this.model.on("change:values",this.handleChangeValues,this),this.model.on("destroy",this.remove,this),this.dialogFormsLoaded=0,this.on("form_loaded styles_loaded",function(){2===++this.dialogFormsLoaded&&e.updateModel({refreshArgs:{silent:!0}})}),this.on("edit_label",function(e){e===panelsOptions.widgets[this.model.get("class")].title&&(e=""),this.model.set("label",e),_.isEmpty(e)&&this.$(".so-title").text(this.model.getWidgetField("title"))}.bind(this))},render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-widget").html(),{})),this.loadForm();var e=this.model.getWidgetField("title");this.$(".so-title .widget-name").html(e),this.$(".so-edit-title").val(e),this.builder.supports("addWidget")||this.$(".so-buttons .so-duplicate").remove(),this.builder.supports("deleteWidget")||this.$(".so-buttons .so-delete").remove(),this.styles=new s.view.styles,this.styles.model=this.model,this.styles.render("widget",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this});var t=this.$(".so-sidebar.so-right-sidebar");this.styles.attach(t),this.styles.on("styles_loaded",function(e){e?t.removeClass("so-panels-loading"):(t.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar"),t.remove())},this),t.addClass("so-panels-loading")},getPrevDialog:function(){var e=this.builder.$(".so-cells .cell .so-widget");if(e.length<=1)return!1;var t=e.index(this.widgetView.$el);if(0===t)return!1;do{if(widgetView=e.eq(--t).data("view"),!_.isUndefined(widgetView)&&!widgetView.model.get("read_only"))return widgetView.getEditDialog()}while(!_.isUndefined(widgetView)&&t>0);return!1},getNextDialog:function(){var e=this.builder.$(".so-cells .cell .so-widget");if(e.length<=1)return!1;var t,i=e.index(this.widgetView.$el);if(i===e.length-1)return!1;do{if(t=e.eq(++i).data("view"),!_.isUndefined(t)&&!t.model.get("read_only"))return t.getEditDialog()}while(!_.isUndefined(t));return!1},loadForm:function(){if(this.$("> *").length){var e=this;this.$(".so-content").addClass("so-panels-loading");var t={action:"so_panels_widget_form",widget:this.model.get("class"),instance:JSON.stringify(this.model.get("values")),raw:this.model.get("raw")};l.post(panelsOptions.ajaxurl,t,function(t){var i=t.replace(/{\$id}/g,e.model.cid);e.$(".so-content").removeClass("so-panels-loading").html(i),e.trigger("form_loaded",e),e.$(".panel-dialog").trigger("panelsopen"),e.on("close_dialog",e.updateModel,e)},"html")}},updateModel:function(e){if(e=_.extend({refresh:!0,refreshArgs:null},e),this.savingWidget=!0,!this.model.get("missing")){var t=this.getFormValues();_.isUndefined(t.widgets)?t={}:(t=t.widgets,t=t[Object.keys(t)[0]]),this.model.setValues(t),this.model.set("raw",!0)}if(this.styles.stylesLoaded){var i={};try{i=this.getFormValues(".so-sidebar .so-visual-styles").style}catch(e){}this.model.set("style",i)}this.savingWidget=!1,e.refresh&&this.builder.model.refreshPanelsData(e.refreshArgs)},handleChangeValues:function(){this.savingWidget||this.loadForm()},saveHandler:function(){this.builder.addHistoryEntry("widget_edited"),this.closeDialog()},deleteHandler:function(){return this.model.trigger("visual_destroy"),this.closeDialog({silent:!0}),this.builder.model.refreshPanelsData(),!1},duplicateHandler:function(){return this.model.trigger("user_duplicate"),this.closeDialog({silent:!0}),this.builder.model.refreshPanelsData(),!1}})},{}],10:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({builder:null,widgetTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-widgets-widget").html())),filter:{},dialogClass:"so-panels-dialog-add-widget",dialogIcon:"add-widget",events:{"click .so-close":"closeDialog","click .widget-type":"widgetClickHandler","keyup .so-sidebar-search":"searchHandler"},initializeDialog:function(){this.on("open_dialog",function(){this.filter.search="",this.filterWidgets(this.filter)},this),this.on("open_dialog_complete",function(){this.$(".so-sidebar-search").val("").focus(),this.balanceWidgetHeights()}),this.on("tab_click",this.tabClickHandler,this)},render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-widgets").html(),{})),_.each(panelsOptions.widgets,function(e){var t=l(this.widgetTemplate({title:e.title,description:e.description}));_.isUndefined(e.icon)&&(e.icon="dashicons dashicons-admin-generic"),l('<span class="widget-icon" />').addClass(e.icon).prependTo(t.find(".widget-type-wrapper")),t.data("class",e.class).appendTo(this.$(".widget-type-list"))},this);var e=this.$(".so-sidebar-tabs");_.each(panelsOptions.widget_dialog_tabs,function(t){l(this.dialogTabTemplate({title:t.title})).data({message:t.message,filter:t.filter}).appendTo(e)},this),this.initTabs();var t=this;l(window).resize(function(){t.balanceWidgetHeights()})},tabClickHandler:function(e){this.filter=e.parent().data("filter"),this.filter.search=this.$(".so-sidebar-search").val();var t=e.parent().data("message");return _.isEmpty(t)&&(t=""),this.$(".so-toolbar .so-status").html(t),this.filterWidgets(this.filter),!1},searchHandler:function(e){if(13===e.which){var t=this.$(".widget-type-list .widget-type:visible");1===t.length&&t.click()}else this.filter.search=l(e.target).val().trim(),this.filterWidgets(this.filter)},filterWidgets:function(e){_.isUndefined(e)&&(e={}),_.isUndefined(e.groups)&&(e.groups=""),this.$(".widget-type-list .widget-type").each(function(){var t,i=l(this),s=i.data("class"),o=_.isUndefined(panelsOptions.widgets[s])?null:panelsOptions.widgets[s];t=!!_.isEmpty(e.groups)||null!==o&&!_.isEmpty(_.intersection(e.groups,panelsOptions.widgets[s].groups)),t&&(_.isUndefined(e.search)||""===e.search||-1===o.title.toLowerCase().indexOf(e.search.toLowerCase())&&(t=!1)),t?i.show():i.hide()}),this.balanceWidgetHeights()},widgetClickHandler:function(e){this.builder.addHistoryEntry("widget_added");var t=l(e.currentTarget),i=new s.model.widget({class:t.data("class")});i.cell=this.builder.getActiveCell(),i.cell.get("widgets").add(i),this.closeDialog(),this.builder.model.refreshPanelsData()},balanceWidgetHeights:function(e){var t=[[]],i=null,s=Math.round(this.$(".widget-type").parent().width()/this.$(".widget-type").width());this.$(".widget-type").css("clear","none").filter(":visible").each(function(e,t){e%s==0&&0!==e&&l(t).css("clear","both")}),this.$(".widget-type-wrapper").css("height","auto").filter(":visible").each(function(e,s){var o=l(s);null!==i&&i.position().top!==o.position().top&&(t[t.length]=[]),i=o,t[t.length-1].push(o)}),_.each(t,function(e,t){var i=_.max(e.map(function(e){return e.height()}));_.each(e,function(e){e.height(i)})})}})},{}],11:[function(e,t,i){t.exports={canCopyPaste:function(){return"undefined"!=typeof Storage&&panelsOptions.user},setModel:function(e){if(!this.canCopyPaste())return!1;var t=panels.helpers.serialize.serialize(e)
|
2 |
+
;return e instanceof panels.model.row?t.thingType="row-model":e instanceof panels.model.widget&&(t.thingType="widget-model"),localStorage["panels_clipboard_"+panelsOptions.user]=JSON.stringify(t),!0},isModel:function(e){if(!this.canCopyPaste())return!1;var t=localStorage["panels_clipboard_"+panelsOptions.user];return void 0!==t&&(t=JSON.parse(t),t.thingType&&t.thingType===e)},getModel:function(e){if(!this.canCopyPaste())return null;var t=localStorage["panels_clipboard_"+panelsOptions.user];return void 0!==t&&(t=JSON.parse(t),t.thingType&&t.thingType===e)?panels.helpers.serialize.unserialize(t,t.thingType,null):null}}},{}],12:[function(e,t,i){t.exports={lock:function(){if("hidden"!==jQuery("body").css("overflow")){var e=[self.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,self.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop];jQuery("body").data({"scroll-position":e}).css("overflow","hidden"),_.isUndefined(e)||window.scrollTo(e[0],e[1])}},unlock:function(){if("hidden"===jQuery("body").css("overflow")&&!jQuery(".so-panels-dialog-wrapper").is(":visible")&&!jQuery(".so-panels-live-editor").is(":visible")){jQuery("body").css("overflow","visible");var e=jQuery("body").data("scroll-position");_.isUndefined(e)||window.scrollTo(e[0],e[1])}}}},{}],13:[function(e,t,i){t.exports={serialize:function(e){var t;if(e instanceof Backbone.Model){var i={};for(var s in e.attributes)if(e.attributes.hasOwnProperty(s)){if("builder"===s||"collection"===s)continue;t=e.attributes[s],t instanceof Backbone.Model||t instanceof Backbone.Collection?i[s]=this.serialize(t):i[s]=t}return i}if(e instanceof Backbone.Collection){for(var l=[],o=0;o<e.models.length;o++)t=e.models[o],t instanceof Backbone.Model||t instanceof Backbone.Collection?l.push(this.serialize(t)):l.push(t);return l}},unserialize:function(e,t,i){var s;switch(t){case"row-model":s=new panels.model.row,s.builder=i,s.set("style",e.style),s.setCells(this.unserialize(e.cells,"cell-collection",s));break;case"cell-model":s=new panels.model.cell,s.row=i,s.set("weight",e.weight),s.set("style",e.style),s.set("widgets",this.unserialize(e.widgets,"widget-collection",s));break;case"widget-model":s=new panels.model.widget,s.cell=i;for(var l in e)e.hasOwnProperty(l)&&s.set(l,e[l]);s.set("widget_id",panels.helpers.utils.generateUUID());break;case"cell-collection":s=new panels.collection.cells;for(var o=0;o<e.length;o++)s.push(this.unserialize(e[o],"cell-model",i));break;case"widget-collection":s=new panels.collection.widgets;for(var o=0;o<e.length;o++)s.push(this.unserialize(e[o],"widget-model",i));break;default:console.log("Unknown Thing - "+t)}return s}}},{}],14:[function(e,t,i){t.exports={generateUUID:function(){var e=(new Date).getTime();return window.performance&&"function"==typeof window.performance.now&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?i:3&i|8).toString(16)})},processTemplate:function(e){return e=e.replace(/{{%/g,"<%"),e=e.replace(/%}}/g,"%>"),e=e.trim()},selectElementContents:function(e){var t=document.createRange();t.selectNodeContents(e);var i=window.getSelection();i.removeAllRanges(),i.addRange(t)}}},{}],15:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=function(e){return this.each(function(){var t=jQuery(this),i=t.closest("form").find(".widget-id").val(),o=l.extend(!0,{},e);if(_.isUndefined(i)||!(i.indexOf("__i__")>-1)){var n=new s.model.builder,a=new s.view.builder({model:n,config:o}),r=t.closest(".so-panels-dialog-wrapper").data("view");_.isUndefined(r)||(r.on("close_dialog",function(){n.refreshPanelsData()}),r.on("open_dialog_complete",function(){a.trigger("builder_resize")}),r.model.on("destroy",function(){n.emptyRows().destroy()}),a.setDialogParents(panelsOptions.loc.layout_widget,r));var d=Boolean(t.closest(".widget-content").length);a.render().attach({container:t,dialog:d||"dialog"===t.data("mode"),type:t.data("type")}).setDataField(t.find("input.panels-data")),d||"dialog"===t.data("mode")?(a.setDialogParents(panelsOptions.loc.layout_widget,a.dialog),t.find(".siteorigin-panels-display-builder").click(function(e){e.preventDefault(),a.dialog.openDialog()})):t.find(".siteorigin-panels-display-builder").parent().remove(),l(document).trigger("panels_setup",a)}})}},{}],16:[function(e,t,i){var s={};window.panels=s,window.siteoriginPanels=s,s.helpers={},s.helpers.clipboard=e("./helpers/clipboard"),s.helpers.utils=e("./helpers/utils"),s.helpers.serialize=e("./helpers/serialize"),s.helpers.pageScroll=e("./helpers/page-scroll"),s.model={},s.model.widget=e("./model/widget"),s.model.cell=e("./model/cell"),s.model.row=e("./model/row"),s.model.builder=e("./model/builder"),s.model.historyEntry=e("./model/history-entry"),s.collection={},s.collection.widgets=e("./collection/widgets"),s.collection.cells=e("./collection/cells"),s.collection.rows=e("./collection/rows"),s.collection.historyEntries=e("./collection/history-entries"),s.view={},s.view.widget=e("./view/widget"),s.view.cell=e("./view/cell"),s.view.row=e("./view/row"),s.view.builder=e("./view/builder"),s.view.dialog=e("./view/dialog"),s.view.styles=e("./view/styles"),s.view.liveEditor=e("./view/live-editor"),s.dialog={},s.dialog.builder=e("./dialog/builder"),s.dialog.widgets=e("./dialog/widgets"),s.dialog.widget=e("./dialog/widget"),s.dialog.prebuilt=e("./dialog/prebuilt"),s.dialog.row=e("./dialog/row"),s.dialog.history=e("./dialog/history"),s.utils={},s.utils.menu=e("./utils/menu"),jQuery.fn.soPanelsSetupBuilderWidget=e("./jquery/setup-builder-widget"),jQuery(function(e){var t,i,s,l;if(e("#siteorigin-panels-metabox").length&&e("form#post").length)t=e("#siteorigin-panels-metabox"),i=e("#siteorigin-panels-metabox .siteorigin-panels-data-field"),s=e("form#post"),l={editorType:"tinyMCE",postId:e("#post_ID").val(),editorId:"#content",builderType:e("#siteorigin-panels-metabox").data("builder-type"),builderSupports:e("#siteorigin-panels-metabox").data("builder-supports"),loadOnAttach:panelsOptions.loadOnAttach&&1==e("#auto_draft").val(),loadLiveEditor:1==e("#siteorigin-panels-metabox").data("live-editor"),liveEditorPreview:t.data("preview-url")};else if(e(".siteorigin-panels-builder-form").length){var o=e(".siteorigin-panels-builder-form");t=o.find(".siteorigin-panels-builder-container"),i=o.find('input[name="panels_data"]'),s=o,l={editorType:"standalone",postId:o.data("post-id"),editorId:"#post_content",builderType:o.data("type"),builderSupports:o.data("builder-supports"),loadLiveEditor:!1,liveEditorPreview:o.data("preview-url")}}if(!_.isUndefined(t)){var n=window.siteoriginPanels,a=new n.model.builder,r=new n.view.builder({model:a,config:l});r.render().attach({container:t}).setDataField(i).attachToEditor(),s.submit(function(){a.refreshPanelsData()}),t.removeClass("so-panels-loading"),e(document).trigger("panels_setup",r,window.panels)}e(document).on("widget-added",function(t,i){e(i).find(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()}),e("body").hasClass("wp-customizer")||e(function(){e(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()})})},{"./collection/cells":1,"./collection/history-entries":2,"./collection/rows":3,"./collection/widgets":4,"./dialog/builder":5,"./dialog/history":6,"./dialog/prebuilt":7,"./dialog/row":8,"./dialog/widget":9,"./dialog/widgets":10,"./helpers/clipboard":11,"./helpers/page-scroll":12,"./helpers/serialize":13,"./helpers/utils":14,"./jquery/setup-builder-widget":15,"./model/builder":17,"./model/cell":18,"./model/history-entry":19,"./model/row":20,"./model/widget":21,"./utils/menu":22,"./view/builder":23,"./view/cell":24,"./view/dialog":25,"./view/live-editor":26,"./view/row":27,"./view/styles":28,"./view/widget":29}],17:[function(e,t,i){t.exports=Backbone.Model.extend({layoutPosition:{BEFORE:"before",AFTER:"after",REPLACE:"replace"},rows:{},defaults:{data:{widgets:[],grids:[],grid_cells:[]}},initialize:function(){this.set("rows",new panels.collection.rows)},addRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var s=new panels.collection.cells(t);e=_.extend({collection:this.get("rows"),cells:s},e);var l=new panels.model.row(e);return l.builder=this,this.get("rows").add(l,i),l},loadPanelsData:function(e,t){try{t===this.layoutPosition.BEFORE?e=this.concatPanelsData(e,this.getPanelsData()):t===this.layoutPosition.AFTER&&(e=this.concatPanelsData(this.getPanelsData(),e)),this.emptyRows(),this.set("data",JSON.parse(JSON.stringify(e)),{silent:!0});var i=[];if(_.isUndefined(e.grid_cells))return void this.trigger("load_panels_data");for(var s,l=0;l<e.grid_cells.length;l++)s=parseInt(e.grid_cells[l].grid),_.isUndefined(i[s])&&(i[s]=[]),i[s].push(e.grid_cells[l]);var o=this;if(_.each(i,function(t,i){var s={};_.isUndefined(e.grids[i].style)||(s.style=e.grids[i].style),_.isUndefined(e.grids[i].color_label)||(s.color_label=e.grids[i].color_label),_.isUndefined(e.grids[i].label)||(s.label=e.grids[i].label),o.addRow(s,t,{noAnimate:!0})}),_.isUndefined(e.widgets))return;_.each(e.widgets,function(e){var t=null;_.isUndefined(e.panels_info)?(t=e.info,delete e.info):(t=e.panels_info,delete e.panels_info);var i=o.get("rows").at(parseInt(t.grid)),s=i.get("cells").at(parseInt(t.cell)),l=new panels.model.widget({class:t.class,values:e});_.isUndefined(t.style)||l.set("style",t.style),_.isUndefined(t.read_only)||l.set("read_only",t.read_only),_.isUndefined(t.widget_id)?l.set("widget_id",panels.helpers.utils.generateUUID()):l.set("widget_id",t.widget_id),_.isUndefined(t.label)||l.set("label",t.label),l.cell=s,s.get("widgets").add(l,{noAnimate:!0})}),this.trigger("load_panels_data")}catch(e){console.log("Error loading data: "+e.message)}},concatPanelsData:function(e,t){if(_.isUndefined(t)||_.isUndefined(t.grids)||_.isEmpty(t.grids)||_.isUndefined(t.grid_cells)||_.isEmpty(t.grid_cells))return e;if(_.isUndefined(e)||_.isUndefined(e.grids)||_.isEmpty(e.grids))return t;var i=e.grids.length,s=_.isUndefined(e.widgets)?0:e.widgets.length,l={grids:[],grid_cells:[],widgets:[]};l.grids=e.grids.concat(t.grids),_.isUndefined(e.grid_cells)||(l.grid_cells=e.grid_cells.slice()),_.isUndefined(e.widgets)||(l.widgets=e.widgets.slice());var o;for(o=0;o<t.grid_cells.length;o++){var n=t.grid_cells[o];n.grid=parseInt(n.grid)+i,l.grid_cells.push(n)}if(!_.isUndefined(t.widgets))for(o=0;o<t.widgets.length;o++){var a=t.widgets[o];a.panels_info.grid=parseInt(a.panels_info.grid)+i,a.panels_info.id=parseInt(a.panels_info.id)+s,l.widgets.push(a)}return l},getPanelsData:function(){var e={widgets:[],grids:[],grid_cells:[]},t=0;return this.get("rows").each(function(i,s){i.get("cells").each(function(i,l){i.get("widgets").each(function(i,o){var n={class:i.get("class"),raw:i.get("raw"),grid:s,cell:l,id:t++,widget_id:i.get("widget_id"),style:i.get("style"),label:i.get("label")};_.isEmpty(n.widget_id)&&(n.widget_id=panels.helpers.utils.generateUUID());var a=_.extend(_.clone(i.get("values")),{panels_info:n});e.widgets.push(a)}),e.grid_cells.push({grid:s,index:l,weight:i.get("weight"),style:i.get("style")})}),e.grids.push({cells:i.get("cells").length,style:i.get("style"),color_label:i.get("color_label"),label:i.get("label")})}),e},refreshPanelsData:function(e){e=_.extend({silent:!1},e);var t=this.get("data"),i=this.getPanelsData();this.set("data",i,{silent:!0}),e.silent||JSON.stringify(i)===JSON.stringify(t)||(this.trigger("change"),this.trigger("change:data"),this.trigger("refresh_panels_data",i,e))},emptyRows:function(){return _.invoke(this.get("rows").toArray(),"destroy"),this.get("rows").reset(),this},isValidLayoutPosition:function(e){return e===this.layoutPosition.BEFORE||e===this.layoutPosition.AFTER||e===this.layoutPosition.REPLACE},getPanelsDataFromHtml:function(e,t){var i=this,s=jQuery('<div id="wrapper">'+e+"</div>");if(s.find(".panel-layout .panel-grid").length){var l={grids:[],grid_cells:[],widgets:[]},o=new RegExp(panelsOptions.siteoriginWidgetRegex,"i"),n=function(){function e(e){return e&&"string"==typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),t.innerHTML=e,e=t.textContent,t.textContent=""),e}var t=document.createElement("div");return e}(),a=function(e){var t=e.find("div");if(!t.length)return e.html();var i;for(i=0;i<t.length-1&&jQuery.trim(t.eq(i).text())==jQuery.trim(t.eq(i+1).text());i++);var s=t.eq(i).find(".widget-title:header"),l="";return s.length&&(l=s.html(),s.remove()),{title:l,text:t.eq(i).html()}},r=s.find(".panel-layout").eq(0),d=function(e,t){return jQuery(t).closest(".panel-layout").is(r)};return s.find("> .panel-layout > .panel-grid").filter(d).each(function(e,s){var r=jQuery(s),c=r.find(".panel-grid-cell").filter(d);l.grids.push({cells:c.length,style:r.data("style"),color_label:r.data("color-label"),label:r.data("label")}),c.each(function(s,r){var c=jQuery(r),h=c.find(".so-panel").filter(d);l.grid_cells.push({grid:e,weight:_.isUndefined(c.data("weight"))?1:parseFloat(c.data("weight")),style:c.data("style")}),h.each(function(r,d){var c=jQuery(d),h=c.find(".panel-widget-style").length?c.find(".panel-widget-style").html():c.html(),u={grid:e,cell:s,raw:!1,label:c.data("label")};h=h.trim();var p=o.exec(h);if(!_.isNull(p)&&""===h.replace(o,"").trim()){try{var g=/class="(.*?)"/.exec(p[3]),f=jQuery(p[5]),w=JSON.parse(n(f.val())),m=w.instance;u.class=g[1].replace(/\\\\+/g,"\\"),u.raw=!1,m.panels_info=u,l.widgets.push(m)}catch(e){u.class=t,l.widgets.push(_.extend(a(c),{filter:"1",type:"visual",panels_info:u}))}return!0}if(-1!==h.indexOf("panel-layout")){if(jQuery("<div>"+h+"</div>").find(".panel-layout .panel-grid").length)return u.class="SiteOrigin_Panels_Widgets_Layout",l.widgets.push({panels_data:i.getPanelsDataFromHtml(h,t),panels_info:u}),!0}return u.class=t,l.widgets.push(_.extend(a(c),{filter:"1",type:"visual",panels_info:u})),!0})})}),s.find(".panel-layout").remove(),s.find("style[data-panels-style-for-post]").remove(),s.html().replace(/^\s+|\s+$/gm,"").length&&(l.grids.push({cells:1,style:{}}),l.grid_cells.push({grid:l.grids.length-1,weight:1}),l.widgets.push({filter:"1",text:s.html().replace(/^\s+|\s+$/gm,""),title:"",type:"visual",panels_info:{class:t,raw:!1,grid:l.grids.length-1,cell:0}})),l}return{grid_cells:[{grid:0,weight:1}],grids:[{cells:1}],widgets:[{filter:"1",text:e,title:"",type:"visual",panels_info:{class:t,raw:!1,grid:0,cell:0}}]}}})},{}],18:[function(e,t,i){t.exports=Backbone.Model.extend({widgets:{},row:null,defaults:{weight:0,style:{}},indexes:null,initialize:function(){this.set("widgets",new panels.collection.widgets),this.on("destroy",this.onDestroy,this)},onDestroy:function(){_.invoke(this.get("widgets").toArray(),"destroy"),this.get("widgets").reset()},clone:function(e,t){_.isUndefined(e)&&(e=this.row),t=_.extend({cloneWidgets:!0},t);var i=new this.constructor(this.attributes);return i.set("collection",e.get("cells"),{silent:!0}),i.row=e,t.cloneWidgets&&this.get("widgets").each(function(e){i.get("widgets").add(e.clone(i,t),{silent:!0})}),i}})},{}],19:[function(e,t,i){t.exports=Backbone.Model.extend({defaults:{text:"",data:"",time:null,count:1}})},{}],20:[function(e,t,i){t.exports=Backbone.Model.extend({builder:null,defaults:{style:{}},indexes:null,initialize:function(){_.isEmpty(this.get("cells"))?this.set("cells",new panels.collection.cells):this.get("cells").each(function(e){e.row=this}.bind(this)),this.on("destroy",this.onDestroy,this)},setCells:function(e){var t=this.get("cells")||new panels.collection.cells,i=[];t.each(function(s,l){var o=e.at(l);if(o)s.set("weight",o.get("weight"));else{for(var n=t.at(e.length-1),a=s.get("widgets").models.slice(),r=0;r<a.length;r++)a[r].moveToCell(n,{silent:!1});i.push(s)}}),_.each(i,function(e){t.remove(e)}),e.length>t.length&&_.each(e.slice(t.length,e.length),function(e){e.set({collection:t}),e.row=this,t.add(e)}.bind(this)),this.reweightCells()},reweightCells:function(){var e=0,t=this.get("cells");t.each(function(t){e+=t.get("weight")}),t.each(function(t){t.set("weight",t.get("weight")/e)}),this.trigger("reweight_cells")},onDestroy:function(){_.invoke(this.get("cells").toArray(),"destroy"),this.get("cells").reset()},clone:function(e){_.isUndefined(e)&&(e=this.builder);var t=new this.constructor(this.attributes);t.set("collection",e.get("rows"),{silent:!0}),t.builder=e;var i=new panels.collection.cells;return this.get("cells").each(function(e){i.add(e.clone(t),{silent:!0})}),t.set("cells",i),t}})},{}],21:[function(e,t,i){t.exports=Backbone.Model.extend({cell:null,defaults:{class:null,missing:!1,values:{},raw:!1,style:{},read_only:!1,widget_id:""},indexes:null,initialize:function(){var e=this.get("class");!_.isUndefined(panelsOptions.widgets[e])&&panelsOptions.widgets[e].installed||this.set("missing",!0)},getWidgetField:function(e){return _.isUndefined(panelsOptions.widgets[this.get("class")])?"title"===e||"description"===e?panelsOptions.loc.missing_widget[e]:"":this.has("label")&&!_.isEmpty(this.get("label"))?this.get("label"):panelsOptions.widgets[this.get("class")][e]},moveToCell:function(e,t,i){return t=_.extend({silent:!0},t),this.cell=e,this.collection.remove(this,t),e.get("widgets").add(this,_.extend({at:i},t)),this.trigger("move_to_cell",e,i),this},triggerEdit:function(){this.trigger("user_edit",this)},triggerDuplicate:function(){this.trigger("user_duplicate",this)},setValues:function(e){var t=!1;JSON.stringify(e)!==JSON.stringify(this.get("values"))&&(t=!0),this.set("values",e,{silent:!0}),t&&(this.trigger("change",this),this.trigger("change:values"))},clone:function(e,t){_.isUndefined(e)&&(e=this.cell);var i=new this.constructor(this.attributes),s=JSON.parse(JSON.stringify(this.get("values"))),l=function(e){return _.each(e,function(t,i){_.isString(i)&&"_"===i[0]?delete e[i]:_.isObject(e[i])&&l(e[i])}),e};return s=l(s),"SiteOrigin_Panels_Widgets_Layout"===this.get("class")&&(s.builder_id=Math.random().toString(36).substr(2)),i.set("values",s,{silent:!0}),i.set("collection",e.get("widgets"),{silent:!0}),i.cell=e,i.isDuplicate=!0,i},getTitle:function(){var e=panelsOptions.widgets[this.get("class")];if(_.isUndefined(e))return this.get("class").replace(/_/g," ");if(!_.isUndefined(e.panels_title)&&!1===e.panels_title)return panelsOptions.widgets[this.get("class")].description;var t=this.get("values"),i=["title","text"];for(var s in t)t.hasOwnProperty(s)&&i.push(s);i=_.uniq(i);for(var l in i)if(!_.isUndefined(t[i[l]])&&_.isString(t[i[l]])&&""!==t[i[l]]&&"on"!==t[i[l]]&&"_"!==i[l][0]&&!jQuery.isNumeric(t[i[l]])){var o=t[i[l]];o=o.replace(/<\/?[^>]+(>|$)/g,"");var n=o.split(" ");return n=n.slice(0,20),n.join(" ")}return this.getWidgetField("description")}})},{}],22:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({wrapperTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-context-menu").html())),sectionTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-context-menu-section").html())),contexts:[],active:!1,events:{"keyup .so-search-wrapper input":"searchKeyUp"},initialize:function(){this.listenContextMenu(),this.render(),this.attach()},listenContextMenu:function(){var e=this;l(window).on("contextmenu",function(t){return e.active&&!e.isOverEl(e.$el,t)?(e.closeMenu(),e.active=!1,t.preventDefault(),!1):!!e.active||(e.active=!1,e.trigger("activate_context",t,e),void(e.active&&(t.preventDefault(),e.openMenu({left:t.pageX,top:t.pageY}))))})},render:function(){this.setElement(this.wrapperTemplate())},attach:function(){this.$el.appendTo("body")},openMenu:function(e){this.trigger("open_menu"),l(window).on("keyup",{menu:this},this.keyboardListen),l(window).on("click",{menu:this},this.clickOutsideListen),this.$el.css("max-height",l(window).height()-20),e.left+this.$el.outerWidth()+10>=l(window).width()&&(e.left=l(window).width()-this.$el.outerWidth()-10),e.left<=0&&(e.left=10),e.top+this.$el.outerHeight()-l(window).scrollTop()+10>=l(window).height()&&(e.top=l(window).height()+l(window).scrollTop()-this.$el.outerHeight()-10),e.left<=0&&(e.left=10),this.$el.css({left:e.left+1,top:e.top+1}).show(),this.$(".so-search-wrapper input").focus()},closeMenu:function(){this.trigger("close_menu"),l(window).off("keyup",this.keyboardListen),l(window).off("click",this.clickOutsideListen),this.active=!1,this.$el.empty().hide()},keyboardListen:function(e){var t=e.data.menu;switch(e.which){case 27:t.closeMenu()}},clickOutsideListen:function(e){var t=e.data.menu;3!==e.which&&t.$el.is(":visible")&&!t.isOverEl(t.$el,e)&&t.closeMenu()},addSection:function(e,t,i,s){var o=this;t=_.extend({display:5,defaultDisplay:!1,search:!0,sectionTitle:"",searchPlaceholder:"",titleKey:"title"},t);var n=l(this.sectionTemplate({settings:t,items:i})).attr("id","panels-menu-section-"+e);this.$el.append(n),n.find(".so-item:not(.so-confirm)").click(function(){var e=l(this);s(e.data("key")),o.closeMenu()}),n.find(".so-item.so-confirm").click(function(){var e=l(this);if(e.hasClass("so-confirming"))return s(e.data("key")),void o.closeMenu();e.data("original-text",e.html()).addClass("so-confirming").html('<span class="dashicons dashicons-yes"></span> '+panelsOptions.loc.dropdown_confirm),setTimeout(function(){e.removeClass("so-confirming"),e.html(e.data("original-text"))},2500)}),n.data("settings",t).find(".so-search-wrapper input").trigger("keyup"),this.active=!0},hasSection:function(e){return this.$el.find("#panels-menu-section-"+e).length>0},searchKeyUp:function(e){var t=l(e.currentTarget),i=t.closest(".so-section"),s=i.data("settings");if(38===e.which||40===e.which){var o=i.find("ul li:visible"),n=o.filter(".so-active").eq(0);if(n.length){o.removeClass("so-active");var a=o.index(n);38===e.which?n=a-1<0?o.last():o.eq(a-1):40===e.which&&(n=a+1>=o.length?o.first():o.eq(a+1))}else 38===e.which?n=o.last():40===e.which&&(n=o.first());return n.addClass("so-active"),!1}if(13===e.which)return 1===i.find("ul li:visible").length?(i.find("ul li:visible").trigger("click"),!1):(i.find("ul li.so-active:visible").trigger("click"),!1);if(""===t.val())if(s.defaultDisplay){i.find(".so-item").hide();for(var r=0;r<s.defaultDisplay.length;r++)i.find('.so-item[data-key="'+s.defaultDisplay[r]+'"]').show()}else i.find(".so-item").show();else i.find(".so-item").hide().each(function(){var e=l(this);-1!==e.html().toLowerCase().indexOf(t.val().toLowerCase())&&e.show()});i.find(".so-item:visible:gt("+(s.display-1)+")").hide(),0===i.find(".so-item:visible").length&&""!==t.val()?i.find(".so-no-results").show():i.find(".so-no-results").hide()},isOverEl:function(e,t){var i=[[e.offset().left,e.offset().top],[e.offset().left+e.outerWidth(),e.offset().top+e.outerHeight()]];return t.pageX>=i[0][0]&&t.pageX<=i[1][0]&&t.pageY>=i[0][1]&&t.pageY<=i[1][1]}})},{}],23:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({config:{},template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder").html())),dialogs:{},rowsSortable:null,dataField:!1,currentData:"",attachedToEditor:!1,attachedVisible:!1,liveEditor:void 0,menu:!1,activeCell:null,events:{"click .so-tool-button.so-widget-add":"displayAddWidgetDialog","click .so-tool-button.so-row-add":"displayAddRowDialog","click .so-tool-button.so-prebuilt-add":"displayAddPrebuiltDialog","click .so-tool-button.so-history":"displayHistoryDialog","click .so-tool-button.so-live-editor":"displayLiveEditor"},rows:null,initialize:function(e){var t=this;return this.config=_.extend({loadLiveEditor:!1,builderSupports:{}},e.config),this.config.builderSupports=_.extend({addRow:!0,editRow:!0,deleteRow:!0,moveRow:!0,addWidget:!0,editWidget:!0,deleteWidget:!0,moveWidget:!0,prebuilt:!0,history:!0,liveEditor:!0,revertToEditor:!0},this.config.builderSupports),e.config.loadLiveEditor&&this.on("builder_live_editor_added",function(){this.displayLiveEditor()}),this.dialogs={widgets:new s.dialog.widgets,row:new s.dialog.row,prebuilt:new s.dialog.prebuilt},_.each(this.dialogs,function(e,i,s){s[i].setBuilder(t)}),this.dialogs.row.setRowDialogType("create"),this.model.get("rows").on("add",this.onAddRow,this),l(window).resize(function(e){e.target===window&&t.trigger("builder_resize")}),this.model.on("change:data load_panels_data",this.storeModelData,this),this.on("content_change",this.handleContentChange,this),this.on("display_builder",this.handleDisplayBuilder,this),this.on("hide_builder",this.handleHideBuilder,this),this.on("builder_rendered builder_resize",this.handleBuilderSizing,this),this.model.on("change:data load_panels_data",this.toggleWelcomeDisplay,this),this.on("display_builder",this.wrapEditorExpandAdjust,this),this.menu=new s.utils.menu({}),this.menu.on("activate_context",this.activateContextMenu,this),this.config.loadOnAttach&&this.on("builder_attached_to_editor",function(){this.displayAttachedBuilder({confirm:!1})},this),this},render:function(){return this.setElement(this.template()),this.$el.attr("id","siteorigin-panels-builder-"+this.cid).addClass("so-builder-container"),this.trigger("builder_rendered"),this},attach:function(e){e=_.extend({container:!1,dialog:!1},e),e.dialog?(this.dialog=new s.dialog.builder,this.dialog.builder=this):(this.$el.appendTo(e.container),this.metabox=e.container.closest(".postbox"),this.initSortable(),this.trigger("attached_to_container",e.container)),this.trigger("builder_attached"),this.supports("liveEditor")&&this.addLiveEditor(),this.supports("history")&&this.addHistoryBrowser();var t=this.$(".so-builder-toolbar");return this.supports("addWidget")||t.find(".so-widget-add").hide(),this.supports("addRow")||t.find(".so-row-add").hide(),this.supports("prebuilt")||t.find(".so-prebuilt-add").hide(),this},attachToEditor:function(){if("tinyMCE"!==this.config.editorType)return this;this.attachedToEditor=!0;var e=this.metabox,t=this;l("#wp-content-wrap .wp-editor-tabs").find(".wp-switch-editor").click(function(e){e.preventDefault(),l("#wp-content-editor-container").show(),l("#wp-content-wrap").removeClass("panels-active"),l("#content-resize-handle").show(),t.trigger("hide_builder")}).end().append(l('<a id="content-panels" class="hide-if-no-js wp-switch-editor switch-panels">'+e.find(".hndle span").html()+"</a>").click(function(e){t.displayAttachedBuilder({confirm:!0})&&e.preventDefault()})),this.supports("revertToEditor")&&e.find(".so-switch-to-standard").click(function(i){i.preventDefault(),confirm(panelsOptions.loc.confirm_stop_builder)&&(t.addHistoryEntry("back_to_editor"),t.model.loadPanelsData(!1),l("#wp-content-wrap").show(),e.hide(),l(window).resize(),t.attachedVisible=!1,t.trigger("hide_builder"))}).show(),e.insertAfter("#wp-content-wrap").hide().addClass("attached-to-editor");var i=this.model.get("data");_.isEmpty(i.widgets)&&_.isEmpty(i.grids)||this.displayAttachedBuilder({confirm:!1});var s=function(){var e=t.$(".so-builder-toolbar");if(t.$el.hasClass("so-display-narrow"))return e.css({top:0,left:0,width:"100%",position:"absolute"}),void t.$el.css("padding-top",e.outerHeight());var i=l(window).scrollTop()-t.$el.offset().top;"fixed"===l("#wpadminbar").css("position")&&(i+=l("#wpadminbar").outerHeight());var s={top:0,bottom:t.$el.outerHeight()-e.outerHeight()+20};i>s.top&&i<s.bottom?"fixed"!==e.css("position")&&e.css({top:l("#wpadminbar").outerHeight(),left:t.$el.offset().left,width:t.$el.outerWidth(),position:"fixed"}):e.css({top:Math.min(Math.max(i,0),t.$el.outerHeight()-e.outerHeight()+20),left:0,width:"100%",position:"absolute"}),t.$el.css("padding-top",e.outerHeight())};return this.on("builder_resize",s,this),l(document).scroll(s),s(),this.trigger("builder_attached_to_editor"),this},displayAttachedBuilder:function(e){if(e=_.extend({confirm:!0},e),e.confirm){var t="undefined"!=typeof tinyMCE&&tinyMCE.get("content");if(""!==(t&&_.isFunction(t.getContent)?t.getContent():l("textarea#content").val())&&!confirm(panelsOptions.loc.confirm_use_builder))return!1}return l("#wp-content-wrap").hide(),this.metabox.show().find("> .inside").show(),l(window).resize(),l(document).scroll(),this.attachedVisible=!0,this.trigger("display_builder"),!0},initSortable:function(){if(!this.supports("moveRow"))return this;var e=this;return this.rowsSortable=this.$(".so-rows-container").sortable({appendTo:"#wpwrap",items:".so-row-container",handle:".so-row-move",axis:"y",tolerance:"pointer",scroll:!1,stop:function(t,i){e.addHistoryEntry("row_moved");var s=l(i.item),o=s.data("view");e.model.get("rows").remove(o.model,{silent:!0}),e.model.get("rows").add(o.model,{silent:!0,at:s.index()}),o.trigger("move",s.index()),e.model.refreshPanelsData()}}),this},refreshSortable:function(){_.isNull(this.rowsSortable)||this.rowsSortable.sortable("refresh")},setDataField:function(e,t){if(t=_.extend({load:!0},t),this.dataField=e,this.dataField.data("builder",this),t.load&&""!==e.val()){var i=this.dataField.val();try{i=JSON.parse(i)}catch(e){i={}}this.model.loadPanelsData(i),this.currentData=i,this.toggleWelcomeDisplay()}return this},storeModelData:function(){var e=JSON.stringify(this.model.get("data"));l(this.dataField).val()!==e&&(l(this.dataField).val(e),l(this.dataField).trigger("change"),this.trigger("content_change"))},onAddRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var l=new s.view.row({model:e});l.builder=this,l.render(),_.isUndefined(i.at)||t.length<=1?l.$el.appendTo(this.$(".so-rows-container")):l.$el.insertAfter(this.$(".so-rows-container .so-row-container").eq(i.at-1)),!1===i.noAnimate&&l.visualCreate(),this.refreshSortable(),l.resize()},displayAddWidgetDialog:function(){this.dialogs.widgets.openDialog()},displayAddRowDialog:function(){var e=new s.model.row,t=new s.collection.cells([{weight:.5},{weight:.5}]);t.each(function(t){t.row=e}),e.set("cells",t),e.builder=this.model,this.dialogs.row.setRowModel(e),this.dialogs.row.openDialog()},displayAddPrebuiltDialog:function(){this.dialogs.prebuilt.openDialog()},displayHistoryDialog:function(){this.dialogs.history.openDialog()},pasteRowHandler:function(){var e=s.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof s.model.row&&(this.addHistoryEntry("row_pasted"),e.builder=this.model,this.model.get("rows").add(e,{at:this.model.get("rows").indexOf(this.model)+1}),this.model.refreshPanelsData())},getActiveCell:function(e){if(e=_.extend({createCell:!0},e),!this.model.get("rows").length){if(!e.createCell)return null;this.model.addRow({},[{weight:1}],{noAnimate:!0})}var t=this.activeCell;return _.isEmpty(t)||-1===this.model.get("rows").indexOf(t.model.row)?this.model.get("rows").last().get("cells").first():t.model},addLiveEditor:function(){return _.isEmpty(this.config.liveEditorPreview)?this:(this.liveEditor=new s.view.liveEditor({builder:this,previewUrl:this.config.liveEditorPreview}),this.liveEditor.hasPreviewUrl()&&this.$(".so-builder-toolbar .so-live-editor").show(),this.trigger("builder_live_editor_added"),this)},displayLiveEditor:function(){_.isUndefined(this.liveEditor)||this.liveEditor.open()},addHistoryBrowser:function(){if(_.isEmpty(this.config.liveEditorPreview))return this;this.dialogs.history=new s.dialog.history,this.dialogs.history.builder=this,this.dialogs.history.entries.builder=this.model,this.dialogs.history.setRevertEntry(this.model),this.$(".so-builder-toolbar .so-history").show()},addHistoryEntry:function(e,t){_.isUndefined(t)&&(t=null),_.isUndefined(this.dialogs.history)||this.dialogs.history.entries.addEntry(e,t)},supports:function(e){return"rowAction"===e?this.supports("addRow")||this.supports("editRow")||this.supports("deleteRow"):"widgetAction"===e?this.supports("addWidget")||this.supports("editWidget")||this.supports("deleteWidget"):!_.isUndefined(this.config.builderSupports[e])&&this.config.builderSupports[e]},handleContentChange:function(){if(panelsOptions.copy_content&&this.attachedToEditor&&this.$el.is(":visible")){var e=this.model.getPanelsData();_.isEmpty(e.widgets)||l.post(panelsOptions.ajaxurl,{action:"so_panels_builder_content",panels_data:JSON.stringify(e),post_id:this.config.postId},function(e){""!==e&&this.updateEditorContent(e)}.bind(this))}},updateEditorContent:function(e){
|
3 |
if("tinyMCE"!==this.config.editorType||"undefined"==typeof tinyMCE||_.isNull(tinyMCE.get("content"))){l(this.config.editorId).val(e).trigger("change").trigger("keyup")}else{var t=tinyMCE.get("content");t.setContent(e),t.fire("change"),t.fire("keyup")}this.triggerYoastSeoChange()},triggerYoastSeoChange:function(){if(l("#yoast_wpseo_focuskw_text_input").length){var e,t=document.getElementById("yoast_wpseo_focuskw_text_input");document.createEvent?(e=document.createEvent("HTMLEvents"),e.initEvent("keyup",!0,!0)):(e=document.createEventObject(),e.eventType="keyup"),e.eventName="keyup",document.createEvent?t.dispatchEvent(e):t.fireEvent("on"+e.eventType,e)}},handleDisplayBuilder:function(){var e="undefined"!=typeof tinyMCE&&tinyMCE.get("content"),t=e&&_.isFunction(e.getContent)?e.getContent():l("textarea#content").val();if((_.isEmpty(this.model.get("data"))||_.isEmpty(this.model.get("data").widgets)&&_.isEmpty(this.model.get("data").grids))&&""!==t){var i=panelsOptions.text_widget;if(_.isEmpty(i))return;this.model.loadPanelsData(this.model.getPanelsDataFromHtml(t,i)),this.model.trigger("change"),this.model.trigger("change:data")}l("#post-status-info").addClass("for-siteorigin-panels")},handleHideBuilder:function(){l("#post-status-info").show().removeClass("for-siteorigin-panels")},wrapEditorExpandAdjust:function(){try{for(var e,t=(l.hasData(window)&&l._data(window)).events.scroll,i=0;i<t.length;i++)if("editor-expand"===t[i].namespace){e=t[i],l(window).unbind("scroll",e.handler),l(window).bind("scroll",function(t){this.attachedVisible||e.handler(t)}.bind(this));break}}catch(e){return}},handleBuilderSizing:function(){var e=this.$el.width();return e?(e<480?this.$el.addClass("so-display-narrow"):this.$el.removeClass("so-display-narrow"),this):this},setDialogParents:function(e,t){_.each(this.dialogs,function(i,s,l){l[s].setParent(e,t)}),this.on("add_dialog",function(i){i.setParent(e,t)},this)},toggleWelcomeDisplay:function(){this.model.get("rows").isEmpty()?this.$(".so-panels-welcome-message").show():this.$(".so-panels-welcome-message").hide()},activateContextMenu:function(e,t){var i=this,s=l(".siteorigin-panels-builder:visible").sort(function(e,t){return l(e).zIndex()>l(t).zIndex()?1:-1}).last(),o=l(".so-panels-dialog-wrapper:visible").sort(function(e,t){return l(e).zIndex()>l(t).zIndex()?1:-1}).last(),n=i.$el.closest(".so-panels-dialog-wrapper");if(i.$el.is(s)&&(0===o.length||o.is(n))){var a=l([]).add(i.$(".so-panels-welcome-message:visible")).add(i.$(".so-rows-container > .so-row-container")).add(i.$(".so-cells > .cell")).add(i.$(".cell-wrapper > .so-widget")).filter(function(i){return t.isOverEl(l(this),e)}),r=a.last().data("view");void 0!==r&&void 0!==r.buildContextualMenu?r.buildContextualMenu(e,t):a.last().hasClass("so-panels-welcome-message")&&this.buildContextualMenu(e,t)}},buildContextualMenu:function(e,t){var i={};this.supports("addRow")&&(i.add_row={title:panelsOptions.loc.contextual.add_row}),s.helpers.clipboard.canCopyPaste()&&s.helpers.clipboard.isModel("row-model")&&this.supports("addRow")&&(i.paste_row={title:panelsOptions.loc.contextual.row_paste}),_.isEmpty(i)||t.addSection("builder-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},i,function(e){switch(e){case"add_row":this.displayAddRowDialog();break;case"paste_row":this.pasteRowHandler()}}.bind(this))}})},{}],24:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-cell").html())),events:{"click .cell-wrapper":"handleCellClick"},row:null,widgetSortable:null,initialize:function(){this.model.get("widgets").on("add",this.onAddWidget,this)},render:function(){var e={weight:this.model.get("weight"),totalWeight:this.row.model.get("cells").totalWeight()};this.setElement(this.template(e)),this.$el.data("view",this);var t=this;return this.model.get("widgets").each(function(e){var i=new s.view.widget({model:e});i.cell=t,i.render(),i.$el.appendTo(t.$(".widgets-container"))}),this.initSortable(),this.initResizable(),this},initSortable:function(){if(!this.row.builder.supports("moveWidget"))return this;var e=this,t=e.row.builder.$el.attr("id");return this.widgetSortable=this.$(".widgets-container").sortable({placeholder:"so-widget-sortable-highlight",connectWith:"#"+t+" .so-cells .cell .widgets-container",tolerance:"pointer",scroll:!1,over:function(t,i){e.row.builder.trigger("widget_sortable_move")},stop:function(t,i){e.row.builder.addHistoryEntry("widget_moved");var s=l(i.item),o=s.data("view"),n=s.closest(".cell").data("view");o.model.moveToCell(n.model,{},s.index()),o.cell=n,o.cell.row.builder.model.refreshPanelsData()},helper:function(e,t){var i=t.clone().css({width:t.outerWidth(),"z-index":1e4,position:"fixed"}).addClass("widget-being-dragged").appendTo("body");return t.outerWidth()>720&&i.animate({"margin-left":e.pageX-t.offset().left-240,width:480},"fast"),i}}),this},refreshSortable:function(){_.isNull(this.widgetSortable)||this.widgetSortable.sortable("refresh")},initResizable:function(){if(!this.row.builder.supports("editRow"))return this;var e,t=this.$(".resize-handle").css("position","absolute"),i=this.row.$el,s=this;return t.draggable({axis:"x",containment:i,start:function(t,i){if(e=s.$el.prev().data("view"),!_.isUndefined(e)){var o=s.$el.clone().appendTo(i.helper).css({position:"absolute",top:"0",width:s.$el.outerWidth(),left:5,height:s.$el.outerHeight()});o.find(".resize-handle").remove();var n=e.$el.clone().appendTo(i.helper).css({position:"absolute",top:"0",width:e.$el.outerWidth(),right:5,height:e.$el.outerHeight()});n.find(".resize-handle").remove(),l(this).data({newCellClone:o,prevCellClone:n})}},drag:function(i,o){var n=s.row.$el.width()+10,a=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,r=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;l(this).data("newCellClone").css("width",n*a).find(".preview-cell-weight").html(Math.round(1e3*a)/10),l(this).data("prevCellClone").css("width",n*r).find(".preview-cell-weight").html(Math.round(1e3*r)/10)},stop:function(i,o){l(this).data("newCellClone").remove(),l(this).data("prevCellClone").remove();var n=s.row.$el.width()+10,a=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,r=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;a>.02&&r>.02&&(s.row.builder.addHistoryEntry("cell_resized"),s.model.set("weight",a),e.model.set("weight",r),s.row.resize()),o.helper.css("left",-t.outerWidth()/2),s.row.builder.model.refreshPanelsData()}}),this},onAddWidget:function(e,t,i){i=_.extend({noAnimate:!1},i);var l=new s.view.widget({model:e});l.cell=this,_.isUndefined(e.isDuplicate)&&(e.isDuplicate=!1),l.render({loadForm:e.isDuplicate}),_.isUndefined(i.at)||t.length<=1?l.$el.appendTo(this.$(".widgets-container")):l.$el.insertAfter(this.$(".widgets-container .so-widget").eq(i.at-1)),!1===i.noAnimate&&l.visualCreate(),this.refreshSortable(),this.row.resize()},handleCellClick:function(e){this.row.builder.$el.find(".so-cells .cell").removeClass("cell-selected"),this.row.builder.activeCell!==this||this.model.get("widgets").length?(this.$el.addClass("cell-selected"),this.row.builder.activeCell=this):this.row.builder.activeCell=null},pasteHandler:function(){var e=s.helpers.clipboard.getModel("widget-model");!_.isEmpty(e)&&e instanceof s.model.widget&&(this.row.builder.addHistoryEntry("widget_pasted"),e.cell=this.model,this.model.get("widgets").add(e),this.row.builder.model.refreshPanelsData())},buildContextualMenu:function(e,t){var i=this;t.hasSection("add-widget-below")||t.addSection("add-widget-cell",{sectionTitle:panelsOptions.loc.contextual.add_widget_cell,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,function(e){i.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=i.model,t.cell.get("widgets").add(t),i.row.builder.model.refreshPanelsData()});var l={};this.row.builder.supports("addWidget")&&s.helpers.clipboard.isModel("widget-model")&&(l.paste={title:panelsOptions.loc.contextual.cell_paste_widget}),_.isEmpty(l)||t.addSection("cell-actions",{sectionTitle:panelsOptions.loc.contextual.cell_actions,search:!1},l,function(e){switch(e){case"paste":this.pasteHandler()}this.row.builder.model.refreshPanelsData()}.bind(this)),this.row.buildContextualMenu(e,t)}})},{}],25:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({dialogTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog").html())),dialogTabTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-tab").html())),tabbed:!1,rendered:!1,builder:!1,className:"so-panels-dialog-wrapper",dialogClass:"",dialogIcon:"",parentDialog:!1,dialogOpen:!1,editableLabel:!1,events:{"click .so-close":"closeDialog","click .so-nav.so-previous":"navToPrevious","click .so-nav.so-next":"navToNext"},initialize:function(){this.once("open_dialog",this.render),this.once("open_dialog",this.attach),this.once("open_dialog",this.setDialogClass),this.trigger("initialize_dialog",this),_.isUndefined(this.initializeDialog)||this.initializeDialog()},getNextDialog:function(){return null},getPrevDialog:function(){return null},setDialogClass:function(){""!==this.dialogClass&&this.$(".so-panels-dialog").addClass(this.dialogClass)},setBuilder:function(e){return this.builder=e,e.trigger("add_dialog",this,this.builder),this},attach:function(){return this.$el.appendTo("body"),this},parseDialogContent:function(e,t){t=_.extend({cid:this.cid},t);var i=l(_.template(s.helpers.utils.processTemplate(e))(t)),o={title:i.find(".title").html(),buttons:i.find(".buttons").html(),content:i.find(".content").html()};return i.has(".left-sidebar")&&(o.left_sidebar=i.find(".left-sidebar").html()),i.has(".right-sidebar")&&(o.right_sidebar=i.find(".right-sidebar").html()),o},renderDialog:function(e){if(e=_.extend({editableLabel:this.editableLabel,dialogIcon:this.dialogIcon},e),this.$el.html(this.dialogTemplate(e)).hide(),this.$el.data("view",this),this.$el.addClass("so-panels-dialog-wrapper"),!1!==this.parentDialog){var t=this,i=l('<h3 class="so-parent-link"></h3>').html(this.parentDialog.text+'<div class="so-separator"></div>');i.click(function(e){e.preventDefault(),t.closeDialog(),t.parentDialog.openDialog()}),this.$(".so-title-bar").prepend(i)}return this.$(".so-title-bar .so-title-editable").length&&this.initEditableLabel(),this},initTabs:function(){var e=this.$(".so-sidebar-tabs li a");if(0===e.length)return this;var t=this;return e.click(function(e){e.preventDefault();var i=l(this);t.$(".so-sidebar-tabs li").removeClass("tab-active"),t.$(".so-content .so-content-tabs > *").hide(),i.parent().addClass("tab-active");var s=i.attr("href");if(!_.isUndefined(s)&&"#"===s.charAt(0)){var o=s.split("#")[1];t.$(".so-content .so-content-tabs .tab-"+o).show()}t.trigger("tab_click",i)}),this.$(".so-sidebar-tabs li a").first().click(),this},initToolbar:function(){this.$(".so-toolbar .so-buttons .so-toolbar-button").click(function(e){e.preventDefault(),this.trigger("button_click",l(e.currentTarget))}.bind(this)),this.$(".so-toolbar .so-buttons .so-dropdown-button").click(function(e){e.preventDefault();var t=l(e.currentTarget),i=t.siblings(".so-dropdown-links-wrapper");i.is(".hidden")?i.removeClass("hidden"):i.addClass("hidden")}.bind(this)),l("html").click(function(e){this.$(".so-dropdown-links-wrapper").not(".hidden").each(function(t,i){var s=l(i),o=l(e.target);0!==o.length&&(o.is(".so-needs-confirm")&&!o.is(".so-confirmed")||o.is(".so-dropdown-button"))||s.addClass("hidden")})}.bind(this))},initEditableLabel:function(){var e=this.$(".so-title-bar .so-title-editable");e.keypress(function(t){var i="keypress"===t.type&&13===t.keyCode;if(i){var s=l(":tabbable"),o=s.index(e);s.eq(o+1).focus(),window.getSelection().removeAllRanges()}return!i}).blur(function(){var t=e.text().replace(/^\s+|\s+$/gm,"");t!==e.data("original-value").replace(/^\s+|\s+$/gm,"")&&(e.text(t),this.trigger("edit_label",t))}.bind(this)),e.focus(function(){e.data("original-value",e.text()),s.helpers.utils.selectElementContents(this)})},setupDialog:function(){this.openDialog(),this.closeDialog()},refreshDialogNav:function(){this.$(".so-title-bar .so-nav").show().removeClass("so-disabled");var e=this.getNextDialog(),t=this.$(".so-title-bar .so-next"),i=this.getPrevDialog(),s=this.$(".so-title-bar .so-previous");null===e?t.hide():!1===e&&t.addClass("so-disabled"),null===i?s.hide():!1===i&&s.addClass("so-disabled")},openDialog:function(e){e=_.extend({silent:!1},e),e.silent||this.trigger("open_dialog"),this.dialogOpen=!0,this.refreshDialogNav(),s.helpers.pageScroll.lock(),l(window).on("keyup",this.keyboardListen),this.$el.show(),e.silent||(this.trigger("open_dialog_complete"),this.builder.trigger("open_dialog",this))},closeDialog:function(e){e=_.extend({silent:!1},e),e.silent||this.trigger("close_dialog"),this.dialogOpen=!1,this.$el.hide(),s.helpers.pageScroll.unlock(),l(window).off("keyup",this.keyboardListen),e.silent||(this.trigger("close_dialog_complete"),this.builder.trigger("close_dialog",this))},keyboardListen:function(e){27===e.which&&l(".so-panels-dialog-wrapper .so-close").trigger("click")},navToPrevious:function(){this.closeDialog();var e=this.getPrevDialog();null!==e&&!1!==e&&e.openDialog()},navToNext:function(){this.closeDialog();var e=this.getNextDialog();null!==e&&!1!==e&&e.openDialog()},getFormValues:function(e){_.isUndefined(e)&&(e=".so-content");var t,i=this.$(e),s={};return i.find("[name]").each(function(){var e=l(this);try{var i=/([A-Za-z_]+)\[(.*)\]/.exec(e.attr("name"));if(_.isEmpty(i))return!0;_.isUndefined(i[2])?t=e.attr("name"):(t=i[2].split("]["),t.unshift(i[1])),t=t.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});var o=s,n=null,a=!!_.isString(e.attr("type"))&&e.attr("type").toLowerCase();if("checkbox"===a)n=e.is(":checked")?""===e.val()||e.val():null;else if("radio"===a){if(!e.is(":checked"))return;n=e.val()}else if("TEXTAREA"===e.prop("tagName")&&e.hasClass("wp-editor-area")){var r=null;"undefined"!=typeof tinyMCE&&(r=tinyMCE.get(e.attr("id"))),n=null!==r&&_.isFunction(r.getContent)&&!r.isHidden()?r.getContent():e.val()}else if("SELECT"===e.prop("tagName")){var d=e.find("option:selected");1===d.length?n=e.find("option:selected").val():d.length>1&&(n=_.map(e.find("option:selected"),function(e,t){return l(e).val()}))}else n=e.val();if(!_.isUndefined(e.data("panels-filter")))switch(e.data("panels-filter")){case"json_parse":try{n=JSON.parse(n)}catch(e){n=""}}if(null!==n)for(var c=0;c<t.length;c++)c===t.length-1?""===t[c]?o.push(n):o[t[c]]=n:(_.isUndefined(o[t[c]])&&(""===t[c+1]?o[t[c]]=[]:o[t[c]]={}),o=o[t[c]])}catch(t){console.log("Field ["+e.attr("name")+"] could not be processed and was skipped - "+t.message)}}),s},setStatusMessage:function(e,t){this.$(".so-toolbar .so-status").html(e),!_.isUndefined(t)&&t&&this.$(".so-toolbar .so-status").addClass("so-panels-loading")},setParent:function(e,t){this.parentDialog={text:e,dialog:t}}})},{}],26:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-live-editor").html())),previewScrollTop:0,loadTimes:[],previewFrameId:1,previewUrl:null,previewIframe:null,events:{"click .live-editor-close":"close","click .live-editor-collapse":"collapse","click .live-editor-mode":"mobileToggle"},initialize:function(e){e=_.extend({builder:!1,previewUrl:!1},e),_.isEmpty(e.previewUrl)&&(e.previewUrl=panelsOptions.ajaxurl+"&action=so_panels_live_editor_preview"),this.builder=e.builder,this.previewUrl=e.previewUrl,this.builder.model.on("refresh_panels_data",this.handleRefreshData,this),this.builder.model.on("load_panels_data",this.handleLoadData,this)},render:function(){this.setElement(this.template()),this.$el.hide();var e=this,t=!1;return l(document).mousedown(function(){t=!0}).mouseup(function(){t=!1}),this.$el.on("mouseenter",".so-widget-wrapper",function(){var i=l(this),s=i.data("live-editor-preview-widget");t||void 0===s||!s.length||e.$(".so-preview-overlay").is(":visible")||(e.highlightElement(s),e.scrollToElement(s))}),e.$el.on("mouseleave",".so-widget-wrapper",function(){e.resetHighlights()}),e.builder.on("open_dialog",function(){e.resetHighlights()}),this},attach:function(){this.$el.appendTo("body")},open:function(){if(""===this.$el.html()&&this.render(),0===this.$el.closest("body").length&&this.attach(),s.helpers.pageScroll.lock(),this.$el.is(":visible"))return this;if(this.$el.show(),this.refreshPreview(this.builder.model.getPanelsData()),this.originalContainer=this.builder.$el.parent(),this.builder.$el.appendTo(this.$(".so-live-editor-builder")),this.builder.$(".so-tool-button.so-live-editor").hide(),this.builder.trigger("builder_resize"),"auto-draft"===l("#original_post_status").val()&&!this.autoSaved){var e=this;wp.autosave&&(""===l('#title[name="post_title"]').val()&&l('#title[name="post_title"]').val(panelsOptions.loc.draft).trigger("keydown"),l(document).one("heartbeat-tick.autosave",function(){e.autoSaved=!0,e.refreshPreview(e.builder.model.getPanelsData())}),wp.autosave.server.triggerSave())}},close:function(){if(!this.$el.is(":visible"))return this;this.$el.hide(),s.helpers.pageScroll.unlock(),this.builder.$el.appendTo(this.originalContainer),this.builder.$(".so-tool-button.so-live-editor").show(),this.builder.trigger("builder_resize")},collapse:function(){this.$el.toggleClass("so-collapsed");var e=this.$(".live-editor-collapse span");e.html(e.data(this.$el.hasClass("so-collapsed")?"expand":"collapse"))},highlightElement:function(e){_.isUndefined(this.resetHighlightTimeout)||clearTimeout(this.resetHighlightTimeout),this.previewIframe.contents().find("body").find(".panel-grid .panel-grid-cell .so-panel").filter(function(){return 0===l(this).parents(".so-panel").length}).not(e).addClass("so-panels-faded"),e.removeClass("so-panels-faded").addClass("so-panels-highlighted")},resetHighlights:function(){var e=this.previewIframe.contents().find("body");this.resetHighlightTimeout=setTimeout(function(){e.find(".panel-grid .panel-grid-cell .so-panel").removeClass("so-panels-faded so-panels-highlighted")},100)},scrollToElement:function(e){this.$(".so-preview iframe")[0].contentWindow.liveEditorScrollTo(e)},handleRefreshData:function(e,t){if(!this.$el.is(":visible"))return this;this.refreshPreview(e)},handleLoadData:function(){if(!this.$el.is(":visible"))return this;this.refreshPreview(this.builder.model.getPanelsData())},refreshPreview:function(e){var t=this.loadTimes.length?_.reduce(this.loadTimes,function(e,t){return e+t},0)/this.loadTimes.length:1e3;_.isNull(this.previewIframe)||this.$(".so-preview-overlay").is(":visible")||(this.previewScrollTop=this.previewIframe.contents().scrollTop()),this.$(".so-preview-overlay").show(),this.$(".so-preview-overlay .so-loading-bar").clearQueue().css("width","0%").animate({width:"100%"},parseInt(t)+100),this.postToIframe({live_editor_panels_data:JSON.stringify(e),live_editor_post_ID:this.builder.config.postId},this.previewUrl,this.$(".so-preview")),this.previewIframe.data("load-start",(new Date).getTime())},postToIframe:function(e,t,i){_.isNull(this.previewIframe)||this.previewIframe.remove();var s="siteorigin-panels-live-preview-"+this.previewFrameId;this.previewIframe=l('<iframe src="javascript:false;" />').attr({id:s,name:s}).appendTo(i),this.setupPreviewFrame(this.previewIframe);var o=l('<form id="soPostToPreviewFrame" method="post" />').attr({id:s,target:this.previewIframe.attr("id"),action:t}).appendTo("body");return l.each(e,function(e,t){l('<input type="hidden" />').attr({name:e,value:t}).appendTo(o)}),o.submit().remove(),this.previewFrameId++,this.previewIframe},setupPreviewFrame:function(e){var t=this;e.data("iframeready",!1).on("iframeready",function(){var e=l(this),i=e.contents();if(!e.data("iframeready")){e.data("iframeready",!0),void 0!==e.data("load-start")&&(t.loadTimes.unshift((new Date).getTime()-e.data("load-start")),_.isEmpty(t.loadTimes)||(t.loadTimes=t.loadTimes.slice(0,4))),setTimeout(function(){i.scrollTop(t.previewScrollTop),t.$(".so-preview-overlay").hide()},100);var s=i.find("#pl-"+t.builder.config.postId);s.find(".panel-grid .panel-grid-cell .so-panel").filter(function(){return l(this).closest(".panel-layout").is(s)}).each(function(e,i){var s=l(i),o=t.$(".so-live-editor-builder .so-widget-wrapper").eq(s.data("index"));o.data("live-editor-preview-widget",s),s.css({cursor:"pointer"}).mouseenter(function(){o.parent().addClass("so-hovered"),t.highlightElement(s)}).mouseleave(function(){o.parent().removeClass("so-hovered"),t.resetHighlights()}).click(function(e){e.preventDefault(),o.find(".title h4").click()})}),i.find("a").css({"pointer-events":"none"}).click(function(e){e.preventDefault()})}}).on("load",function(){var e=l(this);e.data("iframeready")||e.trigger("iframeready")})},hasPreviewUrl:function(){return""!==this.$("form.live-editor-form").attr("action")},mobileToggle:function(e){var t=l(e.currentTarget);this.$(".live-editor-mode").not(t).removeClass("so-active"),t.addClass("so-active"),this.$el.removeClass("live-editor-desktop-mode live-editor-tablet-mode live-editor-mobile-mode").addClass("live-editor-"+t.data("mode")+"-mode")}})},{}],27:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-row").html())),events:{"click .so-row-settings":"editSettingsHandler","click .so-row-duplicate":"duplicateHandler","click .so-row-delete":"confirmedDeleteHandler","click .so-row-color":"rowColorChangeHandler"},builder:null,dialog:null,initialize:function(){var e=this.model.get("cells");e.on("add",this.handleCellAdd,this),e.on("remove",this.handleCellRemove,this),this.model.on("reweight_cells",this.resize,this),this.model.on("destroy",this.onModelDestroy,this),this.model.on("visual_destroy",this.visualDestroyModel,this);var t=this;e.each(function(e){t.listenTo(e.get("widgets"),"add",t.resize)}),e.on("add",function(e){t.listenTo(e.get("widgets"),"add",t.resize)},this),this.model.on("change:label",this.onLabelChange,this)},render:function(){var e=this.model.has("color_label")?this.model.get("color_label"):1,t=this.model.has("label")?this.model.get("label"):"";this.setElement(this.template({rowColorLabel:e,rowLabel:t})),this.$el.data("view",this);var i=this;return this.model.get("cells").each(function(e){var t=new s.view.cell({model:e});t.row=i,t.render(),t.$el.appendTo(i.$(".so-cells"))}),this.builder.supports("rowAction")?(this.builder.supports("editWidget")||(this.$(".so-row-toolbar .so-row-settings").parent().remove(),this.$el.addClass("so-row-no-edit")),this.builder.supports("addWidget")||(this.$(".so-row-toolbar .so-row-duplicate").parent().remove(),this.$el.addClass("so-row-no-duplicate")),this.builder.supports("deleteWidget")||(this.$(".so-row-toolbar .so-row-delete").parent().remove(),this.$el.addClass("so-row-no-delete"))):(this.$(".so-row-toolbar .so-dropdown-wrapper").remove(),this.$el.addClass("so-row-no-actions")),this.builder.supports("moveRow")||(this.$(".so-row-toolbar .so-row-move").remove(),this.$el.addClass("so-row-no-move")),l.trim(this.$(".so-row-toolbar").html()).length||this.$(".so-row-toolbar").remove(),this.builder.on("widget_sortable_move",this.resize,this),this.builder.on("builder_resize",this.resize,this),this.resize(),this},visualCreate:function(){this.$el.hide().fadeIn("fast")},resize:function(e){if(this.$el.is(":visible")){this.$(".so-cells .cell-wrapper").css("min-height",0),this.$(".so-cells .resize-handle").css("height",0);var t=0;this.$(".so-cells .cell").each(function(){t=Math.max(t,l(this).height()),l(this).css("width",100*l(this).data("view").model.get("weight")+"%")}),this.$(".so-cells .cell-wrapper").css("min-height",Math.max(t,63)),this.$(".so-cells .resize-handle").css("height",this.$(".so-cells .cell-wrapper").outerHeight())}},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){this.builder.addHistoryEntry("row_deleted");var e=this;this.$el.fadeOut("normal",function(){e.model.destroy(),e.builder.model.refreshPanelsData()})},onLabelChange:function(e,t){0==this.$(".so-row-label").length?this.$(".so-row-toolbar").prepend('<h3 class="so-row-label">'+t+"</h3>"):this.$(".so-row-label").text(t)},duplicateHandler:function(){this.builder.addHistoryEntry("row_duplicated");var e=this.model.clone(this.builder.model);this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},pasteHandler:function(){var e=s.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof s.model.row&&(this.builder.addHistoryEntry("row_pasted"),e.builder=this.builder.model,this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData())},confirmedDeleteHandler:function(e){var t=l(e.target);if(t.hasClass("dashicons")&&(t=l.parent()),t.hasClass("so-confirmed"))this.visualDestroyModel();else{var i=t.html();t.addClass("so-confirmed").html('<span class="dashicons dashicons-yes"></span>'+panelsOptions.loc.dropdown_confirm),setTimeout(function(){t.removeClass("so-confirmed").html(i)},2500)}},editSettingsHandler:function(){return null===this.dialog&&(this.dialog=new s.dialog.row,this.dialog.setBuilder(this.builder).setRowModel(this.model)),this.dialog.openDialog(),this},deleteHandler:function(){return this.model.destroy(),this},rowColorChangeHandler:function(e){this.$(".so-row-color").removeClass("so-row-color-selected");var t=l(e.target),i=t.data("color-label"),s=this.model.has("color_label")?this.model.get("color_label"):1;t.addClass("so-row-color-selected"),this.$el.removeClass("so-row-color-"+s),this.$el.addClass("so-row-color-"+i),this.model.set("color_label",i)},handleCellAdd:function(e){var t=new s.view.cell({model:e});t.row=this,t.render(),t.$el.appendTo(this.$(".so-cells"))},handleCellRemove:function(e){this.$(".so-cells > .cell").each(function(){var t=l(this).data("view");_.isUndefined(t)||t.model.cid===e.cid&&t.remove()})},buildContextualMenu:function(e,t){for(var i=[],l=1;l<5;l++)i.push({title:l+" "+panelsOptions.loc.contextual.column});this.builder.supports("addRow")&&t.addSection("add-row",{sectionTitle:panelsOptions.loc.contextual.add_row,search:!1},i,function(e){this.builder.addHistoryEntry("row_added");for(var t=Number(e)+1,i=[],l=0;l<t;l++)i.push({weight:100/t});var o=new s.model.row({collection:this.collection}),n=new s.collection.cells(i);n.each(function(e){e.row=o}),o.setCells(n),o.builder=this.builder.model,this.builder.model.get("rows").add(o,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()}.bind(this));var o={};this.builder.supports("editRow")&&(o.edit={title:panelsOptions.loc.contextual.row_edit}),s.helpers.clipboard.canCopyPaste()&&(o.copy={title:panelsOptions.loc.contextual.row_copy},this.builder.supports("addRow")&&s.helpers.clipboard.isModel("row-model")&&(o.paste={title:panelsOptions.loc.contextual.row_paste})),this.builder.supports("addRow")&&(o.duplicate={title:panelsOptions.loc.contextual.row_duplicate}),this.builder.supports("deleteRow")&&(o.delete={title:panelsOptions.loc.contextual.row_delete,confirm:!0}),_.isEmpty(o)||t.addSection("row-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},o,function(e){switch(e){case"edit":this.editSettingsHandler();break;case"copy":this.copyHandler();break;case"paste":this.pasteHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this))}})},{}],28:[function(e,t,i){var s=(window.panels,jQuery);t.exports=Backbone.View.extend({stylesLoaded:!1,initialize:function(){},render:function(e,t,i){if(!_.isUndefined(e)){i=_.extend({builderType:"",dialog:null},i),this.$el.addClass("so-visual-styles so-"+e+"-styles");var l={builderType:i.builderType};return"cell"===e&&(l.index=i.index),s.post(panelsOptions.ajaxurl,{action:"so_panels_style_form",type:e,style:this.model.get("style"),args:JSON.stringify(l),postId:t},function(e){this.$el.html(e),this.setupFields(),this.stylesLoaded=!0,this.trigger("styles_loaded",!_.isEmpty(e)),_.isNull(i.dialog)||i.dialog.trigger("styles_loaded",!_.isEmpty(e))}.bind(this)),this}},attach:function(e){e.append(this.$el)},detach:function(){this.$el.detach()},setupFields:function(){this.$(".style-section-wrapper").each(function(){var e=s(this);e.find(".style-section-head").click(function(t){t.preventDefault(),e.find(".style-section-fields").slideToggle("fast")})}),_.isUndefined(s.fn.wpColorPicker)||(_.isObject(panelsOptions.wpColorPickerOptions.palettes)&&!s.isArray(panelsOptions.wpColorPickerOptions.palettes)&&(panelsOptions.wpColorPickerOptions.palettes=s.map(panelsOptions.wpColorPickerOptions.palettes,function(e){return e})),this.$(".so-wp-color-field").wpColorPicker(panelsOptions.wpColorPickerOptions)),this.$(".style-field-image").each(function(){var e=null,t=s(this);t.find(".so-image-selector").click(function(i){i.preventDefault(),null===e&&(e=wp.media({title:"choose",library:{type:"image"},button:{text:"Done",close:!0}}),e.on("select",function(){var i=e.state().get("selection").first().attributes,s=i.url;if(!_.isUndefined(i.sizes))try{s=i.sizes.thumbnail.url}catch(e){s=i.sizes.full.url}t.find(".current-image").css("background-image","url("+s+")"),t.find("input").val(i.id)})),e.open()}),t.find(".remove-image").click(function(e){e.preventDefault(),t.find(".current-image").css("background-image","none"),t.find("input").val("")})}),this.$(".style-field-measurement").each(function(){var e=s(this),t=e.find('input[type="text"]'),i=e.find("select"),l=e.find('input[type="hidden"]');t.focus(function(){s(this).select()});!function(e){if(""!==e){var o=/(?:([0-9\.,\-]+)(.*))+/,n=l.val().split(" "),a=[];for(var r in n){var d=o.exec(n[r]);_.isNull(d)||_.isUndefined(d[1])||_.isUndefined(d[2])||(a.push(d[1]),i.val(d[2]))}1===t.length?t.val(a.join(" ")):(1===a.length?a=[a[0],a[0],a[0],a[0]]:2===a.length?a=[a[0],a[1],a[0],a[1]]:3===a.length&&(a=[a[0],a[1],a[2],a[1]]),t.each(function(e,t){s(t).val(a[e])}))}}(l.val());var o=function(e){if(1===t.length){var o=t.val().split(" ").filter(function(e){return""!==e}).map(function(e){return e+i.val()}).join(" ");l.val(o)}else{var n=s(e.target),a=[],r=[],d=[];t.each(function(e,t){var i=""!==s(t).val()?parseFloat(s(t).val()):null;a.push(i),null===i?r.push(e):d.push(e)}),3===r.length&&d[0]===t.index(n)&&(t.val(n.val()),a=[n.val(),n.val(),n.val(),n.val()]),JSON.stringify(a)===JSON.stringify([null,null,null,null])?l.val(""):l.val(a.map(function(e){return(null===e?0:e)+i.val()}).join(" "))}};t.change(o),i.change(o)})}})},{}],29:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-widget").html())),cell:null,dialog:null,events:{"click .widget-edit":"editHandler","click .title h4":"titleClickHandler","click .actions .widget-duplicate":"duplicateHandler","click .actions .widget-delete":"deleteHandler"},initialize:function(){this.model.on("user_edit",this.editHandler,this),this.model.on("user_duplicate",this.duplicateHandler,this),this.model.on("destroy",this.onModelDestroy,this),this.model.on("visual_destroy",this.visualDestroyModel,this),this.model.on("change:values",this.onModelChange,this),this.model.on("change:label",this.onLabelChange,this)},render:function(e){if(e=_.extend({loadForm:!1},e),this.setElement(this.template({title:this.model.getWidgetField("title"),description:this.model.getTitle()})),this.$el.data("view",this),this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")||(this.$(".actions .widget-edit").remove(),this.$el.addClass("so-widget-no-edit")),this.cell.row.builder.supports("addWidget")||(this.$(".actions .widget-duplicate").remove(),
|
4 |
this.$el.addClass("so-widget-no-duplicate")),this.cell.row.builder.supports("deleteWidget")||(this.$(".actions .widget-delete").remove(),this.$el.addClass("so-widget-no-delete")),this.cell.row.builder.supports("moveWidget")||this.$el.addClass("so-widget-no-move"),l.trim(this.$(".actions").html()).length||this.$(".actions").remove(),this.model.get("read_only")&&this.$el.addClass("so-widget-read-only"),0===_.size(this.model.get("values"))||e.loadForm){var t=this.getEditDialog();t.once("form_loaded",t.saveWidget,t),t.setupDialog()}return this},visualCreate:function(){this.$el.hide().fadeIn("fast")},getEditDialog:function(){return null===this.dialog&&(this.dialog=new s.dialog.widget({model:this.model}),this.dialog.setBuilder(this.cell.row.builder),this.dialog.widgetView=this),this.dialog},editHandler:function(){this.getEditDialog().openDialog()},titleClickHandler:function(e){return!this.cell.row.builder.supports("editWidget")||this.model.get("read_only")?this:(this.editHandler(),this)},duplicateHandler:function(){this.cell.row.builder.addHistoryEntry("widget_duplicated");var e=this.model.clone(this.model.cell);return this.cell.model.get("widgets").add(e,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},deleteHandler:function(){return this.model.trigger("visual_destroy"),this},onModelChange:function(){this.$(".description").html(this.model.getTitle())},onLabelChange:function(e){this.$(".title > h4").text(e.getWidgetField("title"))},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){this.cell.row.builder.addHistoryEntry("widget_deleted");var e=this;return this.$el.fadeOut("fast",function(){e.cell.row.resize(),e.model.destroy(),e.cell.row.builder.model.refreshPanelsData(),e.remove()}),this},buildContextualMenu:function(e,t){this.cell.row.builder.supports("addWidget")&&t.addSection("add-widget-below",{sectionTitle:panelsOptions.loc.contextual.add_widget_below,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,function(e){this.cell.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=this.cell.model,this.cell.model.get("widgets").add(t,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData()}.bind(this));var i={};this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")&&(i.edit={title:panelsOptions.loc.contextual.widget_edit}),s.helpers.clipboard.canCopyPaste()&&(i.copy={title:panelsOptions.loc.contextual.widget_copy}),this.cell.row.builder.supports("addWidget")&&(i.duplicate={title:panelsOptions.loc.contextual.widget_duplicate}),this.cell.row.builder.supports("deleteWidget")&&(i.delete={title:panelsOptions.loc.contextual.widget_delete,confirm:!0}),_.isEmpty(i)||t.addSection("widget-actions",{sectionTitle:panelsOptions.loc.contextual.widget_actions,search:!1},i,function(e){switch(e){case"edit":this.editHandler();break;case"copy":this.copyHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this)),this.cell.buildContextualMenu(e,t)}})},{}]},{},[16]);
|
lang/siteorigin-panels.pot
CHANGED
@@ -25,11 +25,11 @@ msgstr ""
|
|
25 |
msgid "Theme Defined Layouts"
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: tmp/inc/admin-layouts.php:
|
29 |
msgid "Clone %s"
|
30 |
msgstr ""
|
31 |
|
32 |
-
#: tmp/inc/admin-layouts.php:
|
33 |
msgid " - Results For:"
|
34 |
msgstr ""
|
35 |
|
@@ -61,7 +61,7 @@ msgstr ""
|
|
61 |
msgid "WordPress Widgets"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: tmp/inc/admin-widget-dialog.php:183, tmp/inc/settings.php:
|
65 |
msgid "Recommended Widgets"
|
66 |
msgstr ""
|
67 |
|
@@ -81,303 +81,303 @@ msgstr ""
|
|
81 |
msgid "Newsletter"
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: tmp/inc/admin.php:131, tmp/inc/admin.php:
|
85 |
msgid "Page Builder"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: tmp/inc/admin.php:
|
89 |
msgid "All Widgets"
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: tmp/inc/admin.php:
|
93 |
msgid "Missing Widget"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: tmp/inc/admin.php:
|
97 |
msgid "Page Builder doesn't know about this widget."
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: tmp/inc/admin.php:
|
101 |
msgid "%d seconds"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: tmp/inc/admin.php:
|
105 |
msgid "%d minutes"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: tmp/inc/admin.php:
|
109 |
msgid "%d hours"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: tmp/inc/admin.php:
|
113 |
msgid "%d second"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: tmp/inc/admin.php:
|
117 |
msgid "%d minute"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: tmp/inc/admin.php:
|
121 |
msgid "%d hour"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: tmp/inc/admin.php:
|
125 |
msgid "%s before"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: tmp/inc/admin.php:
|
129 |
msgid "Now"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: tmp/inc/admin.php:
|
133 |
msgid "Current"
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: tmp/inc/admin.php:
|
137 |
msgid "Original"
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: tmp/inc/admin.php:
|
141 |
msgid "Version restored"
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: tmp/inc/admin.php:
|
145 |
msgid "Converted to editor"
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: tmp/inc/admin.php:
|
149 |
msgid "Widget deleted"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: tmp/inc/admin.php:
|
153 |
msgid "Widget added"
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: tmp/inc/admin.php:
|
157 |
msgid "Widget edited"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: tmp/inc/admin.php:
|
161 |
msgid "Widget duplicated"
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: tmp/inc/admin.php:
|
165 |
msgid "Widget moved"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: tmp/inc/admin.php:
|
169 |
msgid "Row deleted"
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: tmp/inc/admin.php:
|
173 |
msgid "Row added"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: tmp/inc/admin.php:
|
177 |
msgid "Row edited"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: tmp/inc/admin.php:
|
181 |
msgid "Row moved"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: tmp/inc/admin.php:
|
185 |
msgid "Row duplicated"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: tmp/inc/admin.php:
|
189 |
msgid "Row pasted"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: tmp/inc/admin.php:
|
193 |
msgid "Cell resized"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: tmp/inc/admin.php:
|
197 |
msgid "Prebuilt layout loaded"
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: tmp/inc/admin.php:
|
201 |
msgid "Loading prebuilt layout"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: tmp/inc/admin.php:
|
205 |
msgid "Would you like to copy this editor's existing content to Page Builder?"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: tmp/inc/admin.php:
|
209 |
msgid "Would you like to clear your Page Builder content and revert to using the standard visual editor?"
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: tmp/inc/admin.php:
|
213 |
msgid "Layout Builder Widget"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: tmp/inc/admin.php:
|
217 |
msgid "Are you sure?"
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: tmp/inc/admin.php:
|
221 |
msgid "%s is ready to insert."
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: tmp/inc/admin.php:
|
225 |
msgid "Add Widget Below"
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: tmp/inc/admin.php:
|
229 |
msgid "Add Widget to Cell"
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: tmp/inc/admin.php:
|
233 |
msgid "Search Widgets"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: tmp/inc/admin.php:
|
237 |
msgid "Add Row"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: tmp/inc/admin.php:
|
241 |
msgid "Column"
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: tmp/inc/admin.php:
|
245 |
msgid "Cell Actions"
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: tmp/inc/admin.php:
|
249 |
msgid "Paste Widget"
|
250 |
msgstr ""
|
251 |
|
252 |
-
#: tmp/inc/admin.php:
|
253 |
msgid "Widget Actions"
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: tmp/inc/admin.php:
|
257 |
msgid "Edit Widget"
|
258 |
msgstr ""
|
259 |
|
260 |
-
#: tmp/inc/admin.php:
|
261 |
msgid "Duplicate Widget"
|
262 |
msgstr ""
|
263 |
|
264 |
-
#: tmp/inc/admin.php:
|
265 |
msgid "Delete Widget"
|
266 |
msgstr ""
|
267 |
|
268 |
-
#: tmp/inc/admin.php:
|
269 |
msgid "Copy Widget"
|
270 |
msgstr ""
|
271 |
|
272 |
-
#: tmp/inc/admin.php:
|
273 |
msgid "Paste Widget Below"
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: tmp/inc/admin.php:
|
277 |
msgid "Row Actions"
|
278 |
msgstr ""
|
279 |
|
280 |
-
#: tmp/inc/admin.php:
|
281 |
msgid "Edit Row"
|
282 |
msgstr ""
|
283 |
|
284 |
-
#: tmp/inc/admin.php:
|
285 |
msgid "Duplicate Row"
|
286 |
msgstr ""
|
287 |
|
288 |
-
#: tmp/inc/admin.php:
|
289 |
msgid "Delete Row"
|
290 |
msgstr ""
|
291 |
|
292 |
-
#: tmp/inc/admin.php:
|
293 |
msgid "Copy Row"
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: tmp/inc/admin.php:
|
297 |
msgid "Paste Row"
|
298 |
msgstr ""
|
299 |
|
300 |
-
#: tmp/inc/admin.php:
|
301 |
msgid "Draft"
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: tmp/inc/admin.php:
|
305 |
msgid "Untitled"
|
306 |
msgstr ""
|
307 |
|
308 |
-
#: tmp/inc/admin.php:
|
309 |
msgid "New Row"
|
310 |
msgstr ""
|
311 |
|
312 |
-
#: tmp/inc/admin.php:
|
313 |
msgid "Row"
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: tmp/inc/admin.php:
|
317 |
msgid "Page Builder layouts"
|
318 |
msgstr ""
|
319 |
|
320 |
-
#: tmp/inc/admin.php:
|
321 |
msgid "Error uploading or importing file."
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: tmp/inc/admin.php:
|
325 |
msgid "Home Page"
|
326 |
msgstr ""
|
327 |
|
328 |
-
#: tmp/inc/admin.php:
|
329 |
msgid "Untitled Widget"
|
330 |
msgstr ""
|
331 |
|
332 |
-
#: tmp/inc/admin.php:
|
333 |
msgid "You need to install 1{%1$s} to use the widget 2{%2$s}."
|
334 |
msgstr ""
|
335 |
|
336 |
-
#: tmp/inc/admin.php:
|
337 |
msgid "Save and reload this page to start using the widget after you've installed it."
|
338 |
msgstr ""
|
339 |
|
340 |
-
#: tmp/inc/admin.php:
|
341 |
msgid "The widget 1{%1$s} is not available. Please try locate and install the missing plugin. Post on the 2{support forums} if you need help."
|
342 |
msgstr ""
|
343 |
|
344 |
-
#: tmp/inc/admin.php:
|
345 |
msgid "%s Widgets"
|
346 |
msgstr ""
|
347 |
|
348 |
-
#: tmp/inc/admin.php:
|
349 |
msgid "12 Page Builder Tips"
|
350 |
msgstr ""
|
351 |
|
352 |
-
#: tmp/inc/admin.php:
|
353 |
msgid "Sign up to our newsletter and we'll send you this free Page Builder video course."
|
354 |
msgstr ""
|
355 |
|
356 |
-
#: tmp/inc/admin.php:
|
357 |
msgid "12 tips that'll help you get the most out of Page Builder."
|
358 |
msgstr ""
|
359 |
|
360 |
-
#: tmp/inc/admin.php:
|
361 |
msgid "Watch the video to find out more, then sign up below to get started."
|
362 |
msgstr ""
|
363 |
|
364 |
-
#: tmp/inc/admin.php:
|
365 |
msgid "We'll email you a confirmation. You can unsubscribe at any time."
|
366 |
msgstr ""
|
367 |
|
368 |
-
#: tmp/inc/admin.php:
|
369 |
msgid "Free Page Builder Addons"
|
370 |
msgstr ""
|
371 |
|
372 |
-
#: tmp/inc/admin.php:
|
373 |
msgid "The free animations addon allows you to add beautiful animations to Page Builder elements."
|
374 |
msgstr ""
|
375 |
|
376 |
-
#: tmp/inc/admin.php:
|
377 |
msgid "Sign up to our newsletter and we'll send you the addon as a free gift."
|
378 |
msgstr ""
|
379 |
|
380 |
-
#: tmp/inc/admin.php:
|
381 |
msgid "Plus, we'll send you even more powerful addons, for as long as you're subscribed."
|
382 |
msgstr ""
|
383 |
|
@@ -490,178 +490,170 @@ msgid "Page Builder will create an emulated sidebar, that contains all widgets i
|
|
490 |
msgstr ""
|
491 |
|
492 |
#: tmp/inc/settings.php:266
|
493 |
-
msgid "Upgrade Teaser"
|
494 |
-
msgstr ""
|
495 |
-
|
496 |
-
#: tmp/inc/settings.php:268
|
497 |
-
msgid "Display the %sSiteOrigin Premium%s upgrade teaser in the Page Builder toolbar."
|
498 |
-
msgstr ""
|
499 |
-
|
500 |
-
#: tmp/inc/settings.php:276
|
501 |
msgid "Page Builder Learning"
|
502 |
msgstr ""
|
503 |
|
504 |
-
#: tmp/inc/settings.php:
|
505 |
msgid "Display buttons for Page Builder learning."
|
506 |
msgstr ""
|
507 |
|
508 |
-
#: tmp/inc/settings.php:
|
509 |
msgid "Default To Page Builder Interface"
|
510 |
msgstr ""
|
511 |
|
512 |
-
#: tmp/inc/settings.php:
|
513 |
msgid "New posts/pages that you create will start with the Page Builder loaded."
|
514 |
msgstr ""
|
515 |
|
516 |
-
#: tmp/inc/settings.php:
|
517 |
msgid "Widgets"
|
518 |
msgstr ""
|
519 |
|
520 |
-
#: tmp/inc/settings.php:
|
521 |
msgid "Widget Title HTML"
|
522 |
msgstr ""
|
523 |
|
524 |
-
#: tmp/inc/settings.php:
|
525 |
msgid "The HTML used for widget titles. {{title}} is replaced with the widget title."
|
526 |
msgstr ""
|
527 |
|
528 |
-
#: tmp/inc/settings.php:
|
529 |
msgid "Add Widget Class"
|
530 |
msgstr ""
|
531 |
|
532 |
-
#: tmp/inc/settings.php:
|
533 |
msgid "Add the widget class to Page Builder widgets. Disable this if you're experiencing conflicts."
|
534 |
msgstr ""
|
535 |
|
536 |
-
#: tmp/inc/settings.php:
|
537 |
msgid "Legacy Bundled Widgets"
|
538 |
msgstr ""
|
539 |
|
540 |
-
#: tmp/inc/settings.php:
|
541 |
msgid "Load legacy widgets from Page Builder 1."
|
542 |
msgstr ""
|
543 |
|
544 |
-
#: tmp/inc/settings.php:
|
545 |
msgid "Display recommend widgets in Page Builder add widget dialog."
|
546 |
msgstr ""
|
547 |
|
548 |
-
#: tmp/inc/settings.php:
|
549 |
msgid "Layout"
|
550 |
msgstr ""
|
551 |
|
552 |
-
#: tmp/inc/settings.php:
|
553 |
msgid "Responsive Layout"
|
554 |
msgstr ""
|
555 |
|
556 |
-
#: tmp/inc/settings.php:
|
557 |
msgid "Collapse widgets, rows and columns on mobile devices."
|
558 |
msgstr ""
|
559 |
|
560 |
-
#: tmp/inc/settings.php:
|
561 |
msgid "Use Tablet Layout"
|
562 |
msgstr ""
|
563 |
|
564 |
-
#: tmp/inc/settings.php:
|
565 |
msgid "Collapses columns differently on tablet devices."
|
566 |
msgstr ""
|
567 |
|
568 |
-
#: tmp/inc/settings.php:
|
569 |
msgid "Detect older browsers"
|
570 |
msgstr ""
|
571 |
|
572 |
-
#: tmp/inc/settings.php:
|
573 |
msgid "Never"
|
574 |
msgstr ""
|
575 |
|
576 |
-
#: tmp/inc/settings.php:
|
577 |
msgid "Always"
|
578 |
msgstr ""
|
579 |
|
580 |
-
#: tmp/inc/settings.php:
|
581 |
msgid "Use Legacy Layout Engine"
|
582 |
msgstr ""
|
583 |
|
584 |
-
#: tmp/inc/settings.php:
|
585 |
msgid "The CSS and HTML uses floats instead of flexbox for compatibility with very old browsers."
|
586 |
msgstr ""
|
587 |
|
588 |
-
#: tmp/inc/settings.php:
|
589 |
msgid "Tablet Width"
|
590 |
msgstr ""
|
591 |
|
592 |
-
#: tmp/inc/settings.php:
|
593 |
msgid "Device width, in pixels, to collapse into a tablet view ."
|
594 |
msgstr ""
|
595 |
|
596 |
-
#: tmp/inc/settings.php:
|
597 |
msgid "Mobile Width"
|
598 |
msgstr ""
|
599 |
|
600 |
-
#: tmp/inc/settings.php:
|
601 |
msgid "Device width, in pixels, to collapse into a mobile view ."
|
602 |
msgstr ""
|
603 |
|
604 |
-
#: tmp/inc/settings.php:
|
605 |
msgid "Row/Widget Bottom Margin"
|
606 |
msgstr ""
|
607 |
|
608 |
-
#: tmp/inc/settings.php:
|
609 |
msgid "Default margin below rows and widgets."
|
610 |
msgstr ""
|
611 |
|
612 |
-
#: tmp/inc/settings.php:
|
613 |
msgid "Last Row With Margin"
|
614 |
msgstr ""
|
615 |
|
616 |
-
#: tmp/inc/settings.php:
|
617 |
msgid "Allow margin in last row."
|
618 |
msgstr ""
|
619 |
|
620 |
-
#: tmp/inc/settings.php:
|
621 |
msgid "Row Gutter"
|
622 |
msgstr ""
|
623 |
|
624 |
-
#: tmp/inc/settings.php:
|
625 |
msgid "Default spacing between columns in each row."
|
626 |
msgstr ""
|
627 |
|
628 |
-
#: tmp/inc/settings.php:
|
629 |
msgid "Full Width Container"
|
630 |
msgstr ""
|
631 |
|
632 |
-
#: tmp/inc/settings.php:
|
633 |
msgid "The container used for the full width layout."
|
634 |
msgstr ""
|
635 |
|
636 |
-
#: tmp/inc/settings.php:
|
637 |
msgid "Content"
|
638 |
msgstr ""
|
639 |
|
640 |
-
#: tmp/inc/settings.php:
|
641 |
msgid "Copy Content"
|
642 |
msgstr ""
|
643 |
|
644 |
-
#: tmp/inc/settings.php:
|
645 |
msgid "Copy content from Page Builder to post content."
|
646 |
msgstr ""
|
647 |
|
648 |
-
#: tmp/inc/settings.php:
|
649 |
msgid "Copy Styles"
|
650 |
msgstr ""
|
651 |
|
652 |
-
#: tmp/inc/settings.php:
|
653 |
msgid "Include styles into your Post Content. This keeps page layouts, even when Page Builder is deactivated."
|
654 |
msgstr ""
|
655 |
|
656 |
-
#: tmp/inc/settings.php:
|
657 |
msgid "Content Cache"
|
658 |
msgstr ""
|
659 |
|
660 |
-
#: tmp/inc/settings.php:
|
661 |
-
msgid "Cache CSS and HTML generated by Page Builder.
|
662 |
msgstr ""
|
663 |
|
664 |
-
#: tmp/inc/settings.php:
|
665 |
msgid "Enabled"
|
666 |
msgstr ""
|
667 |
|
@@ -869,7 +861,7 @@ msgstr ""
|
|
869 |
msgid "Collapse Order"
|
870 |
msgstr ""
|
871 |
|
872 |
-
#: tmp/inc/styles.php:229, tmp/widgets/basic.php:
|
873 |
msgid "Default"
|
874 |
msgstr ""
|
875 |
|
@@ -977,15 +969,15 @@ msgstr ""
|
|
977 |
msgid "Save Settings"
|
978 |
msgstr ""
|
979 |
|
980 |
-
#: tmp/siteorigin-panels.php:
|
981 |
msgid "Read More"
|
982 |
msgstr ""
|
983 |
|
984 |
-
#: tmp/siteorigin-panels.php:
|
985 |
msgid "Edit Home Page"
|
986 |
msgstr ""
|
987 |
|
988 |
-
#: tmp/siteorigin-panels.php:
|
989 |
msgid "Live Editor"
|
990 |
msgstr ""
|
991 |
|
@@ -1233,143 +1225,143 @@ msgstr ""
|
|
1233 |
msgid "A complete SiteOrigin Page Builder layout as a widget."
|
1234 |
msgstr ""
|
1235 |
|
1236 |
-
#: tmp/widgets/basic.php:
|
1237 |
msgid "Open Builder"
|
1238 |
msgstr ""
|
1239 |
|
1240 |
-
#: tmp/widgets/basic.php:
|
1241 |
msgid "Post Content"
|
1242 |
msgstr ""
|
1243 |
|
1244 |
-
#: tmp/widgets/basic.php:
|
1245 |
msgid "Displays content from the current post."
|
1246 |
msgstr ""
|
1247 |
|
1248 |
-
#: tmp/widgets/basic.php:
|
1249 |
msgid "None"
|
1250 |
msgstr ""
|
1251 |
|
1252 |
-
#: tmp/widgets/basic.php:
|
1253 |
msgid "Title"
|
1254 |
msgstr ""
|
1255 |
|
1256 |
-
#: tmp/widgets/basic.php:
|
1257 |
msgid "Featured Image"
|
1258 |
msgstr ""
|
1259 |
|
1260 |
-
#: tmp/widgets/basic.php:
|
1261 |
msgid "Display Content"
|
1262 |
msgstr ""
|
1263 |
|
1264 |
-
#: tmp/widgets/basic.php:
|
1265 |
msgid "Post Loop"
|
1266 |
msgstr ""
|
1267 |
|
1268 |
-
#: tmp/widgets/basic.php:
|
1269 |
msgid "Displays a post loop."
|
1270 |
msgstr ""
|
1271 |
|
1272 |
-
#: tmp/widgets/basic.php:
|
1273 |
msgid "Your theme doesn't have any post loops."
|
1274 |
msgstr ""
|
1275 |
|
1276 |
-
#: tmp/widgets/basic.php:
|
1277 |
msgid "Template"
|
1278 |
msgstr ""
|
1279 |
|
1280 |
-
#: tmp/widgets/basic.php:
|
1281 |
msgid "More Link"
|
1282 |
msgstr ""
|
1283 |
|
1284 |
-
#: tmp/widgets/basic.php:
|
1285 |
msgid "If the template supports it, cut posts and display the more link."
|
1286 |
msgstr ""
|
1287 |
|
1288 |
-
#: tmp/widgets/basic.php:
|
1289 |
msgid "Post Type"
|
1290 |
msgstr ""
|
1291 |
|
1292 |
-
#: tmp/widgets/basic.php:
|
1293 |
msgid "Posts Per Page"
|
1294 |
msgstr ""
|
1295 |
|
1296 |
-
#: tmp/widgets/basic.php:
|
1297 |
msgid "Order By"
|
1298 |
msgstr ""
|
1299 |
|
1300 |
-
#: tmp/widgets/basic.php:
|
1301 |
msgid "Post ID"
|
1302 |
msgstr ""
|
1303 |
|
1304 |
-
#: tmp/widgets/basic.php:
|
1305 |
msgid "Author"
|
1306 |
msgstr ""
|
1307 |
|
1308 |
-
#: tmp/widgets/basic.php:
|
1309 |
msgid "Name"
|
1310 |
msgstr ""
|
1311 |
|
1312 |
-
#: tmp/widgets/basic.php:
|
1313 |
msgid "Date"
|
1314 |
msgstr ""
|
1315 |
|
1316 |
-
#: tmp/widgets/basic.php:
|
1317 |
msgid "Modified"
|
1318 |
msgstr ""
|
1319 |
|
1320 |
-
#: tmp/widgets/basic.php:
|
1321 |
msgid "Parent"
|
1322 |
msgstr ""
|
1323 |
|
1324 |
-
#: tmp/widgets/basic.php:
|
1325 |
msgid "Random"
|
1326 |
msgstr ""
|
1327 |
|
1328 |
-
#: tmp/widgets/basic.php:
|
1329 |
msgid "Comment Count"
|
1330 |
msgstr ""
|
1331 |
|
1332 |
-
#: tmp/widgets/basic.php:
|
1333 |
msgid "Menu Order"
|
1334 |
msgstr ""
|
1335 |
|
1336 |
-
#: tmp/widgets/basic.php:
|
1337 |
msgid "Post In Order"
|
1338 |
msgstr ""
|
1339 |
|
1340 |
-
#: tmp/widgets/basic.php:
|
1341 |
msgid "Order"
|
1342 |
msgstr ""
|
1343 |
|
1344 |
-
#: tmp/widgets/basic.php:
|
1345 |
msgid "Descending"
|
1346 |
msgstr ""
|
1347 |
|
1348 |
-
#: tmp/widgets/basic.php:
|
1349 |
msgid "Ascending"
|
1350 |
msgstr ""
|
1351 |
|
1352 |
-
#: tmp/widgets/basic.php:
|
1353 |
msgid "Sticky Posts"
|
1354 |
msgstr ""
|
1355 |
|
1356 |
-
#: tmp/widgets/basic.php:
|
1357 |
msgid "Ignore Sticky"
|
1358 |
msgstr ""
|
1359 |
|
1360 |
-
#: tmp/widgets/basic.php:
|
1361 |
msgid "Exclude Sticky"
|
1362 |
msgstr ""
|
1363 |
|
1364 |
-
#: tmp/widgets/basic.php:
|
1365 |
msgid "Only Sticky"
|
1366 |
msgstr ""
|
1367 |
|
1368 |
-
#: tmp/widgets/basic.php:
|
1369 |
msgid "Additional "
|
1370 |
msgstr ""
|
1371 |
|
1372 |
-
#: tmp/widgets/basic.php:
|
1373 |
msgid "Additional query arguments. See 1{query_posts}."
|
1374 |
msgstr ""
|
1375 |
|
25 |
msgid "Theme Defined Layouts"
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: tmp/inc/admin-layouts.php:153
|
29 |
msgid "Clone %s"
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: tmp/inc/admin-layouts.php:191
|
33 |
msgid " - Results For:"
|
34 |
msgstr ""
|
35 |
|
61 |
msgid "WordPress Widgets"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: tmp/inc/admin-widget-dialog.php:183, tmp/inc/settings.php:303
|
65 |
msgid "Recommended Widgets"
|
66 |
msgstr ""
|
67 |
|
81 |
msgid "Newsletter"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: tmp/inc/admin.php:131, tmp/inc/admin.php:452, tmp/inc/admin.php:937, tmp/inc/admin.php:942, tmp/inc/settings.php:186, tmp/tpl/js-templates.php:201
|
85 |
msgid "Page Builder"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: tmp/inc/admin.php:258
|
89 |
msgid "All Widgets"
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: tmp/inc/admin.php:283
|
93 |
msgid "Missing Widget"
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: tmp/inc/admin.php:284
|
97 |
msgid "Page Builder doesn't know about this widget."
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: tmp/inc/admin.php:288
|
101 |
msgid "%d seconds"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: tmp/inc/admin.php:290
|
105 |
msgid "%d minutes"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: tmp/inc/admin.php:292
|
109 |
msgid "%d hours"
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: tmp/inc/admin.php:295
|
113 |
msgid "%d second"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: tmp/inc/admin.php:297
|
117 |
msgid "%d minute"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: tmp/inc/admin.php:299
|
121 |
msgid "%d hour"
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: tmp/inc/admin.php:302
|
125 |
msgid "%s before"
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: tmp/inc/admin.php:303
|
129 |
msgid "Now"
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: tmp/inc/admin.php:307
|
133 |
msgid "Current"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: tmp/inc/admin.php:308
|
137 |
msgid "Original"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: tmp/inc/admin.php:309
|
141 |
msgid "Version restored"
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: tmp/inc/admin.php:310
|
145 |
msgid "Converted to editor"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: tmp/inc/admin.php:314
|
149 |
msgid "Widget deleted"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: tmp/inc/admin.php:316
|
153 |
msgid "Widget added"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: tmp/inc/admin.php:318
|
157 |
msgid "Widget edited"
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: tmp/inc/admin.php:320
|
161 |
msgid "Widget duplicated"
|
162 |
msgstr ""
|
163 |
|
164 |
+
#: tmp/inc/admin.php:322
|
165 |
msgid "Widget moved"
|
166 |
msgstr ""
|
167 |
|
168 |
+
#: tmp/inc/admin.php:326
|
169 |
msgid "Row deleted"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: tmp/inc/admin.php:328
|
173 |
msgid "Row added"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: tmp/inc/admin.php:330
|
177 |
msgid "Row edited"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: tmp/inc/admin.php:332
|
181 |
msgid "Row moved"
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: tmp/inc/admin.php:334
|
185 |
msgid "Row duplicated"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: tmp/inc/admin.php:336
|
189 |
msgid "Row pasted"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: tmp/inc/admin.php:339
|
193 |
msgid "Cell resized"
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: tmp/inc/admin.php:342
|
197 |
msgid "Prebuilt layout loaded"
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: tmp/inc/admin.php:346
|
201 |
msgid "Loading prebuilt layout"
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: tmp/inc/admin.php:347
|
205 |
msgid "Would you like to copy this editor's existing content to Page Builder?"
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: tmp/inc/admin.php:348
|
209 |
msgid "Would you like to clear your Page Builder content and revert to using the standard visual editor?"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: tmp/inc/admin.php:350
|
213 |
msgid "Layout Builder Widget"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: tmp/inc/admin.php:352, tmp/tpl/js-templates.php:105, tmp/tpl/js-templates.php:424
|
217 |
msgid "Are you sure?"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: tmp/inc/admin.php:354
|
221 |
msgid "%s is ready to insert."
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: tmp/inc/admin.php:358
|
225 |
msgid "Add Widget Below"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: tmp/inc/admin.php:359
|
229 |
msgid "Add Widget to Cell"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: tmp/inc/admin.php:360, tmp/tpl/js-templates.php:228
|
233 |
msgid "Search Widgets"
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: tmp/inc/admin.php:362, tmp/tpl/js-templates.php:17, tmp/tpl/js-templates.php:19
|
237 |
msgid "Add Row"
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: tmp/inc/admin.php:363
|
241 |
msgid "Column"
|
242 |
msgstr ""
|
243 |
|
244 |
+
#: tmp/inc/admin.php:365
|
245 |
msgid "Cell Actions"
|
246 |
msgstr ""
|
247 |
|
248 |
+
#: tmp/inc/admin.php:366
|
249 |
msgid "Paste Widget"
|
250 |
msgstr ""
|
251 |
|
252 |
+
#: tmp/inc/admin.php:368
|
253 |
msgid "Widget Actions"
|
254 |
msgstr ""
|
255 |
|
256 |
+
#: tmp/inc/admin.php:369
|
257 |
msgid "Edit Widget"
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: tmp/inc/admin.php:370
|
261 |
msgid "Duplicate Widget"
|
262 |
msgstr ""
|
263 |
|
264 |
+
#: tmp/inc/admin.php:371
|
265 |
msgid "Delete Widget"
|
266 |
msgstr ""
|
267 |
|
268 |
+
#: tmp/inc/admin.php:372
|
269 |
msgid "Copy Widget"
|
270 |
msgstr ""
|
271 |
|
272 |
+
#: tmp/inc/admin.php:373
|
273 |
msgid "Paste Widget Below"
|
274 |
msgstr ""
|
275 |
|
276 |
+
#: tmp/inc/admin.php:375
|
277 |
msgid "Row Actions"
|
278 |
msgstr ""
|
279 |
|
280 |
+
#: tmp/inc/admin.php:376, tmp/tpl/js-templates.php:103
|
281 |
msgid "Edit Row"
|
282 |
msgstr ""
|
283 |
|
284 |
+
#: tmp/inc/admin.php:377, tmp/tpl/js-templates.php:104
|
285 |
msgid "Duplicate Row"
|
286 |
msgstr ""
|
287 |
|
288 |
+
#: tmp/inc/admin.php:378, tmp/tpl/js-templates.php:105
|
289 |
msgid "Delete Row"
|
290 |
msgstr ""
|
291 |
|
292 |
+
#: tmp/inc/admin.php:379
|
293 |
msgid "Copy Row"
|
294 |
msgstr ""
|
295 |
|
296 |
+
#: tmp/inc/admin.php:380
|
297 |
msgid "Paste Row"
|
298 |
msgstr ""
|
299 |
|
300 |
+
#: tmp/inc/admin.php:382
|
301 |
msgid "Draft"
|
302 |
msgstr ""
|
303 |
|
304 |
+
#: tmp/inc/admin.php:383
|
305 |
msgid "Untitled"
|
306 |
msgstr ""
|
307 |
|
308 |
+
#: tmp/inc/admin.php:385
|
309 |
msgid "New Row"
|
310 |
msgstr ""
|
311 |
|
312 |
+
#: tmp/inc/admin.php:386, tmp/inc/styles.php:173, tmp/tpl/js-templates.php:68
|
313 |
msgid "Row"
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: tmp/inc/admin.php:394
|
317 |
msgid "Page Builder layouts"
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: tmp/inc/admin.php:395
|
321 |
msgid "Error uploading or importing file."
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: tmp/inc/admin.php:533, tmp/inc/home.php:26
|
325 |
msgid "Home Page"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: tmp/inc/admin.php:627
|
329 |
msgid "Untitled Widget"
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: tmp/inc/admin.php:792
|
333 |
msgid "You need to install 1{%1$s} to use the widget 2{%2$s}."
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: tmp/inc/admin.php:798
|
337 |
msgid "Save and reload this page to start using the widget after you've installed it."
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: tmp/inc/admin.php:814
|
341 |
msgid "The widget 1{%1$s} is not available. Please try locate and install the missing plugin. Post on the 2{support forums} if you need help."
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: tmp/inc/admin.php:954
|
345 |
msgid "%s Widgets"
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: tmp/inc/admin.php:1000
|
349 |
msgid "12 Page Builder Tips"
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: tmp/inc/admin.php:1003
|
353 |
msgid "Sign up to our newsletter and we'll send you this free Page Builder video course."
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: tmp/inc/admin.php:1004
|
357 |
msgid "12 tips that'll help you get the most out of Page Builder."
|
358 |
msgstr ""
|
359 |
|
360 |
+
#: tmp/inc/admin.php:1005
|
361 |
msgid "Watch the video to find out more, then sign up below to get started."
|
362 |
msgstr ""
|
363 |
|
364 |
+
#: tmp/inc/admin.php:1006, tmp/inc/admin.php:1016
|
365 |
msgid "We'll email you a confirmation. You can unsubscribe at any time."
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: tmp/inc/admin.php:1010
|
369 |
msgid "Free Page Builder Addons"
|
370 |
msgstr ""
|
371 |
|
372 |
+
#: tmp/inc/admin.php:1013
|
373 |
msgid "The free animations addon allows you to add beautiful animations to Page Builder elements."
|
374 |
msgstr ""
|
375 |
|
376 |
+
#: tmp/inc/admin.php:1014
|
377 |
msgid "Sign up to our newsletter and we'll send you the addon as a free gift."
|
378 |
msgstr ""
|
379 |
|
380 |
+
#: tmp/inc/admin.php:1015
|
381 |
msgid "Plus, we'll send you even more powerful addons, for as long as you're subscribed."
|
382 |
msgstr ""
|
383 |
|
490 |
msgstr ""
|
491 |
|
492 |
#: tmp/inc/settings.php:266
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
493 |
msgid "Page Builder Learning"
|
494 |
msgstr ""
|
495 |
|
496 |
+
#: tmp/inc/settings.php:267
|
497 |
msgid "Display buttons for Page Builder learning."
|
498 |
msgstr ""
|
499 |
|
500 |
+
#: tmp/inc/settings.php:272
|
501 |
msgid "Default To Page Builder Interface"
|
502 |
msgstr ""
|
503 |
|
504 |
+
#: tmp/inc/settings.php:273
|
505 |
msgid "New posts/pages that you create will start with the Page Builder loaded."
|
506 |
msgstr ""
|
507 |
|
508 |
+
#: tmp/inc/settings.php:279
|
509 |
msgid "Widgets"
|
510 |
msgstr ""
|
511 |
|
512 |
+
#: tmp/inc/settings.php:285
|
513 |
msgid "Widget Title HTML"
|
514 |
msgstr ""
|
515 |
|
516 |
+
#: tmp/inc/settings.php:286
|
517 |
msgid "The HTML used for widget titles. {{title}} is replaced with the widget title."
|
518 |
msgstr ""
|
519 |
|
520 |
+
#: tmp/inc/settings.php:291
|
521 |
msgid "Add Widget Class"
|
522 |
msgstr ""
|
523 |
|
524 |
+
#: tmp/inc/settings.php:292
|
525 |
msgid "Add the widget class to Page Builder widgets. Disable this if you're experiencing conflicts."
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: tmp/inc/settings.php:297
|
529 |
msgid "Legacy Bundled Widgets"
|
530 |
msgstr ""
|
531 |
|
532 |
+
#: tmp/inc/settings.php:298
|
533 |
msgid "Load legacy widgets from Page Builder 1."
|
534 |
msgstr ""
|
535 |
|
536 |
+
#: tmp/inc/settings.php:304
|
537 |
msgid "Display recommend widgets in Page Builder add widget dialog."
|
538 |
msgstr ""
|
539 |
|
540 |
+
#: tmp/inc/settings.php:310, tmp/inc/styles-admin.php:78
|
541 |
msgid "Layout"
|
542 |
msgstr ""
|
543 |
|
544 |
+
#: tmp/inc/settings.php:318
|
545 |
msgid "Responsive Layout"
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: tmp/inc/settings.php:319
|
549 |
msgid "Collapse widgets, rows and columns on mobile devices."
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: tmp/inc/settings.php:324
|
553 |
msgid "Use Tablet Layout"
|
554 |
msgstr ""
|
555 |
|
556 |
+
#: tmp/inc/settings.php:325
|
557 |
msgid "Collapses columns differently on tablet devices."
|
558 |
msgstr ""
|
559 |
|
560 |
+
#: tmp/inc/settings.php:331
|
561 |
msgid "Detect older browsers"
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: tmp/inc/settings.php:332
|
565 |
msgid "Never"
|
566 |
msgstr ""
|
567 |
|
568 |
+
#: tmp/inc/settings.php:333
|
569 |
msgid "Always"
|
570 |
msgstr ""
|
571 |
|
572 |
+
#: tmp/inc/settings.php:335
|
573 |
msgid "Use Legacy Layout Engine"
|
574 |
msgstr ""
|
575 |
|
576 |
+
#: tmp/inc/settings.php:336
|
577 |
msgid "The CSS and HTML uses floats instead of flexbox for compatibility with very old browsers."
|
578 |
msgstr ""
|
579 |
|
580 |
+
#: tmp/inc/settings.php:342
|
581 |
msgid "Tablet Width"
|
582 |
msgstr ""
|
583 |
|
584 |
+
#: tmp/inc/settings.php:343
|
585 |
msgid "Device width, in pixels, to collapse into a tablet view ."
|
586 |
msgstr ""
|
587 |
|
588 |
+
#: tmp/inc/settings.php:349
|
589 |
msgid "Mobile Width"
|
590 |
msgstr ""
|
591 |
|
592 |
+
#: tmp/inc/settings.php:350
|
593 |
msgid "Device width, in pixels, to collapse into a mobile view ."
|
594 |
msgstr ""
|
595 |
|
596 |
+
#: tmp/inc/settings.php:356
|
597 |
msgid "Row/Widget Bottom Margin"
|
598 |
msgstr ""
|
599 |
|
600 |
+
#: tmp/inc/settings.php:357
|
601 |
msgid "Default margin below rows and widgets."
|
602 |
msgstr ""
|
603 |
|
604 |
+
#: tmp/inc/settings.php:362
|
605 |
msgid "Last Row With Margin"
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: tmp/inc/settings.php:363
|
609 |
msgid "Allow margin in last row."
|
610 |
msgstr ""
|
611 |
|
612 |
+
#: tmp/inc/settings.php:369
|
613 |
msgid "Row Gutter"
|
614 |
msgstr ""
|
615 |
|
616 |
+
#: tmp/inc/settings.php:370
|
617 |
msgid "Default spacing between columns in each row."
|
618 |
msgstr ""
|
619 |
|
620 |
+
#: tmp/inc/settings.php:376
|
621 |
msgid "Full Width Container"
|
622 |
msgstr ""
|
623 |
|
624 |
+
#: tmp/inc/settings.php:377
|
625 |
msgid "The container used for the full width layout."
|
626 |
msgstr ""
|
627 |
|
628 |
+
#: tmp/inc/settings.php:384
|
629 |
msgid "Content"
|
630 |
msgstr ""
|
631 |
|
632 |
+
#: tmp/inc/settings.php:390
|
633 |
msgid "Copy Content"
|
634 |
msgstr ""
|
635 |
|
636 |
+
#: tmp/inc/settings.php:391
|
637 |
msgid "Copy content from Page Builder to post content."
|
638 |
msgstr ""
|
639 |
|
640 |
+
#: tmp/inc/settings.php:396
|
641 |
msgid "Copy Styles"
|
642 |
msgstr ""
|
643 |
|
644 |
+
#: tmp/inc/settings.php:397
|
645 |
msgid "Include styles into your Post Content. This keeps page layouts, even when Page Builder is deactivated."
|
646 |
msgstr ""
|
647 |
|
648 |
+
#: tmp/inc/settings.php:402
|
649 |
msgid "Content Cache"
|
650 |
msgstr ""
|
651 |
|
652 |
+
#: tmp/inc/settings.php:403
|
653 |
+
msgid "Cache CSS and HTML generated by Page Builder."
|
654 |
msgstr ""
|
655 |
|
656 |
+
#: tmp/inc/settings.php:450, tmp/inc/styles-admin.php:248
|
657 |
msgid "Enabled"
|
658 |
msgstr ""
|
659 |
|
861 |
msgid "Collapse Order"
|
862 |
msgstr ""
|
863 |
|
864 |
+
#: tmp/inc/styles.php:229, tmp/widgets/basic.php:514, tmp/widgets/widgets.php:635, tmp/widgets/widgets.php:757
|
865 |
msgid "Default"
|
866 |
msgstr ""
|
867 |
|
969 |
msgid "Save Settings"
|
970 |
msgstr ""
|
971 |
|
972 |
+
#: tmp/siteorigin-panels.php:297
|
973 |
msgid "Read More"
|
974 |
msgstr ""
|
975 |
|
976 |
+
#: tmp/siteorigin-panels.php:380
|
977 |
msgid "Edit Home Page"
|
978 |
msgstr ""
|
979 |
|
980 |
+
#: tmp/siteorigin-panels.php:400, tmp/tpl/js-templates.php:34, tmp/tpl/js-templates.php:36
|
981 |
msgid "Live Editor"
|
982 |
msgstr ""
|
983 |
|
1225 |
msgid "A complete SiteOrigin Page Builder layout as a widget."
|
1226 |
msgstr ""
|
1227 |
|
1228 |
+
#: tmp/widgets/basic.php:94
|
1229 |
msgid "Open Builder"
|
1230 |
msgstr ""
|
1231 |
|
1232 |
+
#: tmp/widgets/basic.php:130
|
1233 |
msgid "Post Content"
|
1234 |
msgstr ""
|
1235 |
|
1236 |
+
#: tmp/widgets/basic.php:132
|
1237 |
msgid "Displays content from the current post."
|
1238 |
msgstr ""
|
1239 |
|
1240 |
+
#: tmp/widgets/basic.php:178, tmp/widgets/basic.php:488, tmp/widgets/widgets.php:608, tmp/widgets/widgets.php:783
|
1241 |
msgid "None"
|
1242 |
msgstr ""
|
1243 |
|
1244 |
+
#: tmp/widgets/basic.php:179, tmp/widgets/basic.php:416, tmp/widgets/widgets/call-to-action/call-to-action.php:15, tmp/widgets/widgets/list/list.php:15, tmp/widgets/widgets/price-box/price-box.php:15
|
1245 |
msgid "Title"
|
1246 |
msgstr ""
|
1247 |
|
1248 |
+
#: tmp/widgets/basic.php:180
|
1249 |
msgid "Featured Image"
|
1250 |
msgstr ""
|
1251 |
|
1252 |
+
#: tmp/widgets/basic.php:185
|
1253 |
msgid "Display Content"
|
1254 |
msgstr ""
|
1255 |
|
1256 |
+
#: tmp/widgets/basic.php:205
|
1257 |
msgid "Post Loop"
|
1258 |
msgstr ""
|
1259 |
|
1260 |
+
#: tmp/widgets/basic.php:207
|
1261 |
msgid "Displays a post loop."
|
1262 |
msgstr ""
|
1263 |
|
1264 |
+
#: tmp/widgets/basic.php:410
|
1265 |
msgid "Your theme doesn't have any post loops."
|
1266 |
msgstr ""
|
1267 |
|
1268 |
+
#: tmp/widgets/basic.php:420
|
1269 |
msgid "Template"
|
1270 |
msgstr ""
|
1271 |
|
1272 |
+
#: tmp/widgets/basic.php:436
|
1273 |
msgid "More Link"
|
1274 |
msgstr ""
|
1275 |
|
1276 |
+
#: tmp/widgets/basic.php:438
|
1277 |
msgid "If the template supports it, cut posts and display the more link."
|
1278 |
msgstr ""
|
1279 |
|
1280 |
+
#: tmp/widgets/basic.php:472, tmp/widgets/widgets.php:594
|
1281 |
msgid "Post Type"
|
1282 |
msgstr ""
|
1283 |
|
1284 |
+
#: tmp/widgets/basic.php:481, tmp/widgets/widgets.php:601
|
1285 |
msgid "Posts Per Page"
|
1286 |
msgstr ""
|
1287 |
|
1288 |
+
#: tmp/widgets/basic.php:486, tmp/widgets/widgets.php:606
|
1289 |
msgid "Order By"
|
1290 |
msgstr ""
|
1291 |
|
1292 |
+
#: tmp/widgets/basic.php:489, tmp/widgets/widgets.php:609
|
1293 |
msgid "Post ID"
|
1294 |
msgstr ""
|
1295 |
|
1296 |
+
#: tmp/widgets/basic.php:490, tmp/widgets/widgets.php:610
|
1297 |
msgid "Author"
|
1298 |
msgstr ""
|
1299 |
|
1300 |
+
#: tmp/widgets/basic.php:491, tmp/widgets/basic.php:492, tmp/widgets/widgets.php:611, tmp/widgets/widgets.php:612, tmp/widgets/widgets/testimonial/testimonial.php:15
|
1301 |
msgid "Name"
|
1302 |
msgstr ""
|
1303 |
|
1304 |
+
#: tmp/widgets/basic.php:493, tmp/widgets/widgets.php:613
|
1305 |
msgid "Date"
|
1306 |
msgstr ""
|
1307 |
|
1308 |
+
#: tmp/widgets/basic.php:494, tmp/widgets/widgets.php:614
|
1309 |
msgid "Modified"
|
1310 |
msgstr ""
|
1311 |
|
1312 |
+
#: tmp/widgets/basic.php:495, tmp/widgets/widgets.php:615
|
1313 |
msgid "Parent"
|
1314 |
msgstr ""
|
1315 |
|
1316 |
+
#: tmp/widgets/basic.php:496, tmp/widgets/widgets.php:616
|
1317 |
msgid "Random"
|
1318 |
msgstr ""
|
1319 |
|
1320 |
+
#: tmp/widgets/basic.php:497, tmp/widgets/widgets.php:617
|
1321 |
msgid "Comment Count"
|
1322 |
msgstr ""
|
1323 |
|
1324 |
+
#: tmp/widgets/basic.php:498, tmp/widgets/widgets.php:618
|
1325 |
msgid "Menu Order"
|
1326 |
msgstr ""
|
1327 |
|
1328 |
+
#: tmp/widgets/basic.php:499
|
1329 |
msgid "Post In Order"
|
1330 |
msgstr ""
|
1331 |
|
1332 |
+
#: tmp/widgets/basic.php:504, tmp/widgets/widgets.php:624
|
1333 |
msgid "Order"
|
1334 |
msgstr ""
|
1335 |
|
1336 |
+
#: tmp/widgets/basic.php:506, tmp/widgets/widgets.php:627
|
1337 |
msgid "Descending"
|
1338 |
msgstr ""
|
1339 |
|
1340 |
+
#: tmp/widgets/basic.php:507, tmp/widgets/widgets.php:626
|
1341 |
msgid "Ascending"
|
1342 |
msgstr ""
|
1343 |
|
1344 |
+
#: tmp/widgets/basic.php:512, tmp/widgets/widgets.php:633
|
1345 |
msgid "Sticky Posts"
|
1346 |
msgstr ""
|
1347 |
|
1348 |
+
#: tmp/widgets/basic.php:515, tmp/widgets/widgets.php:636
|
1349 |
msgid "Ignore Sticky"
|
1350 |
msgstr ""
|
1351 |
|
1352 |
+
#: tmp/widgets/basic.php:516, tmp/widgets/widgets.php:637
|
1353 |
msgid "Exclude Sticky"
|
1354 |
msgstr ""
|
1355 |
|
1356 |
+
#: tmp/widgets/basic.php:517, tmp/widgets/widgets.php:638
|
1357 |
msgid "Only Sticky"
|
1358 |
msgstr ""
|
1359 |
|
1360 |
+
#: tmp/widgets/basic.php:522
|
1361 |
msgid "Additional "
|
1362 |
msgstr ""
|
1363 |
|
1364 |
+
#: tmp/widgets/basic.php:529, tmp/widgets/widgets.php:648
|
1365 |
msgid "Additional query arguments. See 1{query_posts}."
|
1366 |
msgstr ""
|
1367 |
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Tags: page builder, responsive, widget, widgets, builder, page, admin, gallery, content, cms, pages, post, css, layout, grid
|
3 |
Requires at least: 4.4
|
4 |
Tested up to: 4.7.3
|
5 |
-
Stable tag: 2.
|
6 |
-
Build time: 2017-04-
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
9 |
Donate link: https://siteorigin.com/downloads/contribution/
|
@@ -96,7 +96,14 @@ We've tried to ensure that Page Builder is compatible with most plugin widgets.
|
|
96 |
|
97 |
== Changelog ==
|
98 |
|
99 |
-
= 2.5.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
* Added null function for Sydney theme compatibility.
|
101 |
* Added method for including additional external layout directories.
|
102 |
* Added fix for old Vantage PB layout compatibility.
|
2 |
Tags: page builder, responsive, widget, widgets, builder, page, admin, gallery, content, cms, pages, post, css, layout, grid
|
3 |
Requires at least: 4.4
|
4 |
Tested up to: 4.7.3
|
5 |
+
Stable tag: 2.4.25
|
6 |
+
Build time: 2017-04-19T17:12:54+02:00
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
9 |
Donate link: https://siteorigin.com/downloads/contribution/
|
96 |
|
97 |
== Changelog ==
|
98 |
|
99 |
+
= 2.5.2 - 19 April 2017 =
|
100 |
+
* Fixed RTL layouts for new flexbox layout.
|
101 |
+
* Renamed front.css to ensure cache busting.
|
102 |
+
* Allow cache with auto legacy layout.
|
103 |
+
* Use HTTPS for layout directory screenshots.
|
104 |
+
* Fixed namespaced widget escaping.
|
105 |
+
|
106 |
+
= 2.5.1 - 18 April 2017 =
|
107 |
* Added null function for Sydney theme compatibility.
|
108 |
* Added method for including additional external layout directories.
|
109 |
* Added fix for old Vantage PB layout compatibility.
|
siteorigin-panels.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Page Builder by SiteOrigin
|
4 |
Plugin URI: https://siteorigin.com/page-builder/
|
5 |
Description: A drag and drop, responsive page builder that simplifies building your website.
|
6 |
-
Version: 2.5.
|
7 |
Author: SiteOrigin
|
8 |
Author URI: https://siteorigin.com
|
9 |
License: GPL3
|
@@ -11,7 +11,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
|
|
11 |
Donate link: http://siteorigin.com/page-builder/#donate
|
12 |
*/
|
13 |
|
14 |
-
define( 'SITEORIGIN_PANELS_VERSION', '2.5.
|
15 |
if ( ! defined( 'SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
|
16 |
define( 'SITEORIGIN_PANELS_JS_SUFFIX', '.min' );
|
17 |
}
|
@@ -34,6 +34,7 @@ class SiteOrigin_Panels {
|
|
34 |
|
35 |
add_filter( 'body_class', array( $this, 'body_class' ) );
|
36 |
add_filter( 'siteorigin_panels_data', array( $this, 'process_panels_data' ), 5 );
|
|
|
37 |
|
38 |
if ( is_admin() ) {
|
39 |
// Setup all the admin classes
|
@@ -54,15 +55,18 @@ class SiteOrigin_Panels {
|
|
54 |
SiteOrigin_Panels::renderer();
|
55 |
SiteOrigin_Panels_Styles_Admin::single();
|
56 |
|
57 |
-
if( siteorigin_panels_setting( 'bundled-widgets' ) ) {
|
58 |
require_once plugin_dir_path( __FILE__ ) . 'widgets/widgets.php';
|
59 |
}
|
60 |
|
61 |
SiteOrigin_Panels_Widget_Shortcode::init();
|
62 |
-
SiteOrigin_Panels_Cache_Renderer::single();
|
63 |
|
64 |
-
if(
|
|
|
|
|
|
|
65 |
// We can use the cached content
|
|
|
66 |
add_filter( 'the_content', array( $this, 'cached_post_content' ), 1 ); // Run early to pretend to be post_content
|
67 |
add_filter( 'wp_head', array( $this, 'cached_post_css' ) );
|
68 |
add_filter( 'wp_enqueue_scripts', array( $this, 'cached_post_enqueue' ) );
|
@@ -461,6 +465,17 @@ class SiteOrigin_Panels {
|
|
461 |
|
462 |
return $panels_data;
|
463 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
464 |
|
465 |
public static function front_css_url(){
|
466 |
return self::renderer()->front_css_url();
|
3 |
Plugin Name: Page Builder by SiteOrigin
|
4 |
Plugin URI: https://siteorigin.com/page-builder/
|
5 |
Description: A drag and drop, responsive page builder that simplifies building your website.
|
6 |
+
Version: 2.5.2
|
7 |
Author: SiteOrigin
|
8 |
Author URI: https://siteorigin.com
|
9 |
License: GPL3
|
11 |
Donate link: http://siteorigin.com/page-builder/#donate
|
12 |
*/
|
13 |
|
14 |
+
define( 'SITEORIGIN_PANELS_VERSION', '2.5.2' );
|
15 |
if ( ! defined( 'SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
|
16 |
define( 'SITEORIGIN_PANELS_JS_SUFFIX', '.min' );
|
17 |
}
|
34 |
|
35 |
add_filter( 'body_class', array( $this, 'body_class' ) );
|
36 |
add_filter( 'siteorigin_panels_data', array( $this, 'process_panels_data' ), 5 );
|
37 |
+
add_filter( 'siteorigin_panels_widget_class', array( $this, 'fix_namespace_escaping' ), 5 );
|
38 |
|
39 |
if ( is_admin() ) {
|
40 |
// Setup all the admin classes
|
55 |
SiteOrigin_Panels::renderer();
|
56 |
SiteOrigin_Panels_Styles_Admin::single();
|
57 |
|
58 |
+
if( siteorigin_panels_setting( 'bundled-widgets' ) && ! function_exists( 'origin_widgets_init' ) ) {
|
59 |
require_once plugin_dir_path( __FILE__ ) . 'widgets/widgets.php';
|
60 |
}
|
61 |
|
62 |
SiteOrigin_Panels_Widget_Shortcode::init();
|
|
|
63 |
|
64 |
+
if(
|
65 |
+
apply_filters( 'siteorigin_panels_use_cached', siteorigin_panels_setting( 'cache-content' ) ) &&
|
66 |
+
( siteorigin_panels_setting( 'legacy-layout' ) != 'auto' || ! self::is_legacy_browser() )
|
67 |
+
) {
|
68 |
// We can use the cached content
|
69 |
+
SiteOrigin_Panels_Cache_Renderer::single();
|
70 |
add_filter( 'the_content', array( $this, 'cached_post_content' ), 1 ); // Run early to pretend to be post_content
|
71 |
add_filter( 'wp_head', array( $this, 'cached_post_css' ) );
|
72 |
add_filter( 'wp_enqueue_scripts', array( $this, 'cached_post_enqueue' ) );
|
465 |
|
466 |
return $panels_data;
|
467 |
}
|
468 |
+
|
469 |
+
/**
|
470 |
+
* Fix class names that have been incorrectly escaped
|
471 |
+
*
|
472 |
+
* @param $class
|
473 |
+
*
|
474 |
+
* @return mixed
|
475 |
+
*/
|
476 |
+
public function fix_namespace_escaping( $class ){
|
477 |
+
return preg_replace( '/\\\\+/', '\\', $class );
|
478 |
+
}
|
479 |
|
480 |
public static function front_css_url(){
|
481 |
return self::renderer()->front_css_url();
|
tpl/live-editor-preview.php
CHANGED
@@ -26,7 +26,7 @@ wp_enqueue_style( 'siteorigin-preview-style', plugin_dir_url( __FILE__ ) . '../c
|
|
26 |
method_exists( 'SiteOrigin_Widget_Field_Class_Loader', 'extend' )
|
27 |
)
|
28 |
) {
|
29 |
-
$data['widgets'] = SiteOrigin_Panels_Admin::single()->process_raw_widgets( $data['widgets'] );
|
30 |
}
|
31 |
echo siteorigin_panels_render( 'l' . md5( serialize( $data ) ), true, $data);
|
32 |
}
|
26 |
method_exists( 'SiteOrigin_Widget_Field_Class_Loader', 'extend' )
|
27 |
)
|
28 |
) {
|
29 |
+
$data['widgets'] = SiteOrigin_Panels_Admin::single()->process_raw_widgets( $data['widgets'], false, false );
|
30 |
}
|
31 |
echo siteorigin_panels_render( 'l' . md5( serialize( $data ) ), true, $data);
|
32 |
}
|
tpl/options.php
DELETED
@@ -1,97 +0,0 @@
|
|
1 |
-
<?php $settings = siteorigin_panels_setting(); ?>
|
2 |
-
|
3 |
-
<div class="wrap">
|
4 |
-
<div id="icon-options-general" class="icon32"><br></div>
|
5 |
-
<h2><?php _e('SiteOrigin Page Builder', 'siteorigin-panels') ?></h2>
|
6 |
-
|
7 |
-
<form action="<?php echo admin_url( 'options-general.php?page=siteorigin_panels' ) ?>" method="POST">
|
8 |
-
|
9 |
-
<pre><?php //var_dump($settings) ?></pre>
|
10 |
-
|
11 |
-
<h3><?php _e('General', 'siteorigin-panels') ?></h3>
|
12 |
-
<table class="form-table">
|
13 |
-
<tbody>
|
14 |
-
<tr>
|
15 |
-
<th scope="row"><strong><?php _e('Post Types', 'siteorigin-panels') ?></strong></th>
|
16 |
-
<td>
|
17 |
-
<?php siteorigin_panels_options_field_post_types($settings['post-types']) ?>
|
18 |
-
</td>
|
19 |
-
</tr>
|
20 |
-
|
21 |
-
<?php
|
22 |
-
siteorigin_panels_options_field(
|
23 |
-
'copy-content',
|
24 |
-
$settings['copy-content'],
|
25 |
-
__('Copy Content', 'siteorigin-panels'),
|
26 |
-
__('Copy content from Page Builder into the standard content editor.', 'siteorigin-panels')
|
27 |
-
);
|
28 |
-
|
29 |
-
siteorigin_panels_options_field(
|
30 |
-
'animations',
|
31 |
-
$settings['animations'],
|
32 |
-
__('Animations', 'siteorigin-panels'),
|
33 |
-
__('Disable animations for improved performance.', 'siteorigin-panels')
|
34 |
-
);
|
35 |
-
|
36 |
-
siteorigin_panels_options_field(
|
37 |
-
'bundled-widgets',
|
38 |
-
$settings['bundled-widgets'],
|
39 |
-
__('Bundled Widgets', 'siteorigin-panels'),
|
40 |
-
__('Include the bundled widgets.', 'siteorigin-panels')
|
41 |
-
);
|
42 |
-
|
43 |
-
?>
|
44 |
-
|
45 |
-
</tbody>
|
46 |
-
</table>
|
47 |
-
|
48 |
-
<h3><?php _e('Display', 'siteorigin-panels') ?></h3>
|
49 |
-
<table class="form-table">
|
50 |
-
<tbody>
|
51 |
-
|
52 |
-
<?php
|
53 |
-
|
54 |
-
siteorigin_panels_options_field(
|
55 |
-
'responsive',
|
56 |
-
$settings['responsive'],
|
57 |
-
__('Responsive Layout', 'siteorigin-panels'),
|
58 |
-
__('Should the layout collapse for mobile devices.', 'siteorigin-panels')
|
59 |
-
);
|
60 |
-
|
61 |
-
siteorigin_panels_options_field(
|
62 |
-
'mobile-width',
|
63 |
-
$settings['mobile-width'],
|
64 |
-
__('Mobile Width', 'siteorigin-panels')
|
65 |
-
);
|
66 |
-
|
67 |
-
siteorigin_panels_options_field(
|
68 |
-
'margin-bottom',
|
69 |
-
$settings['margin-bottom'],
|
70 |
-
__('Row Bottom Margin', 'siteorigin-panels')
|
71 |
-
);
|
72 |
-
|
73 |
-
siteorigin_panels_options_field(
|
74 |
-
'margin-sides',
|
75 |
-
$settings['margin-sides'],
|
76 |
-
__('Cell Side Margins', 'siteorigin-panels')
|
77 |
-
);
|
78 |
-
|
79 |
-
siteorigin_panels_options_field(
|
80 |
-
'inline-css',
|
81 |
-
$settings['inline-css'],
|
82 |
-
__('Inline CSS', 'siteorigin-panels')
|
83 |
-
);
|
84 |
-
|
85 |
-
?>
|
86 |
-
|
87 |
-
</tbody>
|
88 |
-
</table>
|
89 |
-
|
90 |
-
|
91 |
-
<?php wp_nonce_field('save_panels_settings'); ?>
|
92 |
-
<p class="submit">
|
93 |
-
<input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'siteorigin-panels') ?>"/>
|
94 |
-
</p>
|
95 |
-
|
96 |
-
</form>
|
97 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
widgets/basic.php
CHANGED
@@ -61,8 +61,7 @@ class SiteOrigin_Panels_Widgets_Layout extends WP_Widget {
|
|
61 |
if ( ! empty( $new['panels_data'] ) && ! empty( $new['panels_data']['widgets'] ) ) {
|
62 |
$new['panels_data']['widgets'] = SiteOrigin_Panels_Admin::single()->process_raw_widgets(
|
63 |
$new['panels_data']['widgets'],
|
64 |
-
! empty( $old['panels_data']['widgets'] ) ? $old['panels_data']['widgets'] : false
|
65 |
-
false
|
66 |
);
|
67 |
foreach( $new['panels_data']['widgets'] as & $widget ) {
|
68 |
$widget['panels_info']['class'] = str_replace( '\\', '\', $widget['panels_info']['class'] );
|
61 |
if ( ! empty( $new['panels_data'] ) && ! empty( $new['panels_data']['widgets'] ) ) {
|
62 |
$new['panels_data']['widgets'] = SiteOrigin_Panels_Admin::single()->process_raw_widgets(
|
63 |
$new['panels_data']['widgets'],
|
64 |
+
! empty( $old['panels_data']['widgets'] ) ? $old['panels_data']['widgets'] : false
|
|
|
65 |
);
|
66 |
foreach( $new['panels_data']['widgets'] as & $widget ) {
|
67 |
$widget['panels_info']['class'] = str_replace( '\\', '\', $widget['panels_info']['class'] );
|
widgets/widgets.php
CHANGED
@@ -155,15 +155,15 @@ abstract class SiteOrigin_Panels_Widget extends WP_Widget{
|
|
155 |
public function form($instance){
|
156 |
|
157 |
?>
|
158 |
-
<div
|
159 |
-
<
|
160 |
<?php
|
161 |
_e( 'This is a legacy widget. ', 'siteorigin-panels' );
|
162 |
_e( 'Ideally you should move to using widgets from the SiteOrigin Widgets Bundle instead. ', 'siteorigin-panels' );
|
163 |
_e( "It'll be moved to a separate plugin after Page Builder 2.6 is released. ", 'siteorigin-panels' );
|
164 |
echo '<a href="https://siteorigin.com/widgets-bundle/" target="_blank">' . __( 'Widgets Bundle', 'siteorigin-panels' ) . '</a>';
|
165 |
?>
|
166 |
-
</
|
167 |
</div>
|
168 |
<?php
|
169 |
|
155 |
public function form($instance){
|
156 |
|
157 |
?>
|
158 |
+
<div style="margin-bottom: 20px;">
|
159 |
+
<strong>
|
160 |
<?php
|
161 |
_e( 'This is a legacy widget. ', 'siteorigin-panels' );
|
162 |
_e( 'Ideally you should move to using widgets from the SiteOrigin Widgets Bundle instead. ', 'siteorigin-panels' );
|
163 |
_e( "It'll be moved to a separate plugin after Page Builder 2.6 is released. ", 'siteorigin-panels' );
|
164 |
echo '<a href="https://siteorigin.com/widgets-bundle/" target="_blank">' . __( 'Widgets Bundle', 'siteorigin-panels' ) . '</a>';
|
165 |
?>
|
166 |
+
</strong>
|
167 |
</div>
|
168 |
<?php
|
169 |
|