bookmark widget cleanup
This commit is contained in:
parent
4abe51d106
commit
0b9e530582
|
@ -36,35 +36,37 @@ Event.observe(window, 'load', function() {
|
||||||
var bookmark_info = new BookmarkInfo();
|
var bookmark_info = new BookmarkInfo();
|
||||||
var info = bookmark_info.read();
|
var info = bookmark_info.read();
|
||||||
|
|
||||||
var hrefs = {};
|
if ($('comic-bookmark-holder')) {
|
||||||
$$('#comic-bookmark-holder a').each(function(a) {
|
var hrefs = {};
|
||||||
var name = $w(a.className).shift();
|
$$('#comic-bookmark-holder a').each(function(a) {
|
||||||
hrefs[name] = a;
|
var name = $w(a.className).shift();
|
||||||
});
|
hrefs[name] = a;
|
||||||
|
});
|
||||||
|
|
||||||
var set_goto_tag = function(i) {
|
var set_goto_tag = function(i) {
|
||||||
hrefs['goto-tag'].href = (i.permalink ? i.permalink : "#");
|
hrefs['goto-tag'].href = (i.permalink ? i.permalink : "#");
|
||||||
[ 'goto-tag','clear-tag' ].each(function(which) {
|
[ 'goto-tag','clear-tag' ].each(function(which) {
|
||||||
hrefs[which].select('img')[0].src = image_root + button_images[which][i.permalink ? "on" : "off"];
|
hrefs[which].select('img')[0].src = image_root + button_images[which][i.permalink ? "on" : "off"];
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
bookmark_info.onWrite = function(i) { set_goto_tag(i); }
|
bookmark_info.onWrite = function(i) { set_goto_tag(i); }
|
||||||
set_goto_tag(info);
|
set_goto_tag(info);
|
||||||
|
|
||||||
Event.observe(hrefs['tag-page'], 'click', function(e) {
|
Event.observe(hrefs['tag-page'], 'click', function(e) {
|
||||||
Event.stop(e);
|
Event.stop(e);
|
||||||
info.permalink = permalink;
|
info.permalink = permalink;
|
||||||
bookmark_info.write(info);
|
bookmark_info.write(info);
|
||||||
});
|
});
|
||||||
|
|
||||||
Event.observe(hrefs['clear-tag'], 'click', function(e) {
|
Event.observe(hrefs['clear-tag'], 'click', function(e) {
|
||||||
Event.stop(e);
|
Event.stop(e);
|
||||||
info.permalink = false;
|
info.permalink = false;
|
||||||
bookmark_info.write(info);
|
bookmark_info.write(info);
|
||||||
});
|
});
|
||||||
|
|
||||||
Event.observe(hrefs['goto-tag'], 'click', function(e) {
|
Event.observe(hrefs['goto-tag'], 'click', function(e) {
|
||||||
if (hrefs['goto-tag'].href == "#") { Event.stop(e); }
|
if (hrefs['goto-tag'].href == "#") { Event.stop(e); }
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,8 +4,10 @@ if (!$comicpress_options['disable_lrsidebars_frontpage']) { ?>
|
||||||
<div class="sidebar-head"></div>
|
<div class="sidebar-head"></div>
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Right Sidebar') ) : ?>
|
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Right Sidebar') ) : ?>
|
||||||
<?php comicpress_comic_bookmark() ?>
|
<?php
|
||||||
|
comicpress_comic_bookmark()
|
||||||
|
?>
|
||||||
|
|
||||||
<?php if (is_cp_theme_layout('standard,v')) { ?>
|
<?php if (is_cp_theme_layout('standard,v')) { ?>
|
||||||
<div class="widget">
|
<div class="widget">
|
||||||
<?php comicpress_calendar(); ?>
|
<?php comicpress_calendar(); ?>
|
||||||
|
|
|
@ -32,5 +32,3 @@ class BookmarkWidget extends WP_Widget {
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
Loading…
Reference in New Issue