git-svn-id: http://svn.automattic.com/wordpress/trunk@8071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2787d1fde5
commit
830428b928
|
@ -1,5 +1,6 @@
|
|||
body {
|
||||
font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
|
||||
color: #333;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
@ -213,15 +214,16 @@ div#categories {
|
|||
}
|
||||
|
||||
div#categories h2 {
|
||||
color: #333;
|
||||
font-size: 12px;
|
||||
margin: 0;
|
||||
margin: .5em 0 0 1em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#categories-all {
|
||||
overflow: auto;
|
||||
padding: 1em;
|
||||
height: 20em;
|
||||
height: 15em;
|
||||
}
|
||||
|
||||
#categories ul {
|
||||
|
@ -243,18 +245,20 @@ div#categories h2 {
|
|||
}
|
||||
|
||||
#tagchecklist {
|
||||
margin-left: 10px;
|
||||
padding-left: 1em;
|
||||
margin-bottom: 1em;
|
||||
font-size: 12px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#tagchecklist strong {
|
||||
margin-left: -8px;
|
||||
position: absolute;
|
||||
font-size: .75em;
|
||||
}
|
||||
|
||||
#tagchecklist span {
|
||||
margin-right: 25px;
|
||||
margin-right: .5em;
|
||||
margin-left: 10px;
|
||||
display: block;
|
||||
float: left;
|
||||
font-size: 11px;
|
||||
|
@ -369,6 +373,7 @@ padding: 0;
|
|||
|
||||
#jaxtag {
|
||||
clear: both;
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.ac_results {
|
||||
|
|
|
@ -57,21 +57,22 @@ function press_it() {
|
|||
return $post_ID;
|
||||
}
|
||||
|
||||
function tag_div() { ?>
|
||||
<p id="jaxtag"><label class="hidden" for="newtag"><?php _e('Tags'); ?></label><input type="text" name="tags_input" class="tags-input" id="tags-input" size="40" tabindex="3" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /></p>
|
||||
<div id="tagchecklist"></div>
|
||||
<?php }
|
||||
|
||||
function category_div() { ?>
|
||||
<div id="categories">
|
||||
<div class="submitbox" id="submitpost">
|
||||
<div id="previewview"> <h2><?php _e('Categories') ?></h2></div>
|
||||
<div id="previewview"></div>
|
||||
<div class="inside">
|
||||
<h2><?php _e('Categories') ?></h2>
|
||||
<div id="categories-all">
|
||||
<ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
|
||||
<?php wp_category_checklist() ?>
|
||||
</ul>
|
||||
</div>
|
||||
<h2><?php _e('Tags') ?></h2>
|
||||
<p id="jaxtag"><label class="hidden" for="newtag"><?php _e('Tags'); ?></label><input type="text" name="tags_input" class="tags-input" id="tags-input" size="40" tabindex="3" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /></p>
|
||||
<div id="tagchecklist"></div>
|
||||
|
||||
</div>
|
||||
<p class="submit">
|
||||
<input type="submit" value="<?php _e('Publish') ?>" onclick="document.getElementById('photo_saving').style.display = '';"/>
|
||||
|
@ -157,6 +158,7 @@ $url = urldecode($url);
|
|||
$url = str_replace(' ', '%20', $url);
|
||||
|
||||
function get_images_from_uri($uri) {
|
||||
if(preg_match('/\.(jpg|png|gif)/', $uri)) return "'".$uri."'";
|
||||
$content = wp_remote_fopen($uri);
|
||||
$host = parse_url($uri);
|
||||
if ( false === $content ) return '';
|
||||
|
@ -179,7 +181,8 @@ $url = str_replace(' ', '%20', $url);
|
|||
$sources[] = $src;
|
||||
}
|
||||
return "'" . implode("','", $sources) . "'";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo 'new Array('.get_images_from_uri($url).')';
|
||||
die;
|
||||
|
@ -251,7 +254,7 @@ if($_REQUEST['ajax'] == 'photo') { ?>
|
|||
|
||||
<small><?php _e('Click images to select:') ?></small>
|
||||
<div class="titlewrap">
|
||||
<div id="img_container">Loading Images...</div>
|
||||
<div id="img_container"></div>
|
||||
</div>
|
||||
<?php die; }
|
||||
|
||||
|
@ -422,8 +425,8 @@ if($_REQUEST['ajax'] == 'photo') { ?>
|
|||
set_editor('')
|
||||
<?php } ?>
|
||||
jQuery('#extra_fields').show();
|
||||
jQuery('#extra_fields').prepend('<h2 id="waiting"><img src="images/loading.gif" alt="" /> Loading...</h2>');
|
||||
jQuery('#extra_fields').load('<?php echo clean_url($_SERVER['PHP_SELF']).'/?ajax=photo&u='.attribute_escape($url); ?>');
|
||||
jQuery('#extra_fields').prepend('<h2><img src="images/loading.gif" alt="" /> Loading...</h2>');
|
||||
jQuery.ajax({
|
||||
type: "GET",
|
||||
cache : false,
|
||||
|
@ -431,6 +434,7 @@ if($_REQUEST['ajax'] == 'photo') { ?>
|
|||
data: "ajax=photo_js&u=<?php echo urlencode($url)?>",
|
||||
dataType : "script",
|
||||
success : function() {
|
||||
jQuery('#waiting').innerHTML('');
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -490,7 +494,7 @@ if($_REQUEST['ajax'] == 'photo') { ?>
|
|||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<?php tag_div(); ?>
|
||||
|
||||
</div>
|
||||
<?php category_div(); ?>
|
||||
</form>
|
||||
|
|
Loading…
Reference in New Issue