Changeset 9857 for trunk/wp-admin/press-this.php
- Timestamp:
- 11/24/2008 04:29:35 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/press-this.php
r9838 r9857 236 236 var last = null 237 237 var img, img_tag, aspect, w, h, skip, i, strtoappend = ""; 238 if(!my_src) {239 238 var my_src = eval( 240 239 jQuery.ajax({ … … 247 246 }).responseText 248 247 ); 249 } 248 if(my_src.length == 0) { 249 var my_src = eval( 250 jQuery.ajax({ 251 type: "GET", 252 url: "<?php echo clean_url($_SERVER['PHP_SELF']); ?>", 253 cache : false, 254 async : false, 255 data: "ajax=photo_images&u=<?php echo urlencode($url); ?>", 256 dataType : "script" 257 }).responseText 258 ); 259 if(my_src.length == 0) { 260 261 strtoappend = '<?php _e('Unable to retrieve images or no images on page.'); ?>'; 262 } 263 } 264 250 265 251 266 for (i = 0; i < my_src.length; i++) { … … 294 309 295 310 jQuery(document).ready(function() { 296 jQuery('#extra_fields').html('<div class="postbox"><h2>Photo <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul id="actions"><li><a href="#" id="photo_add_url" class="thickbox button"><?php _e("Add from URL") ?> +</a></li></ul><div class="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a>< /p></div>');311 jQuery('#extra_fields').html('<div class="postbox"><h2>Photo <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul id="actions"><li><a href="#" id="photo_add_url" class="thickbox button"><?php _e("Add from URL") ?> +</a></li></ul><div class="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a><a href="#" class="refresh button"><?php _e('Refresh'); ?></a></p></div>'); 297 312 jQuery('.close').click(function() { 298 313 jQuery('#extra_fields').hide(); 299 314 jQuery('#extra_fields').html(''); 300 315 }); 316 jQuery('.refresh').click(function() { 317 show('photo'); 318 }); 301 319 jQuery('#img_container').html(strtoappend); 302 320 jQuery('#photo_add_url').attr('href', '?ajax=photo_thickbox_url&height=200&width=500'); 303 321 tb_init('#extra_fields .thickbox'); 322 323 304 324 }); 305 325 <?php break;
Note: See TracChangeset
for help on using the changeset viewer.