var __webpack_exports__ = {}; /** * @package Polylang */ /** * Tag suggest in quick edit */ jQuery( function( $ ) { $.ajaxPrefilter( function( options, originalOptions, jqXHR ) { if ( 'string' === typeof options.data && -1 !== options.data.indexOf( 'action=ajax-tag-search' ) && ( lang = $( ':input[name="inline_lang_choice"]' ).val() ) ) { options.data = 'lang=' + lang + '&' + options.data; } } ); } ); /** * Quick edit */ jQuery( function( $ ) { $( document ).on( 'DOMNodeInserted', function( e ) { var t = $( e.target ); // WP inserts the quick edit from if ( 'inline-edit' == t.attr( 'id' ) ) { var post_id = t.prev().attr( 'id' ).replace( "post-", "" ); if ( post_id > 0 ) { // language dropdown var select = t.find( ':input[name="inline_lang_choice"]' ); var lang = $( '#lang_' + post_id ).html(); select.val( lang ); // populates the dropdown filter_terms( lang ); // initial filter for category checklist filter_pages( lang ); // initial filter for parent dropdown // modify category checklist an parent dropdown on language change select.on( 'change', function() { filter_terms( $( this ).val() ); filter_pages( $( this ).val() ); } ); } } /** * Filters the category checklist. */ function filter_terms( lang ) { if ( "undefined" != typeof( pll_term_languages ) ) { $.each( pll_term_languages, function( lg, term_tax ) { $.each( term_tax, function( tax, terms ) { $.each( terms, function( i ) { id = '#' + tax + '-' + pll_term_languages[ lg ][ tax ][ i ]; lang == lg ? $( id ).show() : $( id ).hide(); } ); } ); } ); } } /** * Filters the parent page dropdown list. */ function filter_pages( lang ) { if ( "undefined" != typeof( pll_page_languages ) ) { $.each( pll_page_languages, function( lg, pages ) { $.each( pages, function( i ) { v = $( '#post_parent option[value="' + pll_page_languages[ lg ][ i ] + '"]' ); lang == lg ? v.show() : v.hide(); } ); } ); } } } ); } ); /** * Update rows of translated posts when the language is modified in quick edit * Acts on ajaxSuccess event */ jQuery( function( $ ) { $( document ).ajaxSuccess( function( event, xhr, settings ) { function update_rows( post_id ) { // collect old translations var translations = new Array(); $( '.translation_' + post_id ).each( function() { translations.push( $( this ).parent().parent().attr( 'id' ).substring( 5 ) ); } ); var data = { action: 'pll_update_post_rows', post_id: post_id, translations: translations.join( ',' ), post_type: $( "input[name='post_type']" ).val(), screen: $( "input[name='screen']" ).val(), _pll_nonce: $( "input[name='_inline_edit']" ).val() // reuse quick edit nonce }; // get the modified rows in ajax and update them $.post( ajaxurl, data, function( response ) { if ( response ) { // Since WP changeset #52710 parseAjaxReponse() return content to notice the user in a HTML tag with ajax-response id. // Not to disturb this behaviour by executing another ajax request in the ajaxSuccess event, we need to target another unexisting id. var res = wpAjax.parseAjaxResponse( response, 'pll-ajax-response' ); $.each( res.responses, function() { if ( 'row' == this.what ) { // data is built with a call to WP_Posts_List_Table::single_row method // which uses internally other WordPress methods which escape correctly values. // For Polylang language columns the HTML code is correctly escaped in PLL_Admin_Filters_Columns::post_column method. $( "#post-" + this.supplemental.post_id ).replaceWith( this.data ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.replaceWith } } ); } } ); } if ( 'string' == typeof( settings.data ) ) { // Need to check the type due to block editor sometime sending FormData objects var data = wpAjax.unserialize( settings.data ); // what were the data sent by the ajax request? if ( 'undefined' != typeof( data['action'] ) && 'inline-save' == data['action'] ) { update_rows( data['post_ID'] ); } } } ); } ); /** * Media list table * When clicking on attach link, filters find post list per media language */ jQuery( function( $ ) { $.ajaxPrefilter( function ( options, originalOptions, jqXHR ) { if ( 'string' === typeof options.data && -1 !== options.data.indexOf( 'action=find_posts' ) ) { options.data = 'pll_post_id=' + $( '#affected' ).val() + '&' + options.data; } } ); } ); ; Berrak akustik
/*! elementor - v3.6.7 - 03-07-2022 */ "use strict";(self.webpackChunkelementor=self.webpackChunkelementor||[]).push([[520],{9728:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class baseTabs extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{tablist:'[role="tablist"]',tabTitle:".elementor-tab-title",tabContent:".elementor-tab-content"},classes:{active:"elementor-active"},showTabFn:"show",hideTabFn:"hide",toggleSelf:!0,hidePrevious:!0,autoExpand:!0,keyDirection:{ArrowLeft:elementorFrontendConfig.is_rtl?1:-1,ArrowUp:-1,ArrowRight:elementorFrontendConfig.is_rtl?-1:1,ArrowDown:1}}}getDefaultElements(){const e=this.getSettings("selectors");return{$tabTitles:this.findElement(e.tabTitle),$tabContents:this.findElement(e.tabContent)}}activateDefaultTab(){const e=this.getSettings();if(!e.autoExpand||"editor"===e.autoExpand&&!this.isEdit)return;const t=this.getEditSettings("activeItemIndex")||1,a={showTabFn:e.showTabFn,hideTabFn:e.hideTabFn};this.setSettings({showTabFn:"show",hideTabFn:"hide"}),this.changeActiveTab(t),this.setSettings(a)}handleKeyboardNavigation(e){const t=e.currentTarget,a=jQuery(t.closest(this.getSettings("selectors").tablist)),s=a.find(this.getSettings("selectors").tabTitle),i="vertical"===a.attr("aria-orientation");switch(e.key){case"ArrowLeft":case"ArrowRight":if(i)return;break;case"ArrowUp":case"ArrowDown":if(!i)return;e.preventDefault();break;case"Home":return e.preventDefault(),void s.first().trigger("focus");case"End":return e.preventDefault(),void s.last().trigger("focus");default:return}const n=t.getAttribute("data-tab")-1,r=this.getSettings("keyDirection")[e.key],o=s[n+r];o?o.focus():-1===n+r?s.last().trigger("focus"):s.first().trigger("focus")}deactivateActiveTab(e){const t=this.getSettings(),a=t.classes.active,s=e?'[data-tab="'+e+'"]':"."+a,i=this.elements.$tabTitles.filter(s),n=this.elements.$tabContents.filter(s);i.add(n).removeClass(a),i.attr({tabindex:"-1","aria-selected":"false","aria-expanded":"false"}),n[t.hideTabFn](),n.attr("hidden","hidden")}activateTab(e){const t=this.getSettings(),a=t.classes.active,s=this.elements.$tabTitles.filter('[data-tab="'+e+'"]'),i=this.elements.$tabContents.filter('[data-tab="'+e+'"]'),n="show"===t.showTabFn?0:400;s.add(i).addClass(a),s.attr({tabindex:"0","aria-selected":"true","aria-expanded":"true"}),i[t.showTabFn](n,(()=>elementorFrontend.elements.$window.trigger("elementor-pro/motion-fx/recalc"))),i.removeAttr("hidden")}isActiveTab(e){return this.elements.$tabTitles.filter('[data-tab="'+e+'"]').hasClass(this.getSettings("classes.active"))}bindEvents(){this.elements.$tabTitles.on({keydown:e=>{jQuery(e.target).is("a")&&"Enter"===e.key&&e.preventDefault(),["End","Home","ArrowUp","ArrowDown"].includes(e.key)&&this.handleKeyboardNavigation(e)},keyup:e=>{switch(e.key){case"ArrowLeft":case"ArrowRight":this.handleKeyboardNavigation(e);break;case"Enter":case"Space":e.preventDefault(),this.changeActiveTab(e.currentTarget.getAttribute("data-tab"))}},click:e=>{e.preventDefault(),this.changeActiveTab(e.currentTarget.getAttribute("data-tab"))}})}onInit(){super.onInit(...arguments),this.activateDefaultTab()}onEditSettingsChange(e){"activeItemIndex"===e&&this.activateDefaultTab()}changeActiveTab(e){const t=this.isActiveTab(e),a=this.getSettings();!a.toggleSelf&&t||!a.hidePrevious||this.deactivateActiveTab(),!a.hidePrevious&&t&&this.deactivateActiveTab(e),t||this.activateTab(e)}}t.default=baseTabs},9459:(e,t,a)=>{var s=a(7914);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(a(9728));class Tabs extends i.default{getDefaultSettings(){return{...super.getDefaultSettings(),toggleSelf:!1}}}t.default=Tabs}}]);