PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/bilosproperties.com/wp-content/plugins/js_composer/assets/js/params/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : /home/trave494/bilosproperties.com/wp-content/plugins/js_composer/assets/js/params/all.js

/* =========================================================
 * params/all.js v0.0.1
 * =========================================================
 * Copyright 2012 Wpbakery
 *
 * Visual composer javascript functions to enable fields.
 * This script loads with settings form.
 * ========================================================= */

(function ( $ ) {
	var InitGalleries = function () {
		// TODO: Backbone style for view binding
		$( '.gallery_widget_attached_images_list', this.$view ).unbind( 'click.removeImage' ).on( 'click.removeImage',
			'a.icon-remove',
			function ( e ) {
				e.preventDefault();
				var $block = $( this ).closest( '.edit_form_line' );
				$( this ).parent().remove();
				var img_ids = [];
				$block.find( '.added img' ).each( function () {
					img_ids.push( $( this ).attr( "rel" ) );
				} );
				$block.find( '.gallery_widget_attached_images_ids' ).val( img_ids.join( ',' ) ).trigger( 'change' );
			} );
		$( '.gallery_widget_attached_images_list' ).each( function ( index ) {
			var $img_ul = $( this );
			$img_ul.sortable( {
				forcePlaceholderSize: true,
				placeholder: "widgets-placeholder-gallery",
				cursor: "move",
				items: "li",
				update: function () {
					var img_ids = [];
					$( this ).find( '.added img' ).each( function () {
						img_ids.push( $( this ).attr( "rel" ) );
					} );
					$img_ul.closest( '.edit_form_line' ).find( '.gallery' +
					'' +
					'_widget_attached_images_ids' ).val( img_ids.join( ',' ) ).trigger( 'change' );
				}
			} );
		} );
	};
	new InitGalleries();

	var $tabs = $( '#vc_edit-form-tabs' );
	if ( $tabs.length ) {
		$( '.wpb-edit-form' ).addClass( 'vc_with-tabs' );
		$tabs.find( '.vc_edit-form-tab-control' ).removeClass( 'vc_active' ).eq( 0 ).addClass( 'vc_active' );
		$tabs.find( '.vc_edit-form-tab' ).removeClass( 'vc_active' ).eq( 0 ).addClass( 'vc_active' );
		$tabs.find( '.vc_edit-form-link' ).click( function ( e ) {
			var $this = $( this );
			e.preventDefault();
			$tabs.find( '.vc_active' ).removeClass( 'vc_active' );
			$this.parent().addClass( 'vc_active' );
			var $target = $( $this.attr( 'href' ) ).addClass( 'vc_active' );
			$target.parents( '.vc_panel-body' ).scrollTop( 0 ); // fix for #1801
		} );
	}

})( window.jQuery );