PATH:
home
/
letacommog
/
laindinois
/
wp-content
/
plugins
/
wiloke-listing-tools
/
admin
/
source
/
js
!function(){"use strict";Vue.config.devtools=!0,null!==document.getElementById("wiloke-design-sidebar")&&new Vue({el:"#wiloke-design-sidebar",data:{aUsedSections:Object.values(WILOKE_LISTING_TOOLS.aSidebar.aUsedSections),oAllSections:Object.values(WILOKE_LISTING_TOOLS.aSidebar.aAllSections),oAvailableSections:Object.values(WILOKE_LISTING_TOOLS.aSidebar.aAvailableSections),oStyles:WILOKE_LISTING_TOOLS.aSidebar.aStyles,oRelatedBy:WILOKE_LISTING_TOOLS.aSidebar.aRelatedBy,oOrderBy:WILOKE_LISTING_TOOLS.aSidebar.aOrderBy,oOrderFallbackBy:WILOKE_LISTING_TOOLS.aSidebar.aOrderFallbackBy,savingXHR:null,errorMsg:"",successMsg:"",postType:WILOKE_LISTING_TOOLS.postType,ajaxAction:WILOKE_LISTING_TOOLS.aSidebar.ajaxAction},methods:{addNewSection:function(){var e=new Date;this.aUsedSections.push({key:e.getTime(),icon:"la la-image",name:"Custom Section",isCustomSection:"yes",content:""})},resetDefaults:function(){var s=this;if(!confirm("Do you want to reset the settings?"))return!1;var t=jQuery("#wiloke-design-single-sidebar-form");t.addClass("loading"),jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"wilcity_reset_to_default_sidebar",postType:this.postType},success:function(e){t.addClass("loading"),e.success?(s.successMsg=e.data.msg,setTimeout(function(){s.successMsg="",location.reload()},4e4)):(s.errorMsg=e.data.msg,setTimeout(function(){s.errorMsg="",location.reload()},4e4)),t.removeClass("loading")}})},dragFormClass:function(e){return{"dragArea__form ui form field-wrapper segment":!0,red:"yes"===e.isTemporaryDisable}},sectionName:function(e){return e.isCustomSection&&"yes"===e.isCustomSection?"( "+e.type+" - Custom Section )":"( "+e.type+" )"},isFieldEnabled:function(e,s){return!e.dependencyOnToggle||"yes"===this.aUsedSections.fields.isEnabled||"isEnabled"===s.key},uCaseFirst:function(e){var s=e.length,t=e.substr(0,1),a=e.substr(1,s);return t.toUpperCase()+a},addedNewSectionInUsedArea:function(e){return void 0!==e.removed&&"undefined"!==e.removed.element.isNotDeleteAble&&e.removed.element.isNotDeleteAble?(this.aUsedSections.splice(e.removed.oldIndex,0,e.removed.element),!1):void 0!==e.added&&("yes"===e.added.element.isCustomSection||"yes"===e.added.element.isDefaultSidebar||"yes"==e.added.element.isMultipleSections)&&(this.oAvailableSections.push(e.added.element),void this.aUsedSections.splice(e.added.element.newIndex,1,JSON.parse(JSON.stringify(e.added.element))))},addedNewSectionInAvailableArea:function(e){var s=this;return void 0!==e.added&&"undefined"!==e.added.element.isNotDeleteAble&&e.added.element.isNotDeleteAble?(this.oAvailableSections.splice(e.added.newIndex,1),this.savedMessage="We can not delete a required section",setTimeout(function(){s.savedMessage=""},1e4),!1):void 0!==e.added&&"no"===e.added.element.isCustomSection&&"no"===e.added.element.isDefaultSidebar&&void this.oAvailableSections.splice(e.added.newIndex,1)},saveChanges:function(e){var s=this;null!==this.savingXHR&&200!==this.savingXHR.status&&(this.$form.addClass("loading"),this.savingXHR.abort());var t=jQuery(e.currentTarget),a=this.aUsedSections,i=jQuery("#print-msg");t.addClass("loading"),this.savingXHR=jQuery.ajax({type:"POST",url:ajaxurl,data:{data:a,action:this.ajaxAction,postType:this.postType},success:function(e){e.success?(s.savedMessage=e.data.msg,setTimeout(function(){s.savedMessage=""},1e4)):(i.addClass("hidden"),alert(e.data.msg)),t.removeClass("loading")}})},generateKeyFromSectionName:function(e){return(e=(e=e.toLowerCase()).replace(/,|\.,\?/gi,function(){return""})).split(" ").join("_").trim(" ")},changedSectionName:function(e){var s="";jQuery(e.currentTarget).hasClass("isCustomSection")&&(s=jQuery(e.currentTarget).data("sectionid"),this.aUsedSections[s].key=this.generateKeyFromSectionName(jQuery(e.currentTarget).val()))},expandBlockSettings:function(e){jQuery(e.currentTarget).siblings(".dragArea__form-content").toggleClass("hidden")},addMoreSection:function(){},removeCustomTab:function(e){var s=jQuery(e.currentTarget).data("order");this.singleTabs.splice(s,1)},removeSection:function(e,s){if(s.isNotDeleteAble)return alert("This section is required by the theme!"),!1;if(s.isCustomSection&&"yes"===s.isCustomSection){if(!confirm("You want to delete this block?"))return!1;this.aUsedSections.splice(e,1)}else{var t=this.aUsedSections[e];this.aUsedSections.splice(e,1),this.oAvailableSections.push(t)}},saveSingleListingSettings:function(e){var s=this;null!==this.savingXHR&&200!==this.savingXHR.status&&this.savingXHR.abort();var t=this.singleTabs,a=jQuery("#wiloke-design-single-listing-form");return a.addClass("loading"),this.savingXHR=jQuery.ajax({type:"POST",url:ajaxurl,data:{results:t,action:"wiloke_save_design_single_listing"},success:function(e){e.success?(s.savedMessage=e.data.msg,setTimeout(function(){s.savedMessage=""},1e4)):($printMsg.addClass("hidden"),alert(e.data.msg)),a.removeClass("loading")}}),!0}},mounted:function(){}})}();
[+]
..
[-] wil-main-search-form.wil-main-search-form.js
[edit]
[-] claim-script.js
[edit]
[-] promotion-script.js
[edit]
[-] design-single-nav.js
[edit]
[-] listing-tools.js
[edit]
[-] wil-single-nav.wil-single-nav.js
[edit]
[-] script.js
[edit]
[-] default~wil-hero-search-form~wil-main-search-form.default~wil-hero-search-form~wil-main-search-form.js
[edit]
[-] mailtpl-admin.js
[edit]
[-] design-hero-search-form.js
[edit]
[-] design-sidebar.js
[edit]
[-] wil-hero-search-form.wil-hero-search-form.js
[edit]
[-] mobile-menu.js
[edit]
[-] global.js
[edit]
[-] import-export-wiloke-tools.js
[edit]
[-] listing-card.js
[edit]
[-] contactform7.js
[edit]
[-] push-notifications.js
[edit]
[-] wiloke-submission-general.js
[edit]
[-] listing-plan.js
[edit]
[-] wil-schema-markup.wil-schema-markup.js
[edit]
[-] add-custom-posttype.js
[edit]
[-] report-script.js
[edit]
[-] event-script.js
[edit]
[-] quick-search-form-script.js
[edit]
[-] general.js
[edit]
[-] wil-single-sidebar.wil-single-sidebar.js
[edit]
[-] design-fields.js
[edit]
[-] vendors~wil-schema-markup.vendors~wil-schema-markup.js
[edit]
[-] listing-settings.js
[edit]
[-] noticeafterupdating.js
[edit]
[-] wil-listing-card.wil-listing-card.js
[edit]
[-] design-search-form.js
[edit]
[-] design-highlight-boxes.js
[edit]
[-] pw-select2.js
[edit]
[-] verify-purchase-code.js
[edit]
[-] plan-controller.js
[edit]
[-] wil-reviews.wil-reviews.js
[edit]
[-] schema-markup.js
[edit]
[-] wil-single-highlight-boxes.wil-single-highlight-boxes.js
[edit]