Skip to content

Commit

Permalink
added donate button to homepage #107
Browse files Browse the repository at this point in the history
  • Loading branch information
neocotic committed May 29, 2012
1 parent 5275f0b commit e855877
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,16 @@
"message": "Do you want to continue anyway?",
"description": "2nd paragraph for the confirmation dialog displayed when deleting a template."
},
"opt_donate_button": {
"message": "$ICON$ Donate",
"description": "Text for the Donate button.",
"placeholders": {
"icon": {
"content": "<i class=\"icon-heart icon-white\"></i>",
"example": "<i class=\"icon-heart icon-white\"></i>"
}
}
},
"opt_errors_header": {
"message": "The following problem(s) need to be corrected;",
"description": "Preceding text for any errors on the Templates tab."
Expand Down
2 changes: 2 additions & 0 deletions src/css/options.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ pre {overflow: auto; white-space: pre; word-wrap: normal;}
.popover-content > p > p:last-child {margin-bottom: 0;}
.popover-inner {text-align: left;}
#template_image_preview {margin-left: 6px; vertical-align: baseline;}
#donation {display: inline; margin: 0;}
#donation [type="submit"] {margin: -4px 6px 0 0;}
.help {cursor: help;}
.tight {margin: 0;}
.tight-top {margin-top: 0;}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/options.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ options = window.options = new class Options extends utils.Class
$('#tools_nav').click -> $('#tools_wizard').modal 'show'
$('.tools_close_btn').click -> $('#tools_wizard').modal 'hide'
# Ensure that form submissions don't reload the page.
$('form').submit -> no
$('form:not(#donation)').submit -> no
# Load the current option values.
load()
$('#template_shortcut_modifier').html if ext.isThisPlatform 'mac'
Expand Down
9 changes: 8 additions & 1 deletion src/pages/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,14 @@ <h3 i18n-content="opt_guide_notes_header"></h3>
</div>
<hr>
<footer class="footer">
<p class="pull-right"><a data-goto="#top" i18n-content="opt_top_button"></a></p>
<div class="pull-right">
<form id="donation" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="BGWG9R5LBNECY">
<button type="submit" class="btn btn-mini btn-warning" i18n-content="opt_donate_button"></button>
</form>
<a data-goto="#top" i18n-content="opt_top_button"></a>
</div>
<p id="footer">&copy;<span class="year-repl"></span> <a href="http://neocotic.com" target="_blank">Alasdair Mercer</a></p>
</footer>
<div id="tools_wizard" class="hide modal">
Expand Down

0 comments on commit e855877

Please sign in to comment.