Version Description
Download this release
Release Info
Developer | danieliser |
Plugin | Popup Maker – Popup Forms, Optins & More |
Version | 1.4.7 |
Comparing to | |
See all releases |
Code changes from version 1.4.6 to 1.4.7
- assets/js/admin.js +70 -46
- assets/js/admin.min.js +2 -2
- assets/js/site.js +4 -4
- assets/js/site.min.js +1 -1
- includes/admin/popups/class-metabox-analytics.php +0 -2
- includes/admin/popups/class-metabox-conditions.php +19 -20
- includes/admin/popups/class-metabox-cookies.php +12 -12
- includes/admin/popups/class-metabox-triggers.php +12 -12
- includes/admin/post-editor.php +0 -188
- includes/admin/shortcode-ui/class-pum-admin-shortcode-ui.php +3 -3
- includes/admin/shortcode-ui/footer-scripts.php +8 -1
- includes/admin/shortcode-ui/templates/fields.php +49 -49
- includes/admin/shortcode-ui/templates/helpers.php +30 -30
- includes/class-popmake-fields.php +1 -1
- includes/class-pum-condition.php +1 -1
- includes/class-pum-cookie.php +2 -2
- includes/class-pum-fields.php +19 -23
- includes/class-pum-freemius.php +20 -21
- includes/pum-trigger-functions.php +2 -2
- includes/scripts.php +5 -0
- includes/shortcodes/class-pum-shortcode-popup-close.php +2 -2
- includes/shortcodes/class-pum-shortcode-popup-trigger.php +2 -2
- includes/shortcodes/class-pum-shortcode-popup.php +2 -2
- languages/popup-maker.pot +20 -33
- popup-maker.php +2 -3
- readme.txt +19 -14
assets/js/admin.js
CHANGED
@@ -103,13 +103,14 @@ var PUMConditions;
|
|
103 |
.ready(function () {
|
104 |
// TODO Remove this check once admin scripts have been split into popup-editor, theme-editor etc.
|
105 |
if ($('body.post-type-popup form#post').length) {
|
106 |
-
PUMConditions.templates.group =
|
107 |
-
PUMConditions.templates.facet =
|
108 |
PUMConditions.templates.settings = {};
|
109 |
|
110 |
-
$('script.
|
111 |
-
var $this = $(this)
|
112 |
-
|
|
|
113 |
});
|
114 |
|
115 |
PUMConditions.renumber();
|
@@ -205,7 +206,13 @@ var PUMCookies;
|
|
205 |
return I10n.labels.cookies[event].name;
|
206 |
},
|
207 |
getSettingsDesc: function (event, values) {
|
208 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
values.I10n = I10n;
|
210 |
return template(values);
|
211 |
},
|
@@ -259,8 +266,9 @@ var PUMCookies;
|
|
259 |
.on('select2:select', '#pum-first-cookie', function () {
|
260 |
var $this = $(this),
|
261 |
event = $this.val(),
|
262 |
-
id = '
|
263 |
-
|
|
|
264 |
data = {};
|
265 |
|
266 |
data.cookie_settings = defaults.cookies[event] !== undefined ? defaults.cookies[event] : {};
|
@@ -272,8 +280,8 @@ var PUMCookies;
|
|
272 |
alert('Something went wrong. Please refresh and try again.');
|
273 |
}
|
274 |
|
275 |
-
PUMModals.reload(
|
276 |
-
PUMCookies.initEditForm(
|
277 |
|
278 |
$this
|
279 |
.val(null)
|
@@ -282,15 +290,16 @@ var PUMCookies;
|
|
282 |
.on('click', '.field.cookiekey button.reset', PUMCookies.resetCookieKey)
|
283 |
.on('click', '.cookie-editor .pum-form .field.checkbox.session', PUMCookies.updateSessionsCheckbox)
|
284 |
.on('click', '#pum_popup_cookies .add-new', function () {
|
285 |
-
var template =
|
286 |
PUMModals.reload('#pum_cookie_add_event_modal', template());
|
287 |
})
|
288 |
.on('click', '#pum_popup_cookies_list .edit', function (e) {
|
289 |
var $this = $(this),
|
290 |
$row = $this.parents('tr:first'),
|
291 |
event = $row.find('.popup_cookies_field_event').val(),
|
292 |
-
id = '
|
293 |
-
|
|
|
294 |
data = {
|
295 |
index: $row.parent().children().index($row),
|
296 |
event: event,
|
@@ -305,7 +314,7 @@ var PUMCookies;
|
|
305 |
alert('Something went wrong. Please refresh and try again.');
|
306 |
}
|
307 |
|
308 |
-
PUMModals.reload(
|
309 |
PUMCookies.initEditForm();
|
310 |
})
|
311 |
.on('click', '#pum_popup_cookies_list .remove', function (e) {
|
@@ -330,8 +339,9 @@ var PUMCookies;
|
|
330 |
})
|
331 |
.on('submit', '#pum_cookie_add_event_modal .pum-form', function (e) {
|
332 |
var event = $('#popup_cookie_add_event').val(),
|
333 |
-
id = '
|
334 |
-
|
|
|
335 |
data = {};
|
336 |
|
337 |
e.preventDefault();
|
@@ -345,8 +355,8 @@ var PUMCookies;
|
|
345 |
alert('Something went wrong. Please refresh and try again.');
|
346 |
}
|
347 |
|
348 |
-
PUMModals.reload(
|
349 |
-
PUMCookies.initEditForm(
|
350 |
})
|
351 |
.on('submit', '.cookie-editor .pum-form', function (e) {
|
352 |
var $form = $(this),
|
@@ -354,7 +364,7 @@ var PUMCookies;
|
|
354 |
values = $form.serializeObject(),
|
355 |
index = parseInt(values.index),
|
356 |
$row = index >= 0 ? $('#pum_popup_cookies_list tbody tr').eq(index) : null,
|
357 |
-
template =
|
358 |
$new_row,
|
359 |
$trigger,
|
360 |
trigger_settings;
|
@@ -382,6 +392,7 @@ var PUMCookies;
|
|
382 |
|
383 |
if (PUMTriggers.new_cookie && PUMTriggers.new_cookie >= 0) {
|
384 |
$trigger = $('#pum_popup_triggers_list tbody tr').eq(PUMTriggers.new_cookie).find('.popup_triggers_field_settings:first');
|
|
|
385 |
trigger_settings = JSON.parse($trigger.val());
|
386 |
trigger_settings.cookie.name[trigger_settings.cookie.name.indexOf('add_new')] = values.cookie_settings.name;
|
387 |
|
@@ -697,8 +708,8 @@ function pumSelected(val1, val2, print) {
|
|
697 |
selected = true;
|
698 |
}
|
699 |
|
700 |
-
if (
|
701 |
-
return ' selected="selected"';
|
702 |
}
|
703 |
return selected;
|
704 |
}
|
@@ -715,8 +726,8 @@ function pumChecked(val1, val2, print) {
|
|
715 |
checked = true;
|
716 |
}
|
717 |
|
718 |
-
if (
|
719 |
-
return ' checked="checked"';
|
720 |
}
|
721 |
return checked;
|
722 |
}
|
@@ -1016,6 +1027,8 @@ var PUMRangeSLiders;
|
|
1016 |
var PUMSelect2Fields;
|
1017 |
(function ($, document, undefined) {
|
1018 |
"use strict";
|
|
|
|
|
1019 |
|
1020 |
PUMSelect2Fields = {
|
1021 |
init: function () {
|
@@ -1076,7 +1089,7 @@ var PUMSelect2Fields;
|
|
1076 |
|
1077 |
$this
|
1078 |
.addClass('initialized')
|
1079 |
-
.
|
1080 |
|
1081 |
if (current !== undefined) {
|
1082 |
|
@@ -1261,7 +1274,7 @@ var PUM_Templates;
|
|
1261 |
|
1262 |
PUM_Templates = {
|
1263 |
render: function (template, data) {
|
1264 |
-
var _template =
|
1265 |
|
1266 |
if ('object' === typeof data.classes) {
|
1267 |
data.classes = data.classes.join(' ');
|
@@ -1279,7 +1292,7 @@ var PUM_Templates;
|
|
1279 |
has_content: false,
|
1280 |
content: ''
|
1281 |
}, args),
|
1282 |
-
template = data.has_content ? '
|
1283 |
|
1284 |
return PUM_Templates.render(template, data);
|
1285 |
},
|
@@ -1294,7 +1307,7 @@ var PUM_Templates;
|
|
1294 |
content: ''
|
1295 |
}, args);
|
1296 |
|
1297 |
-
return PUM_Templates.render('
|
1298 |
},
|
1299 |
tabs: function (args) {
|
1300 |
var classes = args.classes || [],
|
@@ -1320,7 +1333,7 @@ var PUM_Templates;
|
|
1320 |
|
1321 |
data.classes = data.classes + ' ' + classes.join(' ');
|
1322 |
|
1323 |
-
return PUM_Templates.render('
|
1324 |
},
|
1325 |
section: function (args) {
|
1326 |
var data = $.extend(true, {}, {
|
@@ -1329,10 +1342,10 @@ var PUM_Templates;
|
|
1329 |
}, args);
|
1330 |
|
1331 |
|
1332 |
-
return PUM_Templates.render('
|
1333 |
},
|
1334 |
field: function (args) {
|
1335 |
-
var fieldTemplate = '
|
1336 |
options = [],
|
1337 |
data = $.extend(true, {}, {
|
1338 |
type: 'text',
|
@@ -1360,11 +1373,11 @@ var PUM_Templates;
|
|
1360 |
meta: {}
|
1361 |
}, args);
|
1362 |
|
1363 |
-
if (!$(fieldTemplate).length) {
|
1364 |
if (args.type === 'objectselect' || args.type === 'postselect' || args.type === 'taxonomyselect') {
|
1365 |
-
fieldTemplate = '
|
1366 |
}
|
1367 |
-
if (!$(fieldTemplate).length) {
|
1368 |
return '';
|
1369 |
}
|
1370 |
}
|
@@ -1487,7 +1500,7 @@ var PUM_Templates;
|
|
1487 |
|
1488 |
data.field = PUM_Templates.render(fieldTemplate, data);
|
1489 |
|
1490 |
-
return PUM_Templates.render('
|
1491 |
},
|
1492 |
prepareMeta: function (data) {
|
1493 |
// Convert meta JSON to attribute string.
|
@@ -1528,7 +1541,13 @@ var PUMTriggers;
|
|
1528 |
return I10n.labels.triggers[type].name;
|
1529 |
},
|
1530 |
getSettingsDesc: function (type, values) {
|
1531 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
1532 |
values.I10n = I10n;
|
1533 |
return template(values);
|
1534 |
},
|
@@ -1591,8 +1610,9 @@ var PUMTriggers;
|
|
1591 |
.on('select2:select', '#pum-first-trigger', function () {
|
1592 |
var $this = $(this),
|
1593 |
type = $this.val(),
|
1594 |
-
id = '
|
1595 |
-
|
|
|
1596 |
data = {};
|
1597 |
|
1598 |
data.trigger_settings = defaults.triggers[type] !== undefined ? defaults.triggers[type] : {};
|
@@ -1603,7 +1623,7 @@ var PUMTriggers;
|
|
1603 |
alert('Something went wrong. Please refresh and try again.');
|
1604 |
}
|
1605 |
|
1606 |
-
PUMModals.reload(
|
1607 |
PUMTriggers.initEditForm(data);
|
1608 |
|
1609 |
$this
|
@@ -1611,15 +1631,17 @@ var PUMTriggers;
|
|
1611 |
.trigger('change');
|
1612 |
})
|
1613 |
.on('click', '#pum_popup_triggers .add-new', function () {
|
1614 |
-
var template =
|
1615 |
PUMModals.reload('#pum_trigger_add_type_modal', template());
|
1616 |
})
|
1617 |
.on('click', '#pum_popup_triggers_list .edit', function (e) {
|
|
|
1618 |
var $this = $(this),
|
1619 |
$row = $this.parents('tr:first'),
|
1620 |
type = $row.find('.popup_triggers_field_type').val(),
|
1621 |
-
id = '
|
1622 |
-
|
|
|
1623 |
data = {
|
1624 |
index: $row.parent().children().index($row),
|
1625 |
type: type,
|
@@ -1634,7 +1656,7 @@ var PUMTriggers;
|
|
1634 |
alert('Something went wrong. Please refresh and try again.');
|
1635 |
}
|
1636 |
|
1637 |
-
PUMModals.reload(
|
1638 |
PUMTriggers.initEditForm(data);
|
1639 |
})
|
1640 |
.on('click', '#pum_popup_triggers_list .remove', function (e) {
|
@@ -1658,8 +1680,9 @@ var PUMTriggers;
|
|
1658 |
})
|
1659 |
.on('submit', '#pum_trigger_add_type_modal .pum-form', function (e) {
|
1660 |
var type = $('#popup_trigger_add_type').val(),
|
1661 |
-
id = '
|
1662 |
-
|
|
|
1663 |
data = {};
|
1664 |
|
1665 |
e.preventDefault();
|
@@ -1672,7 +1695,7 @@ var PUMTriggers;
|
|
1672 |
alert('Something went wrong. Please refresh and try again.');
|
1673 |
}
|
1674 |
|
1675 |
-
PUMModals.reload(
|
1676 |
PUMTriggers.initEditForm(data);
|
1677 |
})
|
1678 |
.on('submit', '.trigger-editor .pum-form', function (e) {
|
@@ -1681,7 +1704,7 @@ var PUMTriggers;
|
|
1681 |
values = $form.serializeObject(),
|
1682 |
index = parseInt(values.index),
|
1683 |
$row = index >= 0 ? $('#pum_popup_triggers_list tbody tr').eq(index) : null,
|
1684 |
-
template =
|
1685 |
$new_row;
|
1686 |
|
1687 |
e.preventDefault();
|
@@ -1702,6 +1725,7 @@ var PUMTriggers;
|
|
1702 |
|
1703 |
PUMModals.closeAll();
|
1704 |
PUMTriggers.renumber();
|
|
|
1705 |
|
1706 |
$('#pum_popup_trigger_fields').addClass('has-triggers');
|
1707 |
|
103 |
.ready(function () {
|
104 |
// TODO Remove this check once admin scripts have been split into popup-editor, theme-editor etc.
|
105 |
if ($('body.post-type-popup form#post').length) {
|
106 |
+
PUMConditions.templates.group = wp.template('pum-condition-group');
|
107 |
+
PUMConditions.templates.facet = wp.template('pum-condition-facet');
|
108 |
PUMConditions.templates.settings = {};
|
109 |
|
110 |
+
$('script.tmpl.pum-condition-settings').each(function () {
|
111 |
+
var $this = $(this),
|
112 |
+
tmpl = $this.attr('id').replace('tmpl-', '');
|
113 |
+
PUMConditions.templates.settings[$this.data('condition')] = wp.template(tmpl);
|
114 |
});
|
115 |
|
116 |
PUMConditions.renumber();
|
206 |
return I10n.labels.cookies[event].name;
|
207 |
},
|
208 |
getSettingsDesc: function (event, values) {
|
209 |
+
var options = {
|
210 |
+
evaluate: /<#([\s\S]+?)#>/g,
|
211 |
+
interpolate: /\{\{\{([\s\S]+?)\}\}\}/g,
|
212 |
+
escape: /\{\{([^\}]+?)\}\}(?!\})/g,
|
213 |
+
variable: 'data'
|
214 |
+
},
|
215 |
+
template = _.template(I10n.labels.cookies[event].settings_column, null, options);
|
216 |
values.I10n = I10n;
|
217 |
return template(values);
|
218 |
},
|
266 |
.on('select2:select', '#pum-first-cookie', function () {
|
267 |
var $this = $(this),
|
268 |
event = $this.val(),
|
269 |
+
id = 'pum-cookie-settings-' + event,
|
270 |
+
modalID = '#' + id.replace(/-/g,'_'),
|
271 |
+
template = wp.template(id),
|
272 |
data = {};
|
273 |
|
274 |
data.cookie_settings = defaults.cookies[event] !== undefined ? defaults.cookies[event] : {};
|
280 |
alert('Something went wrong. Please refresh and try again.');
|
281 |
}
|
282 |
|
283 |
+
PUMModals.reload(modalID, template(data));
|
284 |
+
PUMCookies.initEditForm();
|
285 |
|
286 |
$this
|
287 |
.val(null)
|
290 |
.on('click', '.field.cookiekey button.reset', PUMCookies.resetCookieKey)
|
291 |
.on('click', '.cookie-editor .pum-form .field.checkbox.session', PUMCookies.updateSessionsCheckbox)
|
292 |
.on('click', '#pum_popup_cookies .add-new', function () {
|
293 |
+
var template = wp.template('pum-cookie-add-event');
|
294 |
PUMModals.reload('#pum_cookie_add_event_modal', template());
|
295 |
})
|
296 |
.on('click', '#pum_popup_cookies_list .edit', function (e) {
|
297 |
var $this = $(this),
|
298 |
$row = $this.parents('tr:first'),
|
299 |
event = $row.find('.popup_cookies_field_event').val(),
|
300 |
+
id = 'pum-cookie-settings-' + event,
|
301 |
+
modalID = '#' + id.replace(/-/g, '_'),
|
302 |
+
template = wp.template(id),
|
303 |
data = {
|
304 |
index: $row.parent().children().index($row),
|
305 |
event: event,
|
314 |
alert('Something went wrong. Please refresh and try again.');
|
315 |
}
|
316 |
|
317 |
+
PUMModals.reload(modalID, template(data));
|
318 |
PUMCookies.initEditForm();
|
319 |
})
|
320 |
.on('click', '#pum_popup_cookies_list .remove', function (e) {
|
339 |
})
|
340 |
.on('submit', '#pum_cookie_add_event_modal .pum-form', function (e) {
|
341 |
var event = $('#popup_cookie_add_event').val(),
|
342 |
+
id = 'pum-cookie-settings-' + event,
|
343 |
+
modalID = '#' + id.replace(/-/g,'_'),
|
344 |
+
template = wp.template(id),
|
345 |
data = {};
|
346 |
|
347 |
e.preventDefault();
|
355 |
alert('Something went wrong. Please refresh and try again.');
|
356 |
}
|
357 |
|
358 |
+
PUMModals.reload(modalID, template(data));
|
359 |
+
PUMCookies.initEditForm();
|
360 |
})
|
361 |
.on('submit', '.cookie-editor .pum-form', function (e) {
|
362 |
var $form = $(this),
|
364 |
values = $form.serializeObject(),
|
365 |
index = parseInt(values.index),
|
366 |
$row = index >= 0 ? $('#pum_popup_cookies_list tbody tr').eq(index) : null,
|
367 |
+
template = wp.template('pum-cookie-row'),
|
368 |
$new_row,
|
369 |
$trigger,
|
370 |
trigger_settings;
|
392 |
|
393 |
if (PUMTriggers.new_cookie && PUMTriggers.new_cookie >= 0) {
|
394 |
$trigger = $('#pum_popup_triggers_list tbody tr').eq(PUMTriggers.new_cookie).find('.popup_triggers_field_settings:first');
|
395 |
+
console.log($trigger, $trigger.val());
|
396 |
trigger_settings = JSON.parse($trigger.val());
|
397 |
trigger_settings.cookie.name[trigger_settings.cookie.name.indexOf('add_new')] = values.cookie_settings.name;
|
398 |
|
708 |
selected = true;
|
709 |
}
|
710 |
|
711 |
+
if (print !== undefined && print) {
|
712 |
+
return selected ? ' selected="selected"' : '';
|
713 |
}
|
714 |
return selected;
|
715 |
}
|
726 |
checked = true;
|
727 |
}
|
728 |
|
729 |
+
if (print !== undefined && print) {
|
730 |
+
return checked ? ' checked="checked"' : '';
|
731 |
}
|
732 |
return checked;
|
733 |
}
|
1027 |
var PUMSelect2Fields;
|
1028 |
(function ($, document, undefined) {
|
1029 |
"use strict";
|
1030 |
+
// Here because some plugins load additional copies, big no-no. This is the best we can do.
|
1031 |
+
$.fn.pumSelect2 = $.fn.select2;
|
1032 |
|
1033 |
PUMSelect2Fields = {
|
1034 |
init: function () {
|
1089 |
|
1090 |
$this
|
1091 |
.addClass('initialized')
|
1092 |
+
.pumSelect2(options);
|
1093 |
|
1094 |
if (current !== undefined) {
|
1095 |
|
1274 |
|
1275 |
PUM_Templates = {
|
1276 |
render: function (template, data) {
|
1277 |
+
var _template = wp.template(template);
|
1278 |
|
1279 |
if ('object' === typeof data.classes) {
|
1280 |
data.classes = data.classes.join(' ');
|
1292 |
has_content: false,
|
1293 |
content: ''
|
1294 |
}, args),
|
1295 |
+
template = data.has_content ? 'pum-shortcode-w-content' : 'pum-shortcode';
|
1296 |
|
1297 |
return PUM_Templates.render(template, data);
|
1298 |
},
|
1307 |
content: ''
|
1308 |
}, args);
|
1309 |
|
1310 |
+
return PUM_Templates.render('pum-modal', data);
|
1311 |
},
|
1312 |
tabs: function (args) {
|
1313 |
var classes = args.classes || [],
|
1333 |
|
1334 |
data.classes = data.classes + ' ' + classes.join(' ');
|
1335 |
|
1336 |
+
return PUM_Templates.render('pum-tabs', data);
|
1337 |
},
|
1338 |
section: function (args) {
|
1339 |
var data = $.extend(true, {}, {
|
1342 |
}, args);
|
1343 |
|
1344 |
|
1345 |
+
return PUM_Templates.render('pum-field-section', data);
|
1346 |
},
|
1347 |
field: function (args) {
|
1348 |
+
var fieldTemplate = 'pum-field-' + args.type,
|
1349 |
options = [],
|
1350 |
data = $.extend(true, {}, {
|
1351 |
type: 'text',
|
1373 |
meta: {}
|
1374 |
}, args);
|
1375 |
|
1376 |
+
if (!$('#tmpl-' + fieldTemplate).length) {
|
1377 |
if (args.type === 'objectselect' || args.type === 'postselect' || args.type === 'taxonomyselect') {
|
1378 |
+
fieldTemplate = 'pum-field-select';
|
1379 |
}
|
1380 |
+
if (!$('#tmpl-' + fieldTemplate).length) {
|
1381 |
return '';
|
1382 |
}
|
1383 |
}
|
1500 |
|
1501 |
data.field = PUM_Templates.render(fieldTemplate, data);
|
1502 |
|
1503 |
+
return PUM_Templates.render('pum-field-wrapper', data);
|
1504 |
},
|
1505 |
prepareMeta: function (data) {
|
1506 |
// Convert meta JSON to attribute string.
|
1541 |
return I10n.labels.triggers[type].name;
|
1542 |
},
|
1543 |
getSettingsDesc: function (type, values) {
|
1544 |
+
var options = {
|
1545 |
+
evaluate: /<#([\s\S]+?)#>/g,
|
1546 |
+
interpolate: /\{\{\{([\s\S]+?)\}\}\}/g,
|
1547 |
+
escape: /\{\{([^\}]+?)\}\}(?!\})/g,
|
1548 |
+
variable: 'data'
|
1549 |
+
},
|
1550 |
+
template = _.template(I10n.labels.triggers[type].settings_column, null, options);
|
1551 |
values.I10n = I10n;
|
1552 |
return template(values);
|
1553 |
},
|
1610 |
.on('select2:select', '#pum-first-trigger', function () {
|
1611 |
var $this = $(this),
|
1612 |
type = $this.val(),
|
1613 |
+
id = 'pum-trigger-settings-' + type,
|
1614 |
+
modalID = '#' + id.replace(/-/g,'_'),
|
1615 |
+
template = wp.template(id),
|
1616 |
data = {};
|
1617 |
|
1618 |
data.trigger_settings = defaults.triggers[type] !== undefined ? defaults.triggers[type] : {};
|
1623 |
alert('Something went wrong. Please refresh and try again.');
|
1624 |
}
|
1625 |
|
1626 |
+
PUMModals.reload(modalID, template(data));
|
1627 |
PUMTriggers.initEditForm(data);
|
1628 |
|
1629 |
$this
|
1631 |
.trigger('change');
|
1632 |
})
|
1633 |
.on('click', '#pum_popup_triggers .add-new', function () {
|
1634 |
+
var template = wp.template('pum-trigger-add-type');
|
1635 |
PUMModals.reload('#pum_trigger_add_type_modal', template());
|
1636 |
})
|
1637 |
.on('click', '#pum_popup_triggers_list .edit', function (e) {
|
1638 |
+
|
1639 |
var $this = $(this),
|
1640 |
$row = $this.parents('tr:first'),
|
1641 |
type = $row.find('.popup_triggers_field_type').val(),
|
1642 |
+
id = 'pum-trigger-settings-' + type,
|
1643 |
+
modalID = '#' + id.replace(/-/g,'_'),
|
1644 |
+
template = wp.template(id),
|
1645 |
data = {
|
1646 |
index: $row.parent().children().index($row),
|
1647 |
type: type,
|
1656 |
alert('Something went wrong. Please refresh and try again.');
|
1657 |
}
|
1658 |
|
1659 |
+
PUMModals.reload(modalID, template(data));
|
1660 |
PUMTriggers.initEditForm(data);
|
1661 |
})
|
1662 |
.on('click', '#pum_popup_triggers_list .remove', function (e) {
|
1680 |
})
|
1681 |
.on('submit', '#pum_trigger_add_type_modal .pum-form', function (e) {
|
1682 |
var type = $('#popup_trigger_add_type').val(),
|
1683 |
+
id = 'pum-trigger-settings-' + type,
|
1684 |
+
modalID = '#' + id.replace(/-/g,'_'),
|
1685 |
+
template = wp.template(id),
|
1686 |
data = {};
|
1687 |
|
1688 |
e.preventDefault();
|
1695 |
alert('Something went wrong. Please refresh and try again.');
|
1696 |
}
|
1697 |
|
1698 |
+
PUMModals.reload(modalID, template(data));
|
1699 |
PUMTriggers.initEditForm(data);
|
1700 |
})
|
1701 |
.on('submit', '.trigger-editor .pum-form', function (e) {
|
1704 |
values = $form.serializeObject(),
|
1705 |
index = parseInt(values.index),
|
1706 |
$row = index >= 0 ? $('#pum_popup_triggers_list tbody tr').eq(index) : null,
|
1707 |
+
template = wp.template('pum-trigger-row'),
|
1708 |
$new_row;
|
1709 |
|
1710 |
e.preventDefault();
|
1725 |
|
1726 |
PUMModals.closeAll();
|
1727 |
PUMTriggers.renumber();
|
1728 |
+
PUMTriggers.refreshDescriptions();
|
1729 |
|
1730 |
$('#pum_popup_trigger_fields').addClass('has-triggers');
|
1731 |
|
assets/js/admin.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
function pumSelected(e,t,o){"use strict";var i=!1;return"object"==typeof e&&"string"==typeof t&&-1!==jQuery.inArray(t,e)?i=!0:"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)?i=!0:e===t&&(i=!0),i&&void 0!==o&&o?' selected="selected"':i}function pumChecked(e,t,o){"use strict";var i=!1;return"object"==typeof e&&"string"==typeof t&&-1!==jQuery.inArray(t,e)?i=!0:"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)?i=!0:e===t&&(i=!0),i&&void 0!==o&&o?' checked="checked"':i}!function(e,t,o){"use strict";e(t).on("click","#popup_reset_open_count",function(){var t=e(this);t.is(":checked")&&!confirm(pum_admin.I10n.confirm_count_reset)&&t.prop("checked",!1)})}(jQuery,document);var PUMColorPickers;!function(e,t,o){"use strict";PUMColorPickers={init:function(){e(".color-picker").filter(":not(.initialized)").addClass("initialized").wpColorPicker({change:function(t){var o=e(this),i=e(t.currentTarget);i.hasClass("background-color")&&i.parents("table").find(".background-opacity").show(),o.trigger("change.update"),"popup_theme"===e("form#post input#post_type").val()&&PopMakeAdmin.update_theme()},clear:function(t){var o=e(t.currentTarget).prev();o.hasClass("background-color")&&o.parents("table").find(".background-opacity").hide(),e(this).prev("input").trigger("change.clear").wpColorPicker("close"),"popup_theme"===e("form#post input#post_type").val()&&PopMakeAdmin.update_theme()}})}},e(t).on("click",".iris-palette",function(){e(this).parents(".wp-picker-active").find("input.color-picker").trigger("change"),setTimeout(PopMakeAdmin.update_theme,500)}).on("pum_init",PUMColorPickers.init)}(jQuery,document);var PUMConditions;!function(e,t,o){"use strict";PUMConditions={templates:{},addGroup:function(o,i){var n=e("#pum-popup-conditions"),a={index:n.find(".facet-group-wrap").length,conditions:[{target:o||null,not_operand:i||!1,settings:{}}]};n.find(".facet-groups").append(PUMConditions.templates.group(a)),n.find(".facet-builder").addClass("has-conditions"),e(t).trigger("pum_init")},renumber:function(){e("#pum-popup-conditions .facet-group-wrap").each(function(){var t=e(this),o=t.parent().children().index(t);t.data("index",o).find(".facet").each(function(){var t=e(this),i=t.parent().children().index(t);t.data("index",i).find("[name]").each(function(){var e="popup_conditions["+o+"]["+i+"]";this.name=this.name.replace(/popup_conditions\[\d*?\]\[\d*?\]/,e),this.id=this.name})})})}},e(t).on("pum_init",PUMConditions.renumber).ready(function(){e("body.post-type-popup form#post").length&&(PUMConditions.templates.group=_.template(e("#pum_condition_group_templ").text()),PUMConditions.templates.facet=_.template(e("#pum_condition_facet_templ").text()),PUMConditions.templates.settings={},e("script.templ.pum-condition-settings").each(function(){var t=e(this);PUMConditions.templates.settings[t.data("condition")]=_.template(t.text())}),PUMConditions.renumber())}).on("select2:select","#pum-first-condition",function(){var t=e(this),o=t.val(),i=e("#pum-first-condition-operand"),n=i.is(":checked")?i.val():null;PUMConditions.addGroup(o,n),t.val(null).trigger("change"),i.prop("checked",!1).parents(".pum-condition-target").removeClass("not-operand-checked")}).on("click","#pum-popup-conditions .pum-not-operand",function(){var t=e(this),o=t.find("input"),i=t.parents(".pum-condition-target");o.is(":checked")?(i.removeClass("not-operand-checked"),o.prop("checked",!1)):(i.addClass("not-operand-checked"),o.prop("checked",!0))}).on("change","#pum-popup-conditions select.target",function(){var i=e(this),n=i.val(),a={index:i.parents(".facet-group").find(".facet").length,target:n,settings:{}};""!==n&&n!==i.parents(".facet").data("target")&&PUMConditions.templates.settings[n]!==o&&(i.parents(".facet").data("target",n).find(".facet-settings").html(PUMConditions.templates.settings[n](a)),e(t).trigger("pum_init"))}).on("click","#pum-popup-conditions .facet-group-wrap:last-child .and .add-facet",PUMConditions.addGroup).on("click","#pum-popup-conditions .add-or .add-facet:not(.disabled)",function(){var o=e(this),i=o.parents(".facet-group-wrap"),n={group:i.data("index"),index:i.find(".facet").length,target:null,settings:{}};i.find(".facet-list").append(PUMConditions.templates.facet(n)),e(t).trigger("pum_init")}).on("click","#pum-popup-conditions .remove-facet",function(){var t=e(this),o=e("#pum-popup-conditions"),i=t.parents(".facet"),n=t.parents(".facet-group-wrap");i.remove(),0===n.find(".facet").length&&(n.prev(".facet-group-wrap").find(".and .add-facet").removeClass("disabled"),n.remove(),0===o.find(".facet-group-wrap").length&&o.find(".facet-builder").removeClass("has-conditions")),PUMConditions.renumber()})}(jQuery,document);var PUMCookies;!function(e,t,o){"use strict";var i=pum_admin.I10n,n=pum_admin.defaults;PUMCookies={getLabel:function(e){return i.labels.cookies[e].name},getSettingsDesc:function(e,t){var o=_.template(i.labels.cookies[e].settings_column);return t.I10n=i,o(t)},renumber:function(){e("#pum_popup_cookies_list tbody tr").each(function(){var t=e(this),o=t.parent().children().index(t),i=t.data("index");t.data("index",o),t.find("[name]").each(function(){var e="["+o+"]";this.name=this.name.replace("["+i+"]",e).replace("[]",e)})})},refreshDescriptions:function(){e("#pum_popup_cookies_list tbody tr").each(function(){var t=e(this),o=t.find(".popup_cookies_field_event").val(),i=JSON.parse(t.find(".popup_cookies_field_settings:first").val());t.find("td.settings-column").html(PUMCookies.getSettingsDesc(o,i))})},initEditForm:function(){PUMCookies.updateSessionsCheckbox()},updateSessionsCheckbox:function(){var t=e(".cookie-editor .pum-form"),o=t.find('.field.checkbox.session input[type="checkbox"]').is(":checked"),i=t.find(".field").filter(".time");o?i.hide():i.show()},resetCookieKey:function(){var t=e(this),o=(new Date).getTime().toString(16);t.parents(".pum-form").find(".field.text.name").data("cookiekey",o),t.siblings('input[type="text"]:first').val(o)}},e(t).on("select2:select","#pum-first-cookie",function(){var t=e(this),a=t.val(),s="#pum_cookie_settings_"+a,r=_.template(e("script"+s+"_templ").html()),p={};p.cookie_settings=n.cookies[a]!==o?n.cookies[a]:{},p.cookie_settings.name="pum-"+e("#post_ID").val(),p.save_button_text=i.add,p.index=null,r.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(s,r(p)),PUMCookies.initEditForm(s),t.val(null).trigger("change")}).on("click",".field.cookiekey button.reset",PUMCookies.resetCookieKey).on("click",".cookie-editor .pum-form .field.checkbox.session",PUMCookies.updateSessionsCheckbox).on("click","#pum_popup_cookies .add-new",function(){var t=_.template(e("script#pum_cookie_add_event_templ").html());PUMModals.reload("#pum_cookie_add_event_modal",t())}).on("click","#pum_popup_cookies_list .edit",function(t){var o=e(this),n=o.parents("tr:first"),a=n.find(".popup_cookies_field_event").val(),s="#pum_cookie_settings_"+a,r=_.template(e("script"+s+"_templ").html()),p={index:n.parent().children().index(n),event:a,cookie_settings:JSON.parse(n.find(".popup_cookies_field_settings:first").val())};t.preventDefault(),p.save_button_text=i.save,r.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(s,r(p)),PUMCookies.initEditForm()}).on("click","#pum_popup_cookies_list .remove",function(t){var o=e(this),n=o.parents("tr:first");t.preventDefault(),window.confirm(i.confirm_delete_cookie)&&(n.remove(),e("#pum_popup_cookies_list tbody tr").length||(e("#pum-first-cookie").val(null).trigger("change"),e("#pum_popup_cookie_fields").removeClass("has-cookies")),PUMCookies.renumber())}).on("submit","#pum_cookie_add_event_modal .pum-form",function(t){var a=e("#popup_cookie_add_event").val(),s="#pum_cookie_settings_"+a,r=_.template(e("script"+s+"_templ").html()),p={};t.preventDefault(),p.cookie_settings=n.cookies[a]!==o?n.cookies[a]:{},p.cookie_settings.name="pum-"+e("#post_ID").val(),p.save_button_text=i.add,p.index=null,r.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(s,r(p)),PUMCookies.initEditForm(s)}).on("submit",".cookie-editor .pum-form",function(t){var o,n,a,s=e(this),r=(s.find("input.event").val(),s.serializeObject()),p=parseInt(r.index),l=p>=0?e("#pum_popup_cookies_list tbody tr").eq(p):null,c=_.template(e("script#pum_cookie_row_templ").html());t.preventDefault(),(!p||0>p)&&(r.index=e("#pum_popup_cookies_list tbody tr").length),r.I10n=i,o=c(r),l?l.replaceWith(o):e("#pum_popup_cookies_list tbody").append(o),PUMModals.closeAll(),PUMCookies.renumber(),e("#pum_popup_cookie_fields").addClass("has-cookies"),PUMTriggers.new_cookie&&PUMTriggers.new_cookie>=0&&(n=e("#pum_popup_triggers_list tbody tr").eq(PUMTriggers.new_cookie).find(".popup_triggers_field_settings:first"),a=JSON.parse(n.val()),a.cookie.name[a.cookie.name.indexOf("add_new")]=r.cookie_settings.name,n.val(JSON.stringify(a)),PUMTriggers.new_cookie=-1,PUMTriggers.refreshDescriptions())}).ready(function(){PUMCookies.refreshDescriptions(),e("#pum-first-cookie").val(null).trigger("change")})}(jQuery,document),function(e,t,o){"use strict";var i={init:function(){e("#popmake_popup_auto_open_fields, #popmake_popup_targeting_condition_fields").length&&(i.initialize_popup_page(),i.attachQuickSearchListeners(),i.attachTabsPanelListeners())},attachTabsPanelListeners:function(){e("#poststuff").bind("click",function(t){var o,i,n,a,s,r,p,l,c,u,d,_,m,f,h=e(t.target);if(h.hasClass("nav-tab-link"))i=h.data("type"),n=h.parents(".posttypediv, .taxonomydiv").first(),e("input",n).removeAttr("checked"),e(".tabs-panel-active",n).removeClass("tabs-panel-active").addClass("tabs-panel-inactive"),e("#"+i,n).removeClass("tabs-panel-inactive").addClass("tabs-panel-active"),e(".tabs",n).removeClass("tabs"),h.parent().addClass("tabs"),e(".quick-search",n).focus(),t.preventDefault();else if(h.hasClass("select-all"))o=/#(.*)$/.exec(t.target.href),o&&o[1]&&(a=e("#"+o[1]+" .tabs-panel-active .menu-item-title input"),a.length===a.filter(":checked").length?a.removeAttr("checked"):a.prop("checked",!0));else if(h.hasClass("submit-add-to-menu")){for(s=h.parents(".options"),r=e('.tabs-panel-active input[type="checkbox"]:checked',s),p=e("textarea",s),l=e(".tagchecklist",s),c=p.val().split(","),u=0;u<c.length;u+=1)c[u]=parseInt(c[u],10);r.each(function(){d=e(this),_=parseInt(d.val(),10),m=d.parent("label").siblings(".menu-item-title").val(),-1===e.inArray(_,c)&&c.push(_),l.append('<span><a class="ntdelbutton" data-id="'+_+'">X</a> '+m+"</span>")}),p.text(c.join(",")),t.preventDefault()}else h.hasClass("ntdelbutton")&&(d=h,f=parseInt(d.data("id"),10),s=h.parents(".options"),p=e("textarea",s),l=e(".tagchecklist",s),c=p.val().split(","),c=e.grep(c,function(e){return parseInt(e,10)!==parseInt(f,10)}),d.parent("span").remove(),p.text(c.join(",")))})},attachQuickSearchListeners:function(){var t;e(".quick-search").keypress(function(o){var n=e(this);return 13===o.which?(i.updateQuickSearchResults(n),!1):(t&&clearTimeout(t),void(t=setTimeout(function(){i.updateQuickSearchResults(n)},400)))}).attr("autocomplete","off")},updateQuickSearchResults:function(t){var o,n,a=2,s=t.val();s.length<a||(o=t.parents(".tabs-panel"),n={action:"menu-quick-search","response-format":"markup",menu:null,"menu-settings-column-nonce":e("#menu-settings-column-nonce").val(),q:s,type:t.attr("name")},e(".spinner",o).show(),e.post(ajaxurl,n,function(e){i.processQuickSearchQueryResponse(e,n,o)}))},processQuickSearchQueryResponse:function(t,o,i){var n,a,s,r=e("form#post"),p={},l=/menu-item[(\[\^]\]*/,c=e("<div>").html(t).find("li");return c.length?(c.each(function(){if(s=e(this),n=l.exec(s.html()),n&&n[1]){for(a=n[1];r.elements["menu-item["+a+"][menu-item-type]"]||p[a];)a-=1;p[a]=!0,a!==n[1]&&s.html(s.html().replace(new RegExp("menu-item\\["+n[1]+"\\]","g"),"menu-item["+a+"]"))}}),e(".categorychecklist",i).html(c),e(".spinner",i).hide(),void e('[name^="menu-item"]').removeAttr("name")):(e(".categorychecklist",i).html("<li><p>noResultsFound</p></li>"),void e(".spinner",i).hide())},initialize_popup_page:function(){var o=function(t){var o,i,n=t.siblings(".options");t.is(":checked")?(n.show(),"popup_targeting_condition_on_entire_site"===t.attr("id")?(o=t.parents("#popmake_popup_targeting_condition_fields").find('[id^="targeting_condition-exclude_on_"]'),i=t.parents(".targeting_condition").siblings(".targeting_condition"),i.hide(),e("> *",i).prop("disabled",!0),o.show(),e("> *",o).prop("disabled",!1)):e("*",n).prop("disabled",!1)):(n.hide(),"popup_targeting_condition_on_entire_site"===t.attr("id")?(o=t.parents("#popmake_popup_targeting_condition_fields").find('[id^="targeting_condition-exclude_on_"]'),i=t.parents(".targeting_condition").siblings(".targeting_condition"),i.show(),e("> *",i).prop("disabled",!1),o.hide(),e("> *",o).prop("disabled",!0)):e("*",n).prop("disabled",!0))},i=function(t){var o=t.parents(".options").find('input[type="checkbox"]:eq(0)'),i=o.attr("name").indexOf("exclude")>=0,n=i?o.attr("name").replace("popup_targeting_condition_exclude_on_specific_",""):o.attr("name").replace("popup_targeting_condition_on_specific_",""),a=e(i?"#exclude_on_specific_"+n:"#on_specific_"+n);t.is(":checked")&&("true"===t.val()?(o.prop("checked",!0),a.show(),e("*",a).prop("disabled",!1)):""===t.val()&&(o.prop("checked",!1),a.hide(),e("*",a).prop("disabled",!0)))},n=function(){e("#popup_auto_open_session_cookie").is(":checked")?e(".not-session-cookie").hide():e(".not-session-cookie").show()},a=function(){e("#popup_auto_open_enabled").is(":checked")?(e(".auto-open-enabled").show(),n()):e(".auto-open-enabled").hide()},s=function(){e("#popup_auto_open_cookie_key").val((new Date).getTime().toString(16))};e('[name^="menu-item"]').removeAttr("name"),e("#title").prop("required",!0),e(t).on("click","#popup_auto_open_session_cookie",function(){n()}).on("click","#popup_auto_open_enabled",function(){a()}).on("click",".popmake-reset-auto-open-cookie-key",function(){s()}),e('#popmake_popup_targeting_condition_fields .targeting_condition > input[type="checkbox"]').on("click",function(){o(e(this))}).each(function(){o(e(this))}),e('input[type="radio"][id*="popup_targeting_condition_"]').on("click",function(){i(e(this))}).each(function(){i(e(this))}),e(".posttypediv, .taxonomydiv").each(function(){var t=e(this),o=e("> ul li"),i=e(".tabs-panel",t);o.removeClass("tabs"),o.eq(0).addClass("tabs"),i.removeClass("tabs-panel-active").addClass("tabs-panel-inactive").removeAttr("style"),i.eq(0).removeClass("tabs-panel-inactive").addClass("tabs-panel-active")}),a(),""===e("#popup_auto_open_cookie_key").val()&&s()}};e(t).ready(function(){i.init(),e(t).trigger("pum_init")})}(jQuery,document);var PUMMarketing;!function(e,t,o){"use strict";PUMMarketing={init:function(){e('#menu-posts-popup ul li a[href="edit.php?post_type=popup&page=extensions"]').css({color:"#9aba27"})}},e(t).ready(PUMMarketing.init)}(jQuery,document);var PUMModals;!function(e,t,o){"use strict";var i,n,a,s=e("html"),r=e(t),p="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";PUMModals={forceFocus:function(e){a&&!a.contains(e.target)&&(e.stopPropagation(),a.focus())},trapEscapeKey:function(e){27===e.keyCode&&(PUMModals.closeAll(),e.preventDefault())},trapTabKey:function(t){if(9===t.keyCode){var o=a.find("*").filter(p).filter(":visible"),i=e(":focus"),n=o.length,s=o.index(i);t.shiftKey?0===s&&(o.get(n-1).focus(),t.preventDefault()):s===n-1&&(o.get(0).focus(),t.preventDefault())}},setFocusToFirstItem:function(){a.find(".pum-modal-content *").filter(p).filter(":visible").first().focus()},closeAll:function(t){e(".pum-modal-background").off("keydown.pum_modal").hide(0,function(){e("html").css({overflow:"visible",width:"auto"}),i&&(i.attr("aria-hidden","false"),i=null),n.length&&n.focus(),a=null,r.off("focus.pum_modal"),o!==t&&t()}).attr("aria-hidden","true")},show:function(t,r){e(".pum-modal-background").off("keydown.pum_modal").hide(0).attr("aria-hidden","true"),s.data("origwidth",s.innerWidth()).css({overflow:"hidden",width:s.innerWidth()});var p=e(":focus");p.parents(".pum-modal-wrap").length||(n=p),a=e(t),a.on("keydown.pum_modal",function(e){PUMModals.trapEscapeKey(e),PUMModals.trapTabKey(e)}).show(0,function(){i=e("body > *").filter(":visible").not(a),i.attr("aria-hidden","true"),a.trigger("pum_init").on("focus.pum_modal",PUMModals.forceFocus),PUMModals.setFocusToFirstItem(),o!==r&&r()}).attr("aria-hidden","false")},remove:function(t){e(t).remove()},replace:function(t,o){PUMModals.remove(e.trim(t)),e("body").append(e.trim(o))},reload:function(e,t,o){PUMModals.replace(e,t),PUMModals.show(e,o)}},e(t).on("click",".pum-modal-background, .pum-modal-wrap .cancel, .pum-modal-wrap .pum-modal-close",function(t){var o=e(t.target);(o.hasClass("pum-modal-background")||o.hasClass("cancel")||o.hasClass("pum-modal-close")||o.hasClass("submitdelete"))&&(PUMModals.closeAll(),t.preventDefault(),t.stopPropagation())})}(jQuery,document);var PUMRangeSLiders;!function(e,t,o){"use strict";PUMRangeSLiders={init:function(){var o,i,n,a,s,r=e('<input type="range"/>'),p=e('<button type="button" class="popmake-range-plus">+</button>'),l=e('<button type="button" class="popmake-range-minus">-</button>');e(".popmake-range-manual").filter(":not(.initialized)").each(function(){var c=e(this).addClass("initialized"),u=c.data("force-minmax"),d=parseInt(c.prop("min"),0),_=parseInt(c.prop("max"),0),m=parseInt(c.prop("step"),0),f=parseInt(c.val(),0);n=r.clone(),a=p.clone(),s=l.clone(),u&&f>_&&(f=_,c.val(f)),n.prop({min:d||0,max:u||_&&_>f?_:1.5*f,step:m||1.5*f/100,value:f}).on("change input",function(){c.trigger("input")}),c.next().after(s,a),c.before(n),o=t.createElement("input"),o.setAttribute("type","range"),"text"===o.type&&e("input[type=range]").each(function(t,o){i=e(o),n=e("<div />").slider({min:parseInt(i.attr("min"),10)||0,max:parseInt(i.attr("max"),10)||100,value:parseInt(i.attr("value"),10)||0,step:parseInt(i.attr("step"),10)||1,slide:function(t,o){e(this).prev("input").val(o.value)}}),i.after(n).hide()})})}},e(t).on("pum_init",PUMRangeSLiders.init).on("input",'input[type="range"]',function(){var t=e(this);t.siblings(".popmake-range-manual").val(t.val())}).on("click",".popmake-range-manual",function(){var t=e(this);t.prop("readonly",!1)}).on("focusout",".popmake-range-manual",function(){var t=e(this);t.prop("readonly",!0)}).on("change",".popmake-range-manual",function(){var t=e(this),o=parseInt(t.prop("max"),0),i=parseInt(t.prop("step"),0),n=t.data("force-minmax"),a=parseInt(t.val(),0),s=t.prev();n&&a>o&&(a=o,t.val(a)),s.prop({max:n||o&&o>a?o:1.5*a,step:i||1.5*a/100,value:a})}).on("click",".popmake-range-plus",function(t){var o=e(this).siblings(".popmake-range-manual"),i=parseInt(o.prop("step"),0),n=parseInt(o.val(),0),a=n+i,s=o.prev();t.preventDefault(),o.val(a).trigger("input"),s.val(a)}).on("click",".popmake-range-minus",function(t){var o=e(this).siblings(".popmake-range-manual"),i=parseInt(o.prop("step"),0),n=parseInt(o.val(),0),a=n-i,s=o.prev();t.preventDefault(),o.val(a).trigger("input"),s.val(a)})}(jQuery,document);var PUMSelect2Fields;!function(e,t,o){"use strict";PUMSelect2Fields={init:function(){e(".pum-select2 select").filter(":not(.initialized)").each(function(){var t=e(this),i=t.data("current"),n=t.data("objecttype"),a=t.data("objectkey"),s={multiple:!1,dropdownParent:t.parent()};t.attr("multiple")&&(s.multiple=!0),n&&a&&(s=e.extend(s,{ajax:{url:ajaxurl,dataType:"json",delay:250,data:function(e){return{s:e.term,page:e.page,action:"pum_object_search",object_type:n,object_key:a}},processResults:function(e,t){return t.page=t.page||1,{results:e.items,pagination:{more:10*t.page<e.total_count}}},cache:!0},cache:!0,escapeMarkup:function(e){return e},minimumInputLength:1,templateResult:PUMSelect2Fields.formatObject,templateSelection:PUMSelect2Fields.formatObjectSelection})),t.addClass("initialized").select2(s),i!==o&&("object"!=typeof i&&(i=[i]),n&&a?e.ajax({url:ajaxurl,data:{action:"pum_object_search",object_type:n,object_key:a,include:i},dataType:"json",success:function(o){e.each(o.items,function(e,o){t.find('option[value="'+o.id+'"]').length||t.prepend('<option value="'+o.id+'">'+o.text+"</option>")}),t.val(i).trigger("change")}}):t.val(i).trigger("change"))})},formatObject:function(e){return e.text},formatObjectSelection:function(e){return e.text||e.text}},e(t).on("pum_init",PUMSelect2Fields.init)}(jQuery,document),function(e,t,o){function i(t,o){return-1!==e.inArray(o,t)}function n(e,t,o){var i=t[0];t.length>1?(e[i]||(e[i]=t[1]?{}:[]),n(e[i],t.slice(1),o)):(i||(i=e.length),e[i]=o)}var a="color,date,datetime,datetime-local,email,hidden,month,number,password,range,search,tel,text,time,url,week".split(","),s="select,textarea".split(","),r=/\[([^\]]*)\]/g;e.fn.serializeObject=function(t){e.extend({},t);var o={},p=e.extend(!0,{include:[],exclude:[],includeByClass:""},t);return this.find(":input").each(function(){var t;!this.name||this.disabled||i(p.exclude,this.name)||p.include.length&&!i(p.include,this.name)||-1===this.className.indexOf(p.includeByClass)||(t=this.name.replace(r,"[$1").split("["),t[0]&&(this.checked||i(a,this.type)||i(s,this.nodeName.toLowerCase()))&&("checkbox"===this.type&&t.push(""),n(o,t,e(this).val())))}),o}}(jQuery,document);var PUMTabs;!function(e,t,o){"use strict";PUMTabs={init:function(){e(".pum-tabs-container").filter(":not(.initialized)").each(function(){var t=e(this),o=t.find(".tab:first");t.hasClass("vertical-tabs")&&t.css({minHeight:t.find(".tabs").eq(0).outerHeight(!0)}),t.find(".active").removeClass("active"),o.addClass("active"),e(o.find("a").attr("href")).addClass("active"),t.addClass("initialized")})}},e(t).on("pum_init",PUMTabs.init).on("click",".pum-tabs-container .tab",function(t){var o=e(this),i=o.parents(".pum-tabs-container:first"),n=o.find("a").attr("href");i.find(".active").removeClass("active"),o.addClass("active"),e(n).addClass("active"),t.preventDefault()})}(jQuery,document);var PUM_Templates;!function(e,t,o){"use strict";var i=pum_admin.I10n;PUM_Templates={render:function(t,o){var i=_.template(e(t).html());return"object"==typeof o.classes&&(o.classes=o.classes.join(" ")),o=PUM_Templates.prepareMeta(o),i(o)},shortcode:function(t){var o=e.extend(!0,{},{tag:"",meta:{},has_content:!1,content:""},t),i=o.has_content?"#tmpl-pum-shortcode-w-content":"#tmpl-pum-shortcode";return PUM_Templates.render(i,o)},modal:function(t){var o=e.extend(!0,{},{id:"",title:"",description:"",classes:"",save_button:i.save,cancel_button:i.cancel,content:""},t);return PUM_Templates.render("#tmpl-pum-modal",o)},tabs:function(t){var o=t.classes||[],i=e.extend(!0,{},{id:"",vertical:!0,form:!0,classes:"",tabs:{general:{label:"General",content:""}}},t);return i.form&&o.push("tabbed-form"),i.vertical&&o.push("vertical-tabs"),i.classes=i.classes+" "+o.join(" "),PUM_Templates.render("#tmpl-pum-tabs",i)},section:function(t){var o=e.extend(!0,{},{classes:[],fields:[]},t);return PUM_Templates.render("#tmpl-pum-field-section",o)},field:function(t){var i="#tmpl-pum-field-"+t.type,n=[],a=e.extend(!0,{},{type:"text",id:"",id_prefix:"",name:"",label:null,placeholder:"",desc:null,size:"regular",classes:[],value:null,select2:!1,multiple:!1,as_array:!1,options:[],object_type:null,object_key:null,std:null,min:0,max:50,step:1,unit:"px",required:!1,meta:{}},t);if(!e(i).length&&("objectselect"!==t.type&&"postselect"!==t.type&&"taxonomyselect"!==t.type||(i="#tmpl-pum-field-select"),!e(i).length))return"";switch(a.value||t.std===o||(a.value=t.std),"string"==typeof a.classes&&(a.classes=a.classes.split(" ")),t["class"]!==o&&a.classes.push(t["class"]),a.required&&(a.meta.required=!0,a.classes.push("pum-required")),t.type){case"select":case"objectselect":case"postselect":case"taxonomyselect":a.options!==o&&(_.each(a.options,function(e,t){var o=!1;a.multiple&&a.value.indexOf(e)!==!1?o="selected":a.multiple||a.value!=e||(o="selected"),n.push(PUM_Templates.prepareMeta({label:t,value:e,meta:{selected:o}}))}),a.options=n),a.multiple&&(a.meta.multiple=!0,a.as_array&&(a.name+="[]"),a.value&&a.value.length||(a.value=[]),"string"==typeof a.value&&(a.value=[a.value])),"select"!==t.type&&(a.select2=!0,a.classes.push("pum-field-objectselect"),a.classes.push("postselect"===t.type?"pum-field-postselect":"pum-field-taxonomyselect"),a.meta["data-objecttype"]="postselect"===t.type?"post_type":"taxonomy",a.meta["data-objectkey"]="postselect"===t.type?t.post_type:t.taxonomy,a.meta["data-current"]=a.value),a.select2&&(a.classes.push("pum-select2"),a.placeholder&&(a.meta["data-placeholder"]=a.placeholder));break;case"multicheck":a.options!==o&&(_.each(a.options,function(e,t){n.push({label:t,value:e,meta:{checked:a.value.indexOf(e)>=0}})}),a.options=n);break;case"checkbox":1===parseInt(a.value,10)&&(a.meta.checked=!0);break;case"rangeslider":a.meta.readonly=!0,a.meta.step=a.step,a.meta.min=a.min,a.meta.max=a.max;break;case"textarea":a.meta.cols=a.cols,a.meta.rows=a.rows}return a.field=PUM_Templates.render(i,a),PUM_Templates.render("#tmpl-pum-field-wrapper",a)},prepareMeta:function(e){var t,o=[];for(t in e.meta)e.meta.hasOwnProperty(t)&&("boolean"==typeof e.meta[t]?e.meta[t]&&o.push(_.escape(t)):o.push(_.escape(t)+'="'+_.escape(e.meta[t])+'"'));return e.meta=o.join(" "),e}}}(jQuery,document);var PUMTriggers;!function(e,t,o){"use strict";var i=pum_admin.I10n,n=pum_admin.defaults;PUMTriggers={new_cookie:null,getLabel:function(e){return i.labels.triggers[e].name},getSettingsDesc:function(e,t){var o=_.template(i.labels.triggers[e].settings_column);return t.I10n=i,o(t)},renumber:function(){e("#pum_popup_triggers_list tbody tr").each(function(){var t=e(this),o=t.parent().children().index(t),i=t.data("index");t.data("index",o),t.find("input").each(function(){var e="["+o+"]";this.name=this.name.replace("["+i+"]",e).replace("[]",e)})})},refreshDescriptions:function(){e("#pum_popup_triggers_list tbody tr").each(function(){var t=e(this),o=t.find(".popup_triggers_field_type").val(),i=JSON.parse(t.find(".popup_triggers_field_settings:first").val()),n=PUMTriggers.cookie_column_value(i.cookie.name);t.find("td.settings-column").html(PUMTriggers.getSettingsDesc(o,i)),t.find("td.cookie-column code").text(n)})},initEditForm:function(t){var o=e(".trigger-editor .pum-form"),i=e("#name",o),n=t.trigger_settings;e("#pum_popup_cookies_list tbody tr").each(function(){var t=JSON.parse(e(this).find(".popup_cookies_field_settings:first").val());i.find('option[value="'+t.name+'"]').length||e('<option value="'+t.name+'">'+t.name+"</option>").appendTo(i)}),i.val(n.cookie.name),i.trigger("chosen:updated")},cookie_column_value:function(e){var t=i.no_cookie;return e instanceof Array?t=e.join(", "):null!==e&&(t=e),t}},PUMTriggers.refreshDescriptions(),e(t).on("select2:select","#pum-first-trigger",function(){var t=e(this),a=t.val(),s="#pum_trigger_settings_"+a,r=_.template(e("script"+s+"_templ").html()),p={};p.trigger_settings=n.triggers[a]!==o?n.triggers[a]:{},p.save_button_text=i.add,p.index=null,r.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(s,r(p)),PUMTriggers.initEditForm(p),t.val(null).trigger("change")}).on("click","#pum_popup_triggers .add-new",function(){var t=_.template(e("script#pum_trigger_add_type_templ").html());PUMModals.reload("#pum_trigger_add_type_modal",t())}).on("click","#pum_popup_triggers_list .edit",function(t){var o=e(this),n=o.parents("tr:first"),a=n.find(".popup_triggers_field_type").val(),s="#pum_trigger_settings_"+a,r=_.template(e("script"+s+"_templ").html()),p={index:n.parent().children().index(n),type:a,trigger_settings:JSON.parse(n.find(".popup_triggers_field_settings:first").val())};t.preventDefault(),p.save_button_text=i.save,r.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(s,r(p)),PUMTriggers.initEditForm(p)}).on("click","#pum_popup_triggers_list .remove",function(t){var o=e(this),n=o.parents("tr:first");t.preventDefault(),window.confirm(i.confirm_delete_trigger)&&(n.remove(),e("#pum_popup_triggers_list tbody tr").length||(e("#pum-first-trigger").val(null).trigger("change"),e("#pum_popup_trigger_fields").removeClass("has-triggers")),PUMTriggers.renumber())}).on("submit","#pum_trigger_add_type_modal .pum-form",function(t){var a=e("#popup_trigger_add_type").val(),s="#pum_trigger_settings_"+a,r=_.template(e("script"+s+"_templ").html()),p={};t.preventDefault(),p.trigger_settings=n.triggers[a]!==o?n.triggers[a]:{},p.save_button_text=i.add,p.index=null,r.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(s,r(p)),PUMTriggers.initEditForm(p)}).on("submit",".trigger-editor .pum-form",function(t){var o,n=e(this),a=(n.find("input.type").val(),n.serializeObject()),s=parseInt(a.index),r=s>=0?e("#pum_popup_triggers_list tbody tr").eq(s):null,p=_.template(e("script#pum_trigger_row_templ").html());t.preventDefault(),(!s||0>s)&&(a.index=e("#pum_popup_triggers_list tbody tr").length),a.I10n=i,o=p(a),r?r.replaceWith(o):e("#pum_popup_triggers_list tbody").append(o),PUMModals.closeAll(),PUMTriggers.renumber(),e("#pum_popup_trigger_fields").addClass("has-triggers"),null!==a.trigger_settings.cookie.name&&a.trigger_settings.cookie.name.indexOf("add_new")>=0&&(PUMTriggers.new_cookie=a.index,e("#pum_popup_cookie_fields button.add-new").trigger("click"))}).ready(function(){PUMTriggers.refreshDescriptions(),e("#pum-first-trigger").val(null).trigger("change")})}(jQuery,document);var PUMUtils;!function(e,t,o){"use strict";PUMUtils={convert_meta_to_object:function(e){var t,i,n,a={};for(n in e)e.hasOwnProperty(n)&&(t=n.split(/_(.+)?/)[0],i=n.split(/_(.+)?/)[1],a[t]===o&&(a[t]={}),a[t][i]=e[n]);return a},serialize_form:function(t){var o={};return e("[name]",t).each(function(){var t,i,n=e(this).attr("name"),a=e(this).val(),s=n.split("["),r=o,p=s.length;for(t=0;p>t;t+=1)i=s[t].replace("]",""),r[i]||(r[i]={}),t!==s.length-1?r=r[i]:t===s.length-1&&(r[i]=a)}),o},convert_hex:function(e,t){if(o===e)return"";o===t&&(t=100),e=e.replace("#","");var i=parseInt(e.substring(0,2),16),n=parseInt(e.substring(2,4),16),a=parseInt(e.substring(4,6),16),s="rgba("+i+","+n+","+a+","+t/100+")";return s},debounce:function(e,t){var o;return function(){var i=this,n=arguments;window.clearTimeout(o),o=window.setTimeout(function(){e.apply(i,n)},t)}},throttle:function(e,t){var o=!1,i=function(){o=!1};return function(){o||(e(),window.setTimeout(i,t),o=!0)}}},String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)}}(jQuery,document);var PopMakeAdmin,PUM_Admin;!function(e,t,o){"use strict";var i=e(t);pum_admin.I10n,pum_admin.defaults;PUM_Admin={},PopMakeAdmin={init:function(){e("body.post-type-popup form#post").length&&PopMakeAdmin.initialize_popup_page(),e("body.post-type-popup_theme form#post").length&&PopMakeAdmin.initialize_theme_page()},initialize_popup_page:function(){var o=function(){"custom"===e("#popup_display_size").val()?(e(".custom-size-only").show(),e(".responsive-size-only").hide(),e("#popup_display_custom_height_auto").is(":checked")?e(".custom-size-height-only").hide():e(".custom-size-height-only").show()):(e(".custom-size-only").hide(),"auto"!==e("#popup_display_size").val()?(e(".responsive-size-only").show(),e("#popup_display_custom_height_auto").prop("checked",!1)):e(".responsive-size-only").hide())},i=function(){e(".animation-speed, .animation-origin").hide(),"fade"===e("#popup_display_animation_type").val()?e(".animation-speed").show():"none"!==e("#popup_display_animation_type").val()&&e(".animation-speed, .animation-origin").show()},n=function(){var t=e("#popup_display_location"),o=t.parents("table"),i=t.val();e("tr.top, tr.right, tr.left, tr.bottom",o).hide(),i.indexOf("top")>=0&&e("tr.top").show(),i.indexOf("left")>=0&&e("tr.left").show(),i.indexOf("bottom")>=0&&e("tr.bottom").show(),i.indexOf("right")>=0&&e("tr.right").show()};e("#popuptitlediv").insertAfter("#titlediv"),e("#title").prop("required",!0),e(t).on("keydown","#popuptitle",function(t){var o=t.keyCode||t.which;9===o&&(t.preventDefault(),e("#title").focus());
|
2 |
-
}).on("keydown","#title, #popuptitle",function(t){var o,i=t.keyCode||t.which;t.shiftKey||9!==i||(t.preventDefault(),o="title"===e(this).attr("id")?"#popuptitle":"#insert-media-button",e(o).focus())}).on("keydown","#popuptitle, #insert-media-button",function(t){var o,i=t.keyCode||t.which;t.shiftKey&&9===i&&(t.preventDefault(),o="popuptitle"===e(this).attr("id")?"#title":"#popuptitle",e(o).focus())}).on("click","#popup_display_custom_height_auto",function(){o()}).on("change","#popup_display_size",function(){"custom"!==e("#popup_display_size").val()&&"auto"!==e("#popup_display_size").val()&&e("#popup_display_position_fixed, #popup_display_scrollable_content").prop("checked",!1),o()}).on("change","#popup_display_animation_type",function(){i()}).on("change","#popup_display_location",function(){n()}),o(),i(),n()},theme_page_listeners:function(){var o=this;e(t).on("change","select.font-family",function(){e("select.font-weight option, select.font-style option",e(this).parents("table")).prop("selected",!1),o.update_font_selectboxes()}).on("change","select.font-weight, select.font-style",function(){o.update_font_selectboxes()}).on("change input focusout","select, input",function(){o.update_theme()}).on("change","select.border-style",function(){var t=e(this);"none"===t.val()?t.parents("table").find(".border-options").hide():t.parents("table").find(".border-options").show()}).on("change","#popup_theme_close_location",function(){var t=e(this),o=t.parents("table");e("tr.topleft, tr.topright, tr.bottomleft, tr.bottomright",o).hide(),e("tr."+t.val(),o).show()})},update_theme:function(){var t,o=e("[name^='popup_theme_']").serializeArray(),i={};for(t=0;o.length>t;t+=1)0===o[t].name.indexOf("popup_theme_")&&(i[o[t].name.replace("popup_theme_","")]=o[t].value);this.retheme_popup(i)},theme_preview_scroll:function(){var t=e("#popmake-theme-editor .empreview, body.post-type-popup_theme form#post #popmake_popup_theme_preview"),o=t.parent(),i=t.offset().top-50;e(window).on("scroll",function(){e("> .postbox:visible",o).index(t)===e("> .postbox:visible",o).length-1&&e(window).scrollTop()>=i?t.css({left:t.offset().left,width:t.width(),height:t.height(),position:"fixed",top:50}):t.removeAttr("style")})},update_font_selectboxes:function(){return e("select.font-family").each(function(){var t,i,n=e(this),a=n.parents("table").find("select.font-weight"),s=n.parents("table").find("select.font-style"),r=a.find("option"),p=s.find("option");if(popmake_google_fonts[n.val()]!==o){if(t=popmake_google_fonts[n.val()],r.hide(),p.hide(),t.variants.length)for(i=0;t.variants.length>i;i+=1)"regular"===t.variants[i]?(e('option[value=""]',a).show(),e('option[value=""]',s).show()):(t.variants[i].indexOf("italic")>=0&&e('option[value="italic"]',s).show(),e('option[value="'+parseInt(t.variants[i],10)+'"]',a).show())}else r.show(),p.show();a.parents("tr:first").show(),a.find("option:visible").length<=1?a.parents("tr:first").hide():a.parents("tr:first").show(),s.parents("tr:first").show(),s.find("option:visible").length<=1?s.parents("tr:first").hide():s.parents("tr:first").show()})},convert_theme_for_preview:function(e){},initialize_theme_page:function(){e("#popuptitlediv").insertAfter("#titlediv");var o=this,i=e("#popup_theme_close_location").parents("table");switch(o.update_theme(),o.theme_page_listeners(),o.theme_preview_scroll(),o.update_font_selectboxes(),e(t).on("click",".popmake-preview",function(t){t.preventDefault(),e("#popmake-preview, #popmake-overlay").css({visibility:"visible"}).show()}).on("click",".popmake-close",function(){e("#popmake-preview, #popmake-overlay").hide()}),e("select.border-style").each(function(){var t=e(this);"none"===t.val()?t.parents("table").find(".border-options").hide():t.parents("table").find(".border-options").show()}),e(".color-picker.background-color").each(function(){var t=e(this);""===t.val()?t.parents("table").find(".background-opacity").hide():t.parents("table").find(".background-opacity").show()}),e("tr.topleft, tr.topright, tr.bottomleft, tr.bottomright",i).hide(),e("#popup_theme_close_location").val()){case"topleft":e("tr.topleft",i).show();break;case"topright":e("tr.topright",i).show();break;case"bottomleft":e("tr.bottomleft",i).show();break;case"bottomright":e("tr.bottomright",i).show()}},retheme_popup:function(i){var n,a=e(".empreview .example-popup-overlay, #popmake-overlay"),s=e(".empreview .example-popup, #popmake-preview"),r=e(".title, .popmake-title",s),p=e(".content, .popmake-content",s),l=e(".close-popup, .popmake-close",s),c="yes"===i.container_boxshadow_inset?"inset ":"",u="yes"===i.close_boxshadow_inset?"inset ":"";switch(this.convert_theme_for_preview(i),popmake_google_fonts[i.title_font_family]!==o&&(n="//fonts.googleapis.com/css?family="+i.title_font_family,"normal"!==i.title_font_weight&&(n+=":"+i.title_font_weight),"italic"===i.title_font_style&&(-1===n.indexOf(":")&&(n+=":"),n+="italic"),e("body").append('<link href="'+n+'" rel="stylesheet" type="text/css">')),popmake_google_fonts[i.content_font_family]!==o&&(n="//fonts.googleapis.com/css?family="+i.content_font_family,"normal"!==i.content_font_weight&&(n+=":"+i.content_font_weight),"italic"===i.content_font_style&&(-1===n.indexOf(":")&&(n+=":"),n+="italic"),e("body").append('<link href="'+n+'" rel="stylesheet" type="text/css">')),popmake_google_fonts[i.close_font_family]!==o&&(n="//fonts.googleapis.com/css?family="+i.close_font_family,"normal"!==i.close_font_weight&&(n+=":"+i.close_font_weight),"italic"===i.close_font_style&&(-1===n.indexOf(":")&&(n+=":"),n+="italic"),e("body").append('<link href="'+n+'" rel="stylesheet" type="text/css">')),a.removeAttr("style").css({backgroundColor:PUMUtils.convert_hex(i.overlay_background_color,i.overlay_background_opacity)}),s.removeAttr("style").css({padding:i.container_padding+"px",backgroundColor:PUMUtils.convert_hex(i.container_background_color,i.container_background_opacity),borderStyle:i.container_border_style,borderColor:i.container_border_color,borderWidth:i.container_border_width+"px",borderRadius:i.container_border_radius+"px",boxShadow:c+i.container_boxshadow_horizontal+"px "+i.container_boxshadow_vertical+"px "+i.container_boxshadow_blur+"px "+i.container_boxshadow_spread+"px "+PUMUtils.convert_hex(i.container_boxshadow_color,i.container_boxshadow_opacity)}),r.removeAttr("style").css({color:i.title_font_color,lineHeight:i.title_line_height+"px",fontSize:i.title_font_size+"px",fontFamily:i.title_font_family,fontStyle:i.title_font_style,fontWeight:i.title_font_weight,textAlign:i.title_text_align,textShadow:i.title_textshadow_horizontal+"px "+i.title_textshadow_vertical+"px "+i.title_textshadow_blur+"px "+PUMUtils.convert_hex(i.title_textshadow_color,i.title_textshadow_opacity)}),p.removeAttr("style").css({color:i.content_font_color,fontFamily:i.content_font_family,fontStyle:i.content_font_style,fontWeight:i.content_font_weight}),l.html(i.close_text).removeAttr("style").css({padding:i.close_padding+"px",height:i.close_height>0?i.close_height+"px":"auto",width:i.close_width>0?i.close_width+"px":"auto",backgroundColor:PUMUtils.convert_hex(i.close_background_color,i.close_background_opacity),color:i.close_font_color,lineHeight:i.close_line_height+"px",fontSize:i.close_font_size+"px",fontFamily:i.close_font_family,fontWeight:i.close_font_weight,fontStyle:i.close_font_style,borderStyle:i.close_border_style,borderColor:i.close_border_color,borderWidth:i.close_border_width+"px",borderRadius:i.close_border_radius+"px",boxShadow:u+i.close_boxshadow_horizontal+"px "+i.close_boxshadow_vertical+"px "+i.close_boxshadow_blur+"px "+i.close_boxshadow_spread+"px "+PUMUtils.convert_hex(i.close_boxshadow_color,i.close_boxshadow_opacity),textShadow:i.close_textshadow_horizontal+"px "+i.close_textshadow_vertical+"px "+i.close_textshadow_blur+"px "+PUMUtils.convert_hex(i.close_textshadow_color,i.close_textshadow_opacity)}),i.close_location){case"topleft":l.css({top:i.close_position_top+"px",left:i.close_position_left+"px"});break;case"topright":l.css({top:i.close_position_top+"px",right:i.close_position_right+"px"});break;case"bottomleft":l.css({bottom:i.close_position_bottom+"px",left:i.close_position_left+"px"});break;case"bottomright":l.css({bottom:i.close_position_bottom+"px",right:i.close_position_right+"px"})}e(t).trigger("popmake-admin-retheme",[i])}},i.ready(function(){PopMakeAdmin.init(),i.trigger("pum_init")})}(jQuery,document);
|
1 |
+
function pumSelected(e,t,o){"use strict";var i=!1;return"object"==typeof e&&"string"==typeof t&&-1!==jQuery.inArray(t,e)?i=!0:"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)?i=!0:e===t&&(i=!0),void 0!==o&&o?i?' selected="selected"':"":i}function pumChecked(e,t,o){"use strict";var i=!1;return"object"==typeof e&&"string"==typeof t&&-1!==jQuery.inArray(t,e)?i=!0:"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)?i=!0:e===t&&(i=!0),void 0!==o&&o?i?' checked="checked"':"":i}!function(e,t,o){"use strict";e(t).on("click","#popup_reset_open_count",function(){var t=e(this);t.is(":checked")&&!confirm(pum_admin.I10n.confirm_count_reset)&&t.prop("checked",!1)})}(jQuery,document);var PUMColorPickers;!function(e,t,o){"use strict";PUMColorPickers={init:function(){e(".color-picker").filter(":not(.initialized)").addClass("initialized").wpColorPicker({change:function(t){var o=e(this),i=e(t.currentTarget);i.hasClass("background-color")&&i.parents("table").find(".background-opacity").show(),o.trigger("change.update"),"popup_theme"===e("form#post input#post_type").val()&&PopMakeAdmin.update_theme()},clear:function(t){var o=e(t.currentTarget).prev();o.hasClass("background-color")&&o.parents("table").find(".background-opacity").hide(),e(this).prev("input").trigger("change.clear").wpColorPicker("close"),"popup_theme"===e("form#post input#post_type").val()&&PopMakeAdmin.update_theme()}})}},e(t).on("click",".iris-palette",function(){e(this).parents(".wp-picker-active").find("input.color-picker").trigger("change"),setTimeout(PopMakeAdmin.update_theme,500)}).on("pum_init",PUMColorPickers.init)}(jQuery,document);var PUMConditions;!function(e,t,o){"use strict";PUMConditions={templates:{},addGroup:function(o,i){var n=e("#pum-popup-conditions"),a={index:n.find(".facet-group-wrap").length,conditions:[{target:o||null,not_operand:i||!1,settings:{}}]};n.find(".facet-groups").append(PUMConditions.templates.group(a)),n.find(".facet-builder").addClass("has-conditions"),e(t).trigger("pum_init")},renumber:function(){e("#pum-popup-conditions .facet-group-wrap").each(function(){var t=e(this),o=t.parent().children().index(t);t.data("index",o).find(".facet").each(function(){var t=e(this),i=t.parent().children().index(t);t.data("index",i).find("[name]").each(function(){var e="popup_conditions["+o+"]["+i+"]";this.name=this.name.replace(/popup_conditions\[\d*?\]\[\d*?\]/,e),this.id=this.name})})})}},e(t).on("pum_init",PUMConditions.renumber).ready(function(){e("body.post-type-popup form#post").length&&(PUMConditions.templates.group=wp.template("pum-condition-group"),PUMConditions.templates.facet=wp.template("pum-condition-facet"),PUMConditions.templates.settings={},e("script.tmpl.pum-condition-settings").each(function(){var t=e(this),o=t.attr("id").replace("tmpl-","");PUMConditions.templates.settings[t.data("condition")]=wp.template(o)}),PUMConditions.renumber())}).on("select2:select","#pum-first-condition",function(){var t=e(this),o=t.val(),i=e("#pum-first-condition-operand"),n=i.is(":checked")?i.val():null;PUMConditions.addGroup(o,n),t.val(null).trigger("change"),i.prop("checked",!1).parents(".pum-condition-target").removeClass("not-operand-checked")}).on("click","#pum-popup-conditions .pum-not-operand",function(){var t=e(this),o=t.find("input"),i=t.parents(".pum-condition-target");o.is(":checked")?(i.removeClass("not-operand-checked"),o.prop("checked",!1)):(i.addClass("not-operand-checked"),o.prop("checked",!0))}).on("change","#pum-popup-conditions select.target",function(){var i=e(this),n=i.val(),a={index:i.parents(".facet-group").find(".facet").length,target:n,settings:{}};""!==n&&n!==i.parents(".facet").data("target")&&PUMConditions.templates.settings[n]!==o&&(i.parents(".facet").data("target",n).find(".facet-settings").html(PUMConditions.templates.settings[n](a)),e(t).trigger("pum_init"))}).on("click","#pum-popup-conditions .facet-group-wrap:last-child .and .add-facet",PUMConditions.addGroup).on("click","#pum-popup-conditions .add-or .add-facet:not(.disabled)",function(){var o=e(this),i=o.parents(".facet-group-wrap"),n={group:i.data("index"),index:i.find(".facet").length,target:null,settings:{}};i.find(".facet-list").append(PUMConditions.templates.facet(n)),e(t).trigger("pum_init")}).on("click","#pum-popup-conditions .remove-facet",function(){var t=e(this),o=e("#pum-popup-conditions"),i=t.parents(".facet"),n=t.parents(".facet-group-wrap");i.remove(),0===n.find(".facet").length&&(n.prev(".facet-group-wrap").find(".and .add-facet").removeClass("disabled"),n.remove(),0===o.find(".facet-group-wrap").length&&o.find(".facet-builder").removeClass("has-conditions")),PUMConditions.renumber()})}(jQuery,document);var PUMCookies;!function(e,t,o){"use strict";var i=pum_admin.I10n,n=pum_admin.defaults;PUMCookies={getLabel:function(e){return i.labels.cookies[e].name},getSettingsDesc:function(e,t){var o={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"},n=_.template(i.labels.cookies[e].settings_column,null,o);return t.I10n=i,n(t)},renumber:function(){e("#pum_popup_cookies_list tbody tr").each(function(){var t=e(this),o=t.parent().children().index(t),i=t.data("index");t.data("index",o),t.find("[name]").each(function(){var e="["+o+"]";this.name=this.name.replace("["+i+"]",e).replace("[]",e)})})},refreshDescriptions:function(){e("#pum_popup_cookies_list tbody tr").each(function(){var t=e(this),o=t.find(".popup_cookies_field_event").val(),i=JSON.parse(t.find(".popup_cookies_field_settings:first").val());t.find("td.settings-column").html(PUMCookies.getSettingsDesc(o,i))})},initEditForm:function(){PUMCookies.updateSessionsCheckbox()},updateSessionsCheckbox:function(){var t=e(".cookie-editor .pum-form"),o=t.find('.field.checkbox.session input[type="checkbox"]').is(":checked"),i=t.find(".field").filter(".time");o?i.hide():i.show()},resetCookieKey:function(){var t=e(this),o=(new Date).getTime().toString(16);t.parents(".pum-form").find(".field.text.name").data("cookiekey",o),t.siblings('input[type="text"]:first').val(o)}},e(t).on("select2:select","#pum-first-cookie",function(){var t=e(this),a=t.val(),s="pum-cookie-settings-"+a,r="#"+s.replace(/-/g,"_"),p=wp.template(s),l={};l.cookie_settings=n.cookies[a]!==o?n.cookies[a]:{},l.cookie_settings.name="pum-"+e("#post_ID").val(),l.save_button_text=i.add,l.index=null,p.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(r,p(l)),PUMCookies.initEditForm(),t.val(null).trigger("change")}).on("click",".field.cookiekey button.reset",PUMCookies.resetCookieKey).on("click",".cookie-editor .pum-form .field.checkbox.session",PUMCookies.updateSessionsCheckbox).on("click","#pum_popup_cookies .add-new",function(){var e=wp.template("pum-cookie-add-event");PUMModals.reload("#pum_cookie_add_event_modal",e())}).on("click","#pum_popup_cookies_list .edit",function(t){var o=e(this),n=o.parents("tr:first"),a=n.find(".popup_cookies_field_event").val(),s="pum-cookie-settings-"+a,r="#"+s.replace(/-/g,"_"),p=wp.template(s),l={index:n.parent().children().index(n),event:a,cookie_settings:JSON.parse(n.find(".popup_cookies_field_settings:first").val())};t.preventDefault(),l.save_button_text=i.save,p.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(r,p(l)),PUMCookies.initEditForm()}).on("click","#pum_popup_cookies_list .remove",function(t){var o=e(this),n=o.parents("tr:first");t.preventDefault(),window.confirm(i.confirm_delete_cookie)&&(n.remove(),e("#pum_popup_cookies_list tbody tr").length||(e("#pum-first-cookie").val(null).trigger("change"),e("#pum_popup_cookie_fields").removeClass("has-cookies")),PUMCookies.renumber())}).on("submit","#pum_cookie_add_event_modal .pum-form",function(t){var a=e("#popup_cookie_add_event").val(),s="pum-cookie-settings-"+a,r="#"+s.replace(/-/g,"_"),p=wp.template(s),l={};t.preventDefault(),l.cookie_settings=n.cookies[a]!==o?n.cookies[a]:{},l.cookie_settings.name="pum-"+e("#post_ID").val(),l.save_button_text=i.add,l.index=null,p.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(r,p(l)),PUMCookies.initEditForm()}).on("submit",".cookie-editor .pum-form",function(t){var o,n,a,s=e(this),r=(s.find("input.event").val(),s.serializeObject()),p=parseInt(r.index),l=p>=0?e("#pum_popup_cookies_list tbody tr").eq(p):null,c=wp.template("pum-cookie-row");t.preventDefault(),(!p||0>p)&&(r.index=e("#pum_popup_cookies_list tbody tr").length),r.I10n=i,o=c(r),l?l.replaceWith(o):e("#pum_popup_cookies_list tbody").append(o),PUMModals.closeAll(),PUMCookies.renumber(),e("#pum_popup_cookie_fields").addClass("has-cookies"),PUMTriggers.new_cookie&&PUMTriggers.new_cookie>=0&&(n=e("#pum_popup_triggers_list tbody tr").eq(PUMTriggers.new_cookie).find(".popup_triggers_field_settings:first"),console.log(n,n.val()),a=JSON.parse(n.val()),a.cookie.name[a.cookie.name.indexOf("add_new")]=r.cookie_settings.name,n.val(JSON.stringify(a)),PUMTriggers.new_cookie=-1,PUMTriggers.refreshDescriptions())}).ready(function(){PUMCookies.refreshDescriptions(),e("#pum-first-cookie").val(null).trigger("change")})}(jQuery,document),function(e,t,o){"use strict";var i={init:function(){e("#popmake_popup_auto_open_fields, #popmake_popup_targeting_condition_fields").length&&(i.initialize_popup_page(),i.attachQuickSearchListeners(),i.attachTabsPanelListeners())},attachTabsPanelListeners:function(){e("#poststuff").bind("click",function(t){var o,i,n,a,s,r,p,l,c,u,d,m,f,_,h=e(t.target);if(h.hasClass("nav-tab-link"))i=h.data("type"),n=h.parents(".posttypediv, .taxonomydiv").first(),e("input",n).removeAttr("checked"),e(".tabs-panel-active",n).removeClass("tabs-panel-active").addClass("tabs-panel-inactive"),e("#"+i,n).removeClass("tabs-panel-inactive").addClass("tabs-panel-active"),e(".tabs",n).removeClass("tabs"),h.parent().addClass("tabs"),e(".quick-search",n).focus(),t.preventDefault();else if(h.hasClass("select-all"))o=/#(.*)$/.exec(t.target.href),o&&o[1]&&(a=e("#"+o[1]+" .tabs-panel-active .menu-item-title input"),a.length===a.filter(":checked").length?a.removeAttr("checked"):a.prop("checked",!0));else if(h.hasClass("submit-add-to-menu")){for(s=h.parents(".options"),r=e('.tabs-panel-active input[type="checkbox"]:checked',s),p=e("textarea",s),l=e(".tagchecklist",s),c=p.val().split(","),u=0;u<c.length;u+=1)c[u]=parseInt(c[u],10);r.each(function(){d=e(this),m=parseInt(d.val(),10),f=d.parent("label").siblings(".menu-item-title").val(),-1===e.inArray(m,c)&&c.push(m),l.append('<span><a class="ntdelbutton" data-id="'+m+'">X</a> '+f+"</span>")}),p.text(c.join(",")),t.preventDefault()}else h.hasClass("ntdelbutton")&&(d=h,_=parseInt(d.data("id"),10),s=h.parents(".options"),p=e("textarea",s),l=e(".tagchecklist",s),c=p.val().split(","),c=e.grep(c,function(e){return parseInt(e,10)!==parseInt(_,10)}),d.parent("span").remove(),p.text(c.join(",")))})},attachQuickSearchListeners:function(){var t;e(".quick-search").keypress(function(o){var n=e(this);return 13===o.which?(i.updateQuickSearchResults(n),!1):(t&&clearTimeout(t),void(t=setTimeout(function(){i.updateQuickSearchResults(n)},400)))}).attr("autocomplete","off")},updateQuickSearchResults:function(t){var o,n,a=2,s=t.val();s.length<a||(o=t.parents(".tabs-panel"),n={action:"menu-quick-search","response-format":"markup",menu:null,"menu-settings-column-nonce":e("#menu-settings-column-nonce").val(),q:s,type:t.attr("name")},e(".spinner",o).show(),e.post(ajaxurl,n,function(e){i.processQuickSearchQueryResponse(e,n,o)}))},processQuickSearchQueryResponse:function(t,o,i){var n,a,s,r=e("form#post"),p={},l=/menu-item[(\[\^]\]*/,c=e("<div>").html(t).find("li");return c.length?(c.each(function(){if(s=e(this),n=l.exec(s.html()),n&&n[1]){for(a=n[1];r.elements["menu-item["+a+"][menu-item-type]"]||p[a];)a-=1;p[a]=!0,a!==n[1]&&s.html(s.html().replace(new RegExp("menu-item\\["+n[1]+"\\]","g"),"menu-item["+a+"]"))}}),e(".categorychecklist",i).html(c),e(".spinner",i).hide(),void e('[name^="menu-item"]').removeAttr("name")):(e(".categorychecklist",i).html("<li><p>noResultsFound</p></li>"),void e(".spinner",i).hide())},initialize_popup_page:function(){var o=function(t){var o,i,n=t.siblings(".options");t.is(":checked")?(n.show(),"popup_targeting_condition_on_entire_site"===t.attr("id")?(o=t.parents("#popmake_popup_targeting_condition_fields").find('[id^="targeting_condition-exclude_on_"]'),i=t.parents(".targeting_condition").siblings(".targeting_condition"),i.hide(),e("> *",i).prop("disabled",!0),o.show(),e("> *",o).prop("disabled",!1)):e("*",n).prop("disabled",!1)):(n.hide(),"popup_targeting_condition_on_entire_site"===t.attr("id")?(o=t.parents("#popmake_popup_targeting_condition_fields").find('[id^="targeting_condition-exclude_on_"]'),i=t.parents(".targeting_condition").siblings(".targeting_condition"),i.show(),e("> *",i).prop("disabled",!1),o.hide(),e("> *",o).prop("disabled",!0)):e("*",n).prop("disabled",!0))},i=function(t){var o=t.parents(".options").find('input[type="checkbox"]:eq(0)'),i=o.attr("name").indexOf("exclude")>=0,n=i?o.attr("name").replace("popup_targeting_condition_exclude_on_specific_",""):o.attr("name").replace("popup_targeting_condition_on_specific_",""),a=e(i?"#exclude_on_specific_"+n:"#on_specific_"+n);t.is(":checked")&&("true"===t.val()?(o.prop("checked",!0),a.show(),e("*",a).prop("disabled",!1)):""===t.val()&&(o.prop("checked",!1),a.hide(),e("*",a).prop("disabled",!0)))},n=function(){e("#popup_auto_open_session_cookie").is(":checked")?e(".not-session-cookie").hide():e(".not-session-cookie").show()},a=function(){e("#popup_auto_open_enabled").is(":checked")?(e(".auto-open-enabled").show(),n()):e(".auto-open-enabled").hide()},s=function(){e("#popup_auto_open_cookie_key").val((new Date).getTime().toString(16))};e('[name^="menu-item"]').removeAttr("name"),e("#title").prop("required",!0),e(t).on("click","#popup_auto_open_session_cookie",function(){n()}).on("click","#popup_auto_open_enabled",function(){a()}).on("click",".popmake-reset-auto-open-cookie-key",function(){s()}),e('#popmake_popup_targeting_condition_fields .targeting_condition > input[type="checkbox"]').on("click",function(){o(e(this))}).each(function(){o(e(this))}),e('input[type="radio"][id*="popup_targeting_condition_"]').on("click",function(){i(e(this))}).each(function(){i(e(this))}),e(".posttypediv, .taxonomydiv").each(function(){var t=e(this),o=e("> ul li"),i=e(".tabs-panel",t);o.removeClass("tabs"),o.eq(0).addClass("tabs"),i.removeClass("tabs-panel-active").addClass("tabs-panel-inactive").removeAttr("style"),i.eq(0).removeClass("tabs-panel-inactive").addClass("tabs-panel-active")}),a(),""===e("#popup_auto_open_cookie_key").val()&&s()}};e(t).ready(function(){i.init(),e(t).trigger("pum_init")})}(jQuery,document);var PUMMarketing;!function(e,t,o){"use strict";PUMMarketing={init:function(){e('#menu-posts-popup ul li a[href="edit.php?post_type=popup&page=extensions"]').css({color:"#9aba27"})}},e(t).ready(PUMMarketing.init)}(jQuery,document);var PUMModals;!function(e,t,o){"use strict";var i,n,a,s=e("html"),r=e(t),p="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";PUMModals={forceFocus:function(e){a&&!a.contains(e.target)&&(e.stopPropagation(),a.focus())},trapEscapeKey:function(e){27===e.keyCode&&(PUMModals.closeAll(),e.preventDefault())},trapTabKey:function(t){if(9===t.keyCode){var o=a.find("*").filter(p).filter(":visible"),i=e(":focus"),n=o.length,s=o.index(i);t.shiftKey?0===s&&(o.get(n-1).focus(),t.preventDefault()):s===n-1&&(o.get(0).focus(),t.preventDefault())}},setFocusToFirstItem:function(){a.find(".pum-modal-content *").filter(p).filter(":visible").first().focus()},closeAll:function(t){e(".pum-modal-background").off("keydown.pum_modal").hide(0,function(){e("html").css({overflow:"visible",width:"auto"}),i&&(i.attr("aria-hidden","false"),i=null),n.length&&n.focus(),a=null,r.off("focus.pum_modal"),o!==t&&t()}).attr("aria-hidden","true")},show:function(t,r){e(".pum-modal-background").off("keydown.pum_modal").hide(0).attr("aria-hidden","true"),s.data("origwidth",s.innerWidth()).css({overflow:"hidden",width:s.innerWidth()});var p=e(":focus");p.parents(".pum-modal-wrap").length||(n=p),a=e(t),a.on("keydown.pum_modal",function(e){PUMModals.trapEscapeKey(e),PUMModals.trapTabKey(e)}).show(0,function(){i=e("body > *").filter(":visible").not(a),i.attr("aria-hidden","true"),a.trigger("pum_init").on("focus.pum_modal",PUMModals.forceFocus),PUMModals.setFocusToFirstItem(),o!==r&&r()}).attr("aria-hidden","false")},remove:function(t){e(t).remove()},replace:function(t,o){PUMModals.remove(e.trim(t)),e("body").append(e.trim(o))},reload:function(e,t,o){PUMModals.replace(e,t),PUMModals.show(e,o)}},e(t).on("click",".pum-modal-background, .pum-modal-wrap .cancel, .pum-modal-wrap .pum-modal-close",function(t){var o=e(t.target);(o.hasClass("pum-modal-background")||o.hasClass("cancel")||o.hasClass("pum-modal-close")||o.hasClass("submitdelete"))&&(PUMModals.closeAll(),t.preventDefault(),t.stopPropagation())})}(jQuery,document);var PUMRangeSLiders;!function(e,t,o){"use strict";PUMRangeSLiders={init:function(){var o,i,n,a,s,r=e('<input type="range"/>'),p=e('<button type="button" class="popmake-range-plus">+</button>'),l=e('<button type="button" class="popmake-range-minus">-</button>');e(".popmake-range-manual").filter(":not(.initialized)").each(function(){var c=e(this).addClass("initialized"),u=c.data("force-minmax"),d=parseInt(c.prop("min"),0),m=parseInt(c.prop("max"),0),f=parseInt(c.prop("step"),0),_=parseInt(c.val(),0);n=r.clone(),a=p.clone(),s=l.clone(),u&&_>m&&(_=m,c.val(_)),n.prop({min:d||0,max:u||m&&m>_?m:1.5*_,step:f||1.5*_/100,value:_}).on("change input",function(){c.trigger("input")}),c.next().after(s,a),c.before(n),o=t.createElement("input"),o.setAttribute("type","range"),"text"===o.type&&e("input[type=range]").each(function(t,o){i=e(o),n=e("<div />").slider({min:parseInt(i.attr("min"),10)||0,max:parseInt(i.attr("max"),10)||100,value:parseInt(i.attr("value"),10)||0,step:parseInt(i.attr("step"),10)||1,slide:function(t,o){e(this).prev("input").val(o.value)}}),i.after(n).hide()})})}},e(t).on("pum_init",PUMRangeSLiders.init).on("input",'input[type="range"]',function(){var t=e(this);t.siblings(".popmake-range-manual").val(t.val())}).on("click",".popmake-range-manual",function(){var t=e(this);t.prop("readonly",!1)}).on("focusout",".popmake-range-manual",function(){var t=e(this);t.prop("readonly",!0)}).on("change",".popmake-range-manual",function(){var t=e(this),o=parseInt(t.prop("max"),0),i=parseInt(t.prop("step"),0),n=t.data("force-minmax"),a=parseInt(t.val(),0),s=t.prev();n&&a>o&&(a=o,t.val(a)),s.prop({max:n||o&&o>a?o:1.5*a,step:i||1.5*a/100,value:a})}).on("click",".popmake-range-plus",function(t){var o=e(this).siblings(".popmake-range-manual"),i=parseInt(o.prop("step"),0),n=parseInt(o.val(),0),a=n+i,s=o.prev();t.preventDefault(),o.val(a).trigger("input"),s.val(a)}).on("click",".popmake-range-minus",function(t){var o=e(this).siblings(".popmake-range-manual"),i=parseInt(o.prop("step"),0),n=parseInt(o.val(),0),a=n-i,s=o.prev();t.preventDefault(),o.val(a).trigger("input"),s.val(a)})}(jQuery,document);var PUMSelect2Fields;!function(e,t,o){"use strict";e.fn.pumSelect2=e.fn.select2,PUMSelect2Fields={init:function(){e(".pum-select2 select").filter(":not(.initialized)").each(function(){var t=e(this),i=t.data("current"),n=t.data("objecttype"),a=t.data("objectkey"),s={multiple:!1,dropdownParent:t.parent()};t.attr("multiple")&&(s.multiple=!0),n&&a&&(s=e.extend(s,{ajax:{url:ajaxurl,dataType:"json",delay:250,data:function(e){return{s:e.term,page:e.page,action:"pum_object_search",object_type:n,object_key:a}},processResults:function(e,t){return t.page=t.page||1,{results:e.items,pagination:{more:10*t.page<e.total_count}}},cache:!0},cache:!0,escapeMarkup:function(e){return e},minimumInputLength:1,templateResult:PUMSelect2Fields.formatObject,templateSelection:PUMSelect2Fields.formatObjectSelection})),t.addClass("initialized").pumSelect2(s),i!==o&&("object"!=typeof i&&(i=[i]),n&&a?e.ajax({url:ajaxurl,data:{action:"pum_object_search",object_type:n,object_key:a,include:i},dataType:"json",success:function(o){e.each(o.items,function(e,o){t.find('option[value="'+o.id+'"]').length||t.prepend('<option value="'+o.id+'">'+o.text+"</option>")}),t.val(i).trigger("change")}}):t.val(i).trigger("change"))})},formatObject:function(e){return e.text},formatObjectSelection:function(e){return e.text||e.text}},e(t).on("pum_init",PUMSelect2Fields.init)}(jQuery,document),function(e,t,o){function i(t,o){return-1!==e.inArray(o,t)}function n(e,t,o){var i=t[0];t.length>1?(e[i]||(e[i]=t[1]?{}:[]),n(e[i],t.slice(1),o)):(i||(i=e.length),e[i]=o)}var a="color,date,datetime,datetime-local,email,hidden,month,number,password,range,search,tel,text,time,url,week".split(","),s="select,textarea".split(","),r=/\[([^\]]*)\]/g;e.fn.serializeObject=function(t){e.extend({},t);var o={},p=e.extend(!0,{include:[],exclude:[],includeByClass:""},t);return this.find(":input").each(function(){var t;!this.name||this.disabled||i(p.exclude,this.name)||p.include.length&&!i(p.include,this.name)||-1===this.className.indexOf(p.includeByClass)||(t=this.name.replace(r,"[$1").split("["),t[0]&&(this.checked||i(a,this.type)||i(s,this.nodeName.toLowerCase()))&&("checkbox"===this.type&&t.push(""),n(o,t,e(this).val())))}),o}}(jQuery,document);var PUMTabs;!function(e,t,o){"use strict";PUMTabs={init:function(){e(".pum-tabs-container").filter(":not(.initialized)").each(function(){var t=e(this),o=t.find(".tab:first");t.hasClass("vertical-tabs")&&t.css({minHeight:t.find(".tabs").eq(0).outerHeight(!0)}),t.find(".active").removeClass("active"),o.addClass("active"),e(o.find("a").attr("href")).addClass("active"),t.addClass("initialized")})}},e(t).on("pum_init",PUMTabs.init).on("click",".pum-tabs-container .tab",function(t){var o=e(this),i=o.parents(".pum-tabs-container:first"),n=o.find("a").attr("href");i.find(".active").removeClass("active"),o.addClass("active"),e(n).addClass("active"),t.preventDefault()})}(jQuery,document);var PUM_Templates;!function(e,t,o){"use strict";var i=pum_admin.I10n;PUM_Templates={render:function(e,t){var o=wp.template(e);return"object"==typeof t.classes&&(t.classes=t.classes.join(" ")),t=PUM_Templates.prepareMeta(t),o(t)},shortcode:function(t){var o=e.extend(!0,{},{tag:"",meta:{},has_content:!1,content:""},t),i=o.has_content?"pum-shortcode-w-content":"pum-shortcode";return PUM_Templates.render(i,o)},modal:function(t){var o=e.extend(!0,{},{id:"",title:"",description:"",classes:"",save_button:i.save,cancel_button:i.cancel,content:""},t);return PUM_Templates.render("pum-modal",o)},tabs:function(t){var o=t.classes||[],i=e.extend(!0,{},{id:"",vertical:!0,form:!0,classes:"",tabs:{general:{label:"General",content:""}}},t);return i.form&&o.push("tabbed-form"),i.vertical&&o.push("vertical-tabs"),i.classes=i.classes+" "+o.join(" "),PUM_Templates.render("pum-tabs",i)},section:function(t){var o=e.extend(!0,{},{classes:[],fields:[]},t);return PUM_Templates.render("pum-field-section",o)},field:function(t){var i="pum-field-"+t.type,n=[],a=e.extend(!0,{},{type:"text",id:"",id_prefix:"",name:"",label:null,placeholder:"",desc:null,size:"regular",classes:[],value:null,select2:!1,multiple:!1,as_array:!1,options:[],object_type:null,object_key:null,std:null,min:0,max:50,step:1,unit:"px",required:!1,meta:{}},t);if(!e("#tmpl-"+i).length&&("objectselect"!==t.type&&"postselect"!==t.type&&"taxonomyselect"!==t.type||(i="pum-field-select"),!e("#tmpl-"+i).length))return"";switch(a.value||t.std===o||(a.value=t.std),"string"==typeof a.classes&&(a.classes=a.classes.split(" ")),t["class"]!==o&&a.classes.push(t["class"]),a.required&&(a.meta.required=!0,a.classes.push("pum-required")),t.type){case"select":case"objectselect":case"postselect":case"taxonomyselect":a.options!==o&&(_.each(a.options,function(e,t){var o=!1;a.multiple&&a.value.indexOf(e)!==!1?o="selected":a.multiple||a.value!=e||(o="selected"),n.push(PUM_Templates.prepareMeta({label:t,value:e,meta:{selected:o}}))}),a.options=n),a.multiple&&(a.meta.multiple=!0,a.as_array&&(a.name+="[]"),a.value&&a.value.length||(a.value=[]),"string"==typeof a.value&&(a.value=[a.value])),"select"!==t.type&&(a.select2=!0,a.classes.push("pum-field-objectselect"),a.classes.push("postselect"===t.type?"pum-field-postselect":"pum-field-taxonomyselect"),a.meta["data-objecttype"]="postselect"===t.type?"post_type":"taxonomy",a.meta["data-objectkey"]="postselect"===t.type?t.post_type:t.taxonomy,a.meta["data-current"]=a.value),a.select2&&(a.classes.push("pum-select2"),a.placeholder&&(a.meta["data-placeholder"]=a.placeholder));break;case"multicheck":a.options!==o&&(_.each(a.options,function(e,t){n.push({label:t,value:e,meta:{checked:a.value.indexOf(e)>=0}})}),a.options=n);break;case"checkbox":1===parseInt(a.value,10)&&(a.meta.checked=!0);break;case"rangeslider":a.meta.readonly=!0,a.meta.step=a.step,a.meta.min=a.min,a.meta.max=a.max;break;case"textarea":a.meta.cols=a.cols,a.meta.rows=a.rows}return a.field=PUM_Templates.render(i,a),PUM_Templates.render("pum-field-wrapper",a)},prepareMeta:function(e){var t,o=[];for(t in e.meta)e.meta.hasOwnProperty(t)&&("boolean"==typeof e.meta[t]?e.meta[t]&&o.push(_.escape(t)):o.push(_.escape(t)+'="'+_.escape(e.meta[t])+'"'));return e.meta=o.join(" "),e}}}(jQuery,document);var PUMTriggers;!function(e,t,o){"use strict";var i=pum_admin.I10n,n=pum_admin.defaults;PUMTriggers={new_cookie:null,getLabel:function(e){return i.labels.triggers[e].name},getSettingsDesc:function(e,t){var o={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"},n=_.template(i.labels.triggers[e].settings_column,null,o);return t.I10n=i,n(t)},renumber:function(){e("#pum_popup_triggers_list tbody tr").each(function(){var t=e(this),o=t.parent().children().index(t),i=t.data("index");t.data("index",o),t.find("input").each(function(){var e="["+o+"]";this.name=this.name.replace("["+i+"]",e).replace("[]",e)})})},refreshDescriptions:function(){e("#pum_popup_triggers_list tbody tr").each(function(){var t=e(this),o=t.find(".popup_triggers_field_type").val(),i=JSON.parse(t.find(".popup_triggers_field_settings:first").val()),n=PUMTriggers.cookie_column_value(i.cookie.name);t.find("td.settings-column").html(PUMTriggers.getSettingsDesc(o,i)),t.find("td.cookie-column code").text(n)})},initEditForm:function(t){var o=e(".trigger-editor .pum-form"),i=e("#name",o),n=t.trigger_settings;e("#pum_popup_cookies_list tbody tr").each(function(){var t=JSON.parse(e(this).find(".popup_cookies_field_settings:first").val());i.find('option[value="'+t.name+'"]').length||e('<option value="'+t.name+'">'+t.name+"</option>").appendTo(i)}),i.val(n.cookie.name),i.trigger("chosen:updated")},cookie_column_value:function(e){var t=i.no_cookie;return e instanceof Array?t=e.join(", "):null!==e&&(t=e),t}},PUMTriggers.refreshDescriptions(),e(t).on("select2:select","#pum-first-trigger",function(){var t=e(this),a=t.val(),s="pum-trigger-settings-"+a,r="#"+s.replace(/-/g,"_"),p=wp.template(s),l={};l.trigger_settings=n.triggers[a]!==o?n.triggers[a]:{},l.save_button_text=i.add,l.index=null,p.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(r,p(l)),PUMTriggers.initEditForm(l),t.val(null).trigger("change")}).on("click","#pum_popup_triggers .add-new",function(){var e=wp.template("pum-trigger-add-type");PUMModals.reload("#pum_trigger_add_type_modal",e())}).on("click","#pum_popup_triggers_list .edit",function(t){var o=e(this),n=o.parents("tr:first"),a=n.find(".popup_triggers_field_type").val(),s="pum-trigger-settings-"+a,r="#"+s.replace(/-/g,"_"),p=wp.template(s),l={index:n.parent().children().index(n),type:a,trigger_settings:JSON.parse(n.find(".popup_triggers_field_settings:first").val())};t.preventDefault(),l.save_button_text=i.save,p.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(r,p(l)),PUMTriggers.initEditForm(l)}).on("click","#pum_popup_triggers_list .remove",function(t){var o=e(this),n=o.parents("tr:first");t.preventDefault(),window.confirm(i.confirm_delete_trigger)&&(n.remove(),e("#pum_popup_triggers_list tbody tr").length||(e("#pum-first-trigger").val(null).trigger("change"),e("#pum_popup_trigger_fields").removeClass("has-triggers")),PUMTriggers.renumber())}).on("submit","#pum_trigger_add_type_modal .pum-form",function(t){var a=e("#popup_trigger_add_type").val(),s="pum-trigger-settings-"+a,r="#"+s.replace(/-/g,"_"),p=wp.template(s),l={};t.preventDefault(),l.trigger_settings=n.triggers[a]!==o?n.triggers[a]:{},l.save_button_text=i.add,l.index=null,p.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(r,p(l)),PUMTriggers.initEditForm(l)}).on("submit",".trigger-editor .pum-form",function(t){var o,n=e(this),a=(n.find("input.type").val(),n.serializeObject()),s=parseInt(a.index),r=s>=0?e("#pum_popup_triggers_list tbody tr").eq(s):null,p=wp.template("pum-trigger-row");t.preventDefault(),(!s||0>s)&&(a.index=e("#pum_popup_triggers_list tbody tr").length),a.I10n=i,o=p(a),r?r.replaceWith(o):e("#pum_popup_triggers_list tbody").append(o),PUMModals.closeAll(),PUMTriggers.renumber(),PUMTriggers.refreshDescriptions(),e("#pum_popup_trigger_fields").addClass("has-triggers"),null!==a.trigger_settings.cookie.name&&a.trigger_settings.cookie.name.indexOf("add_new")>=0&&(PUMTriggers.new_cookie=a.index,e("#pum_popup_cookie_fields button.add-new").trigger("click"))}).ready(function(){PUMTriggers.refreshDescriptions(),e("#pum-first-trigger").val(null).trigger("change")})}(jQuery,document);var PUMUtils;!function(e,t,o){"use strict";PUMUtils={convert_meta_to_object:function(e){var t,i,n,a={};for(n in e)e.hasOwnProperty(n)&&(t=n.split(/_(.+)?/)[0],i=n.split(/_(.+)?/)[1],a[t]===o&&(a[t]={}),a[t][i]=e[n]);return a},serialize_form:function(t){var o={};return e("[name]",t).each(function(){var t,i,n=e(this).attr("name"),a=e(this).val(),s=n.split("["),r=o,p=s.length;for(t=0;p>t;t+=1)i=s[t].replace("]",""),r[i]||(r[i]={}),t!==s.length-1?r=r[i]:t===s.length-1&&(r[i]=a)}),o},convert_hex:function(e,t){if(o===e)return"";o===t&&(t=100),e=e.replace("#","");var i=parseInt(e.substring(0,2),16),n=parseInt(e.substring(2,4),16),a=parseInt(e.substring(4,6),16),s="rgba("+i+","+n+","+a+","+t/100+")";return s},debounce:function(e,t){var o;return function(){var i=this,n=arguments;window.clearTimeout(o),o=window.setTimeout(function(){e.apply(i,n)},t)}},throttle:function(e,t){var o=!1,i=function(){o=!1};return function(){o||(e(),window.setTimeout(i,t),o=!0)}}},String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)}}(jQuery,document);var PopMakeAdmin,PUM_Admin;!function(e,t,o){"use strict";var i=e(t);pum_admin.I10n,pum_admin.defaults;PUM_Admin={},PopMakeAdmin={init:function(){e("body.post-type-popup form#post").length&&PopMakeAdmin.initialize_popup_page(),e("body.post-type-popup_theme form#post").length&&PopMakeAdmin.initialize_theme_page()},initialize_popup_page:function(){var o=function(){"custom"===e("#popup_display_size").val()?(e(".custom-size-only").show(),e(".responsive-size-only").hide(),e("#popup_display_custom_height_auto").is(":checked")?e(".custom-size-height-only").hide():e(".custom-size-height-only").show()):(e(".custom-size-only").hide(),"auto"!==e("#popup_display_size").val()?(e(".responsive-size-only").show(),e("#popup_display_custom_height_auto").prop("checked",!1)):e(".responsive-size-only").hide())},i=function(){e(".animation-speed, .animation-origin").hide(),"fade"===e("#popup_display_animation_type").val()?e(".animation-speed").show():"none"!==e("#popup_display_animation_type").val()&&e(".animation-speed, .animation-origin").show()},n=function(){var t=e("#popup_display_location"),o=t.parents("table"),i=t.val();e("tr.top, tr.right, tr.left, tr.bottom",o).hide(),i.indexOf("top")>=0&&e("tr.top").show(),i.indexOf("left")>=0&&e("tr.left").show(),i.indexOf("bottom")>=0&&e("tr.bottom").show(),i.indexOf("right")>=0&&e("tr.right").show();
|
2 |
+
};e("#popuptitlediv").insertAfter("#titlediv"),e("#title").prop("required",!0),e(t).on("keydown","#popuptitle",function(t){var o=t.keyCode||t.which;9===o&&(t.preventDefault(),e("#title").focus())}).on("keydown","#title, #popuptitle",function(t){var o,i=t.keyCode||t.which;t.shiftKey||9!==i||(t.preventDefault(),o="title"===e(this).attr("id")?"#popuptitle":"#insert-media-button",e(o).focus())}).on("keydown","#popuptitle, #insert-media-button",function(t){var o,i=t.keyCode||t.which;t.shiftKey&&9===i&&(t.preventDefault(),o="popuptitle"===e(this).attr("id")?"#title":"#popuptitle",e(o).focus())}).on("click","#popup_display_custom_height_auto",function(){o()}).on("change","#popup_display_size",function(){"custom"!==e("#popup_display_size").val()&&"auto"!==e("#popup_display_size").val()&&e("#popup_display_position_fixed, #popup_display_scrollable_content").prop("checked",!1),o()}).on("change","#popup_display_animation_type",function(){i()}).on("change","#popup_display_location",function(){n()}),o(),i(),n()},theme_page_listeners:function(){var o=this;e(t).on("change","select.font-family",function(){e("select.font-weight option, select.font-style option",e(this).parents("table")).prop("selected",!1),o.update_font_selectboxes()}).on("change","select.font-weight, select.font-style",function(){o.update_font_selectboxes()}).on("change input focusout","select, input",function(){o.update_theme()}).on("change","select.border-style",function(){var t=e(this);"none"===t.val()?t.parents("table").find(".border-options").hide():t.parents("table").find(".border-options").show()}).on("change","#popup_theme_close_location",function(){var t=e(this),o=t.parents("table");e("tr.topleft, tr.topright, tr.bottomleft, tr.bottomright",o).hide(),e("tr."+t.val(),o).show()})},update_theme:function(){var t,o=e("[name^='popup_theme_']").serializeArray(),i={};for(t=0;o.length>t;t+=1)0===o[t].name.indexOf("popup_theme_")&&(i[o[t].name.replace("popup_theme_","")]=o[t].value);this.retheme_popup(i)},theme_preview_scroll:function(){var t=e("#popmake-theme-editor .empreview, body.post-type-popup_theme form#post #popmake_popup_theme_preview"),o=t.parent(),i=t.offset().top-50;e(window).on("scroll",function(){e("> .postbox:visible",o).index(t)===e("> .postbox:visible",o).length-1&&e(window).scrollTop()>=i?t.css({left:t.offset().left,width:t.width(),height:t.height(),position:"fixed",top:50}):t.removeAttr("style")})},update_font_selectboxes:function(){return e("select.font-family").each(function(){var t,i,n=e(this),a=n.parents("table").find("select.font-weight"),s=n.parents("table").find("select.font-style"),r=a.find("option"),p=s.find("option");if(popmake_google_fonts[n.val()]!==o){if(t=popmake_google_fonts[n.val()],r.hide(),p.hide(),t.variants.length)for(i=0;t.variants.length>i;i+=1)"regular"===t.variants[i]?(e('option[value=""]',a).show(),e('option[value=""]',s).show()):(t.variants[i].indexOf("italic")>=0&&e('option[value="italic"]',s).show(),e('option[value="'+parseInt(t.variants[i],10)+'"]',a).show())}else r.show(),p.show();a.parents("tr:first").show(),a.find("option:visible").length<=1?a.parents("tr:first").hide():a.parents("tr:first").show(),s.parents("tr:first").show(),s.find("option:visible").length<=1?s.parents("tr:first").hide():s.parents("tr:first").show()})},convert_theme_for_preview:function(e){},initialize_theme_page:function(){e("#popuptitlediv").insertAfter("#titlediv");var o=this,i=e("#popup_theme_close_location").parents("table");switch(o.update_theme(),o.theme_page_listeners(),o.theme_preview_scroll(),o.update_font_selectboxes(),e(t).on("click",".popmake-preview",function(t){t.preventDefault(),e("#popmake-preview, #popmake-overlay").css({visibility:"visible"}).show()}).on("click",".popmake-close",function(){e("#popmake-preview, #popmake-overlay").hide()}),e("select.border-style").each(function(){var t=e(this);"none"===t.val()?t.parents("table").find(".border-options").hide():t.parents("table").find(".border-options").show()}),e(".color-picker.background-color").each(function(){var t=e(this);""===t.val()?t.parents("table").find(".background-opacity").hide():t.parents("table").find(".background-opacity").show()}),e("tr.topleft, tr.topright, tr.bottomleft, tr.bottomright",i).hide(),e("#popup_theme_close_location").val()){case"topleft":e("tr.topleft",i).show();break;case"topright":e("tr.topright",i).show();break;case"bottomleft":e("tr.bottomleft",i).show();break;case"bottomright":e("tr.bottomright",i).show()}},retheme_popup:function(i){var n,a=e(".empreview .example-popup-overlay, #popmake-overlay"),s=e(".empreview .example-popup, #popmake-preview"),r=e(".title, .popmake-title",s),p=e(".content, .popmake-content",s),l=e(".close-popup, .popmake-close",s),c="yes"===i.container_boxshadow_inset?"inset ":"",u="yes"===i.close_boxshadow_inset?"inset ":"";switch(this.convert_theme_for_preview(i),popmake_google_fonts[i.title_font_family]!==o&&(n="//fonts.googleapis.com/css?family="+i.title_font_family,"normal"!==i.title_font_weight&&(n+=":"+i.title_font_weight),"italic"===i.title_font_style&&(-1===n.indexOf(":")&&(n+=":"),n+="italic"),e("body").append('<link href="'+n+'" rel="stylesheet" type="text/css">')),popmake_google_fonts[i.content_font_family]!==o&&(n="//fonts.googleapis.com/css?family="+i.content_font_family,"normal"!==i.content_font_weight&&(n+=":"+i.content_font_weight),"italic"===i.content_font_style&&(-1===n.indexOf(":")&&(n+=":"),n+="italic"),e("body").append('<link href="'+n+'" rel="stylesheet" type="text/css">')),popmake_google_fonts[i.close_font_family]!==o&&(n="//fonts.googleapis.com/css?family="+i.close_font_family,"normal"!==i.close_font_weight&&(n+=":"+i.close_font_weight),"italic"===i.close_font_style&&(-1===n.indexOf(":")&&(n+=":"),n+="italic"),e("body").append('<link href="'+n+'" rel="stylesheet" type="text/css">')),a.removeAttr("style").css({backgroundColor:PUMUtils.convert_hex(i.overlay_background_color,i.overlay_background_opacity)}),s.removeAttr("style").css({padding:i.container_padding+"px",backgroundColor:PUMUtils.convert_hex(i.container_background_color,i.container_background_opacity),borderStyle:i.container_border_style,borderColor:i.container_border_color,borderWidth:i.container_border_width+"px",borderRadius:i.container_border_radius+"px",boxShadow:c+i.container_boxshadow_horizontal+"px "+i.container_boxshadow_vertical+"px "+i.container_boxshadow_blur+"px "+i.container_boxshadow_spread+"px "+PUMUtils.convert_hex(i.container_boxshadow_color,i.container_boxshadow_opacity)}),r.removeAttr("style").css({color:i.title_font_color,lineHeight:i.title_line_height+"px",fontSize:i.title_font_size+"px",fontFamily:i.title_font_family,fontStyle:i.title_font_style,fontWeight:i.title_font_weight,textAlign:i.title_text_align,textShadow:i.title_textshadow_horizontal+"px "+i.title_textshadow_vertical+"px "+i.title_textshadow_blur+"px "+PUMUtils.convert_hex(i.title_textshadow_color,i.title_textshadow_opacity)}),p.removeAttr("style").css({color:i.content_font_color,fontFamily:i.content_font_family,fontStyle:i.content_font_style,fontWeight:i.content_font_weight}),l.html(i.close_text).removeAttr("style").css({padding:i.close_padding+"px",height:i.close_height>0?i.close_height+"px":"auto",width:i.close_width>0?i.close_width+"px":"auto",backgroundColor:PUMUtils.convert_hex(i.close_background_color,i.close_background_opacity),color:i.close_font_color,lineHeight:i.close_line_height+"px",fontSize:i.close_font_size+"px",fontFamily:i.close_font_family,fontWeight:i.close_font_weight,fontStyle:i.close_font_style,borderStyle:i.close_border_style,borderColor:i.close_border_color,borderWidth:i.close_border_width+"px",borderRadius:i.close_border_radius+"px",boxShadow:u+i.close_boxshadow_horizontal+"px "+i.close_boxshadow_vertical+"px "+i.close_boxshadow_blur+"px "+i.close_boxshadow_spread+"px "+PUMUtils.convert_hex(i.close_boxshadow_color,i.close_boxshadow_opacity),textShadow:i.close_textshadow_horizontal+"px "+i.close_textshadow_vertical+"px "+i.close_textshadow_blur+"px "+PUMUtils.convert_hex(i.close_textshadow_color,i.close_textshadow_opacity)}),i.close_location){case"topleft":l.css({top:i.close_position_top+"px",left:i.close_position_left+"px"});break;case"topright":l.css({top:i.close_position_top+"px",right:i.close_position_right+"px"});break;case"bottomleft":l.css({bottom:i.close_position_bottom+"px",left:i.close_position_left+"px"});break;case"bottomright":l.css({bottom:i.close_position_bottom+"px",right:i.close_position_right+"px"})}e(t).trigger("popmake-admin-retheme",[i])}},i.ready(function(){PopMakeAdmin.init(),i.trigger("pum_init")})}(jQuery,document);
|
assets/js/site.js
CHANGED
@@ -966,15 +966,15 @@ var PUM_Analytics;
|
|
966 |
* @deprecated
|
967 |
* @returns {$.fn.popmake.animations}
|
968 |
*/
|
969 |
-
grow: function () {
|
970 |
-
return $.fn.popmake.animations.fade.apply(this,
|
971 |
},
|
972 |
/**
|
973 |
* @deprecated
|
974 |
* @returns {$.fn.popmake.animations}
|
975 |
*/
|
976 |
-
growAndSlide: function () {
|
977 |
-
return $.fn.popmake.animations.fadeAndSlide.apply(this,
|
978 |
}
|
979 |
};
|
980 |
|
966 |
* @deprecated
|
967 |
* @returns {$.fn.popmake.animations}
|
968 |
*/
|
969 |
+
grow: function (callback) {
|
970 |
+
return $.fn.popmake.animations.fade.apply(this, arguments);
|
971 |
},
|
972 |
/**
|
973 |
* @deprecated
|
974 |
* @returns {$.fn.popmake.animations}
|
975 |
*/
|
976 |
+
growAndSlide: function (callback) {
|
977 |
+
return $.fn.popmake.animations.fadeAndSlide.apply(this, arguments);
|
978 |
}
|
979 |
};
|
980 |
|
assets/js/site.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){"use strict";void 0===e.fn.on&&(e.fn.on=function(e,t,o){return this.delegate(t,e,o)}),void 0===e.fn.off&&(e.fn.off=function(e,t,o){return this.undelegate(t,e,o)}),void 0===e.fn.bindFirst&&(e.fn.bindFirst=function(t,o){var n,i,a=e(this);a.unbind(t,o),a.bind(t,o),n=e._data(a[0]).events,i=n[t],i.unshift(i.pop()),n[t]=i}),void 0===e.fn.outerHtml&&(e.fn.outerHtml=function(){var t=e(this).clone(),o=e("<div/>").append(t);return o.html()}),void 0===Date.now&&(Date.now=function(){return(new Date).getTime()})}(jQuery);var PUM;!function(e,t,o){"use strict";PUM={getPopup:function(t){var o=e(t);return o.hasClass("pum-overlay")?o:o.hasClass("popmake")?o.parents(".pum-overlay"):o.parents(".pum-overlay").length?o.parents(".pum-overlay"):e()}},e.fn.popmake=function(t){return e.fn.popmake.methods[t]?e.fn.popmake.methods[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist on $.fn.popmake"):e.fn.popmake.methods.init.apply(this,arguments)},e.fn.popmake.methods={init:function(t){return this.each(function(){var o=PUM.getPopup(this),n=e.extend(!0,{},e.fn.popmake.defaults,o.data("popmake"),t);return n.theme_id<=0&&(n.theme_id=popmake_default_theme),e(window).on("resize",function(){(o.hasClass("pum-active")||o.find(".popmake.active").length)&&e.fn.popmake.utilities.throttle(setTimeout(function(){o.popmake("reposition")},25),500,!1)}),"string"==typeof popmake_powered_by&&""!==popmake_powered_by&&o.popmake("getContent").append(e(popmake_powered_by)),o.find(".pum-container").data("popmake",n),o.data("popmake",n).trigger("pumInit"),this})},getOverlay:function(){return e(this)},getContainer:function(){return e(this).find(".pum-container")},getTitle:function(){return e(this).find(".pum-title")||null},getContent:function(){return e(this).find(".pum-content")||null},getClose:function(){return e(this).find(".pum-content + .pum-close")||null},getSettings:function(){return e(this).data("popmake")},open:function(t){var n=PUM.getPopup(this),i=n.popmake("getContainer"),a=n.popmake("getClose"),p=n.popmake("getSettings"),s=e("html");return p.meta.display.stackable||n.popmake("close_all"),n.addClass("pum-active").popmake("setup_close").popmake("reposition").trigger("pumBeforeOpen"),p.meta.close.button_delay>0&&a.fadeOut(0),n.hasClass("preventOpen")||i.hasClass("preventOpen")?(n.removeClass("preventOpen").removeClass("pum-active").trigger("pumOpenPrevented"),this):(s.addClass("pum-open"),p.meta.display.overlay_disabled?s.addClass("pum-open-overlay-disabled"):s.addClass("pum-open-overlay"),p.meta.display.position_fixed!==o&&p.meta.display.position_fixed?s.addClass("pum-open-fixed"):s.addClass("pum-open-scrollable"),n.css({"z-index":p.meta.display.overlay_zindex||1999999998}).popmake("animate",p.meta.display.animation_type,function(){p.meta.close.button_delay>0&&setTimeout(function(){a.fadeIn()},p.meta.close.button_delay),n.trigger("pumAfterOpen"),e.fn.popmake.last_open_popup=n,t!==o&&t()}),this)},setup_close:function(){var t=PUM.getPopup(this),o=t.popmake("getClose").add(e(".popmake-close",t)),n=t.popmake("getSettings");return o.off("click.popmake click.pum").on("click.popmake click.pum",function(o){o.preventDefault(),o.stopPropagation(),e.fn.popmake.last_close_trigger="Close Button",t.popmake("close")}),(n.meta.close.esc_press||n.meta.close.f4_press)&&e(window).off("keyup.popmake").on("keyup.popmake",function(o){27===o.keyCode&&n.meta.close.esc_press&&(e.fn.popmake.last_close_trigger="ESC Key",t.popmake("close")),115===o.keyCode&&n.meta.close.f4_press&&(e.fn.popmake.last_close_trigger="F4 Key",t.popmake("close"))}),n.meta.close.overlay_click&&t.off("click.popmake").on("click.popmake",function(o){o.target===t[0]&&(e.fn.popmake.last_close_trigger="Overlay Click",t.popmake("close"))}),t.trigger("pumSetupClose"),this},close:function(t){return this.each(function(){var n=PUM.getPopup(this),i=n.popmake("getContainer"),a=n.popmake("getClose").add(e(".popmake-close",n));return n.trigger("pumBeforeClose"),n.hasClass("preventClose")||i.hasClass("preventClose")?(n.removeClass("preventClose").trigger("pumClosePrevented"),this):(i.fadeOut("fast",function(){n.is(":visible")&&n.fadeOut("fast"),e(window).off("keyup.popmake"),n.off("click.popmake"),a.off("click.popmake"),e("html").removeClass("pum-open").removeClass("pum-open-scrollable").removeClass("pum-open-overlay-disabled").removeClass("pum-open-fixed"),n.removeClass("pum-active").trigger("pumAfterClose"),i.find("iframe").filter('[src*="youtube"],[src*="vimeo"]').each(function(){var t=e(this),o=t.attr("src"),n=o.replace("autoplay=1","1=1");n!==o&&(o=n),t.prop("src",o)}),i.find("video").each(function(){this.pause()}),t!==o&&t()}),this)})},close_all:function(){return e(".pum-active").popmake("close"),this},reposition:function(t){var o=PUM.getPopup(this).trigger("pumBeforeReposition"),n=o.popmake("getContainer"),i=o.popmake("getSettings"),a=i.meta.display,p=a.location,s={my:"",at:""},r={overlay:null,container:null};return p.indexOf("left")>=0&&(s={my:s.my+" left"+(0!==a.position_left?"+"+a.position_left:""),at:s.at+" left"}),p.indexOf("right")>=0&&(s={my:s.my+" right"+(0!==a.position_right?"-"+a.position_right:""),at:s.at+" right"}),p.indexOf("center")>=0&&(s="center"===p?{my:"center",at:"center"}:{my:s.my+" center",at:s.at+" center"}),p.indexOf("top")>=0&&(s={my:s.my+" top"+(0!==a.position_top?"+"+(e("body").hasClass("admin-bar")?parseInt(a.position_top,10)+32:a.position_top):""),at:s.at+" top"}),p.indexOf("bottom")>=0&&(s={my:s.my+" bottom"+(0!==a.position_bottom?"-"+a.position_bottom:""),at:s.at+" bottom"}),s.my=e.trim(s.my),s.at=e.trim(s.at),s.of=window,s.collision="none",s.using="function"==typeof t?t:e.fn.popmake.callbacks.reposition_using,o.is(":hidden")&&(r.overlay=o.css("opacity"),o.css({opacity:0}).show()),n.is(":hidden")&&(r.container=n.css("opacity"),n.css({opacity:0}).show()),a.position_fixed&&n.addClass("fixed"),"custom"===i.meta.display.size?n.css({width:i.meta.display.custom_width+i.meta.display.custom_width_unit,height:i.meta.display.custom_height_auto?"auto":i.meta.display.custom_height+i.meta.display.custom_height_unit}):"auto"!==i.meta.display.size&&n.addClass("responsive").css({minWidth:""!==i.meta.display.responsive_min_width?i.meta.display.responsive_min_width+i.meta.display.responsive_min_width_unit:"auto",maxWidth:""!==i.meta.display.responsive_max_width?i.meta.display.responsive_max_width+i.meta.display.responsive_max_width_unit:"auto"}),n.addClass("custom-position").position(s).trigger("popmakeAfterReposition"),r.overlay&&o.css({opacity:r.overlay}).hide(),r.container&&n.css({opacity:r.container}).hide(),this},retheme:function(t){e(this).trigger("popmakeBeforeRetheme");var n,i,a=PUM.getPopup(this),p=a.popmake("getContainer"),s=a.popmake("getTitle"),r=a.popmake("getContent"),c=a.popmake("getClose"),l=a.popmake("getSettings");switch(t===o&&(t=e.fn.popmake.themes[l.theme_id],t===o&&(t=e.fn.popmake.themes[1])),n="yes"===t.container.boxshadow_inset?"inset ":"",i="yes"===t.close.boxshadow_inset?"inset ":"",a.removeAttr("style").css({backgroundColor:e.fn.popmake.utilities.convert_hex(t.overlay.background_color,t.overlay.background_opacity),zIndex:l.meta.display.overlay_zindex||998}),p.css({padding:t.container.padding+"px",backgroundColor:e.fn.popmake.utilities.convert_hex(t.container.background_color,t.container.background_opacity),borderStyle:t.container.border_style,borderColor:t.container.border_color,borderWidth:t.container.border_width+"px",borderRadius:t.container.border_radius+"px",boxShadow:n+t.container.boxshadow_horizontal+"px "+t.container.boxshadow_vertical+"px "+t.container.boxshadow_blur+"px "+t.container.boxshadow_spread+"px "+e.fn.popmake.utilities.convert_hex(t.container.boxshadow_color,t.container.boxshadow_opacity),zIndex:l.meta.display.zindex||999}),s.css({color:t.title.font_color,lineHeight:t.title.line_height+"px",fontSize:t.title.font_size+"px",fontFamily:t.title.font_family,fontWeight:t.title.font_weight,fontStyle:t.title.font_style,textAlign:t.title.text_align,textShadow:t.title.textshadow_horizontal+"px "+t.title.textshadow_vertical+"px "+t.title.textshadow_blur+"px "+e.fn.popmake.utilities.convert_hex(t.title.textshadow_color,t.title.textshadow_opacity)}),r.css({color:t.content.font_color,fontFamily:t.content.font_family,fontWeight:t.content.font_weight,fontStyle:t.content.font_style}),e("p, label",r).css({color:t.content.font_color,fontFamily:t.content.font_family}),c.html(t.close.text).css({padding:t.close.padding+"px",height:t.close.height+"px",width:t.close.width+"px",backgroundColor:e.fn.popmake.utilities.convert_hex(t.close.background_color,t.close.background_opacity),color:t.close.font_color,lineHeight:t.close.line_height+"px",fontSize:t.close.font_size+"px",fontWeight:t.close.font_weight,fontStyle:t.close.font_style,fontFamily:t.close.font_family,borderStyle:t.close.border_style,borderColor:t.close.border_color,borderWidth:t.close.border_width+"px",borderRadius:t.close.border_radius+"px",boxShadow:i+t.close.boxshadow_horizontal+"px "+t.close.boxshadow_vertical+"px "+t.close.boxshadow_blur+"px "+t.close.boxshadow_spread+"px "+e.fn.popmake.utilities.convert_hex(t.close.boxshadow_color,t.close.boxshadow_opacity),textShadow:t.close.textshadow_horizontal+"px "+t.close.textshadow_vertical+"px "+t.close.textshadow_blur+"px "+e.fn.popmake.utilities.convert_hex(t.close.textshadow_color,t.close.textshadow_opacity),left:"auto",right:"auto",bottom:"auto",top:"auto"}),t.close.location){case"topleft":c.css({top:t.close.position_top+"px",left:t.close.position_left+"px"});break;case"topright":c.css({top:t.close.position_top+"px",right:t.close.position_right+"px"});break;case"bottomleft":c.css({bottom:t.close.position_bottom+"px",left:t.close.position_left+"px"});break;case"bottomright":c.css({bottom:t.close.position_bottom+"px",right:t.close.position_right+"px"})}return a.trigger("popmakeAfterRetheme",[t]),this},animation_origin:function(t){var o=PUM.getPopup(this),n=o.popmake("getContainer"),i={my:"",at:""};switch(t){case"top":i={my:"left+"+n.offset().left+" bottom-100",at:"left top"};break;case"bottom":i={my:"left+"+n.offset().left+" top+100",at:"left bottom"};break;case"left":i={my:"right top+"+n.offset().top,at:"left top"};break;case"right":i={my:"left top+"+n.offset().top,at:"right top"};break;default:t.indexOf("left")>=0&&(i={my:i.my+" right",at:i.at+" left"}),t.indexOf("right")>=0&&(i={my:i.my+" left",at:i.at+" right"}),t.indexOf("center")>=0&&(i={my:i.my+" center",at:i.at+" center"}),t.indexOf("top")>=0&&(i={my:i.my+" bottom-100",at:i.at+" top"}),t.indexOf("bottom")>=0&&(i={my:i.my+" top+100",at:i.at+" bottom"}),i.my=e.trim(i.my),i.at=e.trim(i.at)}return i.of=window,i.collision="none",i}}}(jQuery,document);var PUM_Accessibility;!function(e,t,o){"use strict";var n,i,a,p="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";PUM_Accessibility={forceFocus:function(t){a&&!e.contains(a,t.target)&&(t.stopPropagation(),PUM_Accessibility.setFocusToFirstItem())},trapTabKey:function(t){if(9===t.keyCode){var o=a.find(".pum-container *").filter(p).filter(":visible"),n=e(":focus"),i=o.length,s=o.index(n);t.shiftKey?0===s&&(o.get(i-1).focus(),t.preventDefault()):s===i-1&&(o.get(0).focus(),t.preventDefault())}},setFocusToFirstItem:function(){a.find(".pum-container *").filter(p).filter(":visible").filter(":not(.pum-close)").first().focus()}},e(t).on("pumInit",".pum",function(){PUM.getPopup(this).find("[tabindex]").each(function(){var t=e(this);t.data("tabindex",t.attr("tabindex")).prop("tabindex","0")})}).on("pumBeforeOpen",".pum",function(){var o=PUM.getPopup(this),p=e(":focus");o.has(p).length||(i=p),a=o.on("keydown.pum_accessibility",PUM_Accessibility.trapTabKey).attr("aria-hidden","false"),n=e("body > *").filter(":visible").not(a),n.attr("aria-hidden","true"),e(t).on("focus.pum_accessibility",PUM_Accessibility.forceFocus),PUM_Accessibility.setFocusToFirstItem()}).on("pumAfterOpen",".pum",function(){}).on("pumBeforeClose",".pum",function(){}).on("pumAfterClose",".pum",function(){var o=PUM.getPopup(this);o.off("keydown.pum_accessibility").attr("aria-hidden","true"),n&&(n.attr("aria-hidden","false"),n=null),i.length&&i.focus(),a=null,e(t).off("focus.pum_accessibility")}).on("pumSetupClose",".pum",function(){}).on("pumOpenPrevented",".pum",function(){}).on("pumClosePrevented",".pum",function(){}).on("pumBeforeReposition",".pum",function(){})}(jQuery,document);var PUM_Analytics;!function(e,t,o){"use strict";e.fn.popmake.last_open_trigger=null,e.fn.popmake.last_close_trigger=null,e.fn.popmake.conversion_trigger=null,PUM_Analytics={send:function(t,n){var i=new Image;t=e.extend({},{action:"pum_analytics"},t),t._cache=+new Date,n!==o&&i.addEventListener("load",function(){n(t)}),i.src=pum_vars.ajaxurl+"?"+e.param(t)}},e(t).on("pumAfterOpen.core_analytics","body > .pum",function(){var t=PUM.getPopup(this),o={pid:parseInt(t.popmake("getSettings").id,10)||null,type:"open"};o.pid>0&&!e("body").hasClass("single-popup")&&PUM_Analytics.send(o)})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.methods.animate_overlay=function(t,o,n){var i=PUM.getPopup(this).popmake("getSettings");return i.meta.display.overlay_disabled?e.fn.popmake.overlay_animations.none.apply(this,[o,n]):e.fn.popmake.overlay_animations[t]?e.fn.popmake.overlay_animations[t].apply(this,[o,n]):(e.error("Animation style "+t+" does not exist."),this)},e.fn.popmake.methods.animate=function(t){return e.fn.popmake.animations[t]?e.fn.popmake.animations[t].apply(this,Array.prototype.slice.call(arguments,1)):(e.error("Animation style "+t+" does not exist."),this)},e.fn.popmake.animations={none:function(e){return PUM.getPopup(this).popmake("animate_overlay","none",0,function(){e!==o&&e()}),this},slide:function(e){var t=PUM.getPopup(this).show(0).css({opacity:0}),n=t.popmake("getContainer").show(0).css({opacity:0}),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2,p=t.popmake("animation_origin",i.meta.display.animation_origin);return n.position(p).css({opacity:1}),t.css({opacity:1}).popmake("animate_overlay","fade",a,function(){n.popmake("reposition",function(t){n.animate(t,a,"swing",function(){e!==o&&e()})})}),this},fade:function(e){var t=PUM.getPopup(this),n=t.popmake("getContainer"),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2;return n.show(0).css({opacity:0}),t.popmake("animate_overlay","fade",a,function(){n.animate({opacity:1},a,"swing",function(){e!==o&&e()})}),this},fadeAndSlide:function(e){var t=PUM.getPopup(this).show(0).css({opacity:0}),n=t.popmake("getContainer").show(0).css({opacity:0}),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2,p=t.popmake("animation_origin",i.meta.display.animation_origin);return n.position(p),t.hide().css({opacity:1}).popmake("animate_overlay","fade",a,function(){n.popmake("reposition",function(t){t.opacity=1,n.animate(t,a,"swing",function(){e!==o&&e()})})}),this},grow:function(){return e.fn.popmake.animations.fade.apply(this,Array.prototype.slice.call(arguments,1))},growAndSlide:function(){return e.fn.popmake.animations.fadeAndSlide.apply(this,Array.prototype.slice.call(arguments,1))}},e.fn.popmake.overlay_animations={none:function(e,t){PUM.getPopup(this).show(e,t)},fade:function(e,t){PUM.getPopup(this).fadeIn(e,t)},slide:function(e,t){PUM.getPopup(this).slideDown(e,t)}}}(jQuery,document),function(e,t,o){"use strict";e(t).on("pumInit",".pum",function(){e(this).popmake("getContainer").trigger("popmakeInit")}).on("pumBeforeOpen",".pum",function(){e(this).popmake("getContainer").addClass("active").trigger("popmakeBeforeOpen")}).on("pumAfterOpen",".pum",function(){e(this).popmake("getContainer").trigger("popmakeAfterOpen")}).on("pumBeforeClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeClose")}).on("pumAfterClose",".pum",function(){e(this).popmake("getContainer").removeClass("active").trigger("popmakeAfterClose")}).on("pumSetupClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeSetupClose")}).on("pumOpenPrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventOpen").removeClass("active")}).on("pumClosePrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventClose")}).on("pumBeforeReposition",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeReposition")})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.callbacks={reposition_using:function(t){e(this).css(t)}}}(jQuery,document);var pm_cookie,pm_remove_cookie;!function(e,t,o){"use strict";e.fn.popmake.cookie={defaults:{},raw:!1,json:!0,pluses:/\+/g,encode:function(t){return e.fn.popmake.cookie.raw?t:encodeURIComponent(t)},decode:function(t){return e.fn.popmake.cookie.raw?t:decodeURIComponent(t)},stringifyCookieValue:function(t){return e.fn.popmake.cookie.encode(e.fn.popmake.cookie.json?JSON.stringify(t):String(t))},parseCookieValue:function(t){0===t.indexOf('"')&&(t=t.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return t=decodeURIComponent(t.replace(e.fn.popmake.cookie.pluses," ")),e.fn.popmake.cookie.json?JSON.parse(t):t}catch(o){}},read:function(t,o){var n=e.fn.popmake.cookie.raw?t:e.fn.popmake.cookie.parseCookieValue(t);return e.isFunction(o)?o(n):n},process:function(n,i,a,p){var s,r,c,l,m,u=n?o:{},f=new Date,d=t.cookie?t.cookie.split("; "):[];if(i!==o&&!e.isFunction(i)){switch(typeof a){case"number":f.setTime(+f+864e5*a),a=f;break;case"string":f.setTime(1e3*e.fn.popmake.utilities.strtotime("+"+a)),a=f}return void(t.cookie=[e.fn.popmake.cookie.encode(n),"=",e.fn.popmake.cookie.stringifyCookieValue(i),a?"; expires="+a.toUTCString():"",p?"; path="+p:""].join(""))}for(l=0,m=d.length;m>l;l+=1){if(s=d[l].split("="),r=e.fn.popmake.cookie.decode(s.shift()),c=s.join("="),n&&n===r){u=e.fn.popmake.cookie.read(c,i);break}c=e.fn.popmake.cookie.read(c),n||c===o||(u[r]=c)}return u},remove:function(t){return e.pm_cookie(t)===o?!1:(e.pm_cookie(t,"",-1),!e.pm_cookie(t))}},pm_cookie=e.pm_cookie=e.fn.popmake.cookie.process,pm_remove_cookie=e.pm_remove_cookie=e.fn.popmake.cookie.remove}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.methods.addCookie=function(t){return e.fn.popmake.cookies[t]?e.fn.popmake.cookies[t].apply(this,Array.prototype.slice.call(arguments,1)):(e.error("Cookie type "+t+" does not exist."),this)},e.fn.popmake.methods.setCookie=function(t){e.pm_cookie(t.name,!0,t.session?null:t.time,t.path?"/":null)},e.fn.popmake.cookies={on_popup_open:function(e){var t=PUM.getPopup(this);t.on("pumAfterOpen",function(){t.popmake("setCookie",e)})},on_popup_close:function(e){var t=PUM.getPopup(this);t.on("pumBeforeClose",function(){t.popmake("setCookie",e)})},manual:function(e){var t=PUM.getPopup(this);t.on("pumSetCookie",function(){t.popmake("setCookie",e)})}},e(t).on("pumInit",".pum",function(){var e,t=PUM.getPopup(this),n=t.popmake("getSettings"),i=n.cookies,a=null;if(i!==o&&i.length)for(e=0;i.length>e;e+=1)a=i[e],t.popmake("addCookie",a.event,a.settings)})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.defaults={meta:{display:{stackable:0,overlay_disabled:0,size:"medium",responsive_max_width:"",responsive_max_width_unit:"%",responsive_min_width:"",responsive_min_width_unit:"%",custom_width:"",custom_width_unit:"%",custom_height:"",custom_height_unit:"em",custom_height_auto:0,location:"center top",position_top:100,position_left:0,position_bottom:0,position_right:0,position_fixed:0,animation_type:"fade",animation_speed:350,animation_origin:"center top"},close:{overlay_click:0,esc_press:0,f4_press:0}},container:{active_class:"active",attr:{"class":"popmake"}},title:{attr:{"class":"popmake-title"}},content:{attr:{"class":"popmake-content"}},close:{close_speed:0,attr:{"class":"popmake-close"}},overlay:{attr:{id:"popmake-overlay","class":"popmake-overlay"}}}}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.methods.addTrigger=function(t){return e.fn.popmake.triggers[t]?e.fn.popmake.triggers[t].apply(this,Array.prototype.slice.call(arguments,1)):(e.error("Trigger type "+t+" does not exist."),this)},e.fn.popmake.methods.checkCookies=function(t){var n;if(t.cookie===o||t.cookie.name===o||null===t.cookie.name)return!1;switch(typeof t.cookie.name){case"object":case"array":for(n=0;t.cookie.name.length>n;n+=1)if(e.pm_cookie(t.cookie.name[n])!==o)return!0;break;case"string":if(e.pm_cookie(t.cookie.name)!==o)return!0}return!1},e.fn.popmake.triggers={auto_open:function(t){var o=PUM.getPopup(this);setTimeout(function(){o.hasClass("pum-open")||o.popmake("getContainer").hasClass("active")||o.popmake("checkCookies",t)||(e.fn.popmake.last_open_trigger="Auto Open - Delay: "+t.delay,o.popmake("open"))},t.delay)},click_open:function(o){var n=PUM.getPopup(this),i=n.popmake("getSettings"),a=".popmake-"+i.id+", .popmake-"+decodeURIComponent(i.slug);""!==o.extra_selectors&&(a+=", "+o.extra_selectors),e(a).addClass("pum-trigger").css({cursor:"pointer"}),e(t).on("click.pumTrigger",a,function(t){n.has(this).length>0||n.popmake("checkCookies",o)||(e(t.target).hasClass("do-default")||(t.preventDefault(),t.stopPropagation()),e.fn.popmake.last_open_trigger=this,n.popmake("open"))})},admin_debug:function(){PUM.getPopup(this).popmake("open")}},e(t).on("pumInit",".pum",function(){var e,t=PUM.getPopup(this),n=t.popmake("getSettings"),i=n.triggers,a=null;if(i!==o&&i.length)for(e=0;i.length>e;e+=1)a=i[e],t.popmake("addTrigger",a.type,a.settings)})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.utilities={convert_hex:function(e,t){e=e.replace("#","");var o=parseInt(e.substring(0,2),16),n=parseInt(e.substring(2,4),16),i=parseInt(e.substring(4,6),16);return"rgba("+o+","+n+","+i+","+t/100+")"},debounce:function(e,t){var o;return function(){var n=this,i=arguments;window.clearTimeout(o),o=window.setTimeout(function(){e.apply(n,i)},t)}},throttle:function(e,t){var o=!1,n=function(){o=!1};return function(){o||(e.apply(this,arguments),window.setTimeout(n,t),o=!0)}},getXPath:function(t){var o,n,i,a,p,s=[];return e.each(e(t).parents(),function(t,r){return o=e(r),n=o.attr("id")||"",i=o.attr("class")||"",a=o.get(0).tagName.toLowerCase(),p=o.parent().children(a).index(o),"body"===a?!1:(i.length>0&&(i=i.split(" "),i=i[0]),void s.push(a+(n.length>0?"#"+n:i.length>0?"."+i.split(" ").join("."):":eq("+p+")")))}),s.reverse().join(" > ")},strtotime:function(e,t){function n(e,t,n){var i,a=l[t];a!==o&&(i=a-c.getDay(),0===i?i=7*n:i>0&&"last"===e?i-=7:0>i&&"next"===e&&(i+=7),c.setDate(c.getDate()+i))}function i(e){var t=e.split(" "),o=t[0],i=t[1].substring(0,3),a=/\d+/.test(o),p="ago"===t[2],s=("last"===o?-1:1)*(p?-1:1);if(a&&(s*=parseInt(o,10)),m.hasOwnProperty(i)&&!t[1].match(/^mon(day|\.)?$/i))return c["set"+m[i]](c["get"+m[i]]()+s);if("wee"===i)return c.setDate(c.getDate()+7*s);if("next"===o||"last"===o)n(o,i,s);else if(!a)return!1;return!0}var a,p,s,r,c,l,m,u,f,d,h,g=!1;if(!e)return g;if(e=e.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase(),p=e.match(/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/),p&&p[2]===p[4])if(p[1]>1901)switch(p[2]){case"-":return p[3]>12||p[5]>31?g:new Date(p[1],parseInt(p[3],10)-1,p[5],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3;case".":return g;case"/":return p[3]>12||p[5]>31?g:new Date(p[1],parseInt(p[3],10)-1,p[5],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3}else if(p[5]>1901)switch(p[2]){case"-":return p[3]>12||p[1]>31?g:new Date(p[5],parseInt(p[3],10)-1,p[1],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3;case".":return p[3]>12||p[1]>31?g:new Date(p[5],parseInt(p[3],10)-1,p[1],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3;case"/":return p[1]>12||p[3]>31?g:new Date(p[5],parseInt(p[1],10)-1,p[3],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3}else switch(p[2]){case"-":return p[3]>12||p[5]>31||p[1]<70&&p[1]>38?g:(r=p[1]>=0&&p[1]<=38?+p[1]+2e3:p[1],new Date(r,parseInt(p[3],10)-1,p[5],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3);case".":return p[5]>=70?p[3]>12||p[1]>31?g:new Date(p[5],parseInt(p[3],10)-1,p[1],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3:p[5]<60&&!p[6]?p[1]>23||p[3]>59?g:(s=new Date,new Date(s.getFullYear(),s.getMonth(),s.getDate(),p[1]||0,p[3]||0,p[5]||0,p[9]||0)/1e3):g;case"/":return p[1]>12||p[3]>31||p[5]<70&&p[5]>38?g:(r=p[5]>=0&&p[5]<=38?+p[5]+2e3:p[5],new Date(r,parseInt(p[1],10)-1,p[3],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3);case":":return p[1]>23||p[3]>59||p[5]>59?g:(s=new Date,new Date(s.getFullYear(),s.getMonth(),s.getDate(),p[1]||0,p[3]||0,p[5]||0)/1e3)}if("now"===e)return null===t||isNaN(t)?(new Date).getTime()/1e3||0:t||0;if(a=Date.parse(e),!isNaN(a))return a/1e3||0;if(c=t?new Date(1e3*t):new Date,l={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},m={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},f="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)",d="([+-]?\\d+\\s"+f+"|(last|next)\\s"+f+")(\\sago)?",p=e.match(new RegExp(d,"gi")),!p)return g;for(h=0,u=p.length;u>h;h+=1)if(!i(p[h]))return g;return c.getTime()/1e3}},e.fn.popmake.utilies=e.fn.popmake.utilities}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.version=1.4,e.fn.popmake.last_open_popup=null,e(t).ready(function(){e(".popmake").popmake()})}(jQuery);
|
1 |
+
!function(e){"use strict";void 0===e.fn.on&&(e.fn.on=function(e,t,o){return this.delegate(t,e,o)}),void 0===e.fn.off&&(e.fn.off=function(e,t,o){return this.undelegate(t,e,o)}),void 0===e.fn.bindFirst&&(e.fn.bindFirst=function(t,o){var n,i,a=e(this);a.unbind(t,o),a.bind(t,o),n=e._data(a[0]).events,i=n[t],i.unshift(i.pop()),n[t]=i}),void 0===e.fn.outerHtml&&(e.fn.outerHtml=function(){var t=e(this).clone(),o=e("<div/>").append(t);return o.html()}),void 0===Date.now&&(Date.now=function(){return(new Date).getTime()})}(jQuery);var PUM;!function(e,t,o){"use strict";PUM={getPopup:function(t){var o=e(t);return o.hasClass("pum-overlay")?o:o.hasClass("popmake")?o.parents(".pum-overlay"):o.parents(".pum-overlay").length?o.parents(".pum-overlay"):e()}},e.fn.popmake=function(t){return e.fn.popmake.methods[t]?e.fn.popmake.methods[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist on $.fn.popmake"):e.fn.popmake.methods.init.apply(this,arguments)},e.fn.popmake.methods={init:function(t){return this.each(function(){var o=PUM.getPopup(this),n=e.extend(!0,{},e.fn.popmake.defaults,o.data("popmake"),t);return n.theme_id<=0&&(n.theme_id=popmake_default_theme),e(window).on("resize",function(){(o.hasClass("pum-active")||o.find(".popmake.active").length)&&e.fn.popmake.utilities.throttle(setTimeout(function(){o.popmake("reposition")},25),500,!1)}),"string"==typeof popmake_powered_by&&""!==popmake_powered_by&&o.popmake("getContent").append(e(popmake_powered_by)),o.find(".pum-container").data("popmake",n),o.data("popmake",n).trigger("pumInit"),this})},getOverlay:function(){return e(this)},getContainer:function(){return e(this).find(".pum-container")},getTitle:function(){return e(this).find(".pum-title")||null},getContent:function(){return e(this).find(".pum-content")||null},getClose:function(){return e(this).find(".pum-content + .pum-close")||null},getSettings:function(){return e(this).data("popmake")},open:function(t){var n=PUM.getPopup(this),i=n.popmake("getContainer"),a=n.popmake("getClose"),p=n.popmake("getSettings"),s=e("html");return p.meta.display.stackable||n.popmake("close_all"),n.addClass("pum-active").popmake("setup_close").popmake("reposition").trigger("pumBeforeOpen"),p.meta.close.button_delay>0&&a.fadeOut(0),n.hasClass("preventOpen")||i.hasClass("preventOpen")?(n.removeClass("preventOpen").removeClass("pum-active").trigger("pumOpenPrevented"),this):(s.addClass("pum-open"),p.meta.display.overlay_disabled?s.addClass("pum-open-overlay-disabled"):s.addClass("pum-open-overlay"),p.meta.display.position_fixed!==o&&p.meta.display.position_fixed?s.addClass("pum-open-fixed"):s.addClass("pum-open-scrollable"),n.css({"z-index":p.meta.display.overlay_zindex||1999999998}).popmake("animate",p.meta.display.animation_type,function(){p.meta.close.button_delay>0&&setTimeout(function(){a.fadeIn()},p.meta.close.button_delay),n.trigger("pumAfterOpen"),e.fn.popmake.last_open_popup=n,t!==o&&t()}),this)},setup_close:function(){var t=PUM.getPopup(this),o=t.popmake("getClose").add(e(".popmake-close",t)),n=t.popmake("getSettings");return o.off("click.popmake click.pum").on("click.popmake click.pum",function(o){o.preventDefault(),o.stopPropagation(),e.fn.popmake.last_close_trigger="Close Button",t.popmake("close")}),(n.meta.close.esc_press||n.meta.close.f4_press)&&e(window).off("keyup.popmake").on("keyup.popmake",function(o){27===o.keyCode&&n.meta.close.esc_press&&(e.fn.popmake.last_close_trigger="ESC Key",t.popmake("close")),115===o.keyCode&&n.meta.close.f4_press&&(e.fn.popmake.last_close_trigger="F4 Key",t.popmake("close"))}),n.meta.close.overlay_click&&t.off("click.popmake").on("click.popmake",function(o){o.target===t[0]&&(e.fn.popmake.last_close_trigger="Overlay Click",t.popmake("close"))}),t.trigger("pumSetupClose"),this},close:function(t){return this.each(function(){var n=PUM.getPopup(this),i=n.popmake("getContainer"),a=n.popmake("getClose").add(e(".popmake-close",n));return n.trigger("pumBeforeClose"),n.hasClass("preventClose")||i.hasClass("preventClose")?(n.removeClass("preventClose").trigger("pumClosePrevented"),this):(i.fadeOut("fast",function(){n.is(":visible")&&n.fadeOut("fast"),e(window).off("keyup.popmake"),n.off("click.popmake"),a.off("click.popmake"),e("html").removeClass("pum-open").removeClass("pum-open-scrollable").removeClass("pum-open-overlay-disabled").removeClass("pum-open-fixed"),n.removeClass("pum-active").trigger("pumAfterClose"),i.find("iframe").filter('[src*="youtube"],[src*="vimeo"]').each(function(){var t=e(this),o=t.attr("src"),n=o.replace("autoplay=1","1=1");n!==o&&(o=n),t.prop("src",o)}),i.find("video").each(function(){this.pause()}),t!==o&&t()}),this)})},close_all:function(){return e(".pum-active").popmake("close"),this},reposition:function(t){var o=PUM.getPopup(this).trigger("pumBeforeReposition"),n=o.popmake("getContainer"),i=o.popmake("getSettings"),a=i.meta.display,p=a.location,s={my:"",at:""},r={overlay:null,container:null};return p.indexOf("left")>=0&&(s={my:s.my+" left"+(0!==a.position_left?"+"+a.position_left:""),at:s.at+" left"}),p.indexOf("right")>=0&&(s={my:s.my+" right"+(0!==a.position_right?"-"+a.position_right:""),at:s.at+" right"}),p.indexOf("center")>=0&&(s="center"===p?{my:"center",at:"center"}:{my:s.my+" center",at:s.at+" center"}),p.indexOf("top")>=0&&(s={my:s.my+" top"+(0!==a.position_top?"+"+(e("body").hasClass("admin-bar")?parseInt(a.position_top,10)+32:a.position_top):""),at:s.at+" top"}),p.indexOf("bottom")>=0&&(s={my:s.my+" bottom"+(0!==a.position_bottom?"-"+a.position_bottom:""),at:s.at+" bottom"}),s.my=e.trim(s.my),s.at=e.trim(s.at),s.of=window,s.collision="none",s.using="function"==typeof t?t:e.fn.popmake.callbacks.reposition_using,o.is(":hidden")&&(r.overlay=o.css("opacity"),o.css({opacity:0}).show()),n.is(":hidden")&&(r.container=n.css("opacity"),n.css({opacity:0}).show()),a.position_fixed&&n.addClass("fixed"),"custom"===i.meta.display.size?n.css({width:i.meta.display.custom_width+i.meta.display.custom_width_unit,height:i.meta.display.custom_height_auto?"auto":i.meta.display.custom_height+i.meta.display.custom_height_unit}):"auto"!==i.meta.display.size&&n.addClass("responsive").css({minWidth:""!==i.meta.display.responsive_min_width?i.meta.display.responsive_min_width+i.meta.display.responsive_min_width_unit:"auto",maxWidth:""!==i.meta.display.responsive_max_width?i.meta.display.responsive_max_width+i.meta.display.responsive_max_width_unit:"auto"}),n.addClass("custom-position").position(s).trigger("popmakeAfterReposition"),r.overlay&&o.css({opacity:r.overlay}).hide(),r.container&&n.css({opacity:r.container}).hide(),this},retheme:function(t){e(this).trigger("popmakeBeforeRetheme");var n,i,a=PUM.getPopup(this),p=a.popmake("getContainer"),s=a.popmake("getTitle"),r=a.popmake("getContent"),c=a.popmake("getClose"),l=a.popmake("getSettings");switch(t===o&&(t=e.fn.popmake.themes[l.theme_id],t===o&&(t=e.fn.popmake.themes[1])),n="yes"===t.container.boxshadow_inset?"inset ":"",i="yes"===t.close.boxshadow_inset?"inset ":"",a.removeAttr("style").css({backgroundColor:e.fn.popmake.utilities.convert_hex(t.overlay.background_color,t.overlay.background_opacity),zIndex:l.meta.display.overlay_zindex||998}),p.css({padding:t.container.padding+"px",backgroundColor:e.fn.popmake.utilities.convert_hex(t.container.background_color,t.container.background_opacity),borderStyle:t.container.border_style,borderColor:t.container.border_color,borderWidth:t.container.border_width+"px",borderRadius:t.container.border_radius+"px",boxShadow:n+t.container.boxshadow_horizontal+"px "+t.container.boxshadow_vertical+"px "+t.container.boxshadow_blur+"px "+t.container.boxshadow_spread+"px "+e.fn.popmake.utilities.convert_hex(t.container.boxshadow_color,t.container.boxshadow_opacity),zIndex:l.meta.display.zindex||999}),s.css({color:t.title.font_color,lineHeight:t.title.line_height+"px",fontSize:t.title.font_size+"px",fontFamily:t.title.font_family,fontWeight:t.title.font_weight,fontStyle:t.title.font_style,textAlign:t.title.text_align,textShadow:t.title.textshadow_horizontal+"px "+t.title.textshadow_vertical+"px "+t.title.textshadow_blur+"px "+e.fn.popmake.utilities.convert_hex(t.title.textshadow_color,t.title.textshadow_opacity)}),r.css({color:t.content.font_color,fontFamily:t.content.font_family,fontWeight:t.content.font_weight,fontStyle:t.content.font_style}),e("p, label",r).css({color:t.content.font_color,fontFamily:t.content.font_family}),c.html(t.close.text).css({padding:t.close.padding+"px",height:t.close.height+"px",width:t.close.width+"px",backgroundColor:e.fn.popmake.utilities.convert_hex(t.close.background_color,t.close.background_opacity),color:t.close.font_color,lineHeight:t.close.line_height+"px",fontSize:t.close.font_size+"px",fontWeight:t.close.font_weight,fontStyle:t.close.font_style,fontFamily:t.close.font_family,borderStyle:t.close.border_style,borderColor:t.close.border_color,borderWidth:t.close.border_width+"px",borderRadius:t.close.border_radius+"px",boxShadow:i+t.close.boxshadow_horizontal+"px "+t.close.boxshadow_vertical+"px "+t.close.boxshadow_blur+"px "+t.close.boxshadow_spread+"px "+e.fn.popmake.utilities.convert_hex(t.close.boxshadow_color,t.close.boxshadow_opacity),textShadow:t.close.textshadow_horizontal+"px "+t.close.textshadow_vertical+"px "+t.close.textshadow_blur+"px "+e.fn.popmake.utilities.convert_hex(t.close.textshadow_color,t.close.textshadow_opacity),left:"auto",right:"auto",bottom:"auto",top:"auto"}),t.close.location){case"topleft":c.css({top:t.close.position_top+"px",left:t.close.position_left+"px"});break;case"topright":c.css({top:t.close.position_top+"px",right:t.close.position_right+"px"});break;case"bottomleft":c.css({bottom:t.close.position_bottom+"px",left:t.close.position_left+"px"});break;case"bottomright":c.css({bottom:t.close.position_bottom+"px",right:t.close.position_right+"px"})}return a.trigger("popmakeAfterRetheme",[t]),this},animation_origin:function(t){var o=PUM.getPopup(this),n=o.popmake("getContainer"),i={my:"",at:""};switch(t){case"top":i={my:"left+"+n.offset().left+" bottom-100",at:"left top"};break;case"bottom":i={my:"left+"+n.offset().left+" top+100",at:"left bottom"};break;case"left":i={my:"right top+"+n.offset().top,at:"left top"};break;case"right":i={my:"left top+"+n.offset().top,at:"right top"};break;default:t.indexOf("left")>=0&&(i={my:i.my+" right",at:i.at+" left"}),t.indexOf("right")>=0&&(i={my:i.my+" left",at:i.at+" right"}),t.indexOf("center")>=0&&(i={my:i.my+" center",at:i.at+" center"}),t.indexOf("top")>=0&&(i={my:i.my+" bottom-100",at:i.at+" top"}),t.indexOf("bottom")>=0&&(i={my:i.my+" top+100",at:i.at+" bottom"}),i.my=e.trim(i.my),i.at=e.trim(i.at)}return i.of=window,i.collision="none",i}}}(jQuery,document);var PUM_Accessibility;!function(e,t,o){"use strict";var n,i,a,p="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";PUM_Accessibility={forceFocus:function(t){a&&!e.contains(a,t.target)&&(t.stopPropagation(),PUM_Accessibility.setFocusToFirstItem())},trapTabKey:function(t){if(9===t.keyCode){var o=a.find(".pum-container *").filter(p).filter(":visible"),n=e(":focus"),i=o.length,s=o.index(n);t.shiftKey?0===s&&(o.get(i-1).focus(),t.preventDefault()):s===i-1&&(o.get(0).focus(),t.preventDefault())}},setFocusToFirstItem:function(){a.find(".pum-container *").filter(p).filter(":visible").filter(":not(.pum-close)").first().focus()}},e(t).on("pumInit",".pum",function(){PUM.getPopup(this).find("[tabindex]").each(function(){var t=e(this);t.data("tabindex",t.attr("tabindex")).prop("tabindex","0")})}).on("pumBeforeOpen",".pum",function(){var o=PUM.getPopup(this),p=e(":focus");o.has(p).length||(i=p),a=o.on("keydown.pum_accessibility",PUM_Accessibility.trapTabKey).attr("aria-hidden","false"),n=e("body > *").filter(":visible").not(a),n.attr("aria-hidden","true"),e(t).on("focus.pum_accessibility",PUM_Accessibility.forceFocus),PUM_Accessibility.setFocusToFirstItem()}).on("pumAfterOpen",".pum",function(){}).on("pumBeforeClose",".pum",function(){}).on("pumAfterClose",".pum",function(){var o=PUM.getPopup(this);o.off("keydown.pum_accessibility").attr("aria-hidden","true"),n&&(n.attr("aria-hidden","false"),n=null),i.length&&i.focus(),a=null,e(t).off("focus.pum_accessibility")}).on("pumSetupClose",".pum",function(){}).on("pumOpenPrevented",".pum",function(){}).on("pumClosePrevented",".pum",function(){}).on("pumBeforeReposition",".pum",function(){})}(jQuery,document);var PUM_Analytics;!function(e,t,o){"use strict";e.fn.popmake.last_open_trigger=null,e.fn.popmake.last_close_trigger=null,e.fn.popmake.conversion_trigger=null,PUM_Analytics={send:function(t,n){var i=new Image;t=e.extend({},{action:"pum_analytics"},t),t._cache=+new Date,n!==o&&i.addEventListener("load",function(){n(t)}),i.src=pum_vars.ajaxurl+"?"+e.param(t)}},e(t).on("pumAfterOpen.core_analytics","body > .pum",function(){var t=PUM.getPopup(this),o={pid:parseInt(t.popmake("getSettings").id,10)||null,type:"open"};o.pid>0&&!e("body").hasClass("single-popup")&&PUM_Analytics.send(o)})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.methods.animate_overlay=function(t,o,n){var i=PUM.getPopup(this).popmake("getSettings");return i.meta.display.overlay_disabled?e.fn.popmake.overlay_animations.none.apply(this,[o,n]):e.fn.popmake.overlay_animations[t]?e.fn.popmake.overlay_animations[t].apply(this,[o,n]):(e.error("Animation style "+t+" does not exist."),this)},e.fn.popmake.methods.animate=function(t){return e.fn.popmake.animations[t]?e.fn.popmake.animations[t].apply(this,Array.prototype.slice.call(arguments,1)):(e.error("Animation style "+t+" does not exist."),this)},e.fn.popmake.animations={none:function(e){return PUM.getPopup(this).popmake("animate_overlay","none",0,function(){e!==o&&e()}),this},slide:function(e){var t=PUM.getPopup(this).show(0).css({opacity:0}),n=t.popmake("getContainer").show(0).css({opacity:0}),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2,p=t.popmake("animation_origin",i.meta.display.animation_origin);return n.position(p).css({opacity:1}),t.css({opacity:1}).popmake("animate_overlay","fade",a,function(){n.popmake("reposition",function(t){n.animate(t,a,"swing",function(){e!==o&&e()})})}),this},fade:function(e){var t=PUM.getPopup(this),n=t.popmake("getContainer"),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2;return n.show(0).css({opacity:0}),t.popmake("animate_overlay","fade",a,function(){n.animate({opacity:1},a,"swing",function(){e!==o&&e()})}),this},fadeAndSlide:function(e){var t=PUM.getPopup(this).show(0).css({opacity:0}),n=t.popmake("getContainer").show(0).css({opacity:0}),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2,p=t.popmake("animation_origin",i.meta.display.animation_origin);return n.position(p),t.hide().css({opacity:1}).popmake("animate_overlay","fade",a,function(){n.popmake("reposition",function(t){t.opacity=1,n.animate(t,a,"swing",function(){e!==o&&e()})})}),this},grow:function(t){return e.fn.popmake.animations.fade.apply(this,arguments)},growAndSlide:function(t){return e.fn.popmake.animations.fadeAndSlide.apply(this,arguments)}},e.fn.popmake.overlay_animations={none:function(e,t){PUM.getPopup(this).show(e,t)},fade:function(e,t){PUM.getPopup(this).fadeIn(e,t)},slide:function(e,t){PUM.getPopup(this).slideDown(e,t)}}}(jQuery,document),function(e,t,o){"use strict";e(t).on("pumInit",".pum",function(){e(this).popmake("getContainer").trigger("popmakeInit")}).on("pumBeforeOpen",".pum",function(){e(this).popmake("getContainer").addClass("active").trigger("popmakeBeforeOpen")}).on("pumAfterOpen",".pum",function(){e(this).popmake("getContainer").trigger("popmakeAfterOpen")}).on("pumBeforeClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeClose")}).on("pumAfterClose",".pum",function(){e(this).popmake("getContainer").removeClass("active").trigger("popmakeAfterClose")}).on("pumSetupClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeSetupClose")}).on("pumOpenPrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventOpen").removeClass("active")}).on("pumClosePrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventClose")}).on("pumBeforeReposition",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeReposition")})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.callbacks={reposition_using:function(t){e(this).css(t)}}}(jQuery,document);var pm_cookie,pm_remove_cookie;!function(e,t,o){"use strict";e.fn.popmake.cookie={defaults:{},raw:!1,json:!0,pluses:/\+/g,encode:function(t){return e.fn.popmake.cookie.raw?t:encodeURIComponent(t)},decode:function(t){return e.fn.popmake.cookie.raw?t:decodeURIComponent(t)},stringifyCookieValue:function(t){return e.fn.popmake.cookie.encode(e.fn.popmake.cookie.json?JSON.stringify(t):String(t))},parseCookieValue:function(t){0===t.indexOf('"')&&(t=t.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return t=decodeURIComponent(t.replace(e.fn.popmake.cookie.pluses," ")),e.fn.popmake.cookie.json?JSON.parse(t):t}catch(o){}},read:function(t,o){var n=e.fn.popmake.cookie.raw?t:e.fn.popmake.cookie.parseCookieValue(t);return e.isFunction(o)?o(n):n},process:function(n,i,a,p){var s,r,c,l,m,u=n?o:{},f=new Date,d=t.cookie?t.cookie.split("; "):[];if(i!==o&&!e.isFunction(i)){switch(typeof a){case"number":f.setTime(+f+864e5*a),a=f;break;case"string":f.setTime(1e3*e.fn.popmake.utilities.strtotime("+"+a)),a=f}return void(t.cookie=[e.fn.popmake.cookie.encode(n),"=",e.fn.popmake.cookie.stringifyCookieValue(i),a?"; expires="+a.toUTCString():"",p?"; path="+p:""].join(""))}for(l=0,m=d.length;m>l;l+=1){if(s=d[l].split("="),r=e.fn.popmake.cookie.decode(s.shift()),c=s.join("="),n&&n===r){u=e.fn.popmake.cookie.read(c,i);break}c=e.fn.popmake.cookie.read(c),n||c===o||(u[r]=c)}return u},remove:function(t){return e.pm_cookie(t)===o?!1:(e.pm_cookie(t,"",-1),!e.pm_cookie(t))}},pm_cookie=e.pm_cookie=e.fn.popmake.cookie.process,pm_remove_cookie=e.pm_remove_cookie=e.fn.popmake.cookie.remove}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.methods.addCookie=function(t){return e.fn.popmake.cookies[t]?e.fn.popmake.cookies[t].apply(this,Array.prototype.slice.call(arguments,1)):(e.error("Cookie type "+t+" does not exist."),this)},e.fn.popmake.methods.setCookie=function(t){e.pm_cookie(t.name,!0,t.session?null:t.time,t.path?"/":null)},e.fn.popmake.cookies={on_popup_open:function(e){var t=PUM.getPopup(this);t.on("pumAfterOpen",function(){t.popmake("setCookie",e)})},on_popup_close:function(e){var t=PUM.getPopup(this);t.on("pumBeforeClose",function(){t.popmake("setCookie",e)})},manual:function(e){var t=PUM.getPopup(this);t.on("pumSetCookie",function(){t.popmake("setCookie",e)})}},e(t).on("pumInit",".pum",function(){var e,t=PUM.getPopup(this),n=t.popmake("getSettings"),i=n.cookies,a=null;if(i!==o&&i.length)for(e=0;i.length>e;e+=1)a=i[e],t.popmake("addCookie",a.event,a.settings)})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.defaults={meta:{display:{stackable:0,overlay_disabled:0,size:"medium",responsive_max_width:"",responsive_max_width_unit:"%",responsive_min_width:"",responsive_min_width_unit:"%",custom_width:"",custom_width_unit:"%",custom_height:"",custom_height_unit:"em",custom_height_auto:0,location:"center top",position_top:100,position_left:0,position_bottom:0,position_right:0,position_fixed:0,animation_type:"fade",animation_speed:350,animation_origin:"center top"},close:{overlay_click:0,esc_press:0,f4_press:0}},container:{active_class:"active",attr:{"class":"popmake"}},title:{attr:{"class":"popmake-title"}},content:{attr:{"class":"popmake-content"}},close:{close_speed:0,attr:{"class":"popmake-close"}},overlay:{attr:{id:"popmake-overlay","class":"popmake-overlay"}}}}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.methods.addTrigger=function(t){return e.fn.popmake.triggers[t]?e.fn.popmake.triggers[t].apply(this,Array.prototype.slice.call(arguments,1)):(e.error("Trigger type "+t+" does not exist."),this)},e.fn.popmake.methods.checkCookies=function(t){var n;if(t.cookie===o||t.cookie.name===o||null===t.cookie.name)return!1;switch(typeof t.cookie.name){case"object":case"array":for(n=0;t.cookie.name.length>n;n+=1)if(e.pm_cookie(t.cookie.name[n])!==o)return!0;break;case"string":if(e.pm_cookie(t.cookie.name)!==o)return!0}return!1},e.fn.popmake.triggers={auto_open:function(t){var o=PUM.getPopup(this);setTimeout(function(){o.hasClass("pum-open")||o.popmake("getContainer").hasClass("active")||o.popmake("checkCookies",t)||(e.fn.popmake.last_open_trigger="Auto Open - Delay: "+t.delay,o.popmake("open"))},t.delay)},click_open:function(o){var n=PUM.getPopup(this),i=n.popmake("getSettings"),a=".popmake-"+i.id+", .popmake-"+decodeURIComponent(i.slug);""!==o.extra_selectors&&(a+=", "+o.extra_selectors),e(a).addClass("pum-trigger").css({cursor:"pointer"}),e(t).on("click.pumTrigger",a,function(t){n.has(this).length>0||n.popmake("checkCookies",o)||(e(t.target).hasClass("do-default")||(t.preventDefault(),t.stopPropagation()),e.fn.popmake.last_open_trigger=this,n.popmake("open"))})},admin_debug:function(){PUM.getPopup(this).popmake("open")}},e(t).on("pumInit",".pum",function(){var e,t=PUM.getPopup(this),n=t.popmake("getSettings"),i=n.triggers,a=null;if(i!==o&&i.length)for(e=0;i.length>e;e+=1)a=i[e],t.popmake("addTrigger",a.type,a.settings)})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.utilities={convert_hex:function(e,t){e=e.replace("#","");var o=parseInt(e.substring(0,2),16),n=parseInt(e.substring(2,4),16),i=parseInt(e.substring(4,6),16);return"rgba("+o+","+n+","+i+","+t/100+")"},debounce:function(e,t){var o;return function(){var n=this,i=arguments;window.clearTimeout(o),o=window.setTimeout(function(){e.apply(n,i)},t)}},throttle:function(e,t){var o=!1,n=function(){o=!1};return function(){o||(e.apply(this,arguments),window.setTimeout(n,t),o=!0)}},getXPath:function(t){var o,n,i,a,p,s=[];return e.each(e(t).parents(),function(t,r){return o=e(r),n=o.attr("id")||"",i=o.attr("class")||"",a=o.get(0).tagName.toLowerCase(),p=o.parent().children(a).index(o),"body"===a?!1:(i.length>0&&(i=i.split(" "),i=i[0]),void s.push(a+(n.length>0?"#"+n:i.length>0?"."+i.split(" ").join("."):":eq("+p+")")))}),s.reverse().join(" > ")},strtotime:function(e,t){function n(e,t,n){var i,a=l[t];a!==o&&(i=a-c.getDay(),0===i?i=7*n:i>0&&"last"===e?i-=7:0>i&&"next"===e&&(i+=7),c.setDate(c.getDate()+i))}function i(e){var t=e.split(" "),o=t[0],i=t[1].substring(0,3),a=/\d+/.test(o),p="ago"===t[2],s=("last"===o?-1:1)*(p?-1:1);if(a&&(s*=parseInt(o,10)),m.hasOwnProperty(i)&&!t[1].match(/^mon(day|\.)?$/i))return c["set"+m[i]](c["get"+m[i]]()+s);if("wee"===i)return c.setDate(c.getDate()+7*s);if("next"===o||"last"===o)n(o,i,s);else if(!a)return!1;return!0}var a,p,s,r,c,l,m,u,f,d,h,g=!1;if(!e)return g;if(e=e.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase(),p=e.match(/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/),p&&p[2]===p[4])if(p[1]>1901)switch(p[2]){case"-":return p[3]>12||p[5]>31?g:new Date(p[1],parseInt(p[3],10)-1,p[5],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3;case".":return g;case"/":return p[3]>12||p[5]>31?g:new Date(p[1],parseInt(p[3],10)-1,p[5],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3}else if(p[5]>1901)switch(p[2]){case"-":return p[3]>12||p[1]>31?g:new Date(p[5],parseInt(p[3],10)-1,p[1],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3;case".":return p[3]>12||p[1]>31?g:new Date(p[5],parseInt(p[3],10)-1,p[1],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3;case"/":return p[1]>12||p[3]>31?g:new Date(p[5],parseInt(p[1],10)-1,p[3],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3}else switch(p[2]){case"-":return p[3]>12||p[5]>31||p[1]<70&&p[1]>38?g:(r=p[1]>=0&&p[1]<=38?+p[1]+2e3:p[1],new Date(r,parseInt(p[3],10)-1,p[5],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3);case".":return p[5]>=70?p[3]>12||p[1]>31?g:new Date(p[5],parseInt(p[3],10)-1,p[1],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3:p[5]<60&&!p[6]?p[1]>23||p[3]>59?g:(s=new Date,new Date(s.getFullYear(),s.getMonth(),s.getDate(),p[1]||0,p[3]||0,p[5]||0,p[9]||0)/1e3):g;case"/":return p[1]>12||p[3]>31||p[5]<70&&p[5]>38?g:(r=p[5]>=0&&p[5]<=38?+p[5]+2e3:p[5],new Date(r,parseInt(p[1],10)-1,p[3],p[6]||0,p[7]||0,p[8]||0,p[9]||0)/1e3);case":":return p[1]>23||p[3]>59||p[5]>59?g:(s=new Date,new Date(s.getFullYear(),s.getMonth(),s.getDate(),p[1]||0,p[3]||0,p[5]||0)/1e3)}if("now"===e)return null===t||isNaN(t)?(new Date).getTime()/1e3||0:t||0;if(a=Date.parse(e),!isNaN(a))return a/1e3||0;if(c=t?new Date(1e3*t):new Date,l={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},m={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},f="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)",d="([+-]?\\d+\\s"+f+"|(last|next)\\s"+f+")(\\sago)?",p=e.match(new RegExp(d,"gi")),!p)return g;for(h=0,u=p.length;u>h;h+=1)if(!i(p[h]))return g;return c.getTime()/1e3}},e.fn.popmake.utilies=e.fn.popmake.utilities}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.version=1.4,e.fn.popmake.last_open_popup=null,e(t).ready(function(){e(".popmake").popmake()})}(jQuery);
|
includes/admin/popups/class-metabox-analytics.php
CHANGED
@@ -105,8 +105,6 @@ class PUM_Popup_Analytics_Metabox {
|
|
105 |
*/
|
106 |
public static function media_templates() {
|
107 |
|
108 |
-
// <script type="text/template" id=""></script>
|
109 |
-
|
110 |
}
|
111 |
|
112 |
}
|
105 |
*/
|
106 |
public static function media_templates() {
|
107 |
|
|
|
|
|
108 |
}
|
109 |
|
110 |
}
|
includes/admin/popups/class-metabox-conditions.php
CHANGED
@@ -161,15 +161,15 @@ class PUM_Popup_Conditions_Metabox {
|
|
161 |
if ( ! popmake_is_admin_popup_page() ) {
|
162 |
return;
|
163 |
} ?>
|
164 |
-
<script type="text/
|
165 |
-
<div class="facet-group-wrap" data-index="
|
166 |
<section class="facet-group">
|
167 |
-
<div class="facet-list"
|
168 |
-
for(var i = 0; conditions.length > i; i++) {
|
169 |
-
conditions[i].index = i;
|
170 |
-
|
171 |
-
print(PUMConditions.templates.facet( conditions[i] ));
|
172 |
-
}
|
173 |
</div>
|
174 |
<div class="add-or">
|
175 |
<button type="button" class="add add-facet no-button" aria-label="<?php _ex( 'Add another OR condition', 'aria-label for add new OR condition button', 'popup-maker' ); ?>"><?php _e( 'or', 'popup-maker' ); ?></button>
|
@@ -192,23 +192,23 @@ class PUM_Popup_Conditions_Metabox {
|
|
192 |
* settings: values for option fields
|
193 |
*/
|
194 |
?>
|
195 |
-
<script type="text/
|
196 |
-
<div class="facet" data-index="
|
197 |
|
198 |
<i class="or">or</i>
|
199 |
|
200 |
|
201 |
-
<div class="facet-col pum-field pum-condition-target select pum-select2
|
202 |
<button type="button" class="pum-not-operand dashicons-before dashicons-warning no-button" aria-label="<?php _e( 'Enable the Not Operand', 'popup-maker' ); ?>">
|
203 |
-
<input type="checkbox" name="popup_conditions[
|
204 |
</button>
|
205 |
|
206 |
-
<select class="target facet-select" id="popup_conditions[
|
207 |
<option value=""><?php _e( 'Select a condition', 'popup-maker' ); ?></option>
|
208 |
<?php foreach ( PUM_Conditions::instance()->get_conditions_by_group() as $group => $conditions ) : ?>
|
209 |
<optgroup label="<?php echo esc_attr_e( $group ); ?>">
|
210 |
<?php foreach ( $conditions as $id => $condition ) : ?>
|
211 |
-
<option value="<?php echo $id; ?>"
|
212 |
<?php echo $condition->get_label( 'name' ); ?>
|
213 |
</option>
|
214 |
<?php endforeach ?>
|
@@ -217,11 +217,11 @@ class PUM_Popup_Conditions_Metabox {
|
|
217 |
</select>
|
218 |
</div>
|
219 |
|
220 |
-
<div class="facet-settings"
|
221 |
//settings.index = index;
|
222 |
-
if (typeof target === 'string' && PUMConditions.templates.settings[ target ] !== undefined) {
|
223 |
-
print(PUMConditions.templates.settings[ target ]( settings ));
|
224 |
-
}
|
225 |
</div>
|
226 |
|
227 |
<div class="facet-actions">
|
@@ -233,8 +233,7 @@ class PUM_Popup_Conditions_Metabox {
|
|
233 |
|
234 |
<?php foreach ( PUM_Conditions::instance()->get_conditions() as $id => $condition ) : ?>
|
235 |
|
236 |
-
<script type="text/
|
237 |
-
class="pum-condition-settings templ" data-condition="<?php esc_attr_e( $id ); ?>">
|
238 |
<?php
|
239 |
/**
|
240 |
* Render Each settings tab contents.
|
161 |
if ( ! popmake_is_admin_popup_page() ) {
|
162 |
return;
|
163 |
} ?>
|
164 |
+
<script type="text/html" id="tmpl-pum-condition-group">
|
165 |
+
<div class="facet-group-wrap" data-index="{{data.index}}">
|
166 |
<section class="facet-group">
|
167 |
+
<div class="facet-list"><#
|
168 |
+
for(var i = 0; data.conditions.length > i; i++) {
|
169 |
+
data.conditions[i].index = i;
|
170 |
+
data.conditions[i].group = data.index;
|
171 |
+
print(PUMConditions.templates.facet( data.conditions[i] ));
|
172 |
+
} #>
|
173 |
</div>
|
174 |
<div class="add-or">
|
175 |
<button type="button" class="add add-facet no-button" aria-label="<?php _ex( 'Add another OR condition', 'aria-label for add new OR condition button', 'popup-maker' ); ?>"><?php _e( 'or', 'popup-maker' ); ?></button>
|
192 |
* settings: values for option fields
|
193 |
*/
|
194 |
?>
|
195 |
+
<script type="text/html" id="tmpl-pum-condition-facet">
|
196 |
+
<div class="facet" data-index="{{data.index}}" data-target="{{data.target}}">
|
197 |
|
198 |
<i class="or">or</i>
|
199 |
|
200 |
|
201 |
+
<div class="facet-col pum-field pum-condition-target select pum-select2 <# if (typeof data.not_operand !== 'undefined' && pumChecked(data.not_operand, '1')) print('not-operand-checked'); #>">
|
202 |
<button type="button" class="pum-not-operand dashicons-before dashicons-warning no-button" aria-label="<?php _e( 'Enable the Not Operand', 'popup-maker' ); ?>">
|
203 |
+
<input type="checkbox" name="popup_conditions[{{data.group}}][{{data.index}}][not_operand]" value="1" <# if (typeof data.not_operand !== 'undefined') print(pumChecked(data.not_operand, '1', true)); #> />
|
204 |
</button>
|
205 |
|
206 |
+
<select class="target facet-select" id="popup_conditions[{{data.group}}][{{data.index}}][target]" name="popup_conditions[{{data.group}}][{{data.index}}][target]">
|
207 |
<option value=""><?php _e( 'Select a condition', 'popup-maker' ); ?></option>
|
208 |
<?php foreach ( PUM_Conditions::instance()->get_conditions_by_group() as $group => $conditions ) : ?>
|
209 |
<optgroup label="<?php echo esc_attr_e( $group ); ?>">
|
210 |
<?php foreach ( $conditions as $id => $condition ) : ?>
|
211 |
+
<option value="<?php echo $id; ?>" {{ pumSelected(data.target, '<?php echo $id; ?>', true) }}>
|
212 |
<?php echo $condition->get_label( 'name' ); ?>
|
213 |
</option>
|
214 |
<?php endforeach ?>
|
217 |
</select>
|
218 |
</div>
|
219 |
|
220 |
+
<div class="facet-settings"><#
|
221 |
//settings.index = index;
|
222 |
+
if (typeof data.target === 'string' && PUMConditions.templates.settings[ data.target ] !== undefined) {
|
223 |
+
print(PUMConditions.templates.settings[ data.target ]( data.settings ));
|
224 |
+
} #>
|
225 |
</div>
|
226 |
|
227 |
<div class="facet-actions">
|
233 |
|
234 |
<?php foreach ( PUM_Conditions::instance()->get_conditions() as $id => $condition ) : ?>
|
235 |
|
236 |
+
<script type="text/html" id="tmpl-pum-condition-settings-<?php esc_attr_e( $id ); ?>" class="pum-condition-settings tmpl" data-condition="<?php esc_attr_e( $id ); ?>">
|
|
|
237 |
<?php
|
238 |
/**
|
239 |
* Render Each settings tab contents.
|
includes/admin/popups/class-metabox-cookies.php
CHANGED
@@ -75,7 +75,7 @@ class PUM_Popup_Cookies_Metabox {
|
|
75 |
'columns' => array(
|
76 |
'event' => $cookie->get_label( 'name' ),
|
77 |
'name' => $values['settings']['name'],
|
78 |
-
'settings' => '
|
79 |
),
|
80 |
'settings' => $values['settings'],
|
81 |
) );
|
@@ -125,20 +125,20 @@ class PUM_Popup_Cookies_Metabox {
|
|
125 |
if ( ! popmake_is_admin_popup_page() ) {
|
126 |
return;
|
127 |
} ?>
|
128 |
-
<script type="text/
|
129 |
<?php self::render_row( array(
|
130 |
-
'index' => '
|
131 |
-
'event' => '
|
132 |
'columns' => array(
|
133 |
-
'event' => '
|
134 |
-
'name' => '
|
135 |
-
'settings' => '
|
136 |
),
|
137 |
-
'settings' => '
|
138 |
) ); ?>
|
139 |
</script>
|
140 |
|
141 |
-
<script type="text/
|
142 |
ob_start(); ?>
|
143 |
<select id="popup_cookie_add_event">
|
144 |
<?php foreach ( PUM_Cookies::instance()->get_cookies() as $id => $cookie ) : ?>
|
@@ -155,12 +155,12 @@ class PUM_Popup_Cookies_Metabox {
|
|
155 |
</script>
|
156 |
|
157 |
<?php foreach ( PUM_Cookies::instance()->get_cookies() as $id => $cookie ) { ?>
|
158 |
-
<script type="text/
|
159 |
|
160 |
<?php ob_start(); ?>
|
161 |
|
162 |
<input type="hidden" name="event" class="event" value="<?php esc_attr_e( $id ); ?>"/>
|
163 |
-
<input type="hidden" name="index" class=index" value="
|
164 |
|
165 |
<div class="pum-tabs-container vertical-tabs tabbed-form">
|
166 |
|
@@ -194,7 +194,7 @@ class PUM_Popup_Cookies_Metabox {
|
|
194 |
'id' => 'pum_cookie_settings_' . $id,
|
195 |
'title' => __( 'Cookie Settings', 'popup-maker' ),
|
196 |
'class' => 'tabbed-content cookie-editor',
|
197 |
-
'save_button_text' => '
|
198 |
'content' => $content
|
199 |
) ); ?>
|
200 |
</script><?php
|
75 |
'columns' => array(
|
76 |
'event' => $cookie->get_label( 'name' ),
|
77 |
'name' => $values['settings']['name'],
|
78 |
+
'settings' => '{{PUMCookies.getSettingsDesc(data.event, data.cookie_settings)}}',
|
79 |
),
|
80 |
'settings' => $values['settings'],
|
81 |
) );
|
125 |
if ( ! popmake_is_admin_popup_page() ) {
|
126 |
return;
|
127 |
} ?>
|
128 |
+
<script type="text/html" id="tmpl-pum-cookie-row">
|
129 |
<?php self::render_row( array(
|
130 |
+
'index' => '{{data.index}}',
|
131 |
+
'event' => '{{data.event}}',
|
132 |
'columns' => array(
|
133 |
+
'event' => '{{PUMCookies.getLabel(data.event)}}',
|
134 |
+
'name' => '{{data.cookie_settings.name}}',
|
135 |
+
'settings' => '{{PUMCookies.getSettingsDesc(data.event, data.cookie_settings)}}',
|
136 |
),
|
137 |
+
'settings' => '{{JSON.stringify(data.cookie_settings)}}',
|
138 |
) ); ?>
|
139 |
</script>
|
140 |
|
141 |
+
<script type="text/html" id="tmpl-pum-cookie-add-event"><?php
|
142 |
ob_start(); ?>
|
143 |
<select id="popup_cookie_add_event">
|
144 |
<?php foreach ( PUM_Cookies::instance()->get_cookies() as $id => $cookie ) : ?>
|
155 |
</script>
|
156 |
|
157 |
<?php foreach ( PUM_Cookies::instance()->get_cookies() as $id => $cookie ) { ?>
|
158 |
+
<script type="text/html" id="tmpl-pum-cookie-settings-<?php esc_attr_e( $id ); ?>" class="pum-cookie-settings tmpl" data-cookie="<?php esc_attr_e( $id ); ?>">
|
159 |
|
160 |
<?php ob_start(); ?>
|
161 |
|
162 |
<input type="hidden" name="event" class="event" value="<?php esc_attr_e( $id ); ?>"/>
|
163 |
+
<input type="hidden" name="index" class=index" value="{{data.index}}"/>
|
164 |
|
165 |
<div class="pum-tabs-container vertical-tabs tabbed-form">
|
166 |
|
194 |
'id' => 'pum_cookie_settings_' . $id,
|
195 |
'title' => __( 'Cookie Settings', 'popup-maker' ),
|
196 |
'class' => 'tabbed-content cookie-editor',
|
197 |
+
'save_button_text' => '{{data.save_button_text}}',
|
198 |
'content' => $content
|
199 |
) ); ?>
|
200 |
</script><?php
|
includes/admin/popups/class-metabox-triggers.php
CHANGED
@@ -76,7 +76,7 @@ class PUM_Popup_Triggers_Metabox {
|
|
76 |
'columns' => array(
|
77 |
'type' => $trigger->get_label( 'name' ),
|
78 |
'cookie' => isset( $values['settings']['cookie']['name'] ) ? $values['settings']['cookie']['name'] : '',
|
79 |
-
'settings' => '
|
80 |
),
|
81 |
'settings' => $values['settings'],
|
82 |
) );
|
@@ -126,20 +126,20 @@ class PUM_Popup_Triggers_Metabox {
|
|
126 |
if ( ! popmake_is_admin_popup_page() ) {
|
127 |
return;
|
128 |
} ?>
|
129 |
-
<script type="text/
|
130 |
<?php self::render_row( array(
|
131 |
-
'index' => '
|
132 |
-
'type' => '
|
133 |
'columns' => array(
|
134 |
-
'type' => '
|
135 |
-
'cookie' => "
|
136 |
-
'settings' => '
|
137 |
),
|
138 |
-
'settings' => '
|
139 |
) ); ?>
|
140 |
</script>
|
141 |
|
142 |
-
<script type="text/
|
143 |
ob_start(); ?>
|
144 |
<select id="popup_trigger_add_type">
|
145 |
<?php foreach ( PUM_Triggers::instance()->get_triggers() as $id => $trigger ) : ?>
|
@@ -156,12 +156,12 @@ class PUM_Popup_Triggers_Metabox {
|
|
156 |
</script>
|
157 |
|
158 |
<?php foreach ( PUM_Triggers::instance()->get_triggers() as $id => $trigger ) { ?>
|
159 |
-
<script type="text/
|
160 |
|
161 |
<?php ob_start(); ?>
|
162 |
|
163 |
<input type="hidden" name="type" class="type" value="<?php esc_attr_e( $id ); ?>"/>
|
164 |
-
<input type="hidden" name="index" class=index" value="
|
165 |
|
166 |
<div class="pum-tabs-container vertical-tabs tabbed-form">
|
167 |
|
@@ -195,7 +195,7 @@ class PUM_Popup_Triggers_Metabox {
|
|
195 |
'id' => 'pum_trigger_settings_' . $id,
|
196 |
'title' => $trigger->get_label( 'modal_title' ),
|
197 |
'class' => 'tabbed-content trigger-editor',
|
198 |
-
'save_button_text' => '
|
199 |
'content' => $content
|
200 |
) ); ?>
|
201 |
</script><?php
|
76 |
'columns' => array(
|
77 |
'type' => $trigger->get_label( 'name' ),
|
78 |
'cookie' => isset( $values['settings']['cookie']['name'] ) ? $values['settings']['cookie']['name'] : '',
|
79 |
+
'settings' => '{{PUMTriggers.getSettingsDesc(data.type, data.trigger_settings)}}',
|
80 |
),
|
81 |
'settings' => $values['settings'],
|
82 |
) );
|
126 |
if ( ! popmake_is_admin_popup_page() ) {
|
127 |
return;
|
128 |
} ?>
|
129 |
+
<script type="text/html" id="tmpl-pum-trigger-row">
|
130 |
<?php self::render_row( array(
|
131 |
+
'index' => '{{data.index}}',
|
132 |
+
'type' => '{{data.type}}',
|
133 |
'columns' => array(
|
134 |
+
'type' => '{{PUMTriggers.getLabel(data.type)}}',
|
135 |
+
'cookie' => "{{PUMTriggers.cookie_column_value(data.trigger_settings.cookie.name)}}",
|
136 |
+
'settings' => '{{PUMTriggers.getSettingsDesc(data.type, data.trigger_settings)}}',
|
137 |
),
|
138 |
+
'settings' => '{{JSON.stringify(data.trigger_settings)}}',
|
139 |
) ); ?>
|
140 |
</script>
|
141 |
|
142 |
+
<script type="text/html" id="tmpl-pum-trigger-add-type"><?php
|
143 |
ob_start(); ?>
|
144 |
<select id="popup_trigger_add_type">
|
145 |
<?php foreach ( PUM_Triggers::instance()->get_triggers() as $id => $trigger ) : ?>
|
156 |
</script>
|
157 |
|
158 |
<?php foreach ( PUM_Triggers::instance()->get_triggers() as $id => $trigger ) { ?>
|
159 |
+
<script type="text/html" id="tmpl-pum-trigger-settings-<?php esc_attr_e( $id ); ?>" class="pum-trigger-settings tmpl" data-trigger="<?php esc_attr_e( $id ); ?>">
|
160 |
|
161 |
<?php ob_start(); ?>
|
162 |
|
163 |
<input type="hidden" name="type" class="type" value="<?php esc_attr_e( $id ); ?>"/>
|
164 |
+
<input type="hidden" name="index" class=index" value="{{data.index}}"/>
|
165 |
|
166 |
<div class="pum-tabs-container vertical-tabs tabbed-form">
|
167 |
|
195 |
'id' => 'pum_trigger_settings_' . $id,
|
196 |
'title' => $trigger->get_label( 'modal_title' ),
|
197 |
'class' => 'tabbed-content trigger-editor',
|
198 |
+
'save_button_text' => '{{data.save_button_text}}',
|
199 |
'content' => $content
|
200 |
) ); ?>
|
201 |
</script><?php
|
includes/admin/post-editor.php
DELETED
@@ -1,188 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// Exit if accessed directly
|
4 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
5 |
-
exit;
|
6 |
-
}
|
7 |
-
|
8 |
-
class PopMake_Post_Editor {
|
9 |
-
|
10 |
-
public static function init() {
|
11 |
-
add_filter( 'mce_buttons', array( __CLASS__, 'editor_buttons' ), 10, 2 );
|
12 |
-
add_filter( 'tiny_mce_before_init', array( __CLASS__, 'format_options' ) );
|
13 |
-
}
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Add Buttons To WP Editor Toolbar.
|
17 |
-
*/
|
18 |
-
public static function editor_buttons( $buttons, $editor_id ){
|
19 |
-
/* Add it as first item in the row */
|
20 |
-
array_unshift( $buttons, 'styleselect' );
|
21 |
-
return $buttons;
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Add Dropcap options to the style_formats drop down.
|
26 |
-
*/
|
27 |
-
public static function format_options( $settings ){
|
28 |
-
|
29 |
-
/* Our Own Custom Options */
|
30 |
-
$popup_formats = array();
|
31 |
-
|
32 |
-
foreach ( get_all_popups()->posts as $popup ) {
|
33 |
-
$popup_formats[] = array(
|
34 |
-
'title' => $popup->post_title,
|
35 |
-
'inline' => 'span',
|
36 |
-
'classes' => "popmake-{$popup->ID}"
|
37 |
-
);
|
38 |
-
}
|
39 |
-
|
40 |
-
$new_formats = array(
|
41 |
-
array(
|
42 |
-
'title' => __( 'Popup Trigger', 'popup-maker' ),
|
43 |
-
'items' => $popup_formats
|
44 |
-
)
|
45 |
-
);
|
46 |
-
|
47 |
-
/* Check if custom "style_formats" is enabled */
|
48 |
-
if ( isset( $settings['style_formats'] ) ) {
|
49 |
-
|
50 |
-
/* Get old style_format config */
|
51 |
-
$old_formats = json_decode( $settings['style_formats'] );
|
52 |
-
|
53 |
-
/* Merge it with our own */
|
54 |
-
$new_formats = array_merge( $new_formats, $old_formats );
|
55 |
-
}
|
56 |
-
else {
|
57 |
-
$new_formats = array_merge( self::default_formats(), $new_formats );
|
58 |
-
}
|
59 |
-
|
60 |
-
/* Add it in tinymce config as json data */
|
61 |
-
$settings['style_formats'] = json_encode( $new_formats );
|
62 |
-
return $settings;
|
63 |
-
}
|
64 |
-
|
65 |
-
public static function default_formats() {
|
66 |
-
return array(
|
67 |
-
array(
|
68 |
-
'title' => __( 'Headings' ),
|
69 |
-
'items' => array(
|
70 |
-
array(
|
71 |
-
'title' => __( 'Heading 1' ),
|
72 |
-
'format' => 'h1',
|
73 |
-
),
|
74 |
-
array(
|
75 |
-
'title' => __( 'Heading 2' ),
|
76 |
-
'format' => 'h2',
|
77 |
-
),
|
78 |
-
array(
|
79 |
-
'title' => __( 'Heading 3' ),
|
80 |
-
'format' => 'h3',
|
81 |
-
),
|
82 |
-
array(
|
83 |
-
'title' => __( 'Heading 4' ),
|
84 |
-
'format' => 'h4',
|
85 |
-
),
|
86 |
-
array(
|
87 |
-
'title' => __( 'Heading 5' ),
|
88 |
-
'format' => 'h5',
|
89 |
-
),
|
90 |
-
array(
|
91 |
-
'title' => __( 'Heading 6' ),
|
92 |
-
'format' => 'h6',
|
93 |
-
),
|
94 |
-
),
|
95 |
-
),
|
96 |
-
array(
|
97 |
-
'title' => 'Inline',
|
98 |
-
'items' => array(
|
99 |
-
array(
|
100 |
-
'title' => __( 'Bold' ),
|
101 |
-
'format' => 'bold',
|
102 |
-
'icon' => 'bold',
|
103 |
-
),
|
104 |
-
array(
|
105 |
-
'title' => __( 'Italic' ),
|
106 |
-
'format' => 'italic',
|
107 |
-
'icon' => 'italic',
|
108 |
-
),
|
109 |
-
array(
|
110 |
-
'title' => __( 'Underline' ),
|
111 |
-
'format' => 'underline',
|
112 |
-
'icon' => 'underline',
|
113 |
-
),
|
114 |
-
array(
|
115 |
-
'title' => __( 'Strikethrough' ),
|
116 |
-
'format' => 'strikethrough',
|
117 |
-
'icon' => 'strikethrough',
|
118 |
-
),
|
119 |
-
array(
|
120 |
-
'title' => __( 'Superscript' ),
|
121 |
-
'format' => 'superscript',
|
122 |
-
'icon' => 'superscript',
|
123 |
-
),
|
124 |
-
array(
|
125 |
-
'title' => __( 'Subscript' ),
|
126 |
-
'format' => 'subscript',
|
127 |
-
'icon' => 'subscript',
|
128 |
-
),
|
129 |
-
array(
|
130 |
-
'title' => __( 'Code' ),
|
131 |
-
'format' => 'code',
|
132 |
-
'icon' => 'code',
|
133 |
-
),
|
134 |
-
),
|
135 |
-
),
|
136 |
-
array(
|
137 |
-
'title' => 'Blocks',
|
138 |
-
'items' => array(
|
139 |
-
array(
|
140 |
-
'title' => __( 'Paragraph' ),
|
141 |
-
'format' => 'p',
|
142 |
-
),
|
143 |
-
array(
|
144 |
-
'title' => __( 'Blockquote' ),
|
145 |
-
'format' => 'blockquote',
|
146 |
-
),
|
147 |
-
array(
|
148 |
-
'title' => __( 'Div' ),
|
149 |
-
'format' => 'div',
|
150 |
-
),
|
151 |
-
array(
|
152 |
-
'title' => __( 'Pre' ),
|
153 |
-
'format' => 'pre',
|
154 |
-
),
|
155 |
-
),
|
156 |
-
),
|
157 |
-
array(
|
158 |
-
'title' => 'Alignment',
|
159 |
-
'items' => array(
|
160 |
-
array(
|
161 |
-
'title' => __( 'Left' ),
|
162 |
-
'format' => 'alignleft',
|
163 |
-
'icon' => 'alignleft',
|
164 |
-
),
|
165 |
-
array(
|
166 |
-
'title' => __( 'Center' ),
|
167 |
-
'format' => 'aligncenter',
|
168 |
-
'icon' => 'aligncenter',
|
169 |
-
),
|
170 |
-
array(
|
171 |
-
'title' => __( 'Right' ),
|
172 |
-
'format' => 'alignright',
|
173 |
-
'icon' => 'alignright',
|
174 |
-
),
|
175 |
-
array(
|
176 |
-
'title' => __( 'Justify' ),
|
177 |
-
'format' => 'alignjustify',
|
178 |
-
'icon' => 'alignjustify',
|
179 |
-
),
|
180 |
-
),
|
181 |
-
),
|
182 |
-
);
|
183 |
-
}
|
184 |
-
|
185 |
-
}
|
186 |
-
|
187 |
-
PopMake_Post_Editor::init();
|
188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/shortcode-ui/class-pum-admin-shortcode-ui.php
CHANGED
@@ -105,15 +105,15 @@ class PUM_Admin_Shortcode_UI {
|
|
105 |
if ( ! $this->editor_enabled() ) {
|
106 |
return;
|
107 |
}
|
108 |
-
include_once
|
109 |
-
include_once
|
110 |
}
|
111 |
|
112 |
public function admin_print_footer_scripts() {
|
113 |
if ( ! $this->editor_enabled() ) {
|
114 |
return;
|
115 |
}
|
116 |
-
include_once
|
117 |
}
|
118 |
|
119 |
public function shortcode_ui_var() {
|
105 |
if ( ! $this->editor_enabled() ) {
|
106 |
return;
|
107 |
}
|
108 |
+
include_once plugin_dir_path( __FILE__ ) . 'templates/fields.php';
|
109 |
+
include_once plugin_dir_path( __FILE__ ) . 'templates/helpers.php';
|
110 |
}
|
111 |
|
112 |
public function admin_print_footer_scripts() {
|
113 |
if ( ! $this->editor_enabled() ) {
|
114 |
return;
|
115 |
}
|
116 |
+
include_once plugin_dir_path( __FILE__ ) . 'footer-scripts.php';
|
117 |
}
|
118 |
|
119 |
public function shortcode_ui_var() {
|
includes/admin/shortcode-ui/footer-scripts.php
CHANGED
@@ -28,13 +28,19 @@
|
|
28 |
},
|
29 |
template: function (options) {
|
30 |
var template = $('#tmpl-pum-shortcode-view-' + tag),
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
_template;
|
32 |
|
33 |
if (!template.length) {
|
34 |
return this.text;
|
35 |
}
|
36 |
|
37 |
-
_template = _.template(template.html());
|
38 |
|
39 |
if (options.class) {
|
40 |
options.classes = options.class;
|
@@ -100,6 +106,7 @@
|
|
100 |
values = {};
|
101 |
}
|
102 |
|
|
|
103 |
// Fields come already arranged by section. Loop Sections then Fields.
|
104 |
_.each(data.fields, function (sectionFields, sectionID) {
|
105 |
|
28 |
},
|
29 |
template: function (options) {
|
30 |
var template = $('#tmpl-pum-shortcode-view-' + tag),
|
31 |
+
template_opts = {
|
32 |
+
evaluate: /<#([\s\S]+?)#>/g,
|
33 |
+
interpolate: /\{\{\{([\s\S]+?)\}\}\}/g,
|
34 |
+
escape: /\{\{([^\}]+?)\}\}(?!\})/g,
|
35 |
+
variable: 'attr'
|
36 |
+
},
|
37 |
_template;
|
38 |
|
39 |
if (!template.length) {
|
40 |
return this.text;
|
41 |
}
|
42 |
|
43 |
+
_template = _.template(template.html(), null, template_opts);
|
44 |
|
45 |
if (options.class) {
|
46 |
options.classes = options.class;
|
106 |
values = {};
|
107 |
}
|
108 |
|
109 |
+
|
110 |
// Fields come already arranged by section. Loop Sections then Fields.
|
111 |
_.each(data.fields, function (sectionFields, sectionID) {
|
112 |
|
includes/admin/shortcode-ui/templates/fields.php
CHANGED
@@ -1,89 +1,89 @@
|
|
1 |
-
<script type="text/
|
2 |
-
<div class="pum-field-section
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
</div>
|
7 |
</script>
|
8 |
|
9 |
-
<script type="text/
|
10 |
-
<div class="pum-field pum-field
|
11 |
-
<label for="
|
12 |
-
|
13 |
-
|
14 |
-
<p class="pum-desc desc"
|
15 |
-
|
16 |
</div>
|
17 |
</script>
|
18 |
|
19 |
-
<script type="text/
|
20 |
-
<h3 class="pum-field-heading"
|
21 |
</script>
|
22 |
|
23 |
-
<script type="text/
|
24 |
-
<input type="text" placeholder="
|
25 |
</script>
|
26 |
|
27 |
-
<script type="text/
|
28 |
-
<input type="range" placeholder="
|
29 |
</script>
|
30 |
|
31 |
-
<script type="text/
|
32 |
-
<input type="search" placeholder="
|
33 |
</script>
|
34 |
|
35 |
-
<script type="text/
|
36 |
-
<input type="number" placeholder="
|
37 |
</script>
|
38 |
|
39 |
-
<script type="text/
|
40 |
-
<input type="email" placeholder="
|
41 |
</script>
|
42 |
|
43 |
-
<script type="text/
|
44 |
-
<input type="url" placeholder="
|
45 |
</script>
|
46 |
|
47 |
-
<script type="text/
|
48 |
-
<input type="tel" placeholder="
|
49 |
</script>
|
50 |
|
51 |
-
<script type="text/
|
52 |
-
<input type="password" placeholder="
|
53 |
</script>
|
54 |
|
55 |
-
<script type="text/
|
56 |
-
<textarea name="
|
57 |
</script>
|
58 |
|
59 |
-
<script type="text/
|
60 |
-
<input type="hidden" class="
|
61 |
</script>
|
62 |
|
63 |
-
<script type="text/
|
64 |
-
<select id="
|
65 |
-
|
66 |
-
<option value="
|
67 |
-
|
68 |
</select>
|
69 |
</script>
|
70 |
|
71 |
-
<script type="text/
|
72 |
-
<input type="checkbox" id="
|
73 |
</script>
|
74 |
|
75 |
-
<script type="text/
|
76 |
<ul class="pum-field-mulitcheck-list">
|
77 |
-
|
78 |
<li>
|
79 |
-
<input type="checkbox" id="
|
80 |
-
<label for="
|
81 |
</li>
|
82 |
-
|
83 |
</ul>
|
84 |
</script>
|
85 |
|
86 |
-
<script type="text/
|
87 |
-
<input type="text" id="
|
88 |
-
<span class="range-value-unit regular-text"
|
89 |
</script>
|
1 |
+
<script type="text/html" id="tmpl-pum-field-section">
|
2 |
+
<div class="pum-field-section {{data.classes}}">
|
3 |
+
<# _.each(data.fields, function(field) { #>
|
4 |
+
{{{field}}}
|
5 |
+
<# }); #>
|
6 |
</div>
|
7 |
</script>
|
8 |
|
9 |
+
<script type="text/html" id="tmpl-pum-field-wrapper"><# console.log(data); #>
|
10 |
+
<div class="pum-field pum-field-{{data.type}} {{data.id}}-wrapper {{data.classes}}">
|
11 |
+
<label for="{{data.id}}">{{data.label}}</label>
|
12 |
+
{{{data.field}}}
|
13 |
+
<# if (data.desc) { #>
|
14 |
+
<p class="pum-desc desc">{{data.desc}}</p>
|
15 |
+
<# } #>
|
16 |
</div>
|
17 |
</script>
|
18 |
|
19 |
+
<script type="text/html" id="tmpl-pum-field-heading">
|
20 |
+
<h3 class="pum-field-heading">{{data.desc}}</h3>
|
21 |
</script>
|
22 |
|
23 |
+
<script type="text/html" id="tmpl-pum-field-text">
|
24 |
+
<input type="text" placeholder="{{data.placeholder}}" class="{{data.size}}-text" id="{{data.id}}" name="{{data.name}}" value="{{data.value}}" {{{data.meta}}}/>
|
25 |
</script>
|
26 |
|
27 |
+
<script type="text/html" id="tmpl-pum-field-range">
|
28 |
+
<input type="range" placeholder="{{data.placeholder}}" class="{{data.size}}-text" id="{{data.id}}" name="{{data.name}}" value="{{data.value}}" {{{data.meta}}}/>
|
29 |
</script>
|
30 |
|
31 |
+
<script type="text/html" id="tmpl-pum-field-search">
|
32 |
+
<input type="search" placeholder="{{data.placeholder}}" class="{{data.size}}-text" id="{{data.id}}" name="{{data.name}}" value="{{data.value}}" {{{data.meta}}}/>
|
33 |
</script>
|
34 |
|
35 |
+
<script type="text/html" id="tmpl-pum-field-number">
|
36 |
+
<input type="number" placeholder="{{data.placeholder}}" class="{{data.size}}-text" id="{{data.id}}" name="{{data.name}}" value="{{data.value}}" {{{data.meta}}}/>
|
37 |
</script>
|
38 |
|
39 |
+
<script type="text/html" id="tmpl-pum-field-email">
|
40 |
+
<input type="email" placeholder="{{data.placeholder}}" class="{{data.size}}-text" id="{{data.id}}" name="{{data.name}}" value="{{data.value}}" {{{data.meta}}}/>
|
41 |
</script>
|
42 |
|
43 |
+
<script type="text/html" id="tmpl-pum-field-url">
|
44 |
+
<input type="url" placeholder="{{data.placeholder}}" class="{{data.size}}-text" id="{{data.id}}" name="{{data.name}}" value="{{data.value}}" {{{data.meta}}}/>
|
45 |
</script>
|
46 |
|
47 |
+
<script type="text/html" id="tmpl-pum-field-tel">
|
48 |
+
<input type="tel" placeholder="{{data.placeholder}}" class="{{data.size}}-text" id="{{data.id}}" name="{{data.name}}" value="{{data.value}}" {{{data.meta}}}/>
|
49 |
</script>
|
50 |
|
51 |
+
<script type="text/html" id="tmpl-pum-field-password">
|
52 |
+
<input type="password" placeholder="{{data.placeholder}}" class="{{data.size}}-text" id="{{data.id}}" name="{{data.name}}" value="{{data.value}}" {{{data.meta}}}/>
|
53 |
</script>
|
54 |
|
55 |
+
<script type="text/html" id="tmpl-pum-field-textarea">
|
56 |
+
<textarea name="{{data.name}}" id="{{data.id}}" class="{{data.size}}-text" {{{data.meta}}}>{{data.value}}</textarea>
|
57 |
</script>
|
58 |
|
59 |
+
<script type="text/html" id="tmpl-pum-field-hidden">
|
60 |
+
<input type="hidden" class="{{data.classes}}" id="{{data.id}}" name="{{data.name}}" value="{{data.value}}" {{{data.meta}}}/>
|
61 |
</script>
|
62 |
|
63 |
+
<script type="text/html" id="tmpl-pum-field-select">
|
64 |
+
<select id="{{data.id}}" name="{{data.name}}" data-allow-clear="true" {{{data.meta}}}>
|
65 |
+
<# _.each(data.options, function(option, key) { #>
|
66 |
+
<option value="{{option.value}}" {{{option.meta}}}>{{option.label}}</option>
|
67 |
+
<# }); #>
|
68 |
</select>
|
69 |
</script>
|
70 |
|
71 |
+
<script type="text/html" id="tmpl-pum-field-checkbox">
|
72 |
+
<input type="checkbox" id="{{data.id}}" name="{{data.name}}" value="1" {{{data.meta}}}/>
|
73 |
</script>
|
74 |
|
75 |
+
<script type="text/html" id="tmpl-pum-field-multicheck">
|
76 |
<ul class="pum-field-mulitcheck-list">
|
77 |
+
<# _.each(data.options, function(option, key) { #>
|
78 |
<li>
|
79 |
+
<input type="checkbox" id="{{data.id}}_{{key}}" name="{{data.name}}[{{option.value}}]" value="1" {{{option.meta}}}/>
|
80 |
+
<label for="{{data.id}}_{{key}}">{{option.label}}</label>
|
81 |
</li>
|
82 |
+
<# }); #>
|
83 |
</ul>
|
84 |
</script>
|
85 |
|
86 |
+
<script type="text/html" id="tmpl-pum-field-rangeslider">
|
87 |
+
<input type="text" id="{{data.id}}" name="{{data.name}}" value="{{data.value}}" class="popmake-range-manual pum-range-manual" {{{data.meta}}}/>
|
88 |
+
<span class="range-value-unit regular-text">{{data.unit}}</span>
|
89 |
</script>
|
includes/admin/shortcode-ui/templates/helpers.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
<script type="text/
|
2 |
-
<div id="
|
3 |
|
4 |
<div class="pum-modal-wrap">
|
5 |
|
@@ -7,42 +7,42 @@
|
|
7 |
|
8 |
<div class="pum-modal-header">
|
9 |
|
10 |
-
|
11 |
-
<span id="
|
12 |
-
|
13 |
|
14 |
<button type="button" class="pum-modal-close" aria-label="<?php _e( 'Close', 'popup-maker' ); ?>"></button>
|
15 |
|
16 |
</div>
|
17 |
|
18 |
-
|
19 |
-
<span id="
|
20 |
-
|
21 |
|
22 |
<div class="pum-modal-content">
|
23 |
-
|
24 |
</div>
|
25 |
|
26 |
-
|
27 |
|
28 |
<div class="pum-modal-footer submitbox">
|
29 |
|
30 |
-
|
31 |
<div class="cancel">
|
32 |
-
<button type="button" class="submitdelete no-button" href="#"
|
33 |
</div>
|
34 |
-
|
35 |
|
36 |
-
|
37 |
<div class="pum-submit">
|
38 |
<span class="spinner"></span>
|
39 |
-
<button class="button button-primary"
|
40 |
</div>
|
41 |
-
|
42 |
|
43 |
</div>
|
44 |
|
45 |
-
|
46 |
|
47 |
</form>
|
48 |
|
@@ -51,30 +51,30 @@
|
|
51 |
</div>
|
52 |
</script>
|
53 |
|
54 |
-
<script type="text/
|
55 |
-
<div class="pum-tabs-container
|
56 |
|
57 |
<ul class="tabs">
|
58 |
-
|
59 |
<li class="tab">
|
60 |
-
<a href="
|
61 |
</li>
|
62 |
-
|
63 |
</ul>
|
64 |
|
65 |
-
|
66 |
-
<div id="
|
67 |
-
|
68 |
</div>
|
69 |
-
|
70 |
|
71 |
</div>
|
72 |
</script>
|
73 |
|
74 |
-
<script type="text/
|
75 |
-
[
|
76 |
</script>
|
77 |
|
78 |
-
<script type="text/
|
79 |
-
[
|
80 |
</script>
|
1 |
+
<script type="text/html" id="tmpl-pum-modal">
|
2 |
+
<div id="{{data.id}}" class="pum-modal-background {{data.classes}}" role="dialog" aria-hidden="true" aria-labelledby="{{data.id}}-title" aria-describedby="{{data.id}}-description" {{data.meta}}>
|
3 |
|
4 |
<div class="pum-modal-wrap">
|
5 |
|
7 |
|
8 |
<div class="pum-modal-header">
|
9 |
|
10 |
+
<# if (data.title.length) { #>
|
11 |
+
<span id="{{data.id}}-title" class="pum-modal-title">{{data.title}}</span>
|
12 |
+
<# } #>
|
13 |
|
14 |
<button type="button" class="pum-modal-close" aria-label="<?php _e( 'Close', 'popup-maker' ); ?>"></button>
|
15 |
|
16 |
</div>
|
17 |
|
18 |
+
<# if (data.description.length) { #>
|
19 |
+
<span id="{{data.id}}-description" class="screen-reader-text">{{data.description}}</span>
|
20 |
+
<# } #>
|
21 |
|
22 |
<div class="pum-modal-content">
|
23 |
+
{{{data.content}}}
|
24 |
</div>
|
25 |
|
26 |
+
<# if (data.save_button || data.cancel_button) { #>
|
27 |
|
28 |
<div class="pum-modal-footer submitbox">
|
29 |
|
30 |
+
<# if (data.cancel_button) { #>
|
31 |
<div class="cancel">
|
32 |
+
<button type="button" class="submitdelete no-button" href="#">{{data.cancel_button}}</button>
|
33 |
</div>
|
34 |
+
<# } #>
|
35 |
|
36 |
+
<# if (data.save_button) { #>
|
37 |
<div class="pum-submit">
|
38 |
<span class="spinner"></span>
|
39 |
+
<button class="button button-primary">{{data.save_button}}</button>
|
40 |
</div>
|
41 |
+
<# } #>
|
42 |
|
43 |
</div>
|
44 |
|
45 |
+
<# } #>
|
46 |
|
47 |
</form>
|
48 |
|
51 |
</div>
|
52 |
</script>
|
53 |
|
54 |
+
<script type="text/html" id="tmpl-pum-tabs">
|
55 |
+
<div class="pum-tabs-container {{data.classes}}" {{data.meta}}>
|
56 |
|
57 |
<ul class="tabs">
|
58 |
+
<# _.each(data.tabs, function(tab, key) { #>
|
59 |
<li class="tab">
|
60 |
+
<a href="#{{data.id + '_' + key}}">{{tab.label}}</a>
|
61 |
</li>
|
62 |
+
<# }); #>
|
63 |
</ul>
|
64 |
|
65 |
+
<# _.each(data.tabs, function(tab, key) { #>
|
66 |
+
<div id="{{data.id + '_' + key}}" class="tab-content">
|
67 |
+
{{{tab.content}}}
|
68 |
</div>
|
69 |
+
<# }); #>
|
70 |
|
71 |
</div>
|
72 |
</script>
|
73 |
|
74 |
+
<script type="text/html" id="tmpl-pum-shortcode">
|
75 |
+
[{{{data.tag}}} {{{data.meta}}}]
|
76 |
</script>
|
77 |
|
78 |
+
<script type="text/html" id="tmpl-pum-shortcode-w-content">
|
79 |
+
[{{{data.tag}}} {{{data.meta}}}]{{{data.content}}}[/{{{data.tag}}}]
|
80 |
</script>
|
includes/class-popmake-fields.php
CHANGED
@@ -350,7 +350,7 @@ class Popmake_Fields {
|
|
350 |
);
|
351 |
|
352 |
if ( $print ) {
|
353 |
-
$name = "
|
354 |
}
|
355 |
|
356 |
return $name;
|
350 |
);
|
351 |
|
352 |
if ( $print ) {
|
353 |
+
$name = "{{data.$name}}";
|
354 |
}
|
355 |
|
356 |
return $name;
|
includes/class-pum-condition.php
CHANGED
@@ -139,7 +139,7 @@ class PUM_Condition extends PUM_Fields {
|
|
139 |
);
|
140 |
|
141 |
if ( $print ) {
|
142 |
-
$name =
|
143 |
}
|
144 |
|
145 |
return $name;
|
139 |
);
|
140 |
|
141 |
if ( $print ) {
|
142 |
+
$name = '{{' . $name . '}}';
|
143 |
}
|
144 |
|
145 |
return $name;
|
includes/class-pum-cookie.php
CHANGED
@@ -47,9 +47,9 @@ class PUM_Cookie extends PUM_Fields {
|
|
47 |
'name' => __( 'Cookie', 'popup-maker' ),
|
48 |
'modal_title' => __( 'Cookie Settings', 'popup-maker' ),
|
49 |
'settings_column' => sprintf( '%s%s%s',
|
50 |
-
'
|
51 |
__( 'Sessions', 'popup-maker' ),
|
52 |
-
'"); }
|
53 |
),
|
54 |
) );
|
55 |
}
|
47 |
'name' => __( 'Cookie', 'popup-maker' ),
|
48 |
'modal_title' => __( 'Cookie Settings', 'popup-maker' ),
|
49 |
'settings_column' => sprintf( '%s%s%s',
|
50 |
+
'<# if (typeof data.session === "undefined" || data.session !== "1") { print(data.time); } else { print("',
|
51 |
__( 'Sessions', 'popup-maker' ),
|
52 |
+
'"); } #>'
|
53 |
),
|
54 |
) );
|
55 |
}
|
includes/class-pum-fields.php
CHANGED
@@ -281,7 +281,7 @@ class PUM_Fields extends Popmake_Fields {
|
|
281 |
<label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
|
282 |
} ?>
|
283 |
|
284 |
-
<textarea placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" class="<?php esc_attr_e( $args['size'] ); ?>-text" id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" cols="<?php esc_attr_e( $args['cols'] ); ?>" rows="<?php esc_attr_e( $args['rows'] ); ?>" <?php if ( $args['required'] ) { echo 'required'; }
|
285 |
|
286 |
if ( $args['desc'] != '' ) { ?>
|
287 |
<label for="<?php esc_attr_e( $args['id'] ); ?>" class="pum-desc desc"><?php esc_html_e( $args['desc'] ); ?></label><?php
|
@@ -387,7 +387,7 @@ class PUM_Fields extends Popmake_Fields {
|
|
387 |
<label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
|
388 |
} ?>
|
389 |
|
390 |
-
<select id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" data-placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" data-allow-clear="true" <?php echo $multiple; ?> <?php if ( $args['required'] ) { echo 'required'; }
|
391 |
|
392 |
<?php if ( ! empty( $args['options'] ) ) {
|
393 |
foreach ( $args['options'] as $label => $option ) {
|
@@ -397,7 +397,7 @@ class PUM_Fields extends Popmake_Fields {
|
|
397 |
} elseif( ! $multiple && $option == $value ) {
|
398 |
$selected = 1;
|
399 |
} ?>
|
400 |
-
<option value="<?php esc_attr_e( $option ); ?>" <?php selected( 1, $selected );
|
401 |
}
|
402 |
} ?>
|
403 |
|
@@ -474,7 +474,7 @@ class PUM_Fields extends Popmake_Fields {
|
|
474 |
<label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
|
475 |
} ?>
|
476 |
|
477 |
-
<select id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" data-placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" data-allow-clear="true" <?php echo $multiple; ?> data-objecttype="<?php esc_attr_e( $args['object_type'] ); ?>" data-objectkey="<?php esc_attr_e( $args['object_key'] ); ?>" data-current="<?php echo maybe_json_attr( $value, true ); ?>" <?php if ( $args['required'] ) { echo 'required'; }
|
478 |
|
479 |
<?php if ( ! empty( $args['options'] ) ) {
|
480 |
foreach ( $args['options'] as $label => $option ) {
|
@@ -484,7 +484,7 @@ class PUM_Fields extends Popmake_Fields {
|
|
484 |
} elseif( ! $multiple && $option == $value ) {
|
485 |
$selected = 1;
|
486 |
} ?>
|
487 |
-
<option value="<?php esc_attr_e( $option ); ?>" <?php selected( 1, $selected );
|
488 |
}
|
489 |
} ?>
|
490 |
|
@@ -915,15 +915,13 @@ class PUM_Fields extends Popmake_Fields {
|
|
915 |
<label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
|
916 |
} ?>
|
917 |
|
918 |
-
<select id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" data-placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" data-allow-clear="true" <?php echo $multiple;
|
919 |
|
920 |
<?php if ( ! empty( $args['options'] ) ) {
|
921 |
-
foreach ( $args['options'] as $label => $option ) {
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
echo esc_html( $label );
|
926 |
-
echo "</option>";
|
927 |
}
|
928 |
} ?>
|
929 |
|
@@ -959,19 +957,17 @@ class PUM_Fields extends Popmake_Fields {
|
|
959 |
<label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
|
960 |
} ?>
|
961 |
|
962 |
-
|
963 |
-
|
964 |
-
}
|
965 |
|
966 |
<select id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" data-placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" data-allow-clear="true" <?php echo $multiple; ?> data-objecttype="<?php esc_attr_e( $args['object_type'] ); ?>" data-objectkey="<?php esc_attr_e( $args['object_key'] ); ?>">
|
967 |
|
968 |
<?php if ( ! empty( $args['options'] ) ) {
|
969 |
-
foreach ( $args['options'] as $label => $option ) {
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
echo esc_html( $label );
|
974 |
-
echo "</option>";
|
975 |
}
|
976 |
} ?>
|
977 |
|
@@ -1036,7 +1032,7 @@ class PUM_Fields extends Popmake_Fields {
|
|
1036 |
<label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
|
1037 |
} ?>
|
1038 |
|
1039 |
-
<input type="checkbox" id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" value="<?php esc_attr_e( $args['checkbox_val'] ); ?>"
|
1040 |
|
1041 |
if ( ! empty( $args['desc'] ) ) { ?>
|
1042 |
<label class="pum-desc" for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['desc'] ); ?></label><?php
|
@@ -1063,7 +1059,7 @@ class PUM_Fields extends Popmake_Fields {
|
|
1063 |
}
|
1064 |
|
1065 |
foreach ( $args['options'] as $key => $option ) { ?>
|
1066 |
-
<input name="<?php esc_attr_e( $args['name'] ); ?>[<?php esc_attr_e( $key ); ?>]" id="<?php esc_attr_e( $args['id'] ); ?>[<?php esc_attr_e( $key ); ?>]" type="checkbox" value="<?php esc_html_e( $option ); ?>"
|
1067 |
<label for="<?php esc_attr_e( $args['id'] ); ?>[<?php esc_attr_e( $key ); ?>]"><?php esc_html_e( $option ); ?></label><br/><?php
|
1068 |
}
|
1069 |
if ( $args['desc'] != '' ) { ?>
|
281 |
<label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
|
282 |
} ?>
|
283 |
|
284 |
+
<textarea placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" class="<?php esc_attr_e( $args['size'] ); ?>-text" id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" cols="<?php esc_attr_e( $args['cols'] ); ?>" rows="<?php esc_attr_e( $args['rows'] ); ?>" <?php if ( $args['required'] ) { echo 'required'; } ?>><?php echo esc_textarea( stripslashes( $value ) ); ?></textarea><?php
|
285 |
|
286 |
if ( $args['desc'] != '' ) { ?>
|
287 |
<label for="<?php esc_attr_e( $args['id'] ); ?>" class="pum-desc desc"><?php esc_html_e( $args['desc'] ); ?></label><?php
|
387 |
<label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
|
388 |
} ?>
|
389 |
|
390 |
+
<select id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" data-placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" data-allow-clear="true" <?php echo $multiple; ?> <?php if ( $args['required'] ) { echo 'required'; } ?>>
|
391 |
|
392 |
<?php if ( ! empty( $args['options'] ) ) {
|
393 |
foreach ( $args['options'] as $label => $option ) {
|
397 |
} elseif( ! $multiple && $option == $value ) {
|
398 |
$selected = 1;
|
399 |
} ?>
|
400 |
+
<option value="<?php esc_attr_e( $option ); ?>" <?php selected( 1, $selected ); ?>><?php esc_html_e( $label ); ?></option><?php
|
401 |
}
|
402 |
} ?>
|
403 |
|
474 |
<label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
|
475 |
} ?>
|
476 |
|
477 |
+
<select id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" data-placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" data-allow-clear="true" <?php echo $multiple; ?> data-objecttype="<?php esc_attr_e( $args['object_type'] ); ?>" data-objectkey="<?php esc_attr_e( $args['object_key'] ); ?>" data-current="<?php echo maybe_json_attr( $value, true ); ?>" <?php if ( $args['required'] ) { echo 'required'; } ?>>
|
478 |
|
479 |
<?php if ( ! empty( $args['options'] ) ) {
|
480 |
foreach ( $args['options'] as $label => $option ) {
|
484 |
} elseif( ! $multiple && $option == $value ) {
|
485 |
$selected = 1;
|
486 |
} ?>
|
487 |
+
<option value="<?php esc_attr_e( $option ); ?>" <?php selected( 1, $selected ); ?>><?php esc_html_e( $label ); ?></option><?php
|
488 |
}
|
489 |
} ?>
|
490 |
|
915 |
<label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
|
916 |
} ?>
|
917 |
|
918 |
+
<select id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" data-placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" data-allow-clear="true" <?php echo $multiple; ?>>
|
919 |
|
920 |
<?php if ( ! empty( $args['options'] ) ) {
|
921 |
+
foreach ( $args['options'] as $label => $option ) { ?>
|
922 |
+
<option value="<?php esc_attr_e( $option ); ?>" {{pumSelected(data.<?php esc_attr_e( $templ_name ); ?>, '<?php echo $option; ?>', true)}}>
|
923 |
+
<?php esc_html_e( $label ); ?>
|
924 |
+
</option><?php
|
|
|
|
|
925 |
}
|
926 |
} ?>
|
927 |
|
957 |
<label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
|
958 |
} ?>
|
959 |
|
960 |
+
<# if (typeof data.<?php esc_attr_e( $templ_name ); ?> === 'undefined') {
|
961 |
+
data.<?php esc_attr_e( $templ_name ); ?> = '';
|
962 |
+
} #>
|
963 |
|
964 |
<select id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" data-placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" data-allow-clear="true" <?php echo $multiple; ?> data-objecttype="<?php esc_attr_e( $args['object_type'] ); ?>" data-objectkey="<?php esc_attr_e( $args['object_key'] ); ?>">
|
965 |
|
966 |
<?php if ( ! empty( $args['options'] ) ) {
|
967 |
+
foreach ( $args['options'] as $label => $option ) { ?>
|
968 |
+
<option value="<?php esc_attr_e( $option ); ?>" {{pumSelected(data.<?php esc_attr_e( $templ_name ); ?>, '<?php echo $option; ?>', true)}}>
|
969 |
+
<?php esc_html_e( $label ); ?>
|
970 |
+
</option><?php
|
|
|
|
|
971 |
}
|
972 |
} ?>
|
973 |
|
1032 |
<label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
|
1033 |
} ?>
|
1034 |
|
1035 |
+
<input type="checkbox" id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" value="<?php esc_attr_e( $args['checkbox_val'] ); ?>" <# if (data.<?php esc_attr_e( $templ_name ); ?>) { print('checked="checked"'); } #> /><?php
|
1036 |
|
1037 |
if ( ! empty( $args['desc'] ) ) { ?>
|
1038 |
<label class="pum-desc" for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['desc'] ); ?></label><?php
|
1059 |
}
|
1060 |
|
1061 |
foreach ( $args['options'] as $key => $option ) { ?>
|
1062 |
+
<input name="<?php esc_attr_e( $args['name'] ); ?>[<?php esc_attr_e( $key ); ?>]" id="<?php esc_attr_e( $args['id'] ); ?>[<?php esc_attr_e( $key ); ?>]" type="checkbox" value="<?php esc_html_e( $option ); ?>" <# if (data.<?php esc_attr_e( $templ_name . '[' . $key . ']' ); ?> !== undefined) { print('checked="checked"'); } #> />
|
1063 |
<label for="<?php esc_attr_e( $args['id'] ); ?>[<?php esc_attr_e( $key ); ?>]"><?php esc_html_e( $option ); ?></label><br/><?php
|
1064 |
}
|
1065 |
if ( $args['desc'] != '' ) { ?>
|
includes/class-pum-freemius.php
CHANGED
@@ -89,9 +89,21 @@ class PUM_Freemius {
|
|
89 |
$this->fs()->add_action( 'after_account_plan_sync', array( $this, 'plan_sync' ), 10, 2 );
|
90 |
|
91 |
if ( function_exists( 'fs_override_i18n' ) ) {
|
92 |
-
$
|
93 |
-
'delete-account-confirm' => __( 'Deleting your account will stop sending usage statistics and disable usage of in dash support forms. This will not stop the plugin from functioning. Are you sure you want to do this?', 'popup-maker' )
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
}
|
96 |
}
|
97 |
|
@@ -123,29 +135,16 @@ class PUM_Freemius {
|
|
123 |
*/
|
124 |
public function custom_connect_message( $message, $user_first_name, $plugin_title, $user_login, $site_link, $freemius_link ) {
|
125 |
|
|
|
|
|
126 |
// If the user already opted in before ask them to do it again.
|
127 |
if ( popmake_get_option( 'allow_tracking', false ) ) {
|
128 |
-
$intro
|
129 |
-
__( 'We appreciate that you chose to opt-in once before and ask that you please continue to help us improve %2$s!', 'popup-maker' ) . '<br/><br/>' .
|
130 |
-
__( 'If you choose to opt-in again:', 'popup-maker' );
|
131 |
-
|
132 |
} else {
|
133 |
-
$intro
|
134 |
-
__( 'If you opt-in now:', 'popup-maker' );
|
135 |
}
|
136 |
|
137 |
-
return sprintf(
|
138 |
-
__fs( 'hey-x' ) . '<br/><br/>' .
|
139 |
-
$intro .
|
140 |
-
'</p><ul style="font-size: 14px; padding-left: 18px;list-style:square;">' .
|
141 |
-
'<li>' . __( 'Receive a code for 20%% off any purchase in our extension store.', 'popup-maker' ) . '</li>' .
|
142 |
-
'<li>' . __( 'Submit support requests from your own dashboard and reply by email. (No more forums)', 'popup-maker' ) . '</li>' .
|
143 |
-
'<li>' . __( 'And no sensitive data is tracked.', 'popup-maker' ) . '</li>' .
|
144 |
-
'</ul><p>' .
|
145 |
-
__( 'If you skip this, that\'s okay! The plugin will still work just fine.', 'popup-maker' ),
|
146 |
-
$user_first_name,
|
147 |
-
'<strong>' . $plugin_title . '</strong>'
|
148 |
-
);
|
149 |
|
150 |
}
|
151 |
|
89 |
$this->fs()->add_action( 'after_account_plan_sync', array( $this, 'plan_sync' ), 10, 2 );
|
90 |
|
91 |
if ( function_exists( 'fs_override_i18n' ) ) {
|
92 |
+
$i18n = array(
|
93 |
+
'delete-account-confirm' => __( 'Deleting your account will stop sending usage statistics and disable usage of in dash support forms. This will not stop the plugin from functioning. Are you sure you want to do this?', 'popup-maker' ),
|
94 |
+
'skip' => _x( 'Maybe later', 'button label', 'popup-maker' ),
|
95 |
+
);
|
96 |
+
|
97 |
+
$settings = get_option( 'popmake_settings' );
|
98 |
+
|
99 |
+
// If the user already opted in before ask them to do it again.
|
100 |
+
if ( isset( $settings['allow_tracking'] ) && $settings['allow_tracking'] ) {
|
101 |
+
$i18n['opt-in-connect'] = _x( 'Yes - I’m in!', 'button label', 'popup-maker' );
|
102 |
+
} else {
|
103 |
+
$i18n['opt-in-connect'] = _x( 'Awesome - I’m in!', 'button label', 'popup-maker' );
|
104 |
+
}
|
105 |
+
|
106 |
+
$this->fs()->override_i18n( $i18n );
|
107 |
}
|
108 |
}
|
109 |
|
135 |
*/
|
136 |
public function custom_connect_message( $message, $user_first_name, $plugin_title, $user_login, $site_link, $freemius_link ) {
|
137 |
|
138 |
+
$intro = __fs( 'hey-x' ) . '<br/><br/>';
|
139 |
+
|
140 |
// If the user already opted in before ask them to do it again.
|
141 |
if ( popmake_get_option( 'allow_tracking', false ) ) {
|
142 |
+
$intro .= __( 'We moved our usage tracking to a new platform called %s, kindly confirm if you are good with it?', 'popup-maker' );
|
|
|
|
|
|
|
143 |
} else {
|
144 |
+
$intro .= __( 'Help us to improve Popup Maker and make it even more awesome by allowing us to capture some data with %s. In return, we will send you a 20%% discount for the extension store.', 'popup-maker' );
|
|
|
145 |
}
|
146 |
|
147 |
+
return sprintf( $intro, $user_first_name, '<a href="https://freemius.com/wordpress/insights/">Freemius</a>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
|
149 |
}
|
150 |
|
includes/pum-trigger-functions.php
CHANGED
@@ -81,7 +81,7 @@ function pum_get_trigger_labels() {
|
|
81 |
'settings_column' => sprintf(
|
82 |
'<strong>%1$s</strong>: %2$s',
|
83 |
__( 'Extra Selectors', 'popup-maker' ),
|
84 |
-
'
|
85 |
),
|
86 |
),
|
87 |
'auto_open' => array(
|
@@ -90,7 +90,7 @@ function pum_get_trigger_labels() {
|
|
90 |
'settings_column' => sprintf(
|
91 |
'<strong>%1$s</strong>: %2$s',
|
92 |
__( 'Delay', 'popup-maker' ),
|
93 |
-
'
|
94 |
),
|
95 |
),
|
96 |
) );
|
81 |
'settings_column' => sprintf(
|
82 |
'<strong>%1$s</strong>: %2$s',
|
83 |
__( 'Extra Selectors', 'popup-maker' ),
|
84 |
+
'{{data.extra_selectors}}'
|
85 |
),
|
86 |
),
|
87 |
'auto_open' => array(
|
90 |
'settings_column' => sprintf(
|
91 |
'<strong>%1$s</strong>: %2$s',
|
92 |
__( 'Delay', 'popup-maker' ),
|
93 |
+
'{{data.delay}}'
|
94 |
),
|
95 |
),
|
96 |
) );
|
includes/scripts.php
CHANGED
@@ -264,6 +264,11 @@ function popmake_load_admin_styles( $hook ) {
|
|
264 |
wp_deregister_style( 'select2' );
|
265 |
}
|
266 |
|
|
|
|
|
|
|
|
|
|
|
267 |
wp_enqueue_style( 'select2', $css_dir . 'select2' . $suffix, array(), '4.0.1' );
|
268 |
|
269 |
wp_enqueue_style( 'wp-color-picker' );
|
264 |
wp_deregister_style( 'select2' );
|
265 |
}
|
266 |
|
267 |
+
// Added because Ultimate Member currently adds bad stylesheets for select2 breaking form layouts.
|
268 |
+
if ( wp_style_is( 'um_minified', 'enqueued' ) ) {
|
269 |
+
wp_dequeue_style ( 'um_minified' );
|
270 |
+
}
|
271 |
+
|
272 |
wp_enqueue_style( 'select2', $css_dir . 'select2' . $suffix, array(), '4.0.1' );
|
273 |
|
274 |
wp_enqueue_style( 'wp-color-picker' );
|
includes/shortcodes/class-pum-shortcode-popup-close.php
CHANGED
@@ -90,8 +90,8 @@ class PUM_Shortcode_Popup_Close extends PUM_Shortcode {
|
|
90 |
}
|
91 |
|
92 |
public function _template() { ?>
|
93 |
-
<script type="text/
|
94 |
-
|
95 |
</script><?php
|
96 |
}
|
97 |
|
90 |
}
|
91 |
|
92 |
public function _template() { ?>
|
93 |
+
<script type="text/html" id="tmpl-pum-shortcode-view-popup_close">
|
94 |
+
<{{{attr.tag}}} class="pum-close popmake-close <# if (typeof attr.classes !== 'undefined') print(attr.classes); #>">{{{attr._inner_content}}}</{{{attr.tag}}}>
|
95 |
</script><?php
|
96 |
}
|
97 |
|
includes/shortcodes/class-pum-shortcode-popup-trigger.php
CHANGED
@@ -104,8 +104,8 @@ class PUM_Shortcode_Popup_Trigger extends PUM_Shortcode {
|
|
104 |
}
|
105 |
|
106 |
public function _template() { ?>
|
107 |
-
<script type="text/
|
108 |
-
|
109 |
</script><?php
|
110 |
}
|
111 |
|
104 |
}
|
105 |
|
106 |
public function _template() { ?>
|
107 |
+
<script type="text/html" id="tmpl-pum-shortcode-view-popup_trigger">
|
108 |
+
<{{{attr.tag}}} class="popmake-{{{attr.id}}} {{{attr.classes}}}">{{{attr._inner_content}}}</{{{attr.tag}}}>
|
109 |
</script><?php
|
110 |
}
|
111 |
|
includes/shortcodes/class-pum-shortcode-popup.php
CHANGED
@@ -320,8 +320,8 @@ class PUM_Shortcode_Popup extends PUM_Shortcode {
|
|
320 |
}
|
321 |
|
322 |
public function _template() { ?>
|
323 |
-
<script type="text/
|
324 |
-
<?php _e( 'Popup', 'popup-maker' ); ?>: ID "
|
325 |
</script><?php
|
326 |
}
|
327 |
|
320 |
}
|
321 |
|
322 |
public function _template() { ?>
|
323 |
+
<script type="text/html" id="tmpl-pum-shortcode-view-popup">
|
324 |
+
<?php _e( 'Popup', 'popup-maker' ); ?>: ID "{{attr.id}}"
|
325 |
</script><?php
|
326 |
}
|
327 |
|
languages/popup-maker.pot
CHANGED
@@ -694,10 +694,6 @@ msgstr ""
|
|
694 |
msgid "ucwordsstr_replace_"
|
695 |
msgstr ""
|
696 |
|
697 |
-
#: includes/admin/post-editor.php:42, includes/shortcodes/class-pum-shortcode-popup-trigger.php:24
|
698 |
-
msgid "Popup Trigger"
|
699 |
-
msgstr ""
|
700 |
-
|
701 |
#: includes/admin/settings/register-settings.php:139
|
702 |
msgid "Allow Usage Tracking?"
|
703 |
msgstr ""
|
@@ -1354,48 +1350,35 @@ msgstr ""
|
|
1354 |
msgid "Deleting your account will stop sending usage statistics and disable usage of in dash support forms. This will not stop the plugin from functioning. Are you sure you want to do this?"
|
1355 |
msgstr ""
|
1356 |
|
1357 |
-
#: includes/class-pum-freemius.php:
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
#: includes/class-pum-freemius.php:106
|
1362 |
-
msgid "Popup & Theme Counts, Open Counts"
|
1363 |
-
msgstr ""
|
1364 |
-
|
1365 |
-
#: includes/class-pum-freemius.php:128
|
1366 |
-
msgid "We have moved our usage tracking to a new platform."
|
1367 |
msgstr ""
|
1368 |
|
1369 |
-
#: includes/class-pum-freemius.php:
|
1370 |
-
|
|
|
1371 |
msgstr ""
|
1372 |
|
1373 |
-
#: includes/class-pum-freemius.php:
|
1374 |
-
|
|
|
1375 |
msgstr ""
|
1376 |
|
1377 |
-
#: includes/class-pum-freemius.php:
|
1378 |
-
msgid "
|
1379 |
-
msgstr ""
|
1380 |
-
|
1381 |
-
#: includes/class-pum-freemius.php:134
|
1382 |
-
msgid "If you opt-in now:"
|
1383 |
msgstr ""
|
1384 |
|
1385 |
-
#: includes/class-pum-freemius.php:
|
1386 |
-
msgid "
|
1387 |
msgstr ""
|
1388 |
|
1389 |
#: includes/class-pum-freemius.php:142
|
1390 |
-
msgid "
|
1391 |
msgstr ""
|
1392 |
|
1393 |
-
#: includes/class-pum-freemius.php:
|
1394 |
-
msgid "
|
1395 |
-
msgstr ""
|
1396 |
-
|
1397 |
-
#: includes/class-pum-freemius.php:145
|
1398 |
-
msgid "If you skip this, that's okay! The plugin will still work just fine."
|
1399 |
msgstr ""
|
1400 |
|
1401 |
#: includes/class-pum-post.php:139
|
@@ -2218,6 +2201,10 @@ msgstr ""
|
|
2218 |
msgid "Add additional classes for styling."
|
2219 |
msgstr ""
|
2220 |
|
|
|
|
|
|
|
|
|
2221 |
#: includes/shortcodes/class-pum-shortcode-popup-trigger.php:28
|
2222 |
msgid "Inserts a click-able popup trigger."
|
2223 |
msgstr ""
|
694 |
msgid "ucwordsstr_replace_"
|
695 |
msgstr ""
|
696 |
|
|
|
|
|
|
|
|
|
697 |
#: includes/admin/settings/register-settings.php:139
|
698 |
msgid "Allow Usage Tracking?"
|
699 |
msgstr ""
|
1350 |
msgid "Deleting your account will stop sending usage statistics and disable usage of in dash support forms. This will not stop the plugin from functioning. Are you sure you want to do this?"
|
1351 |
msgstr ""
|
1352 |
|
1353 |
+
#: includes/class-pum-freemius.php:94
|
1354 |
+
msgctxt "button label"
|
1355 |
+
msgid "Maybe later"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1356 |
msgstr ""
|
1357 |
|
1358 |
+
#: includes/class-pum-freemius.php:101
|
1359 |
+
msgctxt "button label"
|
1360 |
+
msgid "Yes - I’m in!"
|
1361 |
msgstr ""
|
1362 |
|
1363 |
+
#: includes/class-pum-freemius.php:103
|
1364 |
+
msgctxt "button label"
|
1365 |
+
msgid "Awesome - I’m in!"
|
1366 |
msgstr ""
|
1367 |
|
1368 |
+
#: includes/class-pum-freemius.php:117
|
1369 |
+
msgid "Usage Statistics"
|
|
|
|
|
|
|
|
|
1370 |
msgstr ""
|
1371 |
|
1372 |
+
#: includes/class-pum-freemius.php:118
|
1373 |
+
msgid "Popup & Theme Counts, Open Counts"
|
1374 |
msgstr ""
|
1375 |
|
1376 |
#: includes/class-pum-freemius.php:142
|
1377 |
+
msgid "We moved our usage tracking to a new platform called %s, kindly confirm if you are good with it?"
|
1378 |
msgstr ""
|
1379 |
|
1380 |
+
#: includes/class-pum-freemius.php:144
|
1381 |
+
msgid "Help us to improve Popup Maker and make it even more awesome by allowing us to capture some data with %s. In return, we will send you a 20%% discount for the extension store."
|
|
|
|
|
|
|
|
|
1382 |
msgstr ""
|
1383 |
|
1384 |
#: includes/class-pum-post.php:139
|
2201 |
msgid "Add additional classes for styling."
|
2202 |
msgstr ""
|
2203 |
|
2204 |
+
#: includes/shortcodes/class-pum-shortcode-popup-trigger.php:24
|
2205 |
+
msgid "Popup Trigger"
|
2206 |
+
msgstr ""
|
2207 |
+
|
2208 |
#: includes/shortcodes/class-pum-shortcode-popup-trigger.php:28
|
2209 |
msgid "Inserts a click-able popup trigger."
|
2210 |
msgstr ""
|
popup-maker.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: https://wppopupmaker.com/
|
5 |
* Description: Easily create & style popups with any content. Theme editor to quickly style your popups. Add forms, social media boxes, videos & more.
|
6 |
* Author: WP Popup Maker
|
7 |
-
* Version: 1.4.
|
8 |
* Author URI: https://wppopupmaker.com/
|
9 |
* Text Domain: popup-maker
|
10 |
*
|
@@ -144,7 +144,7 @@ if ( ! class_exists( 'Popup_Maker' ) ) :
|
|
144 |
}
|
145 |
|
146 |
if ( ! defined( 'POPMAKE_VERSION' ) ) {
|
147 |
-
define( 'POPMAKE_VERSION', '1.4.
|
148 |
}
|
149 |
|
150 |
if ( ! defined( 'POPMAKE_DB_VERSION' ) ) {
|
@@ -291,7 +291,6 @@ if ( ! class_exists( 'Popup_Maker' ) ) :
|
|
291 |
require_once POPMAKE_DIR . 'includes/admin/admin-setup.php';
|
292 |
require_once POPMAKE_DIR . 'includes/admin/admin-functions.php';
|
293 |
require_once POPMAKE_DIR . 'includes/admin/admin-pages.php';
|
294 |
-
require_once POPMAKE_DIR . 'includes/admin/post-editor.php';
|
295 |
|
296 |
require_once POPMAKE_DIR . 'includes/admin/popups/metabox.php';
|
297 |
require_once POPMAKE_DIR . 'includes/admin/popups/dashboard-columns.php';
|
4 |
* Plugin URI: https://wppopupmaker.com/
|
5 |
* Description: Easily create & style popups with any content. Theme editor to quickly style your popups. Add forms, social media boxes, videos & more.
|
6 |
* Author: WP Popup Maker
|
7 |
+
* Version: 1.4.7
|
8 |
* Author URI: https://wppopupmaker.com/
|
9 |
* Text Domain: popup-maker
|
10 |
*
|
144 |
}
|
145 |
|
146 |
if ( ! defined( 'POPMAKE_VERSION' ) ) {
|
147 |
+
define( 'POPMAKE_VERSION', '1.4.7' );
|
148 |
}
|
149 |
|
150 |
if ( ! defined( 'POPMAKE_DB_VERSION' ) ) {
|
291 |
require_once POPMAKE_DIR . 'includes/admin/admin-setup.php';
|
292 |
require_once POPMAKE_DIR . 'includes/admin/admin-functions.php';
|
293 |
require_once POPMAKE_DIR . 'includes/admin/admin-pages.php';
|
|
|
294 |
|
295 |
require_once POPMAKE_DIR . 'includes/admin/popups/metabox.php';
|
296 |
require_once POPMAKE_DIR . 'includes/admin/popups/dashboard-columns.php';
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Donate link:
|
|
6 |
Tags: responsive popup, promotion, popover, pop-up, pop over, marketing, lightbox, advertising, conversion, modal, popup, popups
|
7 |
Requires at least: 3.4
|
8 |
Tested up to: 4.5
|
9 |
-
Stable tag: 1.4.
|
10 |
License: GNU Version 3 or Any Later Version
|
11 |
|
12 |
Easily create attractive popups with no coding skills. Customize nearly every aspect of your popups, from theme & position, to targeting & cookies.
|
@@ -21,7 +21,7 @@ It is both a complete popup solution and a powerful, extendable framework.
|
|
21 |
|
22 |
Follow this plugin on [GitHub](https://github.com/PopupMaker/Popup-Maker).
|
23 |
|
24 |
-
Features of Popup Maker include:
|
25 |
* Unlimited Popups & Popup Themes
|
26 |
* Add shortcodes, HTML optin forms or any other content you can think of.
|
27 |
* Targeting conditions allow you to show a popup on one page or all pages of your site for precise targeting, others available as extensions.
|
@@ -47,7 +47,7 @@ Features of Popup Maker include:
|
|
47 |
* Too many features to list here. Limitless potential.
|
48 |
* If you can't figure out how to get the functionality your after, ask us we will be glad to help.
|
49 |
|
50 |
-
If you like the plugin and/or support [please rate & review](https://wppopupmaker.com/rate-us?utm_source=WordPress+Page&utm_medium=Review+Link&utm_campaign=Review+It) it!
|
51 |
|
52 |
= 100% Supported Form Plugins =
|
53 |
Not all form plugins are optimal for use in popups. The following support AJAX submission which is ideal for modal forms.
|
@@ -81,16 +81,15 @@ Follow us on [Twitter](https://twitter.com/wppopupmaker "Popup Maker on Twitter"
|
|
81 |
Find out more about [Popup Maker](https://wppopupmaker.com?utm_source=WordPress+Page&utm_medium=More+Info+Link&utm_campaign=Home+Page "Popup Maker Website").
|
82 |
|
83 |
= Languages =
|
84 |
-
|
85 |
-
*
|
86 |
-
*
|
87 |
-
*
|
88 |
-
*
|
89 |
-
*
|
90 |
-
*
|
91 |
-
*
|
92 |
-
*
|
93 |
-
* German 52.00%
|
94 |
|
95 |
Would you like to help translate the plugin into more languages? [Join our WP-Translations Community](https://translate.wordpress.org/projects/wp-plugins/popup-maker).
|
96 |
|
@@ -99,6 +98,7 @@ Would you like to help translate the plugin into more languages? [Join our WP-Tr
|
|
99 |
= Why aren't my popups opening/working? =
|
100 |
|
101 |
There are several common causes for this which include:
|
|
|
102 |
* You have not set up your popups targeting conditions (top right when editing a popup).
|
103 |
* Your site is loading multiple copies of jQuery
|
104 |
* Your themes footer.php file doesn't include <?php wp_footer(); ?> or it is not in the correct place (just before the `</body>`).
|
@@ -106,7 +106,6 @@ There are several common causes for this which include:
|
|
106 |
* There is a JavaScript error caused by another plugin or your theme. You can check this using your browsers console (Press F12).
|
107 |
|
108 |
== Screenshots ==
|
109 |
-
|
110 |
1. Create an infinite amount of popups and put any content inside your popups! No restrictions, no limitations - customize your popup content to fit your needs.
|
111 |
2. Use the Popup Maker WYSIWIG Content Editor to easily customize your popups' content! Plus, use Short Codes, HTML, and other code to give your popups ultimate power. Adding popups and content in Popup Maker is just like adding pages and content in WordPress.
|
112 |
3. Popup Maker offers you pixel perfect positioning settings to match your needs and fit your website perfectly.
|
@@ -115,6 +114,12 @@ There are several common causes for this which include:
|
|
115 |
|
116 |
== Changelog ==
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
= v1.4.6 - 4/22/2016 =
|
119 |
* Fix: Bug in new post editor JS.
|
120 |
* Fix: Added filter to override permissions for upgrade routines.
|
6 |
Tags: responsive popup, promotion, popover, pop-up, pop over, marketing, lightbox, advertising, conversion, modal, popup, popups
|
7 |
Requires at least: 3.4
|
8 |
Tested up to: 4.5
|
9 |
+
Stable tag: 1.4.7
|
10 |
License: GNU Version 3 or Any Later Version
|
11 |
|
12 |
Easily create attractive popups with no coding skills. Customize nearly every aspect of your popups, from theme & position, to targeting & cookies.
|
21 |
|
22 |
Follow this plugin on [GitHub](https://github.com/PopupMaker/Popup-Maker).
|
23 |
|
24 |
+
= Features of Popup Maker include: =
|
25 |
* Unlimited Popups & Popup Themes
|
26 |
* Add shortcodes, HTML optin forms or any other content you can think of.
|
27 |
* Targeting conditions allow you to show a popup on one page or all pages of your site for precise targeting, others available as extensions.
|
47 |
* Too many features to list here. Limitless potential.
|
48 |
* If you can't figure out how to get the functionality your after, ask us we will be glad to help.
|
49 |
|
50 |
+
= If you like the plugin and/or support [please rate & review](https://wppopupmaker.com/rate-us?utm_source=WordPress+Page&utm_medium=Review+Link&utm_campaign=Review+It) it! =
|
51 |
|
52 |
= 100% Supported Form Plugins =
|
53 |
Not all form plugins are optimal for use in popups. The following support AJAX submission which is ideal for modal forms.
|
81 |
Find out more about [Popup Maker](https://wppopupmaker.com?utm_source=WordPress+Page&utm_medium=More+Info+Link&utm_campaign=Home+Page "Popup Maker Website").
|
82 |
|
83 |
= Languages =
|
84 |
+
* French (France) 87%
|
85 |
+
* Hungarian 84%
|
86 |
+
* Arabic 84%
|
87 |
+
* Italian 84%
|
88 |
+
* Swedish 84%
|
89 |
+
* Danish 84%
|
90 |
+
* Spanish (Spain) 72%
|
91 |
+
* Russian 68%
|
92 |
+
* German 52%
|
|
|
93 |
|
94 |
Would you like to help translate the plugin into more languages? [Join our WP-Translations Community](https://translate.wordpress.org/projects/wp-plugins/popup-maker).
|
95 |
|
98 |
= Why aren't my popups opening/working? =
|
99 |
|
100 |
There are several common causes for this which include:
|
101 |
+
|
102 |
* You have not set up your popups targeting conditions (top right when editing a popup).
|
103 |
* Your site is loading multiple copies of jQuery
|
104 |
* Your themes footer.php file doesn't include <?php wp_footer(); ?> or it is not in the correct place (just before the `</body>`).
|
106 |
* There is a JavaScript error caused by another plugin or your theme. You can check this using your browsers console (Press F12).
|
107 |
|
108 |
== Screenshots ==
|
|
|
109 |
1. Create an infinite amount of popups and put any content inside your popups! No restrictions, no limitations - customize your popup content to fit your needs.
|
110 |
2. Use the Popup Maker WYSIWIG Content Editor to easily customize your popups' content! Plus, use Short Codes, HTML, and other code to give your popups ultimate power. Adding popups and content in Popup Maker is just like adding pages and content in WordPress.
|
111 |
3. Popup Maker offers you pixel perfect positioning settings to match your needs and fit your website perfectly.
|
114 |
|
115 |
== Changelog ==
|
116 |
|
117 |
+
= v1.4.7 - 4/24/2016 =
|
118 |
+
* Improvement: Removed the old styles dropdown as it is no longer needed.
|
119 |
+
* Improvement: Added check for old versions of Select2 and replace them with latest which is backward compatible.
|
120 |
+
* Fix: Bug that caused Close button delay to not show the close button.
|
121 |
+
* Fix: Replaced usage of <% style JS template with <# & {{ for PHP asp_tags compatibility.
|
122 |
+
|
123 |
= v1.4.6 - 4/22/2016 =
|
124 |
* Fix: Bug in new post editor JS.
|
125 |
* Fix: Added filter to override permissions for upgrade routines.
|