gutenberg
2 years ago
admin.js
3 years ago
admin.min.js
3 years ago
deactivation-feedback.js
3 years ago
deactivation-feedback.min.js
3 years ago
editor.js
7 years ago
editor.min.js
5 years ago
evf-admin-email.js
2 years ago
evf-admin-email.min.js
2 years ago
evf-clipboard.js
7 years ago
evf-clipboard.min.js
7 years ago
evf-enhanced-select.js
3 years ago
evf-enhanced-select.min.js
3 years ago
evf-file-uploader.js
3 years ago
evf-file-uploader.min.js
3 years ago
evf-setup.js
2 years ago
evf-setup.min.js
2 years ago
extensions.js
2 years ago
extensions.min.js
2 years ago
form-builder.js
2 years ago
form-builder.min.js
2 years ago
form-template-controller.js
3 years ago
form-template-controller.min.js
3 years ago
settings.js
3 years ago
settings.min.js
3 years ago
tools.js
4 years ago
tools.min.js
4 years ago
upgrade.js
2 years ago
upgrade.min.js
2 years ago
form-template-controller.js
27 lines
| 1 | /* global evf_template_controller */ |
| 2 | jQuery(function ($) { |
| 3 | /** |
| 4 | * Template actions. |
| 5 | */ |
| 6 | var evf_template_controller = { |
| 7 | |
| 8 | init: function () { |
| 9 | this.wrapper = $('.everest-forms-form-template-wrapper'); |
| 10 | this.wrapper.find('.everest-forms-tab-nav a').on('click', this.form_template_plan_type); |
| 11 | }, |
| 12 | form_template_plan_type: function (e) { |
| 13 | e.preventDefault(); |
| 14 | var $this = $(e.target); |
| 15 | var plan_type = $this.attr('data-plan'); |
| 16 | $this.closest('ul').find('li').removeClass('active'); |
| 17 | $this.closest('li').addClass('active'); |
| 18 | var template_wrap = evf_template_controller.wrapper.find('.everest-forms-form-template' ); |
| 19 | template_wrap.attr('data-filter-template', plan_type); |
| 20 | }, |
| 21 | }; |
| 22 | $(document).ready(function() { |
| 23 | evf_template_controller.init(); |
| 24 | }); |
| 25 | |
| 26 | }); |
| 27 |