Changeset 8917
- Timestamp:
- 09/17/2008 11:32:33 AM (17 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r8901 r8917 729 729 break; 730 730 case 'inline-data': 731 get_inline_data( explode(',', $_POST['posts']) ); 731 check_ajax_referer( 'inlineeditnonce', 'inline_edit_nonce' ); 732 733 if ( isset($_POST['posts']) ) 734 get_inline_data( explode(',', $_POST['posts']) ); 735 732 736 die(); 733 737 break; 734 738 case 'inline-save': 739 check_ajax_referer( 'inlineeditnonce', 'inline_edit_nonce' ); 740 741 if ( ! isset($_POST['post_ID']) ) 742 exit; 743 735 744 inline_save_row( $_POST ); 745 746 $post = array(); 736 747 if ( 'page' == $_POST['post_type'] ) { 737 $post = array();738 748 $post[] = get_post($_POST['post_ID']); 739 page_rows( $post);749 page_rows($post); 740 750 } elseif ( 'post' == $_POST['post_type'] ) { 741 751 $mode = $_POST['post_view']; 742 $post = array();743 752 $post[] = get_post($_POST['post_ID']); 744 753 post_rows($post); -
trunk/wp-admin/includes/template.php
r8916 r8917 497 497 ?> 498 498 <td <?php echo $attributes ?>> 499 <?php wp_nonce_field( 'inlineeditnonce', 'inline_edit_nonce', false ) ?> 499 500 <div class="title"> 500 501 <input type="text" name="post_title" class="title" value="" /><br /> … … 520 521 <?php endif; ?> 521 522 <div class="clear"></div> 523 <div class="save"> 522 524 <?php 523 525 $actions = array(); … … 532 534 } 533 535 ?> 536 </div> 534 537 </td> 535 538 <?php -
trunk/wp-admin/js/inline-edit.js
r8857 r8917 52 52 return false; 53 53 54 jQuery.post('admin-ajax.php', 55 {54 jQuery.post('admin-ajax.php', { 55 'inline_edit_nonce': jQuery('#inline_edit_nonce').val(), 56 56 action: 'inline-data', 57 57 posts: id … … 80 80 // add the new blank row 81 81 var editRow = blankRow.clone(true); 82 jQuery(editRow).attr('id', 'edit-'+id).addClass('inline ').show();82 jQuery(editRow).attr('id', 'edit-'+id).addClass('inline-editor').show(); 83 83 if(jQuery('#'+postType+'-'+id).hasClass('alternate')) 84 84 jQuery(editRow).addClass('alternate'); … … 140 140 id = getRowId(id); 141 141 142 jQuery('#edit-'+id+' .check-column').html('<img src="images/loading.gif" alt=" Saving..." />');142 jQuery('#edit-'+id+' .check-column').html('<img src="images/loading.gif" alt="" />'); 143 143 144 144 var params = { 145 action: 'inline-save', 145 'inline_edit_nonce': jQuery('#inline_edit_nonce').val(), 146 action: 'inline-save', 146 147 post_type: postType, 147 post_ID: 148 post_ID: id, 148 149 edit_date: 'true', 149 150 post_view: postView -
trunk/wp-admin/wp-admin.css
r8913 r8917 2156 2156 2157 2157 /* Inline Editor */ 2158 2159 .inline { 2160 font-size: 10px; 2161 } 2162 2163 .inline td { 2158 .inline-editor { 2159 font-size: 11px; 2160 } 2161 2162 .inline-editor .save { 2163 padding-top: 5px; 2164 } 2165 2166 .inline-editor td { 2164 2167 padding-right: 4px; 2165 2168 padding-left: 7px; 2166 2169 } 2167 2170 2168 .inline input, .inline select, .inlinetextarea {2171 .inline-editor input, .inline-editor select, .inline-editor textarea { 2169 2172 font-size: 10px !important; 2170 2173 padding: 2px; … … 2172 2175 } 2173 2176 2174 .inline td.date {2177 .inline-editor td.date { 2175 2178 width: 87px; 2176 2179 } 2177 2180 2178 .inline td.page-title {2181 .inline-editor td.page-title { 2179 2182 width: 495px; 2180 2183 } 2181 2184 2182 .inline td.post-title input.title {2185 .inline-editor td.post-title input.title { 2183 2186 width: 250px; 2184 2187 } 2185 2188 2186 .inline td.post-title input.slug {2189 .inline-editor td.post-title input.slug { 2187 2190 width: 222px; 2188 2191 float: right; 2189 2192 } 2190 2193 2191 .inline div.title {2192 float: left; 2193 } 2194 2195 .inline div.title input.title {2194 .inline-editor div.title { 2195 float: left; 2196 } 2197 2198 .inline-editor div.title input.title { 2196 2199 font-size: 12px !important; 2197 2200 } 2198 2201 2199 .inline div.title label {2202 .inline-editor div.title label { 2200 2203 float: left; 2201 2204 margin-top: 4px; 2202 2205 } 2203 2206 2204 .inline td.page-title input.slug {2207 .inline-editor td.page-title input.slug { 2205 2208 width: 123px; 2206 2209 float: right; 2207 2210 } 2208 2211 2209 .inline div.other, .inlinediv.more {2212 .inline-editor div.other, .inline-editor div.more { 2210 2213 width: 190px; 2211 2214 float: left; … … 2213 2216 } 2214 2217 2215 .inline div.other label, .inlinediv.more label {2218 .inline-editor div.other label, .inline-editor div.more label { 2216 2219 display: block; float: left; 2217 2220 width: 54px; … … 2219 2222 } 2220 2223 2221 .inline div.other select {2224 .inline-editor div.other select { 2222 2225 width: 133px; 2223 2226 } 2224 2227 2225 .inline div.more {2228 .inline-editor div.more { 2226 2229 width: 125px; 2227 2230 } 2228 2231 2229 .inline div.more input {2232 .inline-editor div.more input { 2230 2233 width: 60px; 2231 2234 } 2232 2235 2233 .inline td.author select {2236 .inline-editor td.author select { 2234 2237 width: 110px; 2235 2238 } 2236 2239 2237 .inline ul.categories {2240 .inline-editor ul.categories { 2238 2241 list-style: none; 2239 2242 padding: 0; margin: 0; … … 2243 2246 } 2244 2247 2245 .inline ul.categories ul.children {2248 .inline-editor ul.categories ul.children { 2246 2249 list-style: none; 2247 2250 padding-left: 15px; 2248 2251 } 2249 2252 2250 .inline ul.categories li {2253 .inline-editor ul.categories li { 2251 2254 margin-bottom: 2px; 2252 2255 } 2253 2256 2254 .inline ul.categories input {2257 .inline-editor ul.categories input { 2255 2258 vertical-align: middle; 2256 2259 padding: 0; border: 0; 2257 2260 } 2258 2261 2259 .inline td.tags textarea {2262 .inline-editor td.tags textarea { 2260 2263 height: 58px; width: 100%; 2261 2264 } 2262 2265 2263 .inline td.comments {2266 .inline-editor td.comments { 2264 2267 padding-left: 0; 2265 2268 } 2266 2269 2267 .inline td.status select {2270 .inline-editor td.status select { 2268 2271 width: 98px; 2269 2272 } 2270 2273 2271 .inline td.status input {2274 .inline-editor td.status input { 2272 2275 vertical-align: middle; 2273 2276 }
Note: See TracChangeset
for help on using the changeset viewer.