Файловый менеджер - Редактировать - /var/www/xthruster/html/wp-content/plugins/sitepress-multilingual-cms/dist/js/word-count/app.js
Назад
!function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}t.exports=function(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}},function(t,e,n){t.exports=n(3)},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i),s=n(1),a=n.n(s),r=function(){function t(e){o()(this,t),this.$=e,this.status=null,this.timeout=null}return a()(t,[{key:"init",value:function(){var t=this;this.openLink=this.$(".js-word-count-dialog-open"),this.openLink.click((function(e){e.preventDefault(),t.openDialog()})),"#words-count"===window.location.hash&&this.openDialog()}},{key:"openDialog",value:function(){var t=this;this.dialogInit(),this.dialog.dialog({dialogClass:"word-count-dialog wpml-dialog otgs-ui-dialog",resizable:!1,modal:!0,width:450,autoResize:!0,title:this.openLink.data("dialog-title"),closeOnEscape:!0,buttons:[{text:this.openLink.data("cancel"),class:"alignleft button-secondary",click:function(e){return t.cancelCount(e)}}],open:function(){return t.repositionDialog()},close:function(){return t.restoreLegacyUIStyle()}})}},{key:"dialogInit",value:function(){var t=this;if(this.$("#jquery-ui-style-css").prop("disabled",!0),!this.dialog){var e=this.openLink.data("loading-text");this.dialog=this.$('<div class="js-word-count-dialog"><span class="spinner is-active"></span>'.concat(e,"</div>")),this.fetchReportView(),this.initDialogEvents(),this.$(window).resize((function(){return t.repositionDialog()}))}}},{key:"restoreLegacyUIStyle",value:function(){this.$("#jquery-ui-style-css").prop("disabled",!1)}},{key:"setDialogContent",value:function(t){this.$(".js-word-count-dialog").html(t)}},{key:"setStatus",value:function(t){var e=this;this.status=t,clearTimeout(this.timeout),"in-progress"===t?(this.dialog.find(".requested-type, .start-count").prop("disabled",!0),this.dialog.find(".spinner").addClass("is-active"),this.timeout=setTimeout((function(){return e.fetchReportView()}),5e3)):"completed"===t&&(this.dialog.find(".requested-type, .start-count").prop("disabled",!1),this.dialog.find(".spinner").removeClass("is-active"))}},{key:"fetchReportView",value:function(){var t=this;this.sendAjax({action:"wpml_word_count_get_report"}).then((function(e){"completed"!==t.status&&(t.setStatus(e.status),t.setDialogContent(e.report),t.repositionDialog())}))}},{key:"repositionDialog",value:function(){this.$(".otgs-ui-dialog .ui-dialog-content").css({"max-height":this.$(window).height()-180}),this.$(".otgs-ui-dialog").css({"max-width":"95%"}),this.dialog.dialog("option","position",{my:"center",at:"center",of:window})}},{key:"initDialogEvents",value:function(){var t=this;this.dialog.on("click",".start-count",(function(e){return t.startCount(e)})),this.dialog.on("click",".cancel-count",(function(e){return t.cancelCount(e)})),this.dialog.on("change",".requested-type",(function(){return t.selectedTypesChanged()}))}},{key:"startCount",value:function(t){var e=this;t.preventDefault(),this.setStatus("in-progress");var n={post_types:[],package_kinds:[]};this.dialog.find(".requested-type:checked").each((function(t,i){var o=e.$(i);n[o.data("group")].push(o.data("type"));var s=o.closest("tr");s.removeClass("pending").removeClass("completed").addClass("in-progress"),s.find(".js-row-count-words, .js-row-completed-items").text(0)})),this.dialog.find(".js-total-completed-items").text("-"),this.dialog.find(".js-total-count-words").text("-");var i={action:"wpml_word_count_start_count",requested_types:n};this.sendAjax(i).then((function(){return e.fetchReportView()}))}},{key:"cancelCount",value:function(t){t.preventDefault(),this.setStatus("completed");this.sendAjax({action:"wpml_word_count_cancel_count"}),this.dialog.dialog("close")}},{key:"selectedTypesChanged",value:function(){var t=this.dialog.find(".requested-type:checked"),e=this.dialog.find(".start-count");t.length?e.prop("disabled",!1):e.prop("disabled",!0)}},{key:"sendAjax",value:function(t){return t.nonce=this.openLink.data("nonce"),t.module="wpml_word_count",this.$.post(ajaxurl,t).then((function(t){if(t.success)return t.data}))}}]),t}();jQuery((function(t){new r(t).init()}))}]);
| ver. 1.4 |
Github
|
.
| PHP 7.4.3-4ubuntu2.24 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка