admin ui cleanup

This commit is contained in:
John Bintz 2009-11-16 21:53:40 -05:00
parent 00253383d3
commit b87600e92c
6 changed files with 26 additions and 20 deletions

View File

@ -83,6 +83,7 @@ class ComicPressAdmin {
} }
if (strpos($pagenow, "-upload") !== false) { if (strpos($pagenow, "-upload") !== false) {
wp_enqueue_style('cp-admin', plugin_dir_url(dirname(__FILE__)) . '/css/cp-admin.css');
wp_enqueue_script('cp-media', plugin_dir_url(dirname(__FILE__)) . '/js/MediaUpload.js', array('prototype')); wp_enqueue_script('cp-media', plugin_dir_url(dirname(__FILE__)) . '/js/MediaUpload.js', array('prototype'));
} }
} }

View File

@ -27,13 +27,8 @@
<?php if (isset($info['file'])) { ?> <?php if (isset($info['file'])) { ?>
<p><strong><?php echo esc_html($result->source_name) ?>:</strong> <?php echo esc_html(basename($info['file'])) ?></p> <p><strong><?php echo esc_html($result->source_name) ?>:</strong> <?php echo esc_html(basename($info['file'])) ?></p>
<?php } ?> <?php } ?>
<?php if (isset($info['width']) && isset($info['height'])) { ?>
<p>
<strong><?php _e('Size:', 'comicpress') ?></strong>
<?php echo esc_html(sprintf('%dx%d', $info['width'], $info['height'])) ?>
</p>
<?php } ?>
<?php if (count($comicpress->comicpress_options['image_types']) > 1) { ?> <?php if (count($comicpress->comicpress_options['image_types']) > 1) { ?>
<a class="comic-ordering-show-associations" href="#"><?php _e('Edit associations', 'comicpress') ?></a> <a class="comic-ordering-show-associations" href="#"><?php _e('Edit associations', 'comicpress') ?></a>
<div class="comic-ordering-associations"> <div class="comic-ordering-associations">
<ul> <ul>

View File

@ -68,9 +68,11 @@
.cp-comic-attachment { .cp-comic-attachment {
cursor: move; cursor: move;
background-color: #ffd7d7; background-color: #ffd7d7;
margin-bottom: 10px; padding: 10px;
border-bottom: solid #aaa 1px; border: solid #DFDFDF 1px;
padding-bottom: 10px border-radius: 5px;
-moz-border-radius: 5px;
margin-bottom: 10px
} }
.enabled { .enabled {
@ -129,11 +131,11 @@
.comic-ordering-associations { .comic-ordering-associations {
border: solid #aaa 1px; border: solid #aaa 1px;
padding: 5px; padding: 0.25em;
width: 100%
} }
.comicpress-admin h3 { .comicpress-admin h3,
.comic-ordering-show-associations {
border: solid #464646 1px; border: solid #464646 1px;
padding: 0.25em; padding: 0.25em;
background: #6D6D6D; background: #6D6D6D;
@ -145,7 +147,11 @@
-moz-border-radius-topright: 5px; -moz-border-radius-topright: 5px;
margin-bottom: 0; margin-bottom: 0;
cursor: hand; cursor: hand;
cursor: pointer cursor: pointer;
display: block;
text-decoration: none;
font-size: 13px;
font-weight: bold;
} }
.comicpress-holder { .comicpress-holder {
@ -153,3 +159,11 @@
border-top: none; border-top: none;
padding: 0.5em padding: 0.5em
} }
.comicpress-is-managing {
width: 16px;
height: 36px;
background: url(../images/comicpress-icon.png) left center no-repeat;
float: right;
display: inline
}

BIN
images/comicpress-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

View File

@ -111,7 +111,7 @@ ComicImageOrdering.setup = function() {
att.select('.comic-ordering-show-associations').pop().observe('click', function(e) { att.select('.comic-ordering-show-associations').pop().observe('click', function(e) {
Event.stop(e); Event.stop(e);
associations_box.toggle(); new Effect[associations_box.visible() ? 'BlindUp' : 'BlindDown'](associations_box, { duration: 0.25 });
}); });
}); });

View File

@ -10,13 +10,9 @@ Event.observe(window, 'load', function() {
if (b) { b[(t.value == 'none') ? 'show' : 'hide'](); } if (b) { b[(t.value == 'none') ? 'show' : 'hide'](); }
} }
item.select('input[name*=comic_image_type]').each(function(radio) { var type = item.select('input[name*=comicpress_management][checked]').pop();
radio.observe('click', function(e) { show_insert(radio); });
});
var type = item.select('input[name*=comic_image_type][checked]').pop();
if (type) { if (type) {
item.select('.filename.new').pop().insert({bottom: new Element('strong').update(type.parentNode.innerHTML.stripTags())}); item.select('.filename.new').pop().insert({bottom: new Element('div').addClassName('comicpress-is-managing')});
show_insert(type); show_insert(type);
} }
}); });