PluginProbe ʕ •ᴥ•ʔ
Robin Image Optimizer – Unlimited Image Optimization, WebP & AVIF / 2.0.6
Robin Image Optimizer – Unlimited Image Optimization, WebP & AVIF v2.0.6
2.0.6 2.0.5 trunk 1.3.7 1.4.0 1.4.1 1.4.2 1.4.6 1.5.0 1.5.3 1.5.6 1.5.8 1.6.5 1.6.6 1.6.9 1.7.0 1.7.4 1.8.1 1.8.2 1.9.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4
robin-image-optimizer / admin / assets / js / modals.js
robin-image-optimizer / admin / assets / js Last commit date
Chart.min.js 7 months ago bulk-conversion.js 7 months ago bulk-optimization.js 7 months ago calculate-attachments.js 1 year ago index.php 3 years ago meta-migrations.js 3 years ago modals.js 7 months ago notices.js 3 months ago restore-backup.js 7 months ago settings-premium.js 7 months ago single-optimization.js 7 months ago statistic.js 7 months ago sweetalert2.js 3 years ago wrio-license-manager.js 7 months ago
modals.js
58 lines
1 /**
2 * A set of tools for creating pop-ups. You can create a popup
3 * using a global method call.
4 *
5 * @version 1.0
6 */
7
8
9 (function($) {
10 'use strict';
11
12 if( !$.wrio_modal ) {
13 $.wrio_modal = {};
14 }
15
16 $.wrio_modal = $.wrio_popup || {
17
18 showErrorModal: function(text) {
19 if( !text ) {
20 console.log('[Error]: Text required.');
21 return;
22 }
23
24 swal({
25 title: 'Error',
26 text: text,
27 type: 'error',
28 customClass: 'wrio-modal wrio-modal-error',
29 width: 500,
30 confirmButtonText: 'OK',
31 });
32 },
33
34 showWarningModal: function(text, callback) {
35 if( !text ) {
36 console.log('[Error]: Text required.');
37 return;
38 }
39
40 swal({
41 title: 'Warning',
42 text: text,
43 type: 'warning',
44 customClass: 'wrio-modal wrio-modal-warning',
45 width: 500,
46 showCancelButton: true,
47 showCloseButton: true,
48 confirmButtonText: 'OK',
49 }).then(function(result) {
50 if( callback ) {
51 callback();
52 }
53 }).catch(swal.noop);
54 },
55 };
56
57 })(jQuery);
58