HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/zaklada/wp-content/plugins/wpml-media-translation/res/js/submitted-basket-notice.js
/* globals wpml_media_basket_notice_data */
var WPML_Media_Submitted_Basket_Notice = WPML_Media_Submitted_Basket_Notice || {};

jQuery(function ($) {
	"use strict";

	var form = jQuery('#translation-jobs-translators-form');
	form.on('wpml-tm-basket-submitted', function(){

		var dialogBox = $('#submitted-basket-notice-dialog');
		dialogBox.dialog({
			modal:true,
			closeOnEscape: false,
			dialogClass: "no-close otgs-ui-dialog",
			resizable: false,
			draggable: false,
			width: 600,
			open: function() {
				repositionDialog();
				wpmlTMBasket.dialogs.push( 'media' );
				wpmlTMBasket.redirect = false;
			},
			buttons: [
				{
					text: wpml_media_basket_notice_data.button_label,
					class: 'button-primary',
					click: function() {
						dialogBox.dialog('close');
					}
				}
			],
			close: function() {
				wpmlTMBasket.dialogs.splice( wpmlTMBasket.dialogs.indexOf( 'media' ), 1 );

				if(0 === wpmlTMBasket.dialogs.length) {
					location.href = dialogBox.data('redirect-url');
				}
			}
		});

		$(window).resize(repositionDialog);

		function repositionDialog() {
			var winH = $(window).height() - 180;
			$(".otgs-ui-dialog .ui-dialog-content").css({
				"max-height": winH
			});
			$(".otgs-ui-dialog").css({
				"max-width": "95%"
			});
			dialogBox.dialog("option", "position", {
				my: "center",
				at: "center",
				of: window
			});
		}
	});
});