Plugin Directory

Changeset 2416059


Ignore:
Timestamp:
11/10/2020 06:01:34 PM (5 years ago)
Author:
mdedev
Message:

1.5.3

  • Fixed a bug where javascript validation was not done when the "pop-up" option was selected.
Location:
contest-code-checker
Files:
592 added
3 edited

Legend:

Unmodified
Added
Removed
  • contest-code-checker/trunk/README.txt

    r2415568 r2416059  
    44Requires at least: 4.0
    55Tested up to: 5.5.3
    6 Stable tag: 1.5.2
     6Stable tag: 1.5.3
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6565
    6666== Changelog ==
     67
     68= 1.5.3 =
     69* Fixed a bug where javascript validation was not done when the "pop-up" option was selected.
    6770
    6871= 1.5.2 =
  • contest-code-checker/trunk/contestswp.php

    r2415568 r2416059  
    44 * Plugin Name: ContestsWP
    55 * Plugin URI:  https://www.contestswp.com
    6  * Version: 1.5.2
     6 * Version: 1.5.3
    77 * Description: ContestsWP makes it easy to create and run contests and giveaways on your WordPress site.
    88 *
    99 * @wordpress-plugin
    1010 * Description:       Maintain a list of contest codes and have users check to see if they have won anything
    11  * Version:           1.5.2
     11 * Version:           1.5.3
    1212 * Author:            Swim or Die Software
    1313 * Author URI:        http://www.swimordiesoftware.com
  • contest-code-checker/trunk/free/public/js/contest-code-checker-ajax.js

    r2415568 r2416059  
    55        $("#contest_code_checker_submit").click(function( event ) {
    66            event.preventDefault();
     7            if (jQuery('#contest_code_checker').valid()) {
     8                var data = {
     9                    'action': 'submit_contest_code',
     10                    'contestants_first_name': $("#contestants_first_name").val(),
     11                    'contestants_last_name': $("#contestants_last_name").val(),
     12                    'contestants_email': $("#contestants_email").val(),
     13                    'contestants_code': $("#contestants_code").val(),
     14                    '_wpnonce': $("#_wpnonce").val(),
     15                };
    716
    8             var data = {
    9                 'action': 'submit_contest_code',
    10                 'contestants_first_name': $("#contestants_first_name").val(),
    11                 'contestants_last_name': $("#contestants_last_name").val(),
    12                 'contestants_email': $("#contestants_email").val(),
    13                 'contestants_code': $("#contestants_code").val(),
    14                 '_wpnonce': $("#_wpnonce").val(),
    15             };
     17                jQuery.post(contest_code_data.ajaxurl, data , function(response) {
     18                    var json = JSON.parse(response);
     19                    var popup_width = 'auto';
     20                    var popup_height = 'auto';
    1621
    17             jQuery.post(contest_code_data.ajaxurl, data , function(response) {
    18                 var json = JSON.parse(response);
    19                 var popup_width = 'auto';
    20                 var popup_height = 'auto';
     22                    if(contest_code_data.popup_width > 0) {
     23                        popup_width = contest_code_data.popup_width;
     24                    }
    2125
    22                 if(contest_code_data.popup_width > 0) {
    23                     popup_width = contest_code_data.popup_width;
    24                 }
     26                    if(contest_code_data.popup_height > 0) {
     27                        popup_height = contest_code_data.popup_height;
     28                    }
    2529
    26                 if(contest_code_data.popup_height > 0) {
    27                     popup_height = contest_code_data.popup_height;
    28                 }
    29 
    30                 $( "#ccc-dialog-message" ).html(json.message);
    31                 $( "#ccc-dialog" ).dialog({
    32                   width: popup_width,
    33                   height: popup_height,
    34                   modal: true,
    35                   buttons: {
    36                     Ok: function() {
    37                       $( this ).dialog( "close" );
    38                     }
    39                   }
    40                 });
    41             });
     30                    $( "#ccc-dialog-message" ).html(json.message);
     31                    $( "#ccc-dialog" ).dialog({
     32                      width: popup_width,
     33                      height: popup_height,
     34                      modal: true,
     35                      buttons: {
     36                        Ok: function() {
     37                          $( this ).dialog( "close" );
     38                        }
     39                      }
     40                    });
     41                });
     42            }
    4243
    4344            return false;
Note: See TracChangeset for help on using the changeset viewer.