1(function($){ 2 $(document).ready( function() { 3 if ( $.fn.wpColorPicker ) { 4 $( '.qtsndtps_color_field' ).wpColorPicker(); 5 $( '.qtsndtps_box_shadow_color' ).wpColorPicker(); 6 }; 7 8 if( $( '.qtsndtps_background_image:checked' ).val() != 'custom' ) { 9 $( '#qtsndtps_custom_image' ).hide(); 10 } 11 12 $( 'input[name="qtsndtps_page_load"]' ).change( function() { 13 if ( '3' === $(this).val() ) { 14 $( '.qtsndtps-button-text' ).show(); 15 } else { 16 $( '.qtsndtps-button-text' ).hide(); 17 } 18 }); 19 20 function qtsndtps_background_image() { 21 if ( $( 'input[name="qtsndtps_background_image"]:checked' ).val() == 'custom' ) { 22 if ($('.qtsndtps_custom_image img' ).attr('src') === '') { 23 $( '#qtsndtps_custom_file, .qtsndtps_hidden' ).show(); 24 $( '.qtsndtps_default_image, .qtsndtps_current_image, .qtsndtps_custom_image' ).hide(); } 25 else { 26 $('#qtsndtps_custom_file, .qtsndtps_hidden, .qtsndtps_current_image, .qtsndtps_custom_image').show(); 27 $('.qtsndtps_default_image').hide(); 28 }; 29 } else if ( $( 'input[name="qtsndtps_background_image"]:checked' ).val() == 'none' ) { 30 $( '#qtsndtps_custom_file, .qtsndtps_hidden, .qtsndtps_current_image, .qtsndtps_custom_image' ).hide(); 31 } else { 32 $( '#qtsndtps_custom_file, .qtsndtps_custom_image' ).hide(); 33 $( '.qtsndtps_hidden, .qtsndtps_default_image, .qtsndtps_current_image' ).show(); 34 } 35 }; 36 if ( $( 'input[name="qtsndtps_background_image"]' ).length ) { 37 qtsndtps_background_image(); 38 $( 'input[name="qtsndtps_background_image"]' ).change( function() { qtsndtps_background_image() }); 39 } 40 41 if( $( '#qtsndtps_additional_options' ).is( ':checked' ) ) { 42 $( '#qtsndtps-text-color-example, #qtsndtps-link-color-example' ).hide(); 43 } 44 45 if( 0 < $( '#qtsndtps_slider' ).length ) { 46 $( '#qtsndtps_slider' ).slider({ 47 range: 'min', 48 min: 0.1, 49 max: 1, 50 step: 0.1, 51 value: $( '#qtsndtps_background_opacity' ).val(), 52 slide: function( event, ui ) { 53 $( '#qtsndtps_background_opacity' ).val( ui.value ); 54 } 55 }); 56 } 57 if( 0 < $( '#qtsndtps_slider_border_radius' ).length ) { 58 $( '#qtsndtps_slider_border_radius' ).slider({ 59 range: 'min', 60 min: 0, 61 max: 50, 62 step: 1, 63 value: $( '#qtsndtps_border_radius' ).val(), 64 slide: function( event, ui ) { 65 $( '#qtsndtps_border_radius' ).val( ui.value ); 66 } 67 }); 68 } 69 if( 0 < $( '#qtsndtps_slider_text_size' ).length ) { 70 $( '#qtsndtps_slider_text_size' ).slider({ 71 range: 'min', 72 min: 10, 73 max: 30, 74 step: 1, 75 value: $( '#qtsndtps_text_size' ).val(), 76 slide: function( event, ui ) { 77 $( '#qtsndtps_text_size' ).val( ui.value ); 78 } 79 }); 80 } 81 if( 0 < $( '#qtsndtps_slider_title_text_size' ).length ) { 82 $( '#qtsndtps_slider_title_text_size' ).slider({ 83 range: 'min', 84 min: 15, 85 max: 40, 86 step: 1, 87 value: $( '#qtsndtps_title_text_size' ).val(), 88 slide: function( event, ui ) { 89 $( '#qtsndtps_title_text_size' ).val( ui.value ); 90 } 91 }); 92 } 93 94 if ( $( '.qtsndtps_title_post:checked' ).val() == '1' ) { 95 $( '.qtsndtps_title_post_fields' ).hide(); 96 } 97 98 $( '.qtsndtps_title_post' ).change( function() { 99 if ( $( this ).is( ':checked' ) && $( this ).val() == '1' ) { 100 $( '.qtsndtps_title_post_fields' ).hide(); 101 } else if ( $( this ).is( ':checked' ) && $( this ).val() == '0' ) { 102 $( '.qtsndtps_title_post_fields' ).show(); 103 } 104 }); 105 106 $( '#qtsndtps-link-color-example, #qtsndtps-text-color-example' ).on( "click", function() { 107 if ( typeof bws_show_settings_notice == 'function' ) { 108 bws_show_settings_notice(); 109 } 110 }); 111 112 $( '.qtsndtps_background_image_cover' ).change( function(){ 113 if ( $( this ).is( ':checked' ) ) { 114 $( '.qtsndtps_additions_block:not(.qtsndtps_background_image_cover)' ).attr( 'disabled', 'disabled' ); 115 $( '.qtsndtps_background_image_position' ).attr( 'disabled', 'disabled' ); 116 } else { 117 $( '.qtsndtps_additions_block:not(.qtsndtps_background_image_cover)' ).removeAttr( 'disabled' ); 118 $( '.qtsndtps_background_image_position' ).removeAttr( 'disabled' ); 119 } 120 }); 121 }); 122})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.