Permalink
Browse files

setup background image for flagging button

  • Loading branch information...
1 parent af178ff commit d429167dc6be9d7626bedacdf4c4291d77497b2a jayseeg committed Apr 12, 2012
View
4 app/View/Pages/view.ctp
@@ -30,16 +30,14 @@
if($flagged){
$flag = 'Flagged';
$href = '';
- $span = '⚑';
} else {
$flag = 'Flag';
$href = 'href="javascript:void(1);"';
- $span = '⚐';
}
echo $this->Form->create('Flag', array('url'=>'/pages/flag'));
echo $this->Form->hidden('user_ip', array('value'=>$userIP));
echo $this->Form->hidden('haikwitter_id', array('value'=>$entry['Haiku']['id']));
- echo '<div class="hidden ajaxSubmit"><a ' . $href . ' title="Flag this post as innappropriate" class="' . $flag . ' flag-button">' . $flag . ' <span>' . $span . '</span></a></div>';
+ echo '<div class="hidden ajaxSubmit"><a ' . $href . ' title="Flag this post as innappropriate" class="' . $flag . ' flag-button">' . $flag . ' <span></span></a></div>';
echo $this->Form->end(array('label'=>'Flag', 'name'=>'flag', 'div'=>false, 'class'=>'flag-submit flag flag-button ' . $flag));
?>
</div>
View
9 app/webroot/css/900_style.css
@@ -368,7 +368,7 @@ input.form-error {
color: #fff;
font-family: sans-serif;
font-size: 11px;
- line-height: 20px;
+ line-height: 23px;
text-decoration: none;
border-radius: 3px;
@@ -393,7 +393,12 @@ input.flag-button {
position: relative;
display: inline-block;
top: 2px;
- font-size: 16px;
+ height: 12px;
+ width: 10px;
+ background: url(../img/flag.png) no-repeat left bottom;
+}
+.Flagged span {
+ background-position: left top;
}
.Flag,
input.Flagged {
View
BIN app/webroot/img/flag.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
2 app/webroot/js/script.js
@@ -95,7 +95,7 @@
}
if(typeof returnData !== 'undefined' && returnData.flagged === true){
$('div.ajaxSubmit').find('a')
- .html('Flagged <span>&#9873;</span>')
+ .html('Flagged <span></span>')
.removeAttr('href')
.removeClass('Flag')
.addClass('Flagged');

0 comments on commit d429167

Please sign in to comment.