Changeset 371066
- Timestamp:
- 04/10/2011 04:59:50 AM (15 years ago)
- Location:
- code-to-widget/trunk
- Files:
-
- 3 edited
-
CHANGELOG.txt (modified) (1 diff)
-
README.txt (modified) (1 diff)
-
code-to-widget.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
code-to-widget/trunk/CHANGELOG.txt
r315091 r371066 1 1 # Code to Widget Changelog 2 3 ## 1.1.4 4 5 - Fixing an issue with the Folder check and the smiley face 2 6 3 7 ## 1.1.3 -
code-to-widget/trunk/README.txt
r315091 r371066 3 3 Contributors: seanklein 4 4 Requires at least: 2.9 5 Tested up to: 3. 0.16 Stable tag: 1.1. 35 Tested up to: 3.1.1 6 Stable tag: 1.1.4 7 7 8 8 Code 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 4 4 Plugin URI: http://seanklein.org 5 5 Description: 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. 36 Version: 1.1.4 7 7 Author: Sean Klein 8 8 Author URI: http://seanklein.org … … 28 28 // ini_set('display_errors', '1'); ini_set('error_reporting', E_ALL); 29 29 load_plugin_textdomain('skctw'); 30 define('SKCW_VERSION', '1.1. 3');30 define('SKCW_VERSION', '1.1.4'); 31 31 32 32 /** … … 102 102 header('Content-type: text/css'); 103 103 ?> 104 .skcw-template-directory-check-result { 105 padding:2px 8px; 106 display:none; 107 } 104 108 .skcw-directory-searching { 105 109 background:#FFFFFF url("<?php echo admin_url('images/wpspin_light.gif'); ?>") no-repeat scroll right center; … … 110 114 .skcw-directory-negative { 111 115 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; 112 119 } 113 120 <?php … … 120 127 ;(function($) { 121 128 $(function() { 122 $("#skcw-template-directory-check").live('click', function( ) {129 $("#skcw-template-directory-check").live('click', function(e) { 123 130 var template_input = $("#skcw-template-directory"); 131 var search_result = $(".skcw-template-directory-check-result"); 124 132 var directory = template_input.val(); 125 133 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 } 127 139 140 search_result.show().removeClass('skcw-directory-negative').removeClass('skcw-directory-positive').removeClass('skcw-directory-question').addClass('skcw-directory-searching'); 141 128 142 $.post('<?php echo admin_url(); ?>', { 129 143 sk_action: 'check_directory', … … 131 145 }, function(r) { 132 146 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'); 135 149 } 136 150 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 }); 141 155 }); 142 156 … … 205 219 <tbody> 206 220 <tr valign="top"> 207 <th scope="row" >221 <th scope="row" style="width:140px;"> 208 222 <label for="skcw-template-directory"> 209 223 <?php _e('Template Directory: ','skctw'); ?> … … 212 226 <td> 213 227 <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"> </span> 214 229 <input id="skcw-template-directory-check" name="skcw_template_directory_check" type="button" class="button" value="<?php _e('Test Directory', 'skctw'); ?>" /> 215 230 </td>
Note: See TracChangeset
for help on using the changeset viewer.