Файловый менеджер - Редактировать - /home/goldin10/public_html/getoutyourbox.com/wp-content/plugins/caldera-forms/assets/build/js/entry-viewer-2.min.js
Error occurred
Назад
function CFAPI(a,b,c,d,e){function f(a){a.setRequestHeader("X-CF-ENTRY-TOKEN",h),a.setRequestHeader("X-WP-Nonce",g)}var g,h;return"object"==typeof d?(g="string"==typeof d.nonce&&d.nonce,h="string"==typeof d.nonce&&d.token):g=d,{getForm:function(){return e.ajax({url:a.form+c,method:"GET",beforeSend:function(a){f(a)}}).done(function(a){return a}).fail(function(a){console.log(a)})},getEntries:function(a){return e.ajax({url:this.paginatedEntryURL(c,a,b),method:"GET",beforeSend:function(a){f(a)}}).done(function(a){return a}).fail(function(a){console.log(a)})},paginatedEntryURL:function(c,d){var f=e.param({page:d,per_page:b});return a.entries+c+"?"+f},setPerPage:function(a){b=a},getPerPage:function(){return b},savePerPage:function(){return e.ajax({url:a.entrySettings,method:"POST",dataType:"json",beforeSend:function(a){f(a)},data:{per_page:b}}).done(function(a){return a.per_page}).fail(function(a){console.log(a)})}}}function CFFormStoreFactory(a,b,c){return{state:{formId:a,allFields:b,listFields:c},setFormId:function(a){this.state.formId=a},setAllFields:function(a){this.state.allFields=a},setListFields:function(a){this.state.listFields=a},getAllFields:function(){return this.state.allFields}}}function CFEntriesStoreFactory(a,b){return{state:{formId:a,entries:b,total:0,totalPages:0,page:0},setEntries:function(a){this.state.entries=a},setTotal:function(a){this.state.total=a},getTotal:function(){return this.state.total},setTotalPages:function(a){this.state.totalPages=a},getTotalPages:function(){return this.state.totalPages},setPage:function(a){this.state.page=a},getPage:function(){return this.state.page},getEntry:function(a){return"object"==typeof this.state.entries[a]&&this.state.entries[a]},getFieldFromEntry:function(a,b){return"object"==typeof a.fields[b]&&a.fields[b]}}}function CFEntryViewer2(a,b,c,d,e){var f=jQuery(document.getElementById(e.targets.entry));return new Vue({data:function(){return{form:b.state,entries:c.state,page:1,perPage:d.getPerPage(),totalPages:c.getTotalPages(),singleEntry:{},currentView:"empty"}},el:"#caldera-forms-entries",components:{"single-entry":{template:"#"+e.targets.entries,data:function(){return{singleEntryFields:Object,singleEntry:Object}}}},mounted:function(){this.paginationButtons()},methods:{paginationButtons:function(){var a=jQuery(this.$el),b=a.find(".caldera-forms-entry-viewer-next-button"),c=a.find(".caldera-forms-entry-viewer-prev-button");this.page>=this.totalPages?b.prop("disabled",!0).attr("aria-disabled",!0):b.prop("disabled",!1).attr("aria-disabled",!1),1==this.page?c.prop("disabled",!0).attr("aria-disabled",!0):c.prop("disabled",!1).attr("aria-disabled",!1)},nextPage:function(){var a=this;this.$set(this,"page",this.page+1),jQuery.when(d.getEntries(a.page)).then(function(b){c.setEntries(b),a.$set(a,"entries",c.state),a.paginationButtons()},function(){a.notAllowed()})},prevPage:function(){if(0>=this.page-1)return!1;var a=this;this.$set(this,"page",this.page-1),jQuery.when(d.getEntries(a.page)).then(function(b){c.setEntries(b),a.$set(a,"entries",c.state),a.paginationButtons()},function(){a.notAllowed()})},entryHasField:function(a,b){var d=c.getEntry(b);return!1!==d&&c.getFieldFromEntry(d,a)},updatePerPage:function(){var a=this;d.setPerPage(this.perPage),jQuery.when(d.getEntries(a.page)).then(function(b){c.setEntries(b),a.$set(a,"entries",c.state)}),d.savePerPage(this.perPage)},fieldValue:function(a,b){return"string"==typeof b[a]?b[a]:"object"==typeof b.fields[a]?b.fields[a].value:""},showSingle:function(a){var d,g=c.getEntry(a),h=b.getAllFields(),i=Vue.extend({template:"#"+e.templates.entry,data:function(){return{fields:h,entry:g}},methods:{fieldValue:function(a){return"string"==typeof g[a]?g[a]:"object"==typeof g.fields[a]?this.checkResult(g.fields[a].value):""},close:function(){f.empty(),d.destroy()},checkResult:function(a){return"object"==typeof a&&(a=Object.values(a)),a}}});f.empty();var j=document.createElement("div");jQuery(j).attr("id",e.targets.entry+"-"+a),jQuery(j).appendTo(f),(new i).$mount("#"+e.targets.entry+"-"+a),d=jQuery("[data-remodal-id="+a+"]").remodal(),d.open()},notAllowed:function(a){"object"!=typeof a&&404!=a.status&&(f.remove(),jQuery("#caldera-forms-entries-nav").remove(),jQuery(document.getElementById("caldera-forms-entries")).html('<div class="alert alert-warning">'+e.strings.not_allowed+"</div>"))}}})}jQuery(document).ready(function(a){if("object"==typeof CF_ENTRY_VIEWER_2_CONFIG){var b=CF_ENTRY_VIEWER_2_CONFIG.formId,c={nonce:CF_ENTRY_VIEWER_2_CONFIG.api.nonce,token:CF_ENTRY_VIEWER_2_CONFIG.api.token},d=new CFAPI(CF_ENTRY_VIEWER_2_CONFIG.api,CF_ENTRY_VIEWER_2_CONFIG.perPage,b,c,a);a.when(d.getForm(),d.getEntries(1)).then(function(a,c){var e=a[0],f=c[0],g=new CFFormStoreFactory(b,e.field_details.order,e.field_details.entry_list),h=new CFEntriesStoreFactory(b,f);h.setPage(1),null!=c[2].getResponseHeader("X-CF-API-TOTAL-PAGES")&&h.setTotalPages(c[2].getResponseHeader("X-CF-API-TOTAL-PAGES")),null!=c[2].getResponseHeader("X-CF-API-TOTAL")&&h.setTotal(c[2].getResponseHeader("X-CF-API-TOTAL"));new CFEntryViewer2(b,g,h,d,CF_ENTRY_VIEWER_2_CONFIG)},function(a){var b="object"==typeof CF_ENTRY_VIEWER_2_CONFIG.targets&&"string"==typeof CF_ENTRY_VIEWER_2_CONFIG.targets.entries?CF_ENTRY_VIEWER_2_CONFIG.targets.entries:"caldera-forms-entries",c="object"==typeof CF_ENTRY_VIEWER_2_CONFIG.targets&&"string"==typeof CF_ENTRY_VIEWER_2_CONFIG.targets.nav?CF_ENTRY_VIEWER_2_CONFIG.targets.nav:"caldera-forms-entries-nav";jQuery("#"+c).remove(),"object"==typeof a&&404==a.status?jQuery("#"+b).html('<div class="alert alert-error">'+CF_ENTRY_VIEWER_2_CONFIG.strings.no_entries+"</div>"):jQuery("#"+b).html('<div class="alert alert-error">'+CF_ENTRY_VIEWER_2_CONFIG.strings.not_allowed+"</div>")})}});
| ver. 1.4 |
Github
|
.
| PHP 7.2.34 | Генерация страницы: 0.06 |
proxy
|
phpinfo
|
Настройка