File "select2.min.js"

Full Path: /home/leadltht/fastlinkinternet.com/admin/wp-content/plugins/bdevs-element/assets/admin/js/select2.min.js
File size: 1.61 KB
MIME-type: text/plain
Charset: utf-8

!function(e){"use strict";jQuery(window).on("elementor:init",function(){var t=elementor.modules.controls.BaseData.extend({isPostSearchReady:!1,dataQueryOption:function(){var e=this,t=e.model.get("data_options");return!(!t&&"object"!=typeof t)&&t},getPostTitlesbyID:function(){var t=this,o=this.dataQueryOption(),n=this.getControlValue();if(n&&0!==n.length){_.isArray(n)||(n=[n]);var s={security:BdevsElementEditor.select2Secret,select_type:"selected",id:n};e.ajax({url:ajaxurl,type:"POST",data:e.extend({},s,o),before:t.addControlSpinner(),success:function(e){t.isPostSearchReady=!0,t.model.set("options",e),t.render()}})}},addControlSpinner:function(){this.ui.select.prop("disabled",!0),this.$el.find(".elementor-control-title").after('<span class="elementor-control-spinner">&nbsp;<i class="eicon-spinner eicon-animation-spin"></i>&nbsp;</span>')},onReady:function(){var t=this;this.dataQueryOption()&&(this.ui.select.select2({placeholder:t.model.get("placeholder")?t.model.get("placeholder"):"Search",minimumInputLength:t.model.get("mininput")?t.model.get("mininput"):0,allowClear:!0,ajax:{url:ajaxurl,dataType:"json",method:"post",delay:250,data:function(o){var n={security:BdevsElementEditor.select2Secret,select_type:"choose",q:o.term},s=t.model.get("data_options");return e.extend({},n,s)},processResults:function(e){var t=[{id:-1,text:"No results found",disabled:!0}];return{results:null!==e?e:t}},cache:!0}}),this.isPostSearchReady||this.getPostTitlesbyID())},onBeforeDestroy:function(){this.ui.select.data("select2")&&this.ui.select.select2("destroy"),this.$el.remove()}});elementor.addControlView("bdevselement-select2",t)})}(jQuery);