Plugin Directory

Changeset 1601082


Ignore:
Timestamp:
02/22/2017 06:31:49 AM (9 years ago)
Author:
ayush.malakar
Message:

Bug fixed: Default Value not being passed. Default value will now be sent to email if user does not slider the slider

Location:
cf7-ui-slider/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cf7-ui-slider/trunk/cf7-ui-slider.php

    r1575498 r1601082  
    44 * Plugin URI:        http://ayushmalakar.com.np/
    55 * Description:       A simple way to add jQuery UI Slider to your contact form 7
    6  * Version:            1.5.0
     6 * Version:            1.5.1
    77 * Author:            Ayush Malakar
    88 * Author URI:        http://ayushmalakar.com.np/
     
    2121         * @var string
    2222         */
    23         const VERSION = '1.5.0';
     23        const VERSION = '1.5.1';
    2424
    2525        /**
  • cf7-ui-slider/trunk/includes/slider-tag.php

    r1575498 r1601082  
    4747
    4848            ob_start();
    49             $default_value = ! empty( $atts[ 'ui_default' ] ) ?$atts[ 'ui_default' ] : $atts[ 'min' ];
     49            $default_value = ! empty( $atts[ 'ui_default' ] ) ? $atts[ 'ui_default' ] : $atts[ 'min' ];
    5050            ?>
    51             <script>
    52                 jQuery(function ($) {
    53                     $("#<?php echo $atts[ 'connect' ] ?>").css('display', 'none');
    54                     var tooltip = $('<div class="slider-tooltip" />').css({
    55                         position: 'absolute'
    56                     });
    57 
    58                     tooltip.text(<?php  echo $default_value ?>);
    59 
    60                     $("#<?php echo $atts[ 'id' ]; ?>").slider({
    61                         range: "min",
    62                         min: <?php echo $atts[ 'min' ]; ?>,
    63                         max: <?php echo $atts[ 'max' ];?>,
    64                         value:  <?php    echo $default_value ?>,
    65                         slide: function (event, ui) {
    66                             $("#<?php echo $atts[ 'connect' ] ?>").val(ui.value);
    67                             tooltip.text(ui.value);
    68                         },
    69                         change: function (event, ui) {
    70                         }
    71                     }).find(".ui-slider-handle").append(tooltip);
    72                     $("#<?php echo $atts[ 'connect' ] ?>").val($("#<?php $atts[ 'connect' ]?>").slider("value"));
    73                 });
    74             </script>
    7551
    7652
    7753            <div id="<?php echo $atts[ 'id' ]; ?>"></div>
     54            <script>
     55                jQuery(function ($) {
     56                    $(window).ready(function () {
     57                        $("#<?php echo $atts[ 'connect' ] ?>").css('display', 'none');
     58                        var tooltip = $('<div class="slider-tooltip" />').css({
     59                            position: 'absolute'
     60                        });
     61
     62                        tooltip.text(<?php  echo $default_value ?>);
     63
     64                        $("#<?php echo $atts[ 'id' ]; ?>").slider({
     65                            range: "min",
     66                            min: <?php echo $atts[ 'min' ]; ?>,
     67                            max: <?php echo $atts[ 'max' ];?>,
     68                            value:  <?php    echo $default_value ?>,
     69                            slide: function (event, ui) {
     70                                $("#<?php echo $atts[ 'connect' ] ?>").val(ui.value);
     71                                tooltip.text(ui.value);
     72                            },
     73                            change: function (event, ui) {
     74                            }
     75                        }).find(".ui-slider-handle").append(tooltip);
     76                        $("#<?php echo $atts[ 'connect' ] ?>").val(<?php echo $default_value ?>);
     77                    });
     78                });
     79            </script>
    7880            <?php
    7981            return ob_get_clean();
  • cf7-ui-slider/trunk/readme.txt

    r1575527 r1601082  
    3535N/A
    3636
    37 == Screenshots ==
     37== Screenshot ==
    38381. Admin section panel
    39392. Fields for the slider
     
    4141
    4242== Changelog ==
    43 
    44 = 1.0.0 =
    45 * Initial Release
     43==1.5.1==
     44Bug fixed: Default Value not being passed. Default value will now be sent to email if user does not slider the slider
    4645= 1.5.0 =
    4746* Added touch support for mobile devices
     
    4948* Now supports default value
    5049* Auto Hide connector field
     50= 1.0.0 =
     51* Initial Release
    5152
    5253
    5354
    5455
     56
     57
Note: See TracChangeset for help on using the changeset viewer.