fixed tabbed pages (options) for IE, working on styling the paginav

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-08-27 05:00:00 -07:00
parent cc7519e964
commit 1a06082201
5 changed files with 126 additions and 35 deletions

View File

@ -7,8 +7,14 @@ function comicpress_options() {
add_action('admin_head-'.$pagehook, 'comicpress_admin_page_head'); add_action('admin_head-'.$pagehook, 'comicpress_admin_page_head');
} }
function comicpress_admin_page_head() { ?> function comicpress_admin_page_head() {
global $is_IE;
if ($is_IE) {
?>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/js/tabbed/tabbed_pages_ie.css" type="text/css" media="screen" />
<?php } else { ?>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/js/tabbed/tabbed_pages.css" type="text/css" media="screen" /> <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/js/tabbed/tabbed_pages.css" type="text/css" media="screen" />
<?php } ?>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/tabbed/tabbed_pages.js"></script> <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/tabbed/tabbed_pages.js"></script>
<?php } <?php }
@ -712,7 +718,7 @@ function comicpress_admin() {
</form> </form>
</div> </div>
</div> </div>
</div>
<?php <?php
} }

View File

@ -78,36 +78,40 @@ function wp_pagenavi($before = '', $after = '') {
if($max_page > 1 || intval($pagenavi_options['always_show']) == 1) { if($max_page > 1 || intval($pagenavi_options['always_show']) == 1) {
$pages_text = str_replace("%CURRENT_PAGE%", number_format_i18n($paged), $pagenavi_options['pages_text']); $pages_text = str_replace("%CURRENT_PAGE%", number_format_i18n($paged), $pagenavi_options['pages_text']);
$pages_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pages_text); $pages_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pages_text);
echo $before.'<div class="wp-pagenavi">'."\n"; echo $before.'<div id="paginav">'."\n";
switch(intval($pagenavi_options['style'])) { switch(intval($pagenavi_options['style'])) {
case 1: case 1:
if(!empty($pages_text)) { if(!empty($pages_text)) {
echo '<span class="pages">&#8201;'.$pages_text.'&#8201;</span>'; echo '<li class="paginav-pages">'.$pages_text.'</li>';
} }
if ($start_page >= 2 && $pages_to_show < $max_page) { if ($start_page >= 2 && $pages_to_show < $max_page) {
$first_page_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pagenavi_options['first_text']); $first_page_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pagenavi_options['first_text']);
echo '<a href="'.clean_url(get_pagenum_link()).'" title="'.$first_page_text.'">&#8201;'.$first_page_text.'&#8201;</a>'; echo '<li><a href="'.clean_url(get_pagenum_link()).'" title="'.$first_page_text.'">'.$first_page_text.'</a></li>';
if(!empty($pagenavi_options['dotleft_text'])) { if(!empty($pagenavi_options['dotleft_text'])) {
echo '<span class="extend">&#8201;'.$pagenavi_options['dotleft_text'].'&#8201;</span>'; echo '<li class="paginav-extend">'.$pagenavi_options['dotleft_text'].'</li>';
} }
} }
echo "<li>";
previous_posts_link($pagenavi_options['prev_text']); previous_posts_link($pagenavi_options['prev_text']);
echo "</li>";
for($i = $start_page; $i <= $end_page; $i++) { for($i = $start_page; $i <= $end_page; $i++) {
if($i == $paged) { if($i == $paged) {
$current_page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['current_text']); $current_page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['current_text']);
echo '<span class="current">&#8201;'.$current_page_text.'&#8201;</span>'; echo '<li class="paginav-current">'.$current_page_text.'</li>';
} else { } else {
$page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['page_text']); $page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['page_text']);
echo '<a href="'.clean_url(get_pagenum_link($i)).'" title="'.$page_text.'">&#8201;'.$page_text.'&#8201;</a>'; echo '<li><a href="'.clean_url(get_pagenum_link($i)).'" title="'.$page_text.'">'.$page_text.'</a></li>';
} }
} }
next_posts_link($pagenavi_options['next_text'], $max_page); echo "<li>";
next_posts_link('<li>'.$pagenavi_options['next_text'].'</li>', $max_page);
echo "</li>";
if ($end_page < $max_page) { if ($end_page < $max_page) {
if(!empty($pagenavi_options['dotright_text'])) { if(!empty($pagenavi_options['dotright_text'])) {
echo '<span class="extend">&#8201;'.$pagenavi_options['dotright_text'].'&#8201;</span>'; echo '<li>'.$pagenavi_options['dotright_text'].'</li>';
} }
$last_page_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pagenavi_options['last_text']); $last_page_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pagenavi_options['last_text']);
echo '<a href="'.clean_url(get_pagenum_link($max_page)).'" title="'.$last_page_text.'">&#8201;'.$last_page_text.'&#8201;</a>'; echo '<li><a href="'.clean_url(get_pagenum_link($max_page)).'" title="'.$last_page_text.'">'.$last_page_text.'</a></li>';
} }
break; break;
case 2; case 2;

View File

