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');
}
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" />
<?php } ?>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/tabbed/tabbed_pages.js"></script>
<?php }
@ -711,8 +717,8 @@ function comicpress_admin() {
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</div>
</div>
</div>
<?php
}

View File

@ -78,36 +78,40 @@ function wp_pagenavi($before = '', $after = '') {
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("%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'])) {
case 1:
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) {
$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'])) {
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']);
echo "</li>";
for($i = $start_page; $i <= $end_page; $i++) {
if($i == $paged) {
$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 {
$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(!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']);
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;
case 2;

View File

@ -89,11 +89,12 @@ if ($disable_blog_frontpage == 'no') {
<?php if(function_exists('wp_pagenavi')) { ?>
<div class="paginav">
<div id="wp-paginav">
<?php wp_pagenavi(); ?>
<div class="clear"></div>
</div>
<?php } else { ?>
<div class="pagenav">
<div id="pagenav">
<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="clear"></div>

View File

@ -1,8 +1,63 @@
#cpadmin {font:11px verdana,arial,sans-serif; padding:5px 0 0 0; line-height:5px;}
#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;}
#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;}
#cpadmin {
font: 11px verdana,arial,sans-serif;
padding: 5px 0 0 0;
line-height: 5px;
margin: 0 0 -1px 0;
}
div.hide {display:none; width:0; overflow:hidden;}
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;}
div.show img {float:left; margin:0 10px 10px 0;}
.clear {clear:both;}
#cpadmin div.off {
color: #000;
height: 23px;
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;
}
/* Pagination */
.wp-pagenavi, .paginav {
height: 25px;
line-height: 25px;
font-size: 14px;
#wp-paginav {
background: url('images/menu.png');
text-align: left;
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 {
padding: 2px;
#paginav .paginav-pages {
padding: 0 15px 0 15px;
}
#paginav a {
padding: 0px 10px 0 10px;
display: block;
color: #000;
text-decoration: none;
}
#paginav li {
float: left;
}
.wp-pagenavi span.pages {
color: #777;
margin-right: 10px;
#paginav li a {
border-left: 1px solid #aaa;
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 {
font-size: 16px;
font-weight: bold;
#paginav li:hover a {
border-left: 1px solid #8b160f;
border-right: 1px solid #c28380;
color: #fff;
background: url('images/menu.png') 0 -75px;
}
.wp-pagenavi span.extend {
}
/* Drop Bar */