Plugin Directory

Changeset 371066


Ignore:
Timestamp:
04/10/2011 04:59:50 AM (15 years ago)
Author:
seanklein
Message:

updating for compliance with WordPress 3.1.1

Location:
code-to-widget/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code-to-widget/trunk/CHANGELOG.txt

    r315091 r371066  
    11# Code to Widget Changelog
     2
     3## 1.1.4
     4
     5- Fixing an issue with the Folder check and the smiley face
    26
    37## 1.1.3
  • code-to-widget/trunk/README.txt

    r315091 r371066  
    33Contributors: seanklein
    44Requires at least: 2.9
    5 Tested up to: 3.0.1
    6 Stable tag: 1.1.3
     5Tested up to: 3.1.1
     6Stable tag: 1.1.4
    77
    88Code to Widget Plugin uses PHP files from a specified directory, and (if the file has the proper template tags) adds a Widget.
  • code-to-widget/trunk/code-to-widget.php

    r315091 r371066  
    44Plugin URI: http://seanklein.org
    55Description: Code to Widget Plugin uses PHP files from a specified directory, and (if the file has the proper template tags) adds a Widget.
    6 Version: 1.1.3
     6Version: 1.1.4
    77Author: Sean Klein
    88Author URI: http://seanklein.org
     
    2828// ini_set('display_errors', '1'); ini_set('error_reporting', E_ALL);
    2929load_plugin_textdomain('skctw');
    30 define('SKCW_VERSION', '1.1.3');
     30define('SKCW_VERSION', '1.1.4');
    3131
    3232/**
     
    102102    header('Content-type: text/css');
    103103    ?>
     104    .skcw-template-directory-check-result {
     105        padding:2px 8px;
     106        display:none;
     107    }
    104108    .skcw-directory-searching {
    105109        background:#FFFFFF url("<?php echo admin_url('images/wpspin_light.gif'); ?>") no-repeat scroll right center;
     
    110114    .skcw-directory-negative {
    111115        background:#FFFFFF url("<?php echo includes_url('images/smilies/icon_exclaim.gif'); ?>") no-repeat scroll right center;
     116    }
     117    .skcw-directory-question {
     118        background:#FFFFFF url("<?php echo includes_url('images/smilies/icon_question.gif'); ?>") no-repeat scroll right center;
    112119    }
    113120    <?php
     
    120127    ;(function($) {
    121128        $(function() {
    122             $("#skcw-template-directory-check").live('click', function() {
     129            $("#skcw-template-directory-check").live('click', function(e) {
    123130                var template_input = $("#skcw-template-directory");
     131                var search_result = $(".skcw-template-directory-check-result");
    124132                var directory = template_input.val();
    125133               
    126                 template_input.addClass('skcw-directory-searching');
     134                if (directory == '') {
     135                    alert('<?php _e('Please enter a directory in the field, then click the "Test Directory" button again.', 'skcw'); ?>');
     136                    search_result.show().removeClass('skcw-directory-negative').removeClass('skcw-directory-positive').addClass('skcw-directory-question');
     137                    e.preventDefault();
     138                }
    127139               
     140                search_result.show().removeClass('skcw-directory-negative').removeClass('skcw-directory-positive').removeClass('skcw-directory-question').addClass('skcw-directory-searching');
     141
    128142                $.post('<?php echo admin_url(); ?>', {
    129143                    sk_action: 'check_directory',
     
    131145                }, function(r) {
    132146                    if (r == 1) {
    133                         template_input.removeClass('skcw-directory-searching');
    134                         template_input.addClass('skcw-directory-positive');
     147                        search_result.removeClass('skcw-directory-searching');
     148                        search_result.addClass('skcw-directory-positive');
    135149                    }
    136150                    else {
    137                         template_input.removeClass('skcw-directory-searching');
    138                         template_input.addClass('skcw-directory-negative');
    139                     }
    140                 })
     151                        search_result.removeClass('skcw-directory-searching');
     152                        search_result.addClass('skcw-directory-negative');
     153                    }
     154                });
    141155            });
    142156           
     
    205219                <tbody>
    206220                    <tr valign="top">
    207                         <th scope="row">
     221                        <th scope="row" style="width:140px;">
    208222                            <label for="skcw-template-directory">
    209223                                <?php _e('Template Directory: ','skctw'); ?>
     
    212226                        <td>
    213227                            <input id="skcw-template-directory" name="skcw_template_directory" type="text" class="widefat" value="<?php echo esc_attr($template_path); ?>" style="width:500px;" />
     228                            <span class="skcw-template-directory-check-result">&nbsp;</span>
    214229                            <input id="skcw-template-directory-check" name="skcw_template_directory_check" type="button" class="button" value="<?php _e('Test Directory', 'skctw'); ?>" />
    215230                        </td>
Note: See TracChangeset for help on using the changeset viewer.