@ -89,11 +89,12 @@ if ($disable_blog_frontpage == 'no') {
<?php if(function_exists('wp_pagenavi')) { ?> <?php if(function_exists('wp_pagenavi')) { ?>
<div class="paginav"> <div id="wp-paginav">
<?php wp_pagenavi(); ?> <?php wp_pagenavi(); ?>
<div class="clear"></div>
</div> </div>
<?php } else { ?> <?php } else { ?>
<div class="pagenav"> <div id="pagenav">
<div class="pagenav-right"><?php previous_posts_link('Newer Entries &uarr;') ?></div> <div class="pagenav-right"><?php previous_posts_link('Newer Entries &uarr;') ?></div>
<div class="pagenav-left"><?php next_posts_link('&darr; Previous Entries') ?></div> <div class="pagenav-left"><?php next_posts_link('&darr; Previous Entries') ?></div>
<div class="clear"></div> <div class="clear"></div>

View File

@ -1,8 +1,63 @@
#cpadmin {font:11px verdana,arial,sans-serif; padding:5px 0 0 0; line-height:5px;} #cpadmin {
#cpadmin div.off {color:#000; height:23px; margin-right:2px; line-height:23px; padding:0 10px; float:left; background:url(tabs_0.gif) repeat-x left bottom; border:1px solid #ddd; border-bottom-color:#000; cursor:pointer; position:relative; z-index:20;} font: 11px verdana,arial,sans-serif;
#cpadmin div.on {color:#c00; padding:0 10px; margin-right:2px; margin-top:1px; float:left; background:url(tabs_2.gif) repeat-x left bottom; border:1px solid #000; cursor:pointer; border-bottom:0; height:23px; line-height:22px; position:relative; z-index:100;} padding: 5px 0 0 0;
line-height: 5px;
margin: 0 0 -1px 0;
}
div.hide {display:none; width:0; overflow:hidden;} #cpadmin div.off {
div.show {clear:left; background:#fff; margin-top:0; top:-1px; border:1px solid #000;padding:20px; position:relative; z-index:50; font:11px verdana, arial, sans-serif; line-height:18px;} color: #000;
div.show img {float:left; margin:0 10px 10px 0;} height: 23px;
.clear {clear:both;} margin: 0 2px -2px 0;
line-height: 23px;
padding: 0 10px;
float: left;
background: url(tabs_0.gif) repeat-x left bottom;
border-top: 1px solid #ddd;
border-left: solid 1px #ddd;
border-right: solid 1px #ddd;
position: relative;
cursor: pointer;
z-index: 20;
}
#cpadmin div.on {
color: #c00;
padding: 0 10px;
margin: 0 2px -1px 0;
float: left;
background: url(tabs_2.gif) repeat-x left bottom;
border-top: 1px solid #000;
border-left: 1px solid #000;
border-right: 1px solid #000;
border-bottom: 0px;
cursor: pointer;
height: 23px;
line-height: 22px;
position: relative;
z-index: 100;
}
div.hide {
display: none;
width: 0;
overflow: hidden;
}
div.show {
clear: left;
display: run-in;
background: #fff;
border: 1px solid #000;
padding: 20px;
z-index: 50;
margin-top: -2px;
position: relative;
font: 11px verdana, arial, sans-serif;
line-height: 18px;
}
div.show img {
float: left;
margin: 0 10px 10px 0;
}
.clear {
clear: both;
}

View File

@ -1430,35 +1430,60 @@ li.storyline-root {
margin-top: 20px; margin-top: 20px;
} }
/* Pagination */
.wp-pagenavi, .paginav { #wp-paginav {
height: 25px; background: url('images/menu.png');
line-height: 25px; text-align: left;
font-size: 14px; border: 1px solid #999;
} }
#paginav {
padding: 0;
margin: 0;
list-style: none;
float: left;
line-height: 25px;
font-size: 13px;
border-right: 1px solid #aaa;
}
.wp-pagenavi a, .wp-pagenavi a:link, .wp-pagenavi a:visited, .wp-pagenavi a:hover, .wp-pagenavi a:active { #paginav .paginav-pages {
padding: 2px; padding: 0 15px 0 15px;
}
#paginav a {
padding: 0px 10px 0 10px;
display: block;
color: #000;
text-decoration: none; text-decoration: none;
} }
#paginav li {
float: left;
}
.wp-pagenavi span.pages { #paginav li a {
color: #777; border-left: 1px solid #aaa;
margin-right: 10px; border-right: 1px solid #fff;
}
#paginav .paginav-current {
padding: 0px 10px 0 10px;
color: #fff;
border-left: 1px solid #aaa;
background: url('images/menu.png') 0 -150px;
} }
.wp-pagenavi span.current, .paginav .current { #paginav li:hover a {
font-size: 16px; border-left: 1px solid #8b160f;
font-weight: bold; border-right: 1px solid #c28380;
color: #fff;
background: url('images/menu.png') 0 -75px;
} }
.wp-pagenavi span.extend {
}
/* Drop Bar */ /* Drop Bar */