gutenberg
6 years ago
admin.js
6 years ago
admin.min.js
6 years ago
editor.js
8 years ago
editor.min.js
6 years ago
evf-admin-email.js
6 years ago
evf-admin-email.min.js
6 years ago
evf-clipboard.js
8 years ago
evf-clipboard.min.js
8 years ago
evf-enhanced-select.js
7 years ago
evf-enhanced-select.min.js
7 years ago
evf-setup.js
6 years ago
evf-setup.min.js
6 years ago
extensions.js
6 years ago
extensions.min.js
6 years ago
form-builder.js
6 years ago
form-builder.min.js
6 years ago
form-template-controller.js
6 years ago
form-template-controller.min.js
6 years ago
plugins.js
7 years ago
plugins.min.js
7 years ago
settings.js
6 years ago
settings.min.js
6 years ago
upgrade.js
7 years ago
upgrade.min.js
7 years ago
upgrade.js
60 lines
| 1 | /* global evf_upgrade, evf_data */ |
| 2 | jQuery( function( $ ) { |
| 3 | |
| 4 | /** |
| 5 | * Upgrade actions. |
| 6 | */ |
| 7 | var evf_upgrade_actions = { |
| 8 | init: function() { |
| 9 | $( document.body ).on( 'click dragstart', '.evf-registered-item.upgrade-modal', this.field_upgrade ); |
| 10 | $( document.body ).on( 'click dragstart', '.evf-registered-item.enable-stripe-model', this.enable_stripe_model ); |
| 11 | }, |
| 12 | field_upgrade: function( e ) { |
| 13 | e.preventDefault(); |
| 14 | evf_upgrade_actions.upgrade_modal( $(this).text() + ' field' ); |
| 15 | }, |
| 16 | upgrade_modal: function( feature ) { |
| 17 | var message = evf_upgrade.upgrade_message.replace( /%name%/g, feature ); |
| 18 | |
| 19 | $.alert({ |
| 20 | title: feature + ' ' + evf_upgrade.upgrade_title, |
| 21 | icon: 'dashicons dashicons-lock', |
| 22 | content: message, |
| 23 | type: 'red', |
| 24 | boxWidth: '565px', |
| 25 | buttons: { |
| 26 | confirm: { |
| 27 | text: evf_upgrade.upgrade_button, |
| 28 | btnClass: 'btn-confirm', |
| 29 | keys: ['enter'], |
| 30 | action: function () { |
| 31 | window.open( evf_upgrade.upgrade_url, '_blank' ); |
| 32 | } |
| 33 | }, |
| 34 | cancel: { |
| 35 | text: evf_data.i18n_ok |
| 36 | } |
| 37 | } |
| 38 | }); |
| 39 | }, |
| 40 | enable_stripe_model: function( e ) { |
| 41 | e.preventDefault(); |
| 42 | $.alert({ |
| 43 | title: evf_upgrade.enable_stripe_title, |
| 44 | content: evf_upgrade.enable_stripe_message, |
| 45 | icon: 'dashicons dashicons-info', |
| 46 | type: 'blue', |
| 47 | buttons : { |
| 48 | confirm : { |
| 49 | text: evf_data.i18n_close, |
| 50 | btnClass: 'btn-confirm', |
| 51 | keys: ['enter'] |
| 52 | } |
| 53 | } |
| 54 | }); |
| 55 | } |
| 56 | }; |
| 57 | |
| 58 | evf_upgrade_actions.init(); |
| 59 | }); |
| 60 |