lib
1 year ago
admin-fields.js
1 year ago
admin-form.js
1 year ago
admin-global.js
1 year ago
admin-order.js
1 year ago
custom-spinner.js
1 year ago
help.js
1 year ago
rating-edit.js
1 year ago
selectize.js
1 year ago
st-uninstall.js
1 year ago
strong-testimonials-elementor-editor.js
1 year ago
view-category-filter.js
1 year ago
views.js
2 months ago
strong-testimonials-elementor-editor.js
44 lines
| 1 | jQuery(function ($) { |
| 2 | |
| 3 | elementor.hooks.addAction('panel/open_editor/widget/strong_testimonials_elementor_views', function (panel, model, view) { |
| 4 | |
| 5 | // Get search input |
| 6 | search_input = panel.$el.find('select[data-setting="strong_testimonials_views_select"]'); |
| 7 | |
| 8 | var search_input_active = model.attributes.settings.attributes.strong_testimonials_views_select; |
| 9 | |
| 10 | var search_val, timer, selective_input; |
| 11 | // Initialize the selectize |
| 12 | search_input.selectize({ |
| 13 | create: false, |
| 14 | maxItems: 1, |
| 15 | closeAfterSelect: false, |
| 16 | |
| 17 | valueField: 'ID', |
| 18 | labelField: 'post_title', |
| 19 | searchField:'post_title', |
| 20 | |
| 21 | load: function(query, callback) { |
| 22 | jQuery.ajax({ |
| 23 | url: strongAjax.ajax_url, |
| 24 | type: 'POST', |
| 25 | dataType: 'json', |
| 26 | data: { |
| 27 | action: 'strong_testimonials_elementor_ajax_search', |
| 28 | st_nonce: strongAjax.ajax_nonce, |
| 29 | }, |
| 30 | error: function() { |
| 31 | callback(); |
| 32 | }, |
| 33 | success: function( response ) { |
| 34 | callback( response.data ); |
| 35 | } |
| 36 | |
| 37 | }); |
| 38 | |
| 39 | } |
| 40 | }); |
| 41 | |
| 42 | }); |
| 43 | |
| 44 | }); |