one- and three-button class tagging

This commit is contained in:
John Bintz 2010-01-28 21:32:24 -05:00
parent 6fca81a311
commit adc9f9d173
2 changed files with 4 additions and 4 deletions

View File

@ -156,14 +156,14 @@ class ComicPressBookmarkWidget extends WP_Widget {
$id = 'comic-bookmark-' . md5(rand()); $id = 'comic-bookmark-' . md5(rand());
switch ($instance['mode']) { switch ($instance['mode']) {
case 'three-button': ?> case 'three-button': ?>
<div class="bookmark-widget" id="<?php echo $id ?>"> <div class="bookmark-widget three-button" id="<?php echo $id ?>">
<a href="#" class="tag-page"></a> <a href="#" class="tag-page"></a>
<a href="#" class="goto-tag"></a> <a href="#" class="goto-tag"></a>
<a href="#" class="clear-tag"></a> <a href="#" class="clear-tag"></a>
</div> </div>
<?php break; <?php break;
case 'one-button': ?> case 'one-button': ?>
<div class="bookmark-widget" id="<?php echo $id ?>"> <div class="bookmark-widget one-button" id="<?php echo $id ?>">
<a href="#" class="bookmark-clicker"></a> <a href="#" class="bookmark-clicker"></a>
</div> </div>
<?php break; <?php break;

View File

@ -91,7 +91,7 @@ class BookmarkWidgetTest extends PHPUnit_Framework_TestCase {
), ),
array( array(
'//p[text()="Title"]' => true, '//p[text()="Title"]' => true,
'//div[@class="bookmark-widget"]/a[@class="bookmark-clicker"]' => true, '//div[@class="bookmark-widget one-button"]/a[@class="bookmark-clicker"]' => true,
'//script[contains(text(), "tag-page")]' => false, '//script[contains(text(), "tag-page")]' => false,
'//script[contains(text(), "bookmark-clicker-off")]' => true, '//script[contains(text(), "bookmark-clicker-off")]' => true,
'//script[contains(text(), "Post url")]' => true, '//script[contains(text(), "Post url")]' => true,
@ -106,7 +106,7 @@ class BookmarkWidgetTest extends PHPUnit_Framework_TestCase {
), ),
array( array(
'//p[text()="Other Title"]' => true, '//p[text()="Other Title"]' => true,
'//div[@class="bookmark-widget"]/a[@class="tag-page"]' => true, '//div[@class="bookmark-widget three-button"]/a[@class="tag-page"]' => true,
'//script[contains(text(), "tag-page")]' => true, '//script[contains(text(), "tag-page")]' => true,
'//script[contains(text(), "bookmark-clicker-off")]' => false, '//script[contains(text(), "bookmark-clicker-off")]' => false,
'//script[contains(text(), "Blog url")]' => true, '//script[contains(text(), "Blog url")]' => true